rc4-586.S revision 305153
1/* $FreeBSD: stable/11/secure/lib/libcrypto/i386/rc4-586.S 305153 2016-08-31 20:33:59Z jkim $ */
2/* Do not modify. This file is auto-generated from rc4-586.pl. */
3#ifdef PIC
4.file	"rc4-586.S"
5.text
6.globl	RC4
7.type	RC4,@function
8.align	16
9RC4:
10.L_RC4_begin:
11	pushl	%ebp
12	pushl	%ebx
13	pushl	%esi
14	pushl	%edi
15	movl	20(%esp),%edi
16	movl	24(%esp),%edx
17	movl	28(%esp),%esi
18	movl	32(%esp),%ebp
19	xorl	%eax,%eax
20	xorl	%ebx,%ebx
21	cmpl	$0,%edx
22	je	.L000abort
23	movb	(%edi),%al
24	movb	4(%edi),%bl
25	addl	$8,%edi
26	leal	(%esi,%edx,1),%ecx
27	subl	%esi,%ebp
28	movl	%ecx,24(%esp)
29	incb	%al
30	cmpl	$-1,256(%edi)
31	je	.L001RC4_CHAR
32	movl	(%edi,%eax,4),%ecx
33	andl	$-4,%edx
34	jz	.L002loop1
35	movl	%ebp,32(%esp)
36	testl	$-8,%edx
37	jz	.L003go4loop4
38	call	.L004PIC_me_up
39.L004PIC_me_up:
40	popl	%ebp
41	leal	OPENSSL_ia32cap_P-.L004PIC_me_up(%ebp),%ebp
42	btl	$26,(%ebp)
43	jnc	.L003go4loop4
44	movl	32(%esp),%ebp
45	andl	$-8,%edx
46	leal	-8(%esi,%edx,1),%edx
47	movl	%edx,-4(%edi)
48	addb	%cl,%bl
49	movl	(%edi,%ebx,4),%edx
50	movl	%ecx,(%edi,%ebx,4)
51	movl	%edx,(%edi,%eax,4)
52	incl	%eax
53	addl	%ecx,%edx
54	movzbl	%al,%eax
55	movzbl	%dl,%edx
56	movq	(%esi),%mm0
57	movl	(%edi,%eax,4),%ecx
58	movd	(%edi,%edx,4),%mm2
59	jmp	.L005loop_mmx_enter
60.align	16
61.L006loop_mmx:
62	addb	%cl,%bl
63	psllq	$56,%mm1
64	movl	(%edi,%ebx,4),%edx
65	movl	%ecx,(%edi,%ebx,4)
66	movl	%edx,(%edi,%eax,4)
67	incl	%eax
68	addl	%ecx,%edx
69	movzbl	%al,%eax
70	movzbl	%dl,%edx
71	pxor	%mm1,%mm2
72	movq	(%esi),%mm0
73	movq	%mm2,-8(%ebp,%esi,1)
74	movl	(%edi,%eax,4),%ecx
75	movd	(%edi,%edx,4),%mm2
76.L005loop_mmx_enter:
77	addb	%cl,%bl
78	movl	(%edi,%ebx,4),%edx
79	movl	%ecx,(%edi,%ebx,4)
80	movl	%edx,(%edi,%eax,4)
81	incl	%eax
82	addl	%ecx,%edx
83	movzbl	%al,%eax
84	movzbl	%dl,%edx
85	pxor	%mm0,%mm2
86	movl	(%edi,%eax,4),%ecx
87	movd	(%edi,%edx,4),%mm1
88	addb	%cl,%bl
89	psllq	$8,%mm1
90	movl	(%edi,%ebx,4),%edx
91	movl	%ecx,(%edi,%ebx,4)
92	movl	%edx,(%edi,%eax,4)
93	incl	%eax
94	addl	%ecx,%edx
95	movzbl	%al,%eax
96	movzbl	%dl,%edx
97	pxor	%mm1,%mm2
98	movl	(%edi,%eax,4),%ecx
99	movd	(%edi,%edx,4),%mm1
100	addb	%cl,%bl
101	psllq	$16,%mm1
102	movl	(%edi,%ebx,4),%edx
103	movl	%ecx,(%edi,%ebx,4)
104	movl	%edx,(%edi,%eax,4)
105	incl	%eax
106	addl	%ecx,%edx
107	movzbl	%al,%eax
108	movzbl	%dl,%edx
109	pxor	%mm1,%mm2
110	movl	(%edi,%eax,4),%ecx
111	movd	(%edi,%edx,4),%mm1
112	addb	%cl,%bl
113	psllq	$24,%mm1
114	movl	(%edi,%ebx,4),%edx
115	movl	%ecx,(%edi,%ebx,4)
116	movl	%edx,(%edi,%eax,4)
117	incl	%eax
118	addl	%ecx,%edx
119	movzbl	%al,%eax
120	movzbl	%dl,%edx
121	pxor	%mm1,%mm2
122	movl	(%edi,%eax,4),%ecx
123	movd	(%edi,%edx,4),%mm1
124	addb	%cl,%bl
125	psllq	$32,%mm1
126	movl	(%edi,%ebx,4),%edx
127	movl	%ecx,(%edi,%ebx,4)
128	movl	%edx,(%edi,%eax,4)
129	incl	%eax
130	addl	%ecx,%edx
131	movzbl	%al,%eax
132	movzbl	%dl,%edx
133	pxor	%mm1,%mm2
134	movl	(%edi,%eax,4),%ecx
135	movd	(%edi,%edx,4),%mm1
136	addb	%cl,%bl
137	psllq	$40,%mm1
138	movl	(%edi,%ebx,4),%edx
139	movl	%ecx,(%edi,%ebx,4)
140	movl	%edx,(%edi,%eax,4)
141	incl	%eax
142	addl	%ecx,%edx
143	movzbl	%al,%eax
144	movzbl	%dl,%edx
145	pxor	%mm1,%mm2
146	movl	(%edi,%eax,4),%ecx
147	movd	(%edi,%edx,4),%mm1
148	addb	%cl,%bl
149	psllq	$48,%mm1
150	movl	(%edi,%ebx,4),%edx
151	movl	%ecx,(%edi,%ebx,4)
152	movl	%edx,(%edi,%eax,4)
153	incl	%eax
154	addl	%ecx,%edx
155	movzbl	%al,%eax
156	movzbl	%dl,%edx
157	pxor	%mm1,%mm2
158	movl	(%edi,%eax,4),%ecx
159	movd	(%edi,%edx,4),%mm1
160	movl	%ebx,%edx
161	xorl	%ebx,%ebx
162	movb	%dl,%bl
163	cmpl	-4(%edi),%esi
164	leal	8(%esi),%esi
165	jb	.L006loop_mmx
166	psllq	$56,%mm1
167	pxor	%mm1,%mm2
168	movq	%mm2,-8(%ebp,%esi,1)
169	emms
170	cmpl	24(%esp),%esi
171	je	.L007done
172	jmp	.L002loop1
173.align	16
174.L003go4loop4:
175	leal	-4(%esi,%edx,1),%edx
176	movl	%edx,28(%esp)
177.L008loop4:
178	addb	%cl,%bl
179	movl	(%edi,%ebx,4),%edx
180	movl	%ecx,(%edi,%ebx,4)
181	movl	%edx,(%edi,%eax,4)
182	addl	%ecx,%edx
183	incb	%al
184	andl	$255,%edx
185	movl	(%edi,%eax,4),%ecx
186	movl	(%edi,%edx,4),%ebp
187	addb	%cl,%bl
188	movl	(%edi,%ebx,4),%edx
189	movl	%ecx,(%edi,%ebx,4)
190	movl	%edx,(%edi,%eax,4)
191	addl	%ecx,%edx
192	incb	%al
193	andl	$255,%edx
194	rorl	$8,%ebp
195	movl	(%edi,%eax,4),%ecx
196	orl	(%edi,%edx,4),%ebp
197	addb	%cl,%bl
198	movl	(%edi,%ebx,4),%edx
199	movl	%ecx,(%edi,%ebx,4)
200	movl	%edx,(%edi,%eax,4)
201	addl	%ecx,%edx
202	incb	%al
203	andl	$255,%edx
204	rorl	$8,%ebp
205	movl	(%edi,%eax,4),%ecx
206	orl	(%edi,%edx,4),%ebp
207	addb	%cl,%bl
208	movl	(%edi,%ebx,4),%edx
209	movl	%ecx,(%edi,%ebx,4)
210	movl	%edx,(%edi,%eax,4)
211	addl	%ecx,%edx
212	incb	%al
213	andl	$255,%edx
214	rorl	$8,%ebp
215	movl	32(%esp),%ecx
216	orl	(%edi,%edx,4),%ebp
217	rorl	$8,%ebp
218	xorl	(%esi),%ebp
219	cmpl	28(%esp),%esi
220	movl	%ebp,(%ecx,%esi,1)
221	leal	4(%esi),%esi
222	movl	(%edi,%eax,4),%ecx
223	jb	.L008loop4
224	cmpl	24(%esp),%esi
225	je	.L007done
226	movl	32(%esp),%ebp
227.align	16
228.L002loop1:
229	addb	%cl,%bl
230	movl	(%edi,%ebx,4),%edx
231	movl	%ecx,(%edi,%ebx,4)
232	movl	%edx,(%edi,%eax,4)
233	addl	%ecx,%edx
234	incb	%al
235	andl	$255,%edx
236	movl	(%edi,%edx,4),%edx
237	xorb	(%esi),%dl
238	leal	1(%esi),%esi
239	movl	(%edi,%eax,4),%ecx
240	cmpl	24(%esp),%esi
241	movb	%dl,-1(%ebp,%esi,1)
242	jb	.L002loop1
243	jmp	.L007done
244.align	16
245.L001RC4_CHAR:
246	movzbl	(%edi,%eax,1),%ecx
247.L009cloop1:
248	addb	%cl,%bl
249	movzbl	(%edi,%ebx,1),%edx
250	movb	%cl,(%edi,%ebx,1)
251	movb	%dl,(%edi,%eax,1)
252	addb	%cl,%dl
253	movzbl	(%edi,%edx,1),%edx
254	addb	$1,%al
255	xorb	(%esi),%dl
256	leal	1(%esi),%esi
257	movzbl	(%edi,%eax,1),%ecx
258	cmpl	24(%esp),%esi
259	movb	%dl,-1(%ebp,%esi,1)
260	jb	.L009cloop1
261.L007done:
262	decb	%al
263	movl	%ebx,-4(%edi)
264	movb	%al,-8(%edi)
265.L000abort:
266	popl	%edi
267	popl	%esi
268	popl	%ebx
269	popl	%ebp
270	ret
271.size	RC4,.-.L_RC4_begin
272.globl	private_RC4_set_key
273.type	private_RC4_set_key,@function
274.align	16
275private_RC4_set_key:
276.L_private_RC4_set_key_begin:
277	pushl	%ebp
278	pushl	%ebx
279	pushl	%esi
280	pushl	%edi
281	movl	20(%esp),%edi
282	movl	24(%esp),%ebp
283	movl	28(%esp),%esi
284	call	.L010PIC_me_up
285.L010PIC_me_up:
286	popl	%edx
287	leal	OPENSSL_ia32cap_P-.L010PIC_me_up(%edx),%edx
288	leal	8(%edi),%edi
289	leal	(%esi,%ebp,1),%esi
290	negl	%ebp
291	xorl	%eax,%eax
292	movl	%ebp,-4(%edi)
293	btl	$20,(%edx)
294	jc	.L011c1stloop
295.align	16
296.L012w1stloop:
297	movl	%eax,(%edi,%eax,4)
298	addb	$1,%al
299	jnc	.L012w1stloop
300	xorl	%ecx,%ecx
301	xorl	%edx,%edx
302.align	16
303.L013w2ndloop:
304	movl	(%edi,%ecx,4),%eax
305	addb	(%esi,%ebp,1),%dl
306	addb	%al,%dl
307	addl	$1,%ebp
308	movl	(%edi,%edx,4),%ebx
309	jnz	.L014wnowrap
310	movl	-4(%edi),%ebp
311.L014wnowrap:
312	movl	%eax,(%edi,%edx,4)
313	movl	%ebx,(%edi,%ecx,4)
314	addb	$1,%cl
315	jnc	.L013w2ndloop
316	jmp	.L015exit
317.align	16
318.L011c1stloop:
319	movb	%al,(%edi,%eax,1)
320	addb	$1,%al
321	jnc	.L011c1stloop
322	xorl	%ecx,%ecx
323	xorl	%edx,%edx
324	xorl	%ebx,%ebx
325.align	16
326.L016c2ndloop:
327	movb	(%edi,%ecx,1),%al
328	addb	(%esi,%ebp,1),%dl
329	addb	%al,%dl
330	addl	$1,%ebp
331	movb	(%edi,%edx,1),%bl
332	jnz	.L017cnowrap
333	movl	-4(%edi),%ebp
334.L017cnowrap:
335	movb	%al,(%edi,%edx,1)
336	movb	%bl,(%edi,%ecx,1)
337	addb	$1,%cl
338	jnc	.L016c2ndloop
339	movl	$-1,256(%edi)
340.L015exit:
341	xorl	%eax,%eax
342	movl	%eax,-8(%edi)
343	movl	%eax,-4(%edi)
344	popl	%edi
345	popl	%esi
346	popl	%ebx
347	popl	%ebp
348	ret
349.size	private_RC4_set_key,.-.L_private_RC4_set_key_begin
350.globl	RC4_options
351.type	RC4_options,@function
352.align	16
353RC4_options:
354.L_RC4_options_begin:
355	call	.L018pic_point
356.L018pic_point:
357	popl	%eax
358	leal	.L019opts-.L018pic_point(%eax),%eax
359	call	.L020PIC_me_up
360.L020PIC_me_up:
361	popl	%edx
362	leal	OPENSSL_ia32cap_P-.L020PIC_me_up(%edx),%edx
363	movl	(%edx),%edx
364	btl	$20,%edx
365	jc	.L0211xchar
366	btl	$26,%edx
367	jnc	.L022ret
368	addl	$25,%eax
369	ret
370.L0211xchar:
371	addl	$12,%eax
372.L022ret:
373	ret
374.align	64
375.L019opts:
376.byte	114,99,52,40,52,120,44,105,110,116,41,0
377.byte	114,99,52,40,49,120,44,99,104,97,114,41,0
378.byte	114,99,52,40,56,120,44,109,109,120,41,0
379.byte	82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
380.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
381.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
382.align	64
383.size	RC4_options,.-.L_RC4_options_begin
384.comm	OPENSSL_ia32cap_P,16,4
385#else
386.file	"rc4-586.S"
387.text
388.globl	RC4
389.type	RC4,@function
390.align	16
391RC4:
392.L_RC4_begin:
393	pushl	%ebp
394	pushl	%ebx
395	pushl	%esi
396	pushl	%edi
397	movl	20(%esp),%edi
398	movl	24(%esp),%edx
399	movl	28(%esp),%esi
400	movl	32(%esp),%ebp
401	xorl	%eax,%eax
402	xorl	%ebx,%ebx
403	cmpl	$0,%edx
404	je	.L000abort
405	movb	(%edi),%al
406	movb	4(%edi),%bl
407	addl	$8,%edi
408	leal	(%esi,%edx,1),%ecx
409	subl	%esi,%ebp
410	movl	%ecx,24(%esp)
411	incb	%al
412	cmpl	$-1,256(%edi)
413	je	.L001RC4_CHAR
414	movl	(%edi,%eax,4),%ecx
415	andl	$-4,%edx
416	jz	.L002loop1
417	movl	%ebp,32(%esp)
418	testl	$-8,%edx
419	jz	.L003go4loop4
420	leal	OPENSSL_ia32cap_P,%ebp
421	btl	$26,(%ebp)
422	jnc	.L003go4loop4
423	movl	32(%esp),%ebp
424	andl	$-8,%edx
425	leal	-8(%esi,%edx,1),%edx
426	movl	%edx,-4(%edi)
427	addb	%cl,%bl
428	movl	(%edi,%ebx,4),%edx
429	movl	%ecx,(%edi,%ebx,4)
430	movl	%edx,(%edi,%eax,4)
431	incl	%eax
432	addl	%ecx,%edx
433	movzbl	%al,%eax
434	movzbl	%dl,%edx
435	movq	(%esi),%mm0
436	movl	(%edi,%eax,4),%ecx
437	movd	(%edi,%edx,4),%mm2
438	jmp	.L004loop_mmx_enter
439.align	16
440.L005loop_mmx:
441	addb	%cl,%bl
442	psllq	$56,%mm1
443	movl	(%edi,%ebx,4),%edx
444	movl	%ecx,(%edi,%ebx,4)
445	movl	%edx,(%edi,%eax,4)
446	incl	%eax
447	addl	%ecx,%edx
448	movzbl	%al,%eax
449	movzbl	%dl,%edx
450	pxor	%mm1,%mm2
451	movq	(%esi),%mm0
452	movq	%mm2,-8(%ebp,%esi,1)
453	movl	(%edi,%eax,4),%ecx
454	movd	(%edi,%edx,4),%mm2
455.L004loop_mmx_enter:
456	addb	%cl,%bl
457	movl	(%edi,%ebx,4),%edx
458	movl	%ecx,(%edi,%ebx,4)
459	movl	%edx,(%edi,%eax,4)
460	incl	%eax
461	addl	%ecx,%edx
462	movzbl	%al,%eax
463	movzbl	%dl,%edx
464	pxor	%mm0,%mm2
465	movl	(%edi,%eax,4),%ecx
466	movd	(%edi,%edx,4),%mm1
467	addb	%cl,%bl
468	psllq	$8,%mm1
469	movl	(%edi,%ebx,4),%edx
470	movl	%ecx,(%edi,%ebx,4)
471	movl	%edx,(%edi,%eax,4)
472	incl	%eax
473	addl	%ecx,%edx
474	movzbl	%al,%eax
475	movzbl	%dl,%edx
476	pxor	%mm1,%mm2
477	movl	(%edi,%eax,4),%ecx
478	movd	(%edi,%edx,4),%mm1
479	addb	%cl,%bl
480	psllq	$16,%mm1
481	movl	(%edi,%ebx,4),%edx
482	movl	%ecx,(%edi,%ebx,4)
483	movl	%edx,(%edi,%eax,4)
484	incl	%eax
485	addl	%ecx,%edx
486	movzbl	%al,%eax
487	movzbl	%dl,%edx
488	pxor	%mm1,%mm2
489	movl	(%edi,%eax,4),%ecx
490	movd	(%edi,%edx,4),%mm1
491	addb	%cl,%bl
492	psllq	$24,%mm1
493	movl	(%edi,%ebx,4),%edx
494	movl	%ecx,(%edi,%ebx,4)
495	movl	%edx,(%edi,%eax,4)
496	incl	%eax
497	addl	%ecx,%edx
498	movzbl	%al,%eax
499	movzbl	%dl,%edx
500	pxor	%mm1,%mm2
501	movl	(%edi,%eax,4),%ecx
502	movd	(%edi,%edx,4),%mm1
503	addb	%cl,%bl
504	psllq	$32,%mm1
505	movl	(%edi,%ebx,4),%edx
506	movl	%ecx,(%edi,%ebx,4)
507	movl	%edx,(%edi,%eax,4)
508	incl	%eax
509	addl	%ecx,%edx
510	movzbl	%al,%eax
511	movzbl	%dl,%edx
512	pxor	%mm1,%mm2
513	movl	(%edi,%eax,4),%ecx
514	movd	(%edi,%edx,4),%mm1
515	addb	%cl,%bl
516	psllq	$40,%mm1
517	movl	(%edi,%ebx,4),%edx
518	movl	%ecx,(%edi,%ebx,4)
519	movl	%edx,(%edi,%eax,4)
520	incl	%eax
521	addl	%ecx,%edx
522	movzbl	%al,%eax
523	movzbl	%dl,%edx
524	pxor	%mm1,%mm2
525	movl	(%edi,%eax,4),%ecx
526	movd	(%edi,%edx,4),%mm1
527	addb	%cl,%bl
528	psllq	$48,%mm1
529	movl	(%edi,%ebx,4),%edx
530	movl	%ecx,(%edi,%ebx,4)
531	movl	%edx,(%edi,%eax,4)
532	incl	%eax
533	addl	%ecx,%edx
534	movzbl	%al,%eax
535	movzbl	%dl,%edx
536	pxor	%mm1,%mm2
537	movl	(%edi,%eax,4),%ecx
538	movd	(%edi,%edx,4),%mm1
539	movl	%ebx,%edx
540	xorl	%ebx,%ebx
541	movb	%dl,%bl
542	cmpl	-4(%edi),%esi
543	leal	8(%esi),%esi
544	jb	.L005loop_mmx
545	psllq	$56,%mm1
546	pxor	%mm1,%mm2
547	movq	%mm2,-8(%ebp,%esi,1)
548	emms
549	cmpl	24(%esp),%esi
550	je	.L006done
551	jmp	.L002loop1
552.align	16
553.L003go4loop4:
554	leal	-4(%esi,%edx,1),%edx
555	movl	%edx,28(%esp)
556.L007loop4:
557	addb	%cl,%bl
558	movl	(%edi,%ebx,4),%edx
559	movl	%ecx,(%edi,%ebx,4)
560	movl	%edx,(%edi,%eax,4)
561	addl	%ecx,%edx
562	incb	%al
563	andl	$255,%edx
564	movl	(%edi,%eax,4),%ecx
565	movl	(%edi,%edx,4),%ebp
566	addb	%cl,%bl
567	movl	(%edi,%ebx,4),%edx
568	movl	%ecx,(%edi,%ebx,4)
569	movl	%edx,(%edi,%eax,4)
570	addl	%ecx,%edx
571	incb	%al
572	andl	$255,%edx
573	rorl	$8,%ebp
574	movl	(%edi,%eax,4),%ecx
575	orl	(%edi,%edx,4),%ebp
576	addb	%cl,%bl
577	movl	(%edi,%ebx,4),%edx
578	movl	%ecx,(%edi,%ebx,4)
579	movl	%edx,(%edi,%eax,4)
580	addl	%ecx,%edx
581	incb	%al
582	andl	$255,%edx
583	rorl	$8,%ebp
584	movl	(%edi,%eax,4),%ecx
585	orl	(%edi,%edx,4),%ebp
586	addb	%cl,%bl
587	movl	(%edi,%ebx,4),%edx
588	movl	%ecx,(%edi,%ebx,4)
589	movl	%edx,(%edi,%eax,4)
590	addl	%ecx,%edx
591	incb	%al
592	andl	$255,%edx
593	rorl	$8,%ebp
594	movl	32(%esp),%ecx
595	orl	(%edi,%edx,4),%ebp
596	rorl	$8,%ebp
597	xorl	(%esi),%ebp
598	cmpl	28(%esp),%esi
599	movl	%ebp,(%ecx,%esi,1)
600	leal	4(%esi),%esi
601	movl	(%edi,%eax,4),%ecx
602	jb	.L007loop4
603	cmpl	24(%esp),%esi
604	je	.L006done
605	movl	32(%esp),%ebp
606.align	16
607.L002loop1:
608	addb	%cl,%bl
609	movl	(%edi,%ebx,4),%edx
610	movl	%ecx,(%edi,%ebx,4)
611	movl	%edx,(%edi,%eax,4)
612	addl	%ecx,%edx
613	incb	%al
614	andl	$255,%edx
615	movl	(%edi,%edx,4),%edx
616	xorb	(%esi),%dl
617	leal	1(%esi),%esi
618	movl	(%edi,%eax,4),%ecx
619	cmpl	24(%esp),%esi
620	movb	%dl,-1(%ebp,%esi,1)
621	jb	.L002loop1
622	jmp	.L006done
623.align	16
624.L001RC4_CHAR:
625	movzbl	(%edi,%eax,1),%ecx
626.L008cloop1:
627	addb	%cl,%bl
628	movzbl	(%edi,%ebx,1),%edx
629	movb	%cl,(%edi,%ebx,1)
630	movb	%dl,(%edi,%eax,1)
631	addb	%cl,%dl
632	movzbl	(%edi,%edx,1),%edx
633	addb	$1,%al
634	xorb	(%esi),%dl
635	leal	1(%esi),%esi
636	movzbl	(%edi,%eax,1),%ecx
637	cmpl	24(%esp),%esi
638	movb	%dl,-1(%ebp,%esi,1)
639	jb	.L008cloop1
640.L006done:
641	decb	%al
642	movl	%ebx,-4(%edi)
643	movb	%al,-8(%edi)
644.L000abort:
645	popl	%edi
646	popl	%esi
647	popl	%ebx
648	popl	%ebp
649	ret
650.size	RC4,.-.L_RC4_begin
651.globl	private_RC4_set_key
652.type	private_RC4_set_key,@function
653.align	16
654private_RC4_set_key:
655.L_private_RC4_set_key_begin:
656	pushl	%ebp
657	pushl	%ebx
658	pushl	%esi
659	pushl	%edi
660	movl	20(%esp),%edi
661	movl	24(%esp),%ebp
662	movl	28(%esp),%esi
663	leal	OPENSSL_ia32cap_P,%edx
664	leal	8(%edi),%edi
665	leal	(%esi,%ebp,1),%esi
666	negl	%ebp
667	xorl	%eax,%eax
668	movl	%ebp,-4(%edi)
669	btl	$20,(%edx)
670	jc	.L009c1stloop
671.align	16
672.L010w1stloop:
673	movl	%eax,(%edi,%eax,4)
674	addb	$1,%al
675	jnc	.L010w1stloop
676	xorl	%ecx,%ecx
677	xorl	%edx,%edx
678.align	16
679.L011w2ndloop:
680	movl	(%edi,%ecx,4),%eax
681	addb	(%esi,%ebp,1),%dl
682	addb	%al,%dl
683	addl	$1,%ebp
684	movl	(%edi,%edx,4),%ebx
685	jnz	.L012wnowrap
686	movl	-4(%edi),%ebp
687.L012wnowrap:
688	movl	%eax,(%edi,%edx,4)
689	movl	%ebx,(%edi,%ecx,4)
690	addb	$1,%cl
691	jnc	.L011w2ndloop
692	jmp	.L013exit
693.align	16
694.L009c1stloop:
695	movb	%al,(%edi,%eax,1)
696	addb	$1,%al
697	jnc	.L009c1stloop
698	xorl	%ecx,%ecx
699	xorl	%edx,%edx
700	xorl	%ebx,%ebx
701.align	16
702.L014c2ndloop:
703	movb	(%edi,%ecx,1),%al
704	addb	(%esi,%ebp,1),%dl
705	addb	%al,%dl
706	addl	$1,%ebp
707	movb	(%edi,%edx,1),%bl
708	jnz	.L015cnowrap
709	movl	-4(%edi),%ebp
710.L015cnowrap:
711	movb	%al,(%edi,%edx,1)
712	movb	%bl,(%edi,%ecx,1)
713	addb	$1,%cl
714	jnc	.L014c2ndloop
715	movl	$-1,256(%edi)
716.L013exit:
717	xorl	%eax,%eax
718	movl	%eax,-8(%edi)
719	movl	%eax,-4(%edi)
720	popl	%edi
721	popl	%esi
722	popl	%ebx
723	popl	%ebp
724	ret
725.size	private_RC4_set_key,.-.L_private_RC4_set_key_begin
726.globl	RC4_options
727.type	RC4_options,@function
728.align	16
729RC4_options:
730.L_RC4_options_begin:
731	call	.L016pic_point
732.L016pic_point:
733	popl	%eax
734	leal	.L017opts-.L016pic_point(%eax),%eax
735	leal	OPENSSL_ia32cap_P,%edx
736	movl	(%edx),%edx
737	btl	$20,%edx
738	jc	.L0181xchar
739	btl	$26,%edx
740	jnc	.L019ret
741	addl	$25,%eax
742	ret
743.L0181xchar:
744	addl	$12,%eax
745.L019ret:
746	ret
747.align	64
748.L017opts:
749.byte	114,99,52,40,52,120,44,105,110,116,41,0
750.byte	114,99,52,40,49,120,44,99,104,97,114,41,0
751.byte	114,99,52,40,56,120,44,109,109,120,41,0
752.byte	82,67,52,32,102,111,114,32,120,56,54,44,32,67,82,89
753.byte	80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114
754.byte	111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
755.align	64
756.size	RC4_options,.-.L_RC4_options_begin
757.comm	OPENSSL_ia32cap_P,16,4
758#endif
759