// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/simulation.c
// Function: Internal_differences
void  Internal_differences(struct bond *bonds, struct bond *bonds2,
			   int natoms, char *prots)
{
  int PRINT_ALL=0;
  if(PRINT_ALL){
    char name[80]; sprintf(name, "Internal_coordinates_%s.dat", prots);
    FILE *file=fopen(name, "w"); // Write internal coordinates
    fprintf(file,
	    "#1=l1 2=l2 3=cos(th1) 4=cos(th2) 5=phi1 6=phi2 atom res\n");
    for(int i=0; i<natoms; i++){
      struct bond *bond1=bonds+i; if(bond1->atom==NULL)break;
      if(bond1->atom->main==0)continue;
      if(bond1->atom->ali<0)continue;
      struct bond *bond2=bonds2+bond1->atom->ali;
      struct bond *b1=bond1->previous;
      if(b1 &&(b1->atom->ali>=0)){
	b1=b1->previous;
	if(b1 &&(b1->atom->ali>=0)){
	  fprintf(file, "%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%s\t%d\n", 
		  bond1->l, bond2->l,
		  bond1->r_cos_theta/bond1->l, bond2->r_cos_theta/bond2->l,
		  bond1->phi, bond2->phi, bond1->atom->name, bond1->atom->res);
	}
      }
    }
    fclose(file); printf("Writing %s\n", name);
  }

  int n[3], k, a;
  double diff1[3], diff2[3], diff1_aa[3][20], diff2_aa[3][20], n_aa[3][20];
  //float diff[3][natoms];  //diff[k][n[k]]=d;
  for(k=0; k<3; k++){  
    n[k]=0; diff1[k]=0; diff2[k]=0;
    for(a=0; a<20; a++){
      n_aa[k][a]=0; diff1_aa[k][a]=0; diff2_aa[k][a]=0;
    }
  }
  Atom_type("CA"); // Needed to initialize num_BB
  double internal[3][num_BB], internal_2[3][num_BB];
  int n_int[3][num_BB];
  for(k=0; k<3; k++){
    for(a=0; a<num_BB; a++){
      internal[k][a]=0; internal_2[k][a]=0; n_int[k][a]=0;
    }
  }

  float pi=3.1415925, deg=180.0/pi, twopi=2*pi;
  float d, m;
  struct bond *bond1=bonds, *bond2=bonds2, *b1;
  float omega2[natoms];
  for(int i=0; i<natoms; i++){
    bond1=bonds+i;
    int na=Atom_type(bond1->atom->name);
    if(na<0)continue;
    if((bond1->len>=0)||(bond1->angle>=0))continue;  // exclude pseudo-bonds
    if((bond1->atom->ali<0))continue;
    a=Code_AA(bond1->atom->aa);
    bond2=bonds2+bond1->atom->ali; b1=bond1->previous;
    if(b1 &&(b1->atom->ali>=0)){
      k=0; // bond length
      d=bond1->l; // l1
      internal[k][na]+=d; internal_2[k][na]+=d*d;
      d=bond2->l; // l2
      internal[k][na]+=d; internal_2[k][na]+=d*d; n_int[k][na]+=2;
      d= bond1->l-bond2->l; // difference
      diff1[k]+=d; diff2[k]+=d*d; n[k]++;
      if((a>=0)&&(a<20)){
	diff1_aa[k][a]+=d; diff2_aa[k][a]+=d*d; n_aa[k][a]++;
      }
      b1=b1->previous;
      if(b1 && (b1->atom->ali>=0)){
	k=1;  // bond angle
	float s1, c1=Cos_sin(&s1, bond1->r_cos_theta/bond1->l);
	float s2, c2=Cos_sin(&s2, bond2->r_cos_theta/bond2->l);

	d=acos(c1); // theta1
	internal[k][na]+=d; internal_2[k][na]+=d*d;
	d=acos(c2); // theta2
	internal[k][na]+=d; internal_2[k][na]+=d*d; n_int[k][na]+=2;
	d=asin(s2*c1-s1*c2); // difference
	diff1[k]+=d; diff2[k]+=d*d; n[k]++;
	if((a>=0)&&(a<20)){
	  diff1_aa[k][a]+=d; diff2_aa[k][a]+=d*d; n_aa[k][a]++;
	}
	b1=b1->previous;
	if(b1 && (b1->atom->ali>=0)){
	  k=2;  // torsion angle
	  d=bond1->phi; // phi1
	  internal[k][na]+=d; internal_2[k][na]+=d*d;
	  d=bond2->phi; // phi2
	  internal[k][na]+=d; internal_2[k][na]+=d*d; n_int[k][na]+=2;
	  omega2[i]=bond2->phi;
	  d=bond1->phi-bond2->phi; // difference
	  if(d>pi){d-=twopi;}else if(d<-pi){d+=twopi;}
	  bond1->d_phi=fabs(d)*deg; // difference in degrees
	  diff1[k]+=d; diff2[k]+=d*d; n[k]++;
	  if((a>=0)&&(a<20)){
	    diff1_aa[k][a]+=d; diff2_aa[k][a]+=d*d; n_aa[k][a]++;
	  }
	}
      }
    }
  }

  char name[100]; sprintf(name, "Internal_differences_%s.dat", prots);
  FILE *file_out=fopen(name, "w"); printf("Writing %s\n", name);
  fprintf(file_out, "# atom\tn\t3=len s.e.\t5=angle s.e.\t7=torsion\n"); 
  for(a=0; a<num_BB; a++){
    fprintf(file_out, "# %s\t%d ", BB_name[a], n_int[1][a]);
    for(k=0; k<3; k++){
      Ave_se(&(internal[k][a]), &(internal_2[k][a]), n_int[k][a]);
      fprintf(file_out, "\t%.3f %.3f", internal[k][a], internal_2[k][a]);
    }
    fprintf(file_out, "\n");
  }
  fprintf(file_out, "#\n");
  for(k=0; k<3; k++){
    if(k==0){     fprintf(file_out, "# Bond lengths:   ");}
    else if(k==1){fprintf(file_out, "# Bond angles:    ");}
    else if(k==2){fprintf(file_out, "# Torsion angles: ");}
    diff1[k]/=n[k]; diff2[k]/=n[k];
    d=sqrt((diff2[k]-diff1[k]*diff1[k])/(n[k]-1));
    fprintf(file_out, "<d>= %7.4f s.e.= %.4f t= %5.1f RMSD= %.3f n= %.0f\n",
	    diff1[k], d, diff1[k]/d, sqrt(diff2[k]), (float)n[k]);
  }
  fprintf(file_out, "#aa Bond lengths: 2=mean 3=RMSD ");
  fprintf(file_out, "Bond angles: 4=mean 5=RMSD ");
  fprintf(file_out, "Torsion angles: 6=mean 7=RMSD 8=n\n");
  for(a=0; a<20; a++){
    fprintf(file_out, "%c", AA_code[a]);
    for(k=0; k<3; k++){
      if(n_aa[k][a]){
	m=diff1_aa[k][a]/n_aa[k][a];
	d=sqrt(diff2_aa[k][a]/n_aa[k][a]);
      }else{
	m=0; d=0;
      }
      fprintf(file_out, "\t%.3f\t%.3f", m, d);
    }
    fprintf(file_out, "\t%.0f\n", n_aa[0][a]);
  }

  printf("# List of residues with D_omega > %d\n", D_omega_thr);
  printf("#Atom Res nres d_phi\n");
  fprintf(file_out, "# List of residues with D_omega > %d\n", D_omega_thr);
  fprintf(file_out, "#Atom Res nres d_omega omega1 omega2\n");
  bond1=bonds;
  for(int i=0; i<natoms; i++){
    atom *atom=bond1->atom;
    if((strncmp(atom->name, "CA", 2)==0)&&(bond1->d_phi > D_omega_thr)){
      fprintf(file_out, "%s %c%dch%d  %d %.0f %.0f\n",
	      atom->name, atom->aa, atom->res, atom->chain+1,
	      bond1->d_phi, bond1->phi*deg, omega2[i]*deg);
      printf("%s %c%d %d\n", atom->name, atom->aa, atom->res, bond1->d_phi);
    }
    bond1++;
  }

  fclose(file_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7f0, %rsp            # imm = 0x7F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x513ef
leaq -0x80(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x2fb03(%rip), %rsi     # 0x80cfd
movb $0x0, %al
callq 0x1200
leaq -0x80(%rbp), %rdi
leaq 0x2b166(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
leaq 0x2faf3(%rip), %rsi     # 0x80d19
movb $0x0, %al
callq 0x1150
movl $0x0, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x513d1
movq -0x8(%rbp), %rax
movslq -0x8c(%rbp), %rcx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x51274
jmp 0x513d1
movq -0x98(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x48(%rax)
jne 0x51289
jmp 0x513bd
movq -0x98(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jge 0x5129e
jmp 0x513bd
movq -0x10(%rbp), %rax
movq -0x98(%rbp), %rcx
movq (%rcx), %rcx
movslq 0x54(%rcx), %rcx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x513bb
movq -0xa8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jl 0x513bb
movq -0xa8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x513b9
movq -0xa8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jl 0x513b9
movq -0x88(%rbp), %rdi
movq -0x98(%rbp), %rax
movsd 0x58(%rax), %xmm0
movq -0xa0(%rbp), %rax
movsd 0x58(%rax), %xmm1
movq -0x98(%rbp), %rax
movsd 0x60(%rax), %xmm2
movq -0x98(%rbp), %rax
divsd 0x58(%rax), %xmm2
movq -0xa0(%rbp), %rax
movsd 0x60(%rax), %xmm3
movq -0xa0(%rbp), %rax
divsd 0x58(%rax), %xmm3
movq -0x98(%rbp), %rax
movsd 0x68(%rax), %xmm4
movq -0xa0(%rbp), %rax
movsd 0x68(%rax), %xmm5
movq -0x98(%rbp), %rax
movq (%rax), %rdx
addq $0x18, %rdx
movq -0x98(%rbp), %rax
movq (%rax), %rax
movl 0x64(%rax), %ecx
leaq 0x2f9a0(%rip), %rsi     # 0x80d52
movb $0x6, %al
callq 0x1150
jmp 0x513bb
jmp 0x513bd
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0x51237
movq -0x88(%rbp), %rdi
callq 0x10a0
leaq -0x80(%rbp), %rsi
leaq 0x26106(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
movl $0x0, -0xb8(%rbp)
cmpl $0x3, -0xb8(%rbp)
jge 0x514f4
movslq -0xb8(%rbp), %rax
movl $0x0, -0xb4(%rbp,%rax,4)
movslq -0xb8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0xe0(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, -0x100(%rbp,%rax,8)
movl $0x0, -0xbc(%rbp)
cmpl $0x14, -0xbc(%rbp)
jge 0x514de
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq -0xb8(%rbp), %rcx
leaq -0x2e0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq -0xb8(%rbp), %rcx
leaq -0x4c0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x51448
jmp 0x514e0
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x513f9
leaq 0x24e0d(%rip), %rdi     # 0x76308
callq 0x14250
leaq 0x3a0a1(%rip), %rax     # 0x8b5a8
movl (%rax), %ecx
movq %rcx, -0x7c8(%rbp)
movq %rsp, %rdx
movq %rdx, -0x6a8(%rbp)
leaq (%rcx,%rcx,2), %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7c0(%rbp)
movq %rdx, %rsp
movq %rcx, -0x6b0(%rbp)
movl (%rax), %ecx
movq %rcx, -0x7b8(%rbp)
leaq (%rcx,%rcx,2), %rdx
leaq 0xf(,%rdx,8), %rsi
andq $-0x10, %rsi
movq %rsp, %rdx
subq %rsi, %rdx
movq %rdx, -0x7b0(%rbp)
movq %rdx, %rsp
movq %rcx, -0x6b8(%rbp)
movl (%rax), %eax
movq %rax, -0x7a8(%rbp)
leaq (%rax,%rax,2), %rcx
leaq 0xf(,%rcx,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x7a0(%rbp)
movq %rcx, %rsp
movq %rax, -0x6c0(%rbp)
movl $0x0, -0xb8(%rbp)
cmpl $0x3, -0xb8(%rbp)
jge 0x5168e
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
leaq 0x39fd9(%rip), %rcx     # 0x8b5a8
cmpl (%rcx), %eax
jge 0x51678
movq -0x7a0(%rbp), %rax
movq -0x7a8(%rbp), %rdx
movq -0x7b0(%rbp), %rcx
movq -0x7b8(%rbp), %rdi
movq -0x7c0(%rbp), %rsi
movq -0x7c8(%rbp), %r9
movslq -0xb8(%rbp), %r8
imulq %r9, %r8
shlq $0x3, %r8
addq %r8, %rsi
movslq -0xbc(%rbp), %r8
xorps %xmm0, %xmm0
movsd %xmm0, (%rsi,%r8,8)
movslq -0xb8(%rbp), %rsi
imulq %rdi, %rsi
shlq $0x3, %rsi
addq %rsi, %rcx
movslq -0xbc(%rbp), %rsi
xorps %xmm0, %xmm0
movsd %xmm0, (%rcx,%rsi,8)
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x515c2
jmp 0x5167a
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x515ab
movl $0x40490fda, -0x6c4(%rbp) # imm = 0x40490FDA
movss -0x6c4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x2e9d4(%rip), %xmm0    # 0x80080
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6c8(%rbp)
movss -0x6c4(%rbp), %xmm0
addss %xmm0, %xmm0
movss %xmm0, -0x6cc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x6e0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x6e8(%rbp)
movl -0x14(%rbp), %eax
leaq 0xf(,%rax,4), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x7d0(%rbp)
movq %rcx, %rsp
movq %rax, -0x6f8(%rbp)
movl $0x0, -0x6fc(%rbp)
movl -0x6fc(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x521f8
movq -0x8(%rbp), %rax
movslq -0x6fc(%rbp), %rcx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x6e0(%rbp)
movq -0x6e0(%rbp), %rax
movq (%rax), %rdi
addq $0x18, %rdi
callq 0x14250
movl %eax, -0x700(%rbp)
cmpl $0x0, -0x700(%rbp)
jge 0x51768
jmp 0x521e4
movq -0x6e0(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jge 0x51782
movq -0x6e0(%rbp), %rax
cmpl $0x0, 0x38(%rax)
jl 0x51787
jmp 0x521e4
movq -0x6e0(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jge 0x5179c
jmp 0x521e4
movq -0x6e0(%rbp), %rax
movq (%rax), %rax
movsbl 0x68(%rax), %edi
callq 0x2bec0
movl %eax, -0xbc(%rbp)
movq -0x10(%rbp), %rax
movq -0x6e0(%rbp), %rcx
movq (%rcx), %rcx
movslq 0x54(%rcx), %rcx
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x6e8(%rbp)
movq -0x6e0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x6f0(%rbp)
cmpq $0x0, -0x6f0(%rbp)
je 0x521e2
movq -0x6f0(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jl 0x521e2
movq -0x7a0(%rbp), %rax
movq -0x7a8(%rbp), %rdx
movq -0x7b0(%rbp), %rcx
movq -0x7b8(%rbp), %rdi
movq -0x7c0(%rbp), %rsi
movq -0x7c8(%rbp), %r9
movl $0x0, -0xb8(%rbp)
movq -0x6e0(%rbp), %r8
movsd 0x58(%r8), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r10
imulq %r9, %r10
shlq $0x3, %r10
movq %rsi, %r8
addq %r10, %r8
movslq -0x700(%rbp), %r10
addsd (%r8,%r10,8), %xmm0
movsd %xmm0, (%r8,%r10,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r10
imulq %rdi, %r10
shlq $0x3, %r10
movq %rcx, %r8
addq %r10, %r8
movslq -0x700(%rbp), %r10
addsd (%r8,%r10,8), %xmm0
movsd %xmm0, (%r8,%r10,8)
movq -0x6e8(%rbp), %r8
movsd 0x58(%r8), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r8
imulq %r9, %r8
shlq $0x3, %r8
addq %r8, %rsi
movslq -0x700(%rbp), %r8
addsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%rsi,%r8,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rsi
imulq %rdi, %rsi
shlq $0x3, %rsi
addq %rsi, %rcx
movslq -0x700(%rbp), %rsi
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x700(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x2, %edx
movl %edx, (%rax,%rcx,4)
movq -0x6e0(%rbp), %rax
movsd 0x58(%rax), %xmm0
movq -0x6e8(%rbp), %rax
subsd 0x58(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0xe0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xe0(%rbp,%rax,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0x100(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x100(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
movl -0xb4(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xb4(%rbp,%rax,4)
cmpl $0x0, -0xbc(%rbp)
jl 0x51ab7
cmpl $0x14, -0xbc(%rbp)
jge 0x51ab7
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x2e0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x4c0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd 0x2459b(%rip), %xmm0    # 0x76048
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x6f0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x6f0(%rbp)
cmpq $0x0, -0x6f0(%rbp)
je 0x521e0
movq -0x6f0(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jl 0x521e0
movl $0x1, -0xb8(%rbp)
movq -0x6e0(%rbp), %rax
movsd 0x60(%rax), %xmm0
movq -0x6e0(%rbp), %rax
divsd 0x58(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x704(%rbp), %rdi
callq 0x52dc0
movss %xmm0, -0x708(%rbp)
movq -0x6e8(%rbp), %rax
movsd 0x60(%rax), %xmm0
movq -0x6e8(%rbp), %rax
divsd 0x58(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
leaq -0x70c(%rbp), %rdi
callq 0x52dc0
movss %xmm0, -0x710(%rbp)
movss -0x708(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1110
movq -0x7c8(%rbp), %rdi
movq -0x7c0(%rbp), %rcx
movq -0x7b8(%rbp), %rdx
movq -0x7b0(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rsi
imulq %rdi, %rsi
shlq $0x3, %rsi
addq %rsi, %rcx
movslq -0x700(%rbp), %rsi
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x700(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movss -0x710(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1110
movq -0x7c8(%rbp), %r9
movq -0x7c0(%rbp), %rsi
movq -0x7b8(%rbp), %rdi
movq -0x7b0(%rbp), %rcx
movq -0x7a8(%rbp), %rdx
movq -0x7a0(%rbp), %rax
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r8
imulq %r9, %r8
shlq $0x3, %r8
addq %r8, %rsi
movslq -0x700(%rbp), %r8
addsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%rsi,%r8,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rsi
imulq %rdi, %rsi
shlq $0x3, %rsi
addq %rsi, %rcx
movslq -0x700(%rbp), %rsi
addsd (%rcx,%rsi,8), %xmm0
movsd %xmm0, (%rcx,%rsi,8)
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0x700(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x2, %edx
movl %edx, (%rax,%rcx,4)
movss -0x70c(%rbp), %xmm0
movss -0x708(%rbp), %xmm2
movss -0x704(%rbp), %xmm1
mulss -0x710(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x11f0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0xe0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xe0(%rbp,%rax,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0x100(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x100(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
movl -0xb4(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xb4(%rbp,%rax,4)
cmpl $0x0, -0xbc(%rbp)
jl 0x51e36
cmpl $0x14, -0xbc(%rbp)
jge 0x51e36
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x2e0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x4c0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd 0x2421c(%rip), %xmm0    # 0x76048
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq -0x6f0(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x6f0(%rbp)
cmpq $0x0, -0x6f0(%rbp)
je 0x521de
movq -0x6f0(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x54(%rax)
jl 0x521de
movq -0x7d0(%rbp), %rax
movq -0x7a0(%rbp), %rcx
movq -0x7a8(%rbp), %rsi
movq -0x7b0(%rbp), %rdx
movq -0x7b8(%rbp), %r8
movq -0x7c0(%rbp), %rdi
movq -0x7c8(%rbp), %r10
movl $0x2, -0xb8(%rbp)
movq -0x6e0(%rbp), %r9
movsd 0x68(%r9), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r11
imulq %r10, %r11
shlq $0x3, %r11
movq %rdi, %r9
addq %r11, %r9
movslq -0x700(%rbp), %r11
addsd (%r9,%r11,8), %xmm0
movsd %xmm0, (%r9,%r11,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r11
imulq %r8, %r11
shlq $0x3, %r11
movq %rdx, %r9
addq %r11, %r9
movslq -0x700(%rbp), %r11
addsd (%r9,%r11,8), %xmm0
movsd %xmm0, (%r9,%r11,8)
movq -0x6e8(%rbp), %r9
movsd 0x68(%r9), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %r9
imulq %r10, %r9
shlq $0x3, %r9
addq %r9, %rdi
movslq -0x700(%rbp), %r9
addsd (%rdi,%r9,8), %xmm0
movsd %xmm0, (%rdi,%r9,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rdi
imulq %r8, %rdi
shlq $0x3, %rdi
addq %rdi, %rdx
movslq -0x700(%rbp), %rdi
addsd (%rdx,%rdi,8), %xmm0
movsd %xmm0, (%rdx,%rdi,8)
movslq -0xb8(%rbp), %rdx
imulq %rsi, %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
movslq -0x700(%rbp), %rdx
movl (%rcx,%rdx,4), %esi
addl $0x2, %esi
movl %esi, (%rcx,%rdx,4)
movq -0x6e8(%rbp), %rcx
movsd 0x68(%rcx), %xmm0
cvtsd2ss %xmm0, %xmm0
movslq -0x6fc(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq -0x6e0(%rbp), %rax
movsd 0x68(%rax), %xmm0
movq -0x6e8(%rbp), %rax
subsd 0x68(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movss -0x6d0(%rbp), %xmm0
ucomiss -0x6c4(%rbp), %xmm0
jbe 0x52040
movss -0x6cc(%rbp), %xmm1
movss -0x6d0(%rbp), %xmm0
subss %xmm1, %xmm0
movss %xmm0, -0x6d0(%rbp)
jmp 0x5207c
movss -0x6d0(%rbp), %xmm1
movss -0x6c4(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
ucomiss %xmm1, %xmm0
jbe 0x5207a
movss -0x6cc(%rbp), %xmm0
addss -0x6d0(%rbp), %xmm0
movss %xmm0, -0x6d0(%rbp)
jmp 0x5207c
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movaps 0x2a401(%rip), %xmm1    # 0x7c490
pand %xmm1, %xmm0
movss -0x6c8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movw %ax, %cx
movq -0x6e0(%rbp), %rax
movw %cx, 0x70(%rax)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0xe0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0xe0(%rbp,%rax,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rax
addsd -0x100(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x100(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
movl -0xb4(%rbp,%rax,4), %ecx
addl $0x1, %ecx
movl %ecx, -0xb4(%rbp,%rax,4)
cmpl $0x0, -0xbc(%rbp)
jl 0x521dc
cmpl $0x14, -0xbc(%rbp)
jge 0x521dc
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x2e0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movss -0x6d0(%rbp), %xmm0
mulss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x4c0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd 0x23e76(%rip), %xmm0    # 0x76048
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x521de
jmp 0x521e0
jmp 0x521e2
jmp 0x521e4
movl -0x6fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6fc(%rbp)
jmp 0x51716
leaq -0x780(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x2eb6d(%rip), %rsi     # 0x80d77
movb $0x0, %al
callq 0x1200
leaq -0x780(%rbp), %rdi
leaq 0x2a153(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x788(%rbp)
leaq -0x780(%rbp), %rsi
leaq 0x252b5(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
movq -0x788(%rbp), %rdi
leaq 0x2eb45(%rip), %rsi     # 0x80d93
movb $0x0, %al
callq 0x1150
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
leaq 0x3933c(%rip), %rcx     # 0x8b5a8
cmpl (%rcx), %eax
jge 0x5240d
movq -0x7a0(%rbp), %rax
movq -0x7a8(%rbp), %rcx
movq -0x788(%rbp), %rdi
movslq -0xbc(%rbp), %rsi
leaq 0x3ab59(%rip), %rdx     # 0x8cdf0
imulq $0x3, %rsi, %rsi
addq %rsi, %rdx
shlq $0x0, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
leaq 0x2eb05(%rip), %rsi     # 0x80dbf
movb $0x0, %al
callq 0x1150
movl $0x0, -0xb8(%rbp)
cmpl $0x3, -0xb8(%rbp)
jge 0x523e4
movq -0x7b0(%rbp), %rsi
movq -0x7b8(%rbp), %r8
movq -0x7c0(%rbp), %rdi
movq -0x7c8(%rbp), %r9
movq -0x7a0(%rbp), %rax
movq -0x7a8(%rbp), %rdx
movslq -0xb8(%rbp), %rcx
imulq %r9, %rcx
shlq $0x3, %rcx
addq %rcx, %rdi
movslq -0xbc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rdi
movslq -0xb8(%rbp), %rcx
imulq %r8, %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movslq -0xbc(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rsi
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
callq 0x52e70
movq -0x7c8(%rbp), %r8
movq -0x7c0(%rbp), %rcx
movq -0x7b8(%rbp), %rdx
movq -0x7b0(%rbp), %rax
movq -0x788(%rbp), %rdi
movslq -0xb8(%rbp), %rsi
imulq %r8, %rsi
shlq $0x3, %rsi
addq %rsi, %rcx
movslq -0xbc(%rbp), %rsi
movsd (%rcx,%rsi,8), %xmm0
movslq -0xb8(%rbp), %rcx
imulq %rdx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
leaq 0x2e9ff(%rip), %rsi     # 0x80dc8
movb $0x2, %al
callq 0x1150
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x522cb
movq -0x788(%rbp), %rdi
leaq 0x2bc86(%rip), %rsi     # 0x7e078
movb $0x0, %al
callq 0x1150
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x5225f
movq -0x788(%rbp), %rdi
leaq 0x2f502(%rip), %rsi     # 0x8191d
movb $0x0, %al
callq 0x1150
movl $0x0, -0xb8(%rbp)
cmpl $0x3, -0xb8(%rbp)
jge 0x5263d
cmpl $0x0, -0xb8(%rbp)
jne 0x52459
movq -0x788(%rbp), %rdi
leaq 0x2e983(%rip), %rsi     # 0x80dd3
movb $0x0, %al
callq 0x1150
jmp 0x5249b
cmpl $0x1, -0xb8(%rbp)
jne 0x52479
movq -0x788(%rbp), %rdi
leaq 0x2e976(%rip), %rsi     # 0x80de6
movb $0x0, %al
callq 0x1150
jmp 0x52499
cmpl $0x2, -0xb8(%rbp)
jne 0x52497
movq -0x788(%rbp), %rdi
leaq 0x2e969(%rip), %rsi     # 0x80df9
movb $0x0, %al
callq 0x1150
jmp 0x52499
jmp 0x5249b
movslq -0xb8(%rbp), %rax
cvtsi2sdl -0xb4(%rbp,%rax,4), %xmm1
movslq -0xb8(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0xe0(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
cvtsi2sdl -0xb4(%rbp,%rax,4), %xmm1
movslq -0xb8(%rbp), %rax
movsd -0x100(%rbp,%rax,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp,%rax,8)
movslq -0xb8(%rbp), %rax
movsd -0x100(%rbp,%rax,8), %xmm1
movslq -0xb8(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
movslq -0xb8(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm2
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq -0xb8(%rbp), %rax
movl -0xb4(%rbp,%rax,4), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x1220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movq -0x788(%rbp), %rax
movq %rax, -0x7f0(%rbp)
movslq -0xb8(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x7d8(%rbp)
movss -0x6d0(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x7e8(%rbp)
movslq -0xb8(%rbp), %rax
movsd -0xe0(%rbp,%rax,8), %xmm0
movss -0x6d0(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x7e0(%rbp)
movslq -0xb8(%rbp), %rax
movsd -0x100(%rbp,%rax,8), %xmm0
callq 0x1220
movq -0x7f0(%rbp), %rdi
movsd -0x7e8(%rbp), %xmm1
movsd -0x7e0(%rbp), %xmm2
movaps %xmm0, %xmm3
movsd -0x7d8(%rbp), %xmm0
movslq -0xb8(%rbp), %rax
cvtsi2ssl -0xb4(%rbp,%rax,4), %xmm4
cvtss2sd %xmm4, %xmm4
leaq 0x2e7ea(%rip), %rsi     # 0x80e0c
movb $0x5, %al
callq 0x1150
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x5242c
movq -0x788(%rbp), %rdi
leaq 0x2e7f4(%rip), %rsi     # 0x80e3f
movb $0x0, %al
callq 0x1150
movq -0x788(%rbp), %rdi
leaq 0x2e800(%rip), %rsi     # 0x80e60
movb $0x0, %al
callq 0x1150
movq -0x788(%rbp), %rdi
leaq 0x2e807(%rip), %rsi     # 0x80e7c
movb $0x0, %al
callq 0x1150
movl $0x0, -0xbc(%rbp)
cmpl $0x14, -0xbc(%rbp)
jge 0x52847
movq -0x788(%rbp), %rdi
leaq 0x39a97(%rip), %rax     # 0x8c138
movq (%rax), %rax
movslq -0xbc(%rbp), %rcx
movsbl (%rax,%rcx), %edx
leaq 0x30580(%rip), %rsi     # 0x82c36
movb $0x0, %al
callq 0x1150
movl $0x0, -0xb8(%rbp)
cmpl $0x3, -0xb8(%rbp)
jge 0x5280e
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x52708
jp 0x52708
jmp 0x527b7
movslq -0xb8(%rbp), %rcx
leaq -0x2e0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
divsd (%rax,%rcx,8), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d4(%rbp)
movslq -0xb8(%rbp), %rcx
leaq -0x4c0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq -0xb8(%rbp), %rcx
leaq -0x6a0(%rbp), %rax
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movslq -0xbc(%rbp), %rcx
divsd (%rax,%rcx,8), %xmm0
callq 0x1220
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
jmp 0x527cd
xorps %xmm0, %xmm0
movss %xmm0, -0x6d4(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x6d0(%rbp)
movq -0x788(%rbp), %rdi
movss -0x6d4(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movss -0x6d0(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x2e6ac(%rip), %rsi     # 0x80e9f
movb $0x2, %al
callq 0x1150
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x526c7
movq -0x788(%rbp), %rdi
movslq -0xbc(%rbp), %rax
movsd -0x6a0(%rbp,%rax,8), %xmm0
leaq 0x2e67e(%rip), %rsi     # 0x80eaa
movb $0x1, %al
callq 0x1150
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x52686
leaq 0x39832(%rip), %rax     # 0x8c080
movl (%rax), %esi
leaq 0x2e65a(%rip), %rdi     # 0x80eb1
movb $0x0, %al
callq 0x10d0
leaq 0x2e672(%rip), %rdi     # 0x80ed7
movb $0x0, %al
callq 0x10d0
movq -0x788(%rbp), %rdi
leaq 0x39806(%rip), %rax     # 0x8c080
movl (%rax), %edx
leaq 0x2e62e(%rip), %rsi     # 0x80eb1
movb $0x0, %al
callq 0x1150
movq -0x788(%rbp), %rdi
leaq 0x2e655(%rip), %rsi     # 0x80eed
movb $0x0, %al
callq 0x1150
movq -0x8(%rbp), %rax
movq %rax, -0x6e0(%rbp)
movl $0x0, -0x78c(%rbp)
movl -0x78c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x52a0d
movq -0x6e0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x798(%rbp)
movq -0x798(%rbp), %rdi
addq $0x18, %rdi
leaq 0x23a22(%rip), %rsi     # 0x76308
movl $0x2, %edx
callq 0x1050
cmpl $0x0, %eax
jne 0x529e5
movq -0x6e0(%rbp), %rax
movswl 0x70(%rax), %eax
leaq 0x39775(%rip), %rcx     # 0x8c080
cmpl (%rcx), %eax
jle 0x529e5
movq -0x7d0(%rbp), %rsi
movq -0x788(%rbp), %rdi
movq -0x798(%rbp), %rdx
addq $0x18, %rdx
movq -0x798(%rbp), %rax
movsbl 0x68(%rax), %ecx
movq -0x798(%rbp), %rax
movl 0x64(%rax), %r8d
movq -0x798(%rbp), %rax
movl 0x6c(%rax), %r9d
addl $0x1, %r9d
movq -0x6e0(%rbp), %rax
movswl 0x70(%rax), %eax
movq -0x6e0(%rbp), %r10
movsd 0x68(%r10), %xmm0
movss -0x6c8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movslq -0x78c(%rbp), %r10
movss (%rsi,%r10,4), %xmm1
mulss -0x6c8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x2e57a(%rip), %rsi     # 0x80f13
subq $0x10, %rsp
movl %eax, (%rsp)
movb $0x2, %al
callq 0x1150
addq $0x10, %rsp
movq -0x798(%rbp), %rsi
addq $0x18, %rsi
movq -0x798(%rbp), %rax
movsbl 0x68(%rax), %edx
movq -0x798(%rbp), %rax
movl 0x64(%rax), %ecx
movq -0x6e0(%rbp), %rax
movswl 0x70(%rax), %r8d
leaq 0x2e550(%rip), %rdi     # 0x80f2e
movb $0x0, %al
callq 0x10d0
movq -0x6e0(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0x6e0(%rbp)
movl -0x78c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78c(%rbp)
jmp 0x528b4
movq -0x788(%rbp), %rdi
callq 0x10a0
movq -0x6a8(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)