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

    memset(laneAsBytes, 0xFF, offset);
    memset(laneAsBytes+offset, 0x00, length);
    memset(laneAsBytes+offset+length, 0xFF, 8-offset-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
    toBitInterleavingAndAND(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movl %edx, 0x28(%rsp)
movl %ecx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
leaq 0x1c(%rsp), %rdi
movl 0x28(%rsp), %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x5080
leaq 0x1c(%rsp), %rdi
movl 0x28(%rsp), %eax
addq %rax, %rdi
movl 0x24(%rsp), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x5080
leaq 0x1c(%rsp), %rdi
movl 0x28(%rsp), %eax
addq %rax, %rdi
movl 0x24(%rsp), %eax
addq %rax, %rdi
movl $0x8, %eax
subl 0x28(%rsp), %eax
subl 0x24(%rsp), %eax
movl %eax, %eax
movl %eax, %edx
movl $0xff, %esi
callq 0x5080
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x20(%rsp), %eax
movl %eax, 0x14(%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, 0x10(%rsp)
movl 0xc(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%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, 0x10(%rsp)
movl 0xc(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%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, 0x10(%rsp)
movl 0xc(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%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, 0x10(%rsp)
movl 0xc(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, 0xc(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x8(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, 0x10(%rsp)
movl 0x8(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x8(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, 0x10(%rsp)
movl 0x8(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x8(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, 0x10(%rsp)
movl 0x8(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl 0x8(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, 0x10(%rsp)
movl 0x8(%rsp), %eax
xorl 0x10(%rsp), %eax
movl 0x10(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %edx
andl $0xffff, %edx           # imm = 0xFFFF
movl 0x8(%rsp), %eax
shll $0x10, %eax
orl %eax, %edx
movq (%rsp), %rax
movl 0x2c(%rsp), %ecx
shll %ecx
addl $0x0, %ecx
movl %ecx, %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl 0xc(%rsp), %edx
shrl $0x10, %edx
movl 0x8(%rsp), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
orl %eax, %edx
movq (%rsp), %rax
movl 0x2c(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movl %ecx, %ecx
andl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
addq $0x38, %rsp
retq
nopw (%rax,%rax)