// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/reference32bits/KeccakP-1600-reference32BI.c
// Function: theta
static void theta(UINT32 *A)
{
    unsigned int x, y, z;
    UINT32 C[5][2], D[5][2];

    for(x=0; x<5; x++) {
        for(z=0; z<2; z++) {
            C[x][z] = 0;
            for(y=0; y<5; y++)
                C[x][z] ^= A[index(x, y, z)];
        }
    }
    for(x=0; x<5; x++) {
        ROL64(C[(x+1)%5][0], C[(x+1)%5][1], &(D[x][0]), &(D[x][1]), 1);
        for(z=0; z<2; z++)
            D[x][z] ^= C[(x+4)%5][z];
    }
    for(x=0; x<5; x++)
        for(y=0; y<5; y++)
            for(z=0; z<2; z++)
                A[index(x, y, z)] ^= D[x][z];
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
cmpl $0x5, 0x8c(%rsp)
jae 0x6468
movl $0x0, 0x84(%rsp)
cmpl $0x2, 0x84(%rsp)
jae 0x6450
movl 0x8c(%rsp), %eax
movl %eax, %ecx
leaq 0x50(%rsp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x84(%rsp), %ecx
movl $0x0, (%rax,%rcx,4)
movl $0x0, 0x88(%rsp)
cmpl $0x5, 0x88(%rsp)
jae 0x6438
movq 0x90(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x8c(%rsp), %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
movl 0x88(%rsp), %eax
movl $0x5, %esi
xorl %edx, %edx
divl %esi
movq 0x18(%rsp), %rax
imull $0x5, %edx, %edx
addl %edx, %ecx
shll %ecx
addl 0x84(%rsp), %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl 0x8c(%rsp), %eax
movl %eax, %ecx
leaq 0x50(%rsp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x84(%rsp), %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x63af
jmp 0x643a
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x6373
jmp 0x6452
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x635a
movl $0x0, 0x8c(%rsp)
cmpl $0x5, 0x8c(%rsp)
jae 0x6577
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl 0x50(%rsp,%rax,8), %edi
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl 0x54(%rsp,%rax,8), %esi
movl 0x8c(%rsp), %eax
leaq 0x20(%rsp), %rdx
shlq $0x3, %rax
addq %rax, %rdx
movl 0x8c(%rsp), %eax
leaq 0x20(%rsp), %rcx
shlq $0x3, %rax
addq %rax, %rcx
addq $0x4, %rcx
movl $0x1, %r8d
callq 0x56f0
movl $0x0, 0x84(%rsp)
cmpl $0x2, 0x84(%rsp)
jae 0x655f
movl 0x8c(%rsp), %eax
addl $0x4, %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
movl %eax, %ecx
leaq 0x50(%rsp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x84(%rsp), %ecx
movl (%rax,%rcx,4), %edx
movl 0x8c(%rsp), %eax
movl %eax, %ecx
leaq 0x20(%rsp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x84(%rsp), %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x64f3
jmp 0x6561
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x6473
movl $0x0, 0x8c(%rsp)
cmpl $0x5, 0x8c(%rsp)
jae 0x667b
movl $0x0, 0x88(%rsp)
cmpl $0x5, 0x88(%rsp)
jae 0x6663
movl $0x0, 0x84(%rsp)
cmpl $0x2, 0x84(%rsp)
jae 0x664b
movl 0x8c(%rsp), %eax
movl %eax, %ecx
leaq 0x20(%rsp), %rax
shlq $0x3, %rcx
addq %rcx, %rax
movl 0x84(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, 0x14(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x8c(%rsp), %eax
movl $0x5, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
movl 0x88(%rsp), %eax
movl $0x5, %esi
xorl %edx, %edx
divl %esi
movq 0x8(%rsp), %rax
movl %edx, %esi
movl 0x14(%rsp), %edx
imull $0x5, %esi, %esi
addl %esi, %ecx
shll %ecx
addl 0x84(%rsp), %ecx
movl %ecx, %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl 0x84(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x84(%rsp)
jmp 0x65b4
jmp 0x664d
movl 0x88(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x88(%rsp)
jmp 0x659b
jmp 0x6665
movl 0x8c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8c(%rsp)
jmp 0x6582
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)