// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/riverkeyakv2/ref/Keccak-f.h
// Function: void KeccakF::theta<unsigned long long>(std::vector<unsigned long long, std::allocator<unsigned long long>>&) const
void KeccakF::theta(vector<Lane>& A) const
{
    vector<Lane> C(5);
    for(unsigned int x=0; x<5; x++) {
        C[x] = A[index(x,0)]; 
        for(unsigned int y=1; y<5; y++) 
            C[x] ^= A[index(x,y)];
    }
    vector<Lane> D(5);
    for(unsigned int x=0; x<5; x++) {
        Lane temp = C[index(x+1)];
        ROL(temp, 1);
        D[x] = temp ^ C[index(x-1)];
    }
    for(int x=0; x<5; x++)
        for(unsigned int y=0; y<5; y++)
            A[index(x,y)] ^= D[x];
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0xaf(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0xd050
movq 0x58(%rsp), %rdx
leaq 0xb0(%rsp), %rdi
movl $0x5, %esi
callq 0xd1c0
jmp 0x121ff
leaq 0xaf(%rsp), %rdi
callq 0xde10
movl $0x0, 0x98(%rsp)
cmpl $0x5, 0x98(%rsp)
jae 0x12335
movq 0xc8(%rsp), %rax
movq %rax, 0x40(%rsp)
movl 0x98(%rsp), %edi
xorl %esi, %esi
callq 0xeb10
movq 0x40(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movl 0x98(%rsp), %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xdde0
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
movl $0x1, 0x94(%rsp)
cmpl $0x5, 0x94(%rsp)
jae 0x1231d
movq 0xc8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0x98(%rsp), %edi
movl 0x94(%rsp), %esi
callq 0xeb10
movq 0x30(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movl 0x98(%rsp), %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xdde0
movq 0x38(%rsp), %rcx
xorq (%rax), %rcx
movq %rcx, (%rax)
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0x1227f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xaf(%rsp), %rdi
callq 0xde10
jmp 0x124e2
jmp 0x1231f
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0x12217
leaq 0x77(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xd050
movq 0x28(%rsp), %rdx
leaq 0x78(%rsp), %rdi
movl $0x5, %esi
callq 0xd1c0
jmp 0x1235a
leaq 0x77(%rsp), %rdi
callq 0xde10
movl $0x0, 0x70(%rsp)
cmpl $0x5, 0x70(%rsp)
jae 0x1243f
movl 0x70(%rsp), %edi
addl $0x1, %edi
callq 0xe140
movl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xdde0
movq 0x50(%rsp), %rdi
movq (%rax), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rsi
movl $0x1, %edx
callq 0xe230
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x70(%rsp), %edi
subl $0x1, %edi
callq 0xe140
movl %eax, %eax
movl %eax, %esi
leaq 0xb0(%rsp), %rdi
callq 0xdde0
movq %rax, %rcx
movq 0x18(%rsp), %rax
xorq (%rcx), %rax
movq %rax, 0x20(%rsp)
movl 0x70(%rsp), %eax
movl %eax, %esi
leaq 0x78(%rsp), %rdi
callq 0xdde0
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x70(%rsp)
jmp 0x1236c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x77(%rsp), %rdi
callq 0xde10
leaq 0xb0(%rsp), %rdi
callq 0xdfc0
jmp 0x124e2
movl $0x0, 0x64(%rsp)
cmpl $0x5, 0x64(%rsp)
jge 0x124c3
movl $0x0, 0x60(%rsp)
cmpl $0x5, 0x60(%rsp)
jae 0x124b4
movslq 0x64(%rsp), %rsi
leaq 0x78(%rsp), %rdi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x64(%rsp), %edi
movl 0x60(%rsp), %esi
callq 0xeb10
movq 0x8(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq 0x10(%rsp), %rcx
xorq (%rax), %rcx
movq %rcx, (%rax)
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x12456
jmp 0x124b6
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x12447
leaq 0x78(%rsp), %rdi
callq 0xdfc0
leaq 0xb0(%rsp), %rdi
callq 0xdfc0
addq $0xd8, %rsp
retq
movq 0xa0(%rsp), %rdi
callq 0xe7c0
nop