// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/stribob192r2/smaller/wbob_smaller_pi.c
// Function: wbob_pi
void wbob_pi(w512_t *s512)
{
    int i;
    uint64_t k[8], l[8];

    // load block
    for (i = 0; i < 8; i++)
        k[i] = s512->q[i];

    for (i = 0; i < 12; i++) {

        l[0] =  WBOB_SM0(k[0]) ^    WBOB_SM(1, k[7]) ^
                WBOB_SM(2, k[6]) ^  WBOB_SM(3, k[5]) ^
                WBOB_SM(4, k[4]) ^  WBOB_SM(5, k[3]) ^
                WBOB_SM(6, k[2]) ^  WBOB_SM(7, k[1]) ^ wbob_rc[i];

        l[1] =  WBOB_SM0(k[1]) ^    WBOB_SM(1, k[0]) ^
                WBOB_SM(2, k[7]) ^  WBOB_SM(3, k[6]) ^
                WBOB_SM(4, k[5]) ^  WBOB_SM(5, k[4]) ^
                WBOB_SM(6, k[3]) ^  WBOB_SM(7, k[2]);

        l[2] =  WBOB_SM0(k[2]) ^    WBOB_SM(1, k[1]) ^
                WBOB_SM(2, k[0]) ^  WBOB_SM(3, k[7]) ^
                WBOB_SM(4, k[6]) ^  WBOB_SM(5, k[5]) ^
                WBOB_SM(6, k[4]) ^  WBOB_SM(7, k[3]);

        l[3] =  WBOB_SM0(k[3]) ^    WBOB_SM(1, k[2]) ^
                WBOB_SM(2, k[1]) ^  WBOB_SM(3, k[0]) ^
                WBOB_SM(4, k[7]) ^  WBOB_SM(5, k[6]) ^
                WBOB_SM(6, k[5]) ^  WBOB_SM(7, k[4]);

        l[4] =  WBOB_SM0(k[4]) ^    WBOB_SM(1, k[3]) ^
                WBOB_SM(2, k[2]) ^  WBOB_SM(3, k[1]) ^
                WBOB_SM(4, k[0]) ^  WBOB_SM(5, k[7]) ^
                WBOB_SM(6, k[6]) ^  WBOB_SM(7, k[5]);

        l[5] =  WBOB_SM0(k[5]) ^    WBOB_SM(1, k[4]) ^
                WBOB_SM(2, k[3]) ^  WBOB_SM(3, k[2]) ^
                WBOB_SM(4, k[1]) ^  WBOB_SM(5, k[0]) ^
                WBOB_SM(6, k[7]) ^  WBOB_SM(7, k[6]);

        l[6] =  WBOB_SM0(k[6]) ^    WBOB_SM(1, k[5]) ^
                WBOB_SM(2, k[4]) ^  WBOB_SM(3, k[3]) ^
                WBOB_SM(4, k[2]) ^  WBOB_SM(5, k[1]) ^
                WBOB_SM(6, k[0]) ^  WBOB_SM(7, k[7]);

        l[7] =  WBOB_SM0(k[7]) ^    WBOB_SM(1, k[6]) ^
                WBOB_SM(2, k[5]) ^  WBOB_SM(3, k[4]) ^
                WBOB_SM(4, k[3]) ^  WBOB_SM(5, k[2]) ^
                WBOB_SM(6, k[1]) ^  WBOB_SM(7, k[0]);

        if (i < 11) {
            k[0] = l[0];
            k[1] = l[1];
            k[2] = l[2];
            k[3] = l[3];
            k[4] = l[4];
            k[5] = l[5];
            k[6] = l[6];
            k[7] = l[7];
        }
    }

    for (i = 0; i < 8; i++)
        s512->q[i] = l[i];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
xorl %eax, %eax
cmpq $0x8, %rax
je 0x15f7
movq (%rdi,%rax,8), %rcx
movq %rcx, 0x40(%rsp,%rax,8)
incq %rax
jmp 0x15e3
movq %rdi, -0x18(%rsp)
movq 0x40(%rsp), %rax
movq %rax, -0x60(%rsp)
movq 0x48(%rsp), %rax
movq %rax, -0x28(%rsp)
movq 0x78(%rsp), %rax
movq %rax, -0x38(%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x48(%rsp)
movq 0x68(%rsp), %rax
movq %rax, -0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, -0x78(%rsp)
movq 0x58(%rsp), %rax
movq %rax, -0x40(%rsp)
movq 0x50(%rsp), %rax
movq %rax, -0x70(%rsp)
xorl %r12d, %r12d
movl $0xff, %r15d
leaq 0x9a4(%rip), %r14       # 0x2000
cmpq $0x60, %r12
je 0x1bf4
movq -0x60(%rsp), %rax
movl %eax, %r10d
movq %rax, %r13
andl %r15d, %r10d
movq -0x38(%rsp), %rax
movl %eax, %r11d
shrl $0x8, %r11d
andl %r15d, %r11d
rorxq $0x38, (%r14,%r11,8), %r11
xorq (%r14,%r10,8), %r11
movq -0x48(%rsp), %rcx
movl %ecx, %r10d
movq %rcx, %rsi
shrl $0xd, %r10d
movl $0x7f8, %ebx            # imm = 0x7F8
andl %ebx, %r10d
rorxq $0x30, (%r10,%r14), %rbx
movq -0x68(%rsp), %rdx
movl %edx, %r10d
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %rbx, %r10
movq -0x78(%rsp), %rcx
movq %rcx, %rbx
movq %rcx, %r9
shrq $0x20, %rbx
andl %r15d, %ebx
rorxq $0x20, (%r14,%rbx,8), %rbx
xorq %r11, %r10
movq -0x40(%rsp), %rcx
movq %rcx, %r11
movq %rcx, %rbp
shrq $0x28, %r11
andl %r15d, %r11d
rorxq $0x18, (%r14,%r11,8), %r11
xorq %rbx, %r11
movq -0x70(%rsp), %rcx
movq %rcx, %rbx
shrq $0x30, %rbx
andl %r15d, %ebx
rorxq $0x10, (%r14,%rbx,8), %rbx
xorq %r11, %rbx
xorq %r10, %rbx
movq -0x28(%rsp), %rdi
movq %rdi, %r10
shrq $0x38, %r10
rorxq $0x8, (%r14,%r10,8), %r10
xorq %rbx, %r10
movq %r10, -0x10(%rsp)
movl %edi, %r10d
movq %rdi, %r8
andl %r15d, %r10d
movl %r13d, %r11d
movq %r13, -0x60(%rsp)
shrl $0x8, %r11d
andl %r15d, %r11d
rorxq $0x38, (%r14,%r11,8), %r11
xorq (%r14,%r10,8), %r11
movl %eax, %r10d
shrl $0xd, %r10d
movl $0x7f8, %edi            # imm = 0x7F8
andl %edi, %r10d
rorxq $0x30, (%r10,%r14), %rbx
movl %esi, %r10d
movq %rsi, %rdi
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %rbx, %r10
xorq %r11, %r10
movq %rdx, %r11
shrq $0x20, %r11
andl %r15d, %r11d
rorxq $0x20, (%r14,%r11,8), %r11
movq %r9, %rsi
movq %r9, -0x78(%rsp)
movq %r9, %rbx
shrq $0x28, %rbx
andl %r15d, %ebx
rorxq $0x18, (%r14,%rbx,8), %rbx
xorq %r11, %rbx
movq %rbp, %r11
shrq $0x30, %r11
andl %r15d, %r11d
rorxq $0x10, (%r14,%r11,8), %r11
xorq %rbx, %r11
xorq %r10, %r11
movq %rcx, %r10
shrq $0x38, %r10
rorxq $0x8, (%r14,%r10,8), %r10
xorq %r11, %r10
movq %r10, -0x20(%rsp)
movl %ecx, %r10d
movq %rcx, -0x70(%rsp)
andl %r15d, %r10d
movl %r8d, %r11d
movq %r8, %r9
shrl $0x8, %r11d
andl %r15d, %r11d
rorxq $0x38, (%r14,%r11,8), %r11
xorq (%r14,%r10,8), %r11
movl %r13d, %r10d
shrl $0xd, %r10d
movl $0x7f8, %r8d            # imm = 0x7F8
andl %r8d, %r10d
rorxq $0x30, (%r10,%r14), %rbx
movl %eax, %r10d
movq %rax, %r8
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %rbx, %r10
xorq %r11, %r10
movq %rdi, %r11
shrq $0x20, %r11
andl %r15d, %r11d
rorxq $0x20, (%r14,%r11,8), %r11
movq %rdx, %rax
movq %rdx, -0x68(%rsp)
movq %rdx, %rbx
shrq $0x28, %rbx
andl %r15d, %ebx
rorxq $0x18, (%r14,%rbx,8), %rbx
xorq %r11, %rbx
movq %rsi, %r11
shrq $0x30, %r11
andl %r15d, %r11d
rorxq $0x10, (%r14,%r11,8), %r11
xorq %rbx, %r11
movq %rbp, %rsi
movq %rbp, %rbx
shrq $0x38, %rbx
rorxq $0x8, (%r14,%rbx,8), %rdx
xorq %r10, %r11
movl %ebp, %r10d
andl %r15d, %r10d
movl %ecx, %ebx
shrl $0x8, %ebx
andl %r15d, %ebx
rorxq $0x38, (%r14,%rbx,8), %rbx
xorq (%r14,%r10,8), %rbx
movl %r9d, %r10d
shrl $0xd, %r10d
movl $0x7f8, %r13d           # imm = 0x7F8
andl %r13d, %r10d
movq %r12, -0x8(%rsp)
rorxq $0x30, (%r10,%r14), %r12
xorq %r11, %rdx
movq %rdx, -0x30(%rsp)
movq -0x60(%rsp), %r13
movl %r13d, %r10d
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %r12, %r10
xorq %rbx, %r10
movq %r8, %r11
movq %r8, %rcx
shrq $0x20, %r11
andl %r15d, %r11d
rorxq $0x20, (%r14,%r11,8), %r11
movq %rdi, %rbp
movq %rdi, %rbx
shrq $0x28, %rbx
andl %r15d, %ebx
rorxq $0x18, (%r14,%rbx,8), %rbx
movq %rax, %r12
shrq $0x30, %r12
andl %r15d, %r12d
rorxq $0x10, (%r14,%r12,8), %r12
xorq %r11, %rbx
xorq %rbx, %r12
xorq %r10, %r12
movq -0x78(%rsp), %rdi
movq %rdi, %r10
shrq $0x38, %r10
rorxq $0x8, (%r14,%r10,8), %rdx
xorq %r12, %rdx
movq %rdx, -0x50(%rsp)
movl %edi, %r10d
andl %r15d, %r10d
movq %rsi, %rdx
movl %edx, %r11d
shrl $0x8, %r11d
andl %r15d, %r11d
rorxq $0x38, (%r14,%r11,8), %r11
xorq (%r14,%r10,8), %r11
movq -0x70(%rsp), %r8
movl %r8d, %r10d
shrl $0xd, %r10d
movl $0x7f8, %eax            # imm = 0x7F8
andl %eax, %r10d
rorxq $0x30, (%r10,%r14), %rbx
movl %r9d, %r10d
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %rbx, %r10
movq %r13, %rbx
shrq $0x20, %rbx
andl %r15d, %ebx
rorxq $0x20, (%r14,%rbx,8), %rbx
movq %rcx, %rax
movq %rcx, %r12
shrq $0x28, %r12
andl %r15d, %r12d
rorxq $0x18, (%r14,%r12,8), %r12
xorq %r11, %r10
xorq %rbx, %r12
movq %rbp, %r11
movq %rbp, %rsi
shrq $0x30, %r11
andl %r15d, %r11d
rorxq $0x10, (%r14,%r11,8), %r11
xorq %r12, %r11
xorq %r10, %r11
movq -0x68(%rsp), %rcx
movq %rcx, %r10
shrq $0x38, %r10
rorxq $0x8, (%r14,%r10,8), %r12
movl %ecx, %r10d
andl %r15d, %r10d
movl %edi, %ebx
shrl $0x8, %ebx
andl %r15d, %ebx
rorxq $0x38, (%r14,%rbx,8), %rbx
xorq (%r14,%r10,8), %rbx
xorq %r11, %r12
movq %r12, -0x58(%rsp)
movq %rdx, %rbp
movl %ebp, %r10d
shrl $0xd, %r10d
movl $0x7f8, %r12d           # imm = 0x7F8
andl %r12d, %r10d
rorxq $0x30, (%r10,%r14), %r11
movl %r8d, %r10d
shrl $0x18, %r10d
rorxq $0x28, (%r14,%r10,8), %r10
xorq %r11, %r10
xorq %rbx, %r10
movq %r9, %rdx
movq %r9, %r11
shrq $0x20, %r11
andl %r15d, %r11d
rorxq $0x20, (%r14,%r11,8), %r11
movq %r13, %rbx
movq %r13, %r9
shrq $0x28, %rbx
andl %r15d, %ebx
rorxq $0x18, (%r14,%rbx,8), %r13
xorq %r11, %r13
movq %rax, %r11
shrq $0x30, %r11
andl %r15d, %r11d
rorxq $0x10, (%r14,%r11,8), %rbx
xorq %r13, %rbx
xorq %r10, %rbx
movq %rsi, %r10
shrq $0x38, %r10
rorxq $0x8, (%r14,%r10,8), %r10
movl %esi, %r11d
andl %r15d, %r11d
movl %ecx, %r13d
shrl $0x8, %r13d
andl %r15d, %r13d
rorxq $0x38, (%r14,%r13,8), %r13
xorq (%r14,%r11,8), %r13
movl %edi, %r11d
shrl $0xd, %r11d
andl %r12d, %r11d
rorxq $0x30, (%r11,%r14), %r12
movl %ebp, %r11d
shrl $0x18, %r11d
rorxq $0x28, (%r14,%r11,8), %r11
xorq %rbx, %r10
xorq %r12, %r11
movq %r8, %rbx
shrq $0x20, %rbx
andl %r15d, %ebx
rorxq $0x20, (%r14,%rbx,8), %rbx
xorq %r13, %r11
movq %rdx, %r12
shrq $0x28, %r12
andl %r15d, %r12d
rorxq $0x18, (%r14,%r12,8), %r12
xorq %rbx, %r12
movq %r9, %rbx
shrq $0x30, %rbx
andl %r15d, %ebx
rorxq $0x10, (%r14,%rbx,8), %rbx
xorq %r12, %rbx
xorq %r11, %rbx
movq %rax, %r11
shrq $0x38, %r11
rorxq $0x8, (%r14,%r11,8), %r11
xorq %rbx, %r11
movl %eax, %ebx
andl %r15d, %ebx
movl %esi, %r12d
shrl $0x8, %r12d
andl %r15d, %r12d
rorxq $0x38, (%r14,%r12,8), %r12
xorq (%r14,%rbx,8), %r12
movl %ecx, %ebx
shrl $0xd, %ebx
movl $0x7f8, %eax            # imm = 0x7F8
andl %eax, %ebx
rorxq $0x30, (%rbx,%r14), %r13
movl %edi, %ebx
shrl $0x18, %ebx
rorxq $0x28, (%r14,%rbx,8), %rbx
xorq %r13, %rbx
xorq %r12, %rbx
movq %rbp, %r12
shrq $0x20, %r12
andl %r15d, %r12d
rorxq $0x20, (%r14,%r12,8), %r12
movq %r8, %r13
shrq $0x28, %r13
andl %r15d, %r13d
rorxq $0x18, (%r14,%r13,8), %r13
xorq %r12, %r13
movq %rdx, %r12
shrq $0x30, %r12
andl %r15d, %r12d
rorxq $0x10, (%r14,%r12,8), %r12
xorq %r13, %r12
xorq %rbx, %r12
movq %r9, %rbx
shrq $0x38, %rbx
rorxq $0x8, (%r14,%rbx,8), %rbx
xorq %r12, %rbx
movq -0x8(%rsp), %r12
leaq 0xc63(%rip), %r13       # 0x2800
movq -0x10(%rsp), %rax
xorq (%r12,%r13), %rax
movq %rax, %r13
cmpq $0x58, %r12
je 0x1beb
movq -0x20(%rsp), %rax
movq %rax, -0x28(%rsp)
movq -0x30(%rsp), %rax
movq %rax, -0x70(%rsp)
movq -0x50(%rsp), %rax
movq %rax, -0x40(%rsp)
movq -0x58(%rsp), %rax
movq %rax, -0x78(%rsp)
movq %r10, -0x68(%rsp)
movq %r11, -0x48(%rsp)
movq %rbx, -0x38(%rsp)
movq %r13, -0x60(%rsp)
addq $0x8, %r12
jmp 0x165c
movq %r13, (%rsp)
movq -0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq -0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq -0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq -0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
xorl %eax, %eax
movq -0x18(%rsp), %rdx
cmpq $0x8, %rax
je 0x1c49
movq (%rsp,%rax,8), %rcx
movq %rcx, (%rdx,%rax,8)
incq %rax
jmp 0x1c36
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop