// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/networkstorage.cc
// Function: ATOM_NETWORK::initialize()
void ATOM_NETWORK::initialize(){
  double tempd, talpha, tbeta, tgamma;
  talpha = 2*PI/360.0*alpha;
  tbeta  = 2*PI/360.0*beta;
  tgamma = 2*PI/360.0*gamma;
  double cosb = cos(tbeta);
  double cosg = cos(tgamma);
  double sing = sin(tgamma);
  tempd=(cos(talpha)-cosg*cosb)/sing;
  v_a.x=a;
  v_a.y=0.0;
  v_a.z=0.0;  
  v_b.x=b*cosg; 
  if(fabs(v_b.x) < TOLERANCE)
    v_b.x=0;  
  v_b.y=b*sing;
  v_b.z=0.0;  
  v_c.x=c*cosb;
  if(fabs(v_c.x) < TOLERANCE)
    v_c.x = 0;
  v_c.y=c*tempd;
  if(fabs(v_c.y) < TOLERANCE)
    v_c.y = 0;
  v_c.z=c*sqrt(1.0-(cosb*cosb)-(tempd*tempd));
  initMatrices();
  distanceCalculator = MIN_PER_DISTANCE(v_a.x, v_b.x, v_b.y, v_c.x, v_c.y, v_c.z);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movsd 0xfbd47(%rip), %xmm1    # 0x14db10
movsd 0x20(%rdi), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x28(%rdi), %xmm0
mulsd %xmm1, %xmm0
mulsd 0x30(%rdi), %xmm1
movsd %xmm1, (%rsp)
callq 0x4800
movapd %xmm0, 0xb0(%rsp)
movsd (%rsp), %xmm0
callq 0x4800
movaps %xmm0, 0xa0(%rsp)
movsd (%rsp), %xmm0
callq 0x4100
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x4800
movapd 0xa0(%rsp), %xmm5
movapd %xmm5, %xmm1
movapd 0xb0(%rsp), %xmm4
mulsd %xmm4, %xmm1
subsd %xmm1, %xmm0
movsd (%rsp), %xmm6
divsd %xmm6, %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movsd %xmm1, 0x38(%rbx)
xorps %xmm1, %xmm1
movups %xmm1, 0x40(%rbx)
mulsd %xmm2, %xmm5
movapd 0xfb232(%rip), %xmm1    # 0x14d0a0
movapd %xmm5, %xmm3
andpd %xmm1, %xmm3
cmpltsd 0x1008d1(%rip), %xmm3   # 0x152750
andnpd %xmm5, %xmm3
movlpd %xmm3, 0x50(%rbx)
movapd %xmm6, %xmm3
mulsd %xmm2, %xmm3
movsd %xmm3, 0x58(%rbx)
movq $0x0, 0x60(%rbx)
movsd 0x18(%rbx), %xmm5
movapd %xmm4, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
movapd %xmm5, %xmm3
unpcklpd %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0]
mulpd %xmm2, %xmm3
andpd %xmm3, %xmm1
cmpnltpd 0x10091d(%rip), %xmm1   # 0x1527e0
andpd %xmm3, %xmm1
movupd %xmm1, 0x68(%rbx)
movapd %xmm4, %xmm2
mulsd %xmm4, %xmm2
movsd 0xfb17c(%rip), %xmm1    # 0x14d058
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm0
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x51efb
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x51f0e
movapd %xmm1, %xmm0
movapd %xmm5, (%rsp)
callq 0x4350
movapd (%rsp), %xmm5
mulsd %xmm0, %xmm5
movsd %xmm5, 0x78(%rbx)
movq %rbx, %rdi
callq 0x52330
movsd 0x38(%rbx), %xmm0
movsd 0x50(%rbx), %xmm1
movsd 0x58(%rbx), %xmm2
movsd 0x68(%rbx), %xmm3
movsd 0x70(%rbx), %xmm4
movsd 0x78(%rbx), %xmm5
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x77b70
movq 0x340(%rbx), %rdi
movq 0x350(%rbx), %rsi
movaps (%r14), %xmm0
movups %xmm0, 0x340(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x350(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
testq %rdi, %rdi
je 0x51f8a
subq %rdi, %rsi
callq 0x4470
movq 0x358(%rbx), %rdi
movq 0x368(%rbx), %rsi
movups 0x38(%rsp), %xmm0
movups %xmm0, 0x358(%rbx)
movq 0x48(%rsp), %rax
movq %rax, 0x368(%rbx)
xorps %xmm1, %xmm1
movups %xmm1, 0x38(%rsp)
movq $0x0, 0x48(%rsp)
testq %rdi, %rdi
je 0x51fd1
subq %rdi, %rsi
callq 0x4470
xorps %xmm1, %xmm1
movq 0x370(%rbx), %rdi
movq 0x380(%rbx), %rsi
movaps 0x50(%rsp), %xmm0
movups %xmm0, 0x370(%rbx)
movq 0x60(%rsp), %rax
movq %rax, 0x380(%rbx)
movaps %xmm1, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
testq %rdi, %rdi
je 0x52052
subq %rdi, %rsi
callq 0x4470
movq 0x50(%rsp), %rdi
movups 0x88(%rsp), %xmm0
movups %xmm0, 0x3a8(%rbx)
movups 0x78(%rsp), %xmm0
movups %xmm0, 0x398(%rbx)
movups 0x68(%rsp), %xmm0
movups %xmm0, 0x388(%rbx)
testq %rdi, %rdi
je 0x52079
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x52079
movups 0x68(%rsp), %xmm0
movups 0x78(%rsp), %xmm1
movups 0x88(%rsp), %xmm2
movups %xmm2, 0x3a8(%rbx)
movups %xmm1, 0x398(%rbx)
movups %xmm0, 0x388(%rbx)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x52090
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x520a7
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0xc8, %rsp
popq %rbx
popq %r14
retq