// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/SandyBridge/KeccakP-1600-times2-SIMD128.c
// Function: KeccakP1600times2_AddLanesAll
void KeccakP1600times2_AddLanesAll(void *states, const unsigned char *data, unsigned int laneCount, unsigned int laneOffset)
{
    V128 *stateAsLanes = states;
    unsigned int i;
    const UINT64 *curData0 = (const UINT64 *)data;
    const UINT64 *curData1 = (const UINT64 *)(data+laneOffset*SnP_laneLengthInBytes);
    #define XOR_In( argIndex )  XOReq128( stateAsLanes[argIndex], LOAD6464(curData1[argIndex], curData0[argIndex]))
    if ( laneCount >= 17 )  {
        XOR_In( 0 );
        XOR_In( 1 );
        XOR_In( 2 );
        XOR_In( 3 );
        XOR_In( 4 );
        XOR_In( 5 );
        XOR_In( 6 );
        XOR_In( 7 );
        XOR_In( 8 );
        XOR_In( 9 );
        XOR_In( 10 );
        XOR_In( 11 );
        XOR_In( 12 );
        XOR_In( 13 );
        XOR_In( 14 );
        XOR_In( 15 );
        XOR_In( 16 );
        if ( laneCount >= 21 )  {
            XOR_In( 17 );
            XOR_In( 18 );
            XOR_In( 19 );
            XOR_In( 20 );
            for(i=21; i<laneCount; i++)
                XOR_In( i );
        }
        else {
            for(i=17; i<laneCount; i++)
                XOR_In( i );
        }
    }
    else {
        for(i=0; i<laneCount; i++)
            XOR_In( i );
    }
    #undef  XOR_In
}

// Assembly:
shll $0x3, %ecx
addq %rsi, %rcx
cmpl $0x10, %edx
jbe 0x12d71
vmovsd (%rcx), %xmm0
vmovsd (%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps (%rdi), %xmm0, %xmm0
vmovaps %xmm0, (%rdi)
vmovsd 0x8(%rcx), %xmm0
vmovsd 0x8(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x10(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x10(%rdi)
vmovsd 0x10(%rcx), %xmm0
vmovsd 0x10(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x20(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x20(%rdi)
vmovsd 0x18(%rcx), %xmm0
vmovsd 0x18(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x30(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x30(%rdi)
vmovsd 0x20(%rcx), %xmm0
vmovsd 0x20(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x40(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x40(%rdi)
vmovsd 0x28(%rcx), %xmm0
vmovsd 0x28(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x50(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x50(%rdi)
vmovsd 0x30(%rcx), %xmm0
vmovsd 0x30(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x60(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x60(%rdi)
vmovsd 0x38(%rcx), %xmm0
vmovsd 0x38(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x70(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x70(%rdi)
vmovsd 0x40(%rcx), %xmm0
vmovsd 0x40(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x80(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x80(%rdi)
vmovsd 0x48(%rcx), %xmm0
vmovsd 0x48(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x90(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x90(%rdi)
vmovsd 0x50(%rcx), %xmm0
vmovsd 0x50(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xa0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xa0(%rdi)
vmovsd 0x58(%rcx), %xmm0
vmovsd 0x58(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xb0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xb0(%rdi)
vmovsd 0x60(%rcx), %xmm0
vmovsd 0x60(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xc0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xc0(%rdi)
vmovsd 0x68(%rcx), %xmm0
vmovsd 0x68(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xd0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xd0(%rdi)
vmovsd 0x70(%rcx), %xmm0
vmovsd 0x70(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xe0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xe0(%rdi)
vmovsd 0x78(%rcx), %xmm0
vmovsd 0x78(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0xf0(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0xf0(%rdi)
vmovsd 0x80(%rcx), %xmm0
vmovsd 0x80(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x100(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x100(%rdi)
cmpl $0x14, %edx
jbe 0x12da0
vmovsd 0x88(%rcx), %xmm0
vmovsd 0x88(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x110(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x110(%rdi)
vmovsd 0x90(%rcx), %xmm0
vmovsd 0x90(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x120(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x120(%rdi)
vmovsd 0x98(%rcx), %xmm0
vmovsd 0x98(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x130(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x130(%rdi)
vmovsd 0xa0(%rcx), %xmm0
vmovsd 0xa0(%rsi), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps 0x140(%rdi), %xmm0, %xmm0
vmovaps %xmm0, 0x140(%rdi)
cmpl $0x15, %edx
je 0x12dd5
movl %edx, %eax
addq $0x150, %rdi            # imm = 0x150
movl $0x15, %edx
vmovsd (%rcx,%rdx,8), %xmm0
vmovsd (%rsi,%rdx,8), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps (%rdi), %xmm0, %xmm0
vmovaps %xmm0, (%rdi)
incq %rdx
addq $0x10, %rdi
cmpq %rdx, %rax
jne 0x12d4d
jmp 0x12dd5
testl %edx, %edx
je 0x12dd5
movl %edx, %eax
shlq $0x3, %rax
xorl %edx, %edx
vmovsd (%rcx,%rdx), %xmm0
vmovsd (%rsi,%rdx), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps (%rdi,%rdx,2), %xmm0, %xmm0
vmovaps %xmm0, (%rdi,%rdx,2)
addq $0x8, %rdx
cmpq %rdx, %rax
jne 0x12d7d
jmp 0x12dd5
cmpl $0x11, %edx
je 0x12dd5
movl %edx, %eax
addq $0x110, %rdi            # imm = 0x110
movl $0x11, %edx
vmovsd (%rcx,%rdx,8), %xmm0
vmovsd (%rsi,%rdx,8), %xmm1
vmovlhps %xmm0, %xmm1, %xmm0     # xmm0 = xmm1[0],xmm0[0]
vxorps (%rdi), %xmm0, %xmm0
vmovaps %xmm0, (%rdi)
incq %rdx
addq $0x10, %rdi
cmpq %rdx, %rax
jne 0x12db3
retq