// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/generic32/KeccakP-1600-inplace32BI.c
// Function: KeccakP1600_AddBytesInLane
void KeccakP1600_AddBytesInLane(void *state, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
    UINT8 laneAsBytes[8];
    UINT32 low, high;
    UINT32 temp, temp0, temp1;
    UINT32 *stateAsHalfLanes = (UINT32*)state;

    memset(laneAsBytes, 0, 8);
    memcpy(laneAsBytes+offset, data, length);
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    low = *((UINT32*)(laneAsBytes+0));
    high = *((UINT32*)(laneAsBytes+4));
#else
    low = laneAsBytes[0]
        | ((UINT32)(laneAsBytes[1]) << 8)
        | ((UINT32)(laneAsBytes[2]) << 16)
        | ((UINT32)(laneAsBytes[3]) << 24);
    high = laneAsBytes[4]
        | ((UINT32)(laneAsBytes[5]) << 8)
        | ((UINT32)(laneAsBytes[6]) << 16)
        | ((UINT32)(laneAsBytes[7]) << 24);
#endif
    toBitInterleavingAndXOR(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movl %ecx, 0x2c(%rsp)
movl %r8d, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x5080
leaq 0x20(%rsp), %rdi
movl 0x2c(%rsp), %eax
addq %rax, %rdi
movq 0x30(%rsp), %rsi
movl 0x28(%rsp), %eax
movl %eax, %edx
callq 0x56e0
movl 0x20(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, 0x10(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0xc(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, 0x14(%rsp)
movl 0xc(%rsp), %eax
xorl 0x14(%rsp), %eax
movl 0x14(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %edx
andl $0xffff, %edx           # imm = 0xFFFF
movl 0xc(%rsp), %eax
shll $0x10, %eax
orl %eax, %edx
movq (%rsp), %rax
movl 0x3c(%rsp), %ecx
shll %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl 0x10(%rsp), %edx
shrl $0x10, %edx
movl 0xc(%rsp), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
orl %eax, %edx
movq (%rsp), %rax
movl 0x3c(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movl %ecx, %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)