// File: /workspace/github_cpp_makefile_star2_O2/WolfgangLechner[P]StructureAnalysis/molecular_system.cpp
// Function: CMolecularSystem::fillNeighborCells()
void CMolecularSystem::fillNeighborCells()
{
  int x,y,z;
  int noc;
  noc = this->parameter->noc;
  for (int ci = 0;ci<noc*noc*noc;ci++)
  {
    this->convertIndex(ci,x, y, z);
    neighborcells[ci].neighbors[0] = convertIndexToCell(x-1,y-1,z-1);
    neighborcells[ci].neighbors[1] = convertIndexToCell(x  ,y-1,z-1);
    neighborcells[ci].neighbors[2] = convertIndexToCell(x+1,y-1,z-1);

    neighborcells[ci].neighbors[3] = convertIndexToCell(x-1,y  ,z-1);
    neighborcells[ci].neighbors[4] = convertIndexToCell(x  ,y  ,z-1);
    neighborcells[ci].neighbors[5] = convertIndexToCell(x+1,y  ,z-1);

    neighborcells[ci].neighbors[6] = convertIndexToCell(x-1,y+1,z-1);
    neighborcells[ci].neighbors[7] = convertIndexToCell(x  ,y+1,z-1);
    neighborcells[ci].neighbors[8] = convertIndexToCell(x+1,y+1,z-1);

    neighborcells[ci].neighbors[9]  = convertIndexToCell(x-1,y-1,z);
    neighborcells[ci].neighbors[10] = convertIndexToCell(x  ,y-1,z);
    neighborcells[ci].neighbors[11] = convertIndexToCell(x+1,y-1,z);

    neighborcells[ci].neighbors[12] = convertIndexToCell(x-1,y  ,z);
    neighborcells[ci].neighbors[13] = convertIndexToCell(x+1,y  ,z);
    neighborcells[ci].neighbors[14] = convertIndexToCell(x-1,y+1,z);
    neighborcells[ci].neighbors[15] = convertIndexToCell(x  ,y+1,z);
    neighborcells[ci].neighbors[16] = convertIndexToCell(x+1,y+1,z);

    neighborcells[ci].neighbors[17] = convertIndexToCell(x-1,y-1,z+1);
    neighborcells[ci].neighbors[18] = convertIndexToCell(x  ,y-1,z+1);
    neighborcells[ci].neighbors[19] = convertIndexToCell(x+1,y-1,z+1);

    neighborcells[ci].neighbors[20] = convertIndexToCell(x-1,y  ,z+1);
    neighborcells[ci].neighbors[21] = convertIndexToCell(x  ,y  ,z+1);
    neighborcells[ci].neighbors[22] = convertIndexToCell(x+1,y  ,z+1);

    neighborcells[ci].neighbors[23] = convertIndexToCell(x-1,y+1,z+1);
    neighborcells[ci].neighbors[24] = convertIndexToCell(x  ,y+1,z+1);
    neighborcells[ci].neighbors[25] = convertIndexToCell(x+1,y+1,z+1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq 0xb4e8c0(%rdi), %rax
movq %rax, -0x70(%rbp)
movl 0x3214(%rax), %eax
movl %eax, %ecx
imull %ecx, %ecx
imull %eax, %ecx
movq %rdi, -0x68(%rbp)
movq 0x18(%rdi), %rbx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movq %rcx, -0x78(%rbp)
addq $0x64, %rbx
movq -0x68(%rbp), %r14
cmpq %rdx, -0x78(%rbp)
je 0x3f7b
movq -0x70(%rbp), %rax
movl 0x3214(%rax), %ecx
movl %edx, %eax
movq %rdx, -0x60(%rbp)
cltd
idivl %ecx
movl %edx, %r15d
cltd
idivl %ecx
movl %edx, %edi
movq %rdi, -0x50(%rbp)
imull %ecx, %ecx
movq -0x60(%rbp), %rax
xorl %edx, %edx
divl %ecx
movq %rax, -0x58(%rbp)
leal -0x1(%r15), %esi
movl %esi, -0x30(%rbp)
leal -0x1(%rdi), %r12d
leal -0x1(%rax), %r13d
movq %r14, %rdi
movl %r12d, %edx
movl %r12d, -0x34(%rbp)
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x64(%rbx)
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x60(%rbx)
leal 0x1(%r15), %esi
movl %esi, -0x2c(%rbp)
movq %r14, %rdi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x5c(%rbx)
movq %r14, %rdi
movl -0x30(%rbp), %esi
movq -0x50(%rbp), %r12
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x58(%rbx)
movq %r14, %rdi
movq %r15, -0x40(%rbp)
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x54(%rbx)
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x50(%rbx)
incl %r12d
movq %r14, %rdi
movl -0x30(%rbp), %esi
movl %r12d, %edx
movl %r12d, -0x44(%rbp)
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x4c(%rbx)
movq %r14, %rdi
movl %r15d, %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x48(%rbx)
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movl %r12d, %edx
movl %r13d, %ecx
callq 0x3c42
movl %eax, -0x44(%rbx)
movq %r14, %rdi
movl -0x30(%rbp), %r13d
movl %r13d, %esi
movl -0x34(%rbp), %r15d
movl %r15d, %edx
movq -0x58(%rbp), %r12
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x40(%rbx)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x3c(%rbx)
movq %r14, %rdi
movl -0x2c(%rbp), %r12d
movl %r12d, %esi
movl %r15d, %edx
movq -0x58(%rbp), %r15
movl %r15d, %ecx
callq 0x3c42
movl %eax, -0x38(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movq -0x50(%rbp), %r13
movl %r13d, %edx
movl %r15d, %ecx
callq 0x3c42
movl %eax, -0x34(%rbx)
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
movq %r15, %r12
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x30(%rbx)
movq %r14, %rdi
movl -0x30(%rbp), %r13d
movl %r13d, %esi
movl -0x44(%rbp), %r15d
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x2c(%rbx)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x28(%rbx)
movq %r14, %rdi
movl -0x2c(%rbp), %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x24(%rbx)
incl %r12d
movq %r14, %rdi
movl %r13d, %r15d
movl %r13d, %esi
movl -0x34(%rbp), %r13d
movl %r13d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x20(%rbx)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r13d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x1c(%rbx)
movq %r14, %rdi
movl -0x2c(%rbp), %r13d
movl %r13d, %esi
movl -0x34(%rbp), %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x18(%rbx)
movq %r14, %rdi
movl %r15d, %esi
movq -0x50(%rbp), %r15
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x14(%rbx)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x10(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0xc(%rbx)
movq %r14, %rdi
movl -0x30(%rbp), %esi
movl -0x44(%rbp), %r15d
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x8(%rbx)
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movl %eax, -0x4(%rbx)
movq %r14, %rdi
movl %r13d, %esi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x3c42
movq -0x60(%rbp), %rdx
movl %eax, (%rbx)
incq %rdx
addq $0x68, %rbx
jmp 0x3ccb
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq