// File: /workspace/github_c_makefile_star2_O2/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:
movl %edx, %ecx
xorl %eax, %eax
leaq 0x8(%rax), %r8
cmpq %rcx, %r8
ja 0x592a
movq (%rsi,%rax,8), %r9
xorq %r9, (%rdi,%rax,8)
movq 0x8(%rsi,%rax,8), %r9
xorq %r9, 0x8(%rdi,%rax,8)
movq 0x10(%rsi,%rax,8), %r9
xorq %r9, 0x10(%rdi,%rax,8)
movq 0x18(%rsi,%rax,8), %r9
xorq %r9, 0x18(%rdi,%rax,8)
movq 0x20(%rsi,%rax,8), %r9
xorq %r9, 0x20(%rdi,%rax,8)
movq 0x28(%rsi,%rax,8), %r9
xorq %r9, 0x28(%rdi,%rax,8)
movq 0x30(%rsi,%rax,8), %r9
xorq %r9, 0x30(%rdi,%rax,8)
movq 0x38(%rsi,%rax,8), %r9
xorq %r9, 0x38(%rdi,%rax,8)
movq %r8, %rax
jmp 0x589a
movl %eax, %r8d
movq (%rsi,%r8,8), %r9
xorq %r9, (%rdi,%r8,8)
leal 0x1(%rax), %r8d
movq (%rsi,%r8,8), %r9
xorq %r9, (%rdi,%r8,8)
leal 0x2(%rax), %r8d
movq (%rsi,%r8,8), %r9
xorq %r9, (%rdi,%r8,8)
addl $0x3, %eax
movq (%rsi,%rax,8), %r8
xorq %r8, (%rdi,%rax,8)
movl %ecx, %eax
leal 0x4(%rax), %ecx
cmpl %edx, %ecx
jbe 0x58fa
jmp 0x5947
movq (%rsi,%r8,8), %r9
xorq %r9, (%rdi,%r8,8)
incl %eax
movq (%rsi,%rax,8), %r8
xorq %r8, (%rdi,%rax,8)
movl %ecx, %eax
leal 0x2(%rax), %ecx
movl %eax, %r8d
cmpl %edx, %ecx
jbe 0x5933
cmpl %edx, %eax
jae 0x595d
movq (%rsi,%r8,8), %rax
xorq %rax, (%rdi,%r8,8)
retq