1/* $FreeBSD$ */ 2/* Do not modify. This file is auto-generated from aesni-x86.pl. */ 3#ifdef PIC 4.text 5.globl aesni_encrypt 6.type aesni_encrypt,@function 7.align 16 8aesni_encrypt: 9.L_aesni_encrypt_begin: 10 movl 4(%esp),%eax 11 movl 12(%esp),%edx 12 movups (%eax),%xmm2 13 movl 240(%edx),%ecx 14 movl 8(%esp),%eax 15 movups (%edx),%xmm0 16 movups 16(%edx),%xmm1 17 leal 32(%edx),%edx 18 xorps %xmm0,%xmm2 19.L000enc1_loop_1: 20.byte 102,15,56,220,209 21 decl %ecx 22 movups (%edx),%xmm1 23 leal 16(%edx),%edx 24 jnz .L000enc1_loop_1 25.byte 102,15,56,221,209 26 pxor %xmm0,%xmm0 27 pxor %xmm1,%xmm1 28 movups %xmm2,(%eax) 29 pxor %xmm2,%xmm2 30 ret 31.size aesni_encrypt,.-.L_aesni_encrypt_begin 32.globl aesni_decrypt 33.type aesni_decrypt,@function 34.align 16 35aesni_decrypt: 36.L_aesni_decrypt_begin: 37 movl 4(%esp),%eax 38 movl 12(%esp),%edx 39 movups (%eax),%xmm2 40 movl 240(%edx),%ecx 41 movl 8(%esp),%eax 42 movups (%edx),%xmm0 43 movups 16(%edx),%xmm1 44 leal 32(%edx),%edx 45 xorps %xmm0,%xmm2 46.L001dec1_loop_2: 47.byte 102,15,56,222,209 48 decl %ecx 49 movups (%edx),%xmm1 50 leal 16(%edx),%edx 51 jnz .L001dec1_loop_2 52.byte 102,15,56,223,209 53 pxor %xmm0,%xmm0 54 pxor %xmm1,%xmm1 55 movups %xmm2,(%eax) 56 pxor %xmm2,%xmm2 57 ret 58.size aesni_decrypt,.-.L_aesni_decrypt_begin 59.type _aesni_encrypt2,@function 60.align 16 61_aesni_encrypt2: 62 movups (%edx),%xmm0 63 shll $4,%ecx 64 movups 16(%edx),%xmm1 65 xorps %xmm0,%xmm2 66 pxor %xmm0,%xmm3 67 movups 32(%edx),%xmm0 68 leal 32(%edx,%ecx,1),%edx 69 negl %ecx 70 addl $16,%ecx 71.L002enc2_loop: 72.byte 102,15,56,220,209 73.byte 102,15,56,220,217 74 movups (%edx,%ecx,1),%xmm1 75 addl $32,%ecx 76.byte 102,15,56,220,208 77.byte 102,15,56,220,216 78 movups -16(%edx,%ecx,1),%xmm0 79 jnz .L002enc2_loop 80.byte 102,15,56,220,209 81.byte 102,15,56,220,217 82.byte 102,15,56,221,208 83.byte 102,15,56,221,216 84 ret 85.size _aesni_encrypt2,.-_aesni_encrypt2 86.type _aesni_decrypt2,@function 87.align 16 88_aesni_decrypt2: 89 movups (%edx),%xmm0 90 shll $4,%ecx 91 movups 16(%edx),%xmm1 92 xorps %xmm0,%xmm2 93 pxor %xmm0,%xmm3 94 movups 32(%edx),%xmm0 95 leal 32(%edx,%ecx,1),%edx 96 negl %ecx 97 addl $16,%ecx 98.L003dec2_loop: 99.byte 102,15,56,222,209 100.byte 102,15,56,222,217 101 movups (%edx,%ecx,1),%xmm1 102 addl $32,%ecx 103.byte 102,15,56,222,208 104.byte 102,15,56,222,216 105 movups -16(%edx,%ecx,1),%xmm0 106 jnz .L003dec2_loop 107.byte 102,15,56,222,209 108.byte 102,15,56,222,217 109.byte 102,15,56,223,208 110.byte 102,15,56,223,216 111 ret 112.size _aesni_decrypt2,.-_aesni_decrypt2 113.type _aesni_encrypt3,@function 114.align 16 115_aesni_encrypt3: 116 movups (%edx),%xmm0 117 shll $4,%ecx 118 movups 16(%edx),%xmm1 119 xorps %xmm0,%xmm2 120 pxor %xmm0,%xmm3 121 pxor %xmm0,%xmm4 122 movups 32(%edx),%xmm0 123 leal 32(%edx,%ecx,1),%edx 124 negl %ecx 125 addl $16,%ecx 126.L004enc3_loop: 127.byte 102,15,56,220,209 128.byte 102,15,56,220,217 129.byte 102,15,56,220,225 130 movups (%edx,%ecx,1),%xmm1 131 addl $32,%ecx 132.byte 102,15,56,220,208 133.byte 102,15,56,220,216 134.byte 102,15,56,220,224 135 movups -16(%edx,%ecx,1),%xmm0 136 jnz .L004enc3_loop 137.byte 102,15,56,220,209 138.byte 102,15,56,220,217 139.byte 102,15,56,220,225 140.byte 102,15,56,221,208 141.byte 102,15,56,221,216 142.byte 102,15,56,221,224 143 ret 144.size _aesni_encrypt3,.-_aesni_encrypt3 145.type _aesni_decrypt3,@function 146.align 16 147_aesni_decrypt3: 148 movups (%edx),%xmm0 149 shll $4,%ecx 150 movups 16(%edx),%xmm1 151 xorps %xmm0,%xmm2 152 pxor %xmm0,%xmm3 153 pxor %xmm0,%xmm4 154 movups 32(%edx),%xmm0 155 leal 32(%edx,%ecx,1),%edx 156 negl %ecx 157 addl $16,%ecx 158.L005dec3_loop: 159.byte 102,15,56,222,209 160.byte 102,15,56,222,217 161.byte 102,15,56,222,225 162 movups (%edx,%ecx,1),%xmm1 163 addl $32,%ecx 164.byte 102,15,56,222,208 165.byte 102,15,56,222,216 166.byte 102,15,56,222,224 167 movups -16(%edx,%ecx,1),%xmm0 168 jnz .L005dec3_loop 169.byte 102,15,56,222,209 170.byte 102,15,56,222,217 171.byte 102,15,56,222,225 172.byte 102,15,56,223,208 173.byte 102,15,56,223,216 174.byte 102,15,56,223,224 175 ret 176.size _aesni_decrypt3,.-_aesni_decrypt3 177.type _aesni_encrypt4,@function 178.align 16 179_aesni_encrypt4: 180 movups (%edx),%xmm0 181 movups 16(%edx),%xmm1 182 shll $4,%ecx 183 xorps %xmm0,%xmm2 184 pxor %xmm0,%xmm3 185 pxor %xmm0,%xmm4 186 pxor %xmm0,%xmm5 187 movups 32(%edx),%xmm0 188 leal 32(%edx,%ecx,1),%edx 189 negl %ecx 190.byte 15,31,64,0 191 addl $16,%ecx 192.L006enc4_loop: 193.byte 102,15,56,220,209 194.byte 102,15,56,220,217 195.byte 102,15,56,220,225 196.byte 102,15,56,220,233 197 movups (%edx,%ecx,1),%xmm1 198 addl $32,%ecx 199.byte 102,15,56,220,208 200.byte 102,15,56,220,216 201.byte 102,15,56,220,224 202.byte 102,15,56,220,232 203 movups -16(%edx,%ecx,1),%xmm0 204 jnz .L006enc4_loop 205.byte 102,15,56,220,209 206.byte 102,15,56,220,217 207.byte 102,15,56,220,225 208.byte 102,15,56,220,233 209.byte 102,15,56,221,208 210.byte 102,15,56,221,216 211.byte 102,15,56,221,224 212.byte 102,15,56,221,232 213 ret 214.size _aesni_encrypt4,.-_aesni_encrypt4 215.type _aesni_decrypt4,@function 216.align 16 217_aesni_decrypt4: 218 movups (%edx),%xmm0 219 movups 16(%edx),%xmm1 220 shll $4,%ecx 221 xorps %xmm0,%xmm2 222 pxor %xmm0,%xmm3 223 pxor %xmm0,%xmm4 224 pxor %xmm0,%xmm5 225 movups 32(%edx),%xmm0 226 leal 32(%edx,%ecx,1),%edx 227 negl %ecx 228.byte 15,31,64,0 229 addl $16,%ecx 230.L007dec4_loop: 231.byte 102,15,56,222,209 232.byte 102,15,56,222,217 233.byte 102,15,56,222,225 234.byte 102,15,56,222,233 235 movups (%edx,%ecx,1),%xmm1 236 addl $32,%ecx 237.byte 102,15,56,222,208 238.byte 102,15,56,222,216 239.byte 102,15,56,222,224 240.byte 102,15,56,222,232 241 movups -16(%edx,%ecx,1),%xmm0 242 jnz .L007dec4_loop 243.byte 102,15,56,222,209 244.byte 102,15,56,222,217 245.byte 102,15,56,222,225 246.byte 102,15,56,222,233 247.byte 102,15,56,223,208 248.byte 102,15,56,223,216 249.byte 102,15,56,223,224 250.byte 102,15,56,223,232 251 ret 252.size _aesni_decrypt4,.-_aesni_decrypt4 253.type _aesni_encrypt6,@function 254.align 16 255_aesni_encrypt6: 256 movups (%edx),%xmm0 257 shll $4,%ecx 258 movups 16(%edx),%xmm1 259 xorps %xmm0,%xmm2 260 pxor %xmm0,%xmm3 261 pxor %xmm0,%xmm4 262.byte 102,15,56,220,209 263 pxor %xmm0,%xmm5 264 pxor %xmm0,%xmm6 265.byte 102,15,56,220,217 266 leal 32(%edx,%ecx,1),%edx 267 negl %ecx 268.byte 102,15,56,220,225 269 pxor %xmm0,%xmm7 270 movups (%edx,%ecx,1),%xmm0 271 addl $16,%ecx 272 jmp .L008_aesni_encrypt6_inner 273.align 16 274.L009enc6_loop: 275.byte 102,15,56,220,209 276.byte 102,15,56,220,217 277.byte 102,15,56,220,225 278.L008_aesni_encrypt6_inner: 279.byte 102,15,56,220,233 280.byte 102,15,56,220,241 281.byte 102,15,56,220,249 282.L_aesni_encrypt6_enter: 283 movups (%edx,%ecx,1),%xmm1 284 addl $32,%ecx 285.byte 102,15,56,220,208 286.byte 102,15,56,220,216 287.byte 102,15,56,220,224 288.byte 102,15,56,220,232 289.byte 102,15,56,220,240 290.byte 102,15,56,220,248 291 movups -16(%edx,%ecx,1),%xmm0 292 jnz .L009enc6_loop 293.byte 102,15,56,220,209 294.byte 102,15,56,220,217 295.byte 102,15,56,220,225 296.byte 102,15,56,220,233 297.byte 102,15,56,220,241 298.byte 102,15,56,220,249 299.byte 102,15,56,221,208 300.byte 102,15,56,221,216 301.byte 102,15,56,221,224 302.byte 102,15,56,221,232 303.byte 102,15,56,221,240 304.byte 102,15,56,221,248 305 ret 306.size _aesni_encrypt6,.-_aesni_encrypt6 307.type _aesni_decrypt6,@function 308.align 16 309_aesni_decrypt6: 310 movups (%edx),%xmm0 311 shll $4,%ecx 312 movups 16(%edx),%xmm1 313 xorps %xmm0,%xmm2 314 pxor %xmm0,%xmm3 315 pxor %xmm0,%xmm4 316.byte 102,15,56,222,209 317 pxor %xmm0,%xmm5 318 pxor %xmm0,%xmm6 319.byte 102,15,56,222,217 320 leal 32(%edx,%ecx,1),%edx 321 negl %ecx 322.byte 102,15,56,222,225 323 pxor %xmm0,%xmm7 324 movups (%edx,%ecx,1),%xmm0 325 addl $16,%ecx 326 jmp .L010_aesni_decrypt6_inner 327.align 16 328.L011dec6_loop: 329.byte 102,15,56,222,209 330.byte 102,15,56,222,217 331.byte 102,15,56,222,225 332.L010_aesni_decrypt6_inner: 333.byte 102,15,56,222,233 334.byte 102,15,56,222,241 335.byte 102,15,56,222,249 336.L_aesni_decrypt6_enter: 337 movups (%edx,%ecx,1),%xmm1 338 addl $32,%ecx 339.byte 102,15,56,222,208 340.byte 102,15,56,222,216 341.byte 102,15,56,222,224 342.byte 102,15,56,222,232 343.byte 102,15,56,222,240 344.byte 102,15,56,222,248 345 movups -16(%edx,%ecx,1),%xmm0 346 jnz .L011dec6_loop 347.byte 102,15,56,222,209 348.byte 102,15,56,222,217 349.byte 102,15,56,222,225 350.byte 102,15,56,222,233 351.byte 102,15,56,222,241 352.byte 102,15,56,222,249 353.byte 102,15,56,223,208 354.byte 102,15,56,223,216 355.byte 102,15,56,223,224 356.byte 102,15,56,223,232 357.byte 102,15,56,223,240 358.byte 102,15,56,223,248 359 ret 360.size _aesni_decrypt6,.-_aesni_decrypt6 361.globl aesni_ecb_encrypt 362.type aesni_ecb_encrypt,@function 363.align 16 364aesni_ecb_encrypt: 365.L_aesni_ecb_encrypt_begin: 366 pushl %ebp 367 pushl %ebx 368 pushl %esi 369 pushl %edi 370 movl 20(%esp),%esi 371 movl 24(%esp),%edi 372 movl 28(%esp),%eax 373 movl 32(%esp),%edx 374 movl 36(%esp),%ebx 375 andl $-16,%eax 376 jz .L012ecb_ret 377 movl 240(%edx),%ecx 378 testl %ebx,%ebx 379 jz .L013ecb_decrypt 380 movl %edx,%ebp 381 movl %ecx,%ebx 382 cmpl $96,%eax 383 jb .L014ecb_enc_tail 384 movdqu (%esi),%xmm2 385 movdqu 16(%esi),%xmm3 386 movdqu 32(%esi),%xmm4 387 movdqu 48(%esi),%xmm5 388 movdqu 64(%esi),%xmm6 389 movdqu 80(%esi),%xmm7 390 leal 96(%esi),%esi 391 subl $96,%eax 392 jmp .L015ecb_enc_loop6_enter 393.align 16 394.L016ecb_enc_loop6: 395 movups %xmm2,(%edi) 396 movdqu (%esi),%xmm2 397 movups %xmm3,16(%edi) 398 movdqu 16(%esi),%xmm3 399 movups %xmm4,32(%edi) 400 movdqu 32(%esi),%xmm4 401 movups %xmm5,48(%edi) 402 movdqu 48(%esi),%xmm5 403 movups %xmm6,64(%edi) 404 movdqu 64(%esi),%xmm6 405 movups %xmm7,80(%edi) 406 leal 96(%edi),%edi 407 movdqu 80(%esi),%xmm7 408 leal 96(%esi),%esi 409.L015ecb_enc_loop6_enter: 410 call _aesni_encrypt6 411 movl %ebp,%edx 412 movl %ebx,%ecx 413 subl $96,%eax 414 jnc .L016ecb_enc_loop6 415 movups %xmm2,(%edi) 416 movups %xmm3,16(%edi) 417 movups %xmm4,32(%edi) 418 movups %xmm5,48(%edi) 419 movups %xmm6,64(%edi) 420 movups %xmm7,80(%edi) 421 leal 96(%edi),%edi 422 addl $96,%eax 423 jz .L012ecb_ret 424.L014ecb_enc_tail: 425 movups (%esi),%xmm2 426 cmpl $32,%eax 427 jb .L017ecb_enc_one 428 movups 16(%esi),%xmm3 429 je .L018ecb_enc_two 430 movups 32(%esi),%xmm4 431 cmpl $64,%eax 432 jb .L019ecb_enc_three 433 movups 48(%esi),%xmm5 434 je .L020ecb_enc_four 435 movups 64(%esi),%xmm6 436 xorps %xmm7,%xmm7 437 call _aesni_encrypt6 438 movups %xmm2,(%edi) 439 movups %xmm3,16(%edi) 440 movups %xmm4,32(%edi) 441 movups %xmm5,48(%edi) 442 movups %xmm6,64(%edi) 443 jmp .L012ecb_ret 444.align 16 445.L017ecb_enc_one: 446 movups (%edx),%xmm0 447 movups 16(%edx),%xmm1 448 leal 32(%edx),%edx 449 xorps %xmm0,%xmm2 450.L021enc1_loop_3: 451.byte 102,15,56,220,209 452 decl %ecx 453 movups (%edx),%xmm1 454 leal 16(%edx),%edx 455 jnz .L021enc1_loop_3 456.byte 102,15,56,221,209 457 movups %xmm2,(%edi) 458 jmp .L012ecb_ret 459.align 16 460.L018ecb_enc_two: 461 call _aesni_encrypt2 462 movups %xmm2,(%edi) 463 movups %xmm3,16(%edi) 464 jmp .L012ecb_ret 465.align 16 466.L019ecb_enc_three: 467 call _aesni_encrypt3 468 movups %xmm2,(%edi) 469 movups %xmm3,16(%edi) 470 movups %xmm4,32(%edi) 471 jmp .L012ecb_ret 472.align 16 473.L020ecb_enc_four: 474 call _aesni_encrypt4 475 movups %xmm2,(%edi) 476 movups %xmm3,16(%edi) 477 movups %xmm4,32(%edi) 478 movups %xmm5,48(%edi) 479 jmp .L012ecb_ret 480.align 16 481.L013ecb_decrypt: 482 movl %edx,%ebp 483 movl %ecx,%ebx 484 cmpl $96,%eax 485 jb .L022ecb_dec_tail 486 movdqu (%esi),%xmm2 487 movdqu 16(%esi),%xmm3 488 movdqu 32(%esi),%xmm4 489 movdqu 48(%esi),%xmm5 490 movdqu 64(%esi),%xmm6 491 movdqu 80(%esi),%xmm7 492 leal 96(%esi),%esi 493 subl $96,%eax 494 jmp .L023ecb_dec_loop6_enter 495.align 16 496.L024ecb_dec_loop6: 497 movups %xmm2,(%edi) 498 movdqu (%esi),%xmm2 499 movups %xmm3,16(%edi) 500 movdqu 16(%esi),%xmm3 501 movups %xmm4,32(%edi) 502 movdqu 32(%esi),%xmm4 503 movups %xmm5,48(%edi) 504 movdqu 48(%esi),%xmm5 505 movups %xmm6,64(%edi) 506 movdqu 64(%esi),%xmm6 507 movups %xmm7,80(%edi) 508 leal 96(%edi),%edi 509 movdqu 80(%esi),%xmm7 510 leal 96(%esi),%esi 511.L023ecb_dec_loop6_enter: 512 call _aesni_decrypt6 513 movl %ebp,%edx 514 movl %ebx,%ecx 515 subl $96,%eax 516 jnc .L024ecb_dec_loop6 517 movups %xmm2,(%edi) 518 movups %xmm3,16(%edi) 519 movups %xmm4,32(%edi) 520 movups %xmm5,48(%edi) 521 movups %xmm6,64(%edi) 522 movups %xmm7,80(%edi) 523 leal 96(%edi),%edi 524 addl $96,%eax 525 jz .L012ecb_ret 526.L022ecb_dec_tail: 527 movups (%esi),%xmm2 528 cmpl $32,%eax 529 jb .L025ecb_dec_one 530 movups 16(%esi),%xmm3 531 je .L026ecb_dec_two 532 movups 32(%esi),%xmm4 533 cmpl $64,%eax 534 jb .L027ecb_dec_three 535 movups 48(%esi),%xmm5 536 je .L028ecb_dec_four 537 movups 64(%esi),%xmm6 538 xorps %xmm7,%xmm7 539 call _aesni_decrypt6 540 movups %xmm2,(%edi) 541 movups %xmm3,16(%edi) 542 movups %xmm4,32(%edi) 543 movups %xmm5,48(%edi) 544 movups %xmm6,64(%edi) 545 jmp .L012ecb_ret 546.align 16 547.L025ecb_dec_one: 548 movups (%edx),%xmm0 549 movups 16(%edx),%xmm1 550 leal 32(%edx),%edx 551 xorps %xmm0,%xmm2 552.L029dec1_loop_4: 553.byte 102,15,56,222,209 554 decl %ecx 555 movups (%edx),%xmm1 556 leal 16(%edx),%edx 557 jnz .L029dec1_loop_4 558.byte 102,15,56,223,209 559 movups %xmm2,(%edi) 560 jmp .L012ecb_ret 561.align 16 562.L026ecb_dec_two: 563 call _aesni_decrypt2 564 movups %xmm2,(%edi) 565 movups %xmm3,16(%edi) 566 jmp .L012ecb_ret 567.align 16 568.L027ecb_dec_three: 569 call _aesni_decrypt3 570 movups %xmm2,(%edi) 571 movups %xmm3,16(%edi) 572 movups %xmm4,32(%edi) 573 jmp .L012ecb_ret 574.align 16 575.L028ecb_dec_four: 576 call _aesni_decrypt4 577 movups %xmm2,(%edi) 578 movups %xmm3,16(%edi) 579 movups %xmm4,32(%edi) 580 movups %xmm5,48(%edi) 581.L012ecb_ret: 582 pxor %xmm0,%xmm0 583 pxor %xmm1,%xmm1 584 pxor %xmm2,%xmm2 585 pxor %xmm3,%xmm3 586 pxor %xmm4,%xmm4 587 pxor %xmm5,%xmm5 588 pxor %xmm6,%xmm6 589 pxor %xmm7,%xmm7 590 popl %edi 591 popl %esi 592 popl %ebx 593 popl %ebp 594 ret 595.size aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin 596.globl aesni_ccm64_encrypt_blocks 597.type aesni_ccm64_encrypt_blocks,@function 598.align 16 599aesni_ccm64_encrypt_blocks: 600.L_aesni_ccm64_encrypt_blocks_begin: 601 pushl %ebp 602 pushl %ebx 603 pushl %esi 604 pushl %edi 605 movl 20(%esp),%esi 606 movl 24(%esp),%edi 607 movl 28(%esp),%eax 608 movl 32(%esp),%edx 609 movl 36(%esp),%ebx 610 movl 40(%esp),%ecx 611 movl %esp,%ebp 612 subl $60,%esp 613 andl $-16,%esp 614 movl %ebp,48(%esp) 615 movdqu (%ebx),%xmm7 616 movdqu (%ecx),%xmm3 617 movl 240(%edx),%ecx 618 movl $202182159,(%esp) 619 movl $134810123,4(%esp) 620 movl $67438087,8(%esp) 621 movl $66051,12(%esp) 622 movl $1,%ebx 623 xorl %ebp,%ebp 624 movl %ebx,16(%esp) 625 movl %ebp,20(%esp) 626 movl %ebp,24(%esp) 627 movl %ebp,28(%esp) 628 shll $4,%ecx 629 movl $16,%ebx 630 leal (%edx),%ebp 631 movdqa (%esp),%xmm5 632 movdqa %xmm7,%xmm2 633 leal 32(%edx,%ecx,1),%edx 634 subl %ecx,%ebx 635.byte 102,15,56,0,253 636.L030ccm64_enc_outer: 637 movups (%ebp),%xmm0 638 movl %ebx,%ecx 639 movups (%esi),%xmm6 640 xorps %xmm0,%xmm2 641 movups 16(%ebp),%xmm1 642 xorps %xmm6,%xmm0 643 xorps %xmm0,%xmm3 644 movups 32(%ebp),%xmm0 645.L031ccm64_enc2_loop: 646.byte 102,15,56,220,209 647.byte 102,15,56,220,217 648 movups (%edx,%ecx,1),%xmm1 649 addl $32,%ecx 650.byte 102,15,56,220,208 651.byte 102,15,56,220,216 652 movups -16(%edx,%ecx,1),%xmm0 653 jnz .L031ccm64_enc2_loop 654.byte 102,15,56,220,209 655.byte 102,15,56,220,217 656 paddq 16(%esp),%xmm7 657 decl %eax 658.byte 102,15,56,221,208 659.byte 102,15,56,221,216 660 leal 16(%esi),%esi 661 xorps %xmm2,%xmm6 662 movdqa %xmm7,%xmm2 663 movups %xmm6,(%edi) 664.byte 102,15,56,0,213 665 leal 16(%edi),%edi 666 jnz .L030ccm64_enc_outer 667 movl 48(%esp),%esp 668 movl 40(%esp),%edi 669 movups %xmm3,(%edi) 670 pxor %xmm0,%xmm0 671 pxor %xmm1,%xmm1 672 pxor %xmm2,%xmm2 673 pxor %xmm3,%xmm3 674 pxor %xmm4,%xmm4 675 pxor %xmm5,%xmm5 676 pxor %xmm6,%xmm6 677 pxor %xmm7,%xmm7 678 popl %edi 679 popl %esi 680 popl %ebx 681 popl %ebp 682 ret 683.size aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin 684.globl aesni_ccm64_decrypt_blocks 685.type aesni_ccm64_decrypt_blocks,@function 686.align 16 687aesni_ccm64_decrypt_blocks: 688.L_aesni_ccm64_decrypt_blocks_begin: 689 pushl %ebp 690 pushl %ebx 691 pushl %esi 692 pushl %edi 693 movl 20(%esp),%esi 694 movl 24(%esp),%edi 695 movl 28(%esp),%eax 696 movl 32(%esp),%edx 697 movl 36(%esp),%ebx 698 movl 40(%esp),%ecx 699 movl %esp,%ebp 700 subl $60,%esp 701 andl $-16,%esp 702 movl %ebp,48(%esp) 703 movdqu (%ebx),%xmm7 704 movdqu (%ecx),%xmm3 705 movl 240(%edx),%ecx 706 movl $202182159,(%esp) 707 movl $134810123,4(%esp) 708 movl $67438087,8(%esp) 709 movl $66051,12(%esp) 710 movl $1,%ebx 711 xorl %ebp,%ebp 712 movl %ebx,16(%esp) 713 movl %ebp,20(%esp) 714 movl %ebp,24(%esp) 715 movl %ebp,28(%esp) 716 movdqa (%esp),%xmm5 717 movdqa %xmm7,%xmm2 718 movl %edx,%ebp 719 movl %ecx,%ebx 720.byte 102,15,56,0,253 721 movups (%edx),%xmm0 722 movups 16(%edx),%xmm1 723 leal 32(%edx),%edx 724 xorps %xmm0,%xmm2 725.L032enc1_loop_5: 726.byte 102,15,56,220,209 727 decl %ecx 728 movups (%edx),%xmm1 729 leal 16(%edx),%edx 730 jnz .L032enc1_loop_5 731.byte 102,15,56,221,209 732 shll $4,%ebx 733 movl $16,%ecx 734 movups (%esi),%xmm6 735 paddq 16(%esp),%xmm7 736 leal 16(%esi),%esi 737 subl %ebx,%ecx 738 leal 32(%ebp,%ebx,1),%edx 739 movl %ecx,%ebx 740 jmp .L033ccm64_dec_outer 741.align 16 742.L033ccm64_dec_outer: 743 xorps %xmm2,%xmm6 744 movdqa %xmm7,%xmm2 745 movups %xmm6,(%edi) 746 leal 16(%edi),%edi 747.byte 102,15,56,0,213 748 subl $1,%eax 749 jz .L034ccm64_dec_break 750 movups (%ebp),%xmm0 751 movl %ebx,%ecx 752 movups 16(%ebp),%xmm1 753 xorps %xmm0,%xmm6 754 xorps %xmm0,%xmm2 755 xorps %xmm6,%xmm3 756 movups 32(%ebp),%xmm0 757.L035ccm64_dec2_loop: 758.byte 102,15,56,220,209 759.byte 102,15,56,220,217 760 movups (%edx,%ecx,1),%xmm1 761 addl $32,%ecx 762.byte 102,15,56,220,208 763.byte 102,15,56,220,216 764 movups -16(%edx,%ecx,1),%xmm0 765 jnz .L035ccm64_dec2_loop 766 movups (%esi),%xmm6 767 paddq 16(%esp),%xmm7 768.byte 102,15,56,220,209 769.byte 102,15,56,220,217 770.byte 102,15,56,221,208 771.byte 102,15,56,221,216 772 leal 16(%esi),%esi 773 jmp .L033ccm64_dec_outer 774.align 16 775.L034ccm64_dec_break: 776 movl 240(%ebp),%ecx 777 movl %ebp,%edx 778 movups (%edx),%xmm0 779 movups 16(%edx),%xmm1 780 xorps %xmm0,%xmm6 781 leal 32(%edx),%edx 782 xorps %xmm6,%xmm3 783.L036enc1_loop_6: 784.byte 102,15,56,220,217 785 decl %ecx 786 movups (%edx),%xmm1 787 leal 16(%edx),%edx 788 jnz .L036enc1_loop_6 789.byte 102,15,56,221,217 790 movl 48(%esp),%esp 791 movl 40(%esp),%edi 792 movups %xmm3,(%edi) 793 pxor %xmm0,%xmm0 794 pxor %xmm1,%xmm1 795 pxor %xmm2,%xmm2 796 pxor %xmm3,%xmm3 797 pxor %xmm4,%xmm4 798 pxor %xmm5,%xmm5 799 pxor %xmm6,%xmm6 800 pxor %xmm7,%xmm7 801 popl %edi 802 popl %esi 803 popl %ebx 804 popl %ebp 805 ret 806.size aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin 807.globl aesni_ctr32_encrypt_blocks 808.type aesni_ctr32_encrypt_blocks,@function 809.align 16 810aesni_ctr32_encrypt_blocks: 811.L_aesni_ctr32_encrypt_blocks_begin: 812 pushl %ebp 813 pushl %ebx 814 pushl %esi 815 pushl %edi 816 movl 20(%esp),%esi 817 movl 24(%esp),%edi 818 movl 28(%esp),%eax 819 movl 32(%esp),%edx 820 movl 36(%esp),%ebx 821 movl %esp,%ebp 822 subl $88,%esp 823 andl $-16,%esp 824 movl %ebp,80(%esp) 825 cmpl $1,%eax 826 je .L037ctr32_one_shortcut 827 movdqu (%ebx),%xmm7 828 movl $202182159,(%esp) 829 movl $134810123,4(%esp) 830 movl $67438087,8(%esp) 831 movl $66051,12(%esp) 832 movl $6,%ecx 833 xorl %ebp,%ebp 834 movl %ecx,16(%esp) 835 movl %ecx,20(%esp) 836 movl %ecx,24(%esp) 837 movl %ebp,28(%esp) 838.byte 102,15,58,22,251,3 839.byte 102,15,58,34,253,3 840 movl 240(%edx),%ecx 841 bswap %ebx 842 pxor %xmm0,%xmm0 843 pxor %xmm1,%xmm1 844 movdqa (%esp),%xmm2 845.byte 102,15,58,34,195,0 846 leal 3(%ebx),%ebp 847.byte 102,15,58,34,205,0 848 incl %ebx 849.byte 102,15,58,34,195,1 850 incl %ebp 851.byte 102,15,58,34,205,1 852 incl %ebx 853.byte 102,15,58,34,195,2 854 incl %ebp 855.byte 102,15,58,34,205,2 856 movdqa %xmm0,48(%esp) 857.byte 102,15,56,0,194 858 movdqu (%edx),%xmm6 859 movdqa %xmm1,64(%esp) 860.byte 102,15,56,0,202 861 pshufd $192,%xmm0,%xmm2 862 pshufd $128,%xmm0,%xmm3 863 cmpl $6,%eax 864 jb .L038ctr32_tail 865 pxor %xmm6,%xmm7 866 shll $4,%ecx 867 movl $16,%ebx 868 movdqa %xmm7,32(%esp) 869 movl %edx,%ebp 870 subl %ecx,%ebx 871 leal 32(%edx,%ecx,1),%edx 872 subl $6,%eax 873 jmp .L039ctr32_loop6 874.align 16 875.L039ctr32_loop6: 876 pshufd $64,%xmm0,%xmm4 877 movdqa 32(%esp),%xmm0 878 pshufd $192,%xmm1,%xmm5 879 pxor %xmm0,%xmm2 880 pshufd $128,%xmm1,%xmm6 881 pxor %xmm0,%xmm3 882 pshufd $64,%xmm1,%xmm7 883 movups 16(%ebp),%xmm1 884 pxor %xmm0,%xmm4 885 pxor %xmm0,%xmm5 886.byte 102,15,56,220,209 887 pxor %xmm0,%xmm6 888 pxor %xmm0,%xmm7 889.byte 102,15,56,220,217 890 movups 32(%ebp),%xmm0 891 movl %ebx,%ecx 892.byte 102,15,56,220,225 893.byte 102,15,56,220,233 894.byte 102,15,56,220,241 895.byte 102,15,56,220,249 896 call .L_aesni_encrypt6_enter 897 movups (%esi),%xmm1 898 movups 16(%esi),%xmm0 899 xorps %xmm1,%xmm2 900 movups 32(%esi),%xmm1 901 xorps %xmm0,%xmm3 902 movups %xmm2,(%edi) 903 movdqa 16(%esp),%xmm0 904 xorps %xmm1,%xmm4 905 movdqa 64(%esp),%xmm1 906 movups %xmm3,16(%edi) 907 movups %xmm4,32(%edi) 908 paddd %xmm0,%xmm1 909 paddd 48(%esp),%xmm0 910 movdqa (%esp),%xmm2 911 movups 48(%esi),%xmm3 912 movups 64(%esi),%xmm4 913 xorps %xmm3,%xmm5 914 movups 80(%esi),%xmm3 915 leal 96(%esi),%esi 916 movdqa %xmm0,48(%esp) 917.byte 102,15,56,0,194 918 xorps %xmm4,%xmm6 919 movups %xmm5,48(%edi) 920 xorps %xmm3,%xmm7 921 movdqa %xmm1,64(%esp) 922.byte 102,15,56,0,202 923 movups %xmm6,64(%edi) 924 pshufd $192,%xmm0,%xmm2 925 movups %xmm7,80(%edi) 926 leal 96(%edi),%edi 927 pshufd $128,%xmm0,%xmm3 928 subl $6,%eax 929 jnc .L039ctr32_loop6 930 addl $6,%eax 931 jz .L040ctr32_ret 932 movdqu (%ebp),%xmm7 933 movl %ebp,%edx 934 pxor 32(%esp),%xmm7 935 movl 240(%ebp),%ecx 936.L038ctr32_tail: 937 por %xmm7,%xmm2 938 cmpl $2,%eax 939 jb .L041ctr32_one 940 pshufd $64,%xmm0,%xmm4 941 por %xmm7,%xmm3 942 je .L042ctr32_two 943 pshufd $192,%xmm1,%xmm5 944 por %xmm7,%xmm4 945 cmpl $4,%eax 946 jb .L043ctr32_three 947 pshufd $128,%xmm1,%xmm6 948 por %xmm7,%xmm5 949 je .L044ctr32_four 950 por %xmm7,%xmm6 951 call _aesni_encrypt6 952 movups (%esi),%xmm1 953 movups 16(%esi),%xmm0 954 xorps %xmm1,%xmm2 955 movups 32(%esi),%xmm1 956 xorps %xmm0,%xmm3 957 movups 48(%esi),%xmm0 958 xorps %xmm1,%xmm4 959 movups 64(%esi),%xmm1 960 xorps %xmm0,%xmm5 961 movups %xmm2,(%edi) 962 xorps %xmm1,%xmm6 963 movups %xmm3,16(%edi) 964 movups %xmm4,32(%edi) 965 movups %xmm5,48(%edi) 966 movups %xmm6,64(%edi) 967 jmp .L040ctr32_ret 968.align 16 969.L037ctr32_one_shortcut: 970 movups (%ebx),%xmm2 971 movl 240(%edx),%ecx 972.L041ctr32_one: 973 movups (%edx),%xmm0 974 movups 16(%edx),%xmm1 975 leal 32(%edx),%edx 976 xorps %xmm0,%xmm2 977.L045enc1_loop_7: 978.byte 102,15,56,220,209 979 decl %ecx 980 movups (%edx),%xmm1 981 leal 16(%edx),%edx 982 jnz .L045enc1_loop_7 983.byte 102,15,56,221,209 984 movups (%esi),%xmm6 985 xorps %xmm2,%xmm6 986 movups %xmm6,(%edi) 987 jmp .L040ctr32_ret 988.align 16 989.L042ctr32_two: 990 call _aesni_encrypt2 991 movups (%esi),%xmm5 992 movups 16(%esi),%xmm6 993 xorps %xmm5,%xmm2 994 xorps %xmm6,%xmm3 995 movups %xmm2,(%edi) 996 movups %xmm3,16(%edi) 997 jmp .L040ctr32_ret 998.align 16 999.L043ctr32_three: 1000 call _aesni_encrypt3 1001 movups (%esi),%xmm5 1002 movups 16(%esi),%xmm6 1003 xorps %xmm5,%xmm2 1004 movups 32(%esi),%xmm7 1005 xorps %xmm6,%xmm3 1006 movups %xmm2,(%edi) 1007 xorps %xmm7,%xmm4 1008 movups %xmm3,16(%edi) 1009 movups %xmm4,32(%edi) 1010 jmp .L040ctr32_ret 1011.align 16 1012.L044ctr32_four: 1013 call _aesni_encrypt4 1014 movups (%esi),%xmm6 1015 movups 16(%esi),%xmm7 1016 movups 32(%esi),%xmm1 1017 xorps %xmm6,%xmm2 1018 movups 48(%esi),%xmm0 1019 xorps %xmm7,%xmm3 1020 movups %xmm2,(%edi) 1021 xorps %xmm1,%xmm4 1022 movups %xmm3,16(%edi) 1023 xorps %xmm0,%xmm5 1024 movups %xmm4,32(%edi) 1025 movups %xmm5,48(%edi) 1026.L040ctr32_ret: 1027 pxor %xmm0,%xmm0 1028 pxor %xmm1,%xmm1 1029 pxor %xmm2,%xmm2 1030 pxor %xmm3,%xmm3 1031 pxor %xmm4,%xmm4 1032 movdqa %xmm0,32(%esp) 1033 pxor %xmm5,%xmm5 1034 movdqa %xmm0,48(%esp) 1035 pxor %xmm6,%xmm6 1036 movdqa %xmm0,64(%esp) 1037 pxor %xmm7,%xmm7 1038 movl 80(%esp),%esp 1039 popl %edi 1040 popl %esi 1041 popl %ebx 1042 popl %ebp 1043 ret 1044.size aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin 1045.globl aesni_xts_encrypt 1046.type aesni_xts_encrypt,@function 1047.align 16 1048aesni_xts_encrypt: 1049.L_aesni_xts_encrypt_begin: 1050 pushl %ebp 1051 pushl %ebx 1052 pushl %esi 1053 pushl %edi 1054 movl 36(%esp),%edx 1055 movl 40(%esp),%esi 1056 movl 240(%edx),%ecx 1057 movups (%esi),%xmm2 1058 movups (%edx),%xmm0 1059 movups 16(%edx),%xmm1 1060 leal 32(%edx),%edx 1061 xorps %xmm0,%xmm2 1062.L046enc1_loop_8: 1063.byte 102,15,56,220,209 1064 decl %ecx 1065 movups (%edx),%xmm1 1066 leal 16(%edx),%edx 1067 jnz .L046enc1_loop_8 1068.byte 102,15,56,221,209 1069 movl 20(%esp),%esi 1070 movl 24(%esp),%edi 1071 movl 28(%esp),%eax 1072 movl 32(%esp),%edx 1073 movl %esp,%ebp 1074 subl $120,%esp 1075 movl 240(%edx),%ecx 1076 andl $-16,%esp 1077 movl $135,96(%esp) 1078 movl $0,100(%esp) 1079 movl $1,104(%esp) 1080 movl $0,108(%esp) 1081 movl %eax,112(%esp) 1082 movl %ebp,116(%esp) 1083 movdqa %xmm2,%xmm1 1084 pxor %xmm0,%xmm0 1085 movdqa 96(%esp),%xmm3 1086 pcmpgtd %xmm1,%xmm0 1087 andl $-16,%eax 1088 movl %edx,%ebp 1089 movl %ecx,%ebx 1090 subl $96,%eax 1091 jc .L047xts_enc_short 1092 shll $4,%ecx 1093 movl $16,%ebx 1094 subl %ecx,%ebx 1095 leal 32(%edx,%ecx,1),%edx 1096 jmp .L048xts_enc_loop6 1097.align 16 1098.L048xts_enc_loop6: 1099 pshufd $19,%xmm0,%xmm2 1100 pxor %xmm0,%xmm0 1101 movdqa %xmm1,(%esp) 1102 paddq %xmm1,%xmm1 1103 pand %xmm3,%xmm2 1104 pcmpgtd %xmm1,%xmm0 1105 pxor %xmm2,%xmm1 1106 pshufd $19,%xmm0,%xmm2 1107 pxor %xmm0,%xmm0 1108 movdqa %xmm1,16(%esp) 1109 paddq %xmm1,%xmm1 1110 pand %xmm3,%xmm2 1111 pcmpgtd %xmm1,%xmm0 1112 pxor %xmm2,%xmm1 1113 pshufd $19,%xmm0,%xmm2 1114 pxor %xmm0,%xmm0 1115 movdqa %xmm1,32(%esp) 1116 paddq %xmm1,%xmm1 1117 pand %xmm3,%xmm2 1118 pcmpgtd %xmm1,%xmm0 1119 pxor %xmm2,%xmm1 1120 pshufd $19,%xmm0,%xmm2 1121 pxor %xmm0,%xmm0 1122 movdqa %xmm1,48(%esp) 1123 paddq %xmm1,%xmm1 1124 pand %xmm3,%xmm2 1125 pcmpgtd %xmm1,%xmm0 1126 pxor %xmm2,%xmm1 1127 pshufd $19,%xmm0,%xmm7 1128 movdqa %xmm1,64(%esp) 1129 paddq %xmm1,%xmm1 1130 movups (%ebp),%xmm0 1131 pand %xmm3,%xmm7 1132 movups (%esi),%xmm2 1133 pxor %xmm1,%xmm7 1134 movl %ebx,%ecx 1135 movdqu 16(%esi),%xmm3 1136 xorps %xmm0,%xmm2 1137 movdqu 32(%esi),%xmm4 1138 pxor %xmm0,%xmm3 1139 movdqu 48(%esi),%xmm5 1140 pxor %xmm0,%xmm4 1141 movdqu 64(%esi),%xmm6 1142 pxor %xmm0,%xmm5 1143 movdqu 80(%esi),%xmm1 1144 pxor %xmm0,%xmm6 1145 leal 96(%esi),%esi 1146 pxor (%esp),%xmm2 1147 movdqa %xmm7,80(%esp) 1148 pxor %xmm1,%xmm7 1149 movups 16(%ebp),%xmm1 1150 pxor 16(%esp),%xmm3 1151 pxor 32(%esp),%xmm4 1152.byte 102,15,56,220,209 1153 pxor 48(%esp),%xmm5 1154 pxor 64(%esp),%xmm6 1155.byte 102,15,56,220,217 1156 pxor %xmm0,%xmm7 1157 movups 32(%ebp),%xmm0 1158.byte 102,15,56,220,225 1159.byte 102,15,56,220,233 1160.byte 102,15,56,220,241 1161.byte 102,15,56,220,249 1162 call .L_aesni_encrypt6_enter 1163 movdqa 80(%esp),%xmm1 1164 pxor %xmm0,%xmm0 1165 xorps (%esp),%xmm2 1166 pcmpgtd %xmm1,%xmm0 1167 xorps 16(%esp),%xmm3 1168 movups %xmm2,(%edi) 1169 xorps 32(%esp),%xmm4 1170 movups %xmm3,16(%edi) 1171 xorps 48(%esp),%xmm5 1172 movups %xmm4,32(%edi) 1173 xorps 64(%esp),%xmm6 1174 movups %xmm5,48(%edi) 1175 xorps %xmm1,%xmm7 1176 movups %xmm6,64(%edi) 1177 pshufd $19,%xmm0,%xmm2 1178 movups %xmm7,80(%edi) 1179 leal 96(%edi),%edi 1180 movdqa 96(%esp),%xmm3 1181 pxor %xmm0,%xmm0 1182 paddq %xmm1,%xmm1 1183 pand %xmm3,%xmm2 1184 pcmpgtd %xmm1,%xmm0 1185 pxor %xmm2,%xmm1 1186 subl $96,%eax 1187 jnc .L048xts_enc_loop6 1188 movl 240(%ebp),%ecx 1189 movl %ebp,%edx 1190 movl %ecx,%ebx 1191.L047xts_enc_short: 1192 addl $96,%eax 1193 jz .L049xts_enc_done6x 1194 movdqa %xmm1,%xmm5 1195 cmpl $32,%eax 1196 jb .L050xts_enc_one 1197 pshufd $19,%xmm0,%xmm2 1198 pxor %xmm0,%xmm0 1199 paddq %xmm1,%xmm1 1200 pand %xmm3,%xmm2 1201 pcmpgtd %xmm1,%xmm0 1202 pxor %xmm2,%xmm1 1203 je .L051xts_enc_two 1204 pshufd $19,%xmm0,%xmm2 1205 pxor %xmm0,%xmm0 1206 movdqa %xmm1,%xmm6 1207 paddq %xmm1,%xmm1 1208 pand %xmm3,%xmm2 1209 pcmpgtd %xmm1,%xmm0 1210 pxor %xmm2,%xmm1 1211 cmpl $64,%eax 1212 jb .L052xts_enc_three 1213 pshufd $19,%xmm0,%xmm2 1214 pxor %xmm0,%xmm0 1215 movdqa %xmm1,%xmm7 1216 paddq %xmm1,%xmm1 1217 pand %xmm3,%xmm2 1218 pcmpgtd %xmm1,%xmm0 1219 pxor %xmm2,%xmm1 1220 movdqa %xmm5,(%esp) 1221 movdqa %xmm6,16(%esp) 1222 je .L053xts_enc_four 1223 movdqa %xmm7,32(%esp) 1224 pshufd $19,%xmm0,%xmm7 1225 movdqa %xmm1,48(%esp) 1226 paddq %xmm1,%xmm1 1227 pand %xmm3,%xmm7 1228 pxor %xmm1,%xmm7 1229 movdqu (%esi),%xmm2 1230 movdqu 16(%esi),%xmm3 1231 movdqu 32(%esi),%xmm4 1232 pxor (%esp),%xmm2 1233 movdqu 48(%esi),%xmm5 1234 pxor 16(%esp),%xmm3 1235 movdqu 64(%esi),%xmm6 1236 pxor 32(%esp),%xmm4 1237 leal 80(%esi),%esi 1238 pxor 48(%esp),%xmm5 1239 movdqa %xmm7,64(%esp) 1240 pxor %xmm7,%xmm6 1241 call _aesni_encrypt6 1242 movaps 64(%esp),%xmm1 1243 xorps (%esp),%xmm2 1244 xorps 16(%esp),%xmm3 1245 xorps 32(%esp),%xmm4 1246 movups %xmm2,(%edi) 1247 xorps 48(%esp),%xmm5 1248 movups %xmm3,16(%edi) 1249 xorps %xmm1,%xmm6 1250 movups %xmm4,32(%edi) 1251 movups %xmm5,48(%edi) 1252 movups %xmm6,64(%edi) 1253 leal 80(%edi),%edi 1254 jmp .L054xts_enc_done 1255.align 16 1256.L050xts_enc_one: 1257 movups (%esi),%xmm2 1258 leal 16(%esi),%esi 1259 xorps %xmm5,%xmm2 1260 movups (%edx),%xmm0 1261 movups 16(%edx),%xmm1 1262 leal 32(%edx),%edx 1263 xorps %xmm0,%xmm2 1264.L055enc1_loop_9: 1265.byte 102,15,56,220,209 1266 decl %ecx 1267 movups (%edx),%xmm1 1268 leal 16(%edx),%edx 1269 jnz .L055enc1_loop_9 1270.byte 102,15,56,221,209 1271 xorps %xmm5,%xmm2 1272 movups %xmm2,(%edi) 1273 leal 16(%edi),%edi 1274 movdqa %xmm5,%xmm1 1275 jmp .L054xts_enc_done 1276.align 16 1277.L051xts_enc_two: 1278 movaps %xmm1,%xmm6 1279 movups (%esi),%xmm2 1280 movups 16(%esi),%xmm3 1281 leal 32(%esi),%esi 1282 xorps %xmm5,%xmm2 1283 xorps %xmm6,%xmm3 1284 call _aesni_encrypt2 1285 xorps %xmm5,%xmm2 1286 xorps %xmm6,%xmm3 1287 movups %xmm2,(%edi) 1288 movups %xmm3,16(%edi) 1289 leal 32(%edi),%edi 1290 movdqa %xmm6,%xmm1 1291 jmp .L054xts_enc_done 1292.align 16 1293.L052xts_enc_three: 1294 movaps %xmm1,%xmm7 1295 movups (%esi),%xmm2 1296 movups 16(%esi),%xmm3 1297 movups 32(%esi),%xmm4 1298 leal 48(%esi),%esi 1299 xorps %xmm5,%xmm2 1300 xorps %xmm6,%xmm3 1301 xorps %xmm7,%xmm4 1302 call _aesni_encrypt3 1303 xorps %xmm5,%xmm2 1304 xorps %xmm6,%xmm3 1305 xorps %xmm7,%xmm4 1306 movups %xmm2,(%edi) 1307 movups %xmm3,16(%edi) 1308 movups %xmm4,32(%edi) 1309 leal 48(%edi),%edi 1310 movdqa %xmm7,%xmm1 1311 jmp .L054xts_enc_done 1312.align 16 1313.L053xts_enc_four: 1314 movaps %xmm1,%xmm6 1315 movups (%esi),%xmm2 1316 movups 16(%esi),%xmm3 1317 movups 32(%esi),%xmm4 1318 xorps (%esp),%xmm2 1319 movups 48(%esi),%xmm5 1320 leal 64(%esi),%esi 1321 xorps 16(%esp),%xmm3 1322 xorps %xmm7,%xmm4 1323 xorps %xmm6,%xmm5 1324 call _aesni_encrypt4 1325 xorps (%esp),%xmm2 1326 xorps 16(%esp),%xmm3 1327 xorps %xmm7,%xmm4 1328 movups %xmm2,(%edi) 1329 xorps %xmm6,%xmm5 1330 movups %xmm3,16(%edi) 1331 movups %xmm4,32(%edi) 1332 movups %xmm5,48(%edi) 1333 leal 64(%edi),%edi 1334 movdqa %xmm6,%xmm1 1335 jmp .L054xts_enc_done 1336.align 16 1337.L049xts_enc_done6x: 1338 movl 112(%esp),%eax 1339 andl $15,%eax 1340 jz .L056xts_enc_ret 1341 movdqa %xmm1,%xmm5 1342 movl %eax,112(%esp) 1343 jmp .L057xts_enc_steal 1344.align 16 1345.L054xts_enc_done: 1346 movl 112(%esp),%eax 1347 pxor %xmm0,%xmm0 1348 andl $15,%eax 1349 jz .L056xts_enc_ret 1350 pcmpgtd %xmm1,%xmm0 1351 movl %eax,112(%esp) 1352 pshufd $19,%xmm0,%xmm5 1353 paddq %xmm1,%xmm1 1354 pand 96(%esp),%xmm5 1355 pxor %xmm1,%xmm5 1356.L057xts_enc_steal: 1357 movzbl (%esi),%ecx 1358 movzbl -16(%edi),%edx 1359 leal 1(%esi),%esi 1360 movb %cl,-16(%edi) 1361 movb %dl,(%edi) 1362 leal 1(%edi),%edi 1363 subl $1,%eax 1364 jnz .L057xts_enc_steal 1365 subl 112(%esp),%edi 1366 movl %ebp,%edx 1367 movl %ebx,%ecx 1368 movups -16(%edi),%xmm2 1369 xorps %xmm5,%xmm2 1370 movups (%edx),%xmm0 1371 movups 16(%edx),%xmm1 1372 leal 32(%edx),%edx 1373 xorps %xmm0,%xmm2 1374.L058enc1_loop_10: 1375.byte 102,15,56,220,209 1376 decl %ecx 1377 movups (%edx),%xmm1 1378 leal 16(%edx),%edx 1379 jnz .L058enc1_loop_10 1380.byte 102,15,56,221,209 1381 xorps %xmm5,%xmm2 1382 movups %xmm2,-16(%edi) 1383.L056xts_enc_ret: 1384 pxor %xmm0,%xmm0 1385 pxor %xmm1,%xmm1 1386 pxor %xmm2,%xmm2 1387 movdqa %xmm0,(%esp) 1388 pxor %xmm3,%xmm3 1389 movdqa %xmm0,16(%esp) 1390 pxor %xmm4,%xmm4 1391 movdqa %xmm0,32(%esp) 1392 pxor %xmm5,%xmm5 1393 movdqa %xmm0,48(%esp) 1394 pxor %xmm6,%xmm6 1395 movdqa %xmm0,64(%esp) 1396 pxor %xmm7,%xmm7 1397 movdqa %xmm0,80(%esp) 1398 movl 116(%esp),%esp 1399 popl %edi 1400 popl %esi 1401 popl %ebx 1402 popl %ebp 1403 ret 1404.size aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin 1405.globl aesni_xts_decrypt 1406.type aesni_xts_decrypt,@function 1407.align 16 1408aesni_xts_decrypt: 1409.L_aesni_xts_decrypt_begin: 1410 pushl %ebp 1411 pushl %ebx 1412 pushl %esi 1413 pushl %edi 1414 movl 36(%esp),%edx 1415 movl 40(%esp),%esi 1416 movl 240(%edx),%ecx 1417 movups (%esi),%xmm2 1418 movups (%edx),%xmm0 1419 movups 16(%edx),%xmm1 1420 leal 32(%edx),%edx 1421 xorps %xmm0,%xmm2 1422.L059enc1_loop_11: 1423.byte 102,15,56,220,209 1424 decl %ecx 1425 movups (%edx),%xmm1 1426 leal 16(%edx),%edx 1427 jnz .L059enc1_loop_11 1428.byte 102,15,56,221,209 1429 movl 20(%esp),%esi 1430 movl 24(%esp),%edi 1431 movl 28(%esp),%eax 1432 movl 32(%esp),%edx 1433 movl %esp,%ebp 1434 subl $120,%esp 1435 andl $-16,%esp 1436 xorl %ebx,%ebx 1437 testl $15,%eax 1438 setnz %bl 1439 shll $4,%ebx 1440 subl %ebx,%eax 1441 movl $135,96(%esp) 1442 movl $0,100(%esp) 1443 movl $1,104(%esp) 1444 movl $0,108(%esp) 1445 movl %eax,112(%esp) 1446 movl %ebp,116(%esp) 1447 movl 240(%edx),%ecx 1448 movl %edx,%ebp 1449 movl %ecx,%ebx 1450 movdqa %xmm2,%xmm1 1451 pxor %xmm0,%xmm0 1452 movdqa 96(%esp),%xmm3 1453 pcmpgtd %xmm1,%xmm0 1454 andl $-16,%eax 1455 subl $96,%eax 1456 jc .L060xts_dec_short 1457 shll $4,%ecx 1458 movl $16,%ebx 1459 subl %ecx,%ebx 1460 leal 32(%edx,%ecx,1),%edx 1461 jmp .L061xts_dec_loop6 1462.align 16 1463.L061xts_dec_loop6: 1464 pshufd $19,%xmm0,%xmm2 1465 pxor %xmm0,%xmm0 1466 movdqa %xmm1,(%esp) 1467 paddq %xmm1,%xmm1 1468 pand %xmm3,%xmm2 1469 pcmpgtd %xmm1,%xmm0 1470 pxor %xmm2,%xmm1 1471 pshufd $19,%xmm0,%xmm2 1472 pxor %xmm0,%xmm0 1473 movdqa %xmm1,16(%esp) 1474 paddq %xmm1,%xmm1 1475 pand %xmm3,%xmm2 1476 pcmpgtd %xmm1,%xmm0 1477 pxor %xmm2,%xmm1 1478 pshufd $19,%xmm0,%xmm2 1479 pxor %xmm0,%xmm0 1480 movdqa %xmm1,32(%esp) 1481 paddq %xmm1,%xmm1 1482 pand %xmm3,%xmm2 1483 pcmpgtd %xmm1,%xmm0 1484 pxor %xmm2,%xmm1 1485 pshufd $19,%xmm0,%xmm2 1486 pxor %xmm0,%xmm0 1487 movdqa %xmm1,48(%esp) 1488 paddq %xmm1,%xmm1 1489 pand %xmm3,%xmm2 1490 pcmpgtd %xmm1,%xmm0 1491 pxor %xmm2,%xmm1 1492 pshufd $19,%xmm0,%xmm7 1493 movdqa %xmm1,64(%esp) 1494 paddq %xmm1,%xmm1 1495 movups (%ebp),%xmm0 1496 pand %xmm3,%xmm7 1497 movups (%esi),%xmm2 1498 pxor %xmm1,%xmm7 1499 movl %ebx,%ecx 1500 movdqu 16(%esi),%xmm3 1501 xorps %xmm0,%xmm2 1502 movdqu 32(%esi),%xmm4 1503 pxor %xmm0,%xmm3 1504 movdqu 48(%esi),%xmm5 1505 pxor %xmm0,%xmm4 1506 movdqu 64(%esi),%xmm6 1507 pxor %xmm0,%xmm5 1508 movdqu 80(%esi),%xmm1 1509 pxor %xmm0,%xmm6 1510 leal 96(%esi),%esi 1511 pxor (%esp),%xmm2 1512 movdqa %xmm7,80(%esp) 1513 pxor %xmm1,%xmm7 1514 movups 16(%ebp),%xmm1 1515 pxor 16(%esp),%xmm3 1516 pxor 32(%esp),%xmm4 1517.byte 102,15,56,222,209 1518 pxor 48(%esp),%xmm5 1519 pxor 64(%esp),%xmm6 1520.byte 102,15,56,222,217 1521 pxor %xmm0,%xmm7 1522 movups 32(%ebp),%xmm0 1523.byte 102,15,56,222,225 1524.byte 102,15,56,222,233 1525.byte 102,15,56,222,241 1526.byte 102,15,56,222,249 1527 call .L_aesni_decrypt6_enter 1528 movdqa 80(%esp),%xmm1 1529 pxor %xmm0,%xmm0 1530 xorps (%esp),%xmm2 1531 pcmpgtd %xmm1,%xmm0 1532 xorps 16(%esp),%xmm3 1533 movups %xmm2,(%edi) 1534 xorps 32(%esp),%xmm4 1535 movups %xmm3,16(%edi) 1536 xorps 48(%esp),%xmm5 1537 movups %xmm4,32(%edi) 1538 xorps 64(%esp),%xmm6 1539 movups %xmm5,48(%edi) 1540 xorps %xmm1,%xmm7 1541 movups %xmm6,64(%edi) 1542 pshufd $19,%xmm0,%xmm2 1543 movups %xmm7,80(%edi) 1544 leal 96(%edi),%edi 1545 movdqa 96(%esp),%xmm3 1546 pxor %xmm0,%xmm0 1547 paddq %xmm1,%xmm1 1548 pand %xmm3,%xmm2 1549 pcmpgtd %xmm1,%xmm0 1550 pxor %xmm2,%xmm1 1551 subl $96,%eax 1552 jnc .L061xts_dec_loop6 1553 movl 240(%ebp),%ecx 1554 movl %ebp,%edx 1555 movl %ecx,%ebx 1556.L060xts_dec_short: 1557 addl $96,%eax 1558 jz .L062xts_dec_done6x 1559 movdqa %xmm1,%xmm5 1560 cmpl $32,%eax 1561 jb .L063xts_dec_one 1562 pshufd $19,%xmm0,%xmm2 1563 pxor %xmm0,%xmm0 1564 paddq %xmm1,%xmm1 1565 pand %xmm3,%xmm2 1566 pcmpgtd %xmm1,%xmm0 1567 pxor %xmm2,%xmm1 1568 je .L064xts_dec_two 1569 pshufd $19,%xmm0,%xmm2 1570 pxor %xmm0,%xmm0 1571 movdqa %xmm1,%xmm6 1572 paddq %xmm1,%xmm1 1573 pand %xmm3,%xmm2 1574 pcmpgtd %xmm1,%xmm0 1575 pxor %xmm2,%xmm1 1576 cmpl $64,%eax 1577 jb .L065xts_dec_three 1578 pshufd $19,%xmm0,%xmm2 1579 pxor %xmm0,%xmm0 1580 movdqa %xmm1,%xmm7 1581 paddq %xmm1,%xmm1 1582 pand %xmm3,%xmm2 1583 pcmpgtd %xmm1,%xmm0 1584 pxor %xmm2,%xmm1 1585 movdqa %xmm5,(%esp) 1586 movdqa %xmm6,16(%esp) 1587 je .L066xts_dec_four 1588 movdqa %xmm7,32(%esp) 1589 pshufd $19,%xmm0,%xmm7 1590 movdqa %xmm1,48(%esp) 1591 paddq %xmm1,%xmm1 1592 pand %xmm3,%xmm7 1593 pxor %xmm1,%xmm7 1594 movdqu (%esi),%xmm2 1595 movdqu 16(%esi),%xmm3 1596 movdqu 32(%esi),%xmm4 1597 pxor (%esp),%xmm2 1598 movdqu 48(%esi),%xmm5 1599 pxor 16(%esp),%xmm3 1600 movdqu 64(%esi),%xmm6 1601 pxor 32(%esp),%xmm4 1602 leal 80(%esi),%esi 1603 pxor 48(%esp),%xmm5 1604 movdqa %xmm7,64(%esp) 1605 pxor %xmm7,%xmm6 1606 call _aesni_decrypt6 1607 movaps 64(%esp),%xmm1 1608 xorps (%esp),%xmm2 1609 xorps 16(%esp),%xmm3 1610 xorps 32(%esp),%xmm4 1611 movups %xmm2,(%edi) 1612 xorps 48(%esp),%xmm5 1613 movups %xmm3,16(%edi) 1614 xorps %xmm1,%xmm6 1615 movups %xmm4,32(%edi) 1616 movups %xmm5,48(%edi) 1617 movups %xmm6,64(%edi) 1618 leal 80(%edi),%edi 1619 jmp .L067xts_dec_done 1620.align 16 1621.L063xts_dec_one: 1622 movups (%esi),%xmm2 1623 leal 16(%esi),%esi 1624 xorps %xmm5,%xmm2 1625 movups (%edx),%xmm0 1626 movups 16(%edx),%xmm1 1627 leal 32(%edx),%edx 1628 xorps %xmm0,%xmm2 1629.L068dec1_loop_12: 1630.byte 102,15,56,222,209 1631 decl %ecx 1632 movups (%edx),%xmm1 1633 leal 16(%edx),%edx 1634 jnz .L068dec1_loop_12 1635.byte 102,15,56,223,209 1636 xorps %xmm5,%xmm2 1637 movups %xmm2,(%edi) 1638 leal 16(%edi),%edi 1639 movdqa %xmm5,%xmm1 1640 jmp .L067xts_dec_done 1641.align 16 1642.L064xts_dec_two: 1643 movaps %xmm1,%xmm6 1644 movups (%esi),%xmm2 1645 movups 16(%esi),%xmm3 1646 leal 32(%esi),%esi 1647 xorps %xmm5,%xmm2 1648 xorps %xmm6,%xmm3 1649 call _aesni_decrypt2 1650 xorps %xmm5,%xmm2 1651 xorps %xmm6,%xmm3 1652 movups %xmm2,(%edi) 1653 movups %xmm3,16(%edi) 1654 leal 32(%edi),%edi 1655 movdqa %xmm6,%xmm1 1656 jmp .L067xts_dec_done 1657.align 16 1658.L065xts_dec_three: 1659 movaps %xmm1,%xmm7 1660 movups (%esi),%xmm2 1661 movups 16(%esi),%xmm3 1662 movups 32(%esi),%xmm4 1663 leal 48(%esi),%esi 1664 xorps %xmm5,%xmm2 1665 xorps %xmm6,%xmm3 1666 xorps %xmm7,%xmm4 1667 call _aesni_decrypt3 1668 xorps %xmm5,%xmm2 1669 xorps %xmm6,%xmm3 1670 xorps %xmm7,%xmm4 1671 movups %xmm2,(%edi) 1672 movups %xmm3,16(%edi) 1673 movups %xmm4,32(%edi) 1674 leal 48(%edi),%edi 1675 movdqa %xmm7,%xmm1 1676 jmp .L067xts_dec_done 1677.align 16 1678.L066xts_dec_four: 1679 movaps %xmm1,%xmm6 1680 movups (%esi),%xmm2 1681 movups 16(%esi),%xmm3 1682 movups 32(%esi),%xmm4 1683 xorps (%esp),%xmm2 1684 movups 48(%esi),%xmm5 1685 leal 64(%esi),%esi 1686 xorps 16(%esp),%xmm3 1687 xorps %xmm7,%xmm4 1688 xorps %xmm6,%xmm5 1689 call _aesni_decrypt4 1690 xorps (%esp),%xmm2 1691 xorps 16(%esp),%xmm3 1692 xorps %xmm7,%xmm4 1693 movups %xmm2,(%edi) 1694 xorps %xmm6,%xmm5 1695 movups %xmm3,16(%edi) 1696 movups %xmm4,32(%edi) 1697 movups %xmm5,48(%edi) 1698 leal 64(%edi),%edi 1699 movdqa %xmm6,%xmm1 1700 jmp .L067xts_dec_done 1701.align 16 1702.L062xts_dec_done6x: 1703 movl 112(%esp),%eax 1704 andl $15,%eax 1705 jz .L069xts_dec_ret 1706 movl %eax,112(%esp) 1707 jmp .L070xts_dec_only_one_more 1708.align 16 1709.L067xts_dec_done: 1710 movl 112(%esp),%eax 1711 pxor %xmm0,%xmm0 1712 andl $15,%eax 1713 jz .L069xts_dec_ret 1714 pcmpgtd %xmm1,%xmm0 1715 movl %eax,112(%esp) 1716 pshufd $19,%xmm0,%xmm2 1717 pxor %xmm0,%xmm0 1718 movdqa 96(%esp),%xmm3 1719 paddq %xmm1,%xmm1 1720 pand %xmm3,%xmm2 1721 pcmpgtd %xmm1,%xmm0 1722 pxor %xmm2,%xmm1 1723.L070xts_dec_only_one_more: 1724 pshufd $19,%xmm0,%xmm5 1725 movdqa %xmm1,%xmm6 1726 paddq %xmm1,%xmm1 1727 pand %xmm3,%xmm5 1728 pxor %xmm1,%xmm5 1729 movl %ebp,%edx 1730 movl %ebx,%ecx 1731 movups (%esi),%xmm2 1732 xorps %xmm5,%xmm2 1733 movups (%edx),%xmm0 1734 movups 16(%edx),%xmm1 1735 leal 32(%edx),%edx 1736 xorps %xmm0,%xmm2 1737.L071dec1_loop_13: 1738.byte 102,15,56,222,209 1739 decl %ecx 1740 movups (%edx),%xmm1 1741 leal 16(%edx),%edx 1742 jnz .L071dec1_loop_13 1743.byte 102,15,56,223,209 1744 xorps %xmm5,%xmm2 1745 movups %xmm2,(%edi) 1746.L072xts_dec_steal: 1747 movzbl 16(%esi),%ecx 1748 movzbl (%edi),%edx 1749 leal 1(%esi),%esi 1750 movb %cl,(%edi) 1751 movb %dl,16(%edi) 1752 leal 1(%edi),%edi 1753 subl $1,%eax 1754 jnz .L072xts_dec_steal 1755 subl 112(%esp),%edi 1756 movl %ebp,%edx 1757 movl %ebx,%ecx 1758 movups (%edi),%xmm2 1759 xorps %xmm6,%xmm2 1760 movups (%edx),%xmm0 1761 movups 16(%edx),%xmm1 1762 leal 32(%edx),%edx 1763 xorps %xmm0,%xmm2 1764.L073dec1_loop_14: 1765.byte 102,15,56,222,209 1766 decl %ecx 1767 movups (%edx),%xmm1 1768 leal 16(%edx),%edx 1769 jnz .L073dec1_loop_14 1770.byte 102,15,56,223,209 1771 xorps %xmm6,%xmm2 1772 movups %xmm2,(%edi) 1773.L069xts_dec_ret: 1774 pxor %xmm0,%xmm0 1775 pxor %xmm1,%xmm1 1776 pxor %xmm2,%xmm2 1777 movdqa %xmm0,(%esp) 1778 pxor %xmm3,%xmm3 1779 movdqa %xmm0,16(%esp) 1780 pxor %xmm4,%xmm4 1781 movdqa %xmm0,32(%esp) 1782 pxor %xmm5,%xmm5 1783 movdqa %xmm0,48(%esp) 1784 pxor %xmm6,%xmm6 1785 movdqa %xmm0,64(%esp) 1786 pxor %xmm7,%xmm7 1787 movdqa %xmm0,80(%esp) 1788 movl 116(%esp),%esp 1789 popl %edi 1790 popl %esi 1791 popl %ebx 1792 popl %ebp 1793 ret 1794.size aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin 1795.globl aesni_ocb_encrypt 1796.type aesni_ocb_encrypt,@function 1797.align 16 1798aesni_ocb_encrypt: 1799.L_aesni_ocb_encrypt_begin: 1800 pushl %ebp 1801 pushl %ebx 1802 pushl %esi 1803 pushl %edi 1804 movl 40(%esp),%ecx 1805 movl 48(%esp),%ebx 1806 movl 20(%esp),%esi 1807 movl 24(%esp),%edi 1808 movl 28(%esp),%eax 1809 movl 32(%esp),%edx 1810 movdqu (%ecx),%xmm0 1811 movl 36(%esp),%ebp 1812 movdqu (%ebx),%xmm1 1813 movl 44(%esp),%ebx 1814 movl %esp,%ecx 1815 subl $132,%esp 1816 andl $-16,%esp 1817 subl %esi,%edi 1818 shll $4,%eax 1819 leal -96(%esi,%eax,1),%eax 1820 movl %edi,120(%esp) 1821 movl %eax,124(%esp) 1822 movl %ecx,128(%esp) 1823 movl 240(%edx),%ecx 1824 testl $1,%ebp 1825 jnz .L074odd 1826 bsfl %ebp,%eax 1827 addl $1,%ebp 1828 shll $4,%eax 1829 movdqu (%ebx,%eax,1),%xmm7 1830 movl %edx,%eax 1831 movdqu (%esi),%xmm2 1832 leal 16(%esi),%esi 1833 pxor %xmm0,%xmm7 1834 pxor %xmm2,%xmm1 1835 pxor %xmm7,%xmm2 1836 movdqa %xmm1,%xmm6 1837 movups (%edx),%xmm0 1838 movups 16(%edx),%xmm1 1839 leal 32(%edx),%edx 1840 xorps %xmm0,%xmm2 1841.L075enc1_loop_15: 1842.byte 102,15,56,220,209 1843 decl %ecx 1844 movups (%edx),%xmm1 1845 leal 16(%edx),%edx 1846 jnz .L075enc1_loop_15 1847.byte 102,15,56,221,209 1848 xorps %xmm7,%xmm2 1849 movdqa %xmm7,%xmm0 1850 movdqa %xmm6,%xmm1 1851 movups %xmm2,-16(%edi,%esi,1) 1852 movl 240(%eax),%ecx 1853 movl %eax,%edx 1854 movl 124(%esp),%eax 1855.L074odd: 1856 shll $4,%ecx 1857 movl $16,%edi 1858 subl %ecx,%edi 1859 movl %edx,112(%esp) 1860 leal 32(%edx,%ecx,1),%edx 1861 movl %edi,116(%esp) 1862 cmpl %eax,%esi 1863 ja .L076short 1864 jmp .L077grandloop 1865.align 32 1866.L077grandloop: 1867 leal 1(%ebp),%ecx 1868 leal 3(%ebp),%eax 1869 leal 5(%ebp),%edi 1870 addl $6,%ebp 1871 bsfl %ecx,%ecx 1872 bsfl %eax,%eax 1873 bsfl %edi,%edi 1874 shll $4,%ecx 1875 shll $4,%eax 1876 shll $4,%edi 1877 movdqu (%ebx),%xmm2 1878 movdqu (%ebx,%ecx,1),%xmm3 1879 movl 116(%esp),%ecx 1880 movdqa %xmm2,%xmm4 1881 movdqu (%ebx,%eax,1),%xmm5 1882 movdqa %xmm2,%xmm6 1883 movdqu (%ebx,%edi,1),%xmm7 1884 pxor %xmm0,%xmm2 1885 pxor %xmm2,%xmm3 1886 movdqa %xmm2,(%esp) 1887 pxor %xmm3,%xmm4 1888 movdqa %xmm3,16(%esp) 1889 pxor %xmm4,%xmm5 1890 movdqa %xmm4,32(%esp) 1891 pxor %xmm5,%xmm6 1892 movdqa %xmm5,48(%esp) 1893 pxor %xmm6,%xmm7 1894 movdqa %xmm6,64(%esp) 1895 movdqa %xmm7,80(%esp) 1896 movups -48(%edx,%ecx,1),%xmm0 1897 movdqu (%esi),%xmm2 1898 movdqu 16(%esi),%xmm3 1899 movdqu 32(%esi),%xmm4 1900 movdqu 48(%esi),%xmm5 1901 movdqu 64(%esi),%xmm6 1902 movdqu 80(%esi),%xmm7 1903 leal 96(%esi),%esi 1904 pxor %xmm2,%xmm1 1905 pxor %xmm0,%xmm2 1906 pxor %xmm3,%xmm1 1907 pxor %xmm0,%xmm3 1908 pxor %xmm4,%xmm1 1909 pxor %xmm0,%xmm4 1910 pxor %xmm5,%xmm1 1911 pxor %xmm0,%xmm5 1912 pxor %xmm6,%xmm1 1913 pxor %xmm0,%xmm6 1914 pxor %xmm7,%xmm1 1915 pxor %xmm0,%xmm7 1916 movdqa %xmm1,96(%esp) 1917 movups -32(%edx,%ecx,1),%xmm1 1918 pxor (%esp),%xmm2 1919 pxor 16(%esp),%xmm3 1920 pxor 32(%esp),%xmm4 1921 pxor 48(%esp),%xmm5 1922 pxor 64(%esp),%xmm6 1923 pxor 80(%esp),%xmm7 1924 movups -16(%edx,%ecx,1),%xmm0 1925.byte 102,15,56,220,209 1926.byte 102,15,56,220,217 1927.byte 102,15,56,220,225 1928.byte 102,15,56,220,233 1929.byte 102,15,56,220,241 1930.byte 102,15,56,220,249 1931 movl 120(%esp),%edi 1932 movl 124(%esp),%eax 1933 call .L_aesni_encrypt6_enter 1934 movdqa 80(%esp),%xmm0 1935 pxor (%esp),%xmm2 1936 pxor 16(%esp),%xmm3 1937 pxor 32(%esp),%xmm4 1938 pxor 48(%esp),%xmm5 1939 pxor 64(%esp),%xmm6 1940 pxor %xmm0,%xmm7 1941 movdqa 96(%esp),%xmm1 1942 movdqu %xmm2,-96(%edi,%esi,1) 1943 movdqu %xmm3,-80(%edi,%esi,1) 1944 movdqu %xmm4,-64(%edi,%esi,1) 1945 movdqu %xmm5,-48(%edi,%esi,1) 1946 movdqu %xmm6,-32(%edi,%esi,1) 1947 movdqu %xmm7,-16(%edi,%esi,1) 1948 cmpl %eax,%esi 1949 jb .L077grandloop 1950.L076short: 1951 addl $96,%eax 1952 subl %esi,%eax 1953 jz .L078done 1954 cmpl $32,%eax 1955 jb .L079one 1956 je .L080two 1957 cmpl $64,%eax 1958 jb .L081three 1959 je .L082four 1960 leal 1(%ebp),%ecx 1961 leal 3(%ebp),%eax 1962 bsfl %ecx,%ecx 1963 bsfl %eax,%eax 1964 shll $4,%ecx 1965 shll $4,%eax 1966 movdqu (%ebx),%xmm2 1967 movdqu (%ebx,%ecx,1),%xmm3 1968 movl 116(%esp),%ecx 1969 movdqa %xmm2,%xmm4 1970 movdqu (%ebx,%eax,1),%xmm5 1971 movdqa %xmm2,%xmm6 1972 pxor %xmm0,%xmm2 1973 pxor %xmm2,%xmm3 1974 movdqa %xmm2,(%esp) 1975 pxor %xmm3,%xmm4 1976 movdqa %xmm3,16(%esp) 1977 pxor %xmm4,%xmm5 1978 movdqa %xmm4,32(%esp) 1979 pxor %xmm5,%xmm6 1980 movdqa %xmm5,48(%esp) 1981 pxor %xmm6,%xmm7 1982 movdqa %xmm6,64(%esp) 1983 movups -48(%edx,%ecx,1),%xmm0 1984 movdqu (%esi),%xmm2 1985 movdqu 16(%esi),%xmm3 1986 movdqu 32(%esi),%xmm4 1987 movdqu 48(%esi),%xmm5 1988 movdqu 64(%esi),%xmm6 1989 pxor %xmm7,%xmm7 1990 pxor %xmm2,%xmm1 1991 pxor %xmm0,%xmm2 1992 pxor %xmm3,%xmm1 1993 pxor %xmm0,%xmm3 1994 pxor %xmm4,%xmm1 1995 pxor %xmm0,%xmm4 1996 pxor %xmm5,%xmm1 1997 pxor %xmm0,%xmm5 1998 pxor %xmm6,%xmm1 1999 pxor %xmm0,%xmm6 2000 movdqa %xmm1,96(%esp) 2001 movups -32(%edx,%ecx,1),%xmm1 2002 pxor (%esp),%xmm2 2003 pxor 16(%esp),%xmm3 2004 pxor 32(%esp),%xmm4 2005 pxor 48(%esp),%xmm5 2006 pxor 64(%esp),%xmm6 2007 movups -16(%edx,%ecx,1),%xmm0 2008.byte 102,15,56,220,209 2009.byte 102,15,56,220,217 2010.byte 102,15,56,220,225 2011.byte 102,15,56,220,233 2012.byte 102,15,56,220,241 2013.byte 102,15,56,220,249 2014 movl 120(%esp),%edi 2015 call .L_aesni_encrypt6_enter 2016 movdqa 64(%esp),%xmm0 2017 pxor (%esp),%xmm2 2018 pxor 16(%esp),%xmm3 2019 pxor 32(%esp),%xmm4 2020 pxor 48(%esp),%xmm5 2021 pxor %xmm0,%xmm6 2022 movdqa 96(%esp),%xmm1 2023 movdqu %xmm2,(%edi,%esi,1) 2024 movdqu %xmm3,16(%edi,%esi,1) 2025 movdqu %xmm4,32(%edi,%esi,1) 2026 movdqu %xmm5,48(%edi,%esi,1) 2027 movdqu %xmm6,64(%edi,%esi,1) 2028 jmp .L078done 2029.align 16 2030.L079one: 2031 movdqu (%ebx),%xmm7 2032 movl 112(%esp),%edx 2033 movdqu (%esi),%xmm2 2034 movl 240(%edx),%ecx 2035 pxor %xmm0,%xmm7 2036 pxor %xmm2,%xmm1 2037 pxor %xmm7,%xmm2 2038 movdqa %xmm1,%xmm6 2039 movl 120(%esp),%edi 2040 movups (%edx),%xmm0 2041 movups 16(%edx),%xmm1 2042 leal 32(%edx),%edx 2043 xorps %xmm0,%xmm2 2044.L083enc1_loop_16: 2045.byte 102,15,56,220,209 2046 decl %ecx 2047 movups (%edx),%xmm1 2048 leal 16(%edx),%edx 2049 jnz .L083enc1_loop_16 2050.byte 102,15,56,221,209 2051 xorps %xmm7,%xmm2 2052 movdqa %xmm7,%xmm0 2053 movdqa %xmm6,%xmm1 2054 movups %xmm2,(%edi,%esi,1) 2055 jmp .L078done 2056.align 16 2057.L080two: 2058 leal 1(%ebp),%ecx 2059 movl 112(%esp),%edx 2060 bsfl %ecx,%ecx 2061 shll $4,%ecx 2062 movdqu (%ebx),%xmm6 2063 movdqu (%ebx,%ecx,1),%xmm7 2064 movdqu (%esi),%xmm2 2065 movdqu 16(%esi),%xmm3 2066 movl 240(%edx),%ecx 2067 pxor %xmm0,%xmm6 2068 pxor %xmm6,%xmm7 2069 pxor %xmm2,%xmm1 2070 pxor %xmm6,%xmm2 2071 pxor %xmm3,%xmm1 2072 pxor %xmm7,%xmm3 2073 movdqa %xmm1,%xmm5 2074 movl 120(%esp),%edi 2075 call _aesni_encrypt2 2076 xorps %xmm6,%xmm2 2077 xorps %xmm7,%xmm3 2078 movdqa %xmm7,%xmm0 2079 movdqa %xmm5,%xmm1 2080 movups %xmm2,(%edi,%esi,1) 2081 movups %xmm3,16(%edi,%esi,1) 2082 jmp .L078done 2083.align 16 2084.L081three: 2085 leal 1(%ebp),%ecx 2086 movl 112(%esp),%edx 2087 bsfl %ecx,%ecx 2088 shll $4,%ecx 2089 movdqu (%ebx),%xmm5 2090 movdqu (%ebx,%ecx,1),%xmm6 2091 movdqa %xmm5,%xmm7 2092 movdqu (%esi),%xmm2 2093 movdqu 16(%esi),%xmm3 2094 movdqu 32(%esi),%xmm4 2095 movl 240(%edx),%ecx 2096 pxor %xmm0,%xmm5 2097 pxor %xmm5,%xmm6 2098 pxor %xmm6,%xmm7 2099 pxor %xmm2,%xmm1 2100 pxor %xmm5,%xmm2 2101 pxor %xmm3,%xmm1 2102 pxor %xmm6,%xmm3 2103 pxor %xmm4,%xmm1 2104 pxor %xmm7,%xmm4 2105 movdqa %xmm1,96(%esp) 2106 movl 120(%esp),%edi 2107 call _aesni_encrypt3 2108 xorps %xmm5,%xmm2 2109 xorps %xmm6,%xmm3 2110 xorps %xmm7,%xmm4 2111 movdqa %xmm7,%xmm0 2112 movdqa 96(%esp),%xmm1 2113 movups %xmm2,(%edi,%esi,1) 2114 movups %xmm3,16(%edi,%esi,1) 2115 movups %xmm4,32(%edi,%esi,1) 2116 jmp .L078done 2117.align 16 2118.L082four: 2119 leal 1(%ebp),%ecx 2120 leal 3(%ebp),%eax 2121 bsfl %ecx,%ecx 2122 bsfl %eax,%eax 2123 movl 112(%esp),%edx 2124 shll $4,%ecx 2125 shll $4,%eax 2126 movdqu (%ebx),%xmm4 2127 movdqu (%ebx,%ecx,1),%xmm5 2128 movdqa %xmm4,%xmm6 2129 movdqu (%ebx,%eax,1),%xmm7 2130 pxor %xmm0,%xmm4 2131 movdqu (%esi),%xmm2 2132 pxor %xmm4,%xmm5 2133 movdqu 16(%esi),%xmm3 2134 pxor %xmm5,%xmm6 2135 movdqa %xmm4,(%esp) 2136 pxor %xmm6,%xmm7 2137 movdqa %xmm5,16(%esp) 2138 movdqu 32(%esi),%xmm4 2139 movdqu 48(%esi),%xmm5 2140 movl 240(%edx),%ecx 2141 pxor %xmm2,%xmm1 2142 pxor (%esp),%xmm2 2143 pxor %xmm3,%xmm1 2144 pxor 16(%esp),%xmm3 2145 pxor %xmm4,%xmm1 2146 pxor %xmm6,%xmm4 2147 pxor %xmm5,%xmm1 2148 pxor %xmm7,%xmm5 2149 movdqa %xmm1,96(%esp) 2150 movl 120(%esp),%edi 2151 call _aesni_encrypt4 2152 xorps (%esp),%xmm2 2153 xorps 16(%esp),%xmm3 2154 xorps %xmm6,%xmm4 2155 movups %xmm2,(%edi,%esi,1) 2156 xorps %xmm7,%xmm5 2157 movups %xmm3,16(%edi,%esi,1) 2158 movdqa %xmm7,%xmm0 2159 movups %xmm4,32(%edi,%esi,1) 2160 movdqa 96(%esp),%xmm1 2161 movups %xmm5,48(%edi,%esi,1) 2162.L078done: 2163 movl 128(%esp),%edx 2164 pxor %xmm2,%xmm2 2165 pxor %xmm3,%xmm3 2166 movdqa %xmm2,(%esp) 2167 pxor %xmm4,%xmm4 2168 movdqa %xmm2,16(%esp) 2169 pxor %xmm5,%xmm5 2170 movdqa %xmm2,32(%esp) 2171 pxor %xmm6,%xmm6 2172 movdqa %xmm2,48(%esp) 2173 pxor %xmm7,%xmm7 2174 movdqa %xmm2,64(%esp) 2175 movdqa %xmm2,80(%esp) 2176 movdqa %xmm2,96(%esp) 2177 leal (%edx),%esp 2178 movl 40(%esp),%ecx 2179 movl 48(%esp),%ebx 2180 movdqu %xmm0,(%ecx) 2181 pxor %xmm0,%xmm0 2182 movdqu %xmm1,(%ebx) 2183 pxor %xmm1,%xmm1 2184 popl %edi 2185 popl %esi 2186 popl %ebx 2187 popl %ebp 2188 ret 2189.size aesni_ocb_encrypt,.-.L_aesni_ocb_encrypt_begin 2190.globl aesni_ocb_decrypt 2191.type aesni_ocb_decrypt,@function 2192.align 16 2193aesni_ocb_decrypt: 2194.L_aesni_ocb_decrypt_begin: 2195 pushl %ebp 2196 pushl %ebx 2197 pushl %esi 2198 pushl %edi 2199 movl 40(%esp),%ecx 2200 movl 48(%esp),%ebx 2201 movl 20(%esp),%esi 2202 movl 24(%esp),%edi 2203 movl 28(%esp),%eax 2204 movl 32(%esp),%edx 2205 movdqu (%ecx),%xmm0 2206 movl 36(%esp),%ebp 2207 movdqu (%ebx),%xmm1 2208 movl 44(%esp),%ebx 2209 movl %esp,%ecx 2210 subl $132,%esp 2211 andl $-16,%esp 2212 subl %esi,%edi 2213 shll $4,%eax 2214 leal -96(%esi,%eax,1),%eax 2215 movl %edi,120(%esp) 2216 movl %eax,124(%esp) 2217 movl %ecx,128(%esp) 2218 movl 240(%edx),%ecx 2219 testl $1,%ebp 2220 jnz .L084odd 2221 bsfl %ebp,%eax 2222 addl $1,%ebp 2223 shll $4,%eax 2224 movdqu (%ebx,%eax,1),%xmm7 2225 movl %edx,%eax 2226 movdqu (%esi),%xmm2 2227 leal 16(%esi),%esi 2228 pxor %xmm0,%xmm7 2229 pxor %xmm7,%xmm2 2230 movdqa %xmm1,%xmm6 2231 movups (%edx),%xmm0 2232 movups 16(%edx),%xmm1 2233 leal 32(%edx),%edx 2234 xorps %xmm0,%xmm2 2235.L085dec1_loop_17: 2236.byte 102,15,56,222,209 2237 decl %ecx 2238 movups (%edx),%xmm1 2239 leal 16(%edx),%edx 2240 jnz .L085dec1_loop_17 2241.byte 102,15,56,223,209 2242 xorps %xmm7,%xmm2 2243 movaps %xmm6,%xmm1 2244 movdqa %xmm7,%xmm0 2245 xorps %xmm2,%xmm1 2246 movups %xmm2,-16(%edi,%esi,1) 2247 movl 240(%eax),%ecx 2248 movl %eax,%edx 2249 movl 124(%esp),%eax 2250.L084odd: 2251 shll $4,%ecx 2252 movl $16,%edi 2253 subl %ecx,%edi 2254 movl %edx,112(%esp) 2255 leal 32(%edx,%ecx,1),%edx 2256 movl %edi,116(%esp) 2257 cmpl %eax,%esi 2258 ja .L086short 2259 jmp .L087grandloop 2260.align 32 2261.L087grandloop: 2262 leal 1(%ebp),%ecx 2263 leal 3(%ebp),%eax 2264 leal 5(%ebp),%edi 2265 addl $6,%ebp 2266 bsfl %ecx,%ecx 2267 bsfl %eax,%eax 2268 bsfl %edi,%edi 2269 shll $4,%ecx 2270 shll $4,%eax 2271 shll $4,%edi 2272 movdqu (%ebx),%xmm2 2273 movdqu (%ebx,%ecx,1),%xmm3 2274 movl 116(%esp),%ecx 2275 movdqa %xmm2,%xmm4 2276 movdqu (%ebx,%eax,1),%xmm5 2277 movdqa %xmm2,%xmm6 2278 movdqu (%ebx,%edi,1),%xmm7 2279 pxor %xmm0,%xmm2 2280 pxor %xmm2,%xmm3 2281 movdqa %xmm2,(%esp) 2282 pxor %xmm3,%xmm4 2283 movdqa %xmm3,16(%esp) 2284 pxor %xmm4,%xmm5 2285 movdqa %xmm4,32(%esp) 2286 pxor %xmm5,%xmm6 2287 movdqa %xmm5,48(%esp) 2288 pxor %xmm6,%xmm7 2289 movdqa %xmm6,64(%esp) 2290 movdqa %xmm7,80(%esp) 2291 movups -48(%edx,%ecx,1),%xmm0 2292 movdqu (%esi),%xmm2 2293 movdqu 16(%esi),%xmm3 2294 movdqu 32(%esi),%xmm4 2295 movdqu 48(%esi),%xmm5 2296 movdqu 64(%esi),%xmm6 2297 movdqu 80(%esi),%xmm7 2298 leal 96(%esi),%esi 2299 movdqa %xmm1,96(%esp) 2300 pxor %xmm0,%xmm2 2301 pxor %xmm0,%xmm3 2302 pxor %xmm0,%xmm4 2303 pxor %xmm0,%xmm5 2304 pxor %xmm0,%xmm6 2305 pxor %xmm0,%xmm7 2306 movups -32(%edx,%ecx,1),%xmm1 2307 pxor (%esp),%xmm2 2308 pxor 16(%esp),%xmm3 2309 pxor 32(%esp),%xmm4 2310 pxor 48(%esp),%xmm5 2311 pxor 64(%esp),%xmm6 2312 pxor 80(%esp),%xmm7 2313 movups -16(%edx,%ecx,1),%xmm0 2314.byte 102,15,56,222,209 2315.byte 102,15,56,222,217 2316.byte 102,15,56,222,225 2317.byte 102,15,56,222,233 2318.byte 102,15,56,222,241 2319.byte 102,15,56,222,249 2320 movl 120(%esp),%edi 2321 movl 124(%esp),%eax 2322 call .L_aesni_decrypt6_enter 2323 movdqa 80(%esp),%xmm0 2324 pxor (%esp),%xmm2 2325 movdqa 96(%esp),%xmm1 2326 pxor 16(%esp),%xmm3 2327 pxor 32(%esp),%xmm4 2328 pxor 48(%esp),%xmm5 2329 pxor 64(%esp),%xmm6 2330 pxor %xmm0,%xmm7 2331 pxor %xmm2,%xmm1 2332 movdqu %xmm2,-96(%edi,%esi,1) 2333 pxor %xmm3,%xmm1 2334 movdqu %xmm3,-80(%edi,%esi,1) 2335 pxor %xmm4,%xmm1 2336 movdqu %xmm4,-64(%edi,%esi,1) 2337 pxor %xmm5,%xmm1 2338 movdqu %xmm5,-48(%edi,%esi,1) 2339 pxor %xmm6,%xmm1 2340 movdqu %xmm6,-32(%edi,%esi,1) 2341 pxor %xmm7,%xmm1 2342 movdqu %xmm7,-16(%edi,%esi,1) 2343 cmpl %eax,%esi 2344 jb .L087grandloop 2345.L086short: 2346 addl $96,%eax 2347 subl %esi,%eax 2348 jz .L088done 2349 cmpl $32,%eax 2350 jb .L089one 2351 je .L090two 2352 cmpl $64,%eax 2353 jb .L091three 2354 je .L092four 2355 leal 1(%ebp),%ecx 2356 leal 3(%ebp),%eax 2357 bsfl %ecx,%ecx 2358 bsfl %eax,%eax 2359 shll $4,%ecx 2360 shll $4,%eax 2361 movdqu (%ebx),%xmm2 2362 movdqu (%ebx,%ecx,1),%xmm3 2363 movl 116(%esp),%ecx 2364 movdqa %xmm2,%xmm4 2365 movdqu (%ebx,%eax,1),%xmm5 2366 movdqa %xmm2,%xmm6 2367 pxor %xmm0,%xmm2 2368 pxor %xmm2,%xmm3 2369 movdqa %xmm2,(%esp) 2370 pxor %xmm3,%xmm4 2371 movdqa %xmm3,16(%esp) 2372 pxor %xmm4,%xmm5 2373 movdqa %xmm4,32(%esp) 2374 pxor %xmm5,%xmm6 2375 movdqa %xmm5,48(%esp) 2376 pxor %xmm6,%xmm7 2377 movdqa %xmm6,64(%esp) 2378 movups -48(%edx,%ecx,1),%xmm0 2379 movdqu (%esi),%xmm2 2380 movdqu 16(%esi),%xmm3 2381 movdqu 32(%esi),%xmm4 2382 movdqu 48(%esi),%xmm5 2383 movdqu 64(%esi),%xmm6 2384 pxor %xmm7,%xmm7 2385 movdqa %xmm1,96(%esp) 2386 pxor %xmm0,%xmm2 2387 pxor %xmm0,%xmm3 2388 pxor %xmm0,%xmm4 2389 pxor %xmm0,%xmm5 2390 pxor %xmm0,%xmm6 2391 movups -32(%edx,%ecx,1),%xmm1 2392 pxor (%esp),%xmm2 2393 pxor 16(%esp),%xmm3 2394 pxor 32(%esp),%xmm4 2395 pxor 48(%esp),%xmm5 2396 pxor 64(%esp),%xmm6 2397 movups -16(%edx,%ecx,1),%xmm0 2398.byte 102,15,56,222,209 2399.byte 102,15,56,222,217 2400.byte 102,15,56,222,225 2401.byte 102,15,56,222,233 2402.byte 102,15,56,222,241 2403.byte 102,15,56,222,249 2404 movl 120(%esp),%edi 2405 call .L_aesni_decrypt6_enter 2406 movdqa 64(%esp),%xmm0 2407 pxor (%esp),%xmm2 2408 movdqa 96(%esp),%xmm1 2409 pxor 16(%esp),%xmm3 2410 pxor 32(%esp),%xmm4 2411 pxor 48(%esp),%xmm5 2412 pxor %xmm0,%xmm6 2413 pxor %xmm2,%xmm1 2414 movdqu %xmm2,(%edi,%esi,1) 2415 pxor %xmm3,%xmm1 2416 movdqu %xmm3,16(%edi,%esi,1) 2417 pxor %xmm4,%xmm1 2418 movdqu %xmm4,32(%edi,%esi,1) 2419 pxor %xmm5,%xmm1 2420 movdqu %xmm5,48(%edi,%esi,1) 2421 pxor %xmm6,%xmm1 2422 movdqu %xmm6,64(%edi,%esi,1) 2423 jmp .L088done 2424.align 16 2425.L089one: 2426 movdqu (%ebx),%xmm7 2427 movl 112(%esp),%edx 2428 movdqu (%esi),%xmm2 2429 movl 240(%edx),%ecx 2430 pxor %xmm0,%xmm7 2431 pxor %xmm7,%xmm2 2432 movdqa %xmm1,%xmm6 2433 movl 120(%esp),%edi 2434 movups (%edx),%xmm0 2435 movups 16(%edx),%xmm1 2436 leal 32(%edx),%edx 2437 xorps %xmm0,%xmm2 2438.L093dec1_loop_18: 2439.byte 102,15,56,222,209 2440 decl %ecx 2441 movups (%edx),%xmm1 2442 leal 16(%edx),%edx 2443 jnz .L093dec1_loop_18 2444.byte 102,15,56,223,209 2445 xorps %xmm7,%xmm2 2446 movaps %xmm6,%xmm1 2447 movdqa %xmm7,%xmm0 2448 xorps %xmm2,%xmm1 2449 movups %xmm2,(%edi,%esi,1) 2450 jmp .L088done 2451.align 16 2452.L090two: 2453 leal 1(%ebp),%ecx 2454 movl 112(%esp),%edx 2455 bsfl %ecx,%ecx 2456 shll $4,%ecx 2457 movdqu (%ebx),%xmm6 2458 movdqu (%ebx,%ecx,1),%xmm7 2459 movdqu (%esi),%xmm2 2460 movdqu 16(%esi),%xmm3 2461 movl 240(%edx),%ecx 2462 movdqa %xmm1,%xmm5 2463 pxor %xmm0,%xmm6 2464 pxor %xmm6,%xmm7 2465 pxor %xmm6,%xmm2 2466 pxor %xmm7,%xmm3 2467 movl 120(%esp),%edi 2468 call _aesni_decrypt2 2469 xorps %xmm6,%xmm2 2470 xorps %xmm7,%xmm3 2471 movdqa %xmm7,%xmm0 2472 xorps %xmm2,%xmm5 2473 movups %xmm2,(%edi,%esi,1) 2474 xorps %xmm3,%xmm5 2475 movups %xmm3,16(%edi,%esi,1) 2476 movaps %xmm5,%xmm1 2477 jmp .L088done 2478.align 16 2479.L091three: 2480 leal 1(%ebp),%ecx 2481 movl 112(%esp),%edx 2482 bsfl %ecx,%ecx 2483 shll $4,%ecx 2484 movdqu (%ebx),%xmm5 2485 movdqu (%ebx,%ecx,1),%xmm6 2486 movdqa %xmm5,%xmm7 2487 movdqu (%esi),%xmm2 2488 movdqu 16(%esi),%xmm3 2489 movdqu 32(%esi),%xmm4 2490 movl 240(%edx),%ecx 2491 movdqa %xmm1,96(%esp) 2492 pxor %xmm0,%xmm5 2493 pxor %xmm5,%xmm6 2494 pxor %xmm6,%xmm7 2495 pxor %xmm5,%xmm2 2496 pxor %xmm6,%xmm3 2497 pxor %xmm7,%xmm4 2498 movl 120(%esp),%edi 2499 call _aesni_decrypt3 2500 movdqa 96(%esp),%xmm1 2501 xorps %xmm5,%xmm2 2502 xorps %xmm6,%xmm3 2503 xorps %xmm7,%xmm4 2504 movups %xmm2,(%edi,%esi,1) 2505 pxor %xmm2,%xmm1 2506 movdqa %xmm7,%xmm0 2507 movups %xmm3,16(%edi,%esi,1) 2508 pxor %xmm3,%xmm1 2509 movups %xmm4,32(%edi,%esi,1) 2510 pxor %xmm4,%xmm1 2511 jmp .L088done 2512.align 16 2513.L092four: 2514 leal 1(%ebp),%ecx 2515 leal 3(%ebp),%eax 2516 bsfl %ecx,%ecx 2517 bsfl %eax,%eax 2518 movl 112(%esp),%edx 2519 shll $4,%ecx 2520 shll $4,%eax 2521 movdqu (%ebx),%xmm4 2522 movdqu (%ebx,%ecx,1),%xmm5 2523 movdqa %xmm4,%xmm6 2524 movdqu (%ebx,%eax,1),%xmm7 2525 pxor %xmm0,%xmm4 2526 movdqu (%esi),%xmm2 2527 pxor %xmm4,%xmm5 2528 movdqu 16(%esi),%xmm3 2529 pxor %xmm5,%xmm6 2530 movdqa %xmm4,(%esp) 2531 pxor %xmm6,%xmm7 2532 movdqa %xmm5,16(%esp) 2533 movdqu 32(%esi),%xmm4 2534 movdqu 48(%esi),%xmm5 2535 movl 240(%edx),%ecx 2536 movdqa %xmm1,96(%esp) 2537 pxor (%esp),%xmm2 2538 pxor 16(%esp),%xmm3 2539 pxor %xmm6,%xmm4 2540 pxor %xmm7,%xmm5 2541 movl 120(%esp),%edi 2542 call _aesni_decrypt4 2543 movdqa 96(%esp),%xmm1 2544 xorps (%esp),%xmm2 2545 xorps 16(%esp),%xmm3 2546 xorps %xmm6,%xmm4 2547 movups %xmm2,(%edi,%esi,1) 2548 pxor %xmm2,%xmm1 2549 xorps %xmm7,%xmm5 2550 movups %xmm3,16(%edi,%esi,1) 2551 pxor %xmm3,%xmm1 2552 movdqa %xmm7,%xmm0 2553 movups %xmm4,32(%edi,%esi,1) 2554 pxor %xmm4,%xmm1 2555 movups %xmm5,48(%edi,%esi,1) 2556 pxor %xmm5,%xmm1 2557.L088done: 2558 movl 128(%esp),%edx 2559 pxor %xmm2,%xmm2 2560 pxor %xmm3,%xmm3 2561 movdqa %xmm2,(%esp) 2562 pxor %xmm4,%xmm4 2563 movdqa %xmm2,16(%esp) 2564 pxor %xmm5,%xmm5 2565 movdqa %xmm2,32(%esp) 2566 pxor %xmm6,%xmm6 2567 movdqa %xmm2,48(%esp) 2568 pxor %xmm7,%xmm7 2569 movdqa %xmm2,64(%esp) 2570 movdqa %xmm2,80(%esp) 2571 movdqa %xmm2,96(%esp) 2572 leal (%edx),%esp 2573 movl 40(%esp),%ecx 2574 movl 48(%esp),%ebx 2575 movdqu %xmm0,(%ecx) 2576 pxor %xmm0,%xmm0 2577 movdqu %xmm1,(%ebx) 2578 pxor %xmm1,%xmm1 2579 popl %edi 2580 popl %esi 2581 popl %ebx 2582 popl %ebp 2583 ret 2584.size aesni_ocb_decrypt,.-.L_aesni_ocb_decrypt_begin 2585.globl aesni_cbc_encrypt 2586.type aesni_cbc_encrypt,@function 2587.align 16 2588aesni_cbc_encrypt: 2589.L_aesni_cbc_encrypt_begin: 2590 pushl %ebp 2591 pushl %ebx 2592 pushl %esi 2593 pushl %edi 2594 movl 20(%esp),%esi 2595 movl %esp,%ebx 2596 movl 24(%esp),%edi 2597 subl $24,%ebx 2598 movl 28(%esp),%eax 2599 andl $-16,%ebx 2600 movl 32(%esp),%edx 2601 movl 36(%esp),%ebp 2602 testl %eax,%eax 2603 jz .L094cbc_abort 2604 cmpl $0,40(%esp) 2605 xchgl %esp,%ebx 2606 movups (%ebp),%xmm7 2607 movl 240(%edx),%ecx 2608 movl %edx,%ebp 2609 movl %ebx,16(%esp) 2610 movl %ecx,%ebx 2611 je .L095cbc_decrypt 2612 movaps %xmm7,%xmm2 2613 cmpl $16,%eax 2614 jb .L096cbc_enc_tail 2615 subl $16,%eax 2616 jmp .L097cbc_enc_loop 2617.align 16 2618.L097cbc_enc_loop: 2619 movups (%esi),%xmm7 2620 leal 16(%esi),%esi 2621 movups (%edx),%xmm0 2622 movups 16(%edx),%xmm1 2623 xorps %xmm0,%xmm7 2624 leal 32(%edx),%edx 2625 xorps %xmm7,%xmm2 2626.L098enc1_loop_19: 2627.byte 102,15,56,220,209 2628 decl %ecx 2629 movups (%edx),%xmm1 2630 leal 16(%edx),%edx 2631 jnz .L098enc1_loop_19 2632.byte 102,15,56,221,209 2633 movl %ebx,%ecx 2634 movl %ebp,%edx 2635 movups %xmm2,(%edi) 2636 leal 16(%edi),%edi 2637 subl $16,%eax 2638 jnc .L097cbc_enc_loop 2639 addl $16,%eax 2640 jnz .L096cbc_enc_tail 2641 movaps %xmm2,%xmm7 2642 pxor %xmm2,%xmm2 2643 jmp .L099cbc_ret 2644.L096cbc_enc_tail: 2645 movl %eax,%ecx 2646.long 2767451785 2647 movl $16,%ecx 2648 subl %eax,%ecx 2649 xorl %eax,%eax 2650.long 2868115081 2651 leal -16(%edi),%edi 2652 movl %ebx,%ecx 2653 movl %edi,%esi 2654 movl %ebp,%edx 2655 jmp .L097cbc_enc_loop 2656.align 16 2657.L095cbc_decrypt: 2658 cmpl $80,%eax 2659 jbe .L100cbc_dec_tail 2660 movaps %xmm7,(%esp) 2661 subl $80,%eax 2662 jmp .L101cbc_dec_loop6_enter 2663.align 16 2664.L102cbc_dec_loop6: 2665 movaps %xmm0,(%esp) 2666 movups %xmm7,(%edi) 2667 leal 16(%edi),%edi 2668.L101cbc_dec_loop6_enter: 2669 movdqu (%esi),%xmm2 2670 movdqu 16(%esi),%xmm3 2671 movdqu 32(%esi),%xmm4 2672 movdqu 48(%esi),%xmm5 2673 movdqu 64(%esi),%xmm6 2674 movdqu 80(%esi),%xmm7 2675 call _aesni_decrypt6 2676 movups (%esi),%xmm1 2677 movups 16(%esi),%xmm0 2678 xorps (%esp),%xmm2 2679 xorps %xmm1,%xmm3 2680 movups 32(%esi),%xmm1 2681 xorps %xmm0,%xmm4 2682 movups 48(%esi),%xmm0 2683 xorps %xmm1,%xmm5 2684 movups 64(%esi),%xmm1 2685 xorps %xmm0,%xmm6 2686 movups 80(%esi),%xmm0 2687 xorps %xmm1,%xmm7 2688 movups %xmm2,(%edi) 2689 movups %xmm3,16(%edi) 2690 leal 96(%esi),%esi 2691 movups %xmm4,32(%edi) 2692 movl %ebx,%ecx 2693 movups %xmm5,48(%edi) 2694 movl %ebp,%edx 2695 movups %xmm6,64(%edi) 2696 leal 80(%edi),%edi 2697 subl $96,%eax 2698 ja .L102cbc_dec_loop6 2699 movaps %xmm7,%xmm2 2700 movaps %xmm0,%xmm7 2701 addl $80,%eax 2702 jle .L103cbc_dec_clear_tail_collected 2703 movups %xmm2,(%edi) 2704 leal 16(%edi),%edi 2705.L100cbc_dec_tail: 2706 movups (%esi),%xmm2 2707 movaps %xmm2,%xmm6 2708 cmpl $16,%eax 2709 jbe .L104cbc_dec_one 2710 movups 16(%esi),%xmm3 2711 movaps %xmm3,%xmm5 2712 cmpl $32,%eax 2713 jbe .L105cbc_dec_two 2714 movups 32(%esi),%xmm4 2715 cmpl $48,%eax 2716 jbe .L106cbc_dec_three 2717 movups 48(%esi),%xmm5 2718 cmpl $64,%eax 2719 jbe .L107cbc_dec_four 2720 movups 64(%esi),%xmm6 2721 movaps %xmm7,(%esp) 2722 movups (%esi),%xmm2 2723 xorps %xmm7,%xmm7 2724 call _aesni_decrypt6 2725 movups (%esi),%xmm1 2726 movups 16(%esi),%xmm0 2727 xorps (%esp),%xmm2 2728 xorps %xmm1,%xmm3 2729 movups 32(%esi),%xmm1 2730 xorps %xmm0,%xmm4 2731 movups 48(%esi),%xmm0 2732 xorps %xmm1,%xmm5 2733 movups 64(%esi),%xmm7 2734 xorps %xmm0,%xmm6 2735 movups %xmm2,(%edi) 2736 movups %xmm3,16(%edi) 2737 pxor %xmm3,%xmm3 2738 movups %xmm4,32(%edi) 2739 pxor %xmm4,%xmm4 2740 movups %xmm5,48(%edi) 2741 pxor %xmm5,%xmm5 2742 leal 64(%edi),%edi 2743 movaps %xmm6,%xmm2 2744 pxor %xmm6,%xmm6 2745 subl $80,%eax 2746 jmp .L108cbc_dec_tail_collected 2747.align 16 2748.L104cbc_dec_one: 2749 movups (%edx),%xmm0 2750 movups 16(%edx),%xmm1 2751 leal 32(%edx),%edx 2752 xorps %xmm0,%xmm2 2753.L109dec1_loop_20: 2754.byte 102,15,56,222,209 2755 decl %ecx 2756 movups (%edx),%xmm1 2757 leal 16(%edx),%edx 2758 jnz .L109dec1_loop_20 2759.byte 102,15,56,223,209 2760 xorps %xmm7,%xmm2 2761 movaps %xmm6,%xmm7 2762 subl $16,%eax 2763 jmp .L108cbc_dec_tail_collected 2764.align 16 2765.L105cbc_dec_two: 2766 call _aesni_decrypt2 2767 xorps %xmm7,%xmm2 2768 xorps %xmm6,%xmm3 2769 movups %xmm2,(%edi) 2770 movaps %xmm3,%xmm2 2771 pxor %xmm3,%xmm3 2772 leal 16(%edi),%edi 2773 movaps %xmm5,%xmm7 2774 subl $32,%eax 2775 jmp .L108cbc_dec_tail_collected 2776.align 16 2777.L106cbc_dec_three: 2778 call _aesni_decrypt3 2779 xorps %xmm7,%xmm2 2780 xorps %xmm6,%xmm3 2781 xorps %xmm5,%xmm4 2782 movups %xmm2,(%edi) 2783 movaps %xmm4,%xmm2 2784 pxor %xmm4,%xmm4 2785 movups %xmm3,16(%edi) 2786 pxor %xmm3,%xmm3 2787 leal 32(%edi),%edi 2788 movups 32(%esi),%xmm7 2789 subl $48,%eax 2790 jmp .L108cbc_dec_tail_collected 2791.align 16 2792.L107cbc_dec_four: 2793 call _aesni_decrypt4 2794 movups 16(%esi),%xmm1 2795 movups 32(%esi),%xmm0 2796 xorps %xmm7,%xmm2 2797 movups 48(%esi),%xmm7 2798 xorps %xmm6,%xmm3 2799 movups %xmm2,(%edi) 2800 xorps %xmm1,%xmm4 2801 movups %xmm3,16(%edi) 2802 pxor %xmm3,%xmm3 2803 xorps %xmm0,%xmm5 2804 movups %xmm4,32(%edi) 2805 pxor %xmm4,%xmm4 2806 leal 48(%edi),%edi 2807 movaps %xmm5,%xmm2 2808 pxor %xmm5,%xmm5 2809 subl $64,%eax 2810 jmp .L108cbc_dec_tail_collected 2811.align 16 2812.L103cbc_dec_clear_tail_collected: 2813 pxor %xmm3,%xmm3 2814 pxor %xmm4,%xmm4 2815 pxor %xmm5,%xmm5 2816 pxor %xmm6,%xmm6 2817.L108cbc_dec_tail_collected: 2818 andl $15,%eax 2819 jnz .L110cbc_dec_tail_partial 2820 movups %xmm2,(%edi) 2821 pxor %xmm0,%xmm0 2822 jmp .L099cbc_ret 2823.align 16 2824.L110cbc_dec_tail_partial: 2825 movaps %xmm2,(%esp) 2826 pxor %xmm0,%xmm0 2827 movl $16,%ecx 2828 movl %esp,%esi 2829 subl %eax,%ecx 2830.long 2767451785 2831 movdqa %xmm2,(%esp) 2832.L099cbc_ret: 2833 movl 16(%esp),%esp 2834 movl 36(%esp),%ebp 2835 pxor %xmm2,%xmm2 2836 pxor %xmm1,%xmm1 2837 movups %xmm7,(%ebp) 2838 pxor %xmm7,%xmm7 2839.L094cbc_abort: 2840 popl %edi 2841 popl %esi 2842 popl %ebx 2843 popl %ebp 2844 ret 2845.size aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin 2846.type _aesni_set_encrypt_key,@function 2847.align 16 2848_aesni_set_encrypt_key: 2849 pushl %ebp 2850 pushl %ebx 2851 testl %eax,%eax 2852 jz .L111bad_pointer 2853 testl %edx,%edx 2854 jz .L111bad_pointer 2855 call .L112pic 2856.L112pic: 2857 popl %ebx 2858 leal .Lkey_const-.L112pic(%ebx),%ebx 2859 leal OPENSSL_ia32cap_P-.Lkey_const(%ebx),%ebp 2860 movups (%eax),%xmm0 2861 xorps %xmm4,%xmm4 2862 movl 4(%ebp),%ebp 2863 leal 16(%edx),%edx 2864 andl $268437504,%ebp 2865 cmpl $256,%ecx 2866 je .L11314rounds 2867 cmpl $192,%ecx 2868 je .L11412rounds 2869 cmpl $128,%ecx 2870 jne .L115bad_keybits 2871.align 16 2872.L11610rounds: 2873 cmpl $268435456,%ebp 2874 je .L11710rounds_alt 2875 movl $9,%ecx 2876 movups %xmm0,-16(%edx) 2877.byte 102,15,58,223,200,1 2878 call .L118key_128_cold 2879.byte 102,15,58,223,200,2 2880 call .L119key_128 2881.byte 102,15,58,223,200,4 2882 call .L119key_128 2883.byte 102,15,58,223,200,8 2884 call .L119key_128 2885.byte 102,15,58,223,200,16 2886 call .L119key_128 2887.byte 102,15,58,223,200,32 2888 call .L119key_128 2889.byte 102,15,58,223,200,64 2890 call .L119key_128 2891.byte 102,15,58,223,200,128 2892 call .L119key_128 2893.byte 102,15,58,223,200,27 2894 call .L119key_128 2895.byte 102,15,58,223,200,54 2896 call .L119key_128 2897 movups %xmm0,(%edx) 2898 movl %ecx,80(%edx) 2899 jmp .L120good_key 2900.align 16 2901.L119key_128: 2902 movups %xmm0,(%edx) 2903 leal 16(%edx),%edx 2904.L118key_128_cold: 2905 shufps $16,%xmm0,%xmm4 2906 xorps %xmm4,%xmm0 2907 shufps $140,%xmm0,%xmm4 2908 xorps %xmm4,%xmm0 2909 shufps $255,%xmm1,%xmm1 2910 xorps %xmm1,%xmm0 2911 ret 2912.align 16 2913.L11710rounds_alt: 2914 movdqa (%ebx),%xmm5 2915 movl $8,%ecx 2916 movdqa 32(%ebx),%xmm4 2917 movdqa %xmm0,%xmm2 2918 movdqu %xmm0,-16(%edx) 2919.L121loop_key128: 2920.byte 102,15,56,0,197 2921.byte 102,15,56,221,196 2922 pslld $1,%xmm4 2923 leal 16(%edx),%edx 2924 movdqa %xmm2,%xmm3 2925 pslldq $4,%xmm2 2926 pxor %xmm2,%xmm3 2927 pslldq $4,%xmm2 2928 pxor %xmm2,%xmm3 2929 pslldq $4,%xmm2 2930 pxor %xmm3,%xmm2 2931 pxor %xmm2,%xmm0 2932 movdqu %xmm0,-16(%edx) 2933 movdqa %xmm0,%xmm2 2934 decl %ecx 2935 jnz .L121loop_key128 2936 movdqa 48(%ebx),%xmm4 2937.byte 102,15,56,0,197 2938.byte 102,15,56,221,196 2939 pslld $1,%xmm4 2940 movdqa %xmm2,%xmm3 2941 pslldq $4,%xmm2 2942 pxor %xmm2,%xmm3 2943 pslldq $4,%xmm2 2944 pxor %xmm2,%xmm3 2945 pslldq $4,%xmm2 2946 pxor %xmm3,%xmm2 2947 pxor %xmm2,%xmm0 2948 movdqu %xmm0,(%edx) 2949 movdqa %xmm0,%xmm2 2950.byte 102,15,56,0,197 2951.byte 102,15,56,221,196 2952 movdqa %xmm2,%xmm3 2953 pslldq $4,%xmm2 2954 pxor %xmm2,%xmm3 2955 pslldq $4,%xmm2 2956 pxor %xmm2,%xmm3 2957 pslldq $4,%xmm2 2958 pxor %xmm3,%xmm2 2959 pxor %xmm2,%xmm0 2960 movdqu %xmm0,16(%edx) 2961 movl $9,%ecx 2962 movl %ecx,96(%edx) 2963 jmp .L120good_key 2964.align 16 2965.L11412rounds: 2966 movq 16(%eax),%xmm2 2967 cmpl $268435456,%ebp 2968 je .L12212rounds_alt 2969 movl $11,%ecx 2970 movups %xmm0,-16(%edx) 2971.byte 102,15,58,223,202,1 2972 call .L123key_192a_cold 2973.byte 102,15,58,223,202,2 2974 call .L124key_192b 2975.byte 102,15,58,223,202,4 2976 call .L125key_192a 2977.byte 102,15,58,223,202,8 2978 call .L124key_192b 2979.byte 102,15,58,223,202,16 2980 call .L125key_192a 2981.byte 102,15,58,223,202,32 2982 call .L124key_192b 2983.byte 102,15,58,223,202,64 2984 call .L125key_192a 2985.byte 102,15,58,223,202,128 2986 call .L124key_192b 2987 movups %xmm0,(%edx) 2988 movl %ecx,48(%edx) 2989 jmp .L120good_key 2990.align 16 2991.L125key_192a: 2992 movups %xmm0,(%edx) 2993 leal 16(%edx),%edx 2994.align 16 2995.L123key_192a_cold: 2996 movaps %xmm2,%xmm5 2997.L126key_192b_warm: 2998 shufps $16,%xmm0,%xmm4 2999 movdqa %xmm2,%xmm3 3000 xorps %xmm4,%xmm0 3001 shufps $140,%xmm0,%xmm4 3002 pslldq $4,%xmm3 3003 xorps %xmm4,%xmm0 3004 pshufd $85,%xmm1,%xmm1 3005 pxor %xmm3,%xmm2 3006 pxor %xmm1,%xmm0 3007 pshufd $255,%xmm0,%xmm3 3008 pxor %xmm3,%xmm2 3009 ret 3010.align 16 3011.L124key_192b: 3012 movaps %xmm0,%xmm3 3013 shufps $68,%xmm0,%xmm5 3014 movups %xmm5,(%edx) 3015 shufps $78,%xmm2,%xmm3 3016 movups %xmm3,16(%edx) 3017 leal 32(%edx),%edx 3018 jmp .L126key_192b_warm 3019.align 16 3020.L12212rounds_alt: 3021 movdqa 16(%ebx),%xmm5 3022 movdqa 32(%ebx),%xmm4 3023 movl $8,%ecx 3024 movdqu %xmm0,-16(%edx) 3025.L127loop_key192: 3026 movq %xmm2,(%edx) 3027 movdqa %xmm2,%xmm1 3028.byte 102,15,56,0,213 3029.byte 102,15,56,221,212 3030 pslld $1,%xmm4 3031 leal 24(%edx),%edx 3032 movdqa %xmm0,%xmm3 3033 pslldq $4,%xmm0 3034 pxor %xmm0,%xmm3 3035 pslldq $4,%xmm0 3036 pxor %xmm0,%xmm3 3037 pslldq $4,%xmm0 3038 pxor %xmm3,%xmm0 3039 pshufd $255,%xmm0,%xmm3 3040 pxor %xmm1,%xmm3 3041 pslldq $4,%xmm1 3042 pxor %xmm1,%xmm3 3043 pxor %xmm2,%xmm0 3044 pxor %xmm3,%xmm2 3045 movdqu %xmm0,-16(%edx) 3046 decl %ecx 3047 jnz .L127loop_key192 3048 movl $11,%ecx 3049 movl %ecx,32(%edx) 3050 jmp .L120good_key 3051.align 16 3052.L11314rounds: 3053 movups 16(%eax),%xmm2 3054 leal 16(%edx),%edx 3055 cmpl $268435456,%ebp 3056 je .L12814rounds_alt 3057 movl $13,%ecx 3058 movups %xmm0,-32(%edx) 3059 movups %xmm2,-16(%edx) 3060.byte 102,15,58,223,202,1 3061 call .L129key_256a_cold 3062.byte 102,15,58,223,200,1 3063 call .L130key_256b 3064.byte 102,15,58,223,202,2 3065 call .L131key_256a 3066.byte 102,15,58,223,200,2 3067 call .L130key_256b 3068.byte 102,15,58,223,202,4 3069 call .L131key_256a 3070.byte 102,15,58,223,200,4 3071 call .L130key_256b 3072.byte 102,15,58,223,202,8 3073 call .L131key_256a 3074.byte 102,15,58,223,200,8 3075 call .L130key_256b 3076.byte 102,15,58,223,202,16 3077 call .L131key_256a 3078.byte 102,15,58,223,200,16 3079 call .L130key_256b 3080.byte 102,15,58,223,202,32 3081 call .L131key_256a 3082.byte 102,15,58,223,200,32 3083 call .L130key_256b 3084.byte 102,15,58,223,202,64 3085 call .L131key_256a 3086 movups %xmm0,(%edx) 3087 movl %ecx,16(%edx) 3088 xorl %eax,%eax 3089 jmp .L120good_key 3090.align 16 3091.L131key_256a: 3092 movups %xmm2,(%edx) 3093 leal 16(%edx),%edx 3094.L129key_256a_cold: 3095 shufps $16,%xmm0,%xmm4 3096 xorps %xmm4,%xmm0 3097 shufps $140,%xmm0,%xmm4 3098 xorps %xmm4,%xmm0 3099 shufps $255,%xmm1,%xmm1 3100 xorps %xmm1,%xmm0 3101 ret 3102.align 16 3103.L130key_256b: 3104 movups %xmm0,(%edx) 3105 leal 16(%edx),%edx 3106 shufps $16,%xmm2,%xmm4 3107 xorps %xmm4,%xmm2 3108 shufps $140,%xmm2,%xmm4 3109 xorps %xmm4,%xmm2 3110 shufps $170,%xmm1,%xmm1 3111 xorps %xmm1,%xmm2 3112 ret 3113.align 16 3114.L12814rounds_alt: 3115 movdqa (%ebx),%xmm5 3116 movdqa 32(%ebx),%xmm4 3117 movl $7,%ecx 3118 movdqu %xmm0,-32(%edx) 3119 movdqa %xmm2,%xmm1 3120 movdqu %xmm2,-16(%edx) 3121.L132loop_key256: 3122.byte 102,15,56,0,213 3123.byte 102,15,56,221,212 3124 movdqa %xmm0,%xmm3 3125 pslldq $4,%xmm0 3126 pxor %xmm0,%xmm3 3127 pslldq $4,%xmm0 3128 pxor %xmm0,%xmm3 3129 pslldq $4,%xmm0 3130 pxor %xmm3,%xmm0 3131 pslld $1,%xmm4 3132 pxor %xmm2,%xmm0 3133 movdqu %xmm0,(%edx) 3134 decl %ecx 3135 jz .L133done_key256 3136 pshufd $255,%xmm0,%xmm2 3137 pxor %xmm3,%xmm3 3138.byte 102,15,56,221,211 3139 movdqa %xmm1,%xmm3 3140 pslldq $4,%xmm1 3141 pxor %xmm1,%xmm3 3142 pslldq $4,%xmm1 3143 pxor %xmm1,%xmm3 3144 pslldq $4,%xmm1 3145 pxor %xmm3,%xmm1 3146 pxor %xmm1,%xmm2 3147 movdqu %xmm2,16(%edx) 3148 leal 32(%edx),%edx 3149 movdqa %xmm2,%xmm1 3150 jmp .L132loop_key256 3151.L133done_key256: 3152 movl $13,%ecx 3153 movl %ecx,16(%edx) 3154.L120good_key: 3155 pxor %xmm0,%xmm0 3156 pxor %xmm1,%xmm1 3157 pxor %xmm2,%xmm2 3158 pxor %xmm3,%xmm3 3159 pxor %xmm4,%xmm4 3160 pxor %xmm5,%xmm5 3161 xorl %eax,%eax 3162 popl %ebx 3163 popl %ebp 3164 ret 3165.align 4 3166.L111bad_pointer: 3167 movl $-1,%eax 3168 popl %ebx 3169 popl %ebp 3170 ret 3171.align 4 3172.L115bad_keybits: 3173 pxor %xmm0,%xmm0 3174 movl $-2,%eax 3175 popl %ebx 3176 popl %ebp 3177 ret 3178.size _aesni_set_encrypt_key,.-_aesni_set_encrypt_key 3179.globl aesni_set_encrypt_key 3180.type aesni_set_encrypt_key,@function 3181.align 16 3182aesni_set_encrypt_key: 3183.L_aesni_set_encrypt_key_begin: 3184 movl 4(%esp),%eax 3185 movl 8(%esp),%ecx 3186 movl 12(%esp),%edx 3187 call _aesni_set_encrypt_key 3188 ret 3189.size aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin 3190.globl aesni_set_decrypt_key 3191.type aesni_set_decrypt_key,@function 3192.align 16 3193aesni_set_decrypt_key: 3194.L_aesni_set_decrypt_key_begin: 3195 movl 4(%esp),%eax 3196 movl 8(%esp),%ecx 3197 movl 12(%esp),%edx 3198 call _aesni_set_encrypt_key 3199 movl 12(%esp),%edx 3200 shll $4,%ecx 3201 testl %eax,%eax 3202 jnz .L134dec_key_ret 3203 leal 16(%edx,%ecx,1),%eax 3204 movups (%edx),%xmm0 3205 movups (%eax),%xmm1 3206 movups %xmm0,(%eax) 3207 movups %xmm1,(%edx) 3208 leal 16(%edx),%edx 3209 leal -16(%eax),%eax 3210.L135dec_key_inverse: 3211 movups (%edx),%xmm0 3212 movups (%eax),%xmm1 3213.byte 102,15,56,219,192 3214.byte 102,15,56,219,201 3215 leal 16(%edx),%edx 3216 leal -16(%eax),%eax 3217 movups %xmm0,16(%eax) 3218 movups %xmm1,-16(%edx) 3219 cmpl %edx,%eax 3220 ja .L135dec_key_inverse 3221 movups (%edx),%xmm0 3222.byte 102,15,56,219,192 3223 movups %xmm0,(%edx) 3224 pxor %xmm0,%xmm0 3225 pxor %xmm1,%xmm1 3226 xorl %eax,%eax 3227.L134dec_key_ret: 3228 ret 3229.size aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin 3230.align 64 3231.Lkey_const: 3232.long 202313229,202313229,202313229,202313229 3233.long 67569157,67569157,67569157,67569157 3234.long 1,1,1,1 3235.long 27,27,27,27 3236.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 3237.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 3238.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 3239.byte 115,108,46,111,114,103,62,0 3240.comm OPENSSL_ia32cap_P,16,4 3241#else 3242.text 3243.globl aesni_encrypt 3244.type aesni_encrypt,@function 3245.align 16 3246aesni_encrypt: 3247.L_aesni_encrypt_begin: 3248 movl 4(%esp),%eax 3249 movl 12(%esp),%edx 3250 movups (%eax),%xmm2 3251 movl 240(%edx),%ecx 3252 movl 8(%esp),%eax 3253 movups (%edx),%xmm0 3254 movups 16(%edx),%xmm1 3255 leal 32(%edx),%edx 3256 xorps %xmm0,%xmm2 3257.L000enc1_loop_1: 3258.byte 102,15,56,220,209 3259 decl %ecx 3260 movups (%edx),%xmm1 3261 leal 16(%edx),%edx 3262 jnz .L000enc1_loop_1 3263.byte 102,15,56,221,209 3264 pxor %xmm0,%xmm0 3265 pxor %xmm1,%xmm1 3266 movups %xmm2,(%eax) 3267 pxor %xmm2,%xmm2 3268 ret 3269.size aesni_encrypt,.-.L_aesni_encrypt_begin 3270.globl aesni_decrypt 3271.type aesni_decrypt,@function 3272.align 16 3273aesni_decrypt: 3274.L_aesni_decrypt_begin: 3275 movl 4(%esp),%eax 3276 movl 12(%esp),%edx 3277 movups (%eax),%xmm2 3278 movl 240(%edx),%ecx 3279 movl 8(%esp),%eax 3280 movups (%edx),%xmm0 3281 movups 16(%edx),%xmm1 3282 leal 32(%edx),%edx 3283 xorps %xmm0,%xmm2 3284.L001dec1_loop_2: 3285.byte 102,15,56,222,209 3286 decl %ecx 3287 movups (%edx),%xmm1 3288 leal 16(%edx),%edx 3289 jnz .L001dec1_loop_2 3290.byte 102,15,56,223,209 3291 pxor %xmm0,%xmm0 3292 pxor %xmm1,%xmm1 3293 movups %xmm2,(%eax) 3294 pxor %xmm2,%xmm2 3295 ret 3296.size aesni_decrypt,.-.L_aesni_decrypt_begin 3297.type _aesni_encrypt2,@function 3298.align 16 3299_aesni_encrypt2: 3300 movups (%edx),%xmm0 3301 shll $4,%ecx 3302 movups 16(%edx),%xmm1 3303 xorps %xmm0,%xmm2 3304 pxor %xmm0,%xmm3 3305 movups 32(%edx),%xmm0 3306 leal 32(%edx,%ecx,1),%edx 3307 negl %ecx 3308 addl $16,%ecx 3309.L002enc2_loop: 3310.byte 102,15,56,220,209 3311.byte 102,15,56,220,217 3312 movups (%edx,%ecx,1),%xmm1 3313 addl $32,%ecx 3314.byte 102,15,56,220,208 3315.byte 102,15,56,220,216 3316 movups -16(%edx,%ecx,1),%xmm0 3317 jnz .L002enc2_loop 3318.byte 102,15,56,220,209 3319.byte 102,15,56,220,217 3320.byte 102,15,56,221,208 3321.byte 102,15,56,221,216 3322 ret 3323.size _aesni_encrypt2,.-_aesni_encrypt2 3324.type _aesni_decrypt2,@function 3325.align 16 3326_aesni_decrypt2: 3327 movups (%edx),%xmm0 3328 shll $4,%ecx 3329 movups 16(%edx),%xmm1 3330 xorps %xmm0,%xmm2 3331 pxor %xmm0,%xmm3 3332 movups 32(%edx),%xmm0 3333 leal 32(%edx,%ecx,1),%edx 3334 negl %ecx 3335 addl $16,%ecx 3336.L003dec2_loop: 3337.byte 102,15,56,222,209 3338.byte 102,15,56,222,217 3339 movups (%edx,%ecx,1),%xmm1 3340 addl $32,%ecx 3341.byte 102,15,56,222,208 3342.byte 102,15,56,222,216 3343 movups -16(%edx,%ecx,1),%xmm0 3344 jnz .L003dec2_loop 3345.byte 102,15,56,222,209 3346.byte 102,15,56,222,217 3347.byte 102,15,56,223,208 3348.byte 102,15,56,223,216 3349 ret 3350.size _aesni_decrypt2,.-_aesni_decrypt2 3351.type _aesni_encrypt3,@function 3352.align 16 3353_aesni_encrypt3: 3354 movups (%edx),%xmm0 3355 shll $4,%ecx 3356 movups 16(%edx),%xmm1 3357 xorps %xmm0,%xmm2 3358 pxor %xmm0,%xmm3 3359 pxor %xmm0,%xmm4 3360 movups 32(%edx),%xmm0 3361 leal 32(%edx,%ecx,1),%edx 3362 negl %ecx 3363 addl $16,%ecx 3364.L004enc3_loop: 3365.byte 102,15,56,220,209 3366.byte 102,15,56,220,217 3367.byte 102,15,56,220,225 3368 movups (%edx,%ecx,1),%xmm1 3369 addl $32,%ecx 3370.byte 102,15,56,220,208 3371.byte 102,15,56,220,216 3372.byte 102,15,56,220,224 3373 movups -16(%edx,%ecx,1),%xmm0 3374 jnz .L004enc3_loop 3375.byte 102,15,56,220,209 3376.byte 102,15,56,220,217 3377.byte 102,15,56,220,225 3378.byte 102,15,56,221,208 3379.byte 102,15,56,221,216 3380.byte 102,15,56,221,224 3381 ret 3382.size _aesni_encrypt3,.-_aesni_encrypt3 3383.type _aesni_decrypt3,@function 3384.align 16 3385_aesni_decrypt3: 3386 movups (%edx),%xmm0 3387 shll $4,%ecx 3388 movups 16(%edx),%xmm1 3389 xorps %xmm0,%xmm2 3390 pxor %xmm0,%xmm3 3391 pxor %xmm0,%xmm4 3392 movups 32(%edx),%xmm0 3393 leal 32(%edx,%ecx,1),%edx 3394 negl %ecx 3395 addl $16,%ecx 3396.L005dec3_loop: 3397.byte 102,15,56,222,209 3398.byte 102,15,56,222,217 3399.byte 102,15,56,222,225 3400 movups (%edx,%ecx,1),%xmm1 3401 addl $32,%ecx 3402.byte 102,15,56,222,208 3403.byte 102,15,56,222,216 3404.byte 102,15,56,222,224 3405 movups -16(%edx,%ecx,1),%xmm0 3406 jnz .L005dec3_loop 3407.byte 102,15,56,222,209 3408.byte 102,15,56,222,217 3409.byte 102,15,56,222,225 3410.byte 102,15,56,223,208 3411.byte 102,15,56,223,216 3412.byte 102,15,56,223,224 3413 ret 3414.size _aesni_decrypt3,.-_aesni_decrypt3 3415.type _aesni_encrypt4,@function 3416.align 16 3417_aesni_encrypt4: 3418 movups (%edx),%xmm0 3419 movups 16(%edx),%xmm1 3420 shll $4,%ecx 3421 xorps %xmm0,%xmm2 3422 pxor %xmm0,%xmm3 3423 pxor %xmm0,%xmm4 3424 pxor %xmm0,%xmm5 3425 movups 32(%edx),%xmm0 3426 leal 32(%edx,%ecx,1),%edx 3427 negl %ecx 3428.byte 15,31,64,0 3429 addl $16,%ecx 3430.L006enc4_loop: 3431.byte 102,15,56,220,209 3432.byte 102,15,56,220,217 3433.byte 102,15,56,220,225 3434.byte 102,15,56,220,233 3435 movups (%edx,%ecx,1),%xmm1 3436 addl $32,%ecx 3437.byte 102,15,56,220,208 3438.byte 102,15,56,220,216 3439.byte 102,15,56,220,224 3440.byte 102,15,56,220,232 3441 movups -16(%edx,%ecx,1),%xmm0 3442 jnz .L006enc4_loop 3443.byte 102,15,56,220,209 3444.byte 102,15,56,220,217 3445.byte 102,15,56,220,225 3446.byte 102,15,56,220,233 3447.byte 102,15,56,221,208 3448.byte 102,15,56,221,216 3449.byte 102,15,56,221,224 3450.byte 102,15,56,221,232 3451 ret 3452.size _aesni_encrypt4,.-_aesni_encrypt4 3453.type _aesni_decrypt4,@function 3454.align 16 3455_aesni_decrypt4: 3456 movups (%edx),%xmm0 3457 movups 16(%edx),%xmm1 3458 shll $4,%ecx 3459 xorps %xmm0,%xmm2 3460 pxor %xmm0,%xmm3 3461 pxor %xmm0,%xmm4 3462 pxor %xmm0,%xmm5 3463 movups 32(%edx),%xmm0 3464 leal 32(%edx,%ecx,1),%edx 3465 negl %ecx 3466.byte 15,31,64,0 3467 addl $16,%ecx 3468.L007dec4_loop: 3469.byte 102,15,56,222,209 3470.byte 102,15,56,222,217 3471.byte 102,15,56,222,225 3472.byte 102,15,56,222,233 3473 movups (%edx,%ecx,1),%xmm1 3474 addl $32,%ecx 3475.byte 102,15,56,222,208 3476.byte 102,15,56,222,216 3477.byte 102,15,56,222,224 3478.byte 102,15,56,222,232 3479 movups -16(%edx,%ecx,1),%xmm0 3480 jnz .L007dec4_loop 3481.byte 102,15,56,222,209 3482.byte 102,15,56,222,217 3483.byte 102,15,56,222,225 3484.byte 102,15,56,222,233 3485.byte 102,15,56,223,208 3486.byte 102,15,56,223,216 3487.byte 102,15,56,223,224 3488.byte 102,15,56,223,232 3489 ret 3490.size _aesni_decrypt4,.-_aesni_decrypt4 3491.type _aesni_encrypt6,@function 3492.align 16 3493_aesni_encrypt6: 3494 movups (%edx),%xmm0 3495 shll $4,%ecx 3496 movups 16(%edx),%xmm1 3497 xorps %xmm0,%xmm2 3498 pxor %xmm0,%xmm3 3499 pxor %xmm0,%xmm4 3500.byte 102,15,56,220,209 3501 pxor %xmm0,%xmm5 3502 pxor %xmm0,%xmm6 3503.byte 102,15,56,220,217 3504 leal 32(%edx,%ecx,1),%edx 3505 negl %ecx 3506.byte 102,15,56,220,225 3507 pxor %xmm0,%xmm7 3508 movups (%edx,%ecx,1),%xmm0 3509 addl $16,%ecx 3510 jmp .L008_aesni_encrypt6_inner 3511.align 16 3512.L009enc6_loop: 3513.byte 102,15,56,220,209 3514.byte 102,15,56,220,217 3515.byte 102,15,56,220,225 3516.L008_aesni_encrypt6_inner: 3517.byte 102,15,56,220,233 3518.byte 102,15,56,220,241 3519.byte 102,15,56,220,249 3520.L_aesni_encrypt6_enter: 3521 movups (%edx,%ecx,1),%xmm1 3522 addl $32,%ecx 3523.byte 102,15,56,220,208 3524.byte 102,15,56,220,216 3525.byte 102,15,56,220,224 3526.byte 102,15,56,220,232 3527.byte 102,15,56,220,240 3528.byte 102,15,56,220,248 3529 movups -16(%edx,%ecx,1),%xmm0 3530 jnz .L009enc6_loop 3531.byte 102,15,56,220,209 3532.byte 102,15,56,220,217 3533.byte 102,15,56,220,225 3534.byte 102,15,56,220,233 3535.byte 102,15,56,220,241 3536.byte 102,15,56,220,249 3537.byte 102,15,56,221,208 3538.byte 102,15,56,221,216 3539.byte 102,15,56,221,224 3540.byte 102,15,56,221,232 3541.byte 102,15,56,221,240 3542.byte 102,15,56,221,248 3543 ret 3544.size _aesni_encrypt6,.-_aesni_encrypt6 3545.type _aesni_decrypt6,@function 3546.align 16 3547_aesni_decrypt6: 3548 movups (%edx),%xmm0 3549 shll $4,%ecx 3550 movups 16(%edx),%xmm1 3551 xorps %xmm0,%xmm2 3552 pxor %xmm0,%xmm3 3553 pxor %xmm0,%xmm4 3554.byte 102,15,56,222,209 3555 pxor %xmm0,%xmm5 3556 pxor %xmm0,%xmm6 3557.byte 102,15,56,222,217 3558 leal 32(%edx,%ecx,1),%edx 3559 negl %ecx 3560.byte 102,15,56,222,225 3561 pxor %xmm0,%xmm7 3562 movups (%edx,%ecx,1),%xmm0 3563 addl $16,%ecx 3564 jmp .L010_aesni_decrypt6_inner 3565.align 16 3566.L011dec6_loop: 3567.byte 102,15,56,222,209 3568.byte 102,15,56,222,217 3569.byte 102,15,56,222,225 3570.L010_aesni_decrypt6_inner: 3571.byte 102,15,56,222,233 3572.byte 102,15,56,222,241 3573.byte 102,15,56,222,249 3574.L_aesni_decrypt6_enter: 3575 movups (%edx,%ecx,1),%xmm1 3576 addl $32,%ecx 3577.byte 102,15,56,222,208 3578.byte 102,15,56,222,216 3579.byte 102,15,56,222,224 3580.byte 102,15,56,222,232 3581.byte 102,15,56,222,240 3582.byte 102,15,56,222,248 3583 movups -16(%edx,%ecx,1),%xmm0 3584 jnz .L011dec6_loop 3585.byte 102,15,56,222,209 3586.byte 102,15,56,222,217 3587.byte 102,15,56,222,225 3588.byte 102,15,56,222,233 3589.byte 102,15,56,222,241 3590.byte 102,15,56,222,249 3591.byte 102,15,56,223,208 3592.byte 102,15,56,223,216 3593.byte 102,15,56,223,224 3594.byte 102,15,56,223,232 3595.byte 102,15,56,223,240 3596.byte 102,15,56,223,248 3597 ret 3598.size _aesni_decrypt6,.-_aesni_decrypt6 3599.globl aesni_ecb_encrypt 3600.type aesni_ecb_encrypt,@function 3601.align 16 3602aesni_ecb_encrypt: 3603.L_aesni_ecb_encrypt_begin: 3604 pushl %ebp 3605 pushl %ebx 3606 pushl %esi 3607 pushl %edi 3608 movl 20(%esp),%esi 3609 movl 24(%esp),%edi 3610 movl 28(%esp),%eax 3611 movl 32(%esp),%edx 3612 movl 36(%esp),%ebx 3613 andl $-16,%eax 3614 jz .L012ecb_ret 3615 movl 240(%edx),%ecx 3616 testl %ebx,%ebx 3617 jz .L013ecb_decrypt 3618 movl %edx,%ebp 3619 movl %ecx,%ebx 3620 cmpl $96,%eax 3621 jb .L014ecb_enc_tail 3622 movdqu (%esi),%xmm2 3623 movdqu 16(%esi),%xmm3 3624 movdqu 32(%esi),%xmm4 3625 movdqu 48(%esi),%xmm5 3626 movdqu 64(%esi),%xmm6 3627 movdqu 80(%esi),%xmm7 3628 leal 96(%esi),%esi 3629 subl $96,%eax 3630 jmp .L015ecb_enc_loop6_enter 3631.align 16 3632.L016ecb_enc_loop6: 3633 movups %xmm2,(%edi) 3634 movdqu (%esi),%xmm2 3635 movups %xmm3,16(%edi) 3636 movdqu 16(%esi),%xmm3 3637 movups %xmm4,32(%edi) 3638 movdqu 32(%esi),%xmm4 3639 movups %xmm5,48(%edi) 3640 movdqu 48(%esi),%xmm5 3641 movups %xmm6,64(%edi) 3642 movdqu 64(%esi),%xmm6 3643 movups %xmm7,80(%edi) 3644 leal 96(%edi),%edi 3645 movdqu 80(%esi),%xmm7 3646 leal 96(%esi),%esi 3647.L015ecb_enc_loop6_enter: 3648 call _aesni_encrypt6 3649 movl %ebp,%edx 3650 movl %ebx,%ecx 3651 subl $96,%eax 3652 jnc .L016ecb_enc_loop6 3653 movups %xmm2,(%edi) 3654 movups %xmm3,16(%edi) 3655 movups %xmm4,32(%edi) 3656 movups %xmm5,48(%edi) 3657 movups %xmm6,64(%edi) 3658 movups %xmm7,80(%edi) 3659 leal 96(%edi),%edi 3660 addl $96,%eax 3661 jz .L012ecb_ret 3662.L014ecb_enc_tail: 3663 movups (%esi),%xmm2 3664 cmpl $32,%eax 3665 jb .L017ecb_enc_one 3666 movups 16(%esi),%xmm3 3667 je .L018ecb_enc_two 3668 movups 32(%esi),%xmm4 3669 cmpl $64,%eax 3670 jb .L019ecb_enc_three 3671 movups 48(%esi),%xmm5 3672 je .L020ecb_enc_four 3673 movups 64(%esi),%xmm6 3674 xorps %xmm7,%xmm7 3675 call _aesni_encrypt6 3676 movups %xmm2,(%edi) 3677 movups %xmm3,16(%edi) 3678 movups %xmm4,32(%edi) 3679 movups %xmm5,48(%edi) 3680 movups %xmm6,64(%edi) 3681 jmp .L012ecb_ret 3682.align 16 3683.L017ecb_enc_one: 3684 movups (%edx),%xmm0 3685 movups 16(%edx),%xmm1 3686 leal 32(%edx),%edx 3687 xorps %xmm0,%xmm2 3688.L021enc1_loop_3: 3689.byte 102,15,56,220,209 3690 decl %ecx 3691 movups (%edx),%xmm1 3692 leal 16(%edx),%edx 3693 jnz .L021enc1_loop_3 3694.byte 102,15,56,221,209 3695 movups %xmm2,(%edi) 3696 jmp .L012ecb_ret 3697.align 16 3698.L018ecb_enc_two: 3699 call _aesni_encrypt2 3700 movups %xmm2,(%edi) 3701 movups %xmm3,16(%edi) 3702 jmp .L012ecb_ret 3703.align 16 3704.L019ecb_enc_three: 3705 call _aesni_encrypt3 3706 movups %xmm2,(%edi) 3707 movups %xmm3,16(%edi) 3708 movups %xmm4,32(%edi) 3709 jmp .L012ecb_ret 3710.align 16 3711.L020ecb_enc_four: 3712 call _aesni_encrypt4 3713 movups %xmm2,(%edi) 3714 movups %xmm3,16(%edi) 3715 movups %xmm4,32(%edi) 3716 movups %xmm5,48(%edi) 3717 jmp .L012ecb_ret 3718.align 16 3719.L013ecb_decrypt: 3720 movl %edx,%ebp 3721 movl %ecx,%ebx 3722 cmpl $96,%eax 3723 jb .L022ecb_dec_tail 3724 movdqu (%esi),%xmm2 3725 movdqu 16(%esi),%xmm3 3726 movdqu 32(%esi),%xmm4 3727 movdqu 48(%esi),%xmm5 3728 movdqu 64(%esi),%xmm6 3729 movdqu 80(%esi),%xmm7 3730 leal 96(%esi),%esi 3731 subl $96,%eax 3732 jmp .L023ecb_dec_loop6_enter 3733.align 16 3734.L024ecb_dec_loop6: 3735 movups %xmm2,(%edi) 3736 movdqu (%esi),%xmm2 3737 movups %xmm3,16(%edi) 3738 movdqu 16(%esi),%xmm3 3739 movups %xmm4,32(%edi) 3740 movdqu 32(%esi),%xmm4 3741 movups %xmm5,48(%edi) 3742 movdqu 48(%esi),%xmm5 3743 movups %xmm6,64(%edi) 3744 movdqu 64(%esi),%xmm6 3745 movups %xmm7,80(%edi) 3746 leal 96(%edi),%edi 3747 movdqu 80(%esi),%xmm7 3748 leal 96(%esi),%esi 3749.L023ecb_dec_loop6_enter: 3750 call _aesni_decrypt6 3751 movl %ebp,%edx 3752 movl %ebx,%ecx 3753 subl $96,%eax 3754 jnc .L024ecb_dec_loop6 3755 movups %xmm2,(%edi) 3756 movups %xmm3,16(%edi) 3757 movups %xmm4,32(%edi) 3758 movups %xmm5,48(%edi) 3759 movups %xmm6,64(%edi) 3760 movups %xmm7,80(%edi) 3761 leal 96(%edi),%edi 3762 addl $96,%eax 3763 jz .L012ecb_ret 3764.L022ecb_dec_tail: 3765 movups (%esi),%xmm2 3766 cmpl $32,%eax 3767 jb .L025ecb_dec_one 3768 movups 16(%esi),%xmm3 3769 je .L026ecb_dec_two 3770 movups 32(%esi),%xmm4 3771 cmpl $64,%eax 3772 jb .L027ecb_dec_three 3773 movups 48(%esi),%xmm5 3774 je .L028ecb_dec_four 3775 movups 64(%esi),%xmm6 3776 xorps %xmm7,%xmm7 3777 call _aesni_decrypt6 3778 movups %xmm2,(%edi) 3779 movups %xmm3,16(%edi) 3780 movups %xmm4,32(%edi) 3781 movups %xmm5,48(%edi) 3782 movups %xmm6,64(%edi) 3783 jmp .L012ecb_ret 3784.align 16 3785.L025ecb_dec_one: 3786 movups (%edx),%xmm0 3787 movups 16(%edx),%xmm1 3788 leal 32(%edx),%edx 3789 xorps %xmm0,%xmm2 3790.L029dec1_loop_4: 3791.byte 102,15,56,222,209 3792 decl %ecx 3793 movups (%edx),%xmm1 3794 leal 16(%edx),%edx 3795 jnz .L029dec1_loop_4 3796.byte 102,15,56,223,209 3797 movups %xmm2,(%edi) 3798 jmp .L012ecb_ret 3799.align 16 3800.L026ecb_dec_two: 3801 call _aesni_decrypt2 3802 movups %xmm2,(%edi) 3803 movups %xmm3,16(%edi) 3804 jmp .L012ecb_ret 3805.align 16 3806.L027ecb_dec_three: 3807 call _aesni_decrypt3 3808 movups %xmm2,(%edi) 3809 movups %xmm3,16(%edi) 3810 movups %xmm4,32(%edi) 3811 jmp .L012ecb_ret 3812.align 16 3813.L028ecb_dec_four: 3814 call _aesni_decrypt4 3815 movups %xmm2,(%edi) 3816 movups %xmm3,16(%edi) 3817 movups %xmm4,32(%edi) 3818 movups %xmm5,48(%edi) 3819.L012ecb_ret: 3820 pxor %xmm0,%xmm0 3821 pxor %xmm1,%xmm1 3822 pxor %xmm2,%xmm2 3823 pxor %xmm3,%xmm3 3824 pxor %xmm4,%xmm4 3825 pxor %xmm5,%xmm5 3826 pxor %xmm6,%xmm6 3827 pxor %xmm7,%xmm7 3828 popl %edi 3829 popl %esi 3830 popl %ebx 3831 popl %ebp 3832 ret 3833.size aesni_ecb_encrypt,.-.L_aesni_ecb_encrypt_begin 3834.globl aesni_ccm64_encrypt_blocks 3835.type aesni_ccm64_encrypt_blocks,@function 3836.align 16 3837aesni_ccm64_encrypt_blocks: 3838.L_aesni_ccm64_encrypt_blocks_begin: 3839 pushl %ebp 3840 pushl %ebx 3841 pushl %esi 3842 pushl %edi 3843 movl 20(%esp),%esi 3844 movl 24(%esp),%edi 3845 movl 28(%esp),%eax 3846 movl 32(%esp),%edx 3847 movl 36(%esp),%ebx 3848 movl 40(%esp),%ecx 3849 movl %esp,%ebp 3850 subl $60,%esp 3851 andl $-16,%esp 3852 movl %ebp,48(%esp) 3853 movdqu (%ebx),%xmm7 3854 movdqu (%ecx),%xmm3 3855 movl 240(%edx),%ecx 3856 movl $202182159,(%esp) 3857 movl $134810123,4(%esp) 3858 movl $67438087,8(%esp) 3859 movl $66051,12(%esp) 3860 movl $1,%ebx 3861 xorl %ebp,%ebp 3862 movl %ebx,16(%esp) 3863 movl %ebp,20(%esp) 3864 movl %ebp,24(%esp) 3865 movl %ebp,28(%esp) 3866 shll $4,%ecx 3867 movl $16,%ebx 3868 leal (%edx),%ebp 3869 movdqa (%esp),%xmm5 3870 movdqa %xmm7,%xmm2 3871 leal 32(%edx,%ecx,1),%edx 3872 subl %ecx,%ebx 3873.byte 102,15,56,0,253 3874.L030ccm64_enc_outer: 3875 movups (%ebp),%xmm0 3876 movl %ebx,%ecx 3877 movups (%esi),%xmm6 3878 xorps %xmm0,%xmm2 3879 movups 16(%ebp),%xmm1 3880 xorps %xmm6,%xmm0 3881 xorps %xmm0,%xmm3 3882 movups 32(%ebp),%xmm0 3883.L031ccm64_enc2_loop: 3884.byte 102,15,56,220,209 3885.byte 102,15,56,220,217 3886 movups (%edx,%ecx,1),%xmm1 3887 addl $32,%ecx 3888.byte 102,15,56,220,208 3889.byte 102,15,56,220,216 3890 movups -16(%edx,%ecx,1),%xmm0 3891 jnz .L031ccm64_enc2_loop 3892.byte 102,15,56,220,209 3893.byte 102,15,56,220,217 3894 paddq 16(%esp),%xmm7 3895 decl %eax 3896.byte 102,15,56,221,208 3897.byte 102,15,56,221,216 3898 leal 16(%esi),%esi 3899 xorps %xmm2,%xmm6 3900 movdqa %xmm7,%xmm2 3901 movups %xmm6,(%edi) 3902.byte 102,15,56,0,213 3903 leal 16(%edi),%edi 3904 jnz .L030ccm64_enc_outer 3905 movl 48(%esp),%esp 3906 movl 40(%esp),%edi 3907 movups %xmm3,(%edi) 3908 pxor %xmm0,%xmm0 3909 pxor %xmm1,%xmm1 3910 pxor %xmm2,%xmm2 3911 pxor %xmm3,%xmm3 3912 pxor %xmm4,%xmm4 3913 pxor %xmm5,%xmm5 3914 pxor %xmm6,%xmm6 3915 pxor %xmm7,%xmm7 3916 popl %edi 3917 popl %esi 3918 popl %ebx 3919 popl %ebp 3920 ret 3921.size aesni_ccm64_encrypt_blocks,.-.L_aesni_ccm64_encrypt_blocks_begin 3922.globl aesni_ccm64_decrypt_blocks 3923.type aesni_ccm64_decrypt_blocks,@function 3924.align 16 3925aesni_ccm64_decrypt_blocks: 3926.L_aesni_ccm64_decrypt_blocks_begin: 3927 pushl %ebp 3928 pushl %ebx 3929 pushl %esi 3930 pushl %edi 3931 movl 20(%esp),%esi 3932 movl 24(%esp),%edi 3933 movl 28(%esp),%eax 3934 movl 32(%esp),%edx 3935 movl 36(%esp),%ebx 3936 movl 40(%esp),%ecx 3937 movl %esp,%ebp 3938 subl $60,%esp 3939 andl $-16,%esp 3940 movl %ebp,48(%esp) 3941 movdqu (%ebx),%xmm7 3942 movdqu (%ecx),%xmm3 3943 movl 240(%edx),%ecx 3944 movl $202182159,(%esp) 3945 movl $134810123,4(%esp) 3946 movl $67438087,8(%esp) 3947 movl $66051,12(%esp) 3948 movl $1,%ebx 3949 xorl %ebp,%ebp 3950 movl %ebx,16(%esp) 3951 movl %ebp,20(%esp) 3952 movl %ebp,24(%esp) 3953 movl %ebp,28(%esp) 3954 movdqa (%esp),%xmm5 3955 movdqa %xmm7,%xmm2 3956 movl %edx,%ebp 3957 movl %ecx,%ebx 3958.byte 102,15,56,0,253 3959 movups (%edx),%xmm0 3960 movups 16(%edx),%xmm1 3961 leal 32(%edx),%edx 3962 xorps %xmm0,%xmm2 3963.L032enc1_loop_5: 3964.byte 102,15,56,220,209 3965 decl %ecx 3966 movups (%edx),%xmm1 3967 leal 16(%edx),%edx 3968 jnz .L032enc1_loop_5 3969.byte 102,15,56,221,209 3970 shll $4,%ebx 3971 movl $16,%ecx 3972 movups (%esi),%xmm6 3973 paddq 16(%esp),%xmm7 3974 leal 16(%esi),%esi 3975 subl %ebx,%ecx 3976 leal 32(%ebp,%ebx,1),%edx 3977 movl %ecx,%ebx 3978 jmp .L033ccm64_dec_outer 3979.align 16 3980.L033ccm64_dec_outer: 3981 xorps %xmm2,%xmm6 3982 movdqa %xmm7,%xmm2 3983 movups %xmm6,(%edi) 3984 leal 16(%edi),%edi 3985.byte 102,15,56,0,213 3986 subl $1,%eax 3987 jz .L034ccm64_dec_break 3988 movups (%ebp),%xmm0 3989 movl %ebx,%ecx 3990 movups 16(%ebp),%xmm1 3991 xorps %xmm0,%xmm6 3992 xorps %xmm0,%xmm2 3993 xorps %xmm6,%xmm3 3994 movups 32(%ebp),%xmm0 3995.L035ccm64_dec2_loop: 3996.byte 102,15,56,220,209 3997.byte 102,15,56,220,217 3998 movups (%edx,%ecx,1),%xmm1 3999 addl $32,%ecx 4000.byte 102,15,56,220,208 4001.byte 102,15,56,220,216 4002 movups -16(%edx,%ecx,1),%xmm0 4003 jnz .L035ccm64_dec2_loop 4004 movups (%esi),%xmm6 4005 paddq 16(%esp),%xmm7 4006.byte 102,15,56,220,209 4007.byte 102,15,56,220,217 4008.byte 102,15,56,221,208 4009.byte 102,15,56,221,216 4010 leal 16(%esi),%esi 4011 jmp .L033ccm64_dec_outer 4012.align 16 4013.L034ccm64_dec_break: 4014 movl 240(%ebp),%ecx 4015 movl %ebp,%edx 4016 movups (%edx),%xmm0 4017 movups 16(%edx),%xmm1 4018 xorps %xmm0,%xmm6 4019 leal 32(%edx),%edx 4020 xorps %xmm6,%xmm3 4021.L036enc1_loop_6: 4022.byte 102,15,56,220,217 4023 decl %ecx 4024 movups (%edx),%xmm1 4025 leal 16(%edx),%edx 4026 jnz .L036enc1_loop_6 4027.byte 102,15,56,221,217 4028 movl 48(%esp),%esp 4029 movl 40(%esp),%edi 4030 movups %xmm3,(%edi) 4031 pxor %xmm0,%xmm0 4032 pxor %xmm1,%xmm1 4033 pxor %xmm2,%xmm2 4034 pxor %xmm3,%xmm3 4035 pxor %xmm4,%xmm4 4036 pxor %xmm5,%xmm5 4037 pxor %xmm6,%xmm6 4038 pxor %xmm7,%xmm7 4039 popl %edi 4040 popl %esi 4041 popl %ebx 4042 popl %ebp 4043 ret 4044.size aesni_ccm64_decrypt_blocks,.-.L_aesni_ccm64_decrypt_blocks_begin 4045.globl aesni_ctr32_encrypt_blocks 4046.type aesni_ctr32_encrypt_blocks,@function 4047.align 16 4048aesni_ctr32_encrypt_blocks: 4049.L_aesni_ctr32_encrypt_blocks_begin: 4050 pushl %ebp 4051 pushl %ebx 4052 pushl %esi 4053 pushl %edi 4054 movl 20(%esp),%esi 4055 movl 24(%esp),%edi 4056 movl 28(%esp),%eax 4057 movl 32(%esp),%edx 4058 movl 36(%esp),%ebx 4059 movl %esp,%ebp 4060 subl $88,%esp 4061 andl $-16,%esp 4062 movl %ebp,80(%esp) 4063 cmpl $1,%eax 4064 je .L037ctr32_one_shortcut 4065 movdqu (%ebx),%xmm7 4066 movl $202182159,(%esp) 4067 movl $134810123,4(%esp) 4068 movl $67438087,8(%esp) 4069 movl $66051,12(%esp) 4070 movl $6,%ecx 4071 xorl %ebp,%ebp 4072 movl %ecx,16(%esp) 4073 movl %ecx,20(%esp) 4074 movl %ecx,24(%esp) 4075 movl %ebp,28(%esp) 4076.byte 102,15,58,22,251,3 4077.byte 102,15,58,34,253,3 4078 movl 240(%edx),%ecx 4079 bswap %ebx 4080 pxor %xmm0,%xmm0 4081 pxor %xmm1,%xmm1 4082 movdqa (%esp),%xmm2 4083.byte 102,15,58,34,195,0 4084 leal 3(%ebx),%ebp 4085.byte 102,15,58,34,205,0 4086 incl %ebx 4087.byte 102,15,58,34,195,1 4088 incl %ebp 4089.byte 102,15,58,34,205,1 4090 incl %ebx 4091.byte 102,15,58,34,195,2 4092 incl %ebp 4093.byte 102,15,58,34,205,2 4094 movdqa %xmm0,48(%esp) 4095.byte 102,15,56,0,194 4096 movdqu (%edx),%xmm6 4097 movdqa %xmm1,64(%esp) 4098.byte 102,15,56,0,202 4099 pshufd $192,%xmm0,%xmm2 4100 pshufd $128,%xmm0,%xmm3 4101 cmpl $6,%eax 4102 jb .L038ctr32_tail 4103 pxor %xmm6,%xmm7 4104 shll $4,%ecx 4105 movl $16,%ebx 4106 movdqa %xmm7,32(%esp) 4107 movl %edx,%ebp 4108 subl %ecx,%ebx 4109 leal 32(%edx,%ecx,1),%edx 4110 subl $6,%eax 4111 jmp .L039ctr32_loop6 4112.align 16 4113.L039ctr32_loop6: 4114 pshufd $64,%xmm0,%xmm4 4115 movdqa 32(%esp),%xmm0 4116 pshufd $192,%xmm1,%xmm5 4117 pxor %xmm0,%xmm2 4118 pshufd $128,%xmm1,%xmm6 4119 pxor %xmm0,%xmm3 4120 pshufd $64,%xmm1,%xmm7 4121 movups 16(%ebp),%xmm1 4122 pxor %xmm0,%xmm4 4123 pxor %xmm0,%xmm5 4124.byte 102,15,56,220,209 4125 pxor %xmm0,%xmm6 4126 pxor %xmm0,%xmm7 4127.byte 102,15,56,220,217 4128 movups 32(%ebp),%xmm0 4129 movl %ebx,%ecx 4130.byte 102,15,56,220,225 4131.byte 102,15,56,220,233 4132.byte 102,15,56,220,241 4133.byte 102,15,56,220,249 4134 call .L_aesni_encrypt6_enter 4135 movups (%esi),%xmm1 4136 movups 16(%esi),%xmm0 4137 xorps %xmm1,%xmm2 4138 movups 32(%esi),%xmm1 4139 xorps %xmm0,%xmm3 4140 movups %xmm2,(%edi) 4141 movdqa 16(%esp),%xmm0 4142 xorps %xmm1,%xmm4 4143 movdqa 64(%esp),%xmm1 4144 movups %xmm3,16(%edi) 4145 movups %xmm4,32(%edi) 4146 paddd %xmm0,%xmm1 4147 paddd 48(%esp),%xmm0 4148 movdqa (%esp),%xmm2 4149 movups 48(%esi),%xmm3 4150 movups 64(%esi),%xmm4 4151 xorps %xmm3,%xmm5 4152 movups 80(%esi),%xmm3 4153 leal 96(%esi),%esi 4154 movdqa %xmm0,48(%esp) 4155.byte 102,15,56,0,194 4156 xorps %xmm4,%xmm6 4157 movups %xmm5,48(%edi) 4158 xorps %xmm3,%xmm7 4159 movdqa %xmm1,64(%esp) 4160.byte 102,15,56,0,202 4161 movups %xmm6,64(%edi) 4162 pshufd $192,%xmm0,%xmm2 4163 movups %xmm7,80(%edi) 4164 leal 96(%edi),%edi 4165 pshufd $128,%xmm0,%xmm3 4166 subl $6,%eax 4167 jnc .L039ctr32_loop6 4168 addl $6,%eax 4169 jz .L040ctr32_ret 4170 movdqu (%ebp),%xmm7 4171 movl %ebp,%edx 4172 pxor 32(%esp),%xmm7 4173 movl 240(%ebp),%ecx 4174.L038ctr32_tail: 4175 por %xmm7,%xmm2 4176 cmpl $2,%eax 4177 jb .L041ctr32_one 4178 pshufd $64,%xmm0,%xmm4 4179 por %xmm7,%xmm3 4180 je .L042ctr32_two 4181 pshufd $192,%xmm1,%xmm5 4182 por %xmm7,%xmm4 4183 cmpl $4,%eax 4184 jb .L043ctr32_three 4185 pshufd $128,%xmm1,%xmm6 4186 por %xmm7,%xmm5 4187 je .L044ctr32_four 4188 por %xmm7,%xmm6 4189 call _aesni_encrypt6 4190 movups (%esi),%xmm1 4191 movups 16(%esi),%xmm0 4192 xorps %xmm1,%xmm2 4193 movups 32(%esi),%xmm1 4194 xorps %xmm0,%xmm3 4195 movups 48(%esi),%xmm0 4196 xorps %xmm1,%xmm4 4197 movups 64(%esi),%xmm1 4198 xorps %xmm0,%xmm5 4199 movups %xmm2,(%edi) 4200 xorps %xmm1,%xmm6 4201 movups %xmm3,16(%edi) 4202 movups %xmm4,32(%edi) 4203 movups %xmm5,48(%edi) 4204 movups %xmm6,64(%edi) 4205 jmp .L040ctr32_ret 4206.align 16 4207.L037ctr32_one_shortcut: 4208 movups (%ebx),%xmm2 4209 movl 240(%edx),%ecx 4210.L041ctr32_one: 4211 movups (%edx),%xmm0 4212 movups 16(%edx),%xmm1 4213 leal 32(%edx),%edx 4214 xorps %xmm0,%xmm2 4215.L045enc1_loop_7: 4216.byte 102,15,56,220,209 4217 decl %ecx 4218 movups (%edx),%xmm1 4219 leal 16(%edx),%edx 4220 jnz .L045enc1_loop_7 4221.byte 102,15,56,221,209 4222 movups (%esi),%xmm6 4223 xorps %xmm2,%xmm6 4224 movups %xmm6,(%edi) 4225 jmp .L040ctr32_ret 4226.align 16 4227.L042ctr32_two: 4228 call _aesni_encrypt2 4229 movups (%esi),%xmm5 4230 movups 16(%esi),%xmm6 4231 xorps %xmm5,%xmm2 4232 xorps %xmm6,%xmm3 4233 movups %xmm2,(%edi) 4234 movups %xmm3,16(%edi) 4235 jmp .L040ctr32_ret 4236.align 16 4237.L043ctr32_three: 4238 call _aesni_encrypt3 4239 movups (%esi),%xmm5 4240 movups 16(%esi),%xmm6 4241 xorps %xmm5,%xmm2 4242 movups 32(%esi),%xmm7 4243 xorps %xmm6,%xmm3 4244 movups %xmm2,(%edi) 4245 xorps %xmm7,%xmm4 4246 movups %xmm3,16(%edi) 4247 movups %xmm4,32(%edi) 4248 jmp .L040ctr32_ret 4249.align 16 4250.L044ctr32_four: 4251 call _aesni_encrypt4 4252 movups (%esi),%xmm6 4253 movups 16(%esi),%xmm7 4254 movups 32(%esi),%xmm1 4255 xorps %xmm6,%xmm2 4256 movups 48(%esi),%xmm0 4257 xorps %xmm7,%xmm3 4258 movups %xmm2,(%edi) 4259 xorps %xmm1,%xmm4 4260 movups %xmm3,16(%edi) 4261 xorps %xmm0,%xmm5 4262 movups %xmm4,32(%edi) 4263 movups %xmm5,48(%edi) 4264.L040ctr32_ret: 4265 pxor %xmm0,%xmm0 4266 pxor %xmm1,%xmm1 4267 pxor %xmm2,%xmm2 4268 pxor %xmm3,%xmm3 4269 pxor %xmm4,%xmm4 4270 movdqa %xmm0,32(%esp) 4271 pxor %xmm5,%xmm5 4272 movdqa %xmm0,48(%esp) 4273 pxor %xmm6,%xmm6 4274 movdqa %xmm0,64(%esp) 4275 pxor %xmm7,%xmm7 4276 movl 80(%esp),%esp 4277 popl %edi 4278 popl %esi 4279 popl %ebx 4280 popl %ebp 4281 ret 4282.size aesni_ctr32_encrypt_blocks,.-.L_aesni_ctr32_encrypt_blocks_begin 4283.globl aesni_xts_encrypt 4284.type aesni_xts_encrypt,@function 4285.align 16 4286aesni_xts_encrypt: 4287.L_aesni_xts_encrypt_begin: 4288 pushl %ebp 4289 pushl %ebx 4290 pushl %esi 4291 pushl %edi 4292 movl 36(%esp),%edx 4293 movl 40(%esp),%esi 4294 movl 240(%edx),%ecx 4295 movups (%esi),%xmm2 4296 movups (%edx),%xmm0 4297 movups 16(%edx),%xmm1 4298 leal 32(%edx),%edx 4299 xorps %xmm0,%xmm2 4300.L046enc1_loop_8: 4301.byte 102,15,56,220,209 4302 decl %ecx 4303 movups (%edx),%xmm1 4304 leal 16(%edx),%edx 4305 jnz .L046enc1_loop_8 4306.byte 102,15,56,221,209 4307 movl 20(%esp),%esi 4308 movl 24(%esp),%edi 4309 movl 28(%esp),%eax 4310 movl 32(%esp),%edx 4311 movl %esp,%ebp 4312 subl $120,%esp 4313 movl 240(%edx),%ecx 4314 andl $-16,%esp 4315 movl $135,96(%esp) 4316 movl $0,100(%esp) 4317 movl $1,104(%esp) 4318 movl $0,108(%esp) 4319 movl %eax,112(%esp) 4320 movl %ebp,116(%esp) 4321 movdqa %xmm2,%xmm1 4322 pxor %xmm0,%xmm0 4323 movdqa 96(%esp),%xmm3 4324 pcmpgtd %xmm1,%xmm0 4325 andl $-16,%eax 4326 movl %edx,%ebp 4327 movl %ecx,%ebx 4328 subl $96,%eax 4329 jc .L047xts_enc_short 4330 shll $4,%ecx 4331 movl $16,%ebx 4332 subl %ecx,%ebx 4333 leal 32(%edx,%ecx,1),%edx 4334 jmp .L048xts_enc_loop6 4335.align 16 4336.L048xts_enc_loop6: 4337 pshufd $19,%xmm0,%xmm2 4338 pxor %xmm0,%xmm0 4339 movdqa %xmm1,(%esp) 4340 paddq %xmm1,%xmm1 4341 pand %xmm3,%xmm2 4342 pcmpgtd %xmm1,%xmm0 4343 pxor %xmm2,%xmm1 4344 pshufd $19,%xmm0,%xmm2 4345 pxor %xmm0,%xmm0 4346 movdqa %xmm1,16(%esp) 4347 paddq %xmm1,%xmm1 4348 pand %xmm3,%xmm2 4349 pcmpgtd %xmm1,%xmm0 4350 pxor %xmm2,%xmm1 4351 pshufd $19,%xmm0,%xmm2 4352 pxor %xmm0,%xmm0 4353 movdqa %xmm1,32(%esp) 4354 paddq %xmm1,%xmm1 4355 pand %xmm3,%xmm2 4356 pcmpgtd %xmm1,%xmm0 4357 pxor %xmm2,%xmm1 4358 pshufd $19,%xmm0,%xmm2 4359 pxor %xmm0,%xmm0 4360 movdqa %xmm1,48(%esp) 4361 paddq %xmm1,%xmm1 4362 pand %xmm3,%xmm2 4363 pcmpgtd %xmm1,%xmm0 4364 pxor %xmm2,%xmm1 4365 pshufd $19,%xmm0,%xmm7 4366 movdqa %xmm1,64(%esp) 4367 paddq %xmm1,%xmm1 4368 movups (%ebp),%xmm0 4369 pand %xmm3,%xmm7 4370 movups (%esi),%xmm2 4371 pxor %xmm1,%xmm7 4372 movl %ebx,%ecx 4373 movdqu 16(%esi),%xmm3 4374 xorps %xmm0,%xmm2 4375 movdqu 32(%esi),%xmm4 4376 pxor %xmm0,%xmm3 4377 movdqu 48(%esi),%xmm5 4378 pxor %xmm0,%xmm4 4379 movdqu 64(%esi),%xmm6 4380 pxor %xmm0,%xmm5 4381 movdqu 80(%esi),%xmm1 4382 pxor %xmm0,%xmm6 4383 leal 96(%esi),%esi 4384 pxor (%esp),%xmm2 4385 movdqa %xmm7,80(%esp) 4386 pxor %xmm1,%xmm7 4387 movups 16(%ebp),%xmm1 4388 pxor 16(%esp),%xmm3 4389 pxor 32(%esp),%xmm4 4390.byte 102,15,56,220,209 4391 pxor 48(%esp),%xmm5 4392 pxor 64(%esp),%xmm6 4393.byte 102,15,56,220,217 4394 pxor %xmm0,%xmm7 4395 movups 32(%ebp),%xmm0 4396.byte 102,15,56,220,225 4397.byte 102,15,56,220,233 4398.byte 102,15,56,220,241 4399.byte 102,15,56,220,249 4400 call .L_aesni_encrypt6_enter 4401 movdqa 80(%esp),%xmm1 4402 pxor %xmm0,%xmm0 4403 xorps (%esp),%xmm2 4404 pcmpgtd %xmm1,%xmm0 4405 xorps 16(%esp),%xmm3 4406 movups %xmm2,(%edi) 4407 xorps 32(%esp),%xmm4 4408 movups %xmm3,16(%edi) 4409 xorps 48(%esp),%xmm5 4410 movups %xmm4,32(%edi) 4411 xorps 64(%esp),%xmm6 4412 movups %xmm5,48(%edi) 4413 xorps %xmm1,%xmm7 4414 movups %xmm6,64(%edi) 4415 pshufd $19,%xmm0,%xmm2 4416 movups %xmm7,80(%edi) 4417 leal 96(%edi),%edi 4418 movdqa 96(%esp),%xmm3 4419 pxor %xmm0,%xmm0 4420 paddq %xmm1,%xmm1 4421 pand %xmm3,%xmm2 4422 pcmpgtd %xmm1,%xmm0 4423 pxor %xmm2,%xmm1 4424 subl $96,%eax 4425 jnc .L048xts_enc_loop6 4426 movl 240(%ebp),%ecx 4427 movl %ebp,%edx 4428 movl %ecx,%ebx 4429.L047xts_enc_short: 4430 addl $96,%eax 4431 jz .L049xts_enc_done6x 4432 movdqa %xmm1,%xmm5 4433 cmpl $32,%eax 4434 jb .L050xts_enc_one 4435 pshufd $19,%xmm0,%xmm2 4436 pxor %xmm0,%xmm0 4437 paddq %xmm1,%xmm1 4438 pand %xmm3,%xmm2 4439 pcmpgtd %xmm1,%xmm0 4440 pxor %xmm2,%xmm1 4441 je .L051xts_enc_two 4442 pshufd $19,%xmm0,%xmm2 4443 pxor %xmm0,%xmm0 4444 movdqa %xmm1,%xmm6 4445 paddq %xmm1,%xmm1 4446 pand %xmm3,%xmm2 4447 pcmpgtd %xmm1,%xmm0 4448 pxor %xmm2,%xmm1 4449 cmpl $64,%eax 4450 jb .L052xts_enc_three 4451 pshufd $19,%xmm0,%xmm2 4452 pxor %xmm0,%xmm0 4453 movdqa %xmm1,%xmm7 4454 paddq %xmm1,%xmm1 4455 pand %xmm3,%xmm2 4456 pcmpgtd %xmm1,%xmm0 4457 pxor %xmm2,%xmm1 4458 movdqa %xmm5,(%esp) 4459 movdqa %xmm6,16(%esp) 4460 je .L053xts_enc_four 4461 movdqa %xmm7,32(%esp) 4462 pshufd $19,%xmm0,%xmm7 4463 movdqa %xmm1,48(%esp) 4464 paddq %xmm1,%xmm1 4465 pand %xmm3,%xmm7 4466 pxor %xmm1,%xmm7 4467 movdqu (%esi),%xmm2 4468 movdqu 16(%esi),%xmm3 4469 movdqu 32(%esi),%xmm4 4470 pxor (%esp),%xmm2 4471 movdqu 48(%esi),%xmm5 4472 pxor 16(%esp),%xmm3 4473 movdqu 64(%esi),%xmm6 4474 pxor 32(%esp),%xmm4 4475 leal 80(%esi),%esi 4476 pxor 48(%esp),%xmm5 4477 movdqa %xmm7,64(%esp) 4478 pxor %xmm7,%xmm6 4479 call _aesni_encrypt6 4480 movaps 64(%esp),%xmm1 4481 xorps (%esp),%xmm2 4482 xorps 16(%esp),%xmm3 4483 xorps 32(%esp),%xmm4 4484 movups %xmm2,(%edi) 4485 xorps 48(%esp),%xmm5 4486 movups %xmm3,16(%edi) 4487 xorps %xmm1,%xmm6 4488 movups %xmm4,32(%edi) 4489 movups %xmm5,48(%edi) 4490 movups %xmm6,64(%edi) 4491 leal 80(%edi),%edi 4492 jmp .L054xts_enc_done 4493.align 16 4494.L050xts_enc_one: 4495 movups (%esi),%xmm2 4496 leal 16(%esi),%esi 4497 xorps %xmm5,%xmm2 4498 movups (%edx),%xmm0 4499 movups 16(%edx),%xmm1 4500 leal 32(%edx),%edx 4501 xorps %xmm0,%xmm2 4502.L055enc1_loop_9: 4503.byte 102,15,56,220,209 4504 decl %ecx 4505 movups (%edx),%xmm1 4506 leal 16(%edx),%edx 4507 jnz .L055enc1_loop_9 4508.byte 102,15,56,221,209 4509 xorps %xmm5,%xmm2 4510 movups %xmm2,(%edi) 4511 leal 16(%edi),%edi 4512 movdqa %xmm5,%xmm1 4513 jmp .L054xts_enc_done 4514.align 16 4515.L051xts_enc_two: 4516 movaps %xmm1,%xmm6 4517 movups (%esi),%xmm2 4518 movups 16(%esi),%xmm3 4519 leal 32(%esi),%esi 4520 xorps %xmm5,%xmm2 4521 xorps %xmm6,%xmm3 4522 call _aesni_encrypt2 4523 xorps %xmm5,%xmm2 4524 xorps %xmm6,%xmm3 4525 movups %xmm2,(%edi) 4526 movups %xmm3,16(%edi) 4527 leal 32(%edi),%edi 4528 movdqa %xmm6,%xmm1 4529 jmp .L054xts_enc_done 4530.align 16 4531.L052xts_enc_three: 4532 movaps %xmm1,%xmm7 4533 movups (%esi),%xmm2 4534 movups 16(%esi),%xmm3 4535 movups 32(%esi),%xmm4 4536 leal 48(%esi),%esi 4537 xorps %xmm5,%xmm2 4538 xorps %xmm6,%xmm3 4539 xorps %xmm7,%xmm4 4540 call _aesni_encrypt3 4541 xorps %xmm5,%xmm2 4542 xorps %xmm6,%xmm3 4543 xorps %xmm7,%xmm4 4544 movups %xmm2,(%edi) 4545 movups %xmm3,16(%edi) 4546 movups %xmm4,32(%edi) 4547 leal 48(%edi),%edi 4548 movdqa %xmm7,%xmm1 4549 jmp .L054xts_enc_done 4550.align 16 4551.L053xts_enc_four: 4552 movaps %xmm1,%xmm6 4553 movups (%esi),%xmm2 4554 movups 16(%esi),%xmm3 4555 movups 32(%esi),%xmm4 4556 xorps (%esp),%xmm2 4557 movups 48(%esi),%xmm5 4558 leal 64(%esi),%esi 4559 xorps 16(%esp),%xmm3 4560 xorps %xmm7,%xmm4 4561 xorps %xmm6,%xmm5 4562 call _aesni_encrypt4 4563 xorps (%esp),%xmm2 4564 xorps 16(%esp),%xmm3 4565 xorps %xmm7,%xmm4 4566 movups %xmm2,(%edi) 4567 xorps %xmm6,%xmm5 4568 movups %xmm3,16(%edi) 4569 movups %xmm4,32(%edi) 4570 movups %xmm5,48(%edi) 4571 leal 64(%edi),%edi 4572 movdqa %xmm6,%xmm1 4573 jmp .L054xts_enc_done 4574.align 16 4575.L049xts_enc_done6x: 4576 movl 112(%esp),%eax 4577 andl $15,%eax 4578 jz .L056xts_enc_ret 4579 movdqa %xmm1,%xmm5 4580 movl %eax,112(%esp) 4581 jmp .L057xts_enc_steal 4582.align 16 4583.L054xts_enc_done: 4584 movl 112(%esp),%eax 4585 pxor %xmm0,%xmm0 4586 andl $15,%eax 4587 jz .L056xts_enc_ret 4588 pcmpgtd %xmm1,%xmm0 4589 movl %eax,112(%esp) 4590 pshufd $19,%xmm0,%xmm5 4591 paddq %xmm1,%xmm1 4592 pand 96(%esp),%xmm5 4593 pxor %xmm1,%xmm5 4594.L057xts_enc_steal: 4595 movzbl (%esi),%ecx 4596 movzbl -16(%edi),%edx 4597 leal 1(%esi),%esi 4598 movb %cl,-16(%edi) 4599 movb %dl,(%edi) 4600 leal 1(%edi),%edi 4601 subl $1,%eax 4602 jnz .L057xts_enc_steal 4603 subl 112(%esp),%edi 4604 movl %ebp,%edx 4605 movl %ebx,%ecx 4606 movups -16(%edi),%xmm2 4607 xorps %xmm5,%xmm2 4608 movups (%edx),%xmm0 4609 movups 16(%edx),%xmm1 4610 leal 32(%edx),%edx 4611 xorps %xmm0,%xmm2 4612.L058enc1_loop_10: 4613.byte 102,15,56,220,209 4614 decl %ecx 4615 movups (%edx),%xmm1 4616 leal 16(%edx),%edx 4617 jnz .L058enc1_loop_10 4618.byte 102,15,56,221,209 4619 xorps %xmm5,%xmm2 4620 movups %xmm2,-16(%edi) 4621.L056xts_enc_ret: 4622 pxor %xmm0,%xmm0 4623 pxor %xmm1,%xmm1 4624 pxor %xmm2,%xmm2 4625 movdqa %xmm0,(%esp) 4626 pxor %xmm3,%xmm3 4627 movdqa %xmm0,16(%esp) 4628 pxor %xmm4,%xmm4 4629 movdqa %xmm0,32(%esp) 4630 pxor %xmm5,%xmm5 4631 movdqa %xmm0,48(%esp) 4632 pxor %xmm6,%xmm6 4633 movdqa %xmm0,64(%esp) 4634 pxor %xmm7,%xmm7 4635 movdqa %xmm0,80(%esp) 4636 movl 116(%esp),%esp 4637 popl %edi 4638 popl %esi 4639 popl %ebx 4640 popl %ebp 4641 ret 4642.size aesni_xts_encrypt,.-.L_aesni_xts_encrypt_begin 4643.globl aesni_xts_decrypt 4644.type aesni_xts_decrypt,@function 4645.align 16 4646aesni_xts_decrypt: 4647.L_aesni_xts_decrypt_begin: 4648 pushl %ebp 4649 pushl %ebx 4650 pushl %esi 4651 pushl %edi 4652 movl 36(%esp),%edx 4653 movl 40(%esp),%esi 4654 movl 240(%edx),%ecx 4655 movups (%esi),%xmm2 4656 movups (%edx),%xmm0 4657 movups 16(%edx),%xmm1 4658 leal 32(%edx),%edx 4659 xorps %xmm0,%xmm2 4660.L059enc1_loop_11: 4661.byte 102,15,56,220,209 4662 decl %ecx 4663 movups (%edx),%xmm1 4664 leal 16(%edx),%edx 4665 jnz .L059enc1_loop_11 4666.byte 102,15,56,221,209 4667 movl 20(%esp),%esi 4668 movl 24(%esp),%edi 4669 movl 28(%esp),%eax 4670 movl 32(%esp),%edx 4671 movl %esp,%ebp 4672 subl $120,%esp 4673 andl $-16,%esp 4674 xorl %ebx,%ebx 4675 testl $15,%eax 4676 setnz %bl 4677 shll $4,%ebx 4678 subl %ebx,%eax 4679 movl $135,96(%esp) 4680 movl $0,100(%esp) 4681 movl $1,104(%esp) 4682 movl $0,108(%esp) 4683 movl %eax,112(%esp) 4684 movl %ebp,116(%esp) 4685 movl 240(%edx),%ecx 4686 movl %edx,%ebp 4687 movl %ecx,%ebx 4688 movdqa %xmm2,%xmm1 4689 pxor %xmm0,%xmm0 4690 movdqa 96(%esp),%xmm3 4691 pcmpgtd %xmm1,%xmm0 4692 andl $-16,%eax 4693 subl $96,%eax 4694 jc .L060xts_dec_short 4695 shll $4,%ecx 4696 movl $16,%ebx 4697 subl %ecx,%ebx 4698 leal 32(%edx,%ecx,1),%edx 4699 jmp .L061xts_dec_loop6 4700.align 16 4701.L061xts_dec_loop6: 4702 pshufd $19,%xmm0,%xmm2 4703 pxor %xmm0,%xmm0 4704 movdqa %xmm1,(%esp) 4705 paddq %xmm1,%xmm1 4706 pand %xmm3,%xmm2 4707 pcmpgtd %xmm1,%xmm0 4708 pxor %xmm2,%xmm1 4709 pshufd $19,%xmm0,%xmm2 4710 pxor %xmm0,%xmm0 4711 movdqa %xmm1,16(%esp) 4712 paddq %xmm1,%xmm1 4713 pand %xmm3,%xmm2 4714 pcmpgtd %xmm1,%xmm0 4715 pxor %xmm2,%xmm1 4716 pshufd $19,%xmm0,%xmm2 4717 pxor %xmm0,%xmm0 4718 movdqa %xmm1,32(%esp) 4719 paddq %xmm1,%xmm1 4720 pand %xmm3,%xmm2 4721 pcmpgtd %xmm1,%xmm0 4722 pxor %xmm2,%xmm1 4723 pshufd $19,%xmm0,%xmm2 4724 pxor %xmm0,%xmm0 4725 movdqa %xmm1,48(%esp) 4726 paddq %xmm1,%xmm1 4727 pand %xmm3,%xmm2 4728 pcmpgtd %xmm1,%xmm0 4729 pxor %xmm2,%xmm1 4730 pshufd $19,%xmm0,%xmm7 4731 movdqa %xmm1,64(%esp) 4732 paddq %xmm1,%xmm1 4733 movups (%ebp),%xmm0 4734 pand %xmm3,%xmm7 4735 movups (%esi),%xmm2 4736 pxor %xmm1,%xmm7 4737 movl %ebx,%ecx 4738 movdqu 16(%esi),%xmm3 4739 xorps %xmm0,%xmm2 4740 movdqu 32(%esi),%xmm4 4741 pxor %xmm0,%xmm3 4742 movdqu 48(%esi),%xmm5 4743 pxor %xmm0,%xmm4 4744 movdqu 64(%esi),%xmm6 4745 pxor %xmm0,%xmm5 4746 movdqu 80(%esi),%xmm1 4747 pxor %xmm0,%xmm6 4748 leal 96(%esi),%esi 4749 pxor (%esp),%xmm2 4750 movdqa %xmm7,80(%esp) 4751 pxor %xmm1,%xmm7 4752 movups 16(%ebp),%xmm1 4753 pxor 16(%esp),%xmm3 4754 pxor 32(%esp),%xmm4 4755.byte 102,15,56,222,209 4756 pxor 48(%esp),%xmm5 4757 pxor 64(%esp),%xmm6 4758.byte 102,15,56,222,217 4759 pxor %xmm0,%xmm7 4760 movups 32(%ebp),%xmm0 4761.byte 102,15,56,222,225 4762.byte 102,15,56,222,233 4763.byte 102,15,56,222,241 4764.byte 102,15,56,222,249 4765 call .L_aesni_decrypt6_enter 4766 movdqa 80(%esp),%xmm1 4767 pxor %xmm0,%xmm0 4768 xorps (%esp),%xmm2 4769 pcmpgtd %xmm1,%xmm0 4770 xorps 16(%esp),%xmm3 4771 movups %xmm2,(%edi) 4772 xorps 32(%esp),%xmm4 4773 movups %xmm3,16(%edi) 4774 xorps 48(%esp),%xmm5 4775 movups %xmm4,32(%edi) 4776 xorps 64(%esp),%xmm6 4777 movups %xmm5,48(%edi) 4778 xorps %xmm1,%xmm7 4779 movups %xmm6,64(%edi) 4780 pshufd $19,%xmm0,%xmm2 4781 movups %xmm7,80(%edi) 4782 leal 96(%edi),%edi 4783 movdqa 96(%esp),%xmm3 4784 pxor %xmm0,%xmm0 4785 paddq %xmm1,%xmm1 4786 pand %xmm3,%xmm2 4787 pcmpgtd %xmm1,%xmm0 4788 pxor %xmm2,%xmm1 4789 subl $96,%eax 4790 jnc .L061xts_dec_loop6 4791 movl 240(%ebp),%ecx 4792 movl %ebp,%edx 4793 movl %ecx,%ebx 4794.L060xts_dec_short: 4795 addl $96,%eax 4796 jz .L062xts_dec_done6x 4797 movdqa %xmm1,%xmm5 4798 cmpl $32,%eax 4799 jb .L063xts_dec_one 4800 pshufd $19,%xmm0,%xmm2 4801 pxor %xmm0,%xmm0 4802 paddq %xmm1,%xmm1 4803 pand %xmm3,%xmm2 4804 pcmpgtd %xmm1,%xmm0 4805 pxor %xmm2,%xmm1 4806 je .L064xts_dec_two 4807 pshufd $19,%xmm0,%xmm2 4808 pxor %xmm0,%xmm0 4809 movdqa %xmm1,%xmm6 4810 paddq %xmm1,%xmm1 4811 pand %xmm3,%xmm2 4812 pcmpgtd %xmm1,%xmm0 4813 pxor %xmm2,%xmm1 4814 cmpl $64,%eax 4815 jb .L065xts_dec_three 4816 pshufd $19,%xmm0,%xmm2 4817 pxor %xmm0,%xmm0 4818 movdqa %xmm1,%xmm7 4819 paddq %xmm1,%xmm1 4820 pand %xmm3,%xmm2 4821 pcmpgtd %xmm1,%xmm0 4822 pxor %xmm2,%xmm1 4823 movdqa %xmm5,(%esp) 4824 movdqa %xmm6,16(%esp) 4825 je .L066xts_dec_four 4826 movdqa %xmm7,32(%esp) 4827 pshufd $19,%xmm0,%xmm7 4828 movdqa %xmm1,48(%esp) 4829 paddq %xmm1,%xmm1 4830 pand %xmm3,%xmm7 4831 pxor %xmm1,%xmm7 4832 movdqu (%esi),%xmm2 4833 movdqu 16(%esi),%xmm3 4834 movdqu 32(%esi),%xmm4 4835 pxor (%esp),%xmm2 4836 movdqu 48(%esi),%xmm5 4837 pxor 16(%esp),%xmm3 4838 movdqu 64(%esi),%xmm6 4839 pxor 32(%esp),%xmm4 4840 leal 80(%esi),%esi 4841 pxor 48(%esp),%xmm5 4842 movdqa %xmm7,64(%esp) 4843 pxor %xmm7,%xmm6 4844 call _aesni_decrypt6 4845 movaps 64(%esp),%xmm1 4846 xorps (%esp),%xmm2 4847 xorps 16(%esp),%xmm3 4848 xorps 32(%esp),%xmm4 4849 movups %xmm2,(%edi) 4850 xorps 48(%esp),%xmm5 4851 movups %xmm3,16(%edi) 4852 xorps %xmm1,%xmm6 4853 movups %xmm4,32(%edi) 4854 movups %xmm5,48(%edi) 4855 movups %xmm6,64(%edi) 4856 leal 80(%edi),%edi 4857 jmp .L067xts_dec_done 4858.align 16 4859.L063xts_dec_one: 4860 movups (%esi),%xmm2 4861 leal 16(%esi),%esi 4862 xorps %xmm5,%xmm2 4863 movups (%edx),%xmm0 4864 movups 16(%edx),%xmm1 4865 leal 32(%edx),%edx 4866 xorps %xmm0,%xmm2 4867.L068dec1_loop_12: 4868.byte 102,15,56,222,209 4869 decl %ecx 4870 movups (%edx),%xmm1 4871 leal 16(%edx),%edx 4872 jnz .L068dec1_loop_12 4873.byte 102,15,56,223,209 4874 xorps %xmm5,%xmm2 4875 movups %xmm2,(%edi) 4876 leal 16(%edi),%edi 4877 movdqa %xmm5,%xmm1 4878 jmp .L067xts_dec_done 4879.align 16 4880.L064xts_dec_two: 4881 movaps %xmm1,%xmm6 4882 movups (%esi),%xmm2 4883 movups 16(%esi),%xmm3 4884 leal 32(%esi),%esi 4885 xorps %xmm5,%xmm2 4886 xorps %xmm6,%xmm3 4887 call _aesni_decrypt2 4888 xorps %xmm5,%xmm2 4889 xorps %xmm6,%xmm3 4890 movups %xmm2,(%edi) 4891 movups %xmm3,16(%edi) 4892 leal 32(%edi),%edi 4893 movdqa %xmm6,%xmm1 4894 jmp .L067xts_dec_done 4895.align 16 4896.L065xts_dec_three: 4897 movaps %xmm1,%xmm7 4898 movups (%esi),%xmm2 4899 movups 16(%esi),%xmm3 4900 movups 32(%esi),%xmm4 4901 leal 48(%esi),%esi 4902 xorps %xmm5,%xmm2 4903 xorps %xmm6,%xmm3 4904 xorps %xmm7,%xmm4 4905 call _aesni_decrypt3 4906 xorps %xmm5,%xmm2 4907 xorps %xmm6,%xmm3 4908 xorps %xmm7,%xmm4 4909 movups %xmm2,(%edi) 4910 movups %xmm3,16(%edi) 4911 movups %xmm4,32(%edi) 4912 leal 48(%edi),%edi 4913 movdqa %xmm7,%xmm1 4914 jmp .L067xts_dec_done 4915.align 16 4916.L066xts_dec_four: 4917 movaps %xmm1,%xmm6 4918 movups (%esi),%xmm2 4919 movups 16(%esi),%xmm3 4920 movups 32(%esi),%xmm4 4921 xorps (%esp),%xmm2 4922 movups 48(%esi),%xmm5 4923 leal 64(%esi),%esi 4924 xorps 16(%esp),%xmm3 4925 xorps %xmm7,%xmm4 4926 xorps %xmm6,%xmm5 4927 call _aesni_decrypt4 4928 xorps (%esp),%xmm2 4929 xorps 16(%esp),%xmm3 4930 xorps %xmm7,%xmm4 4931 movups %xmm2,(%edi) 4932 xorps %xmm6,%xmm5 4933 movups %xmm3,16(%edi) 4934 movups %xmm4,32(%edi) 4935 movups %xmm5,48(%edi) 4936 leal 64(%edi),%edi 4937 movdqa %xmm6,%xmm1 4938 jmp .L067xts_dec_done 4939.align 16 4940.L062xts_dec_done6x: 4941 movl 112(%esp),%eax 4942 andl $15,%eax 4943 jz .L069xts_dec_ret 4944 movl %eax,112(%esp) 4945 jmp .L070xts_dec_only_one_more 4946.align 16 4947.L067xts_dec_done: 4948 movl 112(%esp),%eax 4949 pxor %xmm0,%xmm0 4950 andl $15,%eax 4951 jz .L069xts_dec_ret 4952 pcmpgtd %xmm1,%xmm0 4953 movl %eax,112(%esp) 4954 pshufd $19,%xmm0,%xmm2 4955 pxor %xmm0,%xmm0 4956 movdqa 96(%esp),%xmm3 4957 paddq %xmm1,%xmm1 4958 pand %xmm3,%xmm2 4959 pcmpgtd %xmm1,%xmm0 4960 pxor %xmm2,%xmm1 4961.L070xts_dec_only_one_more: 4962 pshufd $19,%xmm0,%xmm5 4963 movdqa %xmm1,%xmm6 4964 paddq %xmm1,%xmm1 4965 pand %xmm3,%xmm5 4966 pxor %xmm1,%xmm5 4967 movl %ebp,%edx 4968 movl %ebx,%ecx 4969 movups (%esi),%xmm2 4970 xorps %xmm5,%xmm2 4971 movups (%edx),%xmm0 4972 movups 16(%edx),%xmm1 4973 leal 32(%edx),%edx 4974 xorps %xmm0,%xmm2 4975.L071dec1_loop_13: 4976.byte 102,15,56,222,209 4977 decl %ecx 4978 movups (%edx),%xmm1 4979 leal 16(%edx),%edx 4980 jnz .L071dec1_loop_13 4981.byte 102,15,56,223,209 4982 xorps %xmm5,%xmm2 4983 movups %xmm2,(%edi) 4984.L072xts_dec_steal: 4985 movzbl 16(%esi),%ecx 4986 movzbl (%edi),%edx 4987 leal 1(%esi),%esi 4988 movb %cl,(%edi) 4989 movb %dl,16(%edi) 4990 leal 1(%edi),%edi 4991 subl $1,%eax 4992 jnz .L072xts_dec_steal 4993 subl 112(%esp),%edi 4994 movl %ebp,%edx 4995 movl %ebx,%ecx 4996 movups (%edi),%xmm2 4997 xorps %xmm6,%xmm2 4998 movups (%edx),%xmm0 4999 movups 16(%edx),%xmm1 5000 leal 32(%edx),%edx 5001 xorps %xmm0,%xmm2 5002.L073dec1_loop_14: 5003.byte 102,15,56,222,209 5004 decl %ecx 5005 movups (%edx),%xmm1 5006 leal 16(%edx),%edx 5007 jnz .L073dec1_loop_14 5008.byte 102,15,56,223,209 5009 xorps %xmm6,%xmm2 5010 movups %xmm2,(%edi) 5011.L069xts_dec_ret: 5012 pxor %xmm0,%xmm0 5013 pxor %xmm1,%xmm1 5014 pxor %xmm2,%xmm2 5015 movdqa %xmm0,(%esp) 5016 pxor %xmm3,%xmm3 5017 movdqa %xmm0,16(%esp) 5018 pxor %xmm4,%xmm4 5019 movdqa %xmm0,32(%esp) 5020 pxor %xmm5,%xmm5 5021 movdqa %xmm0,48(%esp) 5022 pxor %xmm6,%xmm6 5023 movdqa %xmm0,64(%esp) 5024 pxor %xmm7,%xmm7 5025 movdqa %xmm0,80(%esp) 5026 movl 116(%esp),%esp 5027 popl %edi 5028 popl %esi 5029 popl %ebx 5030 popl %ebp 5031 ret 5032.size aesni_xts_decrypt,.-.L_aesni_xts_decrypt_begin 5033.globl aesni_ocb_encrypt 5034.type aesni_ocb_encrypt,@function 5035.align 16 5036aesni_ocb_encrypt: 5037.L_aesni_ocb_encrypt_begin: 5038 pushl %ebp 5039 pushl %ebx 5040 pushl %esi 5041 pushl %edi 5042 movl 40(%esp),%ecx 5043 movl 48(%esp),%ebx 5044 movl 20(%esp),%esi 5045 movl 24(%esp),%edi 5046 movl 28(%esp),%eax 5047 movl 32(%esp),%edx 5048 movdqu (%ecx),%xmm0 5049 movl 36(%esp),%ebp 5050 movdqu (%ebx),%xmm1 5051 movl 44(%esp),%ebx 5052 movl %esp,%ecx 5053 subl $132,%esp 5054 andl $-16,%esp 5055 subl %esi,%edi 5056 shll $4,%eax 5057 leal -96(%esi,%eax,1),%eax 5058 movl %edi,120(%esp) 5059 movl %eax,124(%esp) 5060 movl %ecx,128(%esp) 5061 movl 240(%edx),%ecx 5062 testl $1,%ebp 5063 jnz .L074odd 5064 bsfl %ebp,%eax 5065 addl $1,%ebp 5066 shll $4,%eax 5067 movdqu (%ebx,%eax,1),%xmm7 5068 movl %edx,%eax 5069 movdqu (%esi),%xmm2 5070 leal 16(%esi),%esi 5071 pxor %xmm0,%xmm7 5072 pxor %xmm2,%xmm1 5073 pxor %xmm7,%xmm2 5074 movdqa %xmm1,%xmm6 5075 movups (%edx),%xmm0 5076 movups 16(%edx),%xmm1 5077 leal 32(%edx),%edx 5078 xorps %xmm0,%xmm2 5079.L075enc1_loop_15: 5080.byte 102,15,56,220,209 5081 decl %ecx 5082 movups (%edx),%xmm1 5083 leal 16(%edx),%edx 5084 jnz .L075enc1_loop_15 5085.byte 102,15,56,221,209 5086 xorps %xmm7,%xmm2 5087 movdqa %xmm7,%xmm0 5088 movdqa %xmm6,%xmm1 5089 movups %xmm2,-16(%edi,%esi,1) 5090 movl 240(%eax),%ecx 5091 movl %eax,%edx 5092 movl 124(%esp),%eax 5093.L074odd: 5094 shll $4,%ecx 5095 movl $16,%edi 5096 subl %ecx,%edi 5097 movl %edx,112(%esp) 5098 leal 32(%edx,%ecx,1),%edx 5099 movl %edi,116(%esp) 5100 cmpl %eax,%esi 5101 ja .L076short 5102 jmp .L077grandloop 5103.align 32 5104.L077grandloop: 5105 leal 1(%ebp),%ecx 5106 leal 3(%ebp),%eax 5107 leal 5(%ebp),%edi 5108 addl $6,%ebp 5109 bsfl %ecx,%ecx 5110 bsfl %eax,%eax 5111 bsfl %edi,%edi 5112 shll $4,%ecx 5113 shll $4,%eax 5114 shll $4,%edi 5115 movdqu (%ebx),%xmm2 5116 movdqu (%ebx,%ecx,1),%xmm3 5117 movl 116(%esp),%ecx 5118 movdqa %xmm2,%xmm4 5119 movdqu (%ebx,%eax,1),%xmm5 5120 movdqa %xmm2,%xmm6 5121 movdqu (%ebx,%edi,1),%xmm7 5122 pxor %xmm0,%xmm2 5123 pxor %xmm2,%xmm3 5124 movdqa %xmm2,(%esp) 5125 pxor %xmm3,%xmm4 5126 movdqa %xmm3,16(%esp) 5127 pxor %xmm4,%xmm5 5128 movdqa %xmm4,32(%esp) 5129 pxor %xmm5,%xmm6 5130 movdqa %xmm5,48(%esp) 5131 pxor %xmm6,%xmm7 5132 movdqa %xmm6,64(%esp) 5133 movdqa %xmm7,80(%esp) 5134 movups -48(%edx,%ecx,1),%xmm0 5135 movdqu (%esi),%xmm2 5136 movdqu 16(%esi),%xmm3 5137 movdqu 32(%esi),%xmm4 5138 movdqu 48(%esi),%xmm5 5139 movdqu 64(%esi),%xmm6 5140 movdqu 80(%esi),%xmm7 5141 leal 96(%esi),%esi 5142 pxor %xmm2,%xmm1 5143 pxor %xmm0,%xmm2 5144 pxor %xmm3,%xmm1 5145 pxor %xmm0,%xmm3 5146 pxor %xmm4,%xmm1 5147 pxor %xmm0,%xmm4 5148 pxor %xmm5,%xmm1 5149 pxor %xmm0,%xmm5 5150 pxor %xmm6,%xmm1 5151 pxor %xmm0,%xmm6 5152 pxor %xmm7,%xmm1 5153 pxor %xmm0,%xmm7 5154 movdqa %xmm1,96(%esp) 5155 movups -32(%edx,%ecx,1),%xmm1 5156 pxor (%esp),%xmm2 5157 pxor 16(%esp),%xmm3 5158 pxor 32(%esp),%xmm4 5159 pxor 48(%esp),%xmm5 5160 pxor 64(%esp),%xmm6 5161 pxor 80(%esp),%xmm7 5162 movups -16(%edx,%ecx,1),%xmm0 5163.byte 102,15,56,220,209 5164.byte 102,15,56,220,217 5165.byte 102,15,56,220,225 5166.byte 102,15,56,220,233 5167.byte 102,15,56,220,241 5168.byte 102,15,56,220,249 5169 movl 120(%esp),%edi 5170 movl 124(%esp),%eax 5171 call .L_aesni_encrypt6_enter 5172 movdqa 80(%esp),%xmm0 5173 pxor (%esp),%xmm2 5174 pxor 16(%esp),%xmm3 5175 pxor 32(%esp),%xmm4 5176 pxor 48(%esp),%xmm5 5177 pxor 64(%esp),%xmm6 5178 pxor %xmm0,%xmm7 5179 movdqa 96(%esp),%xmm1 5180 movdqu %xmm2,-96(%edi,%esi,1) 5181 movdqu %xmm3,-80(%edi,%esi,1) 5182 movdqu %xmm4,-64(%edi,%esi,1) 5183 movdqu %xmm5,-48(%edi,%esi,1) 5184 movdqu %xmm6,-32(%edi,%esi,1) 5185 movdqu %xmm7,-16(%edi,%esi,1) 5186 cmpl %eax,%esi 5187 jb .L077grandloop 5188.L076short: 5189 addl $96,%eax 5190 subl %esi,%eax 5191 jz .L078done 5192 cmpl $32,%eax 5193 jb .L079one 5194 je .L080two 5195 cmpl $64,%eax 5196 jb .L081three 5197 je .L082four 5198 leal 1(%ebp),%ecx 5199 leal 3(%ebp),%eax 5200 bsfl %ecx,%ecx 5201 bsfl %eax,%eax 5202 shll $4,%ecx 5203 shll $4,%eax 5204 movdqu (%ebx),%xmm2 5205 movdqu (%ebx,%ecx,1),%xmm3 5206 movl 116(%esp),%ecx 5207 movdqa %xmm2,%xmm4 5208 movdqu (%ebx,%eax,1),%xmm5 5209 movdqa %xmm2,%xmm6 5210 pxor %xmm0,%xmm2 5211 pxor %xmm2,%xmm3 5212 movdqa %xmm2,(%esp) 5213 pxor %xmm3,%xmm4 5214 movdqa %xmm3,16(%esp) 5215 pxor %xmm4,%xmm5 5216 movdqa %xmm4,32(%esp) 5217 pxor %xmm5,%xmm6 5218 movdqa %xmm5,48(%esp) 5219 pxor %xmm6,%xmm7 5220 movdqa %xmm6,64(%esp) 5221 movups -48(%edx,%ecx,1),%xmm0 5222 movdqu (%esi),%xmm2 5223 movdqu 16(%esi),%xmm3 5224 movdqu 32(%esi),%xmm4 5225 movdqu 48(%esi),%xmm5 5226 movdqu 64(%esi),%xmm6 5227 pxor %xmm7,%xmm7 5228 pxor %xmm2,%xmm1 5229 pxor %xmm0,%xmm2 5230 pxor %xmm3,%xmm1 5231 pxor %xmm0,%xmm3 5232 pxor %xmm4,%xmm1 5233 pxor %xmm0,%xmm4 5234 pxor %xmm5,%xmm1 5235 pxor %xmm0,%xmm5 5236 pxor %xmm6,%xmm1 5237 pxor %xmm0,%xmm6 5238 movdqa %xmm1,96(%esp) 5239 movups -32(%edx,%ecx,1),%xmm1 5240 pxor (%esp),%xmm2 5241 pxor 16(%esp),%xmm3 5242 pxor 32(%esp),%xmm4 5243 pxor 48(%esp),%xmm5 5244 pxor 64(%esp),%xmm6 5245 movups -16(%edx,%ecx,1),%xmm0 5246.byte 102,15,56,220,209 5247.byte 102,15,56,220,217 5248.byte 102,15,56,220,225 5249.byte 102,15,56,220,233 5250.byte 102,15,56,220,241 5251.byte 102,15,56,220,249 5252 movl 120(%esp),%edi 5253 call .L_aesni_encrypt6_enter 5254 movdqa 64(%esp),%xmm0 5255 pxor (%esp),%xmm2 5256 pxor 16(%esp),%xmm3 5257 pxor 32(%esp),%xmm4 5258 pxor 48(%esp),%xmm5 5259 pxor %xmm0,%xmm6 5260 movdqa 96(%esp),%xmm1 5261 movdqu %xmm2,(%edi,%esi,1) 5262 movdqu %xmm3,16(%edi,%esi,1) 5263 movdqu %xmm4,32(%edi,%esi,1) 5264 movdqu %xmm5,48(%edi,%esi,1) 5265 movdqu %xmm6,64(%edi,%esi,1) 5266 jmp .L078done 5267.align 16 5268.L079one: 5269 movdqu (%ebx),%xmm7 5270 movl 112(%esp),%edx 5271 movdqu (%esi),%xmm2 5272 movl 240(%edx),%ecx 5273 pxor %xmm0,%xmm7 5274 pxor %xmm2,%xmm1 5275 pxor %xmm7,%xmm2 5276 movdqa %xmm1,%xmm6 5277 movl 120(%esp),%edi 5278 movups (%edx),%xmm0 5279 movups 16(%edx),%xmm1 5280 leal 32(%edx),%edx 5281 xorps %xmm0,%xmm2 5282.L083enc1_loop_16: 5283.byte 102,15,56,220,209 5284 decl %ecx 5285 movups (%edx),%xmm1 5286 leal 16(%edx),%edx 5287 jnz .L083enc1_loop_16 5288.byte 102,15,56,221,209 5289 xorps %xmm7,%xmm2 5290 movdqa %xmm7,%xmm0 5291 movdqa %xmm6,%xmm1 5292 movups %xmm2,(%edi,%esi,1) 5293 jmp .L078done 5294.align 16 5295.L080two: 5296 leal 1(%ebp),%ecx 5297 movl 112(%esp),%edx 5298 bsfl %ecx,%ecx 5299 shll $4,%ecx 5300 movdqu (%ebx),%xmm6 5301 movdqu (%ebx,%ecx,1),%xmm7 5302 movdqu (%esi),%xmm2 5303 movdqu 16(%esi),%xmm3 5304 movl 240(%edx),%ecx 5305 pxor %xmm0,%xmm6 5306 pxor %xmm6,%xmm7 5307 pxor %xmm2,%xmm1 5308 pxor %xmm6,%xmm2 5309 pxor %xmm3,%xmm1 5310 pxor %xmm7,%xmm3 5311 movdqa %xmm1,%xmm5 5312 movl 120(%esp),%edi 5313 call _aesni_encrypt2 5314 xorps %xmm6,%xmm2 5315 xorps %xmm7,%xmm3 5316 movdqa %xmm7,%xmm0 5317 movdqa %xmm5,%xmm1 5318 movups %xmm2,(%edi,%esi,1) 5319 movups %xmm3,16(%edi,%esi,1) 5320 jmp .L078done 5321.align 16 5322.L081three: 5323 leal 1(%ebp),%ecx 5324 movl 112(%esp),%edx 5325 bsfl %ecx,%ecx 5326 shll $4,%ecx 5327 movdqu (%ebx),%xmm5 5328 movdqu (%ebx,%ecx,1),%xmm6 5329 movdqa %xmm5,%xmm7 5330 movdqu (%esi),%xmm2 5331 movdqu 16(%esi),%xmm3 5332 movdqu 32(%esi),%xmm4 5333 movl 240(%edx),%ecx 5334 pxor %xmm0,%xmm5 5335 pxor %xmm5,%xmm6 5336 pxor %xmm6,%xmm7 5337 pxor %xmm2,%xmm1 5338 pxor %xmm5,%xmm2 5339 pxor %xmm3,%xmm1 5340 pxor %xmm6,%xmm3 5341 pxor %xmm4,%xmm1 5342 pxor %xmm7,%xmm4 5343 movdqa %xmm1,96(%esp) 5344 movl 120(%esp),%edi 5345 call _aesni_encrypt3 5346 xorps %xmm5,%xmm2 5347 xorps %xmm6,%xmm3 5348 xorps %xmm7,%xmm4 5349 movdqa %xmm7,%xmm0 5350 movdqa 96(%esp),%xmm1 5351 movups %xmm2,(%edi,%esi,1) 5352 movups %xmm3,16(%edi,%esi,1) 5353 movups %xmm4,32(%edi,%esi,1) 5354 jmp .L078done 5355.align 16 5356.L082four: 5357 leal 1(%ebp),%ecx 5358 leal 3(%ebp),%eax 5359 bsfl %ecx,%ecx 5360 bsfl %eax,%eax 5361 movl 112(%esp),%edx 5362 shll $4,%ecx 5363 shll $4,%eax 5364 movdqu (%ebx),%xmm4 5365 movdqu (%ebx,%ecx,1),%xmm5 5366 movdqa %xmm4,%xmm6 5367 movdqu (%ebx,%eax,1),%xmm7 5368 pxor %xmm0,%xmm4 5369 movdqu (%esi),%xmm2 5370 pxor %xmm4,%xmm5 5371 movdqu 16(%esi),%xmm3 5372 pxor %xmm5,%xmm6 5373 movdqa %xmm4,(%esp) 5374 pxor %xmm6,%xmm7 5375 movdqa %xmm5,16(%esp) 5376 movdqu 32(%esi),%xmm4 5377 movdqu 48(%esi),%xmm5 5378 movl 240(%edx),%ecx 5379 pxor %xmm2,%xmm1 5380 pxor (%esp),%xmm2 5381 pxor %xmm3,%xmm1 5382 pxor 16(%esp),%xmm3 5383 pxor %xmm4,%xmm1 5384 pxor %xmm6,%xmm4 5385 pxor %xmm5,%xmm1 5386 pxor %xmm7,%xmm5 5387 movdqa %xmm1,96(%esp) 5388 movl 120(%esp),%edi 5389 call _aesni_encrypt4 5390 xorps (%esp),%xmm2 5391 xorps 16(%esp),%xmm3 5392 xorps %xmm6,%xmm4 5393 movups %xmm2,(%edi,%esi,1) 5394 xorps %xmm7,%xmm5 5395 movups %xmm3,16(%edi,%esi,1) 5396 movdqa %xmm7,%xmm0 5397 movups %xmm4,32(%edi,%esi,1) 5398 movdqa 96(%esp),%xmm1 5399 movups %xmm5,48(%edi,%esi,1) 5400.L078done: 5401 movl 128(%esp),%edx 5402 pxor %xmm2,%xmm2 5403 pxor %xmm3,%xmm3 5404 movdqa %xmm2,(%esp) 5405 pxor %xmm4,%xmm4 5406 movdqa %xmm2,16(%esp) 5407 pxor %xmm5,%xmm5 5408 movdqa %xmm2,32(%esp) 5409 pxor %xmm6,%xmm6 5410 movdqa %xmm2,48(%esp) 5411 pxor %xmm7,%xmm7 5412 movdqa %xmm2,64(%esp) 5413 movdqa %xmm2,80(%esp) 5414 movdqa %xmm2,96(%esp) 5415 leal (%edx),%esp 5416 movl 40(%esp),%ecx 5417 movl 48(%esp),%ebx 5418 movdqu %xmm0,(%ecx) 5419 pxor %xmm0,%xmm0 5420 movdqu %xmm1,(%ebx) 5421 pxor %xmm1,%xmm1 5422 popl %edi 5423 popl %esi 5424 popl %ebx 5425 popl %ebp 5426 ret 5427.size aesni_ocb_encrypt,.-.L_aesni_ocb_encrypt_begin 5428.globl aesni_ocb_decrypt 5429.type aesni_ocb_decrypt,@function 5430.align 16 5431aesni_ocb_decrypt: 5432.L_aesni_ocb_decrypt_begin: 5433 pushl %ebp 5434 pushl %ebx 5435 pushl %esi 5436 pushl %edi 5437 movl 40(%esp),%ecx 5438 movl 48(%esp),%ebx 5439 movl 20(%esp),%esi 5440 movl 24(%esp),%edi 5441 movl 28(%esp),%eax 5442 movl 32(%esp),%edx 5443 movdqu (%ecx),%xmm0 5444 movl 36(%esp),%ebp 5445 movdqu (%ebx),%xmm1 5446 movl 44(%esp),%ebx 5447 movl %esp,%ecx 5448 subl $132,%esp 5449 andl $-16,%esp 5450 subl %esi,%edi 5451 shll $4,%eax 5452 leal -96(%esi,%eax,1),%eax 5453 movl %edi,120(%esp) 5454 movl %eax,124(%esp) 5455 movl %ecx,128(%esp) 5456 movl 240(%edx),%ecx 5457 testl $1,%ebp 5458 jnz .L084odd 5459 bsfl %ebp,%eax 5460 addl $1,%ebp 5461 shll $4,%eax 5462 movdqu (%ebx,%eax,1),%xmm7 5463 movl %edx,%eax 5464 movdqu (%esi),%xmm2 5465 leal 16(%esi),%esi 5466 pxor %xmm0,%xmm7 5467 pxor %xmm7,%xmm2 5468 movdqa %xmm1,%xmm6 5469 movups (%edx),%xmm0 5470 movups 16(%edx),%xmm1 5471 leal 32(%edx),%edx 5472 xorps %xmm0,%xmm2 5473.L085dec1_loop_17: 5474.byte 102,15,56,222,209 5475 decl %ecx 5476 movups (%edx),%xmm1 5477 leal 16(%edx),%edx 5478 jnz .L085dec1_loop_17 5479.byte 102,15,56,223,209 5480 xorps %xmm7,%xmm2 5481 movaps %xmm6,%xmm1 5482 movdqa %xmm7,%xmm0 5483 xorps %xmm2,%xmm1 5484 movups %xmm2,-16(%edi,%esi,1) 5485 movl 240(%eax),%ecx 5486 movl %eax,%edx 5487 movl 124(%esp),%eax 5488.L084odd: 5489 shll $4,%ecx 5490 movl $16,%edi 5491 subl %ecx,%edi 5492 movl %edx,112(%esp) 5493 leal 32(%edx,%ecx,1),%edx 5494 movl %edi,116(%esp) 5495 cmpl %eax,%esi 5496 ja .L086short 5497 jmp .L087grandloop 5498.align 32 5499.L087grandloop: 5500 leal 1(%ebp),%ecx 5501 leal 3(%ebp),%eax 5502 leal 5(%ebp),%edi 5503 addl $6,%ebp 5504 bsfl %ecx,%ecx 5505 bsfl %eax,%eax 5506 bsfl %edi,%edi 5507 shll $4,%ecx 5508 shll $4,%eax 5509 shll $4,%edi 5510 movdqu (%ebx),%xmm2 5511 movdqu (%ebx,%ecx,1),%xmm3 5512 movl 116(%esp),%ecx 5513 movdqa %xmm2,%xmm4 5514 movdqu (%ebx,%eax,1),%xmm5 5515 movdqa %xmm2,%xmm6 5516 movdqu (%ebx,%edi,1),%xmm7 5517 pxor %xmm0,%xmm2 5518 pxor %xmm2,%xmm3 5519 movdqa %xmm2,(%esp) 5520 pxor %xmm3,%xmm4 5521 movdqa %xmm3,16(%esp) 5522 pxor %xmm4,%xmm5 5523 movdqa %xmm4,32(%esp) 5524 pxor %xmm5,%xmm6 5525 movdqa %xmm5,48(%esp) 5526 pxor %xmm6,%xmm7 5527 movdqa %xmm6,64(%esp) 5528 movdqa %xmm7,80(%esp) 5529 movups -48(%edx,%ecx,1),%xmm0 5530 movdqu (%esi),%xmm2 5531 movdqu 16(%esi),%xmm3 5532 movdqu 32(%esi),%xmm4 5533 movdqu 48(%esi),%xmm5 5534 movdqu 64(%esi),%xmm6 5535 movdqu 80(%esi),%xmm7 5536 leal 96(%esi),%esi 5537 movdqa %xmm1,96(%esp) 5538 pxor %xmm0,%xmm2 5539 pxor %xmm0,%xmm3 5540 pxor %xmm0,%xmm4 5541 pxor %xmm0,%xmm5 5542 pxor %xmm0,%xmm6 5543 pxor %xmm0,%xmm7 5544 movups -32(%edx,%ecx,1),%xmm1 5545 pxor (%esp),%xmm2 5546 pxor 16(%esp),%xmm3 5547 pxor 32(%esp),%xmm4 5548 pxor 48(%esp),%xmm5 5549 pxor 64(%esp),%xmm6 5550 pxor 80(%esp),%xmm7 5551 movups -16(%edx,%ecx,1),%xmm0 5552.byte 102,15,56,222,209 5553.byte 102,15,56,222,217 5554.byte 102,15,56,222,225 5555.byte 102,15,56,222,233 5556.byte 102,15,56,222,241 5557.byte 102,15,56,222,249 5558 movl 120(%esp),%edi 5559 movl 124(%esp),%eax 5560 call .L_aesni_decrypt6_enter 5561 movdqa 80(%esp),%xmm0 5562 pxor (%esp),%xmm2 5563 movdqa 96(%esp),%xmm1 5564 pxor 16(%esp),%xmm3 5565 pxor 32(%esp),%xmm4 5566 pxor 48(%esp),%xmm5 5567 pxor 64(%esp),%xmm6 5568 pxor %xmm0,%xmm7 5569 pxor %xmm2,%xmm1 5570 movdqu %xmm2,-96(%edi,%esi,1) 5571 pxor %xmm3,%xmm1 5572 movdqu %xmm3,-80(%edi,%esi,1) 5573 pxor %xmm4,%xmm1 5574 movdqu %xmm4,-64(%edi,%esi,1) 5575 pxor %xmm5,%xmm1 5576 movdqu %xmm5,-48(%edi,%esi,1) 5577 pxor %xmm6,%xmm1 5578 movdqu %xmm6,-32(%edi,%esi,1) 5579 pxor %xmm7,%xmm1 5580 movdqu %xmm7,-16(%edi,%esi,1) 5581 cmpl %eax,%esi 5582 jb .L087grandloop 5583.L086short: 5584 addl $96,%eax 5585 subl %esi,%eax 5586 jz .L088done 5587 cmpl $32,%eax 5588 jb .L089one 5589 je .L090two 5590 cmpl $64,%eax 5591 jb .L091three 5592 je .L092four 5593 leal 1(%ebp),%ecx 5594 leal 3(%ebp),%eax 5595 bsfl %ecx,%ecx 5596 bsfl %eax,%eax 5597 shll $4,%ecx 5598 shll $4,%eax 5599 movdqu (%ebx),%xmm2 5600 movdqu (%ebx,%ecx,1),%xmm3 5601 movl 116(%esp),%ecx 5602 movdqa %xmm2,%xmm4 5603 movdqu (%ebx,%eax,1),%xmm5 5604 movdqa %xmm2,%xmm6 5605 pxor %xmm0,%xmm2 5606 pxor %xmm2,%xmm3 5607 movdqa %xmm2,(%esp) 5608 pxor %xmm3,%xmm4 5609 movdqa %xmm3,16(%esp) 5610 pxor %xmm4,%xmm5 5611 movdqa %xmm4,32(%esp) 5612 pxor %xmm5,%xmm6 5613 movdqa %xmm5,48(%esp) 5614 pxor %xmm6,%xmm7 5615 movdqa %xmm6,64(%esp) 5616 movups -48(%edx,%ecx,1),%xmm0 5617 movdqu (%esi),%xmm2 5618 movdqu 16(%esi),%xmm3 5619 movdqu 32(%esi),%xmm4 5620 movdqu 48(%esi),%xmm5 5621 movdqu 64(%esi),%xmm6 5622 pxor %xmm7,%xmm7 5623 movdqa %xmm1,96(%esp) 5624 pxor %xmm0,%xmm2 5625 pxor %xmm0,%xmm3 5626 pxor %xmm0,%xmm4 5627 pxor %xmm0,%xmm5 5628 pxor %xmm0,%xmm6 5629 movups -32(%edx,%ecx,1),%xmm1 5630 pxor (%esp),%xmm2 5631 pxor 16(%esp),%xmm3 5632 pxor 32(%esp),%xmm4 5633 pxor 48(%esp),%xmm5 5634 pxor 64(%esp),%xmm6 5635 movups -16(%edx,%ecx,1),%xmm0 5636.byte 102,15,56,222,209 5637.byte 102,15,56,222,217 5638.byte 102,15,56,222,225 5639.byte 102,15,56,222,233 5640.byte 102,15,56,222,241 5641.byte 102,15,56,222,249 5642 movl 120(%esp),%edi 5643 call .L_aesni_decrypt6_enter 5644 movdqa 64(%esp),%xmm0 5645 pxor (%esp),%xmm2 5646 movdqa 96(%esp),%xmm1 5647 pxor 16(%esp),%xmm3 5648 pxor 32(%esp),%xmm4 5649 pxor 48(%esp),%xmm5 5650 pxor %xmm0,%xmm6 5651 pxor %xmm2,%xmm1 5652 movdqu %xmm2,(%edi,%esi,1) 5653 pxor %xmm3,%xmm1 5654 movdqu %xmm3,16(%edi,%esi,1) 5655 pxor %xmm4,%xmm1 5656 movdqu %xmm4,32(%edi,%esi,1) 5657 pxor %xmm5,%xmm1 5658 movdqu %xmm5,48(%edi,%esi,1) 5659 pxor %xmm6,%xmm1 5660 movdqu %xmm6,64(%edi,%esi,1) 5661 jmp .L088done 5662.align 16 5663.L089one: 5664 movdqu (%ebx),%xmm7 5665 movl 112(%esp),%edx 5666 movdqu (%esi),%xmm2 5667 movl 240(%edx),%ecx 5668 pxor %xmm0,%xmm7 5669 pxor %xmm7,%xmm2 5670 movdqa %xmm1,%xmm6 5671 movl 120(%esp),%edi 5672 movups (%edx),%xmm0 5673 movups 16(%edx),%xmm1 5674 leal 32(%edx),%edx 5675 xorps %xmm0,%xmm2 5676.L093dec1_loop_18: 5677.byte 102,15,56,222,209 5678 decl %ecx 5679 movups (%edx),%xmm1 5680 leal 16(%edx),%edx 5681 jnz .L093dec1_loop_18 5682.byte 102,15,56,223,209 5683 xorps %xmm7,%xmm2 5684 movaps %xmm6,%xmm1 5685 movdqa %xmm7,%xmm0 5686 xorps %xmm2,%xmm1 5687 movups %xmm2,(%edi,%esi,1) 5688 jmp .L088done 5689.align 16 5690.L090two: 5691 leal 1(%ebp),%ecx 5692 movl 112(%esp),%edx 5693 bsfl %ecx,%ecx 5694 shll $4,%ecx 5695 movdqu (%ebx),%xmm6 5696 movdqu (%ebx,%ecx,1),%xmm7 5697 movdqu (%esi),%xmm2 5698 movdqu 16(%esi),%xmm3 5699 movl 240(%edx),%ecx 5700 movdqa %xmm1,%xmm5 5701 pxor %xmm0,%xmm6 5702 pxor %xmm6,%xmm7 5703 pxor %xmm6,%xmm2 5704 pxor %xmm7,%xmm3 5705 movl 120(%esp),%edi 5706 call _aesni_decrypt2 5707 xorps %xmm6,%xmm2 5708 xorps %xmm7,%xmm3 5709 movdqa %xmm7,%xmm0 5710 xorps %xmm2,%xmm5 5711 movups %xmm2,(%edi,%esi,1) 5712 xorps %xmm3,%xmm5 5713 movups %xmm3,16(%edi,%esi,1) 5714 movaps %xmm5,%xmm1 5715 jmp .L088done 5716.align 16 5717.L091three: 5718 leal 1(%ebp),%ecx 5719 movl 112(%esp),%edx 5720 bsfl %ecx,%ecx 5721 shll $4,%ecx 5722 movdqu (%ebx),%xmm5 5723 movdqu (%ebx,%ecx,1),%xmm6 5724 movdqa %xmm5,%xmm7 5725 movdqu (%esi),%xmm2 5726 movdqu 16(%esi),%xmm3 5727 movdqu 32(%esi),%xmm4 5728 movl 240(%edx),%ecx 5729 movdqa %xmm1,96(%esp) 5730 pxor %xmm0,%xmm5 5731 pxor %xmm5,%xmm6 5732 pxor %xmm6,%xmm7 5733 pxor %xmm5,%xmm2 5734 pxor %xmm6,%xmm3 5735 pxor %xmm7,%xmm4 5736 movl 120(%esp),%edi 5737 call _aesni_decrypt3 5738 movdqa 96(%esp),%xmm1 5739 xorps %xmm5,%xmm2 5740 xorps %xmm6,%xmm3 5741 xorps %xmm7,%xmm4 5742 movups %xmm2,(%edi,%esi,1) 5743 pxor %xmm2,%xmm1 5744 movdqa %xmm7,%xmm0 5745 movups %xmm3,16(%edi,%esi,1) 5746 pxor %xmm3,%xmm1 5747 movups %xmm4,32(%edi,%esi,1) 5748 pxor %xmm4,%xmm1 5749 jmp .L088done 5750.align 16 5751.L092four: 5752 leal 1(%ebp),%ecx 5753 leal 3(%ebp),%eax 5754 bsfl %ecx,%ecx 5755 bsfl %eax,%eax 5756 movl 112(%esp),%edx 5757 shll $4,%ecx 5758 shll $4,%eax 5759 movdqu (%ebx),%xmm4 5760 movdqu (%ebx,%ecx,1),%xmm5 5761 movdqa %xmm4,%xmm6 5762 movdqu (%ebx,%eax,1),%xmm7 5763 pxor %xmm0,%xmm4 5764 movdqu (%esi),%xmm2 5765 pxor %xmm4,%xmm5 5766 movdqu 16(%esi),%xmm3 5767 pxor %xmm5,%xmm6 5768 movdqa %xmm4,(%esp) 5769 pxor %xmm6,%xmm7 5770 movdqa %xmm5,16(%esp) 5771 movdqu 32(%esi),%xmm4 5772 movdqu 48(%esi),%xmm5 5773 movl 240(%edx),%ecx 5774 movdqa %xmm1,96(%esp) 5775 pxor (%esp),%xmm2 5776 pxor 16(%esp),%xmm3 5777 pxor %xmm6,%xmm4 5778 pxor %xmm7,%xmm5 5779 movl 120(%esp),%edi 5780 call _aesni_decrypt4 5781 movdqa 96(%esp),%xmm1 5782 xorps (%esp),%xmm2 5783 xorps 16(%esp),%xmm3 5784 xorps %xmm6,%xmm4 5785 movups %xmm2,(%edi,%esi,1) 5786 pxor %xmm2,%xmm1 5787 xorps %xmm7,%xmm5 5788 movups %xmm3,16(%edi,%esi,1) 5789 pxor %xmm3,%xmm1 5790 movdqa %xmm7,%xmm0 5791 movups %xmm4,32(%edi,%esi,1) 5792 pxor %xmm4,%xmm1 5793 movups %xmm5,48(%edi,%esi,1) 5794 pxor %xmm5,%xmm1 5795.L088done: 5796 movl 128(%esp),%edx 5797 pxor %xmm2,%xmm2 5798 pxor %xmm3,%xmm3 5799 movdqa %xmm2,(%esp) 5800 pxor %xmm4,%xmm4 5801 movdqa %xmm2,16(%esp) 5802 pxor %xmm5,%xmm5 5803 movdqa %xmm2,32(%esp) 5804 pxor %xmm6,%xmm6 5805 movdqa %xmm2,48(%esp) 5806 pxor %xmm7,%xmm7 5807 movdqa %xmm2,64(%esp) 5808 movdqa %xmm2,80(%esp) 5809 movdqa %xmm2,96(%esp) 5810 leal (%edx),%esp 5811 movl 40(%esp),%ecx 5812 movl 48(%esp),%ebx 5813 movdqu %xmm0,(%ecx) 5814 pxor %xmm0,%xmm0 5815 movdqu %xmm1,(%ebx) 5816 pxor %xmm1,%xmm1 5817 popl %edi 5818 popl %esi 5819 popl %ebx 5820 popl %ebp 5821 ret 5822.size aesni_ocb_decrypt,.-.L_aesni_ocb_decrypt_begin 5823.globl aesni_cbc_encrypt 5824.type aesni_cbc_encrypt,@function 5825.align 16 5826aesni_cbc_encrypt: 5827.L_aesni_cbc_encrypt_begin: 5828 pushl %ebp 5829 pushl %ebx 5830 pushl %esi 5831 pushl %edi 5832 movl 20(%esp),%esi 5833 movl %esp,%ebx 5834 movl 24(%esp),%edi 5835 subl $24,%ebx 5836 movl 28(%esp),%eax 5837 andl $-16,%ebx 5838 movl 32(%esp),%edx 5839 movl 36(%esp),%ebp 5840 testl %eax,%eax 5841 jz .L094cbc_abort 5842 cmpl $0,40(%esp) 5843 xchgl %esp,%ebx 5844 movups (%ebp),%xmm7 5845 movl 240(%edx),%ecx 5846 movl %edx,%ebp 5847 movl %ebx,16(%esp) 5848 movl %ecx,%ebx 5849 je .L095cbc_decrypt 5850 movaps %xmm7,%xmm2 5851 cmpl $16,%eax 5852 jb .L096cbc_enc_tail 5853 subl $16,%eax 5854 jmp .L097cbc_enc_loop 5855.align 16 5856.L097cbc_enc_loop: 5857 movups (%esi),%xmm7 5858 leal 16(%esi),%esi 5859 movups (%edx),%xmm0 5860 movups 16(%edx),%xmm1 5861 xorps %xmm0,%xmm7 5862 leal 32(%edx),%edx 5863 xorps %xmm7,%xmm2 5864.L098enc1_loop_19: 5865.byte 102,15,56,220,209 5866 decl %ecx 5867 movups (%edx),%xmm1 5868 leal 16(%edx),%edx 5869 jnz .L098enc1_loop_19 5870.byte 102,15,56,221,209 5871 movl %ebx,%ecx 5872 movl %ebp,%edx 5873 movups %xmm2,(%edi) 5874 leal 16(%edi),%edi 5875 subl $16,%eax 5876 jnc .L097cbc_enc_loop 5877 addl $16,%eax 5878 jnz .L096cbc_enc_tail 5879 movaps %xmm2,%xmm7 5880 pxor %xmm2,%xmm2 5881 jmp .L099cbc_ret 5882.L096cbc_enc_tail: 5883 movl %eax,%ecx 5884.long 2767451785 5885 movl $16,%ecx 5886 subl %eax,%ecx 5887 xorl %eax,%eax 5888.long 2868115081 5889 leal -16(%edi),%edi 5890 movl %ebx,%ecx 5891 movl %edi,%esi 5892 movl %ebp,%edx 5893 jmp .L097cbc_enc_loop 5894.align 16 5895.L095cbc_decrypt: 5896 cmpl $80,%eax 5897 jbe .L100cbc_dec_tail 5898 movaps %xmm7,(%esp) 5899 subl $80,%eax 5900 jmp .L101cbc_dec_loop6_enter 5901.align 16 5902.L102cbc_dec_loop6: 5903 movaps %xmm0,(%esp) 5904 movups %xmm7,(%edi) 5905 leal 16(%edi),%edi 5906.L101cbc_dec_loop6_enter: 5907 movdqu (%esi),%xmm2 5908 movdqu 16(%esi),%xmm3 5909 movdqu 32(%esi),%xmm4 5910 movdqu 48(%esi),%xmm5 5911 movdqu 64(%esi),%xmm6 5912 movdqu 80(%esi),%xmm7 5913 call _aesni_decrypt6 5914 movups (%esi),%xmm1 5915 movups 16(%esi),%xmm0 5916 xorps (%esp),%xmm2 5917 xorps %xmm1,%xmm3 5918 movups 32(%esi),%xmm1 5919 xorps %xmm0,%xmm4 5920 movups 48(%esi),%xmm0 5921 xorps %xmm1,%xmm5 5922 movups 64(%esi),%xmm1 5923 xorps %xmm0,%xmm6 5924 movups 80(%esi),%xmm0 5925 xorps %xmm1,%xmm7 5926 movups %xmm2,(%edi) 5927 movups %xmm3,16(%edi) 5928 leal 96(%esi),%esi 5929 movups %xmm4,32(%edi) 5930 movl %ebx,%ecx 5931 movups %xmm5,48(%edi) 5932 movl %ebp,%edx 5933 movups %xmm6,64(%edi) 5934 leal 80(%edi),%edi 5935 subl $96,%eax 5936 ja .L102cbc_dec_loop6 5937 movaps %xmm7,%xmm2 5938 movaps %xmm0,%xmm7 5939 addl $80,%eax 5940 jle .L103cbc_dec_clear_tail_collected 5941 movups %xmm2,(%edi) 5942 leal 16(%edi),%edi 5943.L100cbc_dec_tail: 5944 movups (%esi),%xmm2 5945 movaps %xmm2,%xmm6 5946 cmpl $16,%eax 5947 jbe .L104cbc_dec_one 5948 movups 16(%esi),%xmm3 5949 movaps %xmm3,%xmm5 5950 cmpl $32,%eax 5951 jbe .L105cbc_dec_two 5952 movups 32(%esi),%xmm4 5953 cmpl $48,%eax 5954 jbe .L106cbc_dec_three 5955 movups 48(%esi),%xmm5 5956 cmpl $64,%eax 5957 jbe .L107cbc_dec_four 5958 movups 64(%esi),%xmm6 5959 movaps %xmm7,(%esp) 5960 movups (%esi),%xmm2 5961 xorps %xmm7,%xmm7 5962 call _aesni_decrypt6 5963 movups (%esi),%xmm1 5964 movups 16(%esi),%xmm0 5965 xorps (%esp),%xmm2 5966 xorps %xmm1,%xmm3 5967 movups 32(%esi),%xmm1 5968 xorps %xmm0,%xmm4 5969 movups 48(%esi),%xmm0 5970 xorps %xmm1,%xmm5 5971 movups 64(%esi),%xmm7 5972 xorps %xmm0,%xmm6 5973 movups %xmm2,(%edi) 5974 movups %xmm3,16(%edi) 5975 pxor %xmm3,%xmm3 5976 movups %xmm4,32(%edi) 5977 pxor %xmm4,%xmm4 5978 movups %xmm5,48(%edi) 5979 pxor %xmm5,%xmm5 5980 leal 64(%edi),%edi 5981 movaps %xmm6,%xmm2 5982 pxor %xmm6,%xmm6 5983 subl $80,%eax 5984 jmp .L108cbc_dec_tail_collected 5985.align 16 5986.L104cbc_dec_one: 5987 movups (%edx),%xmm0 5988 movups 16(%edx),%xmm1 5989 leal 32(%edx),%edx 5990 xorps %xmm0,%xmm2 5991.L109dec1_loop_20: 5992.byte 102,15,56,222,209 5993 decl %ecx 5994 movups (%edx),%xmm1 5995 leal 16(%edx),%edx 5996 jnz .L109dec1_loop_20 5997.byte 102,15,56,223,209 5998 xorps %xmm7,%xmm2 5999 movaps %xmm6,%xmm7 6000 subl $16,%eax 6001 jmp .L108cbc_dec_tail_collected 6002.align 16 6003.L105cbc_dec_two: 6004 call _aesni_decrypt2 6005 xorps %xmm7,%xmm2 6006 xorps %xmm6,%xmm3 6007 movups %xmm2,(%edi) 6008 movaps %xmm3,%xmm2 6009 pxor %xmm3,%xmm3 6010 leal 16(%edi),%edi 6011 movaps %xmm5,%xmm7 6012 subl $32,%eax 6013 jmp .L108cbc_dec_tail_collected 6014.align 16 6015.L106cbc_dec_three: 6016 call _aesni_decrypt3 6017 xorps %xmm7,%xmm2 6018 xorps %xmm6,%xmm3 6019 xorps %xmm5,%xmm4 6020 movups %xmm2,(%edi) 6021 movaps %xmm4,%xmm2 6022 pxor %xmm4,%xmm4 6023 movups %xmm3,16(%edi) 6024 pxor %xmm3,%xmm3 6025 leal 32(%edi),%edi 6026 movups 32(%esi),%xmm7 6027 subl $48,%eax 6028 jmp .L108cbc_dec_tail_collected 6029.align 16 6030.L107cbc_dec_four: 6031 call _aesni_decrypt4 6032 movups 16(%esi),%xmm1 6033 movups 32(%esi),%xmm0 6034 xorps %xmm7,%xmm2 6035 movups 48(%esi),%xmm7 6036 xorps %xmm6,%xmm3 6037 movups %xmm2,(%edi) 6038 xorps %xmm1,%xmm4 6039 movups %xmm3,16(%edi) 6040 pxor %xmm3,%xmm3 6041 xorps %xmm0,%xmm5 6042 movups %xmm4,32(%edi) 6043 pxor %xmm4,%xmm4 6044 leal 48(%edi),%edi 6045 movaps %xmm5,%xmm2 6046 pxor %xmm5,%xmm5 6047 subl $64,%eax 6048 jmp .L108cbc_dec_tail_collected 6049.align 16 6050.L103cbc_dec_clear_tail_collected: 6051 pxor %xmm3,%xmm3 6052 pxor %xmm4,%xmm4 6053 pxor %xmm5,%xmm5 6054 pxor %xmm6,%xmm6 6055.L108cbc_dec_tail_collected: 6056 andl $15,%eax 6057 jnz .L110cbc_dec_tail_partial 6058 movups %xmm2,(%edi) 6059 pxor %xmm0,%xmm0 6060 jmp .L099cbc_ret 6061.align 16 6062.L110cbc_dec_tail_partial: 6063 movaps %xmm2,(%esp) 6064 pxor %xmm0,%xmm0 6065 movl $16,%ecx 6066 movl %esp,%esi 6067 subl %eax,%ecx 6068.long 2767451785 6069 movdqa %xmm2,(%esp) 6070.L099cbc_ret: 6071 movl 16(%esp),%esp 6072 movl 36(%esp),%ebp 6073 pxor %xmm2,%xmm2 6074 pxor %xmm1,%xmm1 6075 movups %xmm7,(%ebp) 6076 pxor %xmm7,%xmm7 6077.L094cbc_abort: 6078 popl %edi 6079 popl %esi 6080 popl %ebx 6081 popl %ebp 6082 ret 6083.size aesni_cbc_encrypt,.-.L_aesni_cbc_encrypt_begin 6084.type _aesni_set_encrypt_key,@function 6085.align 16 6086_aesni_set_encrypt_key: 6087 pushl %ebp 6088 pushl %ebx 6089 testl %eax,%eax 6090 jz .L111bad_pointer 6091 testl %edx,%edx 6092 jz .L111bad_pointer 6093 call .L112pic 6094.L112pic: 6095 popl %ebx 6096 leal .Lkey_const-.L112pic(%ebx),%ebx 6097 leal OPENSSL_ia32cap_P,%ebp 6098 movups (%eax),%xmm0 6099 xorps %xmm4,%xmm4 6100 movl 4(%ebp),%ebp 6101 leal 16(%edx),%edx 6102 andl $268437504,%ebp 6103 cmpl $256,%ecx 6104 je .L11314rounds 6105 cmpl $192,%ecx 6106 je .L11412rounds 6107 cmpl $128,%ecx 6108 jne .L115bad_keybits 6109.align 16 6110.L11610rounds: 6111 cmpl $268435456,%ebp 6112 je .L11710rounds_alt 6113 movl $9,%ecx 6114 movups %xmm0,-16(%edx) 6115.byte 102,15,58,223,200,1 6116 call .L118key_128_cold 6117.byte 102,15,58,223,200,2 6118 call .L119key_128 6119.byte 102,15,58,223,200,4 6120 call .L119key_128 6121.byte 102,15,58,223,200,8 6122 call .L119key_128 6123.byte 102,15,58,223,200,16 6124 call .L119key_128 6125.byte 102,15,58,223,200,32 6126 call .L119key_128 6127.byte 102,15,58,223,200,64 6128 call .L119key_128 6129.byte 102,15,58,223,200,128 6130 call .L119key_128 6131.byte 102,15,58,223,200,27 6132 call .L119key_128 6133.byte 102,15,58,223,200,54 6134 call .L119key_128 6135 movups %xmm0,(%edx) 6136 movl %ecx,80(%edx) 6137 jmp .L120good_key 6138.align 16 6139.L119key_128: 6140 movups %xmm0,(%edx) 6141 leal 16(%edx),%edx 6142.L118key_128_cold: 6143 shufps $16,%xmm0,%xmm4 6144 xorps %xmm4,%xmm0 6145 shufps $140,%xmm0,%xmm4 6146 xorps %xmm4,%xmm0 6147 shufps $255,%xmm1,%xmm1 6148 xorps %xmm1,%xmm0 6149 ret 6150.align 16 6151.L11710rounds_alt: 6152 movdqa (%ebx),%xmm5 6153 movl $8,%ecx 6154 movdqa 32(%ebx),%xmm4 6155 movdqa %xmm0,%xmm2 6156 movdqu %xmm0,-16(%edx) 6157.L121loop_key128: 6158.byte 102,15,56,0,197 6159.byte 102,15,56,221,196 6160 pslld $1,%xmm4 6161 leal 16(%edx),%edx 6162 movdqa %xmm2,%xmm3 6163 pslldq $4,%xmm2 6164 pxor %xmm2,%xmm3 6165 pslldq $4,%xmm2 6166 pxor %xmm2,%xmm3 6167 pslldq $4,%xmm2 6168 pxor %xmm3,%xmm2 6169 pxor %xmm2,%xmm0 6170 movdqu %xmm0,-16(%edx) 6171 movdqa %xmm0,%xmm2 6172 decl %ecx 6173 jnz .L121loop_key128 6174 movdqa 48(%ebx),%xmm4 6175.byte 102,15,56,0,197 6176.byte 102,15,56,221,196 6177 pslld $1,%xmm4 6178 movdqa %xmm2,%xmm3 6179 pslldq $4,%xmm2 6180 pxor %xmm2,%xmm3 6181 pslldq $4,%xmm2 6182 pxor %xmm2,%xmm3 6183 pslldq $4,%xmm2 6184 pxor %xmm3,%xmm2 6185 pxor %xmm2,%xmm0 6186 movdqu %xmm0,(%edx) 6187 movdqa %xmm0,%xmm2 6188.byte 102,15,56,0,197 6189.byte 102,15,56,221,196 6190 movdqa %xmm2,%xmm3 6191 pslldq $4,%xmm2 6192 pxor %xmm2,%xmm3 6193 pslldq $4,%xmm2 6194 pxor %xmm2,%xmm3 6195 pslldq $4,%xmm2 6196 pxor %xmm3,%xmm2 6197 pxor %xmm2,%xmm0 6198 movdqu %xmm0,16(%edx) 6199 movl $9,%ecx 6200 movl %ecx,96(%edx) 6201 jmp .L120good_key 6202.align 16 6203.L11412rounds: 6204 movq 16(%eax),%xmm2 6205 cmpl $268435456,%ebp 6206 je .L12212rounds_alt 6207 movl $11,%ecx 6208 movups %xmm0,-16(%edx) 6209.byte 102,15,58,223,202,1 6210 call .L123key_192a_cold 6211.byte 102,15,58,223,202,2 6212 call .L124key_192b 6213.byte 102,15,58,223,202,4 6214 call .L125key_192a 6215.byte 102,15,58,223,202,8 6216 call .L124key_192b 6217.byte 102,15,58,223,202,16 6218 call .L125key_192a 6219.byte 102,15,58,223,202,32 6220 call .L124key_192b 6221.byte 102,15,58,223,202,64 6222 call .L125key_192a 6223.byte 102,15,58,223,202,128 6224 call .L124key_192b 6225 movups %xmm0,(%edx) 6226 movl %ecx,48(%edx) 6227 jmp .L120good_key 6228.align 16 6229.L125key_192a: 6230 movups %xmm0,(%edx) 6231 leal 16(%edx),%edx 6232.align 16 6233.L123key_192a_cold: 6234 movaps %xmm2,%xmm5 6235.L126key_192b_warm: 6236 shufps $16,%xmm0,%xmm4 6237 movdqa %xmm2,%xmm3 6238 xorps %xmm4,%xmm0 6239 shufps $140,%xmm0,%xmm4 6240 pslldq $4,%xmm3 6241 xorps %xmm4,%xmm0 6242 pshufd $85,%xmm1,%xmm1 6243 pxor %xmm3,%xmm2 6244 pxor %xmm1,%xmm0 6245 pshufd $255,%xmm0,%xmm3 6246 pxor %xmm3,%xmm2 6247 ret 6248.align 16 6249.L124key_192b: 6250 movaps %xmm0,%xmm3 6251 shufps $68,%xmm0,%xmm5 6252 movups %xmm5,(%edx) 6253 shufps $78,%xmm2,%xmm3 6254 movups %xmm3,16(%edx) 6255 leal 32(%edx),%edx 6256 jmp .L126key_192b_warm 6257.align 16 6258.L12212rounds_alt: 6259 movdqa 16(%ebx),%xmm5 6260 movdqa 32(%ebx),%xmm4 6261 movl $8,%ecx 6262 movdqu %xmm0,-16(%edx) 6263.L127loop_key192: 6264 movq %xmm2,(%edx) 6265 movdqa %xmm2,%xmm1 6266.byte 102,15,56,0,213 6267.byte 102,15,56,221,212 6268 pslld $1,%xmm4 6269 leal 24(%edx),%edx 6270 movdqa %xmm0,%xmm3 6271 pslldq $4,%xmm0 6272 pxor %xmm0,%xmm3 6273 pslldq $4,%xmm0 6274 pxor %xmm0,%xmm3 6275 pslldq $4,%xmm0 6276 pxor %xmm3,%xmm0 6277 pshufd $255,%xmm0,%xmm3 6278 pxor %xmm1,%xmm3 6279 pslldq $4,%xmm1 6280 pxor %xmm1,%xmm3 6281 pxor %xmm2,%xmm0 6282 pxor %xmm3,%xmm2 6283 movdqu %xmm0,-16(%edx) 6284 decl %ecx 6285 jnz .L127loop_key192 6286 movl $11,%ecx 6287 movl %ecx,32(%edx) 6288 jmp .L120good_key 6289.align 16 6290.L11314rounds: 6291 movups 16(%eax),%xmm2 6292 leal 16(%edx),%edx 6293 cmpl $268435456,%ebp 6294 je .L12814rounds_alt 6295 movl $13,%ecx 6296 movups %xmm0,-32(%edx) 6297 movups %xmm2,-16(%edx) 6298.byte 102,15,58,223,202,1 6299 call .L129key_256a_cold 6300.byte 102,15,58,223,200,1 6301 call .L130key_256b 6302.byte 102,15,58,223,202,2 6303 call .L131key_256a 6304.byte 102,15,58,223,200,2 6305 call .L130key_256b 6306.byte 102,15,58,223,202,4 6307 call .L131key_256a 6308.byte 102,15,58,223,200,4 6309 call .L130key_256b 6310.byte 102,15,58,223,202,8 6311 call .L131key_256a 6312.byte 102,15,58,223,200,8 6313 call .L130key_256b 6314.byte 102,15,58,223,202,16 6315 call .L131key_256a 6316.byte 102,15,58,223,200,16 6317 call .L130key_256b 6318.byte 102,15,58,223,202,32 6319 call .L131key_256a 6320.byte 102,15,58,223,200,32 6321 call .L130key_256b 6322.byte 102,15,58,223,202,64 6323 call .L131key_256a 6324 movups %xmm0,(%edx) 6325 movl %ecx,16(%edx) 6326 xorl %eax,%eax 6327 jmp .L120good_key 6328.align 16 6329.L131key_256a: 6330 movups %xmm2,(%edx) 6331 leal 16(%edx),%edx 6332.L129key_256a_cold: 6333 shufps $16,%xmm0,%xmm4 6334 xorps %xmm4,%xmm0 6335 shufps $140,%xmm0,%xmm4 6336 xorps %xmm4,%xmm0 6337 shufps $255,%xmm1,%xmm1 6338 xorps %xmm1,%xmm0 6339 ret 6340.align 16 6341.L130key_256b: 6342 movups %xmm0,(%edx) 6343 leal 16(%edx),%edx 6344 shufps $16,%xmm2,%xmm4 6345 xorps %xmm4,%xmm2 6346 shufps $140,%xmm2,%xmm4 6347 xorps %xmm4,%xmm2 6348 shufps $170,%xmm1,%xmm1 6349 xorps %xmm1,%xmm2 6350 ret 6351.align 16 6352.L12814rounds_alt: 6353 movdqa (%ebx),%xmm5 6354 movdqa 32(%ebx),%xmm4 6355 movl $7,%ecx 6356 movdqu %xmm0,-32(%edx) 6357 movdqa %xmm2,%xmm1 6358 movdqu %xmm2,-16(%edx) 6359.L132loop_key256: 6360.byte 102,15,56,0,213 6361.byte 102,15,56,221,212 6362 movdqa %xmm0,%xmm3 6363 pslldq $4,%xmm0 6364 pxor %xmm0,%xmm3 6365 pslldq $4,%xmm0 6366 pxor %xmm0,%xmm3 6367 pslldq $4,%xmm0 6368 pxor %xmm3,%xmm0 6369 pslld $1,%xmm4 6370 pxor %xmm2,%xmm0 6371 movdqu %xmm0,(%edx) 6372 decl %ecx 6373 jz .L133done_key256 6374 pshufd $255,%xmm0,%xmm2 6375 pxor %xmm3,%xmm3 6376.byte 102,15,56,221,211 6377 movdqa %xmm1,%xmm3 6378 pslldq $4,%xmm1 6379 pxor %xmm1,%xmm3 6380 pslldq $4,%xmm1 6381 pxor %xmm1,%xmm3 6382 pslldq $4,%xmm1 6383 pxor %xmm3,%xmm1 6384 pxor %xmm1,%xmm2 6385 movdqu %xmm2,16(%edx) 6386 leal 32(%edx),%edx 6387 movdqa %xmm2,%xmm1 6388 jmp .L132loop_key256 6389.L133done_key256: 6390 movl $13,%ecx 6391 movl %ecx,16(%edx) 6392.L120good_key: 6393 pxor %xmm0,%xmm0 6394 pxor %xmm1,%xmm1 6395 pxor %xmm2,%xmm2 6396 pxor %xmm3,%xmm3 6397 pxor %xmm4,%xmm4 6398 pxor %xmm5,%xmm5 6399 xorl %eax,%eax 6400 popl %ebx 6401 popl %ebp 6402 ret 6403.align 4 6404.L111bad_pointer: 6405 movl $-1,%eax 6406 popl %ebx 6407 popl %ebp 6408 ret 6409.align 4 6410.L115bad_keybits: 6411 pxor %xmm0,%xmm0 6412 movl $-2,%eax 6413 popl %ebx 6414 popl %ebp 6415 ret 6416.size _aesni_set_encrypt_key,.-_aesni_set_encrypt_key 6417.globl aesni_set_encrypt_key 6418.type aesni_set_encrypt_key,@function 6419.align 16 6420aesni_set_encrypt_key: 6421.L_aesni_set_encrypt_key_begin: 6422 movl 4(%esp),%eax 6423 movl 8(%esp),%ecx 6424 movl 12(%esp),%edx 6425 call _aesni_set_encrypt_key 6426 ret 6427.size aesni_set_encrypt_key,.-.L_aesni_set_encrypt_key_begin 6428.globl aesni_set_decrypt_key 6429.type aesni_set_decrypt_key,@function 6430.align 16 6431aesni_set_decrypt_key: 6432.L_aesni_set_decrypt_key_begin: 6433 movl 4(%esp),%eax 6434 movl 8(%esp),%ecx 6435 movl 12(%esp),%edx 6436 call _aesni_set_encrypt_key 6437 movl 12(%esp),%edx 6438 shll $4,%ecx 6439 testl %eax,%eax 6440 jnz .L134dec_key_ret 6441 leal 16(%edx,%ecx,1),%eax 6442 movups (%edx),%xmm0 6443 movups (%eax),%xmm1 6444 movups %xmm0,(%eax) 6445 movups %xmm1,(%edx) 6446 leal 16(%edx),%edx 6447 leal -16(%eax),%eax 6448.L135dec_key_inverse: 6449 movups (%edx),%xmm0 6450 movups (%eax),%xmm1 6451.byte 102,15,56,219,192 6452.byte 102,15,56,219,201 6453 leal 16(%edx),%edx 6454 leal -16(%eax),%eax 6455 movups %xmm0,16(%eax) 6456 movups %xmm1,-16(%edx) 6457 cmpl %edx,%eax 6458 ja .L135dec_key_inverse 6459 movups (%edx),%xmm0 6460.byte 102,15,56,219,192 6461 movups %xmm0,(%edx) 6462 pxor %xmm0,%xmm0 6463 pxor %xmm1,%xmm1 6464 xorl %eax,%eax 6465.L134dec_key_ret: 6466 ret 6467.size aesni_set_decrypt_key,.-.L_aesni_set_decrypt_key_begin 6468.align 64 6469.Lkey_const: 6470.long 202313229,202313229,202313229,202313229 6471.long 67569157,67569157,67569157,67569157 6472.long 1,1,1,1 6473.long 27,27,27,27 6474.byte 65,69,83,32,102,111,114,32,73,110,116,101,108,32,65,69 6475.byte 83,45,78,73,44,32,67,82,89,80,84,79,71,65,77,83 6476.byte 32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115 6477.byte 115,108,46,111,114,103,62,0 6478.comm OPENSSL_ia32cap_P,16,4 6479#endif 6480