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