1#include "x86_arch.h" 2.text 3 4 5.globl _Camellia_EncryptBlock 6 7.p2align 4 8_Camellia_EncryptBlock: 9 movl $128,%eax 10 subl %edi,%eax 11 movl $3,%edi 12 adcl $0,%edi 13 jmp L$enc_rounds 14 15 16.globl _Camellia_EncryptBlock_Rounds 17 18.p2align 4 19L$enc_rounds: 20_Camellia_EncryptBlock_Rounds: 21 pushq %rbx 22 pushq %rbp 23 pushq %r13 24 pushq %r14 25 pushq %r15 26L$enc_prologue: 27 28 29 movq %rcx,%r13 30 movq %rdx,%r14 31 32 shll $6,%edi 33 leaq L$Camellia_SBOX(%rip),%rbp 34 leaq (%r14,%rdi,1),%r15 35 36 movl 0(%rsi),%r8d 37 movl 4(%rsi),%r9d 38 movl 8(%rsi),%r10d 39 bswapl %r8d 40 movl 12(%rsi),%r11d 41 bswapl %r9d 42 bswapl %r10d 43 bswapl %r11d 44 45 call _x86_64_Camellia_encrypt 46 47 bswapl %r8d 48 bswapl %r9d 49 bswapl %r10d 50 movl %r8d,0(%r13) 51 bswapl %r11d 52 movl %r9d,4(%r13) 53 movl %r10d,8(%r13) 54 movl %r11d,12(%r13) 55 56 movq 0(%rsp),%r15 57 movq 8(%rsp),%r14 58 movq 16(%rsp),%r13 59 movq 24(%rsp),%rbp 60 movq 32(%rsp),%rbx 61 leaq 40(%rsp),%rsp 62L$enc_epilogue: 63 retq 64 65 66 67.p2align 4 68_x86_64_Camellia_encrypt: 69 xorl 0(%r14),%r9d 70 xorl 4(%r14),%r8d 71 xorl 8(%r14),%r11d 72 xorl 12(%r14),%r10d 73.p2align 4 74L$eloop: 75 movl 16(%r14),%ebx 76 movl 20(%r14),%eax 77 78 xorl %r8d,%eax 79 xorl %r9d,%ebx 80 movzbl %ah,%esi 81 movzbl %bl,%edi 82 movl 2052(%rbp,%rsi,8),%edx 83 movl 0(%rbp,%rdi,8),%ecx 84 movzbl %al,%esi 85 shrl $16,%eax 86 movzbl %bh,%edi 87 xorl 4(%rbp,%rsi,8),%edx 88 shrl $16,%ebx 89 xorl 4(%rbp,%rdi,8),%ecx 90 movzbl %ah,%esi 91 movzbl %bl,%edi 92 xorl 0(%rbp,%rsi,8),%edx 93 xorl 2052(%rbp,%rdi,8),%ecx 94 movzbl %al,%esi 95 movzbl %bh,%edi 96 xorl 2048(%rbp,%rsi,8),%edx 97 xorl 2048(%rbp,%rdi,8),%ecx 98 movl 24(%r14),%ebx 99 movl 28(%r14),%eax 100 xorl %edx,%ecx 101 rorl $8,%edx 102 xorl %ecx,%r10d 103 xorl %ecx,%r11d 104 xorl %edx,%r11d 105 xorl %r10d,%eax 106 xorl %r11d,%ebx 107 movzbl %ah,%esi 108 movzbl %bl,%edi 109 movl 2052(%rbp,%rsi,8),%edx 110 movl 0(%rbp,%rdi,8),%ecx 111 movzbl %al,%esi 112 shrl $16,%eax 113 movzbl %bh,%edi 114 xorl 4(%rbp,%rsi,8),%edx 115 shrl $16,%ebx 116 xorl 4(%rbp,%rdi,8),%ecx 117 movzbl %ah,%esi 118 movzbl %bl,%edi 119 xorl 0(%rbp,%rsi,8),%edx 120 xorl 2052(%rbp,%rdi,8),%ecx 121 movzbl %al,%esi 122 movzbl %bh,%edi 123 xorl 2048(%rbp,%rsi,8),%edx 124 xorl 2048(%rbp,%rdi,8),%ecx 125 movl 32(%r14),%ebx 126 movl 36(%r14),%eax 127 xorl %edx,%ecx 128 rorl $8,%edx 129 xorl %ecx,%r8d 130 xorl %ecx,%r9d 131 xorl %edx,%r9d 132 xorl %r8d,%eax 133 xorl %r9d,%ebx 134 movzbl %ah,%esi 135 movzbl %bl,%edi 136 movl 2052(%rbp,%rsi,8),%edx 137 movl 0(%rbp,%rdi,8),%ecx 138 movzbl %al,%esi 139 shrl $16,%eax 140 movzbl %bh,%edi 141 xorl 4(%rbp,%rsi,8),%edx 142 shrl $16,%ebx 143 xorl 4(%rbp,%rdi,8),%ecx 144 movzbl %ah,%esi 145 movzbl %bl,%edi 146 xorl 0(%rbp,%rsi,8),%edx 147 xorl 2052(%rbp,%rdi,8),%ecx 148 movzbl %al,%esi 149 movzbl %bh,%edi 150 xorl 2048(%rbp,%rsi,8),%edx 151 xorl 2048(%rbp,%rdi,8),%ecx 152 movl 40(%r14),%ebx 153 movl 44(%r14),%eax 154 xorl %edx,%ecx 155 rorl $8,%edx 156 xorl %ecx,%r10d 157 xorl %ecx,%r11d 158 xorl %edx,%r11d 159 xorl %r10d,%eax 160 xorl %r11d,%ebx 161 movzbl %ah,%esi 162 movzbl %bl,%edi 163 movl 2052(%rbp,%rsi,8),%edx 164 movl 0(%rbp,%rdi,8),%ecx 165 movzbl %al,%esi 166 shrl $16,%eax 167 movzbl %bh,%edi 168 xorl 4(%rbp,%rsi,8),%edx 169 shrl $16,%ebx 170 xorl 4(%rbp,%rdi,8),%ecx 171 movzbl %ah,%esi 172 movzbl %bl,%edi 173 xorl 0(%rbp,%rsi,8),%edx 174 xorl 2052(%rbp,%rdi,8),%ecx 175 movzbl %al,%esi 176 movzbl %bh,%edi 177 xorl 2048(%rbp,%rsi,8),%edx 178 xorl 2048(%rbp,%rdi,8),%ecx 179 movl 48(%r14),%ebx 180 movl 52(%r14),%eax 181 xorl %edx,%ecx 182 rorl $8,%edx 183 xorl %ecx,%r8d 184 xorl %ecx,%r9d 185 xorl %edx,%r9d 186 xorl %r8d,%eax 187 xorl %r9d,%ebx 188 movzbl %ah,%esi 189 movzbl %bl,%edi 190 movl 2052(%rbp,%rsi,8),%edx 191 movl 0(%rbp,%rdi,8),%ecx 192 movzbl %al,%esi 193 shrl $16,%eax 194 movzbl %bh,%edi 195 xorl 4(%rbp,%rsi,8),%edx 196 shrl $16,%ebx 197 xorl 4(%rbp,%rdi,8),%ecx 198 movzbl %ah,%esi 199 movzbl %bl,%edi 200 xorl 0(%rbp,%rsi,8),%edx 201 xorl 2052(%rbp,%rdi,8),%ecx 202 movzbl %al,%esi 203 movzbl %bh,%edi 204 xorl 2048(%rbp,%rsi,8),%edx 205 xorl 2048(%rbp,%rdi,8),%ecx 206 movl 56(%r14),%ebx 207 movl 60(%r14),%eax 208 xorl %edx,%ecx 209 rorl $8,%edx 210 xorl %ecx,%r10d 211 xorl %ecx,%r11d 212 xorl %edx,%r11d 213 xorl %r10d,%eax 214 xorl %r11d,%ebx 215 movzbl %ah,%esi 216 movzbl %bl,%edi 217 movl 2052(%rbp,%rsi,8),%edx 218 movl 0(%rbp,%rdi,8),%ecx 219 movzbl %al,%esi 220 shrl $16,%eax 221 movzbl %bh,%edi 222 xorl 4(%rbp,%rsi,8),%edx 223 shrl $16,%ebx 224 xorl 4(%rbp,%rdi,8),%ecx 225 movzbl %ah,%esi 226 movzbl %bl,%edi 227 xorl 0(%rbp,%rsi,8),%edx 228 xorl 2052(%rbp,%rdi,8),%ecx 229 movzbl %al,%esi 230 movzbl %bh,%edi 231 xorl 2048(%rbp,%rsi,8),%edx 232 xorl 2048(%rbp,%rdi,8),%ecx 233 movl 64(%r14),%ebx 234 movl 68(%r14),%eax 235 xorl %edx,%ecx 236 rorl $8,%edx 237 xorl %ecx,%r8d 238 xorl %ecx,%r9d 239 xorl %edx,%r9d 240 leaq 64(%r14),%r14 241 cmpq %r15,%r14 242 movl 8(%r14),%edx 243 movl 12(%r14),%ecx 244 je L$edone 245 246 andl %r8d,%eax 247 orl %r11d,%edx 248 roll $1,%eax 249 xorl %edx,%r10d 250 xorl %eax,%r9d 251 andl %r10d,%ecx 252 orl %r9d,%ebx 253 roll $1,%ecx 254 xorl %ebx,%r8d 255 xorl %ecx,%r11d 256 jmp L$eloop 257 258.p2align 4 259L$edone: 260 xorl %r10d,%eax 261 xorl %r11d,%ebx 262 xorl %r8d,%ecx 263 xorl %r9d,%edx 264 265 movl %eax,%r8d 266 movl %ebx,%r9d 267 movl %ecx,%r10d 268 movl %edx,%r11d 269 270 retq 271 272 273 274.globl _Camellia_DecryptBlock 275 276.p2align 4 277_Camellia_DecryptBlock: 278 movl $128,%eax 279 subl %edi,%eax 280 movl $3,%edi 281 adcl $0,%edi 282 jmp L$dec_rounds 283 284 285.globl _Camellia_DecryptBlock_Rounds 286 287.p2align 4 288L$dec_rounds: 289_Camellia_DecryptBlock_Rounds: 290 pushq %rbx 291 pushq %rbp 292 pushq %r13 293 pushq %r14 294 pushq %r15 295L$dec_prologue: 296 297 298 movq %rcx,%r13 299 movq %rdx,%r15 300 301 shll $6,%edi 302 leaq L$Camellia_SBOX(%rip),%rbp 303 leaq (%r15,%rdi,1),%r14 304 305 movl 0(%rsi),%r8d 306 movl 4(%rsi),%r9d 307 movl 8(%rsi),%r10d 308 bswapl %r8d 309 movl 12(%rsi),%r11d 310 bswapl %r9d 311 bswapl %r10d 312 bswapl %r11d 313 314 call _x86_64_Camellia_decrypt 315 316 bswapl %r8d 317 bswapl %r9d 318 bswapl %r10d 319 movl %r8d,0(%r13) 320 bswapl %r11d 321 movl %r9d,4(%r13) 322 movl %r10d,8(%r13) 323 movl %r11d,12(%r13) 324 325 movq 0(%rsp),%r15 326 movq 8(%rsp),%r14 327 movq 16(%rsp),%r13 328 movq 24(%rsp),%rbp 329 movq 32(%rsp),%rbx 330 leaq 40(%rsp),%rsp 331L$dec_epilogue: 332 retq 333 334 335 336.p2align 4 337_x86_64_Camellia_decrypt: 338 xorl 0(%r14),%r9d 339 xorl 4(%r14),%r8d 340 xorl 8(%r14),%r11d 341 xorl 12(%r14),%r10d 342.p2align 4 343L$dloop: 344 movl -8(%r14),%ebx 345 movl -4(%r14),%eax 346 347 xorl %r8d,%eax 348 xorl %r9d,%ebx 349 movzbl %ah,%esi 350 movzbl %bl,%edi 351 movl 2052(%rbp,%rsi,8),%edx 352 movl 0(%rbp,%rdi,8),%ecx 353 movzbl %al,%esi 354 shrl $16,%eax 355 movzbl %bh,%edi 356 xorl 4(%rbp,%rsi,8),%edx 357 shrl $16,%ebx 358 xorl 4(%rbp,%rdi,8),%ecx 359 movzbl %ah,%esi 360 movzbl %bl,%edi 361 xorl 0(%rbp,%rsi,8),%edx 362 xorl 2052(%rbp,%rdi,8),%ecx 363 movzbl %al,%esi 364 movzbl %bh,%edi 365 xorl 2048(%rbp,%rsi,8),%edx 366 xorl 2048(%rbp,%rdi,8),%ecx 367 movl -16(%r14),%ebx 368 movl -12(%r14),%eax 369 xorl %edx,%ecx 370 rorl $8,%edx 371 xorl %ecx,%r10d 372 xorl %ecx,%r11d 373 xorl %edx,%r11d 374 xorl %r10d,%eax 375 xorl %r11d,%ebx 376 movzbl %ah,%esi 377 movzbl %bl,%edi 378 movl 2052(%rbp,%rsi,8),%edx 379 movl 0(%rbp,%rdi,8),%ecx 380 movzbl %al,%esi 381 shrl $16,%eax 382 movzbl %bh,%edi 383 xorl 4(%rbp,%rsi,8),%edx 384 shrl $16,%ebx 385 xorl 4(%rbp,%rdi,8),%ecx 386 movzbl %ah,%esi 387 movzbl %bl,%edi 388 xorl 0(%rbp,%rsi,8),%edx 389 xorl 2052(%rbp,%rdi,8),%ecx 390 movzbl %al,%esi 391 movzbl %bh,%edi 392 xorl 2048(%rbp,%rsi,8),%edx 393 xorl 2048(%rbp,%rdi,8),%ecx 394 movl -24(%r14),%ebx 395 movl -20(%r14),%eax 396 xorl %edx,%ecx 397 rorl $8,%edx 398 xorl %ecx,%r8d 399 xorl %ecx,%r9d 400 xorl %edx,%r9d 401 xorl %r8d,%eax 402 xorl %r9d,%ebx 403 movzbl %ah,%esi 404 movzbl %bl,%edi 405 movl 2052(%rbp,%rsi,8),%edx 406 movl 0(%rbp,%rdi,8),%ecx 407 movzbl %al,%esi 408 shrl $16,%eax 409 movzbl %bh,%edi 410 xorl 4(%rbp,%rsi,8),%edx 411 shrl $16,%ebx 412 xorl 4(%rbp,%rdi,8),%ecx 413 movzbl %ah,%esi 414 movzbl %bl,%edi 415 xorl 0(%rbp,%rsi,8),%edx 416 xorl 2052(%rbp,%rdi,8),%ecx 417 movzbl %al,%esi 418 movzbl %bh,%edi 419 xorl 2048(%rbp,%rsi,8),%edx 420 xorl 2048(%rbp,%rdi,8),%ecx 421 movl -32(%r14),%ebx 422 movl -28(%r14),%eax 423 xorl %edx,%ecx 424 rorl $8,%edx 425 xorl %ecx,%r10d 426 xorl %ecx,%r11d 427 xorl %edx,%r11d 428 xorl %r10d,%eax 429 xorl %r11d,%ebx 430 movzbl %ah,%esi 431 movzbl %bl,%edi 432 movl 2052(%rbp,%rsi,8),%edx 433 movl 0(%rbp,%rdi,8),%ecx 434 movzbl %al,%esi 435 shrl $16,%eax 436 movzbl %bh,%edi 437 xorl 4(%rbp,%rsi,8),%edx 438 shrl $16,%ebx 439 xorl 4(%rbp,%rdi,8),%ecx 440 movzbl %ah,%esi 441 movzbl %bl,%edi 442 xorl 0(%rbp,%rsi,8),%edx 443 xorl 2052(%rbp,%rdi,8),%ecx 444 movzbl %al,%esi 445 movzbl %bh,%edi 446 xorl 2048(%rbp,%rsi,8),%edx 447 xorl 2048(%rbp,%rdi,8),%ecx 448 movl -40(%r14),%ebx 449 movl -36(%r14),%eax 450 xorl %edx,%ecx 451 rorl $8,%edx 452 xorl %ecx,%r8d 453 xorl %ecx,%r9d 454 xorl %edx,%r9d 455 xorl %r8d,%eax 456 xorl %r9d,%ebx 457 movzbl %ah,%esi 458 movzbl %bl,%edi 459 movl 2052(%rbp,%rsi,8),%edx 460 movl 0(%rbp,%rdi,8),%ecx 461 movzbl %al,%esi 462 shrl $16,%eax 463 movzbl %bh,%edi 464 xorl 4(%rbp,%rsi,8),%edx 465 shrl $16,%ebx 466 xorl 4(%rbp,%rdi,8),%ecx 467 movzbl %ah,%esi 468 movzbl %bl,%edi 469 xorl 0(%rbp,%rsi,8),%edx 470 xorl 2052(%rbp,%rdi,8),%ecx 471 movzbl %al,%esi 472 movzbl %bh,%edi 473 xorl 2048(%rbp,%rsi,8),%edx 474 xorl 2048(%rbp,%rdi,8),%ecx 475 movl -48(%r14),%ebx 476 movl -44(%r14),%eax 477 xorl %edx,%ecx 478 rorl $8,%edx 479 xorl %ecx,%r10d 480 xorl %ecx,%r11d 481 xorl %edx,%r11d 482 xorl %r10d,%eax 483 xorl %r11d,%ebx 484 movzbl %ah,%esi 485 movzbl %bl,%edi 486 movl 2052(%rbp,%rsi,8),%edx 487 movl 0(%rbp,%rdi,8),%ecx 488 movzbl %al,%esi 489 shrl $16,%eax 490 movzbl %bh,%edi 491 xorl 4(%rbp,%rsi,8),%edx 492 shrl $16,%ebx 493 xorl 4(%rbp,%rdi,8),%ecx 494 movzbl %ah,%esi 495 movzbl %bl,%edi 496 xorl 0(%rbp,%rsi,8),%edx 497 xorl 2052(%rbp,%rdi,8),%ecx 498 movzbl %al,%esi 499 movzbl %bh,%edi 500 xorl 2048(%rbp,%rsi,8),%edx 501 xorl 2048(%rbp,%rdi,8),%ecx 502 movl -56(%r14),%ebx 503 movl -52(%r14),%eax 504 xorl %edx,%ecx 505 rorl $8,%edx 506 xorl %ecx,%r8d 507 xorl %ecx,%r9d 508 xorl %edx,%r9d 509 leaq -64(%r14),%r14 510 cmpq %r15,%r14 511 movl 0(%r14),%edx 512 movl 4(%r14),%ecx 513 je L$ddone 514 515 andl %r8d,%eax 516 orl %r11d,%edx 517 roll $1,%eax 518 xorl %edx,%r10d 519 xorl %eax,%r9d 520 andl %r10d,%ecx 521 orl %r9d,%ebx 522 roll $1,%ecx 523 xorl %ebx,%r8d 524 xorl %ecx,%r11d 525 526 jmp L$dloop 527 528.p2align 4 529L$ddone: 530 xorl %r10d,%ecx 531 xorl %r11d,%edx 532 xorl %r8d,%eax 533 xorl %r9d,%ebx 534 535 movl %ecx,%r8d 536 movl %edx,%r9d 537 movl %eax,%r10d 538 movl %ebx,%r11d 539 540 retq 541 542.globl _Camellia_Ekeygen 543 544.p2align 4 545_Camellia_Ekeygen: 546 pushq %rbx 547 pushq %rbp 548 pushq %r13 549 pushq %r14 550 pushq %r15 551L$key_prologue: 552 553 movq %rdi,%r15 554 movq %rdx,%r13 555 556 movl 0(%rsi),%r8d 557 movl 4(%rsi),%r9d 558 movl 8(%rsi),%r10d 559 movl 12(%rsi),%r11d 560 561 bswapl %r8d 562 bswapl %r9d 563 bswapl %r10d 564 bswapl %r11d 565 movl %r9d,0(%r13) 566 movl %r8d,4(%r13) 567 movl %r11d,8(%r13) 568 movl %r10d,12(%r13) 569 cmpq $128,%r15 570 je L$1st128 571 572 movl 16(%rsi),%r8d 573 movl 20(%rsi),%r9d 574 cmpq $192,%r15 575 je L$1st192 576 movl 24(%rsi),%r10d 577 movl 28(%rsi),%r11d 578 jmp L$1st256 579L$1st192: 580 movl %r8d,%r10d 581 movl %r9d,%r11d 582 notl %r10d 583 notl %r11d 584L$1st256: 585 bswapl %r8d 586 bswapl %r9d 587 bswapl %r10d 588 bswapl %r11d 589 movl %r9d,32(%r13) 590 movl %r8d,36(%r13) 591 movl %r11d,40(%r13) 592 movl %r10d,44(%r13) 593 xorl 0(%r13),%r9d 594 xorl 4(%r13),%r8d 595 xorl 8(%r13),%r11d 596 xorl 12(%r13),%r10d 597 598L$1st128: 599 leaq L$Camellia_SIGMA(%rip),%r14 600 leaq L$Camellia_SBOX(%rip),%rbp 601 602 movl 0(%r14),%ebx 603 movl 4(%r14),%eax 604 xorl %r8d,%eax 605 xorl %r9d,%ebx 606 movzbl %ah,%esi 607 movzbl %bl,%edi 608 movl 2052(%rbp,%rsi,8),%edx 609 movl 0(%rbp,%rdi,8),%ecx 610 movzbl %al,%esi 611 shrl $16,%eax 612 movzbl %bh,%edi 613 xorl 4(%rbp,%rsi,8),%edx 614 shrl $16,%ebx 615 xorl 4(%rbp,%rdi,8),%ecx 616 movzbl %ah,%esi 617 movzbl %bl,%edi 618 xorl 0(%rbp,%rsi,8),%edx 619 xorl 2052(%rbp,%rdi,8),%ecx 620 movzbl %al,%esi 621 movzbl %bh,%edi 622 xorl 2048(%rbp,%rsi,8),%edx 623 xorl 2048(%rbp,%rdi,8),%ecx 624 movl 8(%r14),%ebx 625 movl 12(%r14),%eax 626 xorl %edx,%ecx 627 rorl $8,%edx 628 xorl %ecx,%r10d 629 xorl %ecx,%r11d 630 xorl %edx,%r11d 631 xorl %r10d,%eax 632 xorl %r11d,%ebx 633 movzbl %ah,%esi 634 movzbl %bl,%edi 635 movl 2052(%rbp,%rsi,8),%edx 636 movl 0(%rbp,%rdi,8),%ecx 637 movzbl %al,%esi 638 shrl $16,%eax 639 movzbl %bh,%edi 640 xorl 4(%rbp,%rsi,8),%edx 641 shrl $16,%ebx 642 xorl 4(%rbp,%rdi,8),%ecx 643 movzbl %ah,%esi 644 movzbl %bl,%edi 645 xorl 0(%rbp,%rsi,8),%edx 646 xorl 2052(%rbp,%rdi,8),%ecx 647 movzbl %al,%esi 648 movzbl %bh,%edi 649 xorl 2048(%rbp,%rsi,8),%edx 650 xorl 2048(%rbp,%rdi,8),%ecx 651 movl 16(%r14),%ebx 652 movl 20(%r14),%eax 653 xorl %edx,%ecx 654 rorl $8,%edx 655 xorl %ecx,%r8d 656 xorl %ecx,%r9d 657 xorl %edx,%r9d 658 xorl 0(%r13),%r9d 659 xorl 4(%r13),%r8d 660 xorl 8(%r13),%r11d 661 xorl 12(%r13),%r10d 662 xorl %r8d,%eax 663 xorl %r9d,%ebx 664 movzbl %ah,%esi 665 movzbl %bl,%edi 666 movl 2052(%rbp,%rsi,8),%edx 667 movl 0(%rbp,%rdi,8),%ecx 668 movzbl %al,%esi 669 shrl $16,%eax 670 movzbl %bh,%edi 671 xorl 4(%rbp,%rsi,8),%edx 672 shrl $16,%ebx 673 xorl 4(%rbp,%rdi,8),%ecx 674 movzbl %ah,%esi 675 movzbl %bl,%edi 676 xorl 0(%rbp,%rsi,8),%edx 677 xorl 2052(%rbp,%rdi,8),%ecx 678 movzbl %al,%esi 679 movzbl %bh,%edi 680 xorl 2048(%rbp,%rsi,8),%edx 681 xorl 2048(%rbp,%rdi,8),%ecx 682 movl 24(%r14),%ebx 683 movl 28(%r14),%eax 684 xorl %edx,%ecx 685 rorl $8,%edx 686 xorl %ecx,%r10d 687 xorl %ecx,%r11d 688 xorl %edx,%r11d 689 xorl %r10d,%eax 690 xorl %r11d,%ebx 691 movzbl %ah,%esi 692 movzbl %bl,%edi 693 movl 2052(%rbp,%rsi,8),%edx 694 movl 0(%rbp,%rdi,8),%ecx 695 movzbl %al,%esi 696 shrl $16,%eax 697 movzbl %bh,%edi 698 xorl 4(%rbp,%rsi,8),%edx 699 shrl $16,%ebx 700 xorl 4(%rbp,%rdi,8),%ecx 701 movzbl %ah,%esi 702 movzbl %bl,%edi 703 xorl 0(%rbp,%rsi,8),%edx 704 xorl 2052(%rbp,%rdi,8),%ecx 705 movzbl %al,%esi 706 movzbl %bh,%edi 707 xorl 2048(%rbp,%rsi,8),%edx 708 xorl 2048(%rbp,%rdi,8),%ecx 709 movl 32(%r14),%ebx 710 movl 36(%r14),%eax 711 xorl %edx,%ecx 712 rorl $8,%edx 713 xorl %ecx,%r8d 714 xorl %ecx,%r9d 715 xorl %edx,%r9d 716 cmpq $128,%r15 717 jne L$2nd256 718 719 leaq 128(%r13),%r13 720 shlq $32,%r8 721 shlq $32,%r10 722 orq %r9,%r8 723 orq %r11,%r10 724 movq -128(%r13),%rax 725 movq -120(%r13),%rbx 726 movq %r8,-112(%r13) 727 movq %r10,-104(%r13) 728 movq %rax,%r11 729 shlq $15,%rax 730 movq %rbx,%r9 731 shrq $49,%r9 732 shrq $49,%r11 733 orq %r9,%rax 734 shlq $15,%rbx 735 orq %r11,%rbx 736 movq %rax,-96(%r13) 737 movq %rbx,-88(%r13) 738 movq %r8,%r11 739 shlq $15,%r8 740 movq %r10,%r9 741 shrq $49,%r9 742 shrq $49,%r11 743 orq %r9,%r8 744 shlq $15,%r10 745 orq %r11,%r10 746 movq %r8,-80(%r13) 747 movq %r10,-72(%r13) 748 movq %r8,%r11 749 shlq $15,%r8 750 movq %r10,%r9 751 shrq $49,%r9 752 shrq $49,%r11 753 orq %r9,%r8 754 shlq $15,%r10 755 orq %r11,%r10 756 movq %r8,-64(%r13) 757 movq %r10,-56(%r13) 758 movq %rax,%r11 759 shlq $30,%rax 760 movq %rbx,%r9 761 shrq $34,%r9 762 shrq $34,%r11 763 orq %r9,%rax 764 shlq $30,%rbx 765 orq %r11,%rbx 766 movq %rax,-48(%r13) 767 movq %rbx,-40(%r13) 768 movq %r8,%r11 769 shlq $15,%r8 770 movq %r10,%r9 771 shrq $49,%r9 772 shrq $49,%r11 773 orq %r9,%r8 774 shlq $15,%r10 775 orq %r11,%r10 776 movq %r8,-32(%r13) 777 movq %rax,%r11 778 shlq $15,%rax 779 movq %rbx,%r9 780 shrq $49,%r9 781 shrq $49,%r11 782 orq %r9,%rax 783 shlq $15,%rbx 784 orq %r11,%rbx 785 movq %rbx,-24(%r13) 786 movq %r8,%r11 787 shlq $15,%r8 788 movq %r10,%r9 789 shrq $49,%r9 790 shrq $49,%r11 791 orq %r9,%r8 792 shlq $15,%r10 793 orq %r11,%r10 794 movq %r8,-16(%r13) 795 movq %r10,-8(%r13) 796 movq %rax,%r11 797 shlq $17,%rax 798 movq %rbx,%r9 799 shrq $47,%r9 800 shrq $47,%r11 801 orq %r9,%rax 802 shlq $17,%rbx 803 orq %r11,%rbx 804 movq %rax,0(%r13) 805 movq %rbx,8(%r13) 806 movq %rax,%r11 807 shlq $17,%rax 808 movq %rbx,%r9 809 shrq $47,%r9 810 shrq $47,%r11 811 orq %r9,%rax 812 shlq $17,%rbx 813 orq %r11,%rbx 814 movq %rax,16(%r13) 815 movq %rbx,24(%r13) 816 movq %r8,%r11 817 shlq $34,%r8 818 movq %r10,%r9 819 shrq $30,%r9 820 shrq $30,%r11 821 orq %r9,%r8 822 shlq $34,%r10 823 orq %r11,%r10 824 movq %r8,32(%r13) 825 movq %r10,40(%r13) 826 movq %rax,%r11 827 shlq $17,%rax 828 movq %rbx,%r9 829 shrq $47,%r9 830 shrq $47,%r11 831 orq %r9,%rax 832 shlq $17,%rbx 833 orq %r11,%rbx 834 movq %rax,48(%r13) 835 movq %rbx,56(%r13) 836 movq %r8,%r11 837 shlq $17,%r8 838 movq %r10,%r9 839 shrq $47,%r9 840 shrq $47,%r11 841 orq %r9,%r8 842 shlq $17,%r10 843 orq %r11,%r10 844 movq %r8,64(%r13) 845 movq %r10,72(%r13) 846 movl $3,%eax 847 jmp L$done 848.p2align 4 849L$2nd256: 850 movl %r9d,48(%r13) 851 movl %r8d,52(%r13) 852 movl %r11d,56(%r13) 853 movl %r10d,60(%r13) 854 xorl 32(%r13),%r9d 855 xorl 36(%r13),%r8d 856 xorl 40(%r13),%r11d 857 xorl 44(%r13),%r10d 858 xorl %r8d,%eax 859 xorl %r9d,%ebx 860 movzbl %ah,%esi 861 movzbl %bl,%edi 862 movl 2052(%rbp,%rsi,8),%edx 863 movl 0(%rbp,%rdi,8),%ecx 864 movzbl %al,%esi 865 shrl $16,%eax 866 movzbl %bh,%edi 867 xorl 4(%rbp,%rsi,8),%edx 868 shrl $16,%ebx 869 xorl 4(%rbp,%rdi,8),%ecx 870 movzbl %ah,%esi 871 movzbl %bl,%edi 872 xorl 0(%rbp,%rsi,8),%edx 873 xorl 2052(%rbp,%rdi,8),%ecx 874 movzbl %al,%esi 875 movzbl %bh,%edi 876 xorl 2048(%rbp,%rsi,8),%edx 877 xorl 2048(%rbp,%rdi,8),%ecx 878 movl 40(%r14),%ebx 879 movl 44(%r14),%eax 880 xorl %edx,%ecx 881 rorl $8,%edx 882 xorl %ecx,%r10d 883 xorl %ecx,%r11d 884 xorl %edx,%r11d 885 xorl %r10d,%eax 886 xorl %r11d,%ebx 887 movzbl %ah,%esi 888 movzbl %bl,%edi 889 movl 2052(%rbp,%rsi,8),%edx 890 movl 0(%rbp,%rdi,8),%ecx 891 movzbl %al,%esi 892 shrl $16,%eax 893 movzbl %bh,%edi 894 xorl 4(%rbp,%rsi,8),%edx 895 shrl $16,%ebx 896 xorl 4(%rbp,%rdi,8),%ecx 897 movzbl %ah,%esi 898 movzbl %bl,%edi 899 xorl 0(%rbp,%rsi,8),%edx 900 xorl 2052(%rbp,%rdi,8),%ecx 901 movzbl %al,%esi 902 movzbl %bh,%edi 903 xorl 2048(%rbp,%rsi,8),%edx 904 xorl 2048(%rbp,%rdi,8),%ecx 905 movl 48(%r14),%ebx 906 movl 52(%r14),%eax 907 xorl %edx,%ecx 908 rorl $8,%edx 909 xorl %ecx,%r8d 910 xorl %ecx,%r9d 911 xorl %edx,%r9d 912 movq 0(%r13),%rax 913 movq 8(%r13),%rbx 914 movq 32(%r13),%rcx 915 movq 40(%r13),%rdx 916 movq 48(%r13),%r14 917 movq 56(%r13),%r15 918 leaq 128(%r13),%r13 919 shlq $32,%r8 920 shlq $32,%r10 921 orq %r9,%r8 922 orq %r11,%r10 923 movq %r8,-112(%r13) 924 movq %r10,-104(%r13) 925 movq %rcx,%r11 926 shlq $15,%rcx 927 movq %rdx,%r9 928 shrq $49,%r9 929 shrq $49,%r11 930 orq %r9,%rcx 931 shlq $15,%rdx 932 orq %r11,%rdx 933 movq %rcx,-96(%r13) 934 movq %rdx,-88(%r13) 935 movq %r14,%r11 936 shlq $15,%r14 937 movq %r15,%r9 938 shrq $49,%r9 939 shrq $49,%r11 940 orq %r9,%r14 941 shlq $15,%r15 942 orq %r11,%r15 943 movq %r14,-80(%r13) 944 movq %r15,-72(%r13) 945 movq %rcx,%r11 946 shlq $15,%rcx 947 movq %rdx,%r9 948 shrq $49,%r9 949 shrq $49,%r11 950 orq %r9,%rcx 951 shlq $15,%rdx 952 orq %r11,%rdx 953 movq %rcx,-64(%r13) 954 movq %rdx,-56(%r13) 955 movq %r8,%r11 956 shlq $30,%r8 957 movq %r10,%r9 958 shrq $34,%r9 959 shrq $34,%r11 960 orq %r9,%r8 961 shlq $30,%r10 962 orq %r11,%r10 963 movq %r8,-48(%r13) 964 movq %r10,-40(%r13) 965 movq %rax,%r11 966 shlq $45,%rax 967 movq %rbx,%r9 968 shrq $19,%r9 969 shrq $19,%r11 970 orq %r9,%rax 971 shlq $45,%rbx 972 orq %r11,%rbx 973 movq %rax,-32(%r13) 974 movq %rbx,-24(%r13) 975 movq %r14,%r11 976 shlq $30,%r14 977 movq %r15,%r9 978 shrq $34,%r9 979 shrq $34,%r11 980 orq %r9,%r14 981 shlq $30,%r15 982 orq %r11,%r15 983 movq %r14,-16(%r13) 984 movq %r15,-8(%r13) 985 movq %rax,%r11 986 shlq $15,%rax 987 movq %rbx,%r9 988 shrq $49,%r9 989 shrq $49,%r11 990 orq %r9,%rax 991 shlq $15,%rbx 992 orq %r11,%rbx 993 movq %rax,0(%r13) 994 movq %rbx,8(%r13) 995 movq %rcx,%r11 996 shlq $30,%rcx 997 movq %rdx,%r9 998 shrq $34,%r9 999 shrq $34,%r11 1000 orq %r9,%rcx 1001 shlq $30,%rdx 1002 orq %r11,%rdx 1003 movq %rcx,16(%r13) 1004 movq %rdx,24(%r13) 1005 movq %r8,%r11 1006 shlq $30,%r8 1007 movq %r10,%r9 1008 shrq $34,%r9 1009 shrq $34,%r11 1010 orq %r9,%r8 1011 shlq $30,%r10 1012 orq %r11,%r10 1013 movq %r8,32(%r13) 1014 movq %r10,40(%r13) 1015 movq %rax,%r11 1016 shlq $17,%rax 1017 movq %rbx,%r9 1018 shrq $47,%r9 1019 shrq $47,%r11 1020 orq %r9,%rax 1021 shlq $17,%rbx 1022 orq %r11,%rbx 1023 movq %rax,48(%r13) 1024 movq %rbx,56(%r13) 1025 movq %r14,%r11 1026 shlq $32,%r14 1027 movq %r15,%r9 1028 shrq $32,%r9 1029 shrq $32,%r11 1030 orq %r9,%r14 1031 shlq $32,%r15 1032 orq %r11,%r15 1033 movq %r14,64(%r13) 1034 movq %r15,72(%r13) 1035 movq %rcx,%r11 1036 shlq $34,%rcx 1037 movq %rdx,%r9 1038 shrq $30,%r9 1039 shrq $30,%r11 1040 orq %r9,%rcx 1041 shlq $34,%rdx 1042 orq %r11,%rdx 1043 movq %rcx,80(%r13) 1044 movq %rdx,88(%r13) 1045 movq %r14,%r11 1046 shlq $17,%r14 1047 movq %r15,%r9 1048 shrq $47,%r9 1049 shrq $47,%r11 1050 orq %r9,%r14 1051 shlq $17,%r15 1052 orq %r11,%r15 1053 movq %r14,96(%r13) 1054 movq %r15,104(%r13) 1055 movq %rax,%r11 1056 shlq $34,%rax 1057 movq %rbx,%r9 1058 shrq $30,%r9 1059 shrq $30,%r11 1060 orq %r9,%rax 1061 shlq $34,%rbx 1062 orq %r11,%rbx 1063 movq %rax,112(%r13) 1064 movq %rbx,120(%r13) 1065 movq %r8,%r11 1066 shlq $51,%r8 1067 movq %r10,%r9 1068 shrq $13,%r9 1069 shrq $13,%r11 1070 orq %r9,%r8 1071 shlq $51,%r10 1072 orq %r11,%r10 1073 movq %r8,128(%r13) 1074 movq %r10,136(%r13) 1075 movl $4,%eax 1076L$done: 1077 movq 0(%rsp),%r15 1078 movq 8(%rsp),%r14 1079 movq 16(%rsp),%r13 1080 movq 24(%rsp),%rbp 1081 movq 32(%rsp),%rbx 1082 leaq 40(%rsp),%rsp 1083L$key_epilogue: 1084 retq 1085 1086.p2align 6 1087L$Camellia_SIGMA: 1088.long 0x3bcc908b, 0xa09e667f, 0x4caa73b2, 0xb67ae858 1089.long 0xe94f82be, 0xc6ef372f, 0xf1d36f1c, 0x54ff53a5 1090.long 0xde682d1d, 0x10e527fa, 0xb3e6c1fd, 0xb05688c2 1091.long 0, 0, 0, 0 1092L$Camellia_SBOX: 1093.long 0x70707000,0x70700070 1094.long 0x82828200,0x2c2c002c 1095.long 0x2c2c2c00,0xb3b300b3 1096.long 0xececec00,0xc0c000c0 1097.long 0xb3b3b300,0xe4e400e4 1098.long 0x27272700,0x57570057 1099.long 0xc0c0c000,0xeaea00ea 1100.long 0xe5e5e500,0xaeae00ae 1101.long 0xe4e4e400,0x23230023 1102.long 0x85858500,0x6b6b006b 1103.long 0x57575700,0x45450045 1104.long 0x35353500,0xa5a500a5 1105.long 0xeaeaea00,0xeded00ed 1106.long 0x0c0c0c00,0x4f4f004f 1107.long 0xaeaeae00,0x1d1d001d 1108.long 0x41414100,0x92920092 1109.long 0x23232300,0x86860086 1110.long 0xefefef00,0xafaf00af 1111.long 0x6b6b6b00,0x7c7c007c 1112.long 0x93939300,0x1f1f001f 1113.long 0x45454500,0x3e3e003e 1114.long 0x19191900,0xdcdc00dc 1115.long 0xa5a5a500,0x5e5e005e 1116.long 0x21212100,0x0b0b000b 1117.long 0xededed00,0xa6a600a6 1118.long 0x0e0e0e00,0x39390039 1119.long 0x4f4f4f00,0xd5d500d5 1120.long 0x4e4e4e00,0x5d5d005d 1121.long 0x1d1d1d00,0xd9d900d9 1122.long 0x65656500,0x5a5a005a 1123.long 0x92929200,0x51510051 1124.long 0xbdbdbd00,0x6c6c006c 1125.long 0x86868600,0x8b8b008b 1126.long 0xb8b8b800,0x9a9a009a 1127.long 0xafafaf00,0xfbfb00fb 1128.long 0x8f8f8f00,0xb0b000b0 1129.long 0x7c7c7c00,0x74740074 1130.long 0xebebeb00,0x2b2b002b 1131.long 0x1f1f1f00,0xf0f000f0 1132.long 0xcecece00,0x84840084 1133.long 0x3e3e3e00,0xdfdf00df 1134.long 0x30303000,0xcbcb00cb 1135.long 0xdcdcdc00,0x34340034 1136.long 0x5f5f5f00,0x76760076 1137.long 0x5e5e5e00,0x6d6d006d 1138.long 0xc5c5c500,0xa9a900a9 1139.long 0x0b0b0b00,0xd1d100d1 1140.long 0x1a1a1a00,0x04040004 1141.long 0xa6a6a600,0x14140014 1142.long 0xe1e1e100,0x3a3a003a 1143.long 0x39393900,0xdede00de 1144.long 0xcacaca00,0x11110011 1145.long 0xd5d5d500,0x32320032 1146.long 0x47474700,0x9c9c009c 1147.long 0x5d5d5d00,0x53530053 1148.long 0x3d3d3d00,0xf2f200f2 1149.long 0xd9d9d900,0xfefe00fe 1150.long 0x01010100,0xcfcf00cf 1151.long 0x5a5a5a00,0xc3c300c3 1152.long 0xd6d6d600,0x7a7a007a 1153.long 0x51515100,0x24240024 1154.long 0x56565600,0xe8e800e8 1155.long 0x6c6c6c00,0x60600060 1156.long 0x4d4d4d00,0x69690069 1157.long 0x8b8b8b00,0xaaaa00aa 1158.long 0x0d0d0d00,0xa0a000a0 1159.long 0x9a9a9a00,0xa1a100a1 1160.long 0x66666600,0x62620062 1161.long 0xfbfbfb00,0x54540054 1162.long 0xcccccc00,0x1e1e001e 1163.long 0xb0b0b000,0xe0e000e0 1164.long 0x2d2d2d00,0x64640064 1165.long 0x74747400,0x10100010 1166.long 0x12121200,0x00000000 1167.long 0x2b2b2b00,0xa3a300a3 1168.long 0x20202000,0x75750075 1169.long 0xf0f0f000,0x8a8a008a 1170.long 0xb1b1b100,0xe6e600e6 1171.long 0x84848400,0x09090009 1172.long 0x99999900,0xdddd00dd 1173.long 0xdfdfdf00,0x87870087 1174.long 0x4c4c4c00,0x83830083 1175.long 0xcbcbcb00,0xcdcd00cd 1176.long 0xc2c2c200,0x90900090 1177.long 0x34343400,0x73730073 1178.long 0x7e7e7e00,0xf6f600f6 1179.long 0x76767600,0x9d9d009d 1180.long 0x05050500,0xbfbf00bf 1181.long 0x6d6d6d00,0x52520052 1182.long 0xb7b7b700,0xd8d800d8 1183.long 0xa9a9a900,0xc8c800c8 1184.long 0x31313100,0xc6c600c6 1185.long 0xd1d1d100,0x81810081 1186.long 0x17171700,0x6f6f006f 1187.long 0x04040400,0x13130013 1188.long 0xd7d7d700,0x63630063 1189.long 0x14141400,0xe9e900e9 1190.long 0x58585800,0xa7a700a7 1191.long 0x3a3a3a00,0x9f9f009f 1192.long 0x61616100,0xbcbc00bc 1193.long 0xdedede00,0x29290029 1194.long 0x1b1b1b00,0xf9f900f9 1195.long 0x11111100,0x2f2f002f 1196.long 0x1c1c1c00,0xb4b400b4 1197.long 0x32323200,0x78780078 1198.long 0x0f0f0f00,0x06060006 1199.long 0x9c9c9c00,0xe7e700e7 1200.long 0x16161600,0x71710071 1201.long 0x53535300,0xd4d400d4 1202.long 0x18181800,0xabab00ab 1203.long 0xf2f2f200,0x88880088 1204.long 0x22222200,0x8d8d008d 1205.long 0xfefefe00,0x72720072 1206.long 0x44444400,0xb9b900b9 1207.long 0xcfcfcf00,0xf8f800f8 1208.long 0xb2b2b200,0xacac00ac 1209.long 0xc3c3c300,0x36360036 1210.long 0xb5b5b500,0x2a2a002a 1211.long 0x7a7a7a00,0x3c3c003c 1212.long 0x91919100,0xf1f100f1 1213.long 0x24242400,0x40400040 1214.long 0x08080800,0xd3d300d3 1215.long 0xe8e8e800,0xbbbb00bb 1216.long 0xa8a8a800,0x43430043 1217.long 0x60606000,0x15150015 1218.long 0xfcfcfc00,0xadad00ad 1219.long 0x69696900,0x77770077 1220.long 0x50505000,0x80800080 1221.long 0xaaaaaa00,0x82820082 1222.long 0xd0d0d000,0xecec00ec 1223.long 0xa0a0a000,0x27270027 1224.long 0x7d7d7d00,0xe5e500e5 1225.long 0xa1a1a100,0x85850085 1226.long 0x89898900,0x35350035 1227.long 0x62626200,0x0c0c000c 1228.long 0x97979700,0x41410041 1229.long 0x54545400,0xefef00ef 1230.long 0x5b5b5b00,0x93930093 1231.long 0x1e1e1e00,0x19190019 1232.long 0x95959500,0x21210021 1233.long 0xe0e0e000,0x0e0e000e 1234.long 0xffffff00,0x4e4e004e 1235.long 0x64646400,0x65650065 1236.long 0xd2d2d200,0xbdbd00bd 1237.long 0x10101000,0xb8b800b8 1238.long 0xc4c4c400,0x8f8f008f 1239.long 0x00000000,0xebeb00eb 1240.long 0x48484800,0xcece00ce 1241.long 0xa3a3a300,0x30300030 1242.long 0xf7f7f700,0x5f5f005f 1243.long 0x75757500,0xc5c500c5 1244.long 0xdbdbdb00,0x1a1a001a 1245.long 0x8a8a8a00,0xe1e100e1 1246.long 0x03030300,0xcaca00ca 1247.long 0xe6e6e600,0x47470047 1248.long 0xdadada00,0x3d3d003d 1249.long 0x09090900,0x01010001 1250.long 0x3f3f3f00,0xd6d600d6 1251.long 0xdddddd00,0x56560056 1252.long 0x94949400,0x4d4d004d 1253.long 0x87878700,0x0d0d000d 1254.long 0x5c5c5c00,0x66660066 1255.long 0x83838300,0xcccc00cc 1256.long 0x02020200,0x2d2d002d 1257.long 0xcdcdcd00,0x12120012 1258.long 0x4a4a4a00,0x20200020 1259.long 0x90909000,0xb1b100b1 1260.long 0x33333300,0x99990099 1261.long 0x73737300,0x4c4c004c 1262.long 0x67676700,0xc2c200c2 1263.long 0xf6f6f600,0x7e7e007e 1264.long 0xf3f3f300,0x05050005 1265.long 0x9d9d9d00,0xb7b700b7 1266.long 0x7f7f7f00,0x31310031 1267.long 0xbfbfbf00,0x17170017 1268.long 0xe2e2e200,0xd7d700d7 1269.long 0x52525200,0x58580058 1270.long 0x9b9b9b00,0x61610061 1271.long 0xd8d8d800,0x1b1b001b 1272.long 0x26262600,0x1c1c001c 1273.long 0xc8c8c800,0x0f0f000f 1274.long 0x37373700,0x16160016 1275.long 0xc6c6c600,0x18180018 1276.long 0x3b3b3b00,0x22220022 1277.long 0x81818100,0x44440044 1278.long 0x96969600,0xb2b200b2 1279.long 0x6f6f6f00,0xb5b500b5 1280.long 0x4b4b4b00,0x91910091 1281.long 0x13131300,0x08080008 1282.long 0xbebebe00,0xa8a800a8 1283.long 0x63636300,0xfcfc00fc 1284.long 0x2e2e2e00,0x50500050 1285.long 0xe9e9e900,0xd0d000d0 1286.long 0x79797900,0x7d7d007d 1287.long 0xa7a7a700,0x89890089 1288.long 0x8c8c8c00,0x97970097 1289.long 0x9f9f9f00,0x5b5b005b 1290.long 0x6e6e6e00,0x95950095 1291.long 0xbcbcbc00,0xffff00ff 1292.long 0x8e8e8e00,0xd2d200d2 1293.long 0x29292900,0xc4c400c4 1294.long 0xf5f5f500,0x48480048 1295.long 0xf9f9f900,0xf7f700f7 1296.long 0xb6b6b600,0xdbdb00db 1297.long 0x2f2f2f00,0x03030003 1298.long 0xfdfdfd00,0xdada00da 1299.long 0xb4b4b400,0x3f3f003f 1300.long 0x59595900,0x94940094 1301.long 0x78787800,0x5c5c005c 1302.long 0x98989800,0x02020002 1303.long 0x06060600,0x4a4a004a 1304.long 0x6a6a6a00,0x33330033 1305.long 0xe7e7e700,0x67670067 1306.long 0x46464600,0xf3f300f3 1307.long 0x71717100,0x7f7f007f 1308.long 0xbababa00,0xe2e200e2 1309.long 0xd4d4d400,0x9b9b009b 1310.long 0x25252500,0x26260026 1311.long 0xababab00,0x37370037 1312.long 0x42424200,0x3b3b003b 1313.long 0x88888800,0x96960096 1314.long 0xa2a2a200,0x4b4b004b 1315.long 0x8d8d8d00,0xbebe00be 1316.long 0xfafafa00,0x2e2e002e 1317.long 0x72727200,0x79790079 1318.long 0x07070700,0x8c8c008c 1319.long 0xb9b9b900,0x6e6e006e 1320.long 0x55555500,0x8e8e008e 1321.long 0xf8f8f800,0xf5f500f5 1322.long 0xeeeeee00,0xb6b600b6 1323.long 0xacacac00,0xfdfd00fd 1324.long 0x0a0a0a00,0x59590059 1325.long 0x36363600,0x98980098 1326.long 0x49494900,0x6a6a006a 1327.long 0x2a2a2a00,0x46460046 1328.long 0x68686800,0xbaba00ba 1329.long 0x3c3c3c00,0x25250025 1330.long 0x38383800,0x42420042 1331.long 0xf1f1f100,0xa2a200a2 1332.long 0xa4a4a400,0xfafa00fa 1333.long 0x40404000,0x07070007 1334.long 0x28282800,0x55550055 1335.long 0xd3d3d300,0xeeee00ee 1336.long 0x7b7b7b00,0x0a0a000a 1337.long 0xbbbbbb00,0x49490049 1338.long 0xc9c9c900,0x68680068 1339.long 0x43434300,0x38380038 1340.long 0xc1c1c100,0xa4a400a4 1341.long 0x15151500,0x28280028 1342.long 0xe3e3e300,0x7b7b007b 1343.long 0xadadad00,0xc9c900c9 1344.long 0xf4f4f400,0xc1c100c1 1345.long 0x77777700,0xe3e300e3 1346.long 0xc7c7c700,0xf4f400f4 1347.long 0x80808000,0xc7c700c7 1348.long 0x9e9e9e00,0x9e9e009e 1349.long 0x00e0e0e0,0x38003838 1350.long 0x00050505,0x41004141 1351.long 0x00585858,0x16001616 1352.long 0x00d9d9d9,0x76007676 1353.long 0x00676767,0xd900d9d9 1354.long 0x004e4e4e,0x93009393 1355.long 0x00818181,0x60006060 1356.long 0x00cbcbcb,0xf200f2f2 1357.long 0x00c9c9c9,0x72007272 1358.long 0x000b0b0b,0xc200c2c2 1359.long 0x00aeaeae,0xab00abab 1360.long 0x006a6a6a,0x9a009a9a 1361.long 0x00d5d5d5,0x75007575 1362.long 0x00181818,0x06000606 1363.long 0x005d5d5d,0x57005757 1364.long 0x00828282,0xa000a0a0 1365.long 0x00464646,0x91009191 1366.long 0x00dfdfdf,0xf700f7f7 1367.long 0x00d6d6d6,0xb500b5b5 1368.long 0x00272727,0xc900c9c9 1369.long 0x008a8a8a,0xa200a2a2 1370.long 0x00323232,0x8c008c8c 1371.long 0x004b4b4b,0xd200d2d2 1372.long 0x00424242,0x90009090 1373.long 0x00dbdbdb,0xf600f6f6 1374.long 0x001c1c1c,0x07000707 1375.long 0x009e9e9e,0xa700a7a7 1376.long 0x009c9c9c,0x27002727 1377.long 0x003a3a3a,0x8e008e8e 1378.long 0x00cacaca,0xb200b2b2 1379.long 0x00252525,0x49004949 1380.long 0x007b7b7b,0xde00dede 1381.long 0x000d0d0d,0x43004343 1382.long 0x00717171,0x5c005c5c 1383.long 0x005f5f5f,0xd700d7d7 1384.long 0x001f1f1f,0xc700c7c7 1385.long 0x00f8f8f8,0x3e003e3e 1386.long 0x00d7d7d7,0xf500f5f5 1387.long 0x003e3e3e,0x8f008f8f 1388.long 0x009d9d9d,0x67006767 1389.long 0x007c7c7c,0x1f001f1f 1390.long 0x00606060,0x18001818 1391.long 0x00b9b9b9,0x6e006e6e 1392.long 0x00bebebe,0xaf00afaf 1393.long 0x00bcbcbc,0x2f002f2f 1394.long 0x008b8b8b,0xe200e2e2 1395.long 0x00161616,0x85008585 1396.long 0x00343434,0x0d000d0d 1397.long 0x004d4d4d,0x53005353 1398.long 0x00c3c3c3,0xf000f0f0 1399.long 0x00727272,0x9c009c9c 1400.long 0x00959595,0x65006565 1401.long 0x00ababab,0xea00eaea 1402.long 0x008e8e8e,0xa300a3a3 1403.long 0x00bababa,0xae00aeae 1404.long 0x007a7a7a,0x9e009e9e 1405.long 0x00b3b3b3,0xec00ecec 1406.long 0x00020202,0x80008080 1407.long 0x00b4b4b4,0x2d002d2d 1408.long 0x00adadad,0x6b006b6b 1409.long 0x00a2a2a2,0xa800a8a8 1410.long 0x00acacac,0x2b002b2b 1411.long 0x00d8d8d8,0x36003636 1412.long 0x009a9a9a,0xa600a6a6 1413.long 0x00171717,0xc500c5c5 1414.long 0x001a1a1a,0x86008686 1415.long 0x00353535,0x4d004d4d 1416.long 0x00cccccc,0x33003333 1417.long 0x00f7f7f7,0xfd00fdfd 1418.long 0x00999999,0x66006666 1419.long 0x00616161,0x58005858 1420.long 0x005a5a5a,0x96009696 1421.long 0x00e8e8e8,0x3a003a3a 1422.long 0x00242424,0x09000909 1423.long 0x00565656,0x95009595 1424.long 0x00404040,0x10001010 1425.long 0x00e1e1e1,0x78007878 1426.long 0x00636363,0xd800d8d8 1427.long 0x00090909,0x42004242 1428.long 0x00333333,0xcc00cccc 1429.long 0x00bfbfbf,0xef00efef 1430.long 0x00989898,0x26002626 1431.long 0x00979797,0xe500e5e5 1432.long 0x00858585,0x61006161 1433.long 0x00686868,0x1a001a1a 1434.long 0x00fcfcfc,0x3f003f3f 1435.long 0x00ececec,0x3b003b3b 1436.long 0x000a0a0a,0x82008282 1437.long 0x00dadada,0xb600b6b6 1438.long 0x006f6f6f,0xdb00dbdb 1439.long 0x00535353,0xd400d4d4 1440.long 0x00626262,0x98009898 1441.long 0x00a3a3a3,0xe800e8e8 1442.long 0x002e2e2e,0x8b008b8b 1443.long 0x00080808,0x02000202 1444.long 0x00afafaf,0xeb00ebeb 1445.long 0x00282828,0x0a000a0a 1446.long 0x00b0b0b0,0x2c002c2c 1447.long 0x00747474,0x1d001d1d 1448.long 0x00c2c2c2,0xb000b0b0 1449.long 0x00bdbdbd,0x6f006f6f 1450.long 0x00363636,0x8d008d8d 1451.long 0x00222222,0x88008888 1452.long 0x00383838,0x0e000e0e 1453.long 0x00646464,0x19001919 1454.long 0x001e1e1e,0x87008787 1455.long 0x00393939,0x4e004e4e 1456.long 0x002c2c2c,0x0b000b0b 1457.long 0x00a6a6a6,0xa900a9a9 1458.long 0x00303030,0x0c000c0c 1459.long 0x00e5e5e5,0x79007979 1460.long 0x00444444,0x11001111 1461.long 0x00fdfdfd,0x7f007f7f 1462.long 0x00888888,0x22002222 1463.long 0x009f9f9f,0xe700e7e7 1464.long 0x00656565,0x59005959 1465.long 0x00878787,0xe100e1e1 1466.long 0x006b6b6b,0xda00dada 1467.long 0x00f4f4f4,0x3d003d3d 1468.long 0x00232323,0xc800c8c8 1469.long 0x00484848,0x12001212 1470.long 0x00101010,0x04000404 1471.long 0x00d1d1d1,0x74007474 1472.long 0x00515151,0x54005454 1473.long 0x00c0c0c0,0x30003030 1474.long 0x00f9f9f9,0x7e007e7e 1475.long 0x00d2d2d2,0xb400b4b4 1476.long 0x00a0a0a0,0x28002828 1477.long 0x00555555,0x55005555 1478.long 0x00a1a1a1,0x68006868 1479.long 0x00414141,0x50005050 1480.long 0x00fafafa,0xbe00bebe 1481.long 0x00434343,0xd000d0d0 1482.long 0x00131313,0xc400c4c4 1483.long 0x00c4c4c4,0x31003131 1484.long 0x002f2f2f,0xcb00cbcb 1485.long 0x00a8a8a8,0x2a002a2a 1486.long 0x00b6b6b6,0xad00adad 1487.long 0x003c3c3c,0x0f000f0f 1488.long 0x002b2b2b,0xca00caca 1489.long 0x00c1c1c1,0x70007070 1490.long 0x00ffffff,0xff00ffff 1491.long 0x00c8c8c8,0x32003232 1492.long 0x00a5a5a5,0x69006969 1493.long 0x00202020,0x08000808 1494.long 0x00898989,0x62006262 1495.long 0x00000000,0x00000000 1496.long 0x00909090,0x24002424 1497.long 0x00474747,0xd100d1d1 1498.long 0x00efefef,0xfb00fbfb 1499.long 0x00eaeaea,0xba00baba 1500.long 0x00b7b7b7,0xed00eded 1501.long 0x00151515,0x45004545 1502.long 0x00060606,0x81008181 1503.long 0x00cdcdcd,0x73007373 1504.long 0x00b5b5b5,0x6d006d6d 1505.long 0x00121212,0x84008484 1506.long 0x007e7e7e,0x9f009f9f 1507.long 0x00bbbbbb,0xee00eeee 1508.long 0x00292929,0x4a004a4a 1509.long 0x000f0f0f,0xc300c3c3 1510.long 0x00b8b8b8,0x2e002e2e 1511.long 0x00070707,0xc100c1c1 1512.long 0x00040404,0x01000101 1513.long 0x009b9b9b,0xe600e6e6 1514.long 0x00949494,0x25002525 1515.long 0x00212121,0x48004848 1516.long 0x00666666,0x99009999 1517.long 0x00e6e6e6,0xb900b9b9 1518.long 0x00cecece,0xb300b3b3 1519.long 0x00ededed,0x7b007b7b 1520.long 0x00e7e7e7,0xf900f9f9 1521.long 0x003b3b3b,0xce00cece 1522.long 0x00fefefe,0xbf00bfbf 1523.long 0x007f7f7f,0xdf00dfdf 1524.long 0x00c5c5c5,0x71007171 1525.long 0x00a4a4a4,0x29002929 1526.long 0x00373737,0xcd00cdcd 1527.long 0x00b1b1b1,0x6c006c6c 1528.long 0x004c4c4c,0x13001313 1529.long 0x00919191,0x64006464 1530.long 0x006e6e6e,0x9b009b9b 1531.long 0x008d8d8d,0x63006363 1532.long 0x00767676,0x9d009d9d 1533.long 0x00030303,0xc000c0c0 1534.long 0x002d2d2d,0x4b004b4b 1535.long 0x00dedede,0xb700b7b7 1536.long 0x00969696,0xa500a5a5 1537.long 0x00262626,0x89008989 1538.long 0x007d7d7d,0x5f005f5f 1539.long 0x00c6c6c6,0xb100b1b1 1540.long 0x005c5c5c,0x17001717 1541.long 0x00d3d3d3,0xf400f4f4 1542.long 0x00f2f2f2,0xbc00bcbc 1543.long 0x004f4f4f,0xd300d3d3 1544.long 0x00191919,0x46004646 1545.long 0x003f3f3f,0xcf00cfcf 1546.long 0x00dcdcdc,0x37003737 1547.long 0x00797979,0x5e005e5e 1548.long 0x001d1d1d,0x47004747 1549.long 0x00525252,0x94009494 1550.long 0x00ebebeb,0xfa00fafa 1551.long 0x00f3f3f3,0xfc00fcfc 1552.long 0x006d6d6d,0x5b005b5b 1553.long 0x005e5e5e,0x97009797 1554.long 0x00fbfbfb,0xfe00fefe 1555.long 0x00696969,0x5a005a5a 1556.long 0x00b2b2b2,0xac00acac 1557.long 0x00f0f0f0,0x3c003c3c 1558.long 0x00313131,0x4c004c4c 1559.long 0x000c0c0c,0x03000303 1560.long 0x00d4d4d4,0x35003535 1561.long 0x00cfcfcf,0xf300f3f3 1562.long 0x008c8c8c,0x23002323 1563.long 0x00e2e2e2,0xb800b8b8 1564.long 0x00757575,0x5d005d5d 1565.long 0x00a9a9a9,0x6a006a6a 1566.long 0x004a4a4a,0x92009292 1567.long 0x00575757,0xd500d5d5 1568.long 0x00848484,0x21002121 1569.long 0x00111111,0x44004444 1570.long 0x00454545,0x51005151 1571.long 0x001b1b1b,0xc600c6c6 1572.long 0x00f5f5f5,0x7d007d7d 1573.long 0x00e4e4e4,0x39003939 1574.long 0x000e0e0e,0x83008383 1575.long 0x00737373,0xdc00dcdc 1576.long 0x00aaaaaa,0xaa00aaaa 1577.long 0x00f1f1f1,0x7c007c7c 1578.long 0x00dddddd,0x77007777 1579.long 0x00595959,0x56005656 1580.long 0x00141414,0x05000505 1581.long 0x006c6c6c,0x1b001b1b 1582.long 0x00929292,0xa400a4a4 1583.long 0x00545454,0x15001515 1584.long 0x00d0d0d0,0x34003434 1585.long 0x00787878,0x1e001e1e 1586.long 0x00707070,0x1c001c1c 1587.long 0x00e3e3e3,0xf800f8f8 1588.long 0x00494949,0x52005252 1589.long 0x00808080,0x20002020 1590.long 0x00505050,0x14001414 1591.long 0x00a7a7a7,0xe900e9e9 1592.long 0x00f6f6f6,0xbd00bdbd 1593.long 0x00777777,0xdd00dddd 1594.long 0x00939393,0xe400e4e4 1595.long 0x00868686,0xa100a1a1 1596.long 0x00838383,0xe000e0e0 1597.long 0x002a2a2a,0x8a008a8a 1598.long 0x00c7c7c7,0xf100f1f1 1599.long 0x005b5b5b,0xd600d6d6 1600.long 0x00e9e9e9,0x7a007a7a 1601.long 0x00eeeeee,0xbb00bbbb 1602.long 0x008f8f8f,0xe300e3e3 1603.long 0x00010101,0x40004040 1604.long 0x003d3d3d,0x4f004f4f 1605.globl _Camellia_cbc_encrypt 1606 1607.p2align 4 1608_Camellia_cbc_encrypt: 1609 cmpq $0,%rdx 1610 je L$cbc_abort 1611 pushq %rbx 1612 pushq %rbp 1613 pushq %r12 1614 pushq %r13 1615 pushq %r14 1616 pushq %r15 1617L$cbc_prologue: 1618 1619 movq %rsp,%rbp 1620 subq $64,%rsp 1621 andq $-64,%rsp 1622 1623 1624 1625 leaq -64-63(%rcx),%r10 1626 subq %rsp,%r10 1627 negq %r10 1628 andq $960,%r10 1629 subq %r10,%rsp 1630 1631 1632 movq %rdi,%r12 1633 movq %rsi,%r13 1634 movq %r8,%rbx 1635 movq %rcx,%r14 1636 movl 272(%rcx),%r15d 1637 1638 movq %r8,40(%rsp) 1639 movq %rbp,48(%rsp) 1640 1641L$cbc_body: 1642 leaq L$Camellia_SBOX(%rip),%rbp 1643 1644 movl $32,%ecx 1645.p2align 2 1646L$cbc_prefetch_sbox: 1647 movq 0(%rbp),%rax 1648 movq 32(%rbp),%rsi 1649 movq 64(%rbp),%rdi 1650 movq 96(%rbp),%r11 1651 leaq 128(%rbp),%rbp 1652 loop L$cbc_prefetch_sbox 1653 subq $4096,%rbp 1654 shlq $6,%r15 1655 movq %rdx,%rcx 1656 leaq (%r14,%r15,1),%r15 1657 1658 cmpl $0,%r9d 1659 je L$CBC_DECRYPT 1660 1661 andq $-16,%rdx 1662 andq $15,%rcx 1663 leaq (%r12,%rdx,1),%rdx 1664 movq %r14,0(%rsp) 1665 movq %rdx,8(%rsp) 1666 movq %rcx,16(%rsp) 1667 1668 cmpq %r12,%rdx 1669 movl 0(%rbx),%r8d 1670 movl 4(%rbx),%r9d 1671 movl 8(%rbx),%r10d 1672 movl 12(%rbx),%r11d 1673 je L$cbc_enc_tail 1674 jmp L$cbc_eloop 1675 1676.p2align 4 1677L$cbc_eloop: 1678 xorl 0(%r12),%r8d 1679 xorl 4(%r12),%r9d 1680 xorl 8(%r12),%r10d 1681 bswapl %r8d 1682 xorl 12(%r12),%r11d 1683 bswapl %r9d 1684 bswapl %r10d 1685 bswapl %r11d 1686 1687 call _x86_64_Camellia_encrypt 1688 1689 movq 0(%rsp),%r14 1690 bswapl %r8d 1691 movq 8(%rsp),%rdx 1692 bswapl %r9d 1693 movq 16(%rsp),%rcx 1694 bswapl %r10d 1695 movl %r8d,0(%r13) 1696 bswapl %r11d 1697 movl %r9d,4(%r13) 1698 movl %r10d,8(%r13) 1699 leaq 16(%r12),%r12 1700 movl %r11d,12(%r13) 1701 cmpq %rdx,%r12 1702 leaq 16(%r13),%r13 1703 jne L$cbc_eloop 1704 1705 cmpq $0,%rcx 1706 jne L$cbc_enc_tail 1707 1708 movq 40(%rsp),%r13 1709 movl %r8d,0(%r13) 1710 movl %r9d,4(%r13) 1711 movl %r10d,8(%r13) 1712 movl %r11d,12(%r13) 1713 jmp L$cbc_done 1714 1715.p2align 4 1716L$cbc_enc_tail: 1717 xorq %rax,%rax 1718 movq %rax,0+24(%rsp) 1719 movq %rax,8+24(%rsp) 1720 movq %rax,16(%rsp) 1721 1722L$cbc_enc_pushf: 1723 pushfq 1724 cld 1725 movq %r12,%rsi 1726 leaq 8+24(%rsp),%rdi 1727.long 0x9066A4F3 1728 popfq 1729L$cbc_enc_popf: 1730 1731 leaq 24(%rsp),%r12 1732 leaq 16+24(%rsp),%rax 1733 movq %rax,8(%rsp) 1734 jmp L$cbc_eloop 1735 1736.p2align 4 1737L$CBC_DECRYPT: 1738 xchgq %r14,%r15 1739 addq $15,%rdx 1740 andq $15,%rcx 1741 andq $-16,%rdx 1742 movq %r14,0(%rsp) 1743 leaq (%r12,%rdx,1),%rdx 1744 movq %rdx,8(%rsp) 1745 movq %rcx,16(%rsp) 1746 1747 movq (%rbx),%rax 1748 movq 8(%rbx),%rbx 1749 jmp L$cbc_dloop 1750.p2align 4 1751L$cbc_dloop: 1752 movl 0(%r12),%r8d 1753 movl 4(%r12),%r9d 1754 movl 8(%r12),%r10d 1755 bswapl %r8d 1756 movl 12(%r12),%r11d 1757 bswapl %r9d 1758 movq %rax,0+24(%rsp) 1759 bswapl %r10d 1760 movq %rbx,8+24(%rsp) 1761 bswapl %r11d 1762 1763 call _x86_64_Camellia_decrypt 1764 1765 movq 0(%rsp),%r14 1766 movq 8(%rsp),%rdx 1767 movq 16(%rsp),%rcx 1768 1769 bswapl %r8d 1770 movq (%r12),%rax 1771 bswapl %r9d 1772 movq 8(%r12),%rbx 1773 bswapl %r10d 1774 xorl 0+24(%rsp),%r8d 1775 bswapl %r11d 1776 xorl 4+24(%rsp),%r9d 1777 xorl 8+24(%rsp),%r10d 1778 leaq 16(%r12),%r12 1779 xorl 12+24(%rsp),%r11d 1780 cmpq %rdx,%r12 1781 je L$cbc_ddone 1782 1783 movl %r8d,0(%r13) 1784 movl %r9d,4(%r13) 1785 movl %r10d,8(%r13) 1786 movl %r11d,12(%r13) 1787 1788 leaq 16(%r13),%r13 1789 jmp L$cbc_dloop 1790 1791.p2align 4 1792L$cbc_ddone: 1793 movq 40(%rsp),%rdx 1794 cmpq $0,%rcx 1795 jne L$cbc_dec_tail 1796 1797 movl %r8d,0(%r13) 1798 movl %r9d,4(%r13) 1799 movl %r10d,8(%r13) 1800 movl %r11d,12(%r13) 1801 1802 movq %rax,(%rdx) 1803 movq %rbx,8(%rdx) 1804 jmp L$cbc_done 1805.p2align 4 1806L$cbc_dec_tail: 1807 movl %r8d,0+24(%rsp) 1808 movl %r9d,4+24(%rsp) 1809 movl %r10d,8+24(%rsp) 1810 movl %r11d,12+24(%rsp) 1811 1812L$cbc_dec_pushf: 1813 pushfq 1814 cld 1815 leaq 8+24(%rsp),%rsi 1816 leaq (%r13),%rdi 1817.long 0x9066A4F3 1818 popfq 1819L$cbc_dec_popf: 1820 1821 movq %rax,(%rdx) 1822 movq %rbx,8(%rdx) 1823 jmp L$cbc_done 1824 1825.p2align 4 1826L$cbc_done: 1827 movq 48(%rsp),%rcx 1828 movq 0(%rcx),%r15 1829 movq 8(%rcx),%r14 1830 movq 16(%rcx),%r13 1831 movq 24(%rcx),%r12 1832 movq 32(%rcx),%rbp 1833 movq 40(%rcx),%rbx 1834 leaq 48(%rcx),%rsp 1835L$cbc_abort: 1836 retq 1837 1838 1839.byte 67,97,109,101,108,108,105,97,32,102,111,114,32,120,56,54,95,54,52,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0 1840