// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/generic32/KeccakP-1600-inplace32BI.c
// Function: KeccakP1600_ExtractLanes
void KeccakP1600_ExtractLanes(const void *state, unsigned char *data, unsigned int laneCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    UINT32 * pI = (UINT32 *)data;
    const UINT32 * pS = ( const UINT32 *)state;
    UINT32 t, x0, x1;
    int i;
    for (i = laneCount-1; i >= 0; --i) {
#ifdef NO_MISALIGNED_ACCESSES
        UINT32 low;
        UINT32 high;
        fromBitInterleaving(*(pS++), *(pS++), low, high, t, x0, x1);
        memcpy(pI++, &low, 4);
        memcpy(pI++, &high, 4);
#else
        fromBitInterleaving(*(pS++), *(pS++), *(pI++), *(pI++), t, x0, x1)
#endif
    }
#else
    unsigned int lanePosition;
    for(lanePosition=0; lanePosition<laneCount; lanePosition++) {
        UINT32 *stateAsHalfLanes = (UINT32*)state;
        UINT32 low, high, temp, temp0, temp1;
        fromBitInterleaving(stateAsHalfLanes[lanePosition*2], stateAsHalfLanes[lanePosition*2+1], low, high, temp, temp0, temp1);
        UINT8 laneAsBytes[8];
        laneAsBytes[0] = low & 0xFF;
        laneAsBytes[1] = (low >> 8) & 0xFF;
        laneAsBytes[2] = (low >> 16) & 0xFF;
        laneAsBytes[3] = (low >> 24) & 0xFF;
        laneAsBytes[4] = high & 0xFF;
        laneAsBytes[5] = (high >> 8) & 0xFF;
        laneAsBytes[6] = (high >> 16) & 0xFF;
        laneAsBytes[7] = (high >> 24) & 0xFF;
        memcpy(data+lanePosition*8, laneAsBytes, 8);
    }
#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 0x6b35
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rsp)
movl (%rax), %eax
movl %eax, -0x30(%rsp)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x28(%rsp)
movl (%rax), %eax
movl %eax, -0x34(%rsp)
movl -0x30(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl -0x34(%rsp), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x30(%rsp), %eax
shrl $0x10, %eax
movl -0x34(%rsp), %ecx
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %ecx, %eax
movl %eax, -0x34(%rsp)
movl -0x2c(%rsp), %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)
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 $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 %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 -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 -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 $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 %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 -0x30(%rsp), %ecx
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x20(%rsp)
movl %ecx, (%rax)
movl -0x34(%rsp), %ecx
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x20(%rsp)
movl %ecx, (%rax)
movl -0x38(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x38(%rsp)
jmp 0x691d
retq
nopw %cs:(%rax,%rax)