// File: /workspace/github_c_makefile_star2_O1/yhg926[P]public_kssd/command_dist.c
// Function: koc_dist_print_nobin
void koc_dist_print_nobin ( const char *distout_dir,unsigned int ref_num, unsigned int qry_num, unsigned int*ref_ctx_ct_list,
      unsigned int*qry_ctx_ct_list, int num_cof_batch, char (*refname)[PATHLEN], char (*qryfname)[PATHLEN])
{
  sprintf(full_distfcode,"%s/sharedk_ct.dat",distout_dir);
  int fd;
  struct stat s;
  fd = open (full_distfcode, O_RDONLY);
  check (fd < 0, "open %s failed: %s", full_distfcode, strerror (errno));
  fstat (fd, & s);
  koc_dist_t * ctx_obj_ct = mmap(0, s.st_size , PROT_READ, MAP_PRIVATE, fd, 0);
  check ( ctx_obj_ct == MAP_FAILED, "mmap %s failed: %s", full_distfcode, strerror (errno));
  close(fd);
  char distf[PATHLEN];
  sprintf(distf, "%s/distance.out", distout_dir);
  FILE *distfp = fopen(distf,"a") ;
  if( distfp == NULL ) err(errno,"dist_print_nobin():%s",distf);
  double jac_ind,contain_ind,Dm,Da,P_K_in_X_XnY, P_K_in_Y_XnY,
  j_prim, c_prim, Dm_prim, Da_prim, sd_j_prim, sd_c_prim,
  CI95_j_prim1, CI95_j_prim2, CI95_c_prim1, CI95_c_prim2,
  CI95_Dm_prim1,CI95_Dm_prim2,CI95_Da_prim1,CI95_Da_prim2;
  int Min_XY_size, X_size, Y_size, XnY_size, XuY_size, X_XnY_size, Y_XnY_size ;
  int num_mapping_distf = qry_num / num_cof_batch; int bnum_infile;
 double abundence_rowsum;
  for(int b=0;b<=num_mapping_distf;b++){
    if(b==num_mapping_distf){
      bnum_infile = qry_num % num_cof_batch ;
      if( bnum_infile == 0 ) continue;
    }else bnum_infile = num_cof_batch;
    size_t maplength = (size_t)bnum_infile * ref_num * sizeof(koc_dist_t);
    for(int qid = 0; qid < bnum_infile; qid++) {
   abundence_rowsum = 0;
   for(int rid = 0; rid < ref_num; rid++)
    if(ctx_obj_ct[ ((llong)b*num_cof_batch + qid)*ref_num + rid ].shared_k_ct > 0)
     abundence_rowsum += (double)ctx_obj_ct[ ((llong)b*num_cof_batch + qid) * ref_num + rid ].shared_koc_ct
              / (double)ctx_obj_ct[ ((llong)b*num_cof_batch + qid)*ref_num + rid ].shared_k_ct;
   Y_size = qry_ctx_ct_list[b*num_cof_batch + qid];
      for(int rid = 0; rid < ref_num; rid++) {
        X_size = ref_ctx_ct_list[rid];
        Min_XY_size = X_size < Y_size ? X_size : Y_size ;
        XnY_size = ctx_obj_ct[ ((llong)b*num_cof_batch + qid)*ref_num + rid ].shared_k_ct;
    double abundence_pct = (double)ctx_obj_ct[ ((llong)b*num_cof_batch + qid)*ref_num + rid ].shared_koc_ct
               / XnY_size;
        XuY_size = X_size + Y_size - XnY_size ;
        X_XnY_size = X_size - XnY_size;
        Y_XnY_size = Y_size- XnY_size;
        jac_ind = (double)XnY_size / XuY_size;
        contain_ind = (double)XnY_size / Min_XY_size ;
        Dm = jac_ind == 1? 0: -log(2*jac_ind/(1+jac_ind)) / kmerlen ;
        Da = contain_ind== 1? 0: -log(contain_ind) / kmerlen ;
        P_K_in_X_XnY = 1 - pow( (1- 1/pow(alp_size,(kmerlen - dim_reduct_len) )), X_XnY_size );
        P_K_in_Y_XnY = 1 - pow( (1- 1/pow(alp_size,(kmerlen - dim_reduct_len) )), Y_XnY_size );
        double rs = P_K_in_X_XnY * P_K_in_Y_XnY * ( X_XnY_size + Y_XnY_size )
              /(P_K_in_X_XnY + P_K_in_Y_XnY - 2*P_K_in_X_XnY * P_K_in_Y_XnY);
        j_prim = ((double)XnY_size - rs) / XuY_size ;
        c_prim = ((double)XnY_size - rs) / Min_XY_size ;
        Dm_prim = j_prim == 1? 0:-log(2*j_prim/(1+j_prim)) / kmerlen ;
        Da_prim = c_prim==1? 0:-log(c_prim) / kmerlen ;
        sd_j_prim = pow(j_prim*(1 - j_prim) / XuY_size, 0.5) ;
        sd_c_prim = pow(c_prim*(1 - c_prim) / Min_XY_size,0.5) ;
        CI95_j_prim1 = j_prim - 1.96*sd_j_prim;
        CI95_j_prim2 = j_prim + 1.96*sd_j_prim;
        CI95_c_prim1 = c_prim - 1.96*sd_c_prim;
        CI95_c_prim2 = c_prim + 1.96*sd_c_prim;
        CI95_Dm_prim1 = CI95_j_prim2 == 1? 0:-log(2*CI95_j_prim2/(1+CI95_j_prim2)) / kmerlen ;
        CI95_Dm_prim2 = CI95_j_prim1 == 1? 0:-log(2*CI95_j_prim1/(1+CI95_j_prim1)) / kmerlen ;
        CI95_Da_prim1 = CI95_c_prim2 == 1? 0:-log(CI95_c_prim2) / kmerlen ;
        CI95_Da_prim2 = CI95_c_prim1 == 1? 0:-log(CI95_c_prim1) / kmerlen ;
        double pv_j_prim = 0.5 * erfc( j_prim / sd_j_prim * pow(0.5,0.5) );
        double pv_c_prim = 0.5 * erfc( c_prim/sd_c_prim * pow(0.5,0.5) );
        double qv_j_prim = pv_j_prim * ref_seq_num*qry_seq_num ;
        double qv_c_prim = pv_c_prim * ref_seq_num*qry_seq_num ;
        fprintf(distfp,"%s\t%s\t%lf\t%u-%u|%u|%u\t%lf\t%lf\t%lf\t%lf\t%lf[%lf,%lf]\t%lf[%lf,%lf]\t%lf[%lf,%lf]\t%lf[%lf,%lf]\t%E\t%E\t%E\t%E\n",
          qryfname[b*num_cof_batch + qid],refname[rid],abundence_pct,XnY_size,(unsigned int)rs,X_size,Y_size,jac_ind,Dm,
          contain_ind,Da,j_prim,CI95_j_prim1,CI95_j_prim2,Dm_prim,CI95_Dm_prim1,CI95_Dm_prim2,c_prim,CI95_c_prim1,
          CI95_c_prim2,Da_prim,CI95_Da_prim1,CI95_Da_prim2,pv_j_prim,pv_c_prim,qv_j_prim,qv_c_prim);
      }
    }
    munmap(ctx_obj_ct + (size_t)b*num_cof_batch*ref_num, maplength);
  }
  fclose(distfp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3a8, %rsp            # imm = 0x3A8
movl %r9d, %r15d
movq %r8, 0x150(%rsp)
movq %rcx, 0x170(%rsp)
movl %edx, 0x78(%rsp)
movl %esi, 0xa4(%rsp)
movq %rdi, %r14
movq 0x3e8(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x3e0(%rsp), %rax
movq %rax, 0x140(%rsp)
leaq 0x52757(%rip), %r13     # 0x5e500
leaq 0xa22f(%rip), %rsi      # 0x15fdf
movq %r13, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3430
movq %r13, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3380
movl %eax, %ebx
movl %eax, %ebp
shrl $0x1f, %ebp
callq 0x3060
movq %rax, %r12
movl (%rax), %edi
callq 0x3470
leaq 0x93c9(%rip), %rsi      # 0x151af
movl %ebp, %edi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
leaq 0x318(%rsp), %rbp
movl %ebx, %edi
movq %rbp, %rsi
callq 0x34a0
movq 0x30(%rbp), %rsi
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebx, %r8d
xorl %r9d, %r9d
callq 0x3150
xorl %ebp, %ebp
movq %rax, 0xc0(%rsp)
cmpq $-0x1, %rax
sete %bpl
movl (%r12), %edi
callq 0x3470
leaq 0x937e(%rip), %rsi      # 0x151c2
movl %ebp, %edi
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebx, %edi
callq 0x3220
leaq 0xa125(%rip), %rsi      # 0x15f86
leaq 0x210(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0x9ee9(%rip), %rsi      # 0x15d66
movq %rbx, %rdi
callq 0x33a0
movq %rax, 0xe0(%rsp)
testq %rax, %rax
je 0xc836
movl 0x78(%rsp), %eax
xorl %edx, %edx
divl %r15d
movl %edx, 0xb8(%rsp)
testl %eax, %eax
js 0xc818
movl 0xa4(%rsp), %ecx
movq %rcx, %rdx
shlq $0x4, %rdx
movq %rdx, 0xd8(%rsp)
movslq %r15d, %rdx
movq %rdx, 0x120(%rsp)
imulq %rcx, %rdx
movl %eax, %esi
movq 0xc0(%rsp), %rax
addq $0x8, %rax
movq %rax, 0xc8(%rsp)
movq %rdx, 0x130(%rsp)
shlq $0x4, %rdx
movq %rdx, 0x138(%rsp)
shlq $0x2, %rcx
movq %rcx, 0x168(%rsp)
xorl %ebx, %ebx
movsd 0x9805(%rip), %xmm2     # 0x15718
movl %r15d, 0xbc(%rsp)
movq %rsi, 0x128(%rsp)
movl %r15d, %ecx
cmpq %rsi, %rbx
jne 0xbf3c
movl 0xb8(%rsp), %eax
movl %eax, %ecx
testl %eax, %eax
je 0xc7f8
movq %rbx, 0xd0(%rsp)
movl %ecx, 0xa0(%rsp)
testl %ecx, %ecx
jle 0xc7aa
movq 0xd0(%rsp), %rax
imulq 0x120(%rsp), %rax
movq %rax, 0x158(%rsp)
movl 0xa0(%rsp), %eax
movq %rax, 0x160(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq $0x0, 0xa8(%rsp)
cmpl $0x0, 0xa4(%rsp)
je 0xc771
movq 0x158(%rsp), %rax
movq 0xa8(%rsp), %rcx
addq %rax, %rcx
movq 0x150(%rsp), %rax
movl (%rax,%rcx,4), %r13d
shlq $0x8, %rcx
addq 0x148(%rsp), %rcx
movq %rcx, 0x180(%rsp)
xorl %ebx, %ebx
movq 0x140(%rsp), %r14
movq %r13, 0x178(%rsp)
movq 0x170(%rsp), %rax
movl (%rax,%rbx), %r12d
cmpl %r13d, %r12d
movl %r13d, %r15d
cmovll %r12d, %r15d
movq 0xb0(%rsp), %rax
movl (%rax,%rbx,4), %ebp
movsd -0x8(%rax,%rbx,4), %xmm0
unpcklps 0x9018(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x9020(%rip), %xmm0     # 0x15040
movapd %xmm0, 0x110(%rsp)
xorps %xmm3, %xmm3
cvtsi2sd %ebp, %xmm3
leal (%r12,%r13), %eax
subl %ebp, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movapd %xmm3, %xmm0
movsd %xmm1, 0x80(%rsp)
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
movapd %xmm1, 0x1c0(%rsp)
movsd %xmm0, 0x108(%rsp)
ucomisd %xmm2, %xmm0
xorpd %xmm0, %xmm0
movsd %xmm3, 0x88(%rsp)
jne 0xc079
jnp 0xc0bf
movsd 0x108(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x3230
movsd 0x88(%rsp), %xmm3
movsd 0x9670(%rip), %xmm2     # 0x15718
xorpd 0x96a0(%rip), %xmm0     # 0x15750
xorps %xmm1, %xmm1
cvtsi2sdl 0x5243d(%rip), %xmm1 # 0x5e4f8
divsd %xmm1, %xmm0
movapd %xmm0, 0x200(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
movapd %xmm3, %xmm0
movsd %xmm1, 0x90(%rsp)
divsd %xmm1, %xmm0
movsd %xmm0, 0x100(%rsp)
ucomisd %xmm2, %xmm0
jne 0xc0f2
jnp 0xc120
movsd 0x100(%rsp), %xmm0
callq 0x3230
xorpd 0x9648(%rip), %xmm0     # 0x15750
xorps %xmm1, %xmm1
cvtsi2sdl 0x523e5(%rip), %xmm1 # 0x5e4f8
divsd %xmm1, %xmm0
movapd %xmm0, 0x1c0(%rsp)
movl %r12d, %r15d
subl %ebp, %r15d
subl %ebp, %r13d
xorps %xmm0, %xmm0
cvtsi2sdl 0x106c4(%rip), %xmm0 # 0x1c7f8
movl 0x523be(%rip), %eax     # 0x5e4f8
subl 0x523bc(%rip), %eax     # 0x5e4fc
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
callq 0x30f0
movsd 0x95c4(%rip), %xmm2     # 0x15718
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
callq 0x30f0
movsd 0x959f(%rip), %xmm1     # 0x15718
subsd %xmm0, %xmm1
movsd %xmm1, 0x78(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x1066a(%rip), %xmm0 # 0x1c7f8
movl 0x52364(%rip), %eax     # 0x5e4f8
subl 0x52362(%rip), %eax     # 0x5e4fc
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
callq 0x30f0
movsd 0x956a(%rip), %xmm2     # 0x15718
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %r13d, %xmm1
callq 0x30f0
movsd 0x9545(%rip), %xmm4     # 0x15718
movapd %xmm4, %xmm1
subsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm3
movapd %xmm3, %xmm0
addl %r15d, %r13d
xorps %xmm2, %xmm2
cvtsi2sd %r13d, %xmm2
mulsd %xmm1, %xmm0
mulsd %xmm0, %xmm2
movapd %xmm3, %xmm0
addsd %xmm1, %xmm0
mulsd 0x9518(%rip), %xmm3     # 0x15720
mulsd %xmm1, %xmm3
addsd %xmm0, %xmm3
divsd %xmm3, %xmm2
movsd 0x88(%rsp), %xmm3
movsd %xmm2, 0x188(%rsp)
subsd %xmm2, %xmm3
movapd %xmm3, %xmm1
divsd 0x80(%rsp), %xmm1
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1b0(%rsp)
movapd %xmm4, %xmm2
ucomisd %xmm4, %xmm1
movsd %xmm1, 0x98(%rsp)
jne 0xc259
jnp 0xc2ab
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
movsd 0x98(%rsp), %xmm1
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm3, 0x78(%rsp)
callq 0x3230
movsd 0x78(%rsp), %xmm3
movsd 0x98(%rsp), %xmm1
movsd 0x9484(%rip), %xmm2     # 0x15718
xorpd 0x94b4(%rip), %xmm0     # 0x15750
xorps %xmm4, %xmm4
cvtsi2sdl 0x52251(%rip), %xmm4 # 0x5e4f8
divsd %xmm4, %xmm0
movapd %xmm0, 0x1f0(%rsp)
divsd 0x90(%rsp), %xmm3
movsd %xmm3, 0x78(%rsp)
ucomisd %xmm2, %xmm3
jne 0xc2cb
jnp 0xc307
movsd 0x78(%rsp), %xmm0
callq 0x3230
movsd 0x98(%rsp), %xmm1
movsd 0x9431(%rip), %xmm2     # 0x15718
xorpd 0x9461(%rip), %xmm0     # 0x15750
xorps %xmm3, %xmm3
cvtsi2sdl 0x521fe(%rip), %xmm3 # 0x5e4f8
divsd %xmm3, %xmm0
movapd %xmm0, 0x1b0(%rsp)
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd 0x80(%rsp), %xmm0
movsd 0x9404(%rip), %xmm1     # 0x15728
callq 0x30f0
movsd %xmm0, 0x80(%rsp)
movsd 0x93de(%rip), %xmm0     # 0x15718
movsd 0x78(%rsp), %xmm1
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
divsd 0x90(%rsp), %xmm0
movsd 0x93cf(%rip), %xmm1     # 0x15728
callq 0x30f0
movsd 0x80(%rsp), %xmm4
movsd 0x98(%rsp), %xmm1
movsd 0x93a0(%rip), %xmm2     # 0x15718
movapd %xmm0, %xmm5
movapd %xmm4, %xmm0
mulsd 0x93b0(%rip), %xmm0     # 0x15738
addsd %xmm1, %xmm0
xorpd %xmm3, %xmm3
movapd %xmm3, 0x1a0(%rsp)
movsd %xmm0, 0xf8(%rsp)
ucomisd %xmm2, %xmm0
xorpd %xmm0, %xmm0
movq 0x178(%rsp), %r13
movsd %xmm5, 0x90(%rsp)
jne 0xc3bf
jnp 0xc417
movsd 0xf8(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x3230
movsd 0x90(%rsp), %xmm5
movsd 0x80(%rsp), %xmm4
movsd 0x98(%rsp), %xmm1
movsd 0x9318(%rip), %xmm2     # 0x15718
xorpd 0x9348(%rip), %xmm0     # 0x15750
xorps %xmm3, %xmm3
cvtsi2sdl 0x520e5(%rip), %xmm3 # 0x5e4f8
divsd %xmm3, %xmm0
movapd %xmm0, 0x1e0(%rsp)
movapd %xmm4, %xmm0
mulsd 0x9304(%rip), %xmm0     # 0x15730
addsd %xmm1, %xmm0
movsd %xmm0, 0xf0(%rsp)
ucomisd %xmm2, %xmm0
movsd 0x88(%rsp), %xmm1
jne 0xc44a
jnp 0xc4ab
movsd 0xf0(%rsp), %xmm1
movapd %xmm1, %xmm0
addsd %xmm1, %xmm0
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
callq 0x3230
movsd 0x90(%rsp), %xmm5
movsd 0x80(%rsp), %xmm4
movsd 0x88(%rsp), %xmm1
movsd 0x928d(%rip), %xmm2     # 0x15718
xorpd 0x92bd(%rip), %xmm0     # 0x15750
xorps %xmm3, %xmm3
cvtsi2sdl 0x5205a(%rip), %xmm3 # 0x5e4f8
divsd %xmm3, %xmm0
movapd %xmm0, 0x1a0(%rsp)
movapd %xmm5, %xmm0
mulsd 0x9281(%rip), %xmm0     # 0x15738
movsd 0x78(%rsp), %xmm3
addsd %xmm3, %xmm0
xorpd %xmm6, %xmm6
movapd %xmm6, 0x190(%rsp)
movsd %xmm0, 0xe8(%rsp)
ucomisd %xmm2, %xmm0
xorpd %xmm0, %xmm0
jne 0xc4e3
jnp 0xc531
movsd 0xe8(%rsp), %xmm0
callq 0x3230
movsd 0x90(%rsp), %xmm5
movsd 0x80(%rsp), %xmm4
movsd 0x78(%rsp), %xmm3
movsd 0x88(%rsp), %xmm1
movsd 0x91fe(%rip), %xmm2     # 0x15718
xorpd 0x922e(%rip), %xmm0     # 0x15750
xorps %xmm6, %xmm6
cvtsi2sdl 0x51fcb(%rip), %xmm6 # 0x5e4f8
divsd %xmm6, %xmm0
movapd %xmm0, 0x1d0(%rsp)
movapd 0x110(%rsp), %xmm0
movapd %xmm0, %xmm6
unpckhpd %xmm0, %xmm6            # xmm6 = xmm6[1],xmm0[1]
addsd %xmm0, %xmm6
divsd %xmm1, %xmm6
movapd %xmm6, 0x110(%rsp)
mulsd 0x91cc(%rip), %xmm5     # 0x15730
addsd %xmm3, %xmm5
movsd %xmm5, 0x88(%rsp)
ucomisd %xmm2, %xmm5
jne 0xc579
jnp 0xc5b0
movsd 0x88(%rsp), %xmm0
callq 0x3230
movsd 0x80(%rsp), %xmm4
xorpd 0x91b8(%rip), %xmm0     # 0x15750
xorps %xmm1, %xmm1
cvtsi2sdl 0x51f55(%rip), %xmm1 # 0x5e4f8
divsd %xmm1, %xmm0
movapd %xmm0, 0x190(%rsp)
movsd 0x98(%rsp), %xmm0
divsd %xmm4, %xmm0
movsd 0x917b(%rip), %xmm1     # 0x15740
mulsd %xmm1, %xmm0
callq 0x3030
movapd %xmm0, %xmm1
movsd 0x914e(%rip), %xmm0     # 0x15728
mulsd %xmm0, %xmm1
movsd %xmm1, 0x80(%rsp)
movsd 0x78(%rsp), %xmm0
divsd 0x90(%rsp), %xmm0
mulsd 0x9142(%rip), %xmm0     # 0x15740
callq 0x3030
mulsd 0x911d(%rip), %xmm0     # 0x15728
xorps %xmm1, %xmm1
cvtsi2sdl 0x51eda(%rip), %xmm1 # 0x5e4f0
movsd 0x80(%rsp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm1, %xmm2
xorps %xmm3, %xmm3
cvtsi2sdl 0x51ec2(%rip), %xmm3 # 0x5e4f4
mulsd %xmm3, %xmm2
mulsd %xmm0, %xmm1
mulsd %xmm3, %xmm1
cvttsd2si 0x188(%rsp), %r9
movsd %xmm1, 0x70(%rsp)
movsd %xmm2, 0x68(%rsp)
movsd %xmm0, 0x60(%rsp)
movsd %xmm4, 0x58(%rsp)
movaps 0x190(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movaps 0x1d0(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movaps 0x1b0(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x78(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movaps 0x1a0(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movaps 0x1e0(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movaps 0x1f0(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movl %r13d, 0x8(%rsp)
movl %r12d, (%rsp)
movq 0xe0(%rsp), %rdi
leaq 0x9bfb(%rip), %rsi      # 0x162f1
movq 0x180(%rsp), %rdx
movq %r14, %rcx
movaps 0x110(%rsp), %xmm0
movl %ebp, %r8d
movsd 0x108(%rsp), %xmm1
movaps 0x200(%rsp), %xmm2
movsd 0x100(%rsp), %xmm3
movaps 0x1c0(%rsp), %xmm4
movsd 0x98(%rsp), %xmm5
movsd 0xf0(%rsp), %xmm6
movsd 0xf8(%rsp), %xmm7
movb $0x8, %al
callq 0x32c0
addq $0x100, %r14            # imm = 0x100
addq $0x4, %rbx
cmpq %rbx, 0x168(%rsp)
movsd 0x8fad(%rip), %xmm2     # 0x15718
jne 0xbfea
movq 0xa8(%rsp), %rcx
incq %rcx
movq 0xb0(%rsp), %rax
addq 0xd8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq %rcx, 0xa8(%rsp)
cmpq 0x160(%rsp), %rcx
jne 0xbf97
movslq 0xa0(%rsp), %rsi
imulq 0xd8(%rsp), %rsi
movq 0x130(%rsp), %rdi
movq 0xd0(%rsp), %rbx
imulq %rbx, %rdi
shlq $0x4, %rdi
addq 0xc0(%rsp), %rdi
callq 0x3360
movsd 0x8f30(%rip), %xmm2     # 0x15718
movl 0xbc(%rsp), %r15d
movq 0x128(%rsp), %rsi
leaq 0x1(%rbx), %rax
movq 0x138(%rsp), %rcx
addq %rcx, 0xc8(%rsp)
cmpq %rsi, %rbx
movq %rax, %rbx
jb 0xbf23
movq 0xe0(%rsp), %rdi
addq $0x3a8, %rsp            # imm = 0x3A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3100
movl (%r12), %edi
leaq 0x9a9a(%rip), %rsi      # 0x162db
leaq 0x210(%rsp), %rdx
xorl %eax, %eax
callq 0x3330