// File: thunlp[P]KB2E/cluster/apcluster.cpp
// Function: main
int main(int argc, char** argv)
{
  int flag, dn, it, conv, decit, maxits, convits;
  unsigned long i1, i2, j, *i, *k, m, n, l, **dec, *decsum, *idx, K;
  double tmp, *s, *a, *r, *p, *mx1, *mx2, *srp, netsim, dpsim, expref, lam;
  FILE *f;

  /* Usage */
  if((argc!=4)&&(argc!=7)){
    printf("\nUsage:\n\n");
    printf("apcluster <Similarity file> <Preference file> <Output: Index file>\n");
    printf("          [ <maxits> <convits> <dampfact> ]\n\n");
    printf("\nAPCLUSTER uses the affinity propagation algorithm by\n");
    printf("BJ Frey and D Dueck (Science 315, 972-976, Feb 16, 2007)\n");
    printf("to identify data clusters, using a set of real-valued\n");
    printf("pair-wise data point similarities as input. Each cluster is\n");
    printf("represented by a data point called a cluster center, and the\n");
    printf("method searches for clusters so as to maximize a fitness\n");
    printf("function called net similarity. The method is iterative and\n");
    printf("stops after maxits iterations (default: 500) or when the cluster\n");
    printf("centers stay constant for convits iterations (default: 50).\n\n");
    printf("For N data points, there may be as many as N^2-N pair-wise\n");
    printf("similarities (note that the similarity of data point i to k\n");
    printf("need not be equal to the similarity of data point k to i).\n");
    printf("APCLUSTER can work with this full set of similarities or\n");
    printf("a smaller subset (which is helpful when N is large). The\n");
    printf("similarities should be in the input similarity file, where\n");
    printf("each line should be of the form <i k s> where i and k are\n");
    printf("data point indices and s is a real number corresponding\n");
    printf("to the similarity of data point i to data point k.\n\n");
    printf("APCLUSTER automatically determines the number of clusters,\n");
    printf("based on numbers called preferences -- there is one such\n");
    printf("number for each data point and data points with large\n");
    printf("preferences are more likely to be chosen as centers. Values\n");
    printf("of the prefences should be in the input preference file and\n");
    printf("the jth entry in this file should be the preference of the\n");
    printf("jth data point. How should you choose the preferences? A good\n");
    printf("choice is to set all preference values to the median of the\n");
    printf("similarity values. Then, the number of identified clusters can\n");
    printf("be increased or decreased  by changing this value accordingly.\n\n");
    printf("The fitness function (net similarity) used to search for\n");
    printf("solutions equals the sum of the preferences of the the data\n");
    printf("centers plus the sum of the similarities of the other data\n");
    printf("points to their cluster centers.\n\n");
    printf("The identified cluster centers and the assignments of other\n");
    printf("data points to these centers are stored in the output index\n");
    printf("file. The jth entry in this file is the index of the data\n");
    printf("point that is the cluster center for data point j. If the\n");
    printf("jth entry equals j, then data point j is itself a cluster\n");
    printf("center. The sum of the similarities of the data points to\n");
    printf("their cluster centers, the  sum of the preferences of the\n");
    printf("identified cluster centers, and the fitness or net similarity\n");
    printf("(sum of the data point similarities and preferences) are\n");
    printf("printed to the screen.\n\n");
    printf("See http://www.psi.toronto.edu/affinitypropagation for test\n");
    printf("files and MATLAB software.\n\n");
    printf("Copyright 2007, BJ Frey and D Dueck. This software may be\n");
    printf("freely distributed and used for non-commercial purposes.\n\n");
    return 0 ;
  }

  if (MINDOUBLE==0.0) {
	  printf("There are numerical precision problems on this architecture.  Please recompile after adjusting MIN_DOUBLE and MAX_DOUBLE\n\n");
  }

  /* Parse command line */
  if(argc==4){ lam=0.9; maxits=500; convits=50;
  } else {
    flag=sscanf(argv[4],"%d",&maxits);
    if(flag==1){
      flag=sscanf(argv[5],"%d",&convits);
      if(flag==1){
	flag=sscanf(argv[6],"%lf",&lam);
	if(flag==0){
	  printf("\n\n*** Error in <damping factor> argument\n\n");
	  return 0;
	}
      } else {
	printf("\n\n*** Error in <convergence iterations> argument\n\n");
	return 0;
      }
    } else {
      printf("\n\n*** Error in <maximum iterations> argument\n\n");
      return 0;
    }
  }
  if(maxits<1){
    printf("\n\n*** Error: maximum number of iterations must be at least 1\n\n");
    return 0 ;
  }
  if(convits<1){
    printf("\n\n*** Error: number of iterations to test convergence must be at least 1\n\n");
    return 0 ;
  }
  if((lam<0.5)||(lam>=1)){
    printf("\n\n*** Error: damping factor must be between 0.5 and 1\n\n");
    return 0 ;
  }
  printf("\nmaxits=%d, convits=%d, dampfact=%lf\n",maxits,convits,lam);


  /* Find out how many data points and similarities there are */
  f=fopen(argv[1],"r");
  if(f==NULL){
    printf("\n\n*** Error opening similarities file\n\n");
    return 0;
  }
  m=0; n=0;
  flag=fscanf(f,"%lu %lu %lf",&i1,&i2,&tmp);
  while(flag!=EOF){
    if(i1>n) n=i1;
    if(i2>n) n=i2;
    m=m+1;
    flag=fscanf(f,"%lu %lu %lf",&i1,&i2,&tmp);
  }
  fclose(f);

  /* Allocate memory for similarities, preferences, messages, etc */
  i=(unsigned long *)calloc(m+n,sizeof(unsigned long));
  k=(unsigned long *)calloc(m+n,sizeof(unsigned long));
  s=(double *)calloc(m+n,sizeof(double));
  a=(double *)calloc(m+n,sizeof(double));
  r=(double *)calloc(m+n,sizeof(double));
  mx1=(double *)calloc(n,sizeof(double));
  mx2=(double *)calloc(n,sizeof(double));
  srp=(double *)calloc(n,sizeof(double));
  dec=(unsigned long **)calloc(convits,sizeof(unsigned long *));
  for(j=0;j<convits;j++)
    dec[j]=(unsigned long *)calloc(n,sizeof(unsigned long));
  decsum=(unsigned long *)calloc(n,sizeof(unsigned long));
  idx=(unsigned long *)calloc(n,sizeof(unsigned long));

  /* Read similarities and preferences */
  f=fopen(argv[1],"r");
  for(j=0;j<m;j++){
    fscanf(f,"%lu %lu %lf",&(i[j]),&(k[j]),&(s[j]));
    i[j]--; k[j]--;
  }
  fclose(f);
  f=fopen(argv[2],"r");
  if(f==NULL){
    printf("\n\n*** Error opening preferences file\n\n");
    return 0;
  }
  for(j=0;j<n;j++){
    i[m+j]=j; k[m+j]=j;
    flag=fscanf(f,"%lf",&(s[m+j]));
  }
  fclose(f);
  if(flag==EOF){
    printf("\n*** Error: Number of entries in the preferences file is\n");
    printf("    less than number of data points\n\n");
    return 0;
  }
  m=m+n;

  /* Include a tiny amount of noise in similarities to avoid degeneracies */
  for(j=0;j<m;j++) s[j]=s[j]+(1e-16*s[j]+MINDOUBLE*100)*(rand()/((double)RAND_MAX+1));

  /* Initialize availabilities to 0 and run affinity propagation */
  for(j=0;j<m;j++) a[j]=0.0;
  for(j=0;j<convits;j++) for(i1=0;i1<n;i1++) dec[j][i1]=0;
  for(j=0;j<n;j++) decsum[j]=0;
  dn=0; it=0; decit=convits;
  while(dn==0){
    it++; /* Increase iteration index */

    /* Compute responsibilities */
    for(j=0;j<n;j++){ mx1[j]=-MAXDOUBLE; mx2[j]=-MAXDOUBLE; }
    for(j=0;j<m;j++){
      tmp=a[j]+s[j];
      if(tmp>mx1[i[j]]){
	mx2[i[j]]=mx1[i[j]];
	mx1[i[j]]=tmp;
      } else if(tmp>mx2[i[j]]) mx2[i[j]]=tmp;
    }
    for(j=0;j<m;j++){
      tmp=a[j]+s[j];
      if(tmp==mx1[i[j]]) r[j]=lam*r[j]+(1-lam)*(s[j]-mx2[i[j]]);
      else r[j]=lam*r[j]+(1-lam)*(s[j]-mx1[i[j]]);
    }

    /* Compute availabilities */
    for(j=0;j<n;j++) srp[j]=0.0;
    for(j=0;j<m-n;j++) if(r[j]>0.0) srp[k[j]]=srp[k[j]]+r[j];
    for(j=m-n;j<m;j++) srp[k[j]]=srp[k[j]]+r[j];
    for(j=0;j<m-n;j++){
      if(r[j]>0.0) tmp=srp[k[j]]-r[j]; else tmp=srp[k[j]];
      if(tmp<0.0) a[j]=lam*a[j]+(1-lam)*tmp; else a[j]=lam*a[j];
    }
    for(j=m-n;j<m;j++) a[j]=lam*a[j]+(1-lam)*(srp[k[j]]-r[j]);

    /* Identify exemplars and check to see if finished */
    decit++; if(decit>=convits) decit=0;
    for(j=0;j<n;j++) decsum[j]=decsum[j]-dec[decit][j];
    for(j=0;j<n;j++)
      if(a[m-n+j]+r[m-n+j]>0.0) dec[decit][j]=1; else dec[decit][j]=0;
    K=0; for(j=0;j<n;j++) K=K+dec[decit][j];
    for(j=0;j<n;j++) decsum[j]=decsum[j]+dec[decit][j];
    if((it>=convits)||(it>=maxits)){
      /* Check convergence */
      conv=1; for(j=0;j<n;j++) if((decsum[j]!=0)&&(decsum[j]!=convits)) conv=0;
      /* Check to see if done */
      if(((conv==1)&&(K>0))||(it==maxits)) dn=1;
    }
  }
  /* If clusters were identified, find the assignments and output them */
  if(K>0){
    for(j=0;j<m;j++)
      if(dec[decit][k[j]]==1) a[j]=0.0; else a[j]=-MAXDOUBLE;
    for(j=0;j<n;j++) mx1[j]=-MAXDOUBLE;
    for(j=0;j<m;j++){
      tmp=a[j]+s[j];
      if(tmp>mx1[i[j]]){
	mx1[i[j]]=tmp;
	idx[i[j]]=k[j];
      }
    }
    for(j=0;j<n;j++) if(dec[decit][j]) idx[j]=j;
    for(j=0;j<n;j++) srp[j]=0.0;
    for(j=0;j<m;j++) if(idx[i[j]]==idx[k[j]]) srp[k[j]]=srp[k[j]]+s[j];
    for(j=0;j<n;j++) mx1[j]=-MAXDOUBLE;
    for(j=0;j<n;j++) if(srp[j]>mx1[idx[j]]) mx1[idx[j]]=srp[j];
    for(j=0;j<n;j++)
      if(srp[j]==mx1[idx[j]]) dec[decit][j]=1; else dec[decit][j]=0;
    for(j=0;j<m;j++)
      if(dec[decit][k[j]]==1) a[j]=0.0; else a[j]=-MAXDOUBLE;
    for(j=0;j<n;j++) mx1[j]=-MAXDOUBLE;
    for(j=0;j<m;j++){
      tmp=a[j]+s[j];
      if(tmp>mx1[i[j]]){
	mx1[i[j]]=tmp;
	idx[i[j]]=k[j];
      }
    }
    for(j=0;j<n;j++) if(dec[decit][j]) idx[j]=j;
    f=fopen(argv[3],"w");
    for(j=0;j<n;j++) fprintf(f,"%lu\n",idx[j]+1);
    fclose(f);
    dpsim=0.0; expref=0.0;
    for(j=0;j<m;j++){
      if(idx[i[j]]==k[j]){
	if(i[j]==k[j]) expref=expref+s[j];
	else dpsim=dpsim+s[j];
      }
    }
    netsim=dpsim+expref;
    printf("\nNumber of identified clusters: %d\n",K);
    printf("Fitness (net similarity): %f\n",netsim);
    printf("  Similarities of data points to exemplars: %f\n",dpsim);
    printf("  Preferences of selected exemplars: %f\n",expref);
    printf("Number of iterations: %d\n\n",it);
  } else printf("\nDid not identify any clusters\n");
  if(conv==0){
    printf("\n*** Warning: Algorithm did not converge. Consider increasing\n");
    printf("    maxits to enable more iterations. It may also be necessary\n");
    printf("    to increase damping (increase dampfact).\n\n");
  }
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movl $0x0, 0x104(%rsp)
movl %edi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
cmpl $0x4, 0x100(%rsp)
je 0x14ab
cmpl $0x7, 0x100(%rsp)
je 0x14ab
leaq 0x2e4c(%rip), %rdi      # 0x4040
movb $0x0, %al
callq 0x1030
leaq 0x2e48(%rip), %rdi      # 0x404a
movb $0x0, %al
callq 0x1030
leaq 0x2e7e(%rip), %rdi      # 0x408e
movb $0x0, %al
callq 0x1030
leaq 0x2e9e(%rip), %rdi      # 0x40bc
movb $0x0, %al
callq 0x1030
leaq 0x2ec7(%rip), %rdi      # 0x40f3
movb $0x0, %al
callq 0x1030
leaq 0x2ef3(%rip), %rdi      # 0x412d
movb $0x0, %al
callq 0x1030
leaq 0x2f1c(%rip), %rdi      # 0x4164
movb $0x0, %al
callq 0x1030
leaq 0x2f4b(%rip), %rdi      # 0x41a1
movb $0x0, %al
callq 0x1030
leaq 0x2f7b(%rip), %rdi      # 0x41df
movb $0x0, %al
callq 0x1030
leaq 0x2fa7(%rip), %rdi      # 0x4219
movb $0x0, %al
callq 0x1030
leaq 0x2fd6(%rip), %rdi      # 0x4256
movb $0x0, %al
callq 0x1030
leaq 0x300a(%rip), %rdi      # 0x4298
movb $0x0, %al
callq 0x1030
leaq 0x303a(%rip), %rdi      # 0x42d6
movb $0x0, %al
callq 0x1030
leaq 0x3068(%rip), %rdi      # 0x4312
movb $0x0, %al
callq 0x1030
leaq 0x3097(%rip), %rdi      # 0x434f
movb $0x0, %al
callq 0x1030
leaq 0x30c5(%rip), %rdi      # 0x438b
movb $0x0, %al
callq 0x1030
leaq 0x30f1(%rip), %rdi      # 0x43c5
movb $0x0, %al
callq 0x1030
leaq 0x311d(%rip), %rdi      # 0x43ff
movb $0x0, %al
callq 0x1030
leaq 0x314b(%rip), %rdi      # 0x443b
movb $0x0, %al
callq 0x1030
leaq 0x3178(%rip), %rdi      # 0x4476
movb $0x0, %al
callq 0x1030
leaq 0x31a3(%rip), %rdi      # 0x44af
movb $0x0, %al
callq 0x1030
leaq 0x31ca(%rip), %rdi      # 0x44e4
movb $0x0, %al
callq 0x1030
leaq 0x31f8(%rip), %rdi      # 0x4520
movb $0x0, %al
callq 0x1030
leaq 0x3224(%rip), %rdi      # 0x455a
movb $0x0, %al
callq 0x1030
leaq 0x324d(%rip), %rdi      # 0x4591
movb $0x0, %al
callq 0x1030
leaq 0x327c(%rip), %rdi      # 0x45ce
movb $0x0, %al
callq 0x1030
leaq 0x32ab(%rip), %rdi      # 0x460b
movb $0x0, %al
callq 0x1030
leaq 0x32d9(%rip), %rdi      # 0x4647
movb $0x0, %al
callq 0x1030
leaq 0x330a(%rip), %rdi      # 0x4686
movb $0x0, %al
callq 0x1030
leaq 0x3339(%rip), %rdi      # 0x46c3
movb $0x0, %al
callq 0x1030
leaq 0x336b(%rip), %rdi      # 0x4703
movb $0x0, %al
callq 0x1030
leaq 0x339e(%rip), %rdi      # 0x4744
movb $0x0, %al
callq 0x1030
leaq 0x33ca(%rip), %rdi      # 0x477e
movb $0x0, %al
callq 0x1030
leaq 0x33f9(%rip), %rdi      # 0x47bb
movb $0x0, %al
callq 0x1030
leaq 0x3427(%rip), %rdi      # 0x47f7
movb $0x0, %al
callq 0x1030
leaq 0x343c(%rip), %rdi      # 0x481a
movb $0x0, %al
callq 0x1030
leaq 0x346b(%rip), %rdi      # 0x4857
movb $0x0, %al
callq 0x1030
leaq 0x349a(%rip), %rdi      # 0x4894
movb $0x0, %al
callq 0x1030
leaq 0x34c7(%rip), %rdi      # 0x48cf
movb $0x0, %al
callq 0x1030
leaq 0x34f4(%rip), %rdi      # 0x490a
movb $0x0, %al
callq 0x1030
leaq 0x3521(%rip), %rdi      # 0x4945
movb $0x0, %al
callq 0x1030
leaq 0x354e(%rip), %rdi      # 0x4980
movb $0x0, %al
callq 0x1030
leaq 0x357b(%rip), %rdi      # 0x49bb
movb $0x0, %al
callq 0x1030
leaq 0x35ac(%rip), %rdi      # 0x49fa
movb $0x0, %al
callq 0x1030
leaq 0x35d8(%rip), %rdi      # 0x4a34
movb $0x0, %al
callq 0x1030
leaq 0x35e3(%rip), %rdi      # 0x4a4d
movb $0x0, %al
callq 0x1030
leaq 0x3612(%rip), %rdi      # 0x4a8a
movb $0x0, %al
callq 0x1030
leaq 0x3621(%rip), %rdi      # 0x4aa7
movb $0x0, %al
callq 0x1030
leaq 0x364e(%rip), %rdi      # 0x4ae2
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
cmpl $0x4, 0x100(%rsp)
jne 0x14de
movsd 0x2b4b(%rip), %xmm0     # 0x4008
movsd %xmm0, 0x18(%rsp)
movl $0x1f4, 0xe0(%rsp) # imm = 0x1F4
movl $0x32, 0xdc(%rsp)
jmp 0x15d8
movq 0xf8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0x362c(%rip), %rsi      # 0x4b1d
leaq 0xe0(%rsp), %rdx
movb $0x0, %al
callq 0x1060
movl %eax, 0xf4(%rsp)
cmpl $0x1, 0xf4(%rsp)
jne 0x15b8
movq 0xf8(%rsp), %rax
movq 0x28(%rax), %rdi
leaq 0x35f5(%rip), %rsi      # 0x4b1d
leaq 0xdc(%rsp), %rdx
movb $0x0, %al
callq 0x1060
movl %eax, 0xf4(%rsp)
cmpl $0x1, 0xf4(%rsp)
jne 0x1598
movq 0xf8(%rsp), %rax
movq 0x30(%rax), %rdi
leaq 0x376c(%rip), %rsi      # 0x4cc7
leaq 0x18(%rsp), %rdx
movb $0x0, %al
callq 0x1060
movl %eax, 0xf4(%rsp)
cmpl $0x0, 0xf4(%rsp)
jne 0x1596
leaq 0x35a1(%rip), %rdi      # 0x4b20
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
jmp 0x15b6
leaq 0x35ac(%rip), %rdi      # 0x4b4b
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
jmp 0x15d6
leaq 0x35bf(%rip), %rdi      # 0x4b7e
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
jmp 0x15d8
cmpl $0x1, 0xe0(%rsp)
jge 0x1600
leaq 0x35c4(%rip), %rdi      # 0x4bad
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
cmpl $0x1, 0xdc(%rsp)
jge 0x1628
leaq 0x35db(%rip), %rdi      # 0x4bec
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
movsd 0x29e0(%rip), %xmm0     # 0x4010
ucomisd 0x18(%rsp), %xmm0
ja 0x164c
movsd 0x18(%rsp), %xmm0
movsd 0x29d2(%rip), %xmm1     # 0x4018
ucomisd %xmm1, %xmm0
jb 0x166a
leaq 0x35e4(%rip), %rdi      # 0x4c37
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
movl 0xe0(%rsp), %esi
movl 0xdc(%rsp), %edx
movsd 0x18(%rsp), %xmm0
leaq 0x35ea(%rip), %rdi      # 0x4c6f
movb $0x1, %al
callq 0x1030
movq 0xf8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x35f6(%rip), %rsi      # 0x4c95
callq 0x1080
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x16cf
leaq 0x35df(%rip), %rdi      # 0x4c97
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
movq $0x0, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x35cc(%rip), %rsi      # 0x4cbf
leaq 0xd0(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0x70(%rsp), %r8
movb $0x0, %al
callq 0x10a0
movl %eax, 0xf4(%rsp)
cmpl $-0x1, 0xf4(%rsp)
je 0x17b0
movq 0xd0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jbe 0x1746
movq 0xd0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xc8(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jbe 0x1768
movq 0xc8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x3537(%rip), %rsi      # 0x4cbf
leaq 0xd0(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0x70(%rsp), %r8
movb $0x0, %al
callq 0x10a0
movl %eax, 0xf4(%rsp)
jmp 0x1716
movq 0x10(%rsp), %rdi
callq 0x1070
movq 0xa8(%rsp), %rdi
addq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0xb8(%rsp)
movq 0xa8(%rsp), %rdi
addq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0xb0(%rsp)
movq 0xa8(%rsp), %rdi
addq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x68(%rsp)
movq 0xa8(%rsp), %rdi
addq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x60(%rsp)
movq 0xa8(%rsp), %rdi
addq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x58(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x38(%rsp)
movslq 0xdc(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x90(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movslq 0xdc(%rsp), %rcx
cmpq %rcx, %rax
jae 0x191a
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, %rdx
movq 0x90(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x18c6
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x88(%rsp)
movq 0xa0(%rsp), %rdi
movl $0x8, %esi
callq 0x1050
movq %rax, 0x80(%rsp)
movq 0xf8(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x3334(%rip), %rsi      # 0x4c95
callq 0x1080
movq %rax, 0x10(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x1a33
movq 0x10(%rsp), %rdi
movq 0xb8(%rsp), %rdx
movq 0xc0(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq 0x68(%rsp), %r8
movq 0xc0(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r8
leaq 0x32e4(%rip), %rsi      # 0x4cbf
movb $0x0, %al
callq 0x10a0
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $-0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xb0(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $-0x1, %rdx
movq %rdx, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1977
movq 0x10(%rsp), %rdi
callq 0x1070
movq 0xf8(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x3245(%rip), %rsi      # 0x4c95
callq 0x1080
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x1a80
leaq 0x3262(%rip), %rdi      # 0x4ccb
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x1b39
movq 0xc0(%rsp), %rdx
movq 0xb8(%rsp), %rax
movq 0xa8(%rsp), %rcx
addq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xc0(%rsp), %rdx
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rcx
addq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rdi
movq 0x68(%rsp), %rdx
movq 0xa8(%rsp), %rax
addq 0xc0(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x31b5(%rip), %rsi      # 0x4cc7
movb $0x0, %al
callq 0x10a0
movl %eax, 0xf4(%rsp)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1a8c
movq 0x10(%rsp), %rdi
callq 0x1070
cmpl $-0x1, 0xf4(%rsp)
jne 0x1b79
leaq 0x319e(%rip), %rdi      # 0x4cf2
movb $0x0, %al
callq 0x1030
leaq 0x31ca(%rip), %rdi      # 0x4d2c
movb $0x0, %al
callq 0x1030
movl $0x0, 0x104(%rsp)
jmp 0x3106
movq 0xa8(%rsp), %rax
addq 0xa0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x1c4d
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x244b(%rip), %xmm1     # 0x4030
mulsd %xmm1, %xmm0
movsd 0x2447(%rip), %xmm1     # 0x4038
addsd %xmm1, %xmm0
movsd %xmm0, (%rsp)
callq 0x1040
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
cvtsi2sd %eax, %xmm2
movsd 0x2412(%rip), %xmm3     # 0x4028
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1b9d
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x1c96
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1c59
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movslq 0xdc(%rsp), %rcx
cmpq %rcx, %rax
jae 0x1d2a
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x1d0f
movq 0x90(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xd0(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x1cc3
jmp 0x1d11
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1ca2
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x1d76
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1d36
movl $0x0, 0xf0(%rsp)
movl $0x0, 0xec(%rsp)
movl 0xdc(%rsp), %eax
movl %eax, 0xe4(%rsp)
cmpl $0x0, 0xf0(%rsp)
jne 0x278f
movl 0xec(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xec(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x1e21
movq 0x48(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x2234(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
movq 0x40(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x221a(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1dc5
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x1f5c
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x1ef5
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1f41
movsd 0x70(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x1f3f
movsd 0x70(%rsp), %xmm0
movq 0x40(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x1f41
jmp 0x1f43
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1e2d
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x20d5
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jne 0x2046
jp 0x2046
movsd 0x18(%rsp), %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x2028(%rip), %xmm1     # 0x4018
subsd 0x18(%rsp), %xmm1
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movq 0x40(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x20ba
movsd 0x18(%rsp), %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x1fb2(%rip), %xmm1     # 0x4018
subsd 0x18(%rsp), %xmm1
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm3
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
subsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x20bc
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x1f68
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x211e
movq 0x38(%rsp), %rax
movq 0xc0(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x20e1
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
jae 0x21cf
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x21b4
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x21b6
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x212a
movq 0xa8(%rsp), %rax
subq 0xa0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x225d
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x21e7
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
cmpq %rcx, %rax
jae 0x2399
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x22dd
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x2301
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x70(%rsp), %xmm0
jbe 0x2354
movsd 0x18(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x1cec(%rip), %xmm1     # 0x4018
subsd 0x18(%rsp), %xmm1
mulsd 0x70(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x237e
movsd 0x18(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2380
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2269
movq 0xa8(%rsp), %rax
subq 0xa0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2454
movsd 0x18(%rsp), %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x1c31(%rip), %xmm1     # 0x4018
subsd 0x18(%rsp), %xmm1
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm3
movq 0x58(%rsp), %rax
movq 0xc0(%rsp), %rcx
subsd (%rax,%rcx,8), %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x23b1
movl 0xe4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xe4(%rsp)
movl 0xe4(%rsp), %eax
cmpl 0xdc(%rsp), %eax
jl 0x2480
movl $0x0, 0xe4(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x24fc
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
subq (%rax,%rcx,8), %rdx
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x248c
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x25d0
movq 0x60(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
addq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x58(%rsp), %rax
movq 0xa8(%rsp), %rcx
subq 0xa0(%rsp), %rcx
addq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2591
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
movq $0x1, (%rax,%rcx,8)
jmp 0x25b5
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x25b7
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2508
movq $0x0, 0x78(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2637
movq 0x78(%rsp), %rax
movq 0x90(%rsp), %rcx
movslq 0xe4(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq 0xc0(%rsp), %rdx
addq (%rcx,%rdx,8), %rax
movq %rax, 0x78(%rsp)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x25e5
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x26b3
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
addq (%rax,%rcx,8), %rdx
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2643
movl 0xec(%rsp), %eax
cmpl 0xdc(%rsp), %eax
jge 0x26d7
movl 0xec(%rsp), %eax
cmpl 0xe0(%rsp), %eax
jl 0x278a
movl $0x1, 0xe8(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x275b
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2743
movq 0x88(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0xdc(%rsp), %rcx
cmpq %rcx, %rax
je 0x2743
movl $0x0, 0xe8(%rsp)
jmp 0x2745
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x26ee
cmpl $0x1, 0xe8(%rsp)
jne 0x276d
cmpq $0x0, 0x78(%rsp)
ja 0x277d
movl 0xec(%rsp), %eax
cmpl 0xe0(%rsp), %eax
jne 0x2788
movl $0x1, 0xf0(%rsp)
jmp 0x278a
jmp 0x1d9a
cmpq $0x0, 0x78(%rsp)
jbe 0x30c4
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2834
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x1, (%rax,%rcx,8)
jne 0x27ff
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2819
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x180c(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
jmp 0x281b
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x27a7
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2882
movq 0x48(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x17b9(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2840
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2967
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x294c
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xb0(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x80(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x294e
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x288e
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x29dc
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x29c4
movq 0xc0(%rsp), %rdx
movq 0x80(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x29c6
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2973
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2a25
movq 0x38(%rsp), %rax
movq 0xc0(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x29e8
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2af2
movq 0x80(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq 0x80(%rsp), %rcx
movq 0xb0(%rsp), %rdx
movq 0xc0(%rsp), %rsi
movq (%rdx,%rsi,8), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x2ad7
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x38(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2ad9
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2a31
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2b40
movq 0x48(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x14fb(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2afe
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2bdb
movq 0x38(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x2bc0
movq 0x38(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2bc2
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2b4c
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2c96
movq 0x38(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x48(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jne 0x2c57
jp 0x2c57
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
movq $0x1, (%rax,%rcx,8)
jmp 0x2c7b
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
movq $0x0, (%rax,%rcx,8)
jmp 0x2c7d
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2be7
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2d2f
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x1, (%rax,%rcx,8)
jne 0x2cfa
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2d14
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x1311(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
jmp 0x2d16
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2ca2
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2d7d
movq 0x48(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd 0x12be(%rip), %xmm0     # 0x4020
movsd %xmm0, (%rax,%rcx,8)
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2d3b
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x2e62
movq 0x60(%rsp), %rax
movq 0xc0(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0x2e47
movsd 0x70(%rsp), %xmm0
movq 0x48(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0xb0(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x80(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2e49
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2d89
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2ed7
movq 0x90(%rsp), %rax
movslq 0xe4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xc0(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x2ebf
movq 0xc0(%rsp), %rdx
movq 0x80(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x2ec1
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2e6e
movq 0xf8(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x1e68(%rip), %rsi      # 0x4d52
callq 0x1080
movq %rax, 0x10(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa0(%rsp), %rax
jae 0x2f53
movq 0x10(%rsp), %rdi
movq 0x80(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
leaq 0x1e1e(%rip), %rsi      # 0x4d54
movb $0x0, %al
callq 0x1090
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2f00
movq 0x10(%rsp), %rdi
callq 0x1070
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xc0(%rsp), %rax
cmpq 0xa8(%rsp), %rax
jae 0x304c
movq 0x80(%rsp), %rax
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x3031
movq 0xb8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
movq 0xc0(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x3011
movsd 0x20(%rsp), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x302f
movsd 0x28(%rsp), %xmm0
movq 0x68(%rsp), %rax
movq 0xc0(%rsp), %rcx
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x3031
jmp 0x3033
movq 0xc0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc0(%rsp)
jmp 0x2f7b
movsd 0x28(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x78(%rsp), %rsi
leaq 0x1cef(%rip), %rdi      # 0x4d59
movb $0x0, %al
callq 0x1030
movsd 0x30(%rsp), %xmm0
leaq 0x1cff(%rip), %rdi      # 0x4d7d
movb $0x1, %al
callq 0x1030
movsd 0x28(%rsp), %xmm0
leaq 0x1d09(%rip), %rdi      # 0x4d9b
movb $0x1, %al
callq 0x1030
movsd 0x20(%rsp), %xmm0
leaq 0x1d25(%rip), %rdi      # 0x4dcb
movb $0x1, %al
callq 0x1030
movl 0xec(%rsp), %esi
leaq 0x1d39(%rip), %rdi      # 0x4df4
movb $0x0, %al
callq 0x1030
jmp 0x30d2
leaq 0x1d44(%rip), %rdi      # 0x4e0f
movb $0x0, %al
callq 0x1030
cmpl $0x0, 0xe8(%rsp)
jne 0x3106
leaq 0x1d4c(%rip), %rdi      # 0x4e2f
movb $0x0, %al
callq 0x1030
leaq 0x1d7d(%rip), %rdi      # 0x4e6e
movb $0x0, %al
callq 0x1030
leaq 0x1daf(%rip), %rdi      # 0x4eae
movb $0x0, %al
callq 0x1030
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq