// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/simulation.c
// Function: Test_standard
int Test_standard(struct bond *bonds, int natoms){
  int n=0;
  for(int i=0; i<natoms; i++){
    struct bond *bond=bonds+i;
    if((bond->len>=0)||(bond->angle>=0))continue;  // exclude pseudo-bonds
    if(bond->previous==NULL)continue;
    int na=Atom_type(bond->atom->name);
    if((na<0)||(na>4))continue;
    float d1=bond->l-BB_length[na], d2;
    if(bond->previous->previous){
      d2=bond->r_cos_theta/bond->l-cos(BB_angle[na]);
    }else{
      d2=0;
    }
    if((fabs(d1)>0.01)||(fabs(d2)>0.01)){
      printf("WARNING %c%d %s %.3f %.3f\n",
	     bond->atom->aa, bond->atom->res+1, bond->atom->name, d1, d2);
      n++;
    }
  }
  if(n){
    printf("WARNING, %d errors in standardize bonds\n", n); return(n);
  }
  printf("Standard bonds successfully tested\n");
  return(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x53834
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jge 0x536d3
movq -0x28(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jl 0x536d8
jmp 0x53826
movq -0x28(%rbp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x536e8
jmp 0x53826
movq -0x28(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
callq 0x14250
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jl 0x53707
cmpl $0x4, -0x2c(%rbp)
jle 0x5370c
jmp 0x53826
movq -0x28(%rbp), %rax
movsd 0x58(%rax), %xmm0
movslq -0x2c(%rbp), %rcx
leaq 0x396f0(%rip), %rax     # 0x8ce10
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm1
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x5378c
movq -0x28(%rbp), %rax
movsd 0x60(%rax), %xmm0
movq -0x28(%rbp), %rax
divsd 0x58(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x396c9(%rip), %rax     # 0x8ce30
movss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1100
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
jmp 0x53794
xorps %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x28cec(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movsd 0x28c70(%rip), %xmm1    # 0x7c420
ucomisd %xmm1, %xmm0
ja 0x537d8
movss -0x34(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x28cca(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movsd 0x28c4e(%rip), %xmm1    # 0x7c420
ucomisd %xmm1, %xmm0
jbe 0x53824
movq -0x28(%rbp), %rax
movq (%rax), %rax
movsbl 0x68(%rax), %esi
movq -0x28(%rbp), %rax
movq (%rax), %rax
movl 0x64(%rax), %edx
addl $0x1, %edx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
addq $0x18, %rcx
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x34(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x2d7ac(%rip), %rdi     # 0x80fc0
movb $0x2, %al
callq 0x10d0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x53826
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x5369d
cmpl $0x0, -0x18(%rbp)
je 0x53853
movl -0x18(%rbp), %esi
leaq 0x2d797(%rip), %rdi     # 0x80fdb
movb $0x0, %al
callq 0x10d0
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x53868
leaq 0x2d7aa(%rip), %rdi     # 0x81004
movb $0x0, %al
callq 0x10d0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)