// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/generic32/KeccakP-200-reference.c
// Function: KeccakP200Round
void KeccakP200Round(tKeccakLane *state, unsigned int indexRound)
{
#ifdef KeccakReference
    displayRoundNumber(3, indexRound);
#endif

    theta(state);
#ifdef KeccakReference
    displayStateAsLanes(3, "After theta", state, 200);
#endif

    rho(state);
#ifdef KeccakReference
    displayStateAsLanes(3, "After rho", state, 200);
#endif

    pi(state);
#ifdef KeccakReference
    displayStateAsLanes(3, "After pi", state, 200);
#endif

    chi(state);
#ifdef KeccakReference
    displayStateAsLanes(3, "After chi", state, 200);
#endif

    iota(state, indexRound);
#ifdef KeccakReference
    displayStateAsLanes(3, "After iota", state, 200);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
xorl %eax, %eax
movq %rdi, %rcx
movb $0x0, -0x28(%rsp,%rax)
xorl %edx, %edx
xorl %r8d, %r8d
xorb (%rcx,%rdx), %r8b
addq $0x5, %rdx
cmpq $0x19, %rdx
jne 0x8ef6
movb %r8b, -0x28(%rsp,%rax)
incq %rax
incq %rcx
cmpq $0x5, %rax
jne 0x8eec
movl $0x4, %edx
leaq -0x24(%rsp), %rcx
xorl %r8d, %r8d
movabsq $-0x3333333333333333, %rax # imm = 0xCCCCCCCCCCCCCCCD
leaq 0x1(%r8), %r9
mulxq %rax, %r10, %r10
shrq $0x2, %r10
leaq (%r10,%r10,4), %r10
movq %rcx, %r11
subq %r10, %r11
cmpq $0x4, %r8
movl $0x0, %r10d
cmovneq %r9, %r10
movb -0x28(%rsp,%r10), %r10b
rolb %r10b
xorb (%r11,%r8), %r10b
movb %r10b, -0x2d(%rsp,%r8)
incq %rdx
movq %r9, %r8
cmpq $0x5, %r9
jne 0x8f2c
xorl %ecx, %ecx
movq %rdi, %rdx
movb -0x2d(%rsp,%rcx), %r8b
xorl %r9d, %r9d
xorb %r8b, (%rdx,%r9)
addq $0x5, %r9
cmpq $0x19, %r9
jne 0x8f7b
incq %rcx
incq %rdx
cmpq $0x5, %rcx
jne 0x8f73
leaq 0x96a4(%rip), %rcx      # 0x12640
xorl %edx, %edx
movl $0x880001, %r8d         # imm = 0x880001
movq %rdi, %r9
xorl %r10d, %r10d
leal (%rdx,%r10), %r11d
btq %r11, %r8
jb 0x8fd2
movzbl (%r9,%r10), %r11d
movb (%rcx,%r10,4), %bl
shlxl %ebx, %r11d, %ebp
movb $0x8, %r14b
subb %bl, %r14b
shrxl %r14d, %r11d, %r11d
xorl %ebp, %r11d
jmp 0x8fd6
movb (%r9,%r10), %r11b
movb %r11b, (%r9,%r10)
addq $0x5, %r10
cmpq $0x19, %r10
jne 0x8faa
incq %rdx
incq %r9
addq $0x4, %rcx
cmpq $0x5, %rdx
jne 0x8fa7
leaq -0x28(%rsp), %rcx
xorl %edx, %edx
movq %rdi, %r8
xorl %r9d, %r9d
movb (%r8,%r9), %r10b
movb %r10b, (%rcx,%r9)
addq $0x5, %r9
cmpq $0x19, %r9
jne 0x9001
incq %rdx
incq %rcx
incq %r8
cmpq $0x5, %rdx
jne 0x8ffe
xorl %ecx, %ecx
leaq -0x28(%rsp), %rdx
movl $0xcccccccd, %r8d       # imm = 0xCCCCCCCD
xorl %r9d, %r9d
xorl %r10d, %r10d
movl %ecx, %r11d
movl %r9d, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
movl %r11d, %r12d
imulq %r8, %r12
shrq $0x22, %r12
leal (%r12,%r12,4), %r12d
leal (%r12,%r12,4), %ebp
movl %ebx, %r12d
subl %ebp, %r12d
movb (%rdx,%r15), %bpl
movb %bpl, (%r14,%r12)
addq $0x5, %r15
incq %r14
addl $0xf, %ebx
addl $0x3, %r11d
cmpq $0x19, %r15
jne 0x9041
incq %r10
addl $0xa, %r9d
addl $0x2, %ecx
incq %rdx
cmpq $0x5, %r10
jne 0x9035
leaq 0x2(%rdi), %rcx
xorl %r8d, %r8d
movl $0xcccccccd, %r9d       # imm = 0xCCCCCCCD
movq %rdi, %r10
movl %r8d, %edx
imulq %r9, %rdx
shrq $0x22, %rdx
imull $-0x19, %edx, %edx
leal (%r8,%r8,4), %r11d
addl %edx, %r11d
leaq (%r8,%r8,4), %rbx
addq %rdi, %rbx
movl $0x2, %edx
xorl %r14d, %r14d
mulxq %rax, %r15, %r15
shrq $0x2, %r15
leaq (%r15,%r15,4), %r15
movq %rcx, %r12
subq %r15, %r12
leaq 0x1(%r14), %r15
cmpq $0x4, %r14
movl $0x0, %r13d
cmovneq %r15, %r13
movb (%rbx,%r13), %bpl
notb %bpl
andb (%r12,%r14), %bpl
xorb (%r10,%r14), %bpl
movb %bpl, -0x28(%rsp,%r14)
incq %rdx
movq %r15, %r14
cmpq $0x5, %r15
jne 0x90bd
movb -0x24(%rsp), %dl
movb %dl, 0x4(%rdi,%r11)
movl -0x28(%rsp), %edx
movl %edx, (%rdi,%r11)
incq %r8
addq $0x5, %r10
addq $0x5, %rcx
cmpq $0x5, %r8
jne 0x9099
movl %esi, %eax
leaq 0x94ef(%rip), %rcx      # 0x12620
movb (%rax,%rcx), %al
xorb %al, (%rdi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq