// File: /workspace/github_c_makefile_star2_O2/ugobas[P]tnm/interactions_tnm.c
// Function: Check_store_HB
int Check_store_HB(struct interaction *Int_list, int *N_int,
		   atom *atoms, int i_AA, int i_A, int i_D, int rA,
		   float d2)
{
  float cos_tau=Bond_angle(atoms[i_AA].r, atoms[i_A].r, atoms[i_D].r);
  if(cos_tau > COS_DAA)return(0);
  float d_DAA=Dist2(atoms[i_AA].r, atoms[i_D].r);
  Int_list[*N_int].type=1;   Int_list[*N_int].sec_der=1;
  Int_list[*N_int].r0=sqrt(d_DAA); 
  if(rA==1){
    Int_list[*N_int].i1=i_AA; Int_list[*N_int].i2=i_D;
  }else{
    Int_list[*N_int].i1=i_D;  Int_list[*N_int].i2=i_AA;
  }
  (*N_int)++;
  Int_list[*N_int].type=2; Int_list[*N_int].sec_der=ENE_HB;
  if(rA==1){
    Int_list[*N_int].i1=i_A; Int_list[*N_int].i2=i_D;
  }else{
    Int_list[*N_int].i1=i_D; Int_list[*N_int].i2=i_A;
  }
  Int_list[*N_int].r0=sqrt(d2);
  (*N_int)++;
  return(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movss %xmm0, 0xc(%rsp)
movl %r9d, %r15d
movl %ecx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
movslq %ecx, %rax
imulq $0x70, %rax, %r13
addq %rdx, %r13
movslq %r9d, %rax
imulq $0x70, %rax, %rbp
addq %rdx, %rbp
testq %rdx, %rdx
je 0x17791
movslq %r8d, %rax
imulq $0x70, %rax, %rax
movsd (%r13), %xmm0
movsd 0x8(%r13), %xmm2
movhpd (%rbp), %xmm0           # xmm0 = xmm0[0],mem[0]
movsd 0x10(%r13), %xmm1
movsd (%rdx,%rax), %xmm3
movsd 0x8(%rdx,%rax), %xmm4
movsd 0x10(%rdx,%rax), %xmm5
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
subpd %xmm3, %xmm0
movhpd 0x8(%rbp), %xmm2        # xmm2 = xmm2[0],mem[0]
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
subpd %xmm4, %xmm2
movhpd 0x10(%rbp), %xmm1       # xmm1 = xmm1[0],mem[0]
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
subpd %xmm5, %xmm1
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
mulsd %xmm2, %xmm3
movapd %xmm0, %xmm4
unpckhpd %xmm0, %xmm4            # xmm4 = xmm4[1],xmm0[1]
mulsd %xmm0, %xmm4
addsd %xmm3, %xmm4
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
mulsd %xmm1, %xmm3
addsd %xmm4, %xmm3
mulpd %xmm2, %xmm2
mulpd %xmm0, %xmm0
addpd %xmm2, %xmm0
mulpd %xmm1, %xmm1
addpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x17796
sqrtsd %xmm0, %xmm0
jmp 0x177bd
xorps %xmm0, %xmm0
jmp 0x177c5
movl %r12d, 0x8(%rsp)
movl %r15d, %r12d
movl %r8d, %r15d
movapd %xmm3, 0x10(%rsp)
callq 0x2290
movapd 0x10(%rsp), %xmm3
movl %r15d, %r8d
movl %r12d, %r15d
movl 0x8(%rsp), %r12d
divsd %xmm0, %xmm3
cvtsd2ss %xmm3, %xmm0
leaq 0x4be2c(%rip), %rcx     # 0x635f8
xorl %eax, %eax
ucomiss (%rcx), %xmm0
ja 0x178ee
movl %r8d, 0x8(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x1799d
movslq (%rbx), %rax
imulq $0xc8, %rax, %rax
movl $0x1, 0xc0(%r14,%rax)
movslq (%rbx), %rax
imulq $0xc8, %rax, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x28(%r14,%rax)
cvtss2sd %xmm0, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1782a
sqrtsd %xmm0, %xmm0
jmp 0x17833
callq 0x2290
xorpd %xmm1, %xmm1
movl 0x8(%rsp), %esi
movslq (%rbx), %rax
imulq $0xc8, %rax, %rax
cmpl $0x1, 0x60(%rsp)
movl %r15d, %ecx
cmovel %r12d, %ecx
cmovel %r15d, %r12d
movsd %xmm0, 0x20(%r14,%rax)
movl %ecx, (%r14,%rax)
movslq (%rbx), %rax
movl %r15d, %ecx
cmovel %esi, %ecx
cmovel %r15d, %esi
imulq $0xc8, %rax, %rax
movl %r12d, 0x4(%r14,%rax)
movslq (%rbx), %rax
leal 0x1(%rax), %edx
movl %edx, (%rbx)
imulq $0xc8, %rax, %rax
movl $0x2, 0x188(%rax,%r14)
leaq 0x4bd59(%rip), %rax     # 0x635f0
cvtss2sd (%rax), %xmm0
movslq (%rbx), %rax
imulq $0xc8, %rax, %rax
movsd %xmm0, 0x28(%r14,%rax)
movl %ecx, (%r14,%rax)
movslq (%rbx), %rax
imulq $0xc8, %rax, %rax
movl %esi, 0x4(%r14,%rax)
cvtss2sd 0xc(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x178d1
sqrtsd %xmm0, %xmm0
jmp 0x178d6
callq 0x2290
movslq (%rbx), %rax
imulq $0xc8, %rax, %rcx
movsd %xmm0, 0x20(%r14,%rcx)
incl %eax
movl %eax, (%rbx)
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq