// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/stribob192r2/ref/wbob_pi64.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_SM(0, 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_SM(0, 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_SM(0, 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_SM(0, 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_SM(0, 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_SM(0, 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_SM(0, 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_SM(0, 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 $0xb8, %rsp
movq (%rdi), %rbx
movq 0x8(%rdi), %r15
movq 0x10(%rdi), %r11
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r13
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
movq %rdi, -0x78(%rsp)
movq 0x38(%rdi), %rdx
movq %rdx, -0x80(%rsp)
xorl %edx, %edx
movq %rdx, 0xb0(%rsp)
movq -0x80(%rsp), %r8
movl %r8d, %edx
movq %rdx, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r8, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq %r8, 0x78(%rsp)
movl $0xff, %esi
andl %esi, %r8d
movl %ecx, %edx
movl %ecx, %edi
movq %rdi, -0x50(%rsp)
movq %rdi, -0x28(%rsp)
movq %rdi, 0x70(%rsp)
shrl $0x8, %edx
andl %esi, %edx
leaq 0x1160(%rip), %rdi      # 0x2800
movq (%rdi,%rdx,8), %r12
leaq 0x955(%rip), %rdx       # 0x2000
xorq (%rdx,%r8,8), %r12
movl %eax, %edx
movl %eax, %edi
movq %rdi, -0x58(%rsp)
movq %rdi, 0x50(%rsp)
movq %rdi, 0x68(%rsp)
shrl $0xd, %edx
movl $0x7f8, %edi            # imm = 0x7F8
andl %edi, %edx
leaq 0x192d(%rip), %rdi      # 0x3000
xorq (%rdx,%rdi), %r12
movl %r13d, %edx
movl %r13d, %edi
movq %rdi, 0x28(%rsp)
movq %rdi, 0x48(%rsp)
movq %rdi, 0x60(%rsp)
shrl $0x18, %edx
leaq 0x210a(%rip), %rdi      # 0x3800
xorq (%rdi,%rdx,8), %r12
movq %r14, %r10
movq %r14, -0x40(%rsp)
movq %r14, -0x18(%rsp)
movl %r14d, %edi
movq %rdi, -0x10(%rsp)
movq %rdi, 0x10(%rsp)
movq %rdi, 0x38(%rsp)
movq %rdi, 0x58(%rsp)
shrq $0x20, %r14
andl %esi, %r14d
leaq 0x28d4(%rip), %rdi      # 0x4000
xorq (%rdi,%r14,8), %r12
movq %r11, %r8
movq %r11, -0x68(%rsp)
movl %r11d, %edx
movq %rdx, -0x60(%rsp)
movq %rdx, -0x30(%rsp)
movq %rdx, (%rsp)
movq %rdx, 0x20(%rsp)
movq %r11, 0x40(%rsp)
shrq $0x28, %r11
andl %esi, %r11d
leaq 0x309f(%rip), %rdx      # 0x4800
xorq (%rdx,%r11,8), %r12
movq %r15, %r11
movl %r15d, %r14d
movl %r15d, %r9d
movl %r15d, %edi
movq %rdi, -0x48(%rsp)
movq %rdi, -0x20(%rsp)
movq %r15, 0x8(%rsp)
movq %r15, 0x30(%rsp)
shrq $0x30, %r15
andl %esi, %r15d
leaq 0x386d(%rip), %rdi      # 0x5000
xorq (%rdi,%r15,8), %r12
movl %ebx, %r15d
movl %ebx, %edx
movl %ebx, %edi
movl %ebx, %ebp
movq %rbp, -0x70(%rsp)
movq %rbx, -0x38(%rsp)
movq %rbx, -0x8(%rsp)
movq %rbx, 0x18(%rsp)
shrq $0x38, %rbx
movq %r12, %rbp
leaq 0x403e(%rip), %r12      # 0x5800
xorq (%r12,%rbx,8), %rbp
movq %rbp, -0x80(%rsp)
andl %esi, %r15d
movq 0xa8(%rsp), %rbx
shrl $0x8, %ebx
andl %esi, %ebx
leaq 0x101e(%rip), %r12      # 0x2800
movq (%r12,%rbx,8), %rbx
leaq 0x813(%rip), %r12       # 0x2000
xorq (%r12,%r15,8), %rbx
movq -0x50(%rsp), %r15
shrl $0xd, %r15d
movl $0x7f8, %ebp            # imm = 0x7F8
andl %ebp, %r15d
leaq 0x17f7(%rip), %rbp      # 0x3000
xorq (%r15,%rbp), %rbx
movq -0x58(%rsp), %rbp
shrl $0x18, %ebp
leaq 0x1fe4(%rip), %r15      # 0x3800
xorq (%r15,%rbp,8), %rbx
movq %r13, %r15
shrq $0x20, %r15
andl %esi, %r15d
leaq 0x27cf(%rip), %rbp      # 0x4000
xorq (%rbp,%r15,8), %rbx
shrq $0x28, %r10
andl %esi, %r10d
leaq 0x2fbc(%rip), %rbp      # 0x4800
xorq (%rbp,%r10,8), %rbx
shrq $0x30, %r8
andl %esi, %r8d
leaq 0x37a9(%rip), %r10      # 0x5000
xorq (%r10,%r8,8), %rbx
shrq $0x38, %r11
leaq 0x3f9a(%rip), %r8       # 0x5800
xorq (%r8,%r11,8), %rbx
andl %esi, %r14d
shrl $0x8, %edx
andl %esi, %edx
leaq 0xf87(%rip), %r10       # 0x2800
movq (%r10,%rdx,8), %r15
xorq (%r12,%r14,8), %r15
movq 0xa0(%rsp), %rdx
shrl $0xd, %edx
movl $0x7f8, %r10d           # imm = 0x7F8
andl %r10d, %edx
leaq 0x1764(%rip), %r10      # 0x3000
xorq (%rdx,%r10), %r15
movq -0x28(%rsp), %rdx
shrl $0x18, %edx
leaq 0x1f51(%rip), %r14      # 0x3800
xorq (%r14,%rdx,8), %r15
movq %rax, %rdx
shrq $0x20, %rdx
andl %esi, %edx
leaq 0x273d(%rip), %r12      # 0x4000
xorq (%r12,%rdx,8), %r15
movq %r13, %rdx
shrq $0x28, %rdx
andl %esi, %edx
xorq (%rbp,%rdx,8), %r15
movq -0x40(%rsp), %rdx
shrq $0x30, %rdx
andl %esi, %edx
leaq 0x3719(%rip), %rbp      # 0x5000
xorq (%rbp,%rdx,8), %r15
movq -0x68(%rsp), %rdx
shrq $0x38, %rdx
xorq (%r8,%rdx,8), %r15
movq -0x60(%rsp), %rdx
andl %esi, %edx
shrl $0x8, %r9d
andl %esi, %r9d
leaq 0xef2(%rip), %r11       # 0x2800
movq (%r11,%r9,8), %r11
leaq 0x6e7(%rip), %r9        # 0x2000
xorq (%r9,%rdx,8), %r11
shrl $0xd, %edi
movl $0x7f8, %edx            # imm = 0x7F8
andl %edx, %edi
xorq (%rdi,%r10), %r11
movq 0x98(%rsp), %rdx
shrl $0x18, %edx
xorq (%r14,%rdx,8), %r11
movq %rcx, %rdx
shrq $0x20, %rdx
andl %esi, %edx
xorq (%r12,%rdx,8), %r11
movq %rax, %rdx
shrq $0x28, %rdx
andl %esi, %edx
leaq 0x2ea9(%rip), %rdi      # 0x4800
xorq (%rdi,%rdx,8), %r11
movq %r13, %rdx
shrq $0x30, %rdx
andl %esi, %edx
xorq (%rbp,%rdx,8), %r11
movq %rbp, %r9
movq -0x18(%rsp), %rdx
shrq $0x38, %rdx
xorq (%r8,%rdx,8), %r11
movq -0x10(%rsp), %rdx
andl %esi, %edx
movq -0x30(%rsp), %r10
shrl $0x8, %r10d
andl %esi, %r10d
leaq 0xe6d(%rip), %r14       # 0x2800
movq (%r14,%r10,8), %r14
leaq 0x662(%rip), %r10       # 0x2000
xorq (%r10,%rdx,8), %r14
movq -0x48(%rsp), %rdx
shrl $0xd, %edx
movl $0x7f8, %ebp            # imm = 0x7F8
andl %ebp, %edx
leaq 0x1648(%rip), %rbp      # 0x3000
xorq (%rdx,%rbp), %r14
movq -0x70(%rsp), %rdx
shrl $0x18, %edx
leaq 0x1e35(%rip), %rbp      # 0x3800
xorq (%rbp,%rdx,8), %r14
movq 0x90(%rsp), %rdx
shrq $0x20, %rdx
andl %esi, %edx
xorq (%r12,%rdx,8), %r14
movq %rcx, %rdx
shrq $0x28, %rdx
andl %esi, %edx
xorq (%rdi,%rdx,8), %r14
movq %rax, %rdx
shrq $0x30, %rdx
andl %esi, %edx
xorq (%r9,%rdx,8), %r14
shrq $0x38, %r13
xorq (%r8,%r13,8), %r14
movq 0x28(%rsp), %rdx
andl %esi, %edx
movq 0x10(%rsp), %r8
shrl $0x8, %r8d
andl %esi, %r8d
leaq 0xde2(%rip), %rdi       # 0x2800
movq (%rdi,%r8,8), %r13
xorq (%r10,%rdx,8), %r13
movq (%rsp), %rdx
shrl $0xd, %edx
movl $0x7f8, %edi            # imm = 0x7F8
andl %edi, %edx
leaq 0x15c5(%rip), %rdi      # 0x3000
xorq (%rdx,%rdi), %r13
movq -0x20(%rsp), %rdx
shrl $0x18, %edx
leaq 0x1db2(%rip), %r10      # 0x3800
xorq (%r10,%rdx,8), %r13
movq -0x38(%rsp), %rdx
shrq $0x20, %rdx
andl %esi, %edx
xorq (%r12,%rdx,8), %r13
movq 0x88(%rsp), %rdx
shrq $0x28, %rdx
andl %esi, %edx
leaq 0x2d8a(%rip), %rbp      # 0x4800
xorq (%rbp,%rdx,8), %r13
movq %rcx, %rdx
shrq $0x30, %rdx
andl %esi, %edx
movq %r9, %r12
xorq (%r9,%rdx,8), %r13
movq 0xb0(%rsp), %r8
shrq $0x38, %rax
leaq 0x3d62(%rip), %r9       # 0x5800
xorq (%r9,%rax,8), %r13
movq 0x50(%rsp), %rdx
andl %esi, %edx
movq 0x48(%rsp), %rax
shrl $0x8, %eax
andl %esi, %eax
leaq 0xd46(%rip), %rdi       # 0x2800
movq (%rdi,%rax,8), %rax
leaq 0x53b(%rip), %rdi       # 0x2000
xorq (%rdi,%rdx,8), %rax
movq 0x38(%rsp), %rdx
shrl $0xd, %edx
movl $0x7f8, %edi            # imm = 0x7F8
andl %edi, %edx
leaq 0x1521(%rip), %rdi      # 0x3000
xorq (%rdx,%rdi), %rax
movq 0x20(%rsp), %rdx
shrl $0x18, %edx
xorq (%r10,%rdx,8), %rax
movq 0x8(%rsp), %rdx
shrq $0x20, %rdx
andl %esi, %edx
leaq 0x24ff(%rip), %rdi      # 0x4000
xorq (%rdi,%rdx,8), %rax
movq -0x8(%rsp), %rdx
shrq $0x28, %rdx
andl %esi, %edx
xorq (%rbp,%rdx,8), %rax
movq 0x80(%rsp), %rdi
shrq $0x30, %rdi
andl %esi, %edi
xorq (%r12,%rdi,8), %rax
shrq $0x38, %rcx
xorq (%r9,%rcx,8), %rax
movq 0x70(%rsp), %rdi
andl %esi, %edi
movq 0x68(%rsp), %rcx
shrl $0x8, %ecx
andl %esi, %ecx
leaq 0xcb9(%rip), %rdx       # 0x2800
movq (%rdx,%rcx,8), %rcx
leaq 0x4ae(%rip), %rdx       # 0x2000
xorq (%rdx,%rdi,8), %rcx
movq 0x60(%rsp), %rdi
shrl $0xd, %edi
movl $0x7f8, %edx            # imm = 0x7F8
andl %edx, %edi
leaq 0x1494(%rip), %rdx      # 0x3000
xorq (%rdi,%rdx), %rcx
movq 0x58(%rsp), %rdi
shrl $0x18, %edi
xorq (%r10,%rdi,8), %rcx
movq 0x40(%rsp), %rdx
shrq $0x20, %rdx
andl %esi, %edx
leaq 0x2472(%rip), %rdi      # 0x4000
xorq (%rdi,%rdx,8), %rcx
movq 0x30(%rsp), %rdx
shrq $0x28, %rdx
andl %esi, %edx
xorq (%rbp,%rdx,8), %rcx
movq 0x18(%rsp), %rdx
shrq $0x30, %rdx
andl %esi, %edx
xorq (%r12,%rdx,8), %rcx
movq 0x78(%rsp), %rsi
shrq $0x38, %rsi
xorq (%r9,%rsi,8), %rcx
leaq 0x443b(%rip), %rsi      # 0x6000
xorq (%r8,%rsi), %rbx
addq $0x8, %r8
movq %r8, %rdx
cmpq $0x60, %r8
jne 0x1634
movq -0x78(%rsp), %rdx
movq %rbx, (%rdx)
movq %r15, 0x8(%rdx)
movq %r11, 0x10(%rdx)
movq %r14, 0x18(%rdx)
movq %r13, 0x20(%rdx)
movq %rax, 0x28(%rdx)
movq %rcx, 0x30(%rdx)
movq -0x80(%rsp), %rax
movq %rax, 0x38(%rdx)
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)