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

    if (offsetInLane < 4) {
        low = (UINT32)byte << (offsetInLane*8);
        high = 0;
    }
    else {
        low = 0;
        high = (UINT32)byte << ((offsetInLane-4)*8);
    }
    toBitInterleavingAndXOR(low, high, stateAsHalfLanes[lanePosition*2+0], stateAsHalfLanes[lanePosition*2+1], temp, temp0, temp1);
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movl %edx, -0x10(%rsp)
movl -0x10(%rsp), %eax
shrl $0x3, %eax
movl %eax, -0x14(%rsp)
movl -0x10(%rsp), %eax
andl $0x7, %eax
movl %eax, -0x18(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x38(%rsp)
cmpl $0x4, -0x18(%rsp)
jae 0x5af3
movzbl -0x9(%rsp), %eax
movl -0x18(%rsp), %ecx
shll $0x3, %ecx
shll %cl, %eax
movl %eax, -0x1c(%rsp)
movl $0x0, -0x20(%rsp)
jmp 0x5b10
movl $0x0, -0x1c(%rsp)
movzbl -0x9(%rsp), %eax
movl -0x18(%rsp), %ecx
subl $0x4, %ecx
shll $0x3, %ecx
shll %cl, %eax
movl %eax, -0x20(%rsp)
movl -0x1c(%rsp), %eax
movl %eax, -0x28(%rsp)
movl -0x28(%rsp), %eax
movl -0x28(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, -0x24(%rsp)
movl -0x28(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, -0x28(%rsp)
movl -0x28(%rsp), %eax
movl -0x28(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, -0x24(%rsp)
movl -0x28(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, -0x28(%rsp)
movl -0x28(%rsp), %eax
movl -0x28(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, -0x24(%rsp)
movl -0x28(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, -0x28(%rsp)
movl -0x28(%rsp), %eax
movl -0x28(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, -0x24(%rsp)
movl -0x28(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x28(%rsp)
movl -0x20(%rsp), %eax
movl %eax, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shrl %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0x22222222, %rax       # imm = 0x22222222
movl %eax, -0x24(%rsp)
movl -0x2c(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll %ecx
xorl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shrl $0x2, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xc0c0c0c, %rax        # imm = 0xC0C0C0C
movl %eax, -0x24(%rsp)
movl -0x2c(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x2, %ecx
xorl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shrl $0x4, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xf000f0, %rax         # imm = 0xF000F0
movl %eax, -0x24(%rsp)
movl -0x2c(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x4, %ecx
xorl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x2c(%rsp), %eax
movl -0x2c(%rsp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, %eax
andq $0xff00, %rax           # imm = 0xFF00
movl %eax, -0x24(%rsp)
movl -0x2c(%rsp), %eax
xorl -0x24(%rsp), %eax
movl -0x24(%rsp), %ecx
shll $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x2c(%rsp)
movl -0x28(%rsp), %edx
andl $0xffff, %edx           # imm = 0xFFFF
movl -0x2c(%rsp), %eax
shll $0x10, %eax
orl %eax, %edx
movq -0x38(%rsp), %rax
movl -0x14(%rsp), %ecx
shll %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
movl -0x28(%rsp), %edx
shrl $0x10, %edx
movl -0x2c(%rsp), %eax
andl $0xffff0000, %eax       # imm = 0xFFFF0000
orl %eax, %edx
movq -0x38(%rsp), %rax
movl -0x14(%rsp), %ecx
shll %ecx
addl $0x1, %ecx
movl %ecx, %ecx
xorl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
retq
nop