1; This file is generated from a similarly-named Perl script in the BoringSSL 2; source tree. Do not edit by hand. 3 4%ifdef BORINGSSL_PREFIX 5%include "boringssl_prefix_symbols_nasm.inc" 6%endif 7%ifidn __OUTPUT_FORMAT__,obj 8section code use32 class=code align=64 9%elifidn __OUTPUT_FORMAT__,win32 10%ifdef __YASM_VERSION_ID__ 11%if __YASM_VERSION_ID__ < 01010000h 12%error yasm version 1.1.0 or later needed. 13%endif 14; Yasm automatically includes .00 and complains about redefining it. 15; https://www.tortall.net/projects/yasm/manual/html/objfmt-win32-safeseh.html 16%else 17$@feat.00 equ 1 18%endif 19section .text code align=64 20%else 21section .text code 22%endif 23global _md5_block_asm_data_order 24align 16 25_md5_block_asm_data_order: 26L$_md5_block_asm_data_order_begin: 27 push esi 28 push edi 29 mov edi,DWORD [12+esp] 30 mov esi,DWORD [16+esp] 31 mov ecx,DWORD [20+esp] 32 push ebp 33 shl ecx,6 34 push ebx 35 add ecx,esi 36 sub ecx,64 37 mov eax,DWORD [edi] 38 push ecx 39 mov ebx,DWORD [4+edi] 40 mov ecx,DWORD [8+edi] 41 mov edx,DWORD [12+edi] 42L$000start: 43 ; 44 ; R0 section 45 mov edi,ecx 46 mov ebp,DWORD [esi] 47 ; R0 0 48 xor edi,edx 49 and edi,ebx 50 lea eax,[3614090360+ebp*1+eax] 51 xor edi,edx 52 add eax,edi 53 mov edi,ebx 54 rol eax,7 55 mov ebp,DWORD [4+esi] 56 add eax,ebx 57 ; R0 1 58 xor edi,ecx 59 and edi,eax 60 lea edx,[3905402710+ebp*1+edx] 61 xor edi,ecx 62 add edx,edi 63 mov edi,eax 64 rol edx,12 65 mov ebp,DWORD [8+esi] 66 add edx,eax 67 ; R0 2 68 xor edi,ebx 69 and edi,edx 70 lea ecx,[606105819+ebp*1+ecx] 71 xor edi,ebx 72 add ecx,edi 73 mov edi,edx 74 rol ecx,17 75 mov ebp,DWORD [12+esi] 76 add ecx,edx 77 ; R0 3 78 xor edi,eax 79 and edi,ecx 80 lea ebx,[3250441966+ebp*1+ebx] 81 xor edi,eax 82 add ebx,edi 83 mov edi,ecx 84 rol ebx,22 85 mov ebp,DWORD [16+esi] 86 add ebx,ecx 87 ; R0 4 88 xor edi,edx 89 and edi,ebx 90 lea eax,[4118548399+ebp*1+eax] 91 xor edi,edx 92 add eax,edi 93 mov edi,ebx 94 rol eax,7 95 mov ebp,DWORD [20+esi] 96 add eax,ebx 97 ; R0 5 98 xor edi,ecx 99 and edi,eax 100 lea edx,[1200080426+ebp*1+edx] 101 xor edi,ecx 102 add edx,edi 103 mov edi,eax 104 rol edx,12 105 mov ebp,DWORD [24+esi] 106 add edx,eax 107 ; R0 6 108 xor edi,ebx 109 and edi,edx 110 lea ecx,[2821735955+ebp*1+ecx] 111 xor edi,ebx 112 add ecx,edi 113 mov edi,edx 114 rol ecx,17 115 mov ebp,DWORD [28+esi] 116 add ecx,edx 117 ; R0 7 118 xor edi,eax 119 and edi,ecx 120 lea ebx,[4249261313+ebp*1+ebx] 121 xor edi,eax 122 add ebx,edi 123 mov edi,ecx 124 rol ebx,22 125 mov ebp,DWORD [32+esi] 126 add ebx,ecx 127 ; R0 8 128 xor edi,edx 129 and edi,ebx 130 lea eax,[1770035416+ebp*1+eax] 131 xor edi,edx 132 add eax,edi 133 mov edi,ebx 134 rol eax,7 135 mov ebp,DWORD [36+esi] 136 add eax,ebx 137 ; R0 9 138 xor edi,ecx 139 and edi,eax 140 lea edx,[2336552879+ebp*1+edx] 141 xor edi,ecx 142 add edx,edi 143 mov edi,eax 144 rol edx,12 145 mov ebp,DWORD [40+esi] 146 add edx,eax 147 ; R0 10 148 xor edi,ebx 149 and edi,edx 150 lea ecx,[4294925233+ebp*1+ecx] 151 xor edi,ebx 152 add ecx,edi 153 mov edi,edx 154 rol ecx,17 155 mov ebp,DWORD [44+esi] 156 add ecx,edx 157 ; R0 11 158 xor edi,eax 159 and edi,ecx 160 lea ebx,[2304563134+ebp*1+ebx] 161 xor edi,eax 162 add ebx,edi 163 mov edi,ecx 164 rol ebx,22 165 mov ebp,DWORD [48+esi] 166 add ebx,ecx 167 ; R0 12 168 xor edi,edx 169 and edi,ebx 170 lea eax,[1804603682+ebp*1+eax] 171 xor edi,edx 172 add eax,edi 173 mov edi,ebx 174 rol eax,7 175 mov ebp,DWORD [52+esi] 176 add eax,ebx 177 ; R0 13 178 xor edi,ecx 179 and edi,eax 180 lea edx,[4254626195+ebp*1+edx] 181 xor edi,ecx 182 add edx,edi 183 mov edi,eax 184 rol edx,12 185 mov ebp,DWORD [56+esi] 186 add edx,eax 187 ; R0 14 188 xor edi,ebx 189 and edi,edx 190 lea ecx,[2792965006+ebp*1+ecx] 191 xor edi,ebx 192 add ecx,edi 193 mov edi,edx 194 rol ecx,17 195 mov ebp,DWORD [60+esi] 196 add ecx,edx 197 ; R0 15 198 xor edi,eax 199 and edi,ecx 200 lea ebx,[1236535329+ebp*1+ebx] 201 xor edi,eax 202 add ebx,edi 203 mov edi,ecx 204 rol ebx,22 205 mov ebp,DWORD [4+esi] 206 add ebx,ecx 207 ; 208 ; R1 section 209 ; R1 16 210 lea eax,[4129170786+ebp*1+eax] 211 xor edi,ebx 212 and edi,edx 213 mov ebp,DWORD [24+esi] 214 xor edi,ecx 215 add eax,edi 216 mov edi,ebx 217 rol eax,5 218 add eax,ebx 219 ; R1 17 220 lea edx,[3225465664+ebp*1+edx] 221 xor edi,eax 222 and edi,ecx 223 mov ebp,DWORD [44+esi] 224 xor edi,ebx 225 add edx,edi 226 mov edi,eax 227 rol edx,9 228 add edx,eax 229 ; R1 18 230 lea ecx,[643717713+ebp*1+ecx] 231 xor edi,edx 232 and edi,ebx 233 mov ebp,DWORD [esi] 234 xor edi,eax 235 add ecx,edi 236 mov edi,edx 237 rol ecx,14 238 add ecx,edx 239 ; R1 19 240 lea ebx,[3921069994+ebp*1+ebx] 241 xor edi,ecx 242 and edi,eax 243 mov ebp,DWORD [20+esi] 244 xor edi,edx 245 add ebx,edi 246 mov edi,ecx 247 rol ebx,20 248 add ebx,ecx 249 ; R1 20 250 lea eax,[3593408605+ebp*1+eax] 251 xor edi,ebx 252 and edi,edx 253 mov ebp,DWORD [40+esi] 254 xor edi,ecx 255 add eax,edi 256 mov edi,ebx 257 rol eax,5 258 add eax,ebx 259 ; R1 21 260 lea edx,[38016083+ebp*1+edx] 261 xor edi,eax 262 and edi,ecx 263 mov ebp,DWORD [60+esi] 264 xor edi,ebx 265 add edx,edi 266 mov edi,eax 267 rol edx,9 268 add edx,eax 269 ; R1 22 270 lea ecx,[3634488961+ebp*1+ecx] 271 xor edi,edx 272 and edi,ebx 273 mov ebp,DWORD [16+esi] 274 xor edi,eax 275 add ecx,edi 276 mov edi,edx 277 rol ecx,14 278 add ecx,edx 279 ; R1 23 280 lea ebx,[3889429448+ebp*1+ebx] 281 xor edi,ecx 282 and edi,eax 283 mov ebp,DWORD [36+esi] 284 xor edi,edx 285 add ebx,edi 286 mov edi,ecx 287 rol ebx,20 288 add ebx,ecx 289 ; R1 24 290 lea eax,[568446438+ebp*1+eax] 291 xor edi,ebx 292 and edi,edx 293 mov ebp,DWORD [56+esi] 294 xor edi,ecx 295 add eax,edi 296 mov edi,ebx 297 rol eax,5 298 add eax,ebx 299 ; R1 25 300 lea edx,[3275163606+ebp*1+edx] 301 xor edi,eax 302 and edi,ecx 303 mov ebp,DWORD [12+esi] 304 xor edi,ebx 305 add edx,edi 306 mov edi,eax 307 rol edx,9 308 add edx,eax 309 ; R1 26 310 lea ecx,[4107603335+ebp*1+ecx] 311 xor edi,edx 312 and edi,ebx 313 mov ebp,DWORD [32+esi] 314 xor edi,eax 315 add ecx,edi 316 mov edi,edx 317 rol ecx,14 318 add ecx,edx 319 ; R1 27 320 lea ebx,[1163531501+ebp*1+ebx] 321 xor edi,ecx 322 and edi,eax 323 mov ebp,DWORD [52+esi] 324 xor edi,edx 325 add ebx,edi 326 mov edi,ecx 327 rol ebx,20 328 add ebx,ecx 329 ; R1 28 330 lea eax,[2850285829+ebp*1+eax] 331 xor edi,ebx 332 and edi,edx 333 mov ebp,DWORD [8+esi] 334 xor edi,ecx 335 add eax,edi 336 mov edi,ebx 337 rol eax,5 338 add eax,ebx 339 ; R1 29 340 lea edx,[4243563512+ebp*1+edx] 341 xor edi,eax 342 and edi,ecx 343 mov ebp,DWORD [28+esi] 344 xor edi,ebx 345 add edx,edi 346 mov edi,eax 347 rol edx,9 348 add edx,eax 349 ; R1 30 350 lea ecx,[1735328473+ebp*1+ecx] 351 xor edi,edx 352 and edi,ebx 353 mov ebp,DWORD [48+esi] 354 xor edi,eax 355 add ecx,edi 356 mov edi,edx 357 rol ecx,14 358 add ecx,edx 359 ; R1 31 360 lea ebx,[2368359562+ebp*1+ebx] 361 xor edi,ecx 362 and edi,eax 363 mov ebp,DWORD [20+esi] 364 xor edi,edx 365 add ebx,edi 366 mov edi,ecx 367 rol ebx,20 368 add ebx,ecx 369 ; 370 ; R2 section 371 ; R2 32 372 xor edi,edx 373 xor edi,ebx 374 lea eax,[4294588738+ebp*1+eax] 375 add eax,edi 376 rol eax,4 377 mov ebp,DWORD [32+esi] 378 mov edi,ebx 379 ; R2 33 380 lea edx,[2272392833+ebp*1+edx] 381 add eax,ebx 382 xor edi,ecx 383 xor edi,eax 384 mov ebp,DWORD [44+esi] 385 add edx,edi 386 mov edi,eax 387 rol edx,11 388 add edx,eax 389 ; R2 34 390 xor edi,ebx 391 xor edi,edx 392 lea ecx,[1839030562+ebp*1+ecx] 393 add ecx,edi 394 rol ecx,16 395 mov ebp,DWORD [56+esi] 396 mov edi,edx 397 ; R2 35 398 lea ebx,[4259657740+ebp*1+ebx] 399 add ecx,edx 400 xor edi,eax 401 xor edi,ecx 402 mov ebp,DWORD [4+esi] 403 add ebx,edi 404 mov edi,ecx 405 rol ebx,23 406 add ebx,ecx 407 ; R2 36 408 xor edi,edx 409 xor edi,ebx 410 lea eax,[2763975236+ebp*1+eax] 411 add eax,edi 412 rol eax,4 413 mov ebp,DWORD [16+esi] 414 mov edi,ebx 415 ; R2 37 416 lea edx,[1272893353+ebp*1+edx] 417 add eax,ebx 418 xor edi,ecx 419 xor edi,eax 420 mov ebp,DWORD [28+esi] 421 add edx,edi 422 mov edi,eax 423 rol edx,11 424 add edx,eax 425 ; R2 38 426 xor edi,ebx 427 xor edi,edx 428 lea ecx,[4139469664+ebp*1+ecx] 429 add ecx,edi 430 rol ecx,16 431 mov ebp,DWORD [40+esi] 432 mov edi,edx 433 ; R2 39 434 lea ebx,[3200236656+ebp*1+ebx] 435 add ecx,edx 436 xor edi,eax 437 xor edi,ecx 438 mov ebp,DWORD [52+esi] 439 add ebx,edi 440 mov edi,ecx 441 rol ebx,23 442 add ebx,ecx 443 ; R2 40 444 xor edi,edx 445 xor edi,ebx 446 lea eax,[681279174+ebp*1+eax] 447 add eax,edi 448 rol eax,4 449 mov ebp,DWORD [esi] 450 mov edi,ebx 451 ; R2 41 452 lea edx,[3936430074+ebp*1+edx] 453 add eax,ebx 454 xor edi,ecx 455 xor edi,eax 456 mov ebp,DWORD [12+esi] 457 add edx,edi 458 mov edi,eax 459 rol edx,11 460 add edx,eax 461 ; R2 42 462 xor edi,ebx 463 xor edi,edx 464 lea ecx,[3572445317+ebp*1+ecx] 465 add ecx,edi 466 rol ecx,16 467 mov ebp,DWORD [24+esi] 468 mov edi,edx 469 ; R2 43 470 lea ebx,[76029189+ebp*1+ebx] 471 add ecx,edx 472 xor edi,eax 473 xor edi,ecx 474 mov ebp,DWORD [36+esi] 475 add ebx,edi 476 mov edi,ecx 477 rol ebx,23 478 add ebx,ecx 479 ; R2 44 480 xor edi,edx 481 xor edi,ebx 482 lea eax,[3654602809+ebp*1+eax] 483 add eax,edi 484 rol eax,4 485 mov ebp,DWORD [48+esi] 486 mov edi,ebx 487 ; R2 45 488 lea edx,[3873151461+ebp*1+edx] 489 add eax,ebx 490 xor edi,ecx 491 xor edi,eax 492 mov ebp,DWORD [60+esi] 493 add edx,edi 494 mov edi,eax 495 rol edx,11 496 add edx,eax 497 ; R2 46 498 xor edi,ebx 499 xor edi,edx 500 lea ecx,[530742520+ebp*1+ecx] 501 add ecx,edi 502 rol ecx,16 503 mov ebp,DWORD [8+esi] 504 mov edi,edx 505 ; R2 47 506 lea ebx,[3299628645+ebp*1+ebx] 507 add ecx,edx 508 xor edi,eax 509 xor edi,ecx 510 mov ebp,DWORD [esi] 511 add ebx,edi 512 mov edi,-1 513 rol ebx,23 514 add ebx,ecx 515 ; 516 ; R3 section 517 ; R3 48 518 xor edi,edx 519 or edi,ebx 520 lea eax,[4096336452+ebp*1+eax] 521 xor edi,ecx 522 mov ebp,DWORD [28+esi] 523 add eax,edi 524 mov edi,-1 525 rol eax,6 526 xor edi,ecx 527 add eax,ebx 528 ; R3 49 529 or edi,eax 530 lea edx,[1126891415+ebp*1+edx] 531 xor edi,ebx 532 mov ebp,DWORD [56+esi] 533 add edx,edi 534 mov edi,-1 535 rol edx,10 536 xor edi,ebx 537 add edx,eax 538 ; R3 50 539 or edi,edx 540 lea ecx,[2878612391+ebp*1+ecx] 541 xor edi,eax 542 mov ebp,DWORD [20+esi] 543 add ecx,edi 544 mov edi,-1 545 rol ecx,15 546 xor edi,eax 547 add ecx,edx 548 ; R3 51 549 or edi,ecx 550 lea ebx,[4237533241+ebp*1+ebx] 551 xor edi,edx 552 mov ebp,DWORD [48+esi] 553 add ebx,edi 554 mov edi,-1 555 rol ebx,21 556 xor edi,edx 557 add ebx,ecx 558 ; R3 52 559 or edi,ebx 560 lea eax,[1700485571+ebp*1+eax] 561 xor edi,ecx 562 mov ebp,DWORD [12+esi] 563 add eax,edi 564 mov edi,-1 565 rol eax,6 566 xor edi,ecx 567 add eax,ebx 568 ; R3 53 569 or edi,eax 570 lea edx,[2399980690+ebp*1+edx] 571 xor edi,ebx 572 mov ebp,DWORD [40+esi] 573 add edx,edi 574 mov edi,-1 575 rol edx,10 576 xor edi,ebx 577 add edx,eax 578 ; R3 54 579 or edi,edx 580 lea ecx,[4293915773+ebp*1+ecx] 581 xor edi,eax 582 mov ebp,DWORD [4+esi] 583 add ecx,edi 584 mov edi,-1 585 rol ecx,15 586 xor edi,eax 587 add ecx,edx 588 ; R3 55 589 or edi,ecx 590 lea ebx,[2240044497+ebp*1+ebx] 591 xor edi,edx 592 mov ebp,DWORD [32+esi] 593 add ebx,edi 594 mov edi,-1 595 rol ebx,21 596 xor edi,edx 597 add ebx,ecx 598 ; R3 56 599 or edi,ebx 600 lea eax,[1873313359+ebp*1+eax] 601 xor edi,ecx 602 mov ebp,DWORD [60+esi] 603 add eax,edi 604 mov edi,-1 605 rol eax,6 606 xor edi,ecx 607 add eax,ebx 608 ; R3 57 609 or edi,eax 610 lea edx,[4264355552+ebp*1+edx] 611 xor edi,ebx 612 mov ebp,DWORD [24+esi] 613 add edx,edi 614 mov edi,-1 615 rol edx,10 616 xor edi,ebx 617 add edx,eax 618 ; R3 58 619 or edi,edx 620 lea ecx,[2734768916+ebp*1+ecx] 621 xor edi,eax 622 mov ebp,DWORD [52+esi] 623 add ecx,edi 624 mov edi,-1 625 rol ecx,15 626 xor edi,eax 627 add ecx,edx 628 ; R3 59 629 or edi,ecx 630 lea ebx,[1309151649+ebp*1+ebx] 631 xor edi,edx 632 mov ebp,DWORD [16+esi] 633 add ebx,edi 634 mov edi,-1 635 rol ebx,21 636 xor edi,edx 637 add ebx,ecx 638 ; R3 60 639 or edi,ebx 640 lea eax,[4149444226+ebp*1+eax] 641 xor edi,ecx 642 mov ebp,DWORD [44+esi] 643 add eax,edi 644 mov edi,-1 645 rol eax,6 646 xor edi,ecx 647 add eax,ebx 648 ; R3 61 649 or edi,eax 650 lea edx,[3174756917+ebp*1+edx] 651 xor edi,ebx 652 mov ebp,DWORD [8+esi] 653 add edx,edi 654 mov edi,-1 655 rol edx,10 656 xor edi,ebx 657 add edx,eax 658 ; R3 62 659 or edi,edx 660 lea ecx,[718787259+ebp*1+ecx] 661 xor edi,eax 662 mov ebp,DWORD [36+esi] 663 add ecx,edi 664 mov edi,-1 665 rol ecx,15 666 xor edi,eax 667 add ecx,edx 668 ; R3 63 669 or edi,ecx 670 lea ebx,[3951481745+ebp*1+ebx] 671 xor edi,edx 672 mov ebp,DWORD [24+esp] 673 add ebx,edi 674 add esi,64 675 rol ebx,21 676 mov edi,DWORD [ebp] 677 add ebx,ecx 678 add eax,edi 679 mov edi,DWORD [4+ebp] 680 add ebx,edi 681 mov edi,DWORD [8+ebp] 682 add ecx,edi 683 mov edi,DWORD [12+ebp] 684 add edx,edi 685 mov DWORD [ebp],eax 686 mov DWORD [4+ebp],ebx 687 mov edi,DWORD [esp] 688 mov DWORD [8+ebp],ecx 689 mov DWORD [12+ebp],edx 690 cmp edi,esi 691 jae NEAR L$000start 692 pop eax 693 pop ebx 694 pop ebp 695 pop edi 696 pop esi 697 ret 698