bf_enc_686.S revision 259065
1/*	$NetBSD: bf_enc_686.S,v 1.1 2001/09/09 11:01:02 tls Exp $	*/
2/*	$FreeBSD: releng/10.0/sys/crypto/blowfish/arch/i386/bf_enc_686.S 91671 2002-03-05 09:19:02Z ume $	*/
3
4/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
5 * All rights reserved.
6 *
7 * This package is an SSL implementation written
8 * by Eric Young (eay@cryptsoft.com).
9 * The implementation was written so as to conform with Netscapes SSL.
10 *
11 * This library is free for commercial and non-commercial use as long as
12 * the following conditions are aheared to.  The following conditions
13 * apply to all code found in this distribution, be it the RC4, RSA,
14 * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
15 * included with this distribution is covered by the same copyright terms
16 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
17 *
18 * Copyright remains Eric Young's, and as such any Copyright notices in
19 * the code are not to be removed.
20 * If this package is used in a product, Eric Young should be given attribution
21 * as the author of the parts of the library used.
22 * This can be in the form of a textual message at program startup or
23 * in documentation (online or textual) provided with the package.
24 *
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
27 * are met:
28 * 1. Redistributions of source code must retain the copyright
29 *    notice, this list of conditions and the following disclaimer.
30 * 2. Redistributions in binary form must reproduce the above copyright
31 *    notice, this list of conditions and the following disclaimer in the
32 *    documentation and/or other materials provided with the distribution.
33 * 3. All advertising materials mentioning features or use of this software
34 *    must display the following acknowledgement:
35 *    "This product includes cryptographic software written by
36 *     Eric Young (eay@cryptsoft.com)"
37 *    The word 'cryptographic' can be left out if the rouines from the library
38 *    being used are not cryptographic related :-).
39 * 4. If you include any Windows specific code (or a derivative thereof) from
40 *    the apps directory (application code) you must include an acknowledgement:
41 *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
42 *
43 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
44 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
45 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
46 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
47 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
48 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
49 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
51 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
52 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
53 * SUCH DAMAGE.
54 *
55 * The licence and distribution terms for any publically available version or
56 * derivative of this code cannot be changed.  i.e. this code cannot simply be
57 * copied and put under another distribution licence
58 * [including the GNU Public Licence.]
59 */
60
61/*
62 * Modified from the output of `perl bf-686.pl elf' by
63 * Jason R. Thorpe <thorpej@zembu.com> and Thor Lancelot Simon
64 * <tls@netbsd.org>
65 */
66
67#include <i386/include/asm.h>
68#define	_C_LABEL	CNAME
69
70ENTRY(BF_encrypt)
71	pushl	%ebp
72	pushl	%ebx
73	pushl	%esi
74	pushl	%edi
75
76
77	/* Load the 2 words */
78	movl	20(%esp),	%eax
79	movl	(%eax),		%ecx
80	movl	4(%eax),	%edx
81
82	/* P pointer, s and enc flag */
83	movl	24(%esp),	%edi
84	xorl	%eax,		%eax
85	xorl	%ebx,		%ebx
86	xorl	(%edi),		%ecx
87
88	/* Round 0 */
89	rorl	$16,		%ecx
90	movl	4(%edi),	%esi
91	movb	%ch,		%al
92	movb	%cl,		%bl
93	rorl	$16,		%ecx
94	xorl	%esi,		%edx
95	movl	72(%edi,%eax,4),%esi
96	movl	1096(%edi,%ebx,4),%ebp
97	movb	%ch,		%al
98	movb	%cl,		%bl
99	addl	%ebp,		%esi
100	movl	2120(%edi,%eax,4),%eax
101	xorl	%eax,		%esi
102	movl	3144(%edi,%ebx,4),%ebp
103	addl	%ebp,		%esi
104	xorl	%eax,		%eax
105	xorl	%esi,		%edx
106
107	/* Round 1 */
108	rorl	$16,		%edx
109	movl	8(%edi),	%esi
110	movb	%dh,		%al
111	movb	%dl,		%bl
112	rorl	$16,		%edx
113	xorl	%esi,		%ecx
114	movl	72(%edi,%eax,4),%esi
115	movl	1096(%edi,%ebx,4),%ebp
116	movb	%dh,		%al
117	movb	%dl,		%bl
118	addl	%ebp,		%esi
119	movl	2120(%edi,%eax,4),%eax
120	xorl	%eax,		%esi
121	movl	3144(%edi,%ebx,4),%ebp
122	addl	%ebp,		%esi
123	xorl	%eax,		%eax
124	xorl	%esi,		%ecx
125
126	/* Round 2 */
127	rorl	$16,		%ecx
128	movl	12(%edi),	%esi
129	movb	%ch,		%al
130	movb	%cl,		%bl
131	rorl	$16,		%ecx
132	xorl	%esi,		%edx
133	movl	72(%edi,%eax,4),%esi
134	movl	1096(%edi,%ebx,4),%ebp
135	movb	%ch,		%al
136	movb	%cl,		%bl
137	addl	%ebp,		%esi
138	movl	2120(%edi,%eax,4),%eax
139	xorl	%eax,		%esi
140	movl	3144(%edi,%ebx,4),%ebp
141	addl	%ebp,		%esi
142	xorl	%eax,		%eax
143	xorl	%esi,		%edx
144
145	/* Round 3 */
146	rorl	$16,		%edx
147	movl	16(%edi),	%esi
148	movb	%dh,		%al
149	movb	%dl,		%bl
150	rorl	$16,		%edx
151	xorl	%esi,		%ecx
152	movl	72(%edi,%eax,4),%esi
153	movl	1096(%edi,%ebx,4),%ebp
154	movb	%dh,		%al
155	movb	%dl,		%bl
156	addl	%ebp,		%esi
157	movl	2120(%edi,%eax,4),%eax
158	xorl	%eax,		%esi
159	movl	3144(%edi,%ebx,4),%ebp
160	addl	%ebp,		%esi
161	xorl	%eax,		%eax
162	xorl	%esi,		%ecx
163
164	/* Round 4 */
165	rorl	$16,		%ecx
166	movl	20(%edi),	%esi
167	movb	%ch,		%al
168	movb	%cl,		%bl
169	rorl	$16,		%ecx
170	xorl	%esi,		%edx
171	movl	72(%edi,%eax,4),%esi
172	movl	1096(%edi,%ebx,4),%ebp
173	movb	%ch,		%al
174	movb	%cl,		%bl
175	addl	%ebp,		%esi
176	movl	2120(%edi,%eax,4),%eax
177	xorl	%eax,		%esi
178	movl	3144(%edi,%ebx,4),%ebp
179	addl	%ebp,		%esi
180	xorl	%eax,		%eax
181	xorl	%esi,		%edx
182
183	/* Round 5 */
184	rorl	$16,		%edx
185	movl	24(%edi),	%esi
186	movb	%dh,		%al
187	movb	%dl,		%bl
188	rorl	$16,		%edx
189	xorl	%esi,		%ecx
190	movl	72(%edi,%eax,4),%esi
191	movl	1096(%edi,%ebx,4),%ebp
192	movb	%dh,		%al
193	movb	%dl,		%bl
194	addl	%ebp,		%esi
195	movl	2120(%edi,%eax,4),%eax
196	xorl	%eax,		%esi
197	movl	3144(%edi,%ebx,4),%ebp
198	addl	%ebp,		%esi
199	xorl	%eax,		%eax
200	xorl	%esi,		%ecx
201
202	/* Round 6 */
203	rorl	$16,		%ecx
204	movl	28(%edi),	%esi
205	movb	%ch,		%al
206	movb	%cl,		%bl
207	rorl	$16,		%ecx
208	xorl	%esi,		%edx
209	movl	72(%edi,%eax,4),%esi
210	movl	1096(%edi,%ebx,4),%ebp
211	movb	%ch,		%al
212	movb	%cl,		%bl
213	addl	%ebp,		%esi
214	movl	2120(%edi,%eax,4),%eax
215	xorl	%eax,		%esi
216	movl	3144(%edi,%ebx,4),%ebp
217	addl	%ebp,		%esi
218	xorl	%eax,		%eax
219	xorl	%esi,		%edx
220
221	/* Round 7 */
222	rorl	$16,		%edx
223	movl	32(%edi),	%esi
224	movb	%dh,		%al
225	movb	%dl,		%bl
226	rorl	$16,		%edx
227	xorl	%esi,		%ecx
228	movl	72(%edi,%eax,4),%esi
229	movl	1096(%edi,%ebx,4),%ebp
230	movb	%dh,		%al
231	movb	%dl,		%bl
232	addl	%ebp,		%esi
233	movl	2120(%edi,%eax,4),%eax
234	xorl	%eax,		%esi
235	movl	3144(%edi,%ebx,4),%ebp
236	addl	%ebp,		%esi
237	xorl	%eax,		%eax
238	xorl	%esi,		%ecx
239
240	/* Round 8 */
241	rorl	$16,		%ecx
242	movl	36(%edi),	%esi
243	movb	%ch,		%al
244	movb	%cl,		%bl
245	rorl	$16,		%ecx
246	xorl	%esi,		%edx
247	movl	72(%edi,%eax,4),%esi
248	movl	1096(%edi,%ebx,4),%ebp
249	movb	%ch,		%al
250	movb	%cl,		%bl
251	addl	%ebp,		%esi
252	movl	2120(%edi,%eax,4),%eax
253	xorl	%eax,		%esi
254	movl	3144(%edi,%ebx,4),%ebp
255	addl	%ebp,		%esi
256	xorl	%eax,		%eax
257	xorl	%esi,		%edx
258
259	/* Round 9 */
260	rorl	$16,		%edx
261	movl	40(%edi),	%esi
262	movb	%dh,		%al
263	movb	%dl,		%bl
264	rorl	$16,		%edx
265	xorl	%esi,		%ecx
266	movl	72(%edi,%eax,4),%esi
267	movl	1096(%edi,%ebx,4),%ebp
268	movb	%dh,		%al
269	movb	%dl,		%bl
270	addl	%ebp,		%esi
271	movl	2120(%edi,%eax,4),%eax
272	xorl	%eax,		%esi
273	movl	3144(%edi,%ebx,4),%ebp
274	addl	%ebp,		%esi
275	xorl	%eax,		%eax
276	xorl	%esi,		%ecx
277
278	/* Round 10 */
279	rorl	$16,		%ecx
280	movl	44(%edi),	%esi
281	movb	%ch,		%al
282	movb	%cl,		%bl
283	rorl	$16,		%ecx
284	xorl	%esi,		%edx
285	movl	72(%edi,%eax,4),%esi
286	movl	1096(%edi,%ebx,4),%ebp
287	movb	%ch,		%al
288	movb	%cl,		%bl
289	addl	%ebp,		%esi
290	movl	2120(%edi,%eax,4),%eax
291	xorl	%eax,		%esi
292	movl	3144(%edi,%ebx,4),%ebp
293	addl	%ebp,		%esi
294	xorl	%eax,		%eax
295	xorl	%esi,		%edx
296
297	/* Round 11 */
298	rorl	$16,		%edx
299	movl	48(%edi),	%esi
300	movb	%dh,		%al
301	movb	%dl,		%bl
302	rorl	$16,		%edx
303	xorl	%esi,		%ecx
304	movl	72(%edi,%eax,4),%esi
305	movl	1096(%edi,%ebx,4),%ebp
306	movb	%dh,		%al
307	movb	%dl,		%bl
308	addl	%ebp,		%esi
309	movl	2120(%edi,%eax,4),%eax
310	xorl	%eax,		%esi
311	movl	3144(%edi,%ebx,4),%ebp
312	addl	%ebp,		%esi
313	xorl	%eax,		%eax
314	xorl	%esi,		%ecx
315
316	/* Round 12 */
317	rorl	$16,		%ecx
318	movl	52(%edi),	%esi
319	movb	%ch,		%al
320	movb	%cl,		%bl
321	rorl	$16,		%ecx
322	xorl	%esi,		%edx
323	movl	72(%edi,%eax,4),%esi
324	movl	1096(%edi,%ebx,4),%ebp
325	movb	%ch,		%al
326	movb	%cl,		%bl
327	addl	%ebp,		%esi
328	movl	2120(%edi,%eax,4),%eax
329	xorl	%eax,		%esi
330	movl	3144(%edi,%ebx,4),%ebp
331	addl	%ebp,		%esi
332	xorl	%eax,		%eax
333	xorl	%esi,		%edx
334
335	/* Round 13 */
336	rorl	$16,		%edx
337	movl	56(%edi),	%esi
338	movb	%dh,		%al
339	movb	%dl,		%bl
340	rorl	$16,		%edx
341	xorl	%esi,		%ecx
342	movl	72(%edi,%eax,4),%esi
343	movl	1096(%edi,%ebx,4),%ebp
344	movb	%dh,		%al
345	movb	%dl,		%bl
346	addl	%ebp,		%esi
347	movl	2120(%edi,%eax,4),%eax
348	xorl	%eax,		%esi
349	movl	3144(%edi,%ebx,4),%ebp
350	addl	%ebp,		%esi
351	xorl	%eax,		%eax
352	xorl	%esi,		%ecx
353
354	/* Round 14 */
355	rorl	$16,		%ecx
356	movl	60(%edi),	%esi
357	movb	%ch,		%al
358	movb	%cl,		%bl
359	rorl	$16,		%ecx
360	xorl	%esi,		%edx
361	movl	72(%edi,%eax,4),%esi
362	movl	1096(%edi,%ebx,4),%ebp
363	movb	%ch,		%al
364	movb	%cl,		%bl
365	addl	%ebp,		%esi
366	movl	2120(%edi,%eax,4),%eax
367	xorl	%eax,		%esi
368	movl	3144(%edi,%ebx,4),%ebp
369	addl	%ebp,		%esi
370	xorl	%eax,		%eax
371	xorl	%esi,		%edx
372
373	/* Round 15 */
374	rorl	$16,		%edx
375	movl	64(%edi),	%esi
376	movb	%dh,		%al
377	movb	%dl,		%bl
378	rorl	$16,		%edx
379	xorl	%esi,		%ecx
380	movl	72(%edi,%eax,4),%esi
381	movl	1096(%edi,%ebx,4),%ebp
382	movb	%dh,		%al
383	movb	%dl,		%bl
384	addl	%ebp,		%esi
385	movl	2120(%edi,%eax,4),%eax
386	xorl	%eax,		%esi
387	movl	3144(%edi,%ebx,4),%ebp
388	addl	%ebp,		%esi
389	xorl	%eax,		%eax
390	xorl	%esi,		%ecx
391	xorl	68(%edi),	%edx
392	movl	20(%esp),	%eax
393	movl	%edx,		(%eax)
394	movl	%ecx,		4(%eax)
395	popl	%edi
396	popl	%esi
397	popl	%ebx
398	popl	%ebp
399	ret
400.L_BF_encrypt_end:
401	.size   _C_LABEL(BF_encrypt),.L_BF_encrypt_end-_C_LABEL(BF_encrypt)
402
403ENTRY(BF_decrypt)
404	pushl	%ebp
405	pushl	%ebx
406	pushl	%esi
407	pushl	%edi
408
409
410	/* Load the 2 words */
411	movl	20(%esp),	%eax
412	movl	(%eax),		%ecx
413	movl	4(%eax),	%edx
414
415	/* P pointer, s and enc flag */
416	movl	24(%esp),	%edi
417	xorl	%eax,		%eax
418	xorl	%ebx,		%ebx
419	xorl	68(%edi),	%ecx
420
421	/* Round 16 */
422	rorl	$16,		%ecx
423	movl	64(%edi),	%esi
424	movb	%ch,		%al
425	movb	%cl,		%bl
426	rorl	$16,		%ecx
427	xorl	%esi,		%edx
428	movl	72(%edi,%eax,4),%esi
429	movl	1096(%edi,%ebx,4),%ebp
430	movb	%ch,		%al
431	movb	%cl,		%bl
432	addl	%ebp,		%esi
433	movl	2120(%edi,%eax,4),%eax
434	xorl	%eax,		%esi
435	movl	3144(%edi,%ebx,4),%ebp
436	addl	%ebp,		%esi
437	xorl	%eax,		%eax
438	xorl	%esi,		%edx
439
440	/* Round 15 */
441	rorl	$16,		%edx
442	movl	60(%edi),	%esi
443	movb	%dh,		%al
444	movb	%dl,		%bl
445	rorl	$16,		%edx
446	xorl	%esi,		%ecx
447	movl	72(%edi,%eax,4),%esi
448	movl	1096(%edi,%ebx,4),%ebp
449	movb	%dh,		%al
450	movb	%dl,		%bl
451	addl	%ebp,		%esi
452	movl	2120(%edi,%eax,4),%eax
453	xorl	%eax,		%esi
454	movl	3144(%edi,%ebx,4),%ebp
455	addl	%ebp,		%esi
456	xorl	%eax,		%eax
457	xorl	%esi,		%ecx
458
459	/* Round 14 */
460	rorl	$16,		%ecx
461	movl	56(%edi),	%esi
462	movb	%ch,		%al
463	movb	%cl,		%bl
464	rorl	$16,		%ecx
465	xorl	%esi,		%edx
466	movl	72(%edi,%eax,4),%esi
467	movl	1096(%edi,%ebx,4),%ebp
468	movb	%ch,		%al
469	movb	%cl,		%bl
470	addl	%ebp,		%esi
471	movl	2120(%edi,%eax,4),%eax
472	xorl	%eax,		%esi
473	movl	3144(%edi,%ebx,4),%ebp
474	addl	%ebp,		%esi
475	xorl	%eax,		%eax
476	xorl	%esi,		%edx
477
478	/* Round 13 */
479	rorl	$16,		%edx
480	movl	52(%edi),	%esi
481	movb	%dh,		%al
482	movb	%dl,		%bl
483	rorl	$16,		%edx
484	xorl	%esi,		%ecx
485	movl	72(%edi,%eax,4),%esi
486	movl	1096(%edi,%ebx,4),%ebp
487	movb	%dh,		%al
488	movb	%dl,		%bl
489	addl	%ebp,		%esi
490	movl	2120(%edi,%eax,4),%eax
491	xorl	%eax,		%esi
492	movl	3144(%edi,%ebx,4),%ebp
493	addl	%ebp,		%esi
494	xorl	%eax,		%eax
495	xorl	%esi,		%ecx
496
497	/* Round 12 */
498	rorl	$16,		%ecx
499	movl	48(%edi),	%esi
500	movb	%ch,		%al
501	movb	%cl,		%bl
502	rorl	$16,		%ecx
503	xorl	%esi,		%edx
504	movl	72(%edi,%eax,4),%esi
505	movl	1096(%edi,%ebx,4),%ebp
506	movb	%ch,		%al
507	movb	%cl,		%bl
508	addl	%ebp,		%esi
509	movl	2120(%edi,%eax,4),%eax
510	xorl	%eax,		%esi
511	movl	3144(%edi,%ebx,4),%ebp
512	addl	%ebp,		%esi
513	xorl	%eax,		%eax
514	xorl	%esi,		%edx
515
516	/* Round 11 */
517	rorl	$16,		%edx
518	movl	44(%edi),	%esi
519	movb	%dh,		%al
520	movb	%dl,		%bl
521	rorl	$16,		%edx
522	xorl	%esi,		%ecx
523	movl	72(%edi,%eax,4),%esi
524	movl	1096(%edi,%ebx,4),%ebp
525	movb	%dh,		%al
526	movb	%dl,		%bl
527	addl	%ebp,		%esi
528	movl	2120(%edi,%eax,4),%eax
529	xorl	%eax,		%esi
530	movl	3144(%edi,%ebx,4),%ebp
531	addl	%ebp,		%esi
532	xorl	%eax,		%eax
533	xorl	%esi,		%ecx
534
535	/* Round 10 */
536	rorl	$16,		%ecx
537	movl	40(%edi),	%esi
538	movb	%ch,		%al
539	movb	%cl,		%bl
540	rorl	$16,		%ecx
541	xorl	%esi,		%edx
542	movl	72(%edi,%eax,4),%esi
543	movl	1096(%edi,%ebx,4),%ebp
544	movb	%ch,		%al
545	movb	%cl,		%bl
546	addl	%ebp,		%esi
547	movl	2120(%edi,%eax,4),%eax
548	xorl	%eax,		%esi
549	movl	3144(%edi,%ebx,4),%ebp
550	addl	%ebp,		%esi
551	xorl	%eax,		%eax
552	xorl	%esi,		%edx
553
554	/* Round 9 */
555	rorl	$16,		%edx
556	movl	36(%edi),	%esi
557	movb	%dh,		%al
558	movb	%dl,		%bl
559	rorl	$16,		%edx
560	xorl	%esi,		%ecx
561	movl	72(%edi,%eax,4),%esi
562	movl	1096(%edi,%ebx,4),%ebp
563	movb	%dh,		%al
564	movb	%dl,		%bl
565	addl	%ebp,		%esi
566	movl	2120(%edi,%eax,4),%eax
567	xorl	%eax,		%esi
568	movl	3144(%edi,%ebx,4),%ebp
569	addl	%ebp,		%esi
570	xorl	%eax,		%eax
571	xorl	%esi,		%ecx
572
573	/* Round 8 */
574	rorl	$16,		%ecx
575	movl	32(%edi),	%esi
576	movb	%ch,		%al
577	movb	%cl,		%bl
578	rorl	$16,		%ecx
579	xorl	%esi,		%edx
580	movl	72(%edi,%eax,4),%esi
581	movl	1096(%edi,%ebx,4),%ebp
582	movb	%ch,		%al
583	movb	%cl,		%bl
584	addl	%ebp,		%esi
585	movl	2120(%edi,%eax,4),%eax
586	xorl	%eax,		%esi
587	movl	3144(%edi,%ebx,4),%ebp
588	addl	%ebp,		%esi
589	xorl	%eax,		%eax
590	xorl	%esi,		%edx
591
592	/* Round 7 */
593	rorl	$16,		%edx
594	movl	28(%edi),	%esi
595	movb	%dh,		%al
596	movb	%dl,		%bl
597	rorl	$16,		%edx
598	xorl	%esi,		%ecx
599	movl	72(%edi,%eax,4),%esi
600	movl	1096(%edi,%ebx,4),%ebp
601	movb	%dh,		%al
602	movb	%dl,		%bl
603	addl	%ebp,		%esi
604	movl	2120(%edi,%eax,4),%eax
605	xorl	%eax,		%esi
606	movl	3144(%edi,%ebx,4),%ebp
607	addl	%ebp,		%esi
608	xorl	%eax,		%eax
609	xorl	%esi,		%ecx
610
611	/* Round 6 */
612	rorl	$16,		%ecx
613	movl	24(%edi),	%esi
614	movb	%ch,		%al
615	movb	%cl,		%bl
616	rorl	$16,		%ecx
617	xorl	%esi,		%edx
618	movl	72(%edi,%eax,4),%esi
619	movl	1096(%edi,%ebx,4),%ebp
620	movb	%ch,		%al
621	movb	%cl,		%bl
622	addl	%ebp,		%esi
623	movl	2120(%edi,%eax,4),%eax
624	xorl	%eax,		%esi
625	movl	3144(%edi,%ebx,4),%ebp
626	addl	%ebp,		%esi
627	xorl	%eax,		%eax
628	xorl	%esi,		%edx
629
630	/* Round 5 */
631	rorl	$16,		%edx
632	movl	20(%edi),	%esi
633	movb	%dh,		%al
634	movb	%dl,		%bl
635	rorl	$16,		%edx
636	xorl	%esi,		%ecx
637	movl	72(%edi,%eax,4),%esi
638	movl	1096(%edi,%ebx,4),%ebp
639	movb	%dh,		%al
640	movb	%dl,		%bl
641	addl	%ebp,		%esi
642	movl	2120(%edi,%eax,4),%eax
643	xorl	%eax,		%esi
644	movl	3144(%edi,%ebx,4),%ebp
645	addl	%ebp,		%esi
646	xorl	%eax,		%eax
647	xorl	%esi,		%ecx
648
649	/* Round 4 */
650	rorl	$16,		%ecx
651	movl	16(%edi),	%esi
652	movb	%ch,		%al
653	movb	%cl,		%bl
654	rorl	$16,		%ecx
655	xorl	%esi,		%edx
656	movl	72(%edi,%eax,4),%esi
657	movl	1096(%edi,%ebx,4),%ebp
658	movb	%ch,		%al
659	movb	%cl,		%bl
660	addl	%ebp,		%esi
661	movl	2120(%edi,%eax,4),%eax
662	xorl	%eax,		%esi
663	movl	3144(%edi,%ebx,4),%ebp
664	addl	%ebp,		%esi
665	xorl	%eax,		%eax
666	xorl	%esi,		%edx
667
668	/* Round 3 */
669	rorl	$16,		%edx
670	movl	12(%edi),	%esi
671	movb	%dh,		%al
672	movb	%dl,		%bl
673	rorl	$16,		%edx
674	xorl	%esi,		%ecx
675	movl	72(%edi,%eax,4),%esi
676	movl	1096(%edi,%ebx,4),%ebp
677	movb	%dh,		%al
678	movb	%dl,		%bl
679	addl	%ebp,		%esi
680	movl	2120(%edi,%eax,4),%eax
681	xorl	%eax,		%esi
682	movl	3144(%edi,%ebx,4),%ebp
683	addl	%ebp,		%esi
684	xorl	%eax,		%eax
685	xorl	%esi,		%ecx
686
687	/* Round 2 */
688	rorl	$16,		%ecx
689	movl	8(%edi),	%esi
690	movb	%ch,		%al
691	movb	%cl,		%bl
692	rorl	$16,		%ecx
693	xorl	%esi,		%edx
694	movl	72(%edi,%eax,4),%esi
695	movl	1096(%edi,%ebx,4),%ebp
696	movb	%ch,		%al
697	movb	%cl,		%bl
698	addl	%ebp,		%esi
699	movl	2120(%edi,%eax,4),%eax
700	xorl	%eax,		%esi
701	movl	3144(%edi,%ebx,4),%ebp
702	addl	%ebp,		%esi
703	xorl	%eax,		%eax
704	xorl	%esi,		%edx
705
706	/* Round 1 */
707	rorl	$16,		%edx
708	movl	4(%edi),	%esi
709	movb	%dh,		%al
710	movb	%dl,		%bl
711	rorl	$16,		%edx
712	xorl	%esi,		%ecx
713	movl	72(%edi,%eax,4),%esi
714	movl	1096(%edi,%ebx,4),%ebp
715	movb	%dh,		%al
716	movb	%dl,		%bl
717	addl	%ebp,		%esi
718	movl	2120(%edi,%eax,4),%eax
719	xorl	%eax,		%esi
720	movl	3144(%edi,%ebx,4),%ebp
721	addl	%ebp,		%esi
722	xorl	%eax,		%eax
723	xorl	%esi,		%ecx
724	xorl	(%edi),		%edx
725	movl	20(%esp),	%eax
726	movl	%edx,		(%eax)
727	movl	%ecx,		4(%eax)
728	popl	%edi
729	popl	%esi
730	popl	%ebx
731	popl	%ebp
732	ret
733	.L_BF_decrypt_end:
734	.size   _C_LABEL(BF_decrypt),.L_BF_decrypt_end-_C_LABEL(BF_decrypt)
735