// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/riverkeyakv2/ref/Keccak-f.h
// Function: void KeccakF::inverseTheta<unsigned long long>(std::vector<unsigned long long, std::allocator<unsigned long long>>&) const
void KeccakF::inverseTheta(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)];
        }
    }
    const LaneValue inversePositions64[5] = {
        0xDE26BC4D789AF134ULL,
        0x09AF135E26BC4D78ULL,
        0xEBC4D789AF135E26ULL,
        0x7135E26BC4D789AFULL,
        0xCD789AF135E26BC4ULL };
    vector<LaneValue> inversePositions(5, 0);
    for(unsigned int z=0; z<64; z+=laneSize)
        for(unsigned int x=0; x<5; x++)
            inversePositions[x] ^= inversePositions64[x] >> z;
    for(unsigned int z=0; z<laneSize; z++) {
        for(unsigned int xOff=0; xOff<5; xOff++)
           for(int x=0; x<5; x++)
               for(unsigned int y=0; y<5; y++)
                   if ((inversePositions[xOff] & 1) != 0) 
                      A[index(x, y)] ^= C[index(x-xOff)];
        for(unsigned int xOff=0; xOff<5; xOff++) {
            ROL(C[xOff], 1);
            inversePositions[xOff] >>= 1;
        }
    }
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xd050
movq 0x48(%rsp), %rdx
leaq 0xe0(%rsp), %rdi
movl $0x5, %esi
callq 0xd1c0
jmp 0x132af
leaq 0xdf(%rsp), %rdi
callq 0xde10
movl $0x0, 0xc8(%rsp)
cmpl $0x5, 0xc8(%rsp)
jae 0x133e5
movq 0xf8(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0xc8(%rsp), %edi
xorl %esi, %esi
callq 0xeb10
movq 0x30(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x38(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, %esi
leaq 0xe0(%rsp), %rdi
callq 0xdde0
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movl $0x1, 0xc4(%rsp)
cmpl $0x5, 0xc4(%rsp)
jae 0x133cd
movq 0xf8(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0xc8(%rsp), %edi
movl 0xc4(%rsp), %esi
callq 0xeb10
movq 0x20(%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movl 0xc8(%rsp), %eax
movl %eax, %esi
leaq 0xe0(%rsp), %rdi
callq 0xdde0
movq 0x28(%rsp), %rcx
xorq (%rax), %rcx
movq %rcx, (%rax)
movl 0xc4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc4(%rsp)
jmp 0x1332f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xdf(%rsp), %rdi
callq 0xde10
jmp 0x136c9
jmp 0x133cf
movl 0xc8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc8(%rsp)
jmp 0x132c7
vpxor %xmm0, %xmm0, %xmm0
vmovdqu %ymm0, 0x90(%rsp)
movq $0x0, 0xb0(%rsp)
movabsq $-0x21d943b287650ecc, %rax # imm = 0xDE26BC4D789AF134
movq %rax, 0x90(%rsp)
movabsq $0x9af135e26bc4d78, %rax # imm = 0x9AF135E26BC4D78
movq %rax, 0x98(%rsp)
movabsq $-0x143b287650eca1da, %rax # imm = 0xEBC4D789AF135E26
movq %rax, 0xa0(%rsp)
movabsq $0x7135e26bc4d789af, %rax # imm = 0x7135E26BC4D789AF
movq %rax, 0xa8(%rsp)
movabsq $-0x3287650eca1d943c, %rax # imm = 0xCD789AF135E26BC4
movq %rax, 0xb0(%rsp)
movq $0x0, 0x70(%rsp)
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
vzeroupper
callq 0xd050
movq 0x18(%rsp), %rcx
leaq 0x78(%rsp), %rdi
movl $0x5, %esi
leaq 0x70(%rsp), %rdx
callq 0xd0c0
jmp 0x1348e
leaq 0x6f(%rsp), %rdi
callq 0xde10
movl $0x0, 0x68(%rsp)
cmpl $0x40, 0x68(%rsp)
jae 0x13541
movl $0x0, 0x64(%rsp)
cmpl $0x5, 0x64(%rsp)
jae 0x1352a
movl 0x64(%rsp), %eax
movq 0x90(%rsp,%rax,8), %rax
movl 0x68(%rsp), %ecx
shrq %cl, %rax
movq %rax, 0x10(%rsp)
movl 0x64(%rsp), %eax
movl %eax, %esi
leaq 0x78(%rsp), %rdi
callq 0xdde0
movq 0x10(%rsp), %rcx
xorq (%rax), %rcx
movq %rcx, (%rax)
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x134b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x6f(%rsp), %rdi
callq 0xde10
leaq 0xe0(%rsp), %rdi
callq 0xdfc0
jmp 0x136c9
jmp 0x1352c
movq 0x40(%rsp), %rax
movl 0xc(%rax), %eax
addl 0x68(%rsp), %eax
movl %eax, 0x68(%rsp)
jmp 0x134a0
movl $0x0, 0x60(%rsp)
movq 0x40(%rsp), %rcx
movl 0x60(%rsp), %eax
cmpl 0xc(%rcx), %eax
jae 0x136aa
movl $0x0, 0x5c(%rsp)
cmpl $0x5, 0x5c(%rsp)
jae 0x1363e
movl $0x0, 0x58(%rsp)
cmpl $0x5, 0x58(%rsp)
jge 0x1362c
movl $0x0, 0x54(%rsp)
cmpl $0x5, 0x54(%rsp)
jae 0x1361a
movl 0x5c(%rsp), %eax
movl %eax, %esi
leaq 0x78(%rsp), %rdi
callq 0xdde0
movq (%rax), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x13608
movl 0x58(%rsp), %edi
subl 0x5c(%rsp), %edi
callq 0xe140
movl %eax, %eax
movl %eax, %esi
leaq 0xe0(%rsp), %rdi
callq 0xdde0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0xf8(%rsp), %rax
movq %rax, (%rsp)
movl 0x58(%rsp), %edi
movl 0x54(%rsp), %esi
callq 0xeb10
movq (%rsp), %rdi
movl %eax, %eax
movl %eax, %esi
callq 0xdde0
movq 0x8(%rsp), %rcx
xorq (%rax), %rcx
movq %rcx, (%rax)
jmp 0x1360a
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x13589
jmp 0x1361c
movl 0x58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x58(%rsp)
jmp 0x13576
jmp 0x1362e
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x13563
movl $0x0, 0x50(%rsp)
cmpl $0x5, 0x50(%rsp)
jae 0x13698
movl 0x50(%rsp), %eax
movl %eax, %esi
leaq 0xe0(%rsp), %rdi
callq 0xdde0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0xe230
movl 0x50(%rsp), %eax
movl %eax, %esi
leaq 0x78(%rsp), %rdi
callq 0xdde0
movq (%rax), %rcx
shrq %rcx
movq %rcx, (%rax)
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x13646
jmp 0x1369a
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x13549
leaq 0x78(%rsp), %rdi
callq 0xdfc0
leaq 0xe0(%rsp), %rdi
callq 0xdfc0
addq $0x108, %rsp            # imm = 0x108
retq
movq 0xd0(%rsp), %rdi
callq 0xe7c0
nopw %cs:(%rax,%rax)