// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/generic32/KeccakP-1600-inplace32BI.c
// Function: KeccakP1600_AddLanes
void KeccakP1600_AddLanes(void *state, const unsigned char *data, unsigned int laneCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    const UINT32 * pI = (const UINT32 *)data;
    UINT32 * pS = (UINT32*)state;
    UINT32 t, x0, x1;
    int i;
    for (i = laneCount-1; i >= 0; --i) {
#ifdef NO_MISALIGNED_ACCESSES
        UINT32 low;
        UINT32 high;
        memcpy(&low, pI++, 4);
        memcpy(&high, pI++, 4);
        toBitInterleavingAndXOR(low, high, *(pS++), *(pS++), t, x0, x1);
#else
        toBitInterleavingAndXOR(*(pI++), *(pI++), *(pS++), *(pS++), t, x0, x1)
#endif
    }
#else
    unsigned int lanePosition;
    for(lanePosition=0; lanePosition<laneCount; lanePosition++) {
        UINT8 laneAsBytes[8];
        memcpy(laneAsBytes, data+lanePosition*8, 8);
        UINT32 low = laneAsBytes[0]
            | ((UINT32)(laneAsBytes[1]) << 8)
            | ((UINT32)(laneAsBytes[2]) << 16)
            | ((UINT32)(laneAsBytes[3]) << 24);
        UINT32 high = laneAsBytes[4]
            | ((UINT32)(laneAsBytes[5]) << 8)
            | ((UINT32)(laneAsBytes[6]) << 16)
            | ((UINT32)(laneAsBytes[7]) << 24);
        UINT32 even, odd, temp, temp0, temp1;
        UINT32 *stateAsHalfLanes = (UINT32*)state;
        toBitInterleavingAndXOR(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);
    }
#endif
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x28(%rsp)
movl -0x14(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x38(%rsp)
cmpl $0x0, -0x38(%rsp)
jl 0x6151
movq -0x20(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rsp)
movl (%rax), %eax
movl %eax, -0x30(%rsp)
movl -0x30(%rsp), %eax
movl -0x30(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, -0x2c(%rsp)
movl -0x30(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, -0x30(%rsp)
movl -0x30(%rsp), %eax
movl -0x30(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, -0x2c(%rsp)
movl -0x30(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, -0x30(%rsp)
movl -0x30(%rsp), %eax
movl -0x30(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, -0x2c(%rsp)
movl -0x30(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, -0x30(%rsp)
movl -0x30(%rsp), %eax
movl -0x30(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, -0x2c(%rsp)
movl -0x30(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x30(%rsp)
movq -0x20(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x20(%rsp)
movl (%rax), %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
movl -0x34(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, -0x2c(%rsp)
movl -0x34(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
movl -0x34(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, -0x2c(%rsp)
movl -0x34(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
movl -0x34(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, -0x2c(%rsp)
movl -0x34(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, -0x34(%rsp)
movl -0x34(%rsp), %eax
movl -0x34(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, -0x2c(%rsp)
movl -0x34(%rsp), %eax
xorl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x34(%rsp)
movl -0x30(%rsp), %ecx
andl $0xffff, %ecx           # imm = 0xFFFF
movl -0x34(%rsp), %eax
shll $0x10, %eax
orl %eax, %ecx
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rsp)
xorl (%rax), %ecx
movl %ecx, (%rax)
movl -0x30(%rsp), %ecx
shrl $0x10, %ecx
movl -0x34(%rsp), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
orl %eax, %ecx
movq -0x28(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x28(%rsp)
xorl (%rax), %ecx
movl %ecx, (%rax)
movl -0x38(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rsp)
jmp 0x5f4d
retq
nopw %cs:(%rax,%rax)