// File: /workspace/github_c_makefile_star2_O0/mjosaarinen[P]brutus/crypto_aead/oceankeyakv2/generic64lc/KeccakP-1600-opt64.c
// Function: KeccakP1600_AddLanes
void KeccakP1600_AddLanes(void *state, const unsigned char *data, unsigned int laneCount)
{
#if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    unsigned int i = 0;
#ifdef NO_MISALIGNED_ACCESSES
    /* If either pointer is misaligned, fall back to byte-wise xor. */
    if (((((uintptr_t)state) & 7) != 0) || ((((uintptr_t)data) & 7) != 0)) {
      for (i = 0; i < laneCount * 8; i++) {
        ((unsigned char*)state)[i] ^= data[i];
      }
    }
    else
#endif
    {
      /* Otherwise... */
      for( ; (i+8)<=laneCount; i+=8) {
          ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0];
          ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1];
          ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2];
          ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3];
          ((UINT64*)state)[i+4] ^= ((UINT64*)data)[i+4];
          ((UINT64*)state)[i+5] ^= ((UINT64*)data)[i+5];
          ((UINT64*)state)[i+6] ^= ((UINT64*)data)[i+6];
          ((UINT64*)state)[i+7] ^= ((UINT64*)data)[i+7];
      }
      for( ; (i+4)<=laneCount; i+=4) {
          ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0];
          ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1];
          ((UINT64*)state)[i+2] ^= ((UINT64*)data)[i+2];
          ((UINT64*)state)[i+3] ^= ((UINT64*)data)[i+3];
      }
      for( ; (i+2)<=laneCount; i+=2) {
          ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0];
          ((UINT64*)state)[i+1] ^= ((UINT64*)data)[i+1];
      }
      if (i<laneCount) {
          ((UINT64*)state)[i+0] ^= ((UINT64*)data)[i+0];
      }
    }
#else
    unsigned int i;
    UINT8 *curData = data;
    for(i=0; i<laneCount; i++, curData+=8) {
        UINT64 lane = (UINT64)curData[0]
            | ((UINT64)curData[1] << 8)
            | ((UINT64)curData[2] << 16)
            | ((UINT64)curData[3] << 24)
            | ((UINT64)curData[4] <<32)
            | ((UINT64)curData[5] << 40)
            | ((UINT64)curData[6] << 48)
            | ((UINT64)curData[7] << 56);
        ((UINT64*)state)[i] ^= lane;
    }
#endif
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl %edx, -0x14(%rsp)
movl $0x0, -0x18(%rsp)
movl -0x18(%rsp), %eax
addl $0x8, %eax
cmpl -0x14(%rsp), %eax
ja 0x5a67
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x4, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x5, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x5, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x6, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x6, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x7, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x7, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x18(%rsp)
jmp 0x5906
jmp 0x5a69
movl -0x18(%rsp), %eax
addl $0x4, %eax
cmpl -0x14(%rsp), %eax
ja 0x5b2a
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rsp), %eax
addl $0x4, %eax
movl %eax, -0x18(%rsp)
jmp 0x5a69
jmp 0x5b2c
movl -0x18(%rsp), %eax
addl $0x2, %eax
cmpl -0x14(%rsp), %eax
ja 0x5b96
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x18(%rsp), %eax
addl $0x2, %eax
movl %eax, -0x18(%rsp)
jmp 0x5b2c
movl -0x18(%rsp), %eax
cmpl -0x14(%rsp), %eax
jae 0x5bc8
movq -0x10(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rsp), %rax
movl -0x18(%rsp), %ecx
addl $0x0, %ecx
movl %ecx, %ecx
xorq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
retq
nopl (%rax)