// File: /workspace/github_c_makefile_star2_O1/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
movq 0x38(%rdi), %rax
movq %rax, -0x60(%rsp)
movq 0x30(%rdi), %rax
movq %rax, -0x20(%rsp)
movq 0x28(%rdi), %rax
movq %rax, -0x78(%rsp)
movq 0x20(%rdi), %rax
movq %rax, -0x70(%rsp)
movq 0x18(%rdi), %rax
movq %rax, -0x68(%rsp)
movq 0x10(%rdi), %rax
movq %rax, -0x30(%rsp)
movq (%rdi), %rax
movq %rax, -0x80(%rsp)
movq %rdi, -0x10(%rsp)
movq 0x8(%rdi), %rax
movq %rax, -0x28(%rsp)
movq $0x0, -0x18(%rsp)
movl $0xff, %ebx
leaq 0x99d(%rip), %r14       # 0x2000
movq -0x80(%rsp), %rax
movl %eax, %esi
movq %rax, %rcx
andl %ebx, %esi
movq -0x60(%rsp), %rax
movl %eax, %r8d
shrl $0x8, %r8d
andl %ebx, %r8d
rorxq $0x38, (%r14,%r8,8), %r8
xorq (%r14,%rsi,8), %r8
movq -0x20(%rsp), %r11
movl %r11d, %esi
shrl $0xd, %esi
movl $0x7f8, %edx            # imm = 0x7F8
andl %edx, %esi
movl $0x7f8, %r15d           # imm = 0x7F8
rorxq $0x30, (%rsi,%r14), %r9
movq -0x78(%rsp), %rdx
movl %edx, %esi
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r9, %rsi
movq -0x70(%rsp), %r10
movq %r10, %r9
shrq $0x20, %r9
andl %ebx, %r9d
rorxq $0x20, (%r14,%r9,8), %r9
xorq %r8, %rsi
movq -0x68(%rsp), %rdi
movq %rdi, %r8
shrq $0x28, %r8
andl %ebx, %r8d
rorxq $0x18, (%r14,%r8,8), %r8
xorq %r9, %r8
movq -0x30(%rsp), %r12
movq %r12, %r9
shrq $0x30, %r9
andl %ebx, %r9d
rorxq $0x10, (%r14,%r9,8), %r9
xorq %r8, %r9
xorq %rsi, %r9
movq -0x28(%rsp), %r8
movq %r8, %rsi
shrq $0x38, %rsi
rorxq $0x8, (%r14,%rsi,8), %rsi
xorq %r9, %rsi
movq %rsi, -0x8(%rsp)
movl %r8d, %esi
movq %r8, %r13
andl %ebx, %esi
movl %ecx, %r8d
movq %rcx, -0x80(%rsp)
shrl $0x8, %r8d
andl %ebx, %r8d
rorxq $0x38, (%r14,%r8,8), %r8
xorq (%r14,%rsi,8), %r8
movl %eax, %esi
shrl $0xd, %esi
andl %r15d, %esi
rorxq $0x30, (%rsi,%r14), %r9
movl %r11d, %esi
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r9, %rsi
xorq %r8, %rsi
movq %rdx, %r8
shrq $0x20, %r8
andl %ebx, %r8d
rorxq $0x20, (%r14,%r8,8), %r8
movq %r10, %r9
movq %r10, -0x70(%rsp)
shrq $0x28, %r9
andl %ebx, %r9d
rorxq $0x18, (%r14,%r9,8), %r9
xorq %r8, %r9
movq %rdi, %r8
shrq $0x30, %r8
andl %ebx, %r8d
rorxq $0x10, (%r14,%r8,8), %r8
xorq %r9, %r8
xorq %rsi, %r8
movq %r12, %rsi
shrq $0x38, %rsi
rorxq $0x8, (%r14,%rsi,8), %rsi
xorq %r8, %rsi
movq %rsi, -0x38(%rsp)
movl %r12d, %esi
andl %ebx, %esi
movl %r13d, %r8d
shrl $0x8, %r8d
andl %ebx, %r8d
rorxq $0x38, (%r14,%r8,8), %r8
xorq (%r14,%rsi,8), %r8
movl %ecx, %esi
shrl $0xd, %esi
andl %r15d, %esi
rorxq $0x30, (%rsi,%r14), %r9
movl %eax, %esi
movq %rax, %rcx
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r9, %rsi
xorq %r8, %rsi
movq %r11, %r8
shrq $0x20, %r8
andl %ebx, %r8d
rorxq $0x20, (%r14,%r8,8), %r8
movq %rdx, %r9
movq %rdx, -0x78(%rsp)
shrq $0x28, %r9
andl %ebx, %r9d
rorxq $0x18, (%r14,%r9,8), %r9
xorq %r8, %r9
shrq $0x30, %r10
andl %ebx, %r10d
rorxq $0x10, (%r14,%r10,8), %r8
xorq %r9, %r8
movq %rdi, %r9
shrq $0x38, %r9
rorxq $0x8, (%r14,%r9,8), %rax
xorq %rsi, %r8
movl %edi, %esi
movq %rdi, %r10
movq %rdi, -0x68(%rsp)
andl %ebx, %esi
movl %r12d, %r9d
shrl $0x8, %r9d
andl %ebx, %r9d
rorxq $0x38, (%r14,%r9,8), %r9
xorq (%r14,%rsi,8), %r9
movl %r13d, %esi
movq %r13, %rbp
shrl $0xd, %esi
andl %r15d, %esi
rorxq $0x30, (%rsi,%r14), %r15
xorq %r8, %rax
movq %rax, -0x40(%rsp)
movq -0x80(%rsp), %rax
movl %eax, %esi
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r15, %rsi
xorq %r9, %rsi
movq %rcx, %r8
movq %rcx, %rdi
movq %rcx, -0x60(%rsp)
shrq $0x20, %r8
andl %ebx, %r8d
rorxq $0x20, (%r14,%r8,8), %r8
movq %r11, %r9
shrq $0x28, %r9
andl %ebx, %r9d
rorxq $0x18, (%r14,%r9,8), %r9
shrq $0x30, %rdx
andl %ebx, %edx
rorxq $0x10, (%r14,%rdx,8), %r15
xorq %r8, %r9
xorq %r9, %r15
xorq %rsi, %r15
movq -0x70(%rsp), %rdx
movq %rdx, %rsi
shrq $0x38, %rsi
rorxq $0x8, (%r14,%rsi,8), %rsi
xorq %r15, %rsi
movq %rsi, -0x48(%rsp)
movl %edx, %esi
andl %ebx, %esi
movl %r10d, %r8d
shrl $0x8, %r8d
andl %ebx, %r8d
rorxq $0x38, (%r14,%r8,8), %r8
xorq (%r14,%rsi,8), %r8
movl %r12d, %esi
movq %r12, %r13
shrl $0xd, %esi
movl $0x7f8, %ecx            # imm = 0x7F8
andl %ecx, %esi
rorxq $0x30, (%rsi,%r14), %r9
movl %ebp, %esi
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r9, %rsi
movq %rax, %r9
movq %rax, %rcx
shrq $0x20, %r9
andl %ebx, %r9d
rorxq $0x20, (%r14,%r9,8), %r9
movq %rdi, %r15
shrq $0x28, %r15
andl %ebx, %r15d
rorxq $0x18, (%r14,%r15,8), %r15
xorq %r8, %rsi
xorq %r9, %r15
movq %r11, %r8
shrq $0x30, %r8
andl %ebx, %r8d
rorxq $0x10, (%r14,%r8,8), %r8
xorq %r15, %r8
xorq %rsi, %r8
movq -0x78(%rsp), %r12
movq %r12, %rsi
shrq $0x38, %rsi
rorxq $0x8, (%r14,%rsi,8), %rax
movl %r12d, %esi
andl %ebx, %esi
movl %edx, %r9d
shrl $0x8, %r9d
andl %ebx, %r9d
rorxq $0x38, (%r14,%r9,8), %r9
xorq (%r14,%rsi,8), %r9
xorq %r8, %rax
movq %rax, -0x50(%rsp)
movq -0x68(%rsp), %rdi
movl %edi, %esi
shrl $0xd, %esi
movl $0x7f8, %eax            # imm = 0x7F8
andl %eax, %esi
rorxq $0x30, (%rsi,%r14), %r8
movl %r13d, %esi
shrl $0x18, %esi
rorxq $0x28, (%r14,%rsi,8), %rsi
xorq %r8, %rsi
xorq %r9, %rsi
movq %rbp, %r8
shrq $0x20, %r8
andl %ebx, %r8d
rorxq $0x20, (%r14,%r8,8), %r8
shrq $0x28, %rcx
andl %ebx, %ecx
rorxq $0x18, (%r14,%rcx,8), %r15
xorq %r8, %r15
movq -0x60(%rsp), %rcx
movq %rcx, %r8
shrq $0x30, %r8
andl %ebx, %r8d
rorxq $0x10, (%r14,%r8,8), %r9
xorq %r15, %r9
xorq %rsi, %r9
movq %r11, %rsi
shrq $0x38, %rsi
rorxq $0x8, (%r14,%rsi,8), %r10
movl %r11d, %r8d
andl %ebx, %r8d
movl %r12d, %r15d
shrl $0x8, %r15d
andl %ebx, %r15d
rorxq $0x38, (%r14,%r15,8), %r15
xorq (%r14,%r8,8), %r15
movl %edx, %r8d
shrl $0xd, %r8d
andl %eax, %r8d
movq -0x18(%rsp), %rsi
rorxq $0x30, (%r8,%r14), %rax
movl %edi, %r8d
shrl $0x18, %r8d
rorxq $0x28, (%r14,%r8,8), %r8
xorq %r9, %r10
movq %r10, -0x58(%rsp)
xorq %rax, %r8
movq %r13, %rax
shrq $0x20, %rax
andl %ebx, %eax
rorxq $0x20, (%r14,%rax,8), %rax
xorq %r15, %r8
movq %rbp, %r9
shrq $0x28, %r9
andl %ebx, %r9d
rorxq $0x18, (%r14,%r9,8), %r9
xorq %rax, %r9
movq -0x80(%rsp), %r10
movq %r10, %rax
shrq $0x30, %rax
andl %ebx, %eax
rorxq $0x10, (%r14,%rax,8), %rax
xorq %r9, %rax
xorq %r8, %rax
movq %rcx, %r8
shrq $0x38, %r8
rorxq $0x8, (%r14,%r8,8), %r8
xorq %rax, %r8
movl %ecx, %eax
movq -0x8(%rsp), %rcx
andl %ebx, %eax
movl %r11d, %r9d
shrl $0x8, %r9d
andl %ebx, %r9d
rorxq $0x38, (%r14,%r9,8), %r15
xorq (%r14,%rax,8), %r15
movl %r12d, %eax
shrl $0xd, %eax
movl $0x7f8, %r9d            # imm = 0x7F8
andl %r9d, %eax
rorxq $0x30, (%rax,%r14), %rax
movl %edx, %r9d
shrl $0x18, %r9d
rorxq $0x28, (%r14,%r9,8), %r9
xorq %rax, %r9
xorq %r15, %r9
shrq $0x20, %rdi
andl %ebx, %edi
rorxq $0x20, (%r14,%rdi,8), %rax
shrq $0x28, %r13
andl %ebx, %r13d
rorxq $0x18, (%r14,%r13,8), %r15
xorq %rax, %r15
shrq $0x30, %rbp
andl %ebx, %ebp
rorxq $0x10, (%r14,%rbp,8), %rax
xorq %r15, %rax
xorq %r9, %rax
movq %r10, %r9
shrq $0x38, %r9
rorxq $0x8, (%r14,%r9,8), %r9
xorq %rax, %r9
leaq 0xcae(%rip), %rax       # 0x2800
xorq (%rsi,%rax), %rcx
movq %rsi, %rdi
cmpq $0x58, %rsi
je 0x1ba0
movq -0x38(%rsp), %rdx
movq %rdx, -0x28(%rsp)
movq -0x40(%rsp), %rdx
movq %rdx, -0x30(%rsp)
movq -0x48(%rsp), %rax
movq %rax, -0x68(%rsp)
movq -0x50(%rsp), %rax
movq %rax, -0x70(%rsp)
movq -0x58(%rsp), %rax
movq %rax, -0x78(%rsp)
movq %r8, -0x20(%rsp)
movq %r9, -0x60(%rsp)
movq %rcx, -0x80(%rsp)
addq $0x8, %rdi
movq %rdi, -0x18(%rsp)
cmpq $0x60, %rdi
jne 0x1663
movq -0x10(%rsp), %rax
movq %rcx, (%rax)
movq -0x38(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq -0x40(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq -0x48(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq -0x50(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq -0x58(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq %r8, 0x30(%rax)
movq %r9, 0x38(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop