1/* $FreeBSD$ */ 2/* Do not modify. This file is auto-generated from cast-586.pl. */ 3#ifdef PIC 4.text 5.globl CAST_encrypt 6.type CAST_encrypt,@function 7.align 16 8CAST_encrypt: 9.L_CAST_encrypt_begin: 10 11 pushl %ebp 12 pushl %ebx 13 movl 12(%esp),%ebx 14 movl 16(%esp),%ebp 15 pushl %esi 16 pushl %edi 17 18 movl (%ebx),%edi 19 movl 4(%ebx),%esi 20 21 movl 128(%ebp),%eax 22 pushl %eax 23 xorl %eax,%eax 24 25 movl (%ebp),%edx 26 movl 4(%ebp),%ecx 27 addl %esi,%edx 28 roll %cl,%edx 29 xorl %ecx,%ecx 30 movl $255,%ebx 31 movb %dh,%cl 32 andl %edx,%ebx 33 shrl $16,%edx 34 xorl %eax,%eax 35 movb %dh,%al 36 andl $255,%edx 37 movl CAST_S_table0(,%ecx,4),%ecx 38 movl CAST_S_table1(,%ebx,4),%ebx 39 xorl %ebx,%ecx 40 movl CAST_S_table2(,%eax,4),%ebx 41 subl %ebx,%ecx 42 movl CAST_S_table3(,%edx,4),%ebx 43 addl %ebx,%ecx 44 xorl %ecx,%edi 45 46 movl 8(%ebp),%edx 47 movl 12(%ebp),%ecx 48 xorl %edi,%edx 49 roll %cl,%edx 50 xorl %ecx,%ecx 51 movl $255,%ebx 52 movb %dh,%cl 53 andl %edx,%ebx 54 shrl $16,%edx 55 xorl %eax,%eax 56 movb %dh,%al 57 andl $255,%edx 58 movl CAST_S_table0(,%ecx,4),%ecx 59 movl CAST_S_table1(,%ebx,4),%ebx 60 subl %ebx,%ecx 61 movl CAST_S_table2(,%eax,4),%ebx 62 addl %ebx,%ecx 63 movl CAST_S_table3(,%edx,4),%ebx 64 xorl %ebx,%ecx 65 xorl %ecx,%esi 66 67 movl 16(%ebp),%edx 68 movl 20(%ebp),%ecx 69 subl %esi,%edx 70 roll %cl,%edx 71 xorl %ecx,%ecx 72 movl $255,%ebx 73 movb %dh,%cl 74 andl %edx,%ebx 75 shrl $16,%edx 76 xorl %eax,%eax 77 movb %dh,%al 78 andl $255,%edx 79 movl CAST_S_table0(,%ecx,4),%ecx 80 movl CAST_S_table1(,%ebx,4),%ebx 81 addl %ebx,%ecx 82 movl CAST_S_table2(,%eax,4),%ebx 83 xorl %ebx,%ecx 84 movl CAST_S_table3(,%edx,4),%ebx 85 subl %ebx,%ecx 86 xorl %ecx,%edi 87 88 movl 24(%ebp),%edx 89 movl 28(%ebp),%ecx 90 addl %edi,%edx 91 roll %cl,%edx 92 xorl %ecx,%ecx 93 movl $255,%ebx 94 movb %dh,%cl 95 andl %edx,%ebx 96 shrl $16,%edx 97 xorl %eax,%eax 98 movb %dh,%al 99 andl $255,%edx 100 movl CAST_S_table0(,%ecx,4),%ecx 101 movl CAST_S_table1(,%ebx,4),%ebx 102 xorl %ebx,%ecx 103 movl CAST_S_table2(,%eax,4),%ebx 104 subl %ebx,%ecx 105 movl CAST_S_table3(,%edx,4),%ebx 106 addl %ebx,%ecx 107 xorl %ecx,%esi 108 109 movl 32(%ebp),%edx 110 movl 36(%ebp),%ecx 111 xorl %esi,%edx 112 roll %cl,%edx 113 xorl %ecx,%ecx 114 movl $255,%ebx 115 movb %dh,%cl 116 andl %edx,%ebx 117 shrl $16,%edx 118 xorl %eax,%eax 119 movb %dh,%al 120 andl $255,%edx 121 movl CAST_S_table0(,%ecx,4),%ecx 122 movl CAST_S_table1(,%ebx,4),%ebx 123 subl %ebx,%ecx 124 movl CAST_S_table2(,%eax,4),%ebx 125 addl %ebx,%ecx 126 movl CAST_S_table3(,%edx,4),%ebx 127 xorl %ebx,%ecx 128 xorl %ecx,%edi 129 130 movl 40(%ebp),%edx 131 movl 44(%ebp),%ecx 132 subl %edi,%edx 133 roll %cl,%edx 134 xorl %ecx,%ecx 135 movl $255,%ebx 136 movb %dh,%cl 137 andl %edx,%ebx 138 shrl $16,%edx 139 xorl %eax,%eax 140 movb %dh,%al 141 andl $255,%edx 142 movl CAST_S_table0(,%ecx,4),%ecx 143 movl CAST_S_table1(,%ebx,4),%ebx 144 addl %ebx,%ecx 145 movl CAST_S_table2(,%eax,4),%ebx 146 xorl %ebx,%ecx 147 movl CAST_S_table3(,%edx,4),%ebx 148 subl %ebx,%ecx 149 xorl %ecx,%esi 150 151 movl 48(%ebp),%edx 152 movl 52(%ebp),%ecx 153 addl %esi,%edx 154 roll %cl,%edx 155 xorl %ecx,%ecx 156 movl $255,%ebx 157 movb %dh,%cl 158 andl %edx,%ebx 159 shrl $16,%edx 160 xorl %eax,%eax 161 movb %dh,%al 162 andl $255,%edx 163 movl CAST_S_table0(,%ecx,4),%ecx 164 movl CAST_S_table1(,%ebx,4),%ebx 165 xorl %ebx,%ecx 166 movl CAST_S_table2(,%eax,4),%ebx 167 subl %ebx,%ecx 168 movl CAST_S_table3(,%edx,4),%ebx 169 addl %ebx,%ecx 170 xorl %ecx,%edi 171 172 movl 56(%ebp),%edx 173 movl 60(%ebp),%ecx 174 xorl %edi,%edx 175 roll %cl,%edx 176 xorl %ecx,%ecx 177 movl $255,%ebx 178 movb %dh,%cl 179 andl %edx,%ebx 180 shrl $16,%edx 181 xorl %eax,%eax 182 movb %dh,%al 183 andl $255,%edx 184 movl CAST_S_table0(,%ecx,4),%ecx 185 movl CAST_S_table1(,%ebx,4),%ebx 186 subl %ebx,%ecx 187 movl CAST_S_table2(,%eax,4),%ebx 188 addl %ebx,%ecx 189 movl CAST_S_table3(,%edx,4),%ebx 190 xorl %ebx,%ecx 191 xorl %ecx,%esi 192 193 movl 64(%ebp),%edx 194 movl 68(%ebp),%ecx 195 subl %esi,%edx 196 roll %cl,%edx 197 xorl %ecx,%ecx 198 movl $255,%ebx 199 movb %dh,%cl 200 andl %edx,%ebx 201 shrl $16,%edx 202 xorl %eax,%eax 203 movb %dh,%al 204 andl $255,%edx 205 movl CAST_S_table0(,%ecx,4),%ecx 206 movl CAST_S_table1(,%ebx,4),%ebx 207 addl %ebx,%ecx 208 movl CAST_S_table2(,%eax,4),%ebx 209 xorl %ebx,%ecx 210 movl CAST_S_table3(,%edx,4),%ebx 211 subl %ebx,%ecx 212 xorl %ecx,%edi 213 214 movl 72(%ebp),%edx 215 movl 76(%ebp),%ecx 216 addl %edi,%edx 217 roll %cl,%edx 218 xorl %ecx,%ecx 219 movl $255,%ebx 220 movb %dh,%cl 221 andl %edx,%ebx 222 shrl $16,%edx 223 xorl %eax,%eax 224 movb %dh,%al 225 andl $255,%edx 226 movl CAST_S_table0(,%ecx,4),%ecx 227 movl CAST_S_table1(,%ebx,4),%ebx 228 xorl %ebx,%ecx 229 movl CAST_S_table2(,%eax,4),%ebx 230 subl %ebx,%ecx 231 movl CAST_S_table3(,%edx,4),%ebx 232 addl %ebx,%ecx 233 xorl %ecx,%esi 234 235 movl 80(%ebp),%edx 236 movl 84(%ebp),%ecx 237 xorl %esi,%edx 238 roll %cl,%edx 239 xorl %ecx,%ecx 240 movl $255,%ebx 241 movb %dh,%cl 242 andl %edx,%ebx 243 shrl $16,%edx 244 xorl %eax,%eax 245 movb %dh,%al 246 andl $255,%edx 247 movl CAST_S_table0(,%ecx,4),%ecx 248 movl CAST_S_table1(,%ebx,4),%ebx 249 subl %ebx,%ecx 250 movl CAST_S_table2(,%eax,4),%ebx 251 addl %ebx,%ecx 252 movl CAST_S_table3(,%edx,4),%ebx 253 xorl %ebx,%ecx 254 xorl %ecx,%edi 255 256 movl 88(%ebp),%edx 257 movl 92(%ebp),%ecx 258 subl %edi,%edx 259 roll %cl,%edx 260 xorl %ecx,%ecx 261 movl $255,%ebx 262 movb %dh,%cl 263 andl %edx,%ebx 264 shrl $16,%edx 265 xorl %eax,%eax 266 movb %dh,%al 267 andl $255,%edx 268 movl CAST_S_table0(,%ecx,4),%ecx 269 movl CAST_S_table1(,%ebx,4),%ebx 270 addl %ebx,%ecx 271 movl CAST_S_table2(,%eax,4),%ebx 272 xorl %ebx,%ecx 273 movl CAST_S_table3(,%edx,4),%ebx 274 subl %ebx,%ecx 275 xorl %ecx,%esi 276 277 popl %edx 278 orl %edx,%edx 279 jnz .L000cast_enc_done 280 281 movl 96(%ebp),%edx 282 movl 100(%ebp),%ecx 283 addl %esi,%edx 284 roll %cl,%edx 285 xorl %ecx,%ecx 286 movl $255,%ebx 287 movb %dh,%cl 288 andl %edx,%ebx 289 shrl $16,%edx 290 xorl %eax,%eax 291 movb %dh,%al 292 andl $255,%edx 293 movl CAST_S_table0(,%ecx,4),%ecx 294 movl CAST_S_table1(,%ebx,4),%ebx 295 xorl %ebx,%ecx 296 movl CAST_S_table2(,%eax,4),%ebx 297 subl %ebx,%ecx 298 movl CAST_S_table3(,%edx,4),%ebx 299 addl %ebx,%ecx 300 xorl %ecx,%edi 301 302 movl 104(%ebp),%edx 303 movl 108(%ebp),%ecx 304 xorl %edi,%edx 305 roll %cl,%edx 306 xorl %ecx,%ecx 307 movl $255,%ebx 308 movb %dh,%cl 309 andl %edx,%ebx 310 shrl $16,%edx 311 xorl %eax,%eax 312 movb %dh,%al 313 andl $255,%edx 314 movl CAST_S_table0(,%ecx,4),%ecx 315 movl CAST_S_table1(,%ebx,4),%ebx 316 subl %ebx,%ecx 317 movl CAST_S_table2(,%eax,4),%ebx 318 addl %ebx,%ecx 319 movl CAST_S_table3(,%edx,4),%ebx 320 xorl %ebx,%ecx 321 xorl %ecx,%esi 322 323 movl 112(%ebp),%edx 324 movl 116(%ebp),%ecx 325 subl %esi,%edx 326 roll %cl,%edx 327 xorl %ecx,%ecx 328 movl $255,%ebx 329 movb %dh,%cl 330 andl %edx,%ebx 331 shrl $16,%edx 332 xorl %eax,%eax 333 movb %dh,%al 334 andl $255,%edx 335 movl CAST_S_table0(,%ecx,4),%ecx 336 movl CAST_S_table1(,%ebx,4),%ebx 337 addl %ebx,%ecx 338 movl CAST_S_table2(,%eax,4),%ebx 339 xorl %ebx,%ecx 340 movl CAST_S_table3(,%edx,4),%ebx 341 subl %ebx,%ecx 342 xorl %ecx,%edi 343 344 movl 120(%ebp),%edx 345 movl 124(%ebp),%ecx 346 addl %edi,%edx 347 roll %cl,%edx 348 xorl %ecx,%ecx 349 movl $255,%ebx 350 movb %dh,%cl 351 andl %edx,%ebx 352 shrl $16,%edx 353 xorl %eax,%eax 354 movb %dh,%al 355 andl $255,%edx 356 movl CAST_S_table0(,%ecx,4),%ecx 357 movl CAST_S_table1(,%ebx,4),%ebx 358 xorl %ebx,%ecx 359 movl CAST_S_table2(,%eax,4),%ebx 360 subl %ebx,%ecx 361 movl CAST_S_table3(,%edx,4),%ebx 362 addl %ebx,%ecx 363 xorl %ecx,%esi 364.L000cast_enc_done: 365 nop 366 movl 20(%esp),%eax 367 movl %edi,4(%eax) 368 movl %esi,(%eax) 369 popl %edi 370 popl %esi 371 popl %ebx 372 popl %ebp 373 ret 374.size CAST_encrypt,.-.L_CAST_encrypt_begin 375.globl CAST_decrypt 376.type CAST_decrypt,@function 377.align 16 378CAST_decrypt: 379.L_CAST_decrypt_begin: 380 381 pushl %ebp 382 pushl %ebx 383 movl 12(%esp),%ebx 384 movl 16(%esp),%ebp 385 pushl %esi 386 pushl %edi 387 388 movl (%ebx),%edi 389 movl 4(%ebx),%esi 390 391 movl 128(%ebp),%eax 392 orl %eax,%eax 393 jnz .L001cast_dec_skip 394 xorl %eax,%eax 395 396 movl 120(%ebp),%edx 397 movl 124(%ebp),%ecx 398 addl %esi,%edx 399 roll %cl,%edx 400 xorl %ecx,%ecx 401 movl $255,%ebx 402 movb %dh,%cl 403 andl %edx,%ebx 404 shrl $16,%edx 405 xorl %eax,%eax 406 movb %dh,%al 407 andl $255,%edx 408 movl CAST_S_table0(,%ecx,4),%ecx 409 movl CAST_S_table1(,%ebx,4),%ebx 410 xorl %ebx,%ecx 411 movl CAST_S_table2(,%eax,4),%ebx 412 subl %ebx,%ecx 413 movl CAST_S_table3(,%edx,4),%ebx 414 addl %ebx,%ecx 415 xorl %ecx,%edi 416 417 movl 112(%ebp),%edx 418 movl 116(%ebp),%ecx 419 subl %edi,%edx 420 roll %cl,%edx 421 xorl %ecx,%ecx 422 movl $255,%ebx 423 movb %dh,%cl 424 andl %edx,%ebx 425 shrl $16,%edx 426 xorl %eax,%eax 427 movb %dh,%al 428 andl $255,%edx 429 movl CAST_S_table0(,%ecx,4),%ecx 430 movl CAST_S_table1(,%ebx,4),%ebx 431 addl %ebx,%ecx 432 movl CAST_S_table2(,%eax,4),%ebx 433 xorl %ebx,%ecx 434 movl CAST_S_table3(,%edx,4),%ebx 435 subl %ebx,%ecx 436 xorl %ecx,%esi 437 438 movl 104(%ebp),%edx 439 movl 108(%ebp),%ecx 440 xorl %esi,%edx 441 roll %cl,%edx 442 xorl %ecx,%ecx 443 movl $255,%ebx 444 movb %dh,%cl 445 andl %edx,%ebx 446 shrl $16,%edx 447 xorl %eax,%eax 448 movb %dh,%al 449 andl $255,%edx 450 movl CAST_S_table0(,%ecx,4),%ecx 451 movl CAST_S_table1(,%ebx,4),%ebx 452 subl %ebx,%ecx 453 movl CAST_S_table2(,%eax,4),%ebx 454 addl %ebx,%ecx 455 movl CAST_S_table3(,%edx,4),%ebx 456 xorl %ebx,%ecx 457 xorl %ecx,%edi 458 459 movl 96(%ebp),%edx 460 movl 100(%ebp),%ecx 461 addl %edi,%edx 462 roll %cl,%edx 463 xorl %ecx,%ecx 464 movl $255,%ebx 465 movb %dh,%cl 466 andl %edx,%ebx 467 shrl $16,%edx 468 xorl %eax,%eax 469 movb %dh,%al 470 andl $255,%edx 471 movl CAST_S_table0(,%ecx,4),%ecx 472 movl CAST_S_table1(,%ebx,4),%ebx 473 xorl %ebx,%ecx 474 movl CAST_S_table2(,%eax,4),%ebx 475 subl %ebx,%ecx 476 movl CAST_S_table3(,%edx,4),%ebx 477 addl %ebx,%ecx 478 xorl %ecx,%esi 479.L001cast_dec_skip: 480 481 movl 88(%ebp),%edx 482 movl 92(%ebp),%ecx 483 subl %esi,%edx 484 roll %cl,%edx 485 xorl %ecx,%ecx 486 movl $255,%ebx 487 movb %dh,%cl 488 andl %edx,%ebx 489 shrl $16,%edx 490 xorl %eax,%eax 491 movb %dh,%al 492 andl $255,%edx 493 movl CAST_S_table0(,%ecx,4),%ecx 494 movl CAST_S_table1(,%ebx,4),%ebx 495 addl %ebx,%ecx 496 movl CAST_S_table2(,%eax,4),%ebx 497 xorl %ebx,%ecx 498 movl CAST_S_table3(,%edx,4),%ebx 499 subl %ebx,%ecx 500 xorl %ecx,%edi 501 502 movl 80(%ebp),%edx 503 movl 84(%ebp),%ecx 504 xorl %edi,%edx 505 roll %cl,%edx 506 xorl %ecx,%ecx 507 movl $255,%ebx 508 movb %dh,%cl 509 andl %edx,%ebx 510 shrl $16,%edx 511 xorl %eax,%eax 512 movb %dh,%al 513 andl $255,%edx 514 movl CAST_S_table0(,%ecx,4),%ecx 515 movl CAST_S_table1(,%ebx,4),%ebx 516 subl %ebx,%ecx 517 movl CAST_S_table2(,%eax,4),%ebx 518 addl %ebx,%ecx 519 movl CAST_S_table3(,%edx,4),%ebx 520 xorl %ebx,%ecx 521 xorl %ecx,%esi 522 523 movl 72(%ebp),%edx 524 movl 76(%ebp),%ecx 525 addl %esi,%edx 526 roll %cl,%edx 527 xorl %ecx,%ecx 528 movl $255,%ebx 529 movb %dh,%cl 530 andl %edx,%ebx 531 shrl $16,%edx 532 xorl %eax,%eax 533 movb %dh,%al 534 andl $255,%edx 535 movl CAST_S_table0(,%ecx,4),%ecx 536 movl CAST_S_table1(,%ebx,4),%ebx 537 xorl %ebx,%ecx 538 movl CAST_S_table2(,%eax,4),%ebx 539 subl %ebx,%ecx 540 movl CAST_S_table3(,%edx,4),%ebx 541 addl %ebx,%ecx 542 xorl %ecx,%edi 543 544 movl 64(%ebp),%edx 545 movl 68(%ebp),%ecx 546 subl %edi,%edx 547 roll %cl,%edx 548 xorl %ecx,%ecx 549 movl $255,%ebx 550 movb %dh,%cl 551 andl %edx,%ebx 552 shrl $16,%edx 553 xorl %eax,%eax 554 movb %dh,%al 555 andl $255,%edx 556 movl CAST_S_table0(,%ecx,4),%ecx 557 movl CAST_S_table1(,%ebx,4),%ebx 558 addl %ebx,%ecx 559 movl CAST_S_table2(,%eax,4),%ebx 560 xorl %ebx,%ecx 561 movl CAST_S_table3(,%edx,4),%ebx 562 subl %ebx,%ecx 563 xorl %ecx,%esi 564 565 movl 56(%ebp),%edx 566 movl 60(%ebp),%ecx 567 xorl %esi,%edx 568 roll %cl,%edx 569 xorl %ecx,%ecx 570 movl $255,%ebx 571 movb %dh,%cl 572 andl %edx,%ebx 573 shrl $16,%edx 574 xorl %eax,%eax 575 movb %dh,%al 576 andl $255,%edx 577 movl CAST_S_table0(,%ecx,4),%ecx 578 movl CAST_S_table1(,%ebx,4),%ebx 579 subl %ebx,%ecx 580 movl CAST_S_table2(,%eax,4),%ebx 581 addl %ebx,%ecx 582 movl CAST_S_table3(,%edx,4),%ebx 583 xorl %ebx,%ecx 584 xorl %ecx,%edi 585 586 movl 48(%ebp),%edx 587 movl 52(%ebp),%ecx 588 addl %edi,%edx 589 roll %cl,%edx 590 xorl %ecx,%ecx 591 movl $255,%ebx 592 movb %dh,%cl 593 andl %edx,%ebx 594 shrl $16,%edx 595 xorl %eax,%eax 596 movb %dh,%al 597 andl $255,%edx 598 movl CAST_S_table0(,%ecx,4),%ecx 599 movl CAST_S_table1(,%ebx,4),%ebx 600 xorl %ebx,%ecx 601 movl CAST_S_table2(,%eax,4),%ebx 602 subl %ebx,%ecx 603 movl CAST_S_table3(,%edx,4),%ebx 604 addl %ebx,%ecx 605 xorl %ecx,%esi 606 607 movl 40(%ebp),%edx 608 movl 44(%ebp),%ecx 609 subl %esi,%edx 610 roll %cl,%edx 611 xorl %ecx,%ecx 612 movl $255,%ebx 613 movb %dh,%cl 614 andl %edx,%ebx 615 shrl $16,%edx 616 xorl %eax,%eax 617 movb %dh,%al 618 andl $255,%edx 619 movl CAST_S_table0(,%ecx,4),%ecx 620 movl CAST_S_table1(,%ebx,4),%ebx 621 addl %ebx,%ecx 622 movl CAST_S_table2(,%eax,4),%ebx 623 xorl %ebx,%ecx 624 movl CAST_S_table3(,%edx,4),%ebx 625 subl %ebx,%ecx 626 xorl %ecx,%edi 627 628 movl 32(%ebp),%edx 629 movl 36(%ebp),%ecx 630 xorl %edi,%edx 631 roll %cl,%edx 632 xorl %ecx,%ecx 633 movl $255,%ebx 634 movb %dh,%cl 635 andl %edx,%ebx 636 shrl $16,%edx 637 xorl %eax,%eax 638 movb %dh,%al 639 andl $255,%edx 640 movl CAST_S_table0(,%ecx,4),%ecx 641 movl CAST_S_table1(,%ebx,4),%ebx 642 subl %ebx,%ecx 643 movl CAST_S_table2(,%eax,4),%ebx 644 addl %ebx,%ecx 645 movl CAST_S_table3(,%edx,4),%ebx 646 xorl %ebx,%ecx 647 xorl %ecx,%esi 648 649 movl 24(%ebp),%edx 650 movl 28(%ebp),%ecx 651 addl %esi,%edx 652 roll %cl,%edx 653 xorl %ecx,%ecx 654 movl $255,%ebx 655 movb %dh,%cl 656 andl %edx,%ebx 657 shrl $16,%edx 658 xorl %eax,%eax 659 movb %dh,%al 660 andl $255,%edx 661 movl CAST_S_table0(,%ecx,4),%ecx 662 movl CAST_S_table1(,%ebx,4),%ebx 663 xorl %ebx,%ecx 664 movl CAST_S_table2(,%eax,4),%ebx 665 subl %ebx,%ecx 666 movl CAST_S_table3(,%edx,4),%ebx 667 addl %ebx,%ecx 668 xorl %ecx,%edi 669 670 movl 16(%ebp),%edx 671 movl 20(%ebp),%ecx 672 subl %edi,%edx 673 roll %cl,%edx 674 xorl %ecx,%ecx 675 movl $255,%ebx 676 movb %dh,%cl 677 andl %edx,%ebx 678 shrl $16,%edx 679 xorl %eax,%eax 680 movb %dh,%al 681 andl $255,%edx 682 movl CAST_S_table0(,%ecx,4),%ecx 683 movl CAST_S_table1(,%ebx,4),%ebx 684 addl %ebx,%ecx 685 movl CAST_S_table2(,%eax,4),%ebx 686 xorl %ebx,%ecx 687 movl CAST_S_table3(,%edx,4),%ebx 688 subl %ebx,%ecx 689 xorl %ecx,%esi 690 691 movl 8(%ebp),%edx 692 movl 12(%ebp),%ecx 693 xorl %esi,%edx 694 roll %cl,%edx 695 xorl %ecx,%ecx 696 movl $255,%ebx 697 movb %dh,%cl 698 andl %edx,%ebx 699 shrl $16,%edx 700 xorl %eax,%eax 701 movb %dh,%al 702 andl $255,%edx 703 movl CAST_S_table0(,%ecx,4),%ecx 704 movl CAST_S_table1(,%ebx,4),%ebx 705 subl %ebx,%ecx 706 movl CAST_S_table2(,%eax,4),%ebx 707 addl %ebx,%ecx 708 movl CAST_S_table3(,%edx,4),%ebx 709 xorl %ebx,%ecx 710 xorl %ecx,%edi 711 712 movl (%ebp),%edx 713 movl 4(%ebp),%ecx 714 addl %edi,%edx 715 roll %cl,%edx 716 xorl %ecx,%ecx 717 movl $255,%ebx 718 movb %dh,%cl 719 andl %edx,%ebx 720 shrl $16,%edx 721 xorl %eax,%eax 722 movb %dh,%al 723 andl $255,%edx 724 movl CAST_S_table0(,%ecx,4),%ecx 725 movl CAST_S_table1(,%ebx,4),%ebx 726 xorl %ebx,%ecx 727 movl CAST_S_table2(,%eax,4),%ebx 728 subl %ebx,%ecx 729 movl CAST_S_table3(,%edx,4),%ebx 730 addl %ebx,%ecx 731 xorl %ecx,%esi 732 nop 733 movl 20(%esp),%eax 734 movl %edi,4(%eax) 735 movl %esi,(%eax) 736 popl %edi 737 popl %esi 738 popl %ebx 739 popl %ebp 740 ret 741.size CAST_decrypt,.-.L_CAST_decrypt_begin 742.globl CAST_cbc_encrypt 743.type CAST_cbc_encrypt,@function 744.align 16 745CAST_cbc_encrypt: 746.L_CAST_cbc_encrypt_begin: 747 748 pushl %ebp 749 pushl %ebx 750 pushl %esi 751 pushl %edi 752 movl 28(%esp),%ebp 753 754 movl 36(%esp),%ebx 755 movl (%ebx),%esi 756 movl 4(%ebx),%edi 757 pushl %edi 758 pushl %esi 759 pushl %edi 760 pushl %esi 761 movl %esp,%ebx 762 movl 36(%esp),%esi 763 movl 40(%esp),%edi 764 765 movl 56(%esp),%ecx 766 767 movl 48(%esp),%eax 768 pushl %eax 769 pushl %ebx 770 cmpl $0,%ecx 771 jz .L002decrypt 772 andl $4294967288,%ebp 773 movl 8(%esp),%eax 774 movl 12(%esp),%ebx 775 jz .L003encrypt_finish 776.L004encrypt_loop: 777 movl (%esi),%ecx 778 movl 4(%esi),%edx 779 xorl %ecx,%eax 780 xorl %edx,%ebx 781 bswap %eax 782 bswap %ebx 783 movl %eax,8(%esp) 784 movl %ebx,12(%esp) 785 call .L_CAST_encrypt_begin 786 movl 8(%esp),%eax 787 movl 12(%esp),%ebx 788 bswap %eax 789 bswap %ebx 790 movl %eax,(%edi) 791 movl %ebx,4(%edi) 792 addl $8,%esi 793 addl $8,%edi 794 subl $8,%ebp 795 jnz .L004encrypt_loop 796.L003encrypt_finish: 797 movl 52(%esp),%ebp 798 andl $7,%ebp 799 jz .L005finish 800 call .L006PIC_point 801.L006PIC_point: 802 popl %edx 803 leal .L007cbc_enc_jmp_table-.L006PIC_point(%edx),%ecx 804 movl (%ecx,%ebp,4),%ebp 805 addl %edx,%ebp 806 xorl %ecx,%ecx 807 xorl %edx,%edx 808 jmp *%ebp 809.L008ej7: 810 movb 6(%esi),%dh 811 shll $8,%edx 812.L009ej6: 813 movb 5(%esi),%dh 814.L010ej5: 815 movb 4(%esi),%dl 816.L011ej4: 817 movl (%esi),%ecx 818 jmp .L012ejend 819.L013ej3: 820 movb 2(%esi),%ch 821 shll $8,%ecx 822.L014ej2: 823 movb 1(%esi),%ch 824.L015ej1: 825 movb (%esi),%cl 826.L012ejend: 827 xorl %ecx,%eax 828 xorl %edx,%ebx 829 bswap %eax 830 bswap %ebx 831 movl %eax,8(%esp) 832 movl %ebx,12(%esp) 833 call .L_CAST_encrypt_begin 834 movl 8(%esp),%eax 835 movl 12(%esp),%ebx 836 bswap %eax 837 bswap %ebx 838 movl %eax,(%edi) 839 movl %ebx,4(%edi) 840 jmp .L005finish 841.L002decrypt: 842 andl $4294967288,%ebp 843 movl 16(%esp),%eax 844 movl 20(%esp),%ebx 845 jz .L016decrypt_finish 846.L017decrypt_loop: 847 movl (%esi),%eax 848 movl 4(%esi),%ebx 849 bswap %eax 850 bswap %ebx 851 movl %eax,8(%esp) 852 movl %ebx,12(%esp) 853 call .L_CAST_decrypt_begin 854 movl 8(%esp),%eax 855 movl 12(%esp),%ebx 856 bswap %eax 857 bswap %ebx 858 movl 16(%esp),%ecx 859 movl 20(%esp),%edx 860 xorl %eax,%ecx 861 xorl %ebx,%edx 862 movl (%esi),%eax 863 movl 4(%esi),%ebx 864 movl %ecx,(%edi) 865 movl %edx,4(%edi) 866 movl %eax,16(%esp) 867 movl %ebx,20(%esp) 868 addl $8,%esi 869 addl $8,%edi 870 subl $8,%ebp 871 jnz .L017decrypt_loop 872.L016decrypt_finish: 873 movl 52(%esp),%ebp 874 andl $7,%ebp 875 jz .L005finish 876 movl (%esi),%eax 877 movl 4(%esi),%ebx 878 bswap %eax 879 bswap %ebx 880 movl %eax,8(%esp) 881 movl %ebx,12(%esp) 882 call .L_CAST_decrypt_begin 883 movl 8(%esp),%eax 884 movl 12(%esp),%ebx 885 bswap %eax 886 bswap %ebx 887 movl 16(%esp),%ecx 888 movl 20(%esp),%edx 889 xorl %eax,%ecx 890 xorl %ebx,%edx 891 movl (%esi),%eax 892 movl 4(%esi),%ebx 893.L018dj7: 894 rorl $16,%edx 895 movb %dl,6(%edi) 896 shrl $16,%edx 897.L019dj6: 898 movb %dh,5(%edi) 899.L020dj5: 900 movb %dl,4(%edi) 901.L021dj4: 902 movl %ecx,(%edi) 903 jmp .L022djend 904.L023dj3: 905 rorl $16,%ecx 906 movb %cl,2(%edi) 907 shll $16,%ecx 908.L024dj2: 909 movb %ch,1(%esi) 910.L025dj1: 911 movb %cl,(%esi) 912.L022djend: 913 jmp .L005finish 914.L005finish: 915 movl 60(%esp),%ecx 916 addl $24,%esp 917 movl %eax,(%ecx) 918 movl %ebx,4(%ecx) 919 popl %edi 920 popl %esi 921 popl %ebx 922 popl %ebp 923 ret 924.align 64 925.L007cbc_enc_jmp_table: 926.long 0 927.long .L015ej1-.L006PIC_point 928.long .L014ej2-.L006PIC_point 929.long .L013ej3-.L006PIC_point 930.long .L011ej4-.L006PIC_point 931.long .L010ej5-.L006PIC_point 932.long .L009ej6-.L006PIC_point 933.long .L008ej7-.L006PIC_point 934.align 64 935.size CAST_cbc_encrypt,.-.L_CAST_cbc_encrypt_begin 936#else 937.text 938.globl CAST_encrypt 939.type CAST_encrypt,@function 940.align 16 941CAST_encrypt: 942.L_CAST_encrypt_begin: 943 944 pushl %ebp 945 pushl %ebx 946 movl 12(%esp),%ebx 947 movl 16(%esp),%ebp 948 pushl %esi 949 pushl %edi 950 951 movl (%ebx),%edi 952 movl 4(%ebx),%esi 953 954 movl 128(%ebp),%eax 955 pushl %eax 956 xorl %eax,%eax 957 958 movl (%ebp),%edx 959 movl 4(%ebp),%ecx 960 addl %esi,%edx 961 roll %cl,%edx 962 xorl %ecx,%ecx 963 movl $255,%ebx 964 movb %dh,%cl 965 andl %edx,%ebx 966 shrl $16,%edx 967 xorl %eax,%eax 968 movb %dh,%al 969 andl $255,%edx 970 movl CAST_S_table0(,%ecx,4),%ecx 971 movl CAST_S_table1(,%ebx,4),%ebx 972 xorl %ebx,%ecx 973 movl CAST_S_table2(,%eax,4),%ebx 974 subl %ebx,%ecx 975 movl CAST_S_table3(,%edx,4),%ebx 976 addl %ebx,%ecx 977 xorl %ecx,%edi 978 979 movl 8(%ebp),%edx 980 movl 12(%ebp),%ecx 981 xorl %edi,%edx 982 roll %cl,%edx 983 xorl %ecx,%ecx 984 movl $255,%ebx 985 movb %dh,%cl 986 andl %edx,%ebx 987 shrl $16,%edx 988 xorl %eax,%eax 989 movb %dh,%al 990 andl $255,%edx 991 movl CAST_S_table0(,%ecx,4),%ecx 992 movl CAST_S_table1(,%ebx,4),%ebx 993 subl %ebx,%ecx 994 movl CAST_S_table2(,%eax,4),%ebx 995 addl %ebx,%ecx 996 movl CAST_S_table3(,%edx,4),%ebx 997 xorl %ebx,%ecx 998 xorl %ecx,%esi 999 1000 movl 16(%ebp),%edx 1001 movl 20(%ebp),%ecx 1002 subl %esi,%edx 1003 roll %cl,%edx 1004 xorl %ecx,%ecx 1005 movl $255,%ebx 1006 movb %dh,%cl 1007 andl %edx,%ebx 1008 shrl $16,%edx 1009 xorl %eax,%eax 1010 movb %dh,%al 1011 andl $255,%edx 1012 movl CAST_S_table0(,%ecx,4),%ecx 1013 movl CAST_S_table1(,%ebx,4),%ebx 1014 addl %ebx,%ecx 1015 movl CAST_S_table2(,%eax,4),%ebx 1016 xorl %ebx,%ecx 1017 movl CAST_S_table3(,%edx,4),%ebx 1018 subl %ebx,%ecx 1019 xorl %ecx,%edi 1020 1021 movl 24(%ebp),%edx 1022 movl 28(%ebp),%ecx 1023 addl %edi,%edx 1024 roll %cl,%edx 1025 xorl %ecx,%ecx 1026 movl $255,%ebx 1027 movb %dh,%cl 1028 andl %edx,%ebx 1029 shrl $16,%edx 1030 xorl %eax,%eax 1031 movb %dh,%al 1032 andl $255,%edx 1033 movl CAST_S_table0(,%ecx,4),%ecx 1034 movl CAST_S_table1(,%ebx,4),%ebx 1035 xorl %ebx,%ecx 1036 movl CAST_S_table2(,%eax,4),%ebx 1037 subl %ebx,%ecx 1038 movl CAST_S_table3(,%edx,4),%ebx 1039 addl %ebx,%ecx 1040 xorl %ecx,%esi 1041 1042 movl 32(%ebp),%edx 1043 movl 36(%ebp),%ecx 1044 xorl %esi,%edx 1045 roll %cl,%edx 1046 xorl %ecx,%ecx 1047 movl $255,%ebx 1048 movb %dh,%cl 1049 andl %edx,%ebx 1050 shrl $16,%edx 1051 xorl %eax,%eax 1052 movb %dh,%al 1053 andl $255,%edx 1054 movl CAST_S_table0(,%ecx,4),%ecx 1055 movl CAST_S_table1(,%ebx,4),%ebx 1056 subl %ebx,%ecx 1057 movl CAST_S_table2(,%eax,4),%ebx 1058 addl %ebx,%ecx 1059 movl CAST_S_table3(,%edx,4),%ebx 1060 xorl %ebx,%ecx 1061 xorl %ecx,%edi 1062 1063 movl 40(%ebp),%edx 1064 movl 44(%ebp),%ecx 1065 subl %edi,%edx 1066 roll %cl,%edx 1067 xorl %ecx,%ecx 1068 movl $255,%ebx 1069 movb %dh,%cl 1070 andl %edx,%ebx 1071 shrl $16,%edx 1072 xorl %eax,%eax 1073 movb %dh,%al 1074 andl $255,%edx 1075 movl CAST_S_table0(,%ecx,4),%ecx 1076 movl CAST_S_table1(,%ebx,4),%ebx 1077 addl %ebx,%ecx 1078 movl CAST_S_table2(,%eax,4),%ebx 1079 xorl %ebx,%ecx 1080 movl CAST_S_table3(,%edx,4),%ebx 1081 subl %ebx,%ecx 1082 xorl %ecx,%esi 1083 1084 movl 48(%ebp),%edx 1085 movl 52(%ebp),%ecx 1086 addl %esi,%edx 1087 roll %cl,%edx 1088 xorl %ecx,%ecx 1089 movl $255,%ebx 1090 movb %dh,%cl 1091 andl %edx,%ebx 1092 shrl $16,%edx 1093 xorl %eax,%eax 1094 movb %dh,%al 1095 andl $255,%edx 1096 movl CAST_S_table0(,%ecx,4),%ecx 1097 movl CAST_S_table1(,%ebx,4),%ebx 1098 xorl %ebx,%ecx 1099 movl CAST_S_table2(,%eax,4),%ebx 1100 subl %ebx,%ecx 1101 movl CAST_S_table3(,%edx,4),%ebx 1102 addl %ebx,%ecx 1103 xorl %ecx,%edi 1104 1105 movl 56(%ebp),%edx 1106 movl 60(%ebp),%ecx 1107 xorl %edi,%edx 1108 roll %cl,%edx 1109 xorl %ecx,%ecx 1110 movl $255,%ebx 1111 movb %dh,%cl 1112 andl %edx,%ebx 1113 shrl $16,%edx 1114 xorl %eax,%eax 1115 movb %dh,%al 1116 andl $255,%edx 1117 movl CAST_S_table0(,%ecx,4),%ecx 1118 movl CAST_S_table1(,%ebx,4),%ebx 1119 subl %ebx,%ecx 1120 movl CAST_S_table2(,%eax,4),%ebx 1121 addl %ebx,%ecx 1122 movl CAST_S_table3(,%edx,4),%ebx 1123 xorl %ebx,%ecx 1124 xorl %ecx,%esi 1125 1126 movl 64(%ebp),%edx 1127 movl 68(%ebp),%ecx 1128 subl %esi,%edx 1129 roll %cl,%edx 1130 xorl %ecx,%ecx 1131 movl $255,%ebx 1132 movb %dh,%cl 1133 andl %edx,%ebx 1134 shrl $16,%edx 1135 xorl %eax,%eax 1136 movb %dh,%al 1137 andl $255,%edx 1138 movl CAST_S_table0(,%ecx,4),%ecx 1139 movl CAST_S_table1(,%ebx,4),%ebx 1140 addl %ebx,%ecx 1141 movl CAST_S_table2(,%eax,4),%ebx 1142 xorl %ebx,%ecx 1143 movl CAST_S_table3(,%edx,4),%ebx 1144 subl %ebx,%ecx 1145 xorl %ecx,%edi 1146 1147 movl 72(%ebp),%edx 1148 movl 76(%ebp),%ecx 1149 addl %edi,%edx 1150 roll %cl,%edx 1151 xorl %ecx,%ecx 1152 movl $255,%ebx 1153 movb %dh,%cl 1154 andl %edx,%ebx 1155 shrl $16,%edx 1156 xorl %eax,%eax 1157 movb %dh,%al 1158 andl $255,%edx 1159 movl CAST_S_table0(,%ecx,4),%ecx 1160 movl CAST_S_table1(,%ebx,4),%ebx 1161 xorl %ebx,%ecx 1162 movl CAST_S_table2(,%eax,4),%ebx 1163 subl %ebx,%ecx 1164 movl CAST_S_table3(,%edx,4),%ebx 1165 addl %ebx,%ecx 1166 xorl %ecx,%esi 1167 1168 movl 80(%ebp),%edx 1169 movl 84(%ebp),%ecx 1170 xorl %esi,%edx 1171 roll %cl,%edx 1172 xorl %ecx,%ecx 1173 movl $255,%ebx 1174 movb %dh,%cl 1175 andl %edx,%ebx 1176 shrl $16,%edx 1177 xorl %eax,%eax 1178 movb %dh,%al 1179 andl $255,%edx 1180 movl CAST_S_table0(,%ecx,4),%ecx 1181 movl CAST_S_table1(,%ebx,4),%ebx 1182 subl %ebx,%ecx 1183 movl CAST_S_table2(,%eax,4),%ebx 1184 addl %ebx,%ecx 1185 movl CAST_S_table3(,%edx,4),%ebx 1186 xorl %ebx,%ecx 1187 xorl %ecx,%edi 1188 1189 movl 88(%ebp),%edx 1190 movl 92(%ebp),%ecx 1191 subl %edi,%edx 1192 roll %cl,%edx 1193 xorl %ecx,%ecx 1194 movl $255,%ebx 1195 movb %dh,%cl 1196 andl %edx,%ebx 1197 shrl $16,%edx 1198 xorl %eax,%eax 1199 movb %dh,%al 1200 andl $255,%edx 1201 movl CAST_S_table0(,%ecx,4),%ecx 1202 movl CAST_S_table1(,%ebx,4),%ebx 1203 addl %ebx,%ecx 1204 movl CAST_S_table2(,%eax,4),%ebx 1205 xorl %ebx,%ecx 1206 movl CAST_S_table3(,%edx,4),%ebx 1207 subl %ebx,%ecx 1208 xorl %ecx,%esi 1209 1210 popl %edx 1211 orl %edx,%edx 1212 jnz .L000cast_enc_done 1213 1214 movl 96(%ebp),%edx 1215 movl 100(%ebp),%ecx 1216 addl %esi,%edx 1217 roll %cl,%edx 1218 xorl %ecx,%ecx 1219 movl $255,%ebx 1220 movb %dh,%cl 1221 andl %edx,%ebx 1222 shrl $16,%edx 1223 xorl %eax,%eax 1224 movb %dh,%al 1225 andl $255,%edx 1226 movl CAST_S_table0(,%ecx,4),%ecx 1227 movl CAST_S_table1(,%ebx,4),%ebx 1228 xorl %ebx,%ecx 1229 movl CAST_S_table2(,%eax,4),%ebx 1230 subl %ebx,%ecx 1231 movl CAST_S_table3(,%edx,4),%ebx 1232 addl %ebx,%ecx 1233 xorl %ecx,%edi 1234 1235 movl 104(%ebp),%edx 1236 movl 108(%ebp),%ecx 1237 xorl %edi,%edx 1238 roll %cl,%edx 1239 xorl %ecx,%ecx 1240 movl $255,%ebx 1241 movb %dh,%cl 1242 andl %edx,%ebx 1243 shrl $16,%edx 1244 xorl %eax,%eax 1245 movb %dh,%al 1246 andl $255,%edx 1247 movl CAST_S_table0(,%ecx,4),%ecx 1248 movl CAST_S_table1(,%ebx,4),%ebx 1249 subl %ebx,%ecx 1250 movl CAST_S_table2(,%eax,4),%ebx 1251 addl %ebx,%ecx 1252 movl CAST_S_table3(,%edx,4),%ebx 1253 xorl %ebx,%ecx 1254 xorl %ecx,%esi 1255 1256 movl 112(%ebp),%edx 1257 movl 116(%ebp),%ecx 1258 subl %esi,%edx 1259 roll %cl,%edx 1260 xorl %ecx,%ecx 1261 movl $255,%ebx 1262 movb %dh,%cl 1263 andl %edx,%ebx 1264 shrl $16,%edx 1265 xorl %eax,%eax 1266 movb %dh,%al 1267 andl $255,%edx 1268 movl CAST_S_table0(,%ecx,4),%ecx 1269 movl CAST_S_table1(,%ebx,4),%ebx 1270 addl %ebx,%ecx 1271 movl CAST_S_table2(,%eax,4),%ebx 1272 xorl %ebx,%ecx 1273 movl CAST_S_table3(,%edx,4),%ebx 1274 subl %ebx,%ecx 1275 xorl %ecx,%edi 1276 1277 movl 120(%ebp),%edx 1278 movl 124(%ebp),%ecx 1279 addl %edi,%edx 1280 roll %cl,%edx 1281 xorl %ecx,%ecx 1282 movl $255,%ebx 1283 movb %dh,%cl 1284 andl %edx,%ebx 1285 shrl $16,%edx 1286 xorl %eax,%eax 1287 movb %dh,%al 1288 andl $255,%edx 1289 movl CAST_S_table0(,%ecx,4),%ecx 1290 movl CAST_S_table1(,%ebx,4),%ebx 1291 xorl %ebx,%ecx 1292 movl CAST_S_table2(,%eax,4),%ebx 1293 subl %ebx,%ecx 1294 movl CAST_S_table3(,%edx,4),%ebx 1295 addl %ebx,%ecx 1296 xorl %ecx,%esi 1297.L000cast_enc_done: 1298 nop 1299 movl 20(%esp),%eax 1300 movl %edi,4(%eax) 1301 movl %esi,(%eax) 1302 popl %edi 1303 popl %esi 1304 popl %ebx 1305 popl %ebp 1306 ret 1307.size CAST_encrypt,.-.L_CAST_encrypt_begin 1308.globl CAST_decrypt 1309.type CAST_decrypt,@function 1310.align 16 1311CAST_decrypt: 1312.L_CAST_decrypt_begin: 1313 1314 pushl %ebp 1315 pushl %ebx 1316 movl 12(%esp),%ebx 1317 movl 16(%esp),%ebp 1318 pushl %esi 1319 pushl %edi 1320 1321 movl (%ebx),%edi 1322 movl 4(%ebx),%esi 1323 1324 movl 128(%ebp),%eax 1325 orl %eax,%eax 1326 jnz .L001cast_dec_skip 1327 xorl %eax,%eax 1328 1329 movl 120(%ebp),%edx 1330 movl 124(%ebp),%ecx 1331 addl %esi,%edx 1332 roll %cl,%edx 1333 xorl %ecx,%ecx 1334 movl $255,%ebx 1335 movb %dh,%cl 1336 andl %edx,%ebx 1337 shrl $16,%edx 1338 xorl %eax,%eax 1339 movb %dh,%al 1340 andl $255,%edx 1341 movl CAST_S_table0(,%ecx,4),%ecx 1342 movl CAST_S_table1(,%ebx,4),%ebx 1343 xorl %ebx,%ecx 1344 movl CAST_S_table2(,%eax,4),%ebx 1345 subl %ebx,%ecx 1346 movl CAST_S_table3(,%edx,4),%ebx 1347 addl %ebx,%ecx 1348 xorl %ecx,%edi 1349 1350 movl 112(%ebp),%edx 1351 movl 116(%ebp),%ecx 1352 subl %edi,%edx 1353 roll %cl,%edx 1354 xorl %ecx,%ecx 1355 movl $255,%ebx 1356 movb %dh,%cl 1357 andl %edx,%ebx 1358 shrl $16,%edx 1359 xorl %eax,%eax 1360 movb %dh,%al 1361 andl $255,%edx 1362 movl CAST_S_table0(,%ecx,4),%ecx 1363 movl CAST_S_table1(,%ebx,4),%ebx 1364 addl %ebx,%ecx 1365 movl CAST_S_table2(,%eax,4),%ebx 1366 xorl %ebx,%ecx 1367 movl CAST_S_table3(,%edx,4),%ebx 1368 subl %ebx,%ecx 1369 xorl %ecx,%esi 1370 1371 movl 104(%ebp),%edx 1372 movl 108(%ebp),%ecx 1373 xorl %esi,%edx 1374 roll %cl,%edx 1375 xorl %ecx,%ecx 1376 movl $255,%ebx 1377 movb %dh,%cl 1378 andl %edx,%ebx 1379 shrl $16,%edx 1380 xorl %eax,%eax 1381 movb %dh,%al 1382 andl $255,%edx 1383 movl CAST_S_table0(,%ecx,4),%ecx 1384 movl CAST_S_table1(,%ebx,4),%ebx 1385 subl %ebx,%ecx 1386 movl CAST_S_table2(,%eax,4),%ebx 1387 addl %ebx,%ecx 1388 movl CAST_S_table3(,%edx,4),%ebx 1389 xorl %ebx,%ecx 1390 xorl %ecx,%edi 1391 1392 movl 96(%ebp),%edx 1393 movl 100(%ebp),%ecx 1394 addl %edi,%edx 1395 roll %cl,%edx 1396 xorl %ecx,%ecx 1397 movl $255,%ebx 1398 movb %dh,%cl 1399 andl %edx,%ebx 1400 shrl $16,%edx 1401 xorl %eax,%eax 1402 movb %dh,%al 1403 andl $255,%edx 1404 movl CAST_S_table0(,%ecx,4),%ecx 1405 movl CAST_S_table1(,%ebx,4),%ebx 1406 xorl %ebx,%ecx 1407 movl CAST_S_table2(,%eax,4),%ebx 1408 subl %ebx,%ecx 1409 movl CAST_S_table3(,%edx,4),%ebx 1410 addl %ebx,%ecx 1411 xorl %ecx,%esi 1412.L001cast_dec_skip: 1413 1414 movl 88(%ebp),%edx 1415 movl 92(%ebp),%ecx 1416 subl %esi,%edx 1417 roll %cl,%edx 1418 xorl %ecx,%ecx 1419 movl $255,%ebx 1420 movb %dh,%cl 1421 andl %edx,%ebx 1422 shrl $16,%edx 1423 xorl %eax,%eax 1424 movb %dh,%al 1425 andl $255,%edx 1426 movl CAST_S_table0(,%ecx,4),%ecx 1427 movl CAST_S_table1(,%ebx,4),%ebx 1428 addl %ebx,%ecx 1429 movl CAST_S_table2(,%eax,4),%ebx 1430 xorl %ebx,%ecx 1431 movl CAST_S_table3(,%edx,4),%ebx 1432 subl %ebx,%ecx 1433 xorl %ecx,%edi 1434 1435 movl 80(%ebp),%edx 1436 movl 84(%ebp),%ecx 1437 xorl %edi,%edx 1438 roll %cl,%edx 1439 xorl %ecx,%ecx 1440 movl $255,%ebx 1441 movb %dh,%cl 1442 andl %edx,%ebx 1443 shrl $16,%edx 1444 xorl %eax,%eax 1445 movb %dh,%al 1446 andl $255,%edx 1447 movl CAST_S_table0(,%ecx,4),%ecx 1448 movl CAST_S_table1(,%ebx,4),%ebx 1449 subl %ebx,%ecx 1450 movl CAST_S_table2(,%eax,4),%ebx 1451 addl %ebx,%ecx 1452 movl CAST_S_table3(,%edx,4),%ebx 1453 xorl %ebx,%ecx 1454 xorl %ecx,%esi 1455 1456 movl 72(%ebp),%edx 1457 movl 76(%ebp),%ecx 1458 addl %esi,%edx 1459 roll %cl,%edx 1460 xorl %ecx,%ecx 1461 movl $255,%ebx 1462 movb %dh,%cl 1463 andl %edx,%ebx 1464 shrl $16,%edx 1465 xorl %eax,%eax 1466 movb %dh,%al 1467 andl $255,%edx 1468 movl CAST_S_table0(,%ecx,4),%ecx 1469 movl CAST_S_table1(,%ebx,4),%ebx 1470 xorl %ebx,%ecx 1471 movl CAST_S_table2(,%eax,4),%ebx 1472 subl %ebx,%ecx 1473 movl CAST_S_table3(,%edx,4),%ebx 1474 addl %ebx,%ecx 1475 xorl %ecx,%edi 1476 1477 movl 64(%ebp),%edx 1478 movl 68(%ebp),%ecx 1479 subl %edi,%edx 1480 roll %cl,%edx 1481 xorl %ecx,%ecx 1482 movl $255,%ebx 1483 movb %dh,%cl 1484 andl %edx,%ebx 1485 shrl $16,%edx 1486 xorl %eax,%eax 1487 movb %dh,%al 1488 andl $255,%edx 1489 movl CAST_S_table0(,%ecx,4),%ecx 1490 movl CAST_S_table1(,%ebx,4),%ebx 1491 addl %ebx,%ecx 1492 movl CAST_S_table2(,%eax,4),%ebx 1493 xorl %ebx,%ecx 1494 movl CAST_S_table3(,%edx,4),%ebx 1495 subl %ebx,%ecx 1496 xorl %ecx,%esi 1497 1498 movl 56(%ebp),%edx 1499 movl 60(%ebp),%ecx 1500 xorl %esi,%edx 1501 roll %cl,%edx 1502 xorl %ecx,%ecx 1503 movl $255,%ebx 1504 movb %dh,%cl 1505 andl %edx,%ebx 1506 shrl $16,%edx 1507 xorl %eax,%eax 1508 movb %dh,%al 1509 andl $255,%edx 1510 movl CAST_S_table0(,%ecx,4),%ecx 1511 movl CAST_S_table1(,%ebx,4),%ebx 1512 subl %ebx,%ecx 1513 movl CAST_S_table2(,%eax,4),%ebx 1514 addl %ebx,%ecx 1515 movl CAST_S_table3(,%edx,4),%ebx 1516 xorl %ebx,%ecx 1517 xorl %ecx,%edi 1518 1519 movl 48(%ebp),%edx 1520 movl 52(%ebp),%ecx 1521 addl %edi,%edx 1522 roll %cl,%edx 1523 xorl %ecx,%ecx 1524 movl $255,%ebx 1525 movb %dh,%cl 1526 andl %edx,%ebx 1527 shrl $16,%edx 1528 xorl %eax,%eax 1529 movb %dh,%al 1530 andl $255,%edx 1531 movl CAST_S_table0(,%ecx,4),%ecx 1532 movl CAST_S_table1(,%ebx,4),%ebx 1533 xorl %ebx,%ecx 1534 movl CAST_S_table2(,%eax,4),%ebx 1535 subl %ebx,%ecx 1536 movl CAST_S_table3(,%edx,4),%ebx 1537 addl %ebx,%ecx 1538 xorl %ecx,%esi 1539 1540 movl 40(%ebp),%edx 1541 movl 44(%ebp),%ecx 1542 subl %esi,%edx 1543 roll %cl,%edx 1544 xorl %ecx,%ecx 1545 movl $255,%ebx 1546 movb %dh,%cl 1547 andl %edx,%ebx 1548 shrl $16,%edx 1549 xorl %eax,%eax 1550 movb %dh,%al 1551 andl $255,%edx 1552 movl CAST_S_table0(,%ecx,4),%ecx 1553 movl CAST_S_table1(,%ebx,4),%ebx 1554 addl %ebx,%ecx 1555 movl CAST_S_table2(,%eax,4),%ebx 1556 xorl %ebx,%ecx 1557 movl CAST_S_table3(,%edx,4),%ebx 1558 subl %ebx,%ecx 1559 xorl %ecx,%edi 1560 1561 movl 32(%ebp),%edx 1562 movl 36(%ebp),%ecx 1563 xorl %edi,%edx 1564 roll %cl,%edx 1565 xorl %ecx,%ecx 1566 movl $255,%ebx 1567 movb %dh,%cl 1568 andl %edx,%ebx 1569 shrl $16,%edx 1570 xorl %eax,%eax 1571 movb %dh,%al 1572 andl $255,%edx 1573 movl CAST_S_table0(,%ecx,4),%ecx 1574 movl CAST_S_table1(,%ebx,4),%ebx 1575 subl %ebx,%ecx 1576 movl CAST_S_table2(,%eax,4),%ebx 1577 addl %ebx,%ecx 1578 movl CAST_S_table3(,%edx,4),%ebx 1579 xorl %ebx,%ecx 1580 xorl %ecx,%esi 1581 1582 movl 24(%ebp),%edx 1583 movl 28(%ebp),%ecx 1584 addl %esi,%edx 1585 roll %cl,%edx 1586 xorl %ecx,%ecx 1587 movl $255,%ebx 1588 movb %dh,%cl 1589 andl %edx,%ebx 1590 shrl $16,%edx 1591 xorl %eax,%eax 1592 movb %dh,%al 1593 andl $255,%edx 1594 movl CAST_S_table0(,%ecx,4),%ecx 1595 movl CAST_S_table1(,%ebx,4),%ebx 1596 xorl %ebx,%ecx 1597 movl CAST_S_table2(,%eax,4),%ebx 1598 subl %ebx,%ecx 1599 movl CAST_S_table3(,%edx,4),%ebx 1600 addl %ebx,%ecx 1601 xorl %ecx,%edi 1602 1603 movl 16(%ebp),%edx 1604 movl 20(%ebp),%ecx 1605 subl %edi,%edx 1606 roll %cl,%edx 1607 xorl %ecx,%ecx 1608 movl $255,%ebx 1609 movb %dh,%cl 1610 andl %edx,%ebx 1611 shrl $16,%edx 1612 xorl %eax,%eax 1613 movb %dh,%al 1614 andl $255,%edx 1615 movl CAST_S_table0(,%ecx,4),%ecx 1616 movl CAST_S_table1(,%ebx,4),%ebx 1617 addl %ebx,%ecx 1618 movl CAST_S_table2(,%eax,4),%ebx 1619 xorl %ebx,%ecx 1620 movl CAST_S_table3(,%edx,4),%ebx 1621 subl %ebx,%ecx 1622 xorl %ecx,%esi 1623 1624 movl 8(%ebp),%edx 1625 movl 12(%ebp),%ecx 1626 xorl %esi,%edx 1627 roll %cl,%edx 1628 xorl %ecx,%ecx 1629 movl $255,%ebx 1630 movb %dh,%cl 1631 andl %edx,%ebx 1632 shrl $16,%edx 1633 xorl %eax,%eax 1634 movb %dh,%al 1635 andl $255,%edx 1636 movl CAST_S_table0(,%ecx,4),%ecx 1637 movl CAST_S_table1(,%ebx,4),%ebx 1638 subl %ebx,%ecx 1639 movl CAST_S_table2(,%eax,4),%ebx 1640 addl %ebx,%ecx 1641 movl CAST_S_table3(,%edx,4),%ebx 1642 xorl %ebx,%ecx 1643 xorl %ecx,%edi 1644 1645 movl (%ebp),%edx 1646 movl 4(%ebp),%ecx 1647 addl %edi,%edx 1648 roll %cl,%edx 1649 xorl %ecx,%ecx 1650 movl $255,%ebx 1651 movb %dh,%cl 1652 andl %edx,%ebx 1653 shrl $16,%edx 1654 xorl %eax,%eax 1655 movb %dh,%al 1656 andl $255,%edx 1657 movl CAST_S_table0(,%ecx,4),%ecx 1658 movl CAST_S_table1(,%ebx,4),%ebx 1659 xorl %ebx,%ecx 1660 movl CAST_S_table2(,%eax,4),%ebx 1661 subl %ebx,%ecx 1662 movl CAST_S_table3(,%edx,4),%ebx 1663 addl %ebx,%ecx 1664 xorl %ecx,%esi 1665 nop 1666 movl 20(%esp),%eax 1667 movl %edi,4(%eax) 1668 movl %esi,(%eax) 1669 popl %edi 1670 popl %esi 1671 popl %ebx 1672 popl %ebp 1673 ret 1674.size CAST_decrypt,.-.L_CAST_decrypt_begin 1675.globl CAST_cbc_encrypt 1676.type CAST_cbc_encrypt,@function 1677.align 16 1678CAST_cbc_encrypt: 1679.L_CAST_cbc_encrypt_begin: 1680 1681 pushl %ebp 1682 pushl %ebx 1683 pushl %esi 1684 pushl %edi 1685 movl 28(%esp),%ebp 1686 1687 movl 36(%esp),%ebx 1688 movl (%ebx),%esi 1689 movl 4(%ebx),%edi 1690 pushl %edi 1691 pushl %esi 1692 pushl %edi 1693 pushl %esi 1694 movl %esp,%ebx 1695 movl 36(%esp),%esi 1696 movl 40(%esp),%edi 1697 1698 movl 56(%esp),%ecx 1699 1700 movl 48(%esp),%eax 1701 pushl %eax 1702 pushl %ebx 1703 cmpl $0,%ecx 1704 jz .L002decrypt 1705 andl $4294967288,%ebp 1706 movl 8(%esp),%eax 1707 movl 12(%esp),%ebx 1708 jz .L003encrypt_finish 1709.L004encrypt_loop: 1710 movl (%esi),%ecx 1711 movl 4(%esi),%edx 1712 xorl %ecx,%eax 1713 xorl %edx,%ebx 1714 bswap %eax 1715 bswap %ebx 1716 movl %eax,8(%esp) 1717 movl %ebx,12(%esp) 1718 call .L_CAST_encrypt_begin 1719 movl 8(%esp),%eax 1720 movl 12(%esp),%ebx 1721 bswap %eax 1722 bswap %ebx 1723 movl %eax,(%edi) 1724 movl %ebx,4(%edi) 1725 addl $8,%esi 1726 addl $8,%edi 1727 subl $8,%ebp 1728 jnz .L004encrypt_loop 1729.L003encrypt_finish: 1730 movl 52(%esp),%ebp 1731 andl $7,%ebp 1732 jz .L005finish 1733 call .L006PIC_point 1734.L006PIC_point: 1735 popl %edx 1736 leal .L007cbc_enc_jmp_table-.L006PIC_point(%edx),%ecx 1737 movl (%ecx,%ebp,4),%ebp 1738 addl %edx,%ebp 1739 xorl %ecx,%ecx 1740 xorl %edx,%edx 1741 jmp *%ebp 1742.L008ej7: 1743 movb 6(%esi),%dh 1744 shll $8,%edx 1745.L009ej6: 1746 movb 5(%esi),%dh 1747.L010ej5: 1748 movb 4(%esi),%dl 1749.L011ej4: 1750 movl (%esi),%ecx 1751 jmp .L012ejend 1752.L013ej3: 1753 movb 2(%esi),%ch 1754 shll $8,%ecx 1755.L014ej2: 1756 movb 1(%esi),%ch 1757.L015ej1: 1758 movb (%esi),%cl 1759.L012ejend: 1760 xorl %ecx,%eax 1761 xorl %edx,%ebx 1762 bswap %eax 1763 bswap %ebx 1764 movl %eax,8(%esp) 1765 movl %ebx,12(%esp) 1766 call .L_CAST_encrypt_begin 1767 movl 8(%esp),%eax 1768 movl 12(%esp),%ebx 1769 bswap %eax 1770 bswap %ebx 1771 movl %eax,(%edi) 1772 movl %ebx,4(%edi) 1773 jmp .L005finish 1774.L002decrypt: 1775 andl $4294967288,%ebp 1776 movl 16(%esp),%eax 1777 movl 20(%esp),%ebx 1778 jz .L016decrypt_finish 1779.L017decrypt_loop: 1780 movl (%esi),%eax 1781 movl 4(%esi),%ebx 1782 bswap %eax 1783 bswap %ebx 1784 movl %eax,8(%esp) 1785 movl %ebx,12(%esp) 1786 call .L_CAST_decrypt_begin 1787 movl 8(%esp),%eax 1788 movl 12(%esp),%ebx 1789 bswap %eax 1790 bswap %ebx 1791 movl 16(%esp),%ecx 1792 movl 20(%esp),%edx 1793 xorl %eax,%ecx 1794 xorl %ebx,%edx 1795 movl (%esi),%eax 1796 movl 4(%esi),%ebx 1797 movl %ecx,(%edi) 1798 movl %edx,4(%edi) 1799 movl %eax,16(%esp) 1800 movl %ebx,20(%esp) 1801 addl $8,%esi 1802 addl $8,%edi 1803 subl $8,%ebp 1804 jnz .L017decrypt_loop 1805.L016decrypt_finish: 1806 movl 52(%esp),%ebp 1807 andl $7,%ebp 1808 jz .L005finish 1809 movl (%esi),%eax 1810 movl 4(%esi),%ebx 1811 bswap %eax 1812 bswap %ebx 1813 movl %eax,8(%esp) 1814 movl %ebx,12(%esp) 1815 call .L_CAST_decrypt_begin 1816 movl 8(%esp),%eax 1817 movl 12(%esp),%ebx 1818 bswap %eax 1819 bswap %ebx 1820 movl 16(%esp),%ecx 1821 movl 20(%esp),%edx 1822 xorl %eax,%ecx 1823 xorl %ebx,%edx 1824 movl (%esi),%eax 1825 movl 4(%esi),%ebx 1826.L018dj7: 1827 rorl $16,%edx 1828 movb %dl,6(%edi) 1829 shrl $16,%edx 1830.L019dj6: 1831 movb %dh,5(%edi) 1832.L020dj5: 1833 movb %dl,4(%edi) 1834.L021dj4: 1835 movl %ecx,(%edi) 1836 jmp .L022djend 1837.L023dj3: 1838 rorl $16,%ecx 1839 movb %cl,2(%edi) 1840 shll $16,%ecx 1841.L024dj2: 1842 movb %ch,1(%esi) 1843.L025dj1: 1844 movb %cl,(%esi) 1845.L022djend: 1846 jmp .L005finish 1847.L005finish: 1848 movl 60(%esp),%ecx 1849 addl $24,%esp 1850 movl %eax,(%ecx) 1851 movl %ebx,4(%ecx) 1852 popl %edi 1853 popl %esi 1854 popl %ebx 1855 popl %ebp 1856 ret 1857.align 64 1858.L007cbc_enc_jmp_table: 1859.long 0 1860.long .L015ej1-.L006PIC_point 1861.long .L014ej2-.L006PIC_point 1862.long .L013ej3-.L006PIC_point 1863.long .L011ej4-.L006PIC_point 1864.long .L010ej5-.L006PIC_point 1865.long .L009ej6-.L006PIC_point 1866.long .L008ej7-.L006PIC_point 1867.align 64 1868.size CAST_cbc_encrypt,.-.L_CAST_cbc_encrypt_begin 1869#endif 1870