// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/icepole128v2/ref/icepole.c
// Function: Psi
void Psi(ICESTATE SS, ICESTATE S)
{
    unsigned int x;
    for (x = 0; x < 4; ++x) {
        uint64_t tmp1 = S[x][0] & S[x][1] & S[x][2] & S[x][3] & S[x][4];
        uint64_t tmp2 = (~S[x][0]) & (~S[x][1]) & (~S[x][2]) & (~S[x][3]) & (~S[x][4]);
        SS[x][0] = S[x][0] ^ ((~S[x][1]) & S[x][2]) ^ tmp1 ^ tmp2;
        SS[x][1] = S[x][1] ^ ((~S[x][2]) & S[x][3]) ^ tmp1 ^ tmp2;
        SS[x][2] = S[x][2] ^ ((~S[x][3]) & S[x][4]) ^ tmp1 ^ tmp2;
        SS[x][3] = S[x][3] ^ ((~S[x][4]) & S[x][0]) ^ tmp1 ^ tmp2;
        SS[x][4] = S[x][4] ^ ((~S[x][0]) & S[x][1]) ^ tmp1 ^ tmp2;
    }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
cmpl $0x4, -0x14(%rsp)
jae 0x232e
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
andq 0x8(%rcx), %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
andq 0x10(%rcx), %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
andq 0x18(%rcx), %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
andq 0x20(%rcx), %rax
movq %rax, -0x20(%rsp)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq -0x10(%rsp), %rcx
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movq 0x20(%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq 0x8(%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rdx
movl -0x14(%rsp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
andq 0x10(%rdx), %rax
xorq %rax, %rcx
xorq -0x20(%rsp), %rcx
xorq -0x28(%rsp), %rcx
movq -0x8(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq 0x10(%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rdx
movl -0x14(%rsp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
andq 0x18(%rdx), %rax
xorq %rax, %rcx
xorq -0x20(%rsp), %rcx
xorq -0x28(%rsp), %rcx
movq -0x8(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq 0x18(%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rdx
movl -0x14(%rsp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
andq 0x20(%rdx), %rax
xorq %rax, %rcx
xorq -0x20(%rsp), %rcx
xorq -0x28(%rsp), %rcx
movq -0x8(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rcx
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq 0x20(%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rdx
movl -0x14(%rsp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
andq (%rdx), %rax
xorq %rax, %rcx
xorq -0x20(%rsp), %rcx
xorq -0x28(%rsp), %rcx
movq -0x8(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %ecx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rcx
movq -0x10(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq (%rax), %rax
xorq $-0x1, %rax
movq -0x10(%rsp), %rdx
movl -0x14(%rsp), %esi
imulq $0x28, %rsi, %rsi
addq %rsi, %rdx
andq 0x8(%rdx), %rax
xorq %rax, %rcx
xorq -0x20(%rsp), %rcx
xorq -0x28(%rsp), %rcx
movq -0x8(%rsp), %rax
movl -0x14(%rsp), %edx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x2042
retq
nop