// File: /workspace/github_cpp_makefile_star2_O1/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, -0x48(%rsp)
movq 0x10(%rdi), %rax
movq %rax, -0x50(%rsp)
movq 0x18(%rdi), %r10
movq 0x20(%rdi), %rsi
movq 0x28(%rdi), %r14
movq 0x30(%rdi), %r12
movq 0x38(%rdi), %r9
xorl %r8d, %r8d
movl $0xff, %r13d
leaq 0x7d4c(%rip), %rax      # 0x90c0
movq %rdx, -0x20(%rsp)
movq %rcx, -0x18(%rsp)
movq %r15, -0x10(%rsp)
movq %rsi, %rdi
movl %r8d, -0x54(%rsp)
testl %r8d, %r8d
je 0x143e
movq %r9, %rsi
movabsq $-0x5a5a5a5a5a5a5a5b, %r8 # imm = 0xA5A5A5A5A5A5A5A5
xorq %r8, %rsi
movq -0x40(%rsp), %r8
subq %rsi, %r8
movq -0x48(%rsp), %r11
xorq %r8, %r11
movq -0x50(%rsp), %rbx
addq %r11, %rbx
movq %r11, %rsi
notq %rsi
shlq $0x13, %rsi
xorq %rbx, %rsi
movq %r10, %rbp
movq %r11, %r10
subq %rsi, %rbp
xorq %rbp, %rdi
addq %rdi, %r14
movq %rdi, %rsi
notq %rsi
shrq $0x17, %rsi
xorq %r14, %rsi
subq %rsi, %r12
xorq %r12, %r9
addq %r9, %r8
movq %r9, %rsi
notq %rsi
shlq $0x13, %rsi
xorq %r8, %rsi
subq %rsi, %r10
xorq %r10, %rbx
addq %rbx, %rbp
movq %rbx, %rsi
notq %rsi
shrq $0x17, %rsi
xorq %rbp, %rsi
subq %rsi, %rdi
xorq %rdi, %r14
movq %r14, -0x28(%rsp)
addq %r14, %r12
movq %r12, -0x30(%rsp)
movq %r12, %rsi
movabsq $0x123456789abcdef, %r11 # imm = 0x123456789ABCDEF
xorq %r11, %rsi
subq %rsi, %r9
movq %r9, -0x38(%rsp)
jmp 0x145f
movq -0x40(%rsp), %r8
movq %r9, -0x38(%rsp)
movq %r10, %rbp
movq -0x48(%rsp), %r10
movq -0x50(%rsp), %rbx
movq %r14, -0x28(%rsp)
movq %r12, -0x30(%rsp)
xorl %esi, %esi
movl -0x54(%rsp), %r11d
cmpl $0x1, %r11d
setne %sil
testl %r11d, %r11d
leaq 0x7(%rsi,%rsi), %rsi
movl $0x5, %r11d
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
movl $0x7f8, %r9d            # imm = 0x7F8
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, %r12
movl %r15d, %r14d
shrl $0x8, %r14d
andl %r13d, %r14d
shrl $0x18, %r8d
movq 0x1000(%rax,%r8,8), %r11
xorq 0x1800(%rax,%r14,8), %r11
movq %r15, %r8
shrq $0x28, %r12
andl %r13d, %r12d
xorq 0x800(%rax,%r12,8), %r11
shrq $0x38, %r8
xorq (%rax,%r8,8), %r11
addq %rcx, %r11
imulq %rsi, %r11
movq %r10, -0x48(%rsp)
xorq %r10, %rdx
movl %edx, %ecx
andl %r13d, %ecx
movl %edx, %r8d
shrl $0xd, %r8d
andl %r9d, %r8d
movq 0x800(%r8,%rax), %r8
xorq (%rax,%rcx,8), %r8
movq %rdx, %rcx
shrq $0x20, %rcx
andl %r13d, %ecx
xorq 0x1000(%rax,%rcx,8), %r8
movq %rdx, %rcx
shrq $0x30, %rcx
andl %r13d, %ecx
xorq 0x1800(%rax,%rcx,8), %r8
movl %edx, %r14d
shrl $0x8, %r14d
andl %r13d, %r14d
movl %edx, %ecx
shrl $0x18, %ecx
movq 0x1000(%rax,%rcx,8), %rcx
xorq 0x1800(%rax,%r14,8), %rcx
subq %r8, %r11
movq %rdx, %r8
shrq $0x28, %r8
andl %r13d, %r8d
xorq 0x800(%rax,%r8,8), %rcx
movq %rdx, %r8
shrq $0x38, %r8
xorq (%rax,%r8,8), %rcx
movq %rbx, -0x50(%rsp)
xorq %rbx, %r11
movl %r11d, %r14d
andl %r13d, %r14d
movl %r11d, %r8d
shrl $0xd, %r8d
andl %r9d, %r8d
movq 0x800(%r8,%rax), %r8
xorq (%rax,%r14,8), %r8
movq %r11, %r14
shrq $0x20, %r14
andl %r13d, %r14d
xorq 0x1000(%rax,%r14,8), %r8
addq %r15, %rcx
movq %r11, %r14
shrq $0x30, %r14
andl %r13d, %r14d
xorq 0x1800(%rax,%r14,8), %r8
movl %r11d, %r14d
movl %r11d, %r15d
shrl $0x8, %r15d
andl %r13d, %r15d
shrl $0x18, %r14d
movq 0x1000(%rax,%r14,8), %r12
xorq 0x1800(%rax,%r15,8), %r12
movq %r11, %r14
imulq %rsi, %rcx
shrq $0x28, %r14
andl %r13d, %r14d
xorq 0x800(%rax,%r14,8), %r12
subq %r8, %rcx
movq %rbp, %r10
xorq %rbp, %rcx
movl %ecx, %r14d
shrl $0x8, %r14d
andl %r13d, %r14d
movl %ecx, %r8d
shrl $0x18, %r8d
movq 0x1000(%rax,%r8,8), %r8
xorq 0x1800(%rax,%r14,8), %r8
movq %rcx, %r14
shrq $0x28, %r14
andl %r13d, %r14d
xorq 0x800(%rax,%r14,8), %r8
movq %rcx, %r14
shrq $0x38, %r14
xorq (%rax,%r14,8), %r8
movq %r11, %r14
addq %r11, %r8
shrq $0x38, %r14
xorq (%rax,%r14,8), %r12
addq %rdx, %r12
imulq %rsi, %r12
movl %ecx, %edx
andl %r13d, %edx
movl %ecx, %r11d
shrl $0xd, %r11d
andl %r9d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%rdx,8), %r11
movq %rcx, %rdx
shrq $0x20, %rdx
andl %r13d, %edx
xorq 0x1000(%rax,%rdx,8), %r11
movq %rcx, %rdx
shrq $0x30, %rdx
andl %r13d, %edx
xorq 0x1800(%rax,%rdx,8), %r11
subq %r11, %r12
xorq %rdi, %r12
movl %r12d, %edx
andl %r13d, %edx
movl %r12d, %r11d
shrl $0xd, %r11d
andl %r9d, %r11d
movq 0x800(%r11,%rax), %r11
xorq (%rax,%rdx,8), %r11
movq %r12, %rdx
shrq $0x20, %rdx
andl %r13d, %edx
xorq 0x1000(%rax,%rdx,8), %r11
movq %r12, %rdx
shrq $0x30, %rdx
andl %r13d, %edx
xorq 0x1800(%rax,%rdx,8), %r11
imulq %rsi, %r8
subq %r11, %r8
movl %r12d, %edx
movq %r12, %r14
movl %r12d, %r15d
shrl $0x8, %r15d
andl %r13d, %r15d
shrl $0x18, %edx
movq 0x1000(%rax,%rdx,8), %r11
xorq 0x1800(%rax,%r15,8), %r11
movq %r12, %rdx
shrq $0x28, %r14
andl %r13d, %r14d
xorq 0x800(%rax,%r14,8), %r11
shrq $0x38, %rdx
xorq (%rax,%rdx,8), %r11
addq %rcx, %r11
imulq %rsi, %r11
movq -0x28(%rsp), %rbx
xorq %rbx, %r8
movl %r8d, %ecx
andl %r13d, %ecx
movl %r8d, %edx
shrl $0xd, %edx
andl %r9d, %edx
movq 0x800(%rdx,%rax), %rdx
xorq (%rax,%rcx,8), %rdx
movq %r8, %rcx
shrq $0x20, %rcx
andl %r13d, %ecx
xorq 0x1000(%rax,%rcx,8), %rdx
movq %r8, %rcx
shrq $0x30, %rcx
andl %r13d, %ecx
xorq 0x1800(%rax,%rcx,8), %rdx
movl %r8d, %r14d
shrl $0x8, %r14d
andl %r13d, %r14d
movl %r8d, %ecx
shrl $0x18, %ecx
movq 0x1000(%rax,%rcx,8), %rcx
xorq 0x1800(%rax,%r14,8), %rcx
subq %rdx, %r11
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 -0x30(%rsp), %rbp
xorq %rbp, %r11
movl %r11d, %r14d
andl %r13d, %r14d
movl %r11d, %edx
shrl $0xd, %edx
andl %r9d, %edx
movq 0x800(%rdx,%rax), %rdx
xorq (%rax,%r14,8), %rdx
movq %r11, %r14
shrq $0x20, %r14
andl %r13d, %r14d
xorq 0x1000(%rax,%r14,8), %rdx
addq %r12, %rcx
movq %r11, %r14
shrq $0x30, %r14
andl %r13d, %r14d
xorq 0x1800(%rax,%r14,8), %rdx
movl %r11d, %r14d
movl %r11d, %r12d
shrl $0x8, %r12d
andl %r13d, %r12d
shrl $0x18, %r14d
movq 0x1000(%rax,%r14,8), %r15
xorq 0x1800(%rax,%r12,8), %r15
movq %r11, %r14
imulq %rsi, %rcx
shrq $0x28, %r14
andl %r13d, %r14d
xorq 0x800(%rax,%r14,8), %r15
subq %rdx, %rcx
movq -0x38(%rsp), %r9
xorq %r9, %rcx
movl %ecx, %r14d
shrl $0x8, %r14d
andl %r13d, %r14d
movl %ecx, %edx
shrl $0x18, %edx
movq 0x1000(%rax,%rdx,8), %rdx
xorq 0x1800(%rax,%r14,8), %rdx
movq %rcx, %r14
shrq $0x28, %r14
andl %r13d, %r14d
xorq 0x800(%rax,%r14,8), %rdx
movq %rcx, %r14
shrq $0x38, %r14
xorq (%rax,%r14,8), %rdx
movq %r11, %r14
addq %r11, %rdx
shrq $0x38, %r14
xorq (%rax,%r14,8), %r15
movl %ecx, %r11d
andl %r13d, %r11d
movl %ecx, %r14d
shrl $0xd, %r14d
movl $0x7f8, %r12d           # imm = 0x7F8
andl %r12d, %r14d
movq 0x800(%r14,%rax), %r14
xorq (%rax,%r11,8), %r14
addq %r8, %r15
movq %rcx, %r8
shrq $0x20, %r8
andl %r13d, %r8d
xorq 0x1000(%rax,%r8,8), %r14
movq %rcx, %r8
shrq $0x30, %r8
andl %r13d, %r8d
xorq 0x1800(%rax,%r8,8), %r14
movl -0x54(%rsp), %r8d
imulq %rsi, %r15
subq %r14, %r15
imulq %rsi, %rdx
incl %r8d
cmpl $0x3, %r8d
movq %rdi, %rsi
movq %rbx, %r14
movq %rbp, %r12
jne 0x1383
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