// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/confchange.c
// Function: RMSD_CA
float RMSD_CA(float *coord_1, float *coord_2, struct Reference Ref,
	      atom *atoms, int nres, struct ali_atoms ali_atoms)
{
  int n3=3*nres; float coord_CA1[n3], coord_CA2[n3], mass[nres];
  int k=0, n=0;
  for(int i=0; i<ali_atoms.N_ref; i++){
    if(strncmp(atoms[Ref.atom_num[i]].name, "CA", 2))continue;
    int ii=3*i; mass[n]=ali_atoms.mass[i]; n++;
    if(n>nres){printf("ERROR, too many CA atoms\n"); exit(8);}
    for(int j=0; j<3; j++){
      coord_CA1[k]=coord_1[ii]; 
      coord_CA2[k]=coord_2[ii];
      ii++; k++;
    }
  }
  float rmsd=rmsd_mclachlan_f(coord_CA1, coord_CA2, mass, n);
  return(rmsd);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
leaq 0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x28(%rbp)
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x70(%rbp)
movq %rcx, %rsp
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x68(%rbp)
movq %rcx, %rsp
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x80(%rbp), %rcx
movl -0x4c(%rbp), %eax
cmpl 0x18(%rcx), %eax
jge 0x43d57
movq -0x78(%rbp), %rax
movq -0x18(%rbp), %rdi
movq 0x28(%rax), %rax
movslq -0x4c(%rbp), %rcx
movslq (%rax,%rcx,4), %rax
imulq $0x70, %rax, %rax
addq %rax, %rdi
addq $0x18, %rdi
leaq 0x32681(%rip), %rsi     # 0x76308
movl $0x2, %edx
callq 0x1050
cmpl $0x0, %eax
je 0x43c9b
jmp 0x43d49
movq -0x60(%rbp), %rax
movq -0x80(%rbp), %rcx
imull $0x3, -0x4c(%rbp), %edx
movl %edx, -0x50(%rbp)
movq 0x10(%rcx), %rcx
movslq -0x4c(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movslq -0x48(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jle 0x43ce9
leaq 0x3b4f0(%rip), %rdi     # 0x7f1c8
movb $0x0, %al
callq 0x10d0
movl $0x8, %edi
callq 0x1210
movl $0x0, -0x54(%rbp)
cmpl $0x3, -0x54(%rbp)
jge 0x43d47
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
movq -0x8(%rbp), %rdx
movslq -0x50(%rbp), %rsi
movss (%rdx,%rsi,4), %xmm0
movslq -0x44(%rbp), %rdx
movss %xmm0, (%rcx,%rdx,4)
movq -0x10(%rbp), %rcx
movslq -0x50(%rbp), %rdx
movss (%rcx,%rdx,4), %xmm0
movslq -0x44(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x43cf0
jmp 0x43d49
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x43c51
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rsi
movq -0x70(%rbp), %rdi
movl -0x48(%rbp), %ecx
callq 0x70af0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x58(%rbp), %xmm0
movq -0x28(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)