// File: /workspace/github_cpp_makefile_star2_O2/koraa[P]sbcrack/cube/crypto.cpp
// Function: tiger::compress(unsigned long long const*, unsigned long long*)
void compress(const chunk *str, chunk state[3])
    {
        chunk a, b, c;
        chunk aa, bb, cc;
        chunk x0, x1, x2, x3, x4, x5, x6, x7;

        a = state[0];
        b = state[1];
        c = state[2];

        x0=str[0]; x1=str[1]; x2=str[2]; x3=str[3];
        x4=str[4]; x5=str[5]; x6=str[6]; x7=str[7];

        aa = a;
        bb = b;
        cc = c;

        loop(pass_no, TIGER_PASSES)
        {
            if(pass_no)
            {
                x0 -= x7 ^ 0xA5A5A5A5A5A5A5A5ULL; x1 ^= x0; x2 += x1; x3 -= x2 ^ ((~x1)<<19);
                x4 ^= x3; x5 += x4; x6 -= x5 ^ ((~x4)>>23); x7 ^= x6;
                x0 += x7; x1 -= x0 ^ ((~x7)<<19); x2 ^= x1; x3 += x2;
                x4 -= x3 ^ ((~x2)>>23); x5 ^= x4; x6 += x5; x7 -= x6 ^ 0x0123456789ABCDEFULL;
            }

#define sb1 (sboxes)
#define sb2 (sboxes+256)
#define sb3 (sboxes+256*2)
#define sb4 (sboxes+256*3)

#define round(a, b, c, x) \
      c ^= x; \
      a -= sb1[((c)>>(0*8))&0xFF] ^ sb2[((c)>>(2*8))&0xFF] ^ \
       sb3[((c)>>(4*8))&0xFF] ^ sb4[((c)>>(6*8))&0xFF] ; \
      b += sb4[((c)>>(1*8))&0xFF] ^ sb3[((c)>>(3*8))&0xFF] ^ \
       sb2[((c)>>(5*8))&0xFF] ^ sb1[((c)>>(7*8))&0xFF] ; \
      b *= mul;

            uint mul = !pass_no ? 5 : (pass_no==1 ? 7 : 9);
            round(a, b, c, x0) round(b, c, a, x1) round(c, a, b, x2) round(a, b, c, x3)
            round(b, c, a, x4) round(c, a, b, x5) round(a, b, c, x6) round(b, c, a, x7)

            chunk tmp = a; a = c; c = b; b = tmp;
        }

        a ^= aa;
        b -= bb;
        c += cc;

        state[0] = a;
        state[1] = b;
        state[2] = c;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
movq %rsi, -0x8(%rsp)
movq 0x10(%rsi), %r15
movq (%rdi), %rax
movq %rax, -0x40(%rsp)
movq 0x8(%rdi), %rax
movq %rax, -0x50(%rsp)
movq 0x10(%rdi), %rbx
movq 0x18(%rdi), %rax
movq %rax, -0x48(%rsp)
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %rbp
movq 0x30(%rdi), %r11
movq 0x38(%rdi), %r14
xorl %r12d, %r12d
movl $0xff, %r13d
leaq 0x7d5c(%rip), %rax      # 0x90c0
movq %r15, -0x10(%rsp)
movq %rcx, -0x18(%rsp)
movq %rdx, -0x20(%rsp)
cmpl $0x3, %r12d
je 0x18f0
movq %rsi, %rdi
testl %r12d, %r12d
je 0x1423
movq %r14, %rsi
movabsq $-0x5a5a5a5a5a5a5a5b, %r8 # imm = 0xA5A5A5A5A5A5A5A5
xorq %r8, %rsi
movq -0x40(%rsp), %r8
subq %rsi, %r8
movq -0x50(%rsp), %r10
xorq %r8, %r10
addq %r10, %rbx
movq %r10, %rsi
notq %rsi
shlq $0x13, %rsi
xorq %rbx, %rsi
movq -0x48(%rsp), %r9
subq %rsi, %r9
xorq %r9, %rdi
addq %rdi, %rbp
movq %rdi, %rsi
notq %rsi
shrq $0x17, %rsi
xorq %rbp, %rsi
subq %rsi, %r11
xorq %r11, %r14
addq %r14, %r8
movq %r14, %rsi
notq %rsi
shlq $0x13, %rsi
xorq %r8, %rsi
subq %rsi, %r10
xorq %r10, %rbx
addq %rbx, %r9
movq %rbx, %rsi
notq %rsi
shrq $0x17, %rsi
xorq %r9, %rsi
subq %rsi, %rdi
xorq %rdi, %rbp
addq %rbp, %r11
movq %r11, -0x28(%rsp)
movq %r11, %rsi
movabsq $0x123456789abcdef, %r11 # imm = 0x123456789ABCDEF
xorq %r11, %rsi
subq %rsi, %r14
jmp 0x1437
movq -0x40(%rsp), %r8
movq -0x48(%rsp), %r9
movq -0x50(%rsp), %r10
movq %r11, -0x28(%rsp)
movq %r14, -0x30(%rsp)
xorl %esi, %esi
cmpl $0x1, %r12d
setne %sil
testl %r12d, %r12d
leaq 0x7(%rsi,%rsi), %rsi
movabsq $0x5, %r11
cmoveq %r11, %rsi
movq %r8, -0x40(%rsp)
xorq %r8, %r15
movl %r15d, %r8d
andl %r13d, %r8d
movl %r15d, %r11d
shrl $0xd, %r11d
movl $0x7f8, %r14d           # imm = 0x7F8
andl %r14d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%r8,8), %r11
movq %r15, %r8
shrq $0x20, %r8
andl %r13d, %r8d
xorq 0x1000(%rax,%r8,8), %r11
movq %r15, %r8
shrq $0x30, %r8
andl %r13d, %r8d
xorq 0x1800(%rax,%r8,8), %r11
subq %r11, %rdx
movl %r15d, %r8d
movq %r15, %r11
movl %r12d, -0x34(%rsp)
movl %r15d, %r12d
shrl $0x8, %r12d
andl %r13d, %r12d
shrl $0x18, %r8d
movq 0x1000(%rax,%r8,8), %r14
xorq 0x1800(%rax,%r12,8), %r14
movq %r15, %r8
shrq $0x28, %r11
andl %r13d, %r11d
xorq 0x800(%rax,%r11,8), %r14
shrq $0x38, %r8
xorq (%rax,%r8,8), %r14
addq %rcx, %r14
imulq %rsi, %r14
movq %r10, -0x50(%rsp)
xorq %r10, %rdx
movl %edx, %r8d
andl %r13d, %r8d
movl %edx, %ecx
shrl $0xd, %ecx
movl $0x7f8, %r10d           # imm = 0x7F8
andl %r10d, %ecx
movq 0x800(%rcx,%rax), %rcx
xorq (%rax,%r8,8), %rcx
movq %rdx, %r8
shrq $0x20, %r8
andl %r13d, %r8d
xorq 0x1000(%rax,%r8,8), %rcx
movq %rdx, %r8
shrq $0x30, %r8
andl %r13d, %r8d
xorq 0x1800(%rax,%r8,8), %rcx
movl %edx, %r8d
shrl $0x8, %r8d
andl %r13d, %r8d
movl %edx, %r11d
shrl $0x18, %r11d
movq 0x1000(%rax,%r11,8), %r11
xorq 0x1800(%rax,%r8,8), %r11
subq %rcx, %r14
movq %rdx, %rcx
shrq $0x28, %rcx
andl %r13d, %ecx
xorq 0x800(%rax,%rcx,8), %r11
movq %rdx, %rcx
shrq $0x38, %rcx
xorq (%rax,%rcx,8), %r11
xorq %rbx, %r14
movl %r14d, %r8d
andl %r13d, %r8d
movl %r14d, %ecx
shrl $0xd, %ecx
andl %r10d, %ecx
movq 0x800(%rcx,%rax), %rcx
xorq (%rax,%r8,8), %rcx
movq %r14, %r8
shrq $0x20, %r8
andl %r13d, %r8d
xorq 0x1000(%rax,%r8,8), %rcx
addq %r15, %r11
movq %r14, %r8
shrq $0x30, %r8
andl %r13d, %r8d
xorq 0x1800(%rax,%r8,8), %rcx
movl %r14d, %r8d
movl %r14d, %r15d
shrl $0x8, %r15d
andl %r13d, %r15d
shrl $0x18, %r8d
movq 0x1000(%rax,%r8,8), %r12
xorq 0x1800(%rax,%r15,8), %r12
movq %r14, %r8
imulq %rsi, %r11
shrq $0x28, %r8
andl %r13d, %r8d
xorq 0x800(%rax,%r8,8), %r12
subq %rcx, %r11
movq %r9, -0x48(%rsp)
xorq %r9, %r11
movl %r11d, %ecx
shrl $0x8, %ecx
andl %r13d, %ecx
movl %r11d, %r8d
shrl $0x18, %r8d
movq 0x1000(%rax,%r8,8), %r8
xorq 0x1800(%rax,%rcx,8), %r8
movq %r11, %rcx
shrq $0x28, %rcx
andl %r13d, %ecx
xorq 0x800(%rax,%rcx,8), %r8
movq %r11, %rcx
shrq $0x38, %rcx
xorq (%rax,%rcx,8), %r8
movq %r14, %rcx
addq %r14, %r8
shrq $0x38, %rcx
xorq (%rax,%rcx,8), %r12
addq %rdx, %r12
imulq %rsi, %r12
movl %r11d, %ecx
andl %r13d, %ecx
movl %r11d, %edx
shrl $0xd, %edx
movl $0x7f8, %r9d            # imm = 0x7F8
andl %r9d, %edx
movq 0x800(%rdx,%rax), %rdx
xorq (%rax,%rcx,8), %rdx
movq %r11, %rcx
shrq $0x20, %rcx
andl %r13d, %ecx
xorq 0x1000(%rax,%rcx,8), %rdx
movq %r11, %rcx
shrq $0x30, %rcx
andl %r13d, %ecx
xorq 0x1800(%rax,%rcx,8), %rdx
subq %rdx, %r12
xorq %rdi, %r12
movl %r12d, %ecx
andl %r13d, %ecx
movl %r12d, %edx
shrl $0xd, %edx
andl %r9d, %edx
movq 0x800(%rdx,%rax), %rdx
xorq (%rax,%rcx,8), %rdx
movq %r12, %rcx
shrq $0x20, %rcx
andl %r13d, %ecx
xorq 0x1000(%rax,%rcx,8), %rdx
movq %r12, %rcx
shrq $0x30, %rcx
andl %r13d, %ecx
xorq 0x1800(%rax,%rcx,8), %rdx
imulq %rsi, %r8
subq %rdx, %r8
movl %r12d, %ecx
movl %r12d, %edx
shrl $0x8, %edx
andl %r13d, %edx
shrl $0x18, %ecx
movq 0x1000(%rax,%rcx,8), %r14
xorq 0x1800(%rax,%rdx,8), %r14
xorq %rbp, %r8
movl %r8d, %edx
shrl $0x8, %edx
andl %r13d, %edx
movl %r8d, %ecx
shrl $0x18, %ecx
movq 0x1000(%rax,%rcx,8), %rcx
xorq 0x1800(%rax,%rdx,8), %rcx
movq %r8, %rdx
shrq $0x28, %rdx
andl %r13d, %edx
xorq 0x800(%rax,%rdx,8), %rcx
movq %r8, %rdx
shrq $0x38, %rdx
xorq (%rax,%rdx,8), %rcx
movq %r12, %rdx
addq %r12, %rcx
shrq $0x28, %rdx
andl %r13d, %edx
xorq 0x800(%rax,%rdx,8), %r14
shrq $0x38, %r12
xorq (%rax,%r12,8), %r14
addq %r11, %r14
movl %r8d, %edx
andl %r13d, %edx
movl %r8d, %r11d
shrl $0xd, %r11d
andl %r10d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%rdx,8), %r11
imulq %rsi, %r14
movq %r8, %rdx
shrq $0x20, %rdx
andl %r13d, %edx
xorq 0x1000(%rax,%rdx,8), %r11
movq %r8, %rdx
shrq $0x30, %rdx
andl %r13d, %edx
xorq 0x1800(%rax,%rdx,8), %r11
subq %r11, %r14
imulq %rsi, %rcx
movq -0x28(%rsp), %r9
xorq %r9, %r14
movl %r14d, %edx
andl %r13d, %edx
movl %r14d, %r11d
shrl $0xd, %r11d
andl %r10d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%rdx,8), %r11
movq %r14, %rdx
shrq $0x20, %rdx
andl %r13d, %edx
xorq 0x1000(%rax,%rdx,8), %r11
movq %r14, %rdx
shrq $0x30, %rdx
andl %r13d, %edx
xorq 0x1800(%rax,%rdx,8), %r11
subq %r11, %rcx
movl %r14d, %edx
movq %r14, %r11
movl %r14d, %r12d
shrl $0x8, %r12d
andl %r13d, %r12d
shrl $0x18, %edx
movq 0x1000(%rax,%rdx,8), %r15
xorq 0x1800(%rax,%r12,8), %r15
movl -0x34(%rsp), %r12d
movq %r14, %rdx
shrq $0x28, %r11
andl %r13d, %r11d
xorq 0x800(%rax,%r11,8), %r15
shrq $0x38, %rdx
xorq (%rax,%rdx,8), %r15
movq -0x30(%rsp), %r10
xorq %r10, %rcx
movl %ecx, %r11d
shrl $0x8, %r11d
andl %r13d, %r11d
movl %ecx, %edx
shrl $0x18, %edx
movq 0x1000(%rax,%rdx,8), %rdx
xorq 0x1800(%rax,%r11,8), %rdx
movq %rcx, %r11
shrq $0x28, %r11
andl %r13d, %r11d
xorq 0x800(%rax,%r11,8), %rdx
movq %rcx, %r11
shrq $0x38, %r11
xorq (%rax,%r11,8), %rdx
addq %r14, %rdx
addq %r8, %r15
movl %ecx, %r8d
andl %r13d, %r8d
movl %ecx, %r11d
shrl $0xd, %r11d
movl $0x7f8, %r14d           # imm = 0x7F8
andl %r14d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%r8,8), %r11
movq %rcx, %r8
shrq $0x20, %r8
andl %r13d, %r8d
xorq 0x1000(%rax,%r8,8), %r11
movq %rcx, %r8
shrq $0x30, %r8
andl %r13d, %r8d
xorq 0x1800(%rax,%r8,8), %r11
imulq %rsi, %r15
subq %r11, %r15
imulq %rsi, %rdx
incl %r12d
movq %rdi, %rsi
movq %r9, %r11
movq %r10, %r14
jmp 0x1373
xorq -0x20(%rsp), %rdx
subq -0x18(%rsp), %rcx
addq -0x10(%rsp), %r15
movq -0x8(%rsp), %rax
movq %rdx, (%rax)
movq %rcx, 0x8(%rax)
movq %r15, 0x10(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq