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