// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/allostery.c
// Function: Print_interface_coupling
void Print_interface_coupling(struct interaction *Int_list_inter,
			      int N_int_inter,
			      struct interaction *Int_list, int N_int,
			      atom *atoms, int Nchain, char *nameout,
			      float **Coup_dir, float**Coup_coord,
			      float **Coup_deformation, 
			      double **Chain_dir, double **Chain_coord,
			      double **Chain_def, double **norm_chain, int Na)
{
  char name2[200]; sprintf(name2, "%s.interface.dat", nameout);
  FILE *file_out=fopen(name2, "w");
  printf("Writing %s\n", name2);

  int ia, ja, n, npair=N_int_inter; float y;
  double Ave_dir=0, Ave_coord=0, Ave_def=0;
  double Min_dir=100, Min_coord=100, Max_def=0;
  int mpair=0, mpair_max=Nchain*(Nchain-1)/2, m;
  int c1[mpair_max], c2[mpair_max];
  for(n=0; n<N_int_inter; n++){
    ia=(atoms+Int_list_inter[n].i1)->res;
    ja=(atoms+Int_list_inter[n].i2)->res;
    if((ia>=Na)||(ja>=Na)){npair--; continue;}
    {
      int ic1=(atoms+Int_list_inter[n].i1)->chain;
      int ic2=(atoms+Int_list_inter[n].i2)->chain;
      if(ic1!=ic2){
	if(ic1>ic2){int tmp=ic2; ic2=ic1; ic1=tmp;}
	for(m=0; m<mpair; m++)if(ic1==c1[m] && ic2==c2[m])break;
	if(m==mpair){c1[m]=ic1; c2[m]=ic2; mpair++;}
      }
    }
    if(Coup_dir){
      y=Coup_dir[ia][ja]; Ave_dir+=y; if(y<Min_dir)Min_dir=y;
    }
    if(Coup_coord){
      y=Coup_coord[ia][ja]; Ave_coord+=y; if(y<Min_coord)Min_coord=y;
    }
    if(Coup_deformation){
      y=Coup_deformation[ia][ja]; Ave_def+=y; if(y>Max_def)Max_def=y;
    }
  }
  if(npair){Ave_dir/=npair; Ave_coord/=npair; Ave_def/=npair;}

  int numran=200;
  unsigned long iran=randomgenerator();
  if(ini_ran==0){
    InitRandom((RANDOMTYPE)iran); ini_ran=1;
  }
  double Ave_dir_ran=0, Ave_coord_ran=0, Ave_def_ran=0;
  double p_dir_ran=0, p_coord_ran=0, p_def_ran=0;
  for(int kran=0; kran<numran; kran++){
    npair=N_int_inter;
    double Ave_dir_tmp=0, Ave_coord_tmp=0, Ave_def_tmp=0;
    for(int k=0; k<N_int_inter; k++){
      n=RandomFloating()*N_int;
      if(n>=N_int){
	printf("WARNING in RandomFloating\n"); n=N_int-1;
      }
      ia=(atoms+Int_list[n].i1)->res;
      ja=(atoms+Int_list[n].i2)->res;
      if((ia>=Na)||(ja>=Na)){npair--; continue;}
      if(Coup_dir)Ave_dir_tmp+=Coup_dir[ia][ja];
      if(Coup_coord)Ave_coord_tmp+=Coup_coord[ia][ja];
      if(Coup_deformation)Ave_def_tmp+=Coup_deformation[ia][ja];
    }
    Ave_dir_tmp/=npair; Ave_dir_ran+=Ave_dir_tmp;
    if(Ave_dir_tmp>Ave_dir)p_dir_ran++;
    Ave_coord_tmp/=npair; Ave_coord_ran+=Ave_coord_tmp;
    if(Ave_coord_tmp>Ave_coord)p_coord_ran++;
    Ave_def_tmp/=npair; Ave_def_ran+=Ave_def_tmp;
    if(Ave_def_tmp<Ave_def)p_def_ran++;
  }
  
  fprintf(file_out,"# %d interface contacts\n", N_int_inter);
  fprintf(file_out, "Directionality_coupling: "
	  "Ave= %.4g Min= %.4g Random= %.2g p> = %.3g\n",
	  Ave_dir, Min_dir, Ave_dir_ran/numran, p_dir_ran/numran);
  fprintf(file_out, "Coordination_coupling:   "
	  "Ave= %.4g Min= %.4g Random= %.2g p> = %.3g\n",
	  Ave_coord, Min_coord, Ave_coord_ran/numran, p_coord_ran/numran);
  fprintf(file_out, "Deformation_coupling:    "
	  "Ave= %.4g Max= %.4g Random= %.2g p< = %.3g\n",
	  Ave_def, Max_def, Ave_def_ran/numran, p_def_ran/numran);

  double Ave_chain_coord=0, Ave_chain_dir=0, norm=0;
  fprintf(file_out, "# %d pairs of chains: ", mpair);
  for(m=0; m<mpair; m++){
    int ic1= c1[m], ic2= c2[m];
    fprintf(file_out, " %d-%d", ic1, ic2);
    Ave_chain_coord+=Chain_coord[ic1][ic2]*norm_chain[ic1][ic2];
    Ave_chain_dir+=Chain_dir[ic1][ic2]*norm_chain[ic1][ic2];
    norm+=norm_chain[ic1][ic2];
  }
  fprintf(file_out, "\n");
  Ave_chain_coord/=norm; Ave_chain_dir/=norm; 
  
  float Chain_dir_coeff=0, Chain_coord_coeff=0, Ave_coord_coeff=0,
    Ave_dir_coeff=0, bias=0, G_NM_coeff=0, DG_NM_coeff=0, DG_cont_coeff=0;
  if(strcmp(DOF_LABEL,"PHI")==0){ 
    // Param: KAPPA=5.0, SCALE_COORD=2, SCALE_D=2 Err=0.57 bias=0.37
    G_NM_coeff=0.0; DG_NM_coeff=31.3; DG_cont_coeff=0.27;
    Ave_coord_coeff=-14.2; Ave_dir_coeff=-3.61;
    Chain_coord_coeff=-13.3; Chain_dir_coeff=-4.16; bias=0.37;
  }else if(strcmp(DOF_LABEL,"PHIPSI")==0){
    // Param: KAPPA=8.2, SCALE_COORD=2, SCALE_D=2 Err=0.59 bias=0.44
    G_NM_coeff=0; DG_NM_coeff=26.2; DG_cont_coeff=0.325;
    Ave_coord_coeff=-13.8; Ave_dir_coeff=-3.7;
    Chain_coord_coeff=-13.8; Chain_dir_coeff=-4.58; bias=0.44;
  }else if(strcmp(DOF_LABEL,"PHIPSIOME")==0){
    // Param: KAPPA=15, SCALE_COORD=2, SCALE_D=2 Err=0.63 bias=0.50
    G_NM_coeff=0; DG_NM_coeff=21.2; DG_cont_coeff=0.335;
    Ave_coord_coeff=-12.5; Ave_dir_coeff=-3.64;
    Chain_coord_coeff=-13.0; Chain_dir_coeff=-4.66; bias=0.50;
  }else if(strcmp(DOF_LABEL,"PHIPSIOMESCH")==0){
    // Param: KAPPA=14, SCALE_COORD=2, SCALE_D=2 Err=0.60 bias=24.7
    G_NM_coeff=1.08; DG_NM_coeff=0; DG_cont_coeff=0.255;
    Ave_coord_coeff=-10.8; Ave_dir_coeff=-5.22;
    Chain_coord_coeff=-10.5; Chain_dir_coeff=-5.16; bias=24.7;
  }
  double DG_bind=
    G_NM_coeff*G_NM_holo+
    DG_NM_coeff*DG_NM_internal+
    DG_cont_coeff*E_cont_bind+
    Ave_coord_coeff*Ave_coord+
    Ave_dir_coeff*Ave_dir+
    Chain_coord_coeff*Ave_chain_coord+
    Chain_dir_coeff*Ave_chain_dir+
    bias;
  fprintf(file_out,"# Predicted binding free energy: %.4g\n", DG_bind);
  fprintf(file_out,"# Calculated as: %.4g*G_NM + %.4g*DG_NM + %.4g*DE_cont"
	  " + %.4g*Ave_coord_interface + %.4g*Ave_dir_interface"
	  " + %.4g*Ave_coord_CHAIN + %.4g*Ave_dir_chain + %.4g\n",
	  G_NM_coeff, DG_NM_coeff, DG_cont_coeff,
	  Ave_coord_coeff, Ave_dir_coeff, Chain_coord_coeff, Chain_dir_coeff,
	  bias);
  fprintf(file_out, "# Coordination computed as Coord_ij="
	  "exp(-%.3g*<(dij-<dij>)^2)\n", SCALE_COORD);
  fprintf(file_out, "# Interchain contacts weighted with "
	  "Proximity_ij=exp(-d_ij/%.3g)\n", SCALE_D);
  fprintf(file_out, "# G_NM/nres  = %.4g\n", G_NM_holo);
  fprintf(file_out, "# DG_NM_internal/nres = %.4g\n", DG_NM_internal);
  fprintf(file_out, "# DG_NM_rigid/nres = %.4g\n", DG_NM_rigid);
  //fprintf(file_out, "# DG_NM/nres = %.4g\n", DG_NM_rigid+DG_NM_internal);
  fprintf(file_out, "# DE_cont = %.4g\n", E_cont_bind);
  fprintf(file_out, "# Ave_inter_coord = %.4g\n", Ave_coord);
  fprintf(file_out, "# Ave_inter_dir   = %.4g\n", Ave_dir);
  fprintf(file_out, "# Ave_chain_coord = %.4g\n", Ave_chain_coord);
  fprintf(file_out, "# Ave_chain_dir   = %.4g\n", Ave_chain_dir);

  fclose(file_out);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movl %r9d, %r15d
movq %r8, %r12
movq %rcx, -0xd0(%rbp)
movq %rdx, %r14
movl %esi, -0x50(%rbp)
movq %rdi, %rbx
movq 0x10(%rbp), %rdx
leaq 0x178b5(%rip), %rsi     # 0x5d91c
leaq -0x1f0(%rbp), %r13
movq %r13, %rdi
xorl %eax, %eax
callq 0x2270
leaq 0x11181(%rip), %rsi     # 0x57200
movq %r13, %rdi
callq 0x2220
movq %rax, -0x88(%rbp)
leaq 0xbcba(%rip), %rdi      # 0x51d4f
movq %r13, %rsi
xorl %eax, %eax
callq 0x20f0
movq %rsp, -0x128(%rbp)
leal -0x1(%r15), %eax
imull %r15d, %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq 0xf(,%rcx,4), %rax
andq $-0x10, %rax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movq %rsp, %rcx
subq %rax, %rcx
movl -0x50(%rbp), %eax
movq %rcx, -0x90(%rbp)
movq %rcx, %rsp
testl %eax, %eax
jle 0x46268
movl %eax, %r10d
xorpd %xmm1, %xmm1
xorl %edx, %edx
movsd 0x10de8(%rip), %xmm6    # 0x56ee0
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
movapd %xmm6, %xmm5
xorl %r11d, %r11d
xorpd %xmm4, %xmm4
movl 0x50(%rbp), %ecx
movq %rbx, -0x40(%rbp)
movq -0x90(%rbp), %r13
imulq $0xc8, %rdx, %rdi
movslq (%rbx,%rdi), %rsi
imulq $0x70, %rsi, %r8
movslq 0x64(%r12,%r8), %rsi
cmpl %ecx, %esi
jge 0x4618b
movslq 0x4(%rbx,%rdi), %rdi
imulq $0x70, %rdi, %r9
movl 0x64(%r12,%r9), %edi
cmpl %ecx, %edi
jge 0x4618b
movl %eax, %ebx
movq %r10, %rax
addq %r12, %r8
addq %r12, %r9
movl 0x6c(%r8), %r10d
movl 0x6c(%r9), %r8d
cmpl %r8d, %r10d
je 0x461b4
movl %r8d, %r9d
cmovll %r10d, %r9d
cmovgl %r10d, %r8d
movl %r11d, %r10d
movl %r11d, %ecx
testl %r11d, %r11d
jle 0x46192
xorl %r11d, %r11d
cmpl (%r15,%r11,4), %r9d
jne 0x46181
cmpl (%r13,%r11,4), %r8d
je 0x46195
incq %r11
cmpq %r11, %r10
jne 0x46174
jmp 0x4619a
decl %eax
jmp 0x4625a
xorl %r11d, %r11d
cmpl %ecx, %r11d
jne 0x461b1
movl %r9d, (%r15,%r10,4)
movq -0x90(%rbp), %r9
movl %r8d, (%r9,%r10,4)
movl %ecx, %r11d
incl %r11d
jmp 0x461b4
movl %ecx, %r11d
movl 0x50(%rbp), %ecx
movq 0x28(%rbp), %r9
movq %rax, %r10
movslq %edi, %rdi
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
movq 0x18(%rbp), %r8
testq %r8, %r8
movl %ebx, %eax
je 0x461fd
movapd %xmm1, %xmm2
movq (%r8,%rsi,8), %r8
xorps %xmm1, %xmm1
cvtss2sd (%r8,%rdi,4), %xmm1
addsd %xmm1, %xmm0
ucomisd %xmm1, %xmm6
movq -0x40(%rbp), %rbx
jbe 0x461f7
movapd %xmm1, %xmm6
movapd %xmm2, %xmm1
jmp 0x46201
movq -0x40(%rbp), %rbx
movq 0x20(%rbp), %r8
testq %r8, %r8
je 0x4622d
movq (%r8,%rsi,8), %r8
movapd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtss2sd (%r8,%rdi,4), %xmm1
addsd %xmm1, %xmm2
ucomisd %xmm1, %xmm5
jbe 0x46229
movapd %xmm1, %xmm5
movapd %xmm2, %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
testq %r9, %r9
je 0x4625a
movq (%r9,%rsi,8), %rsi
xorps %xmm0, %xmm0
cvtss2sd (%rsi,%rdi,4), %xmm0
movsd -0x48(%rbp), %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, -0x48(%rbp)
ucomisd %xmm4, %xmm0
jbe 0x4625a
movapd %xmm0, %xmm4
incq %rdx
cmpq %r10, %rdx
jne 0x46119
jmp 0x46287
xorpd %xmm1, %xmm1
movsd 0x10c6c(%rip), %xmm5    # 0x56ee0
xorpd %xmm4, %xmm4
movapd %xmm5, %xmm6
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
xorl %r11d, %r11d
xorl %ecx, %ecx
movapd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movapd %xmm1, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
movapd %xmm0, %xmm3
divpd %xmm2, %xmm0
testl %eax, %eax
sete %al
movl %r11d, -0x9c(%rbp)
movsd %xmm4, -0x120(%rbp)
movsd %xmm5, -0x118(%rbp)
movsd %xmm6, -0x110(%rbp)
je 0x462d8
movsd -0x48(%rbp), %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, -0x48(%rbp)
movq %r15, -0x108(%rbp)
movb %al, %cl
movd %ecx, %xmm1
pshufd $0x0, %xmm1, %xmm1      # xmm1 = xmm1[0,0,0,0]
pslld $0x1f, %xmm1
psrad $0x1f, %xmm1
andpd %xmm1, %xmm3
movapd %xmm3, -0x80(%rbp)
andnpd %xmm0, %xmm1
movapd %xmm1, -0x40(%rbp)
callq 0x32a14
cmpl $0x0, 0x34772(%rip)     # 0x7aa84
jne 0x46326
movq %rax, %rdi
callq 0x503ac
movl $0x1, 0x3475e(%rip)     # 0x7aa84
movaps -0x80(%rbp), %xmm0
orps -0x40(%rbp), %xmm0
movaps %xmm0, -0x80(%rbp)
movq -0xd0(%rbp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0x58(%rbp)
leal -0x1(%rax), %ebx
xorpd %xmm0, %xmm0
movapd %xmm0, -0xc0(%rbp)
xorpd %xmm1, %xmm1
xorl %eax, %eax
xorpd %xmm0, %xmm0
movapd %xmm0, -0xf0(%rbp)
movapd %xmm0, -0xe0(%rbp)
movapd %xmm0, -0xb0(%rbp)
movapd %xmm1, -0x100(%rbp)
movl %eax, -0x98(%rbp)
movl -0x50(%rbp), %eax
movl %eax, %r15d
xorpd %xmm3, %xmm3
xorpd %xmm5, %xmm5
testl %eax, %eax
jle 0x46477
movl -0x50(%rbp), %r15d
movl %r15d, %r13d
movapd %xmm5, -0x70(%rbp)
movapd %xmm3, -0x40(%rbp)
xorl %eax, %eax
callq 0x504e7
mulsd -0x58(%rbp), %xmm0
cvttsd2si %xmm0, %eax
cmpl -0xd0(%rbp), %eax
jl 0x463d1
leaq 0x178cb(%rip), %rdi     # 0x5dc95
callq 0x2090
movl %ebx, %eax
cltq
imulq $0xc8, %rax, %rcx
movslq (%r14,%rcx), %rax
imulq $0x70, %rax, %rax
movslq 0x64(%r12,%rax), %rax
movl 0x50(%rbp), %edx
cmpl %edx, %eax
movq 0x28(%rbp), %rsi
movapd -0x70(%rbp), %xmm5
jge 0x46466
movslq 0x4(%r14,%rcx), %rcx
imulq $0x70, %rcx, %rcx
movl 0x64(%r12,%rcx), %ecx
cmpl %edx, %ecx
jge 0x46466
movslq %ecx, %rcx
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
movq 0x18(%rbp), %rdx
testq %rdx, %rdx
movapd -0x40(%rbp), %xmm3
je 0x46432
movq (%rdx,%rax,8), %rdx
xorps %xmm1, %xmm1
cvtss2sd (%rdx,%rcx,4), %xmm1
addsd %xmm1, %xmm0
movq 0x20(%rbp), %rdx
testq %rdx, %rdx
je 0x4644b
movq (%rdx,%rax,8), %rdx
xorps %xmm1, %xmm1
cvtss2sd (%rdx,%rcx,4), %xmm1
addsd %xmm1, %xmm5
unpcklpd %xmm0, %xmm5            # xmm5 = xmm5[0],xmm0[0]
testq %rsi, %rsi
je 0x4646e
movq (%rsi,%rax,8), %rax
xorps %xmm0, %xmm0
cvtss2sd (%rax,%rcx,4), %xmm0
addsd %xmm0, %xmm3
jmp 0x4646e
decl %r15d
movapd -0x40(%rbp), %xmm3
decl %r13d
jne 0x463a1
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movapd -0xc0(%rbp), %xmm2
movapd %xmm2, %xmm1
addpd 0x16b8d(%rip), %xmm1    # 0x5d020
divsd %xmm0, %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm5
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
movapd -0xb0(%rbp), %xmm4
addsd %xmm0, %xmm4
movapd %xmm4, -0xb0(%rbp)
movapd -0x80(%rbp), %xmm0
cmpltpd %xmm5, %xmm0
movapd -0xe0(%rbp), %xmm4
addsd %xmm5, %xmm4
movapd %xmm4, -0xe0(%rbp)
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movapd %xmm0, -0xc0(%rbp)
movapd -0xf0(%rbp), %xmm0
addsd %xmm3, %xmm0
movapd %xmm0, -0xf0(%rbp)
movapd -0x100(%rbp), %xmm1
movapd %xmm1, %xmm0
addsd 0xac33(%rip), %xmm0     # 0x51148
cmpltsd -0x48(%rbp), %xmm3
andpd %xmm3, %xmm0
andnpd %xmm1, %xmm3
orpd %xmm0, %xmm3
movl -0x98(%rbp), %eax
incl %eax
movapd %xmm3, %xmm1
cmpl $0xc8, %eax
jne 0x46376
leaq 0x173e8(%rip), %rsi     # 0x5d92d
movq -0x88(%rbp), %rbx
movq %rbx, %rdi
movl -0x50(%rbp), %edx
xorl %eax, %eax
movapd %xmm3, -0x40(%rbp)
callq 0x21a0
movsd 0x13712(%rip), %xmm0    # 0x59c78
movapd -0xb0(%rbp), %xmm2
divsd %xmm0, %xmm2
movapd -0xc0(%rbp), %xmm3
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
divsd %xmm0, %xmm3
movaps -0x80(%rbp), %xmm0
movhlps %xmm0, %xmm0            # xmm0 = xmm0[1,1]
leaq 0x173b6(%rip), %rsi     # 0x5d946
movq %rbx, %rdi
movaps %xmm0, -0xb0(%rbp)
movsd -0x110(%rbp), %xmm1
movb $0x4, %al
callq 0x21a0
movapd -0xe0(%rbp), %xmm2
movsd 0x136bf(%rip), %xmm0    # 0x59c78
divsd %xmm0, %xmm2
movapd -0xc0(%rbp), %xmm3
divsd %xmm0, %xmm3
leaq 0x173bb(%rip), %rsi     # 0x5d98b
movq %rbx, %rdi
movaps -0x80(%rbp), %xmm0
movsd -0x118(%rbp), %xmm1
movb $0x4, %al
callq 0x21a0
movapd -0xf0(%rbp), %xmm2
movsd 0x13682(%rip), %xmm0    # 0x59c78
divsd %xmm0, %xmm2
movapd -0x40(%rbp), %xmm3
divsd %xmm0, %xmm3
leaq 0x173c6(%rip), %rsi     # 0x5d9d0
movq %rbx, %rdi
movsd -0x48(%rbp), %xmm0
movsd -0x120(%rbp), %xmm1
movb $0x4, %al
callq 0x21a0
leaq 0x173ed(%rip), %rsi     # 0x5da15
movq %rbx, %rdi
movl -0x9c(%rbp), %ebx
movl %ebx, %edx
xorl %eax, %eax
callq 0x21a0
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
testl %ebx, %ebx
jle 0x466f6
movl %ebx, %eax
movq %rax, -0xd0(%rbp)
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
xorl %r13d, %r13d
movq -0x108(%rbp), %rbx
movq -0x90(%rbp), %r12
movsd %xmm2, -0x70(%rbp)
movaps %xmm0, -0x40(%rbp)
movslq (%rbx,%r13,4), %r14
movslq (%r12,%r13,4), %r15
movq -0x88(%rbp), %rdi
leaq 0x173a2(%rip), %rsi     # 0x5da2c
movl %r14d, %edx
movl %r15d, %ecx
xorl %eax, %eax
callq 0x21a0
movsd -0x70(%rbp), %xmm2
movq 0x38(%rbp), %rax
movq (%rax,%r14,8), %rax
movq 0x48(%rbp), %rcx
movq (%rcx,%r14,8), %rcx
movsd (%rcx,%r15,8), %xmm0
movq 0x30(%rbp), %rcx
movq (%rcx,%r14,8), %rcx
movsd (%rax,%r15,8), %xmm1
movhpd (%rcx,%r15,8), %xmm1    # xmm1 = xmm1[0],mem[0]
addsd %xmm0, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm1, %xmm0
movapd -0x40(%rbp), %xmm1
addpd %xmm0, %xmm1
movapd %xmm1, -0x40(%rbp)
movaps -0x40(%rbp), %xmm0
incq %r13
cmpq %r13, -0xd0(%rbp)
jne 0x4666b
jmp 0x466fd
xorps %xmm0, %xmm0
xorpd %xmm2, %xmm2
movsd %xmm2, -0x70(%rbp)
movaps %xmm0, -0x40(%rbp)
movl $0xa, %edi
movq -0x88(%rbp), %r12
movq %r12, %rsi
callq 0x2140
leaq 0x22a2f(%rip), %rdi     # 0x69150
leaq 0xe30d(%rip), %rsi      # 0x54a35
callq 0x2190
testl %eax, %eax
je 0x467ae
leaq 0x22a18(%rip), %rdi     # 0x69150
leaq 0x172f4(%rip), %rsi     # 0x5da33
callq 0x2190
testl %eax, %eax
je 0x467ee
leaq 0x229fd(%rip), %rdi     # 0x69150
leaq 0x172e0(%rip), %rsi     # 0x5da3a
callq 0x2190
testl %eax, %eax
je 0x46827
leaq 0x229e2(%rip), %rdi     # 0x69150
leaq 0x172cf(%rip), %rsi     # 0x5da44
callq 0x2190
xorpd %xmm3, %xmm3
testl %eax, %eax
je 0x46864
xorpd %xmm9, %xmm9
xorpd %xmm8, %xmm8
xorpd %xmm10, %xmm10
xorpd %xmm7, %xmm7
xorpd %xmm5, %xmm5
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
xorpd %xmm6, %xmm6
jmp 0x468a4
movsd 0x1687a(%rip), %xmm6    # 0x5d030
movsd 0x1687a(%rip), %xmm3    # 0x5d038
movsd 0x1687a(%rip), %xmm5    # 0x5d040
movsd 0x1687a(%rip), %xmm7    # 0x5d048
movsd 0x16879(%rip), %xmm10   # 0x5d050
movsd 0x16878(%rip), %xmm8    # 0x5d058
movsd 0x16877(%rip), %xmm9    # 0x5d060
jmp 0x468a4
movsd 0x16872(%rip), %xmm6    # 0x5d068
movsd 0x16872(%rip), %xmm3    # 0x5d070
movsd 0x16872(%rip), %xmm5    # 0x5d078
movsd 0x16872(%rip), %xmm7    # 0x5d080
movsd 0x16871(%rip), %xmm8    # 0x5d088
movsd 0x16870(%rip), %xmm9    # 0x5d090
movapd %xmm8, %xmm10
jmp 0x468a4
movsd 0x16869(%rip), %xmm6    # 0x5d098
movsd 0x16869(%rip), %xmm3    # 0x5d0a0
movsd 0xa931(%rip), %xmm5     # 0x51170
movsd 0x16861(%rip), %xmm7    # 0x5d0a8
movsd 0x16860(%rip), %xmm10   # 0x5d0b0
movsd 0x1685f(%rip), %xmm8    # 0x5d0b8
movsd 0x1685e(%rip), %xmm9    # 0x5d0c0
jmp 0x468a4
movsd 0x1685c(%rip), %xmm6    # 0x5d0c8
movsd 0x1685c(%rip), %xmm0    # 0x5d0d0
movsd %xmm0, -0x58(%rbp)
movsd 0x16857(%rip), %xmm5    # 0x5d0d8
movsd 0x16857(%rip), %xmm7    # 0x5d0e0
movsd 0x16856(%rip), %xmm10   # 0x5d0e8
movsd 0x16855(%rip), %xmm8    # 0x5d0f0
movsd 0x16854(%rip), %xmm9    # 0x5d0f8
movapd -0x40(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
movsd %xmm10, -0x48(%rbp)
movsd %xmm3, -0x50(%rbp)
movsd %xmm6, -0x100(%rbp)
movsd %xmm7, -0x98(%rbp)
movsd %xmm8, -0xe0(%rbp)
movsd %xmm9, -0xf0(%rbp)
movsd %xmm5, -0xc0(%rbp)
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
divsd %xmm1, %xmm2
movapd %xmm2, -0xd0(%rbp)
divsd %xmm1, %xmm0
leaq 0x226a6(%rip), %r15     # 0x68fa8
leaq 0x226a7(%rip), %r14     # 0x68fb0
movapd %xmm0, %xmm4
movapd %xmm0, -0x40(%rbp)
movsd (%r14), %xmm0
mulsd %xmm3, %xmm0
movsd (%r15), %xmm1
mulsd -0x58(%rbp), %xmm1
addsd %xmm0, %xmm1
leaq 0x22690(%rip), %rbx     # 0x68fc0
movsd (%rbx), %xmm0
mulsd %xmm6, %xmm0
addsd %xmm1, %xmm0
movapd -0x80(%rbp), %xmm1
mulsd %xmm10, %xmm1
addsd %xmm0, %xmm1
movapd -0xb0(%rbp), %xmm0
mulsd %xmm7, %xmm0
addsd %xmm1, %xmm0
movapd %xmm8, %xmm1
mulsd %xmm4, %xmm1
addsd %xmm0, %xmm1
movapd %xmm9, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd %xmm5, %xmm0
leaq 0x170d2(%rip), %rsi     # 0x5da51
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
leaq 0x170e8(%rip), %rsi     # 0x5da78
movq %r12, %rdi
movsd -0x58(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x100(%rbp), %xmm2
movsd -0x48(%rbp), %xmm3
movsd -0x98(%rbp), %xmm4
movsd -0xe0(%rbp), %xmm5
movsd -0xf0(%rbp), %xmm6
movsd -0xc0(%rbp), %xmm7
movb $0x8, %al
callq 0x21a0
movsd 0x22597(%rip), %xmm0    # 0x68f70
leaq 0x17137(%rip), %rsi     # 0x5db17
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
movsd 0x22586(%rip), %xmm0    # 0x68f78
leaq 0x1715d(%rip), %rsi     # 0x5db56
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
movsd (%r15), %xmm0
leaq 0x17189(%rip), %rsi     # 0x5db98
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
movsd (%r14), %xmm0
leaq 0x17188(%rip), %rsi     # 0x5dbad
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
leaq 0x22582(%rip), %rax     # 0x68fb8
movsd (%rax), %xmm0
leaq 0x1718a(%rip), %rsi     # 0x5dbcb
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
movsd (%rbx), %xmm0
leaq 0x17190(%rip), %rsi     # 0x5dbe6
movq %r12, %rdi
movb $0x1, %al
callq 0x21a0
leaq 0x17191(%rip), %rsi     # 0x5dbf8
movq %r12, %rdi
movaps -0x80(%rbp), %xmm0
movb $0x1, %al
callq 0x21a0
leaq 0x17196(%rip), %rsi     # 0x5dc12
movq %r12, %rdi
movaps -0xb0(%rbp), %xmm0
movb $0x1, %al
callq 0x21a0
leaq 0x17198(%rip), %rsi     # 0x5dc2c
movq %r12, %rdi
movaps -0x40(%rbp), %xmm0
movb $0x1, %al
callq 0x21a0
leaq 0x1719d(%rip), %rsi     # 0x5dc46
movq %r12, %rdi
movaps -0xd0(%rbp), %xmm0
movb $0x1, %al
callq 0x21a0
movq %r12, %rdi
callq 0x20c0
movq -0x128(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq