// File: 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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq 0xb4e8c0(%rax), %rax
movl 0x3214(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
imull -0x18(%rbp), %ecx
imull -0x18(%rbp), %ecx
cmpl %ecx, %eax
jge 0x6228
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %esi
leaq -0xc(%rbp), %rdx
leaq -0x10(%rbp), %rcx
leaq -0x14(%rbp), %r8
callq 0x5c70
movq -0x28(%rbp), %rdi
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x28(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x2c(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x30(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x34(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x38(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x3c(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x40(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x44(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x48(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
subl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4c(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x54(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x58(%rax)
movl -0xc(%rbp), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x5c(%rax)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movq -0x28(%rbp), %rdi
movl %eax, %ecx
movq 0x18(%rdi), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x60(%rax)
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
addl $0x1, %edx
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
callq 0x5cd0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rdx
imulq $0x68, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x64(%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5d6b
addq $0x30, %rsp
popq %rbp
retq
nop