// File: /workspace/github_c_makefile_star2_O1/yhg926[P]public_kssd/command_dist.c
// Function: mco_cbd_co_dist
void mco_cbd_co_dist(dist_opt_val_t *opt_val_in)
{
 int p_fit_mem = opt_val_in->p;
 llong mem_limit = (llong)opt_val_in->mmry*BBILLION;
 char *refmco_dname = opt_val_in->refpath;
 char *qryco_dname = opt_val_in->remaining_args[0];
 const char *distout_dir = opt_val_in->outdir;
  printf("run mco_cbd_co_dist(), %fG memory used\t%d threads used\n",opt_val_in->mmry,p_fit_mem);
  FILE *refmco_dstat_fp, *qryco_dstat_fp;
  char *refmco_dstat_fpath = malloc(PATHLEN*sizeof(char));
  char *qryco_dstat_fpath = malloc(PATHLEN*sizeof(char));
  sprintf(refmco_dstat_fpath,"%s/%s",refmco_dname,mco_dstat);
  sprintf(qryco_dstat_fpath,"%s/%s",qryco_dname,co_dstat);
  if( (refmco_dstat_fp = fopen(refmco_dstat_fpath,"rb")) == NULL )
    err(errno,"need provied mco dir path for mco_co_dist() arg 1. refmco_dstat_fpath");
  if( (qryco_dstat_fp = fopen(qryco_dstat_fpath,"rb")) == NULL )
    err(errno,"need provied co dir path for mco_co_dist() arg 2.  qryco_dstat_fpath");
  mco_dstat_t mco_dstat_readin ;
  co_dstat_t co_dstat_readin ;
  fread(&mco_dstat_readin,sizeof(mco_dstat_readin),1,refmco_dstat_fp);
  fread(&co_dstat_readin,sizeof(co_dstat_readin),1,qryco_dstat_fp);
  ctx_obj_ct_t * qry_ctx_ct_list = malloc(co_dstat_readin.infile_num * sizeof(ctx_obj_ct_t));
  ctx_obj_ct_t * ref_ctx_ct_list = malloc(mco_dstat_readin.infile_num * sizeof(ctx_obj_ct_t));
  fread(qry_ctx_ct_list,sizeof(ctx_obj_ct_t),co_dstat_readin.infile_num,qryco_dstat_fp);
  fread(ref_ctx_ct_list,sizeof(ctx_obj_ct_t),mco_dstat_readin.infile_num,refmco_dstat_fp);
  char (*cofname)[PATHLEN] = malloc(co_dstat_readin.infile_num * PATHLEN);
  char (*mcofname)[PATHLEN] = malloc(mco_dstat_readin.infile_num * PATHLEN);
  fread(cofname,PATHLEN,co_dstat_readin.infile_num,qryco_dstat_fp);
  fread(mcofname,PATHLEN,mco_dstat_readin.infile_num,refmco_dstat_fp);
  fclose(refmco_dstat_fp);
  fclose(qryco_dstat_fp);
  if( !(mco_dstat_readin.comp_num == co_dstat_readin.comp_num) )
    err(errno,"query args not match ref args: ref.comp_num = %d vs. %d = qry.comp_num",
    mco_dstat_readin.comp_num, co_dstat_readin.comp_num);
  if(!(mco_dstat_readin.shuf_id == co_dstat_readin.shuf_id))
    err(errno,"query args not match ref args: ref.shuf_id = %d vs. %d = qry.shuf_id",
    mco_dstat_readin.shuf_id, co_dstat_readin.shuf_id);
  int ref_bin_num = mco_dstat_readin.infile_num / BIN_SZ;
 if( mco_dstat_readin.infile_num % BIN_SZ > 0 ) ref_bin_num +=1;
 char onedist[PATHLEN];
 sprintf(onedist,"%s/sharedk_ct.dat",distout_dir);
  int dist_bfp = open(onedist,O_RDWR,0600) ;
  if (dist_bfp == -1) {
  close(dist_bfp);
  dist_bfp = open(onedist,O_RDWR|O_CREAT, 0600) ;
  if (dist_bfp == -1) err(errno,"mco_cbd_co_dist()::%s",onedist);
 }
 else{
  errno = EEXIST;
  err(errno,"mco_cbd_co_dist()::%s",onedist);
 }
 size_t disf_sz = (size_t)mco_dstat_readin.infile_num*co_dstat_readin.infile_num*sizeof(ctx_obj_ct_t) ;
 if(ftruncate(dist_bfp, disf_sz) == -1) err(errno,"mco_cbd_co_dist()::ftruncate");
 close(dist_bfp);
 dist_bfp = open(onedist,O_RDWR, 0600);
 if (dist_bfp == -1) err(errno,"mco_cbd_co_dist()::%s",onedist);
 ctx_obj_ct_t *ctx_obj_ct = mmap(NULL,disf_sz,PROT_READ | PROT_WRITE,MAP_SHARED ,dist_bfp,0);
 if(ctx_obj_ct == MAP_FAILED) err(errno,"ctx_obj_ct mmap error");
 close(dist_bfp);
 int page_sz = sysconf(_SC_PAGESIZE);
 size_t comp_sz = (1LLU << 4*COMPONENT_SZ);
 if( comp_sz % page_sz != 0 ) err(errno,"comp_sz %d is not multiple of page_sz %d ",comp_sz,page_sz );
 int num_unit_mem = mem_limit / (mco_dstat_readin.infile_num*sizeof(ctx_obj_ct_t) * page_sz);
 if(num_unit_mem < 1) err(errno,"at least %fG memory needed to map ./onedist, specify more memory use -m",
  (float)mco_dstat_readin.infile_num*sizeof(ctx_obj_ct_t) * page_sz/1073741824 );
 int num_cof_batch = num_unit_mem*page_sz;
 size_t unitsz_distf_mapped = (size_t)num_cof_batch * mco_dstat_readin.infile_num * sizeof(ctx_obj_ct_t) ;
 int num_mapping_distf = co_dstat_readin.infile_num / num_cof_batch ;
 size_t maplength;
 int bnum_infile;
 FILE *cbd_fcode_comp_fp,*cbd_fcode_comp_index_fp;
  struct stat cbd_fcode_stat;
 size_t *fco_pos = malloc(sizeof(size_t) * (co_dstat_readin.infile_num + 1) );
 size_t *mco_offset_index = malloc(sizeof(size_t) * comp_sz);
 unsigned int *mco_bin_index = malloc( sizeof(unsigned int) * comp_sz * ref_bin_num );
 gidobj_t* mco_mem = malloc( sizeof(gidobj_t) * 442317172 );
 char mco_fcode[PATHLEN]; char mco_index_fcode[PATHLEN];
 char co_cbd_fcode[PATHLEN];char co_cbd_index_fcode[PATHLEN];
 for(int b=0;b<=num_mapping_distf;b++){
  if(b==num_mapping_distf){
   bnum_infile = co_dstat_readin.infile_num % num_cof_batch ;
   if( bnum_infile == 0 ) continue;
  }else bnum_infile = num_cof_batch;
  maplength = (size_t)bnum_infile * mco_dstat_readin.infile_num * sizeof(ctx_obj_ct_t);
  printf("disf_sz=%lu\trefnum=%d\tqrynum=%d\tnum_mapping_distf=%dbnum_infile=%d\t\t%lu\t%lu\tflag1:Ok\n",
   disf_sz,mco_dstat_readin.infile_num,co_dstat_readin.infile_num,num_mapping_distf,bnum_infile,maplength,(size_t)b*unitsz_distf_mapped);
    for ( int j = 0; j < mco_dstat_readin.comp_num; j++ ) {
   sprintf(mco_index_fcode,"%s/mco.index.%d",refmco_dname,j);
      sprintf(mco_fcode,"%s/mco.%d",refmco_dname,j);
   FILE *indexfp, *mcofp;
   if( (indexfp = fopen(mco_index_fcode,"rb"))==NULL) err(errno,"mco_cbd_co_dist()::%s",mco_index_fcode);
   fread(mco_offset_index,sizeof(size_t),comp_sz,indexfp);
   fread(mco_bin_index,sizeof(unsigned int),comp_sz * ref_bin_num,indexfp);
   fclose(indexfp);
   struct stat s;
   if( (mcofp = fopen(mco_fcode,"rb"))==NULL) err(errno,"mco_cbd_co_dist()::%s",mco_fcode);
   stat(mco_fcode, &s);
   fread(mco_mem,sizeof(gidobj_t),s.st_size/sizeof(gidobj_t),mcofp);
   fclose(mcofp);
      sprintf(co_cbd_fcode,"%s/combco.%d",qryco_dname,j);
      if( (cbd_fcode_comp_fp = fopen(co_cbd_fcode,"rb"))==NULL) err(errno,"mco_cbd_co_dist()::%s",co_cbd_fcode);
      stat(co_cbd_fcode, &cbd_fcode_stat);
   if(co_dstat_readin.koc){
   }
      unsigned int *cbd_fcode_mem = malloc(cbd_fcode_stat.st_size);
      fread(cbd_fcode_mem,sizeof(unsigned int),cbd_fcode_stat.st_size/sizeof(unsigned int),cbd_fcode_comp_fp);
      fclose(cbd_fcode_comp_fp);
   sprintf(co_cbd_index_fcode,"%s/combco.index.%d",qryco_dname,j);
   if( (cbd_fcode_comp_index_fp = fopen(co_cbd_index_fcode,"rb"))==NULL)
    err(errno,"mco_cbd_co_dist()::%s",co_cbd_index_fcode);
   fread(fco_pos,sizeof(size_t),co_dstat_readin.infile_num + 1 ,cbd_fcode_comp_index_fp);
   fclose(cbd_fcode_comp_index_fp);
#pragma omp parallel for num_threads(p_fit_mem) schedule(guided)
      for(int kind = 0; kind < bnum_infile; kind++){
    int k = b*num_cof_batch + kind;
        if(qry_ctx_ct_list[k]==0) continue;
    unsigned int ind, mcogid, pos;
    llong distf_offset = (size_t)k * mco_dstat_readin.infile_num;
     for(int n = 0; n < fco_pos[k+1] - fco_pos[k]; n++){
       ind = cbd_fcode_mem[ fco_pos[k] + n ];
     pos = 0;
     for(int bin=0; bin < ref_bin_num; bin++){
      int bin_gnum = mco_bin_index[ ind *ref_bin_num + bin];
      for(int g = 0; g < bin_gnum ; g++ ){
       mcogid = bin*BIN_SZ + mco_mem[ mco_offset_index[ind] + pos ];
       ctx_obj_ct[distf_offset + mcogid ]++ ;
       pos++;
      }
     }
     }
     }
    free(cbd_fcode_mem);
    munmap(mco_offset_index, comp_sz * sizeof(size_t));
    munmap(mco_bin_index,comp_sz*ref_bin_num*sizeof(unsigned int) );
   }
    if ( msync( ctx_obj_ct + (size_t)b*num_cof_batch*mco_dstat_readin.infile_num, maplength, MS_SYNC ) < 0 )
     err(errno,"mco_cbd_co_dist()::ctx_obj_ct msync failed");
    munmap(ctx_obj_ct + (size_t)b*num_cof_batch*mco_dstat_readin.infile_num, maplength);
  }
 free(fco_pos);
  ref_seq_num = mco_dstat_readin.infile_num ;
  qry_seq_num = co_dstat_readin.infile_num ;
  kmerlen = co_dstat_readin.kmerlen;
  dim_reduct_len = co_dstat_readin.dim_rd_len;
 dist_print_nobin(distout_dir,ref_seq_num, qry_seq_num, ref_ctx_ct_list, qry_ctx_ct_list,num_cof_batch,mcofname, cofname, opt_val_in);
  free(ref_ctx_ct_list);
  free(qry_ctx_ct_list);
  free(mcofname);
  free(cofname);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x788, %rsp            # imm = 0x788
movl 0x4(%rdi), %esi
movsd 0x110(%rdi), %xmm0
leaq 0x122(%rdi), %r12
movq %rdi, 0x50(%rsp)
movq 0x658(%rdi), %rax
movq (%rax), %rbp
leaq 0xc0bd(%rip), %rdi      # 0x15fa7
movapd %xmm0, 0x90(%rsp)
movb $0x1, %al
callq 0x3170
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %r14
leaq 0xb478(%rip), %r15      # 0x15393
leaq 0xb84b(%rip), %rcx      # 0x1576d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, 0x70(%rsp)
movq %r12, %rdx
movq %rbp, %r12
xorl %eax, %eax
callq 0x3430
leaq 0xb81f(%rip), %rcx      # 0x15760
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xb10f(%rip), %rsi      # 0x15067
movq %rbx, %rdi
callq 0x33a0
testq %rax, %rax
je 0xa874
movq %rax, %rbx
movq %r12, 0x108(%rsp)
leaq 0xb0ec(%rip), %rsi      # 0x15067
movq %r14, %rdi
callq 0x33a0
testq %rax, %rax
je 0xa884
movq %rax, %r14
leaq 0x14c(%rsp), %rdi
movl $0x14, %esi
movl $0x1, %edx
movq %rdi, %r15
movq %rbx, %rcx
callq 0x30c0
leaq 0x128(%rsp), %r12
movl $0x20, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x30c0
movl 0x14(%r12), %eax
movl %eax, 0x18(%rsp)
movslq %eax, %r12
leaq (,%r12,4), %rdi
callq 0x3340
movq %rax, %rbp
movl 0x10(%r15), %eax
movq %rax, 0x20(%rsp)
movslq %eax, %r13
leaq (,%r13,4), %rdi
movq %rdi, 0x68(%rsp)
callq 0x3340
movq %rax, %r15
movl $0x4, %esi
movq %rbp, 0x88(%rsp)
movq %rbp, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x30c0
movl $0x4, %esi
movq %r15, 0xc0(%rsp)
movq %r15, %rdi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x30c0
movq %r12, %rdi
shlq $0x8, %rdi
callq 0x3340
movq %rax, %r15
movq %r13, %rdi
shlq $0x8, %rdi
callq 0x3340
movq %rax, %rbp
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %r12, 0x28(%rsp)
movq %r12, %rdx
movq %r14, %rcx
callq 0x30c0
movl $0x100, %esi            # imm = 0x100
movq %rbp, 0xb8(%rsp)
movq %rbp, %rdi
movq %r13, 0x38(%rsp)
movq %r13, %rdx
movq %rbx, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
movq %r14, %rdi
callq 0x3100
leaq 0x14c(%rsp), %rax
movl 0xc(%rax), %eax
leaq 0x128(%rsp), %rcx
movl 0x10(%rcx), %ebx
movl %eax, (%rsp)
cmpl %ebx, %eax
jne 0xa894
movl 0x14c(%rsp), %ebx
movl 0x128(%rsp), %ebp
cmpl %ebp, %ebx
jne 0xa8a9
movq 0x20(%rsp), %rax
leal 0xffff(%rax), %ebp
testl %eax, %eax
cmovnsl %eax, %ebp
movq 0x50(%rsp), %rcx
leaq 0x322(%rcx), %r13
testl $0x8000ffff, %eax       # imm = 0x8000FFFF
setg %r14b
leaq 0xbeda(%rip), %rsi      # 0x15fdf
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3430
movq %rbx, %rdi
movl $0x2, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3380
cmpl $-0x1, %eax
jne 0xa8c2
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3220
leaq 0x160(%rsp), %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3380
cmpl $-0x1, %eax
je 0xa85c
movl %eax, %ebx
movq 0x28(%rsp), %rsi
imulq 0x38(%rsp), %rsi
shlq $0x2, %rsi
movl %eax, %edi
movq %rsi, 0x60(%rsp)
callq 0x31e0
cmpl $-0x1, %eax
je 0xa8e6
movl %ebx, %edi
callq 0x3220
leaq 0x160(%rsp), %rdi
movl $0x2, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3380
cmpl $-0x1, %eax
je 0xa85c
movl %eax, %ebx
xorl %edi, %edi
movq 0x60(%rsp), %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, 0x78(%rsp)
cmpq $-0x1, %rax
je 0xa8f9
movq %r13, 0xb0(%rsp)
movl %ebx, %edi
callq 0x3220
movl $0x1e, %edi
callq 0x33d0
movq %rax, %rbx
movslq %ebx, %rcx
movl $0x10000000, %eax       # imm = 0x10000000
xorl %edx, %edx
divq %rcx
testq %rdx, %rdx
jne 0xa90c
movq %r15, 0xa8(%rsp)
movapd 0x90(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq %rdx, %rsi
subsd 0xb4de(%rip), %xmm0     # 0x15710
sarq $0x3f, %rsi
cvttsd2si %xmm0, %rax
andq %rsi, %rax
orq %rdx, %rax
shlq $0x1e, %rax
imulq 0x68(%rsp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
testl %esi, %esi
jle 0xa928
xorl %r15d, %r15d
movb %r14b, %r15b
imull %ebx, %esi
movq %rsi, 0x58(%rsp)
movq 0x28(%rsp), %rcx
movl %ecx, %eax
cltd
idivl %esi
movl %eax, %r13d
movl %edx, 0x4c(%rsp)
sarl $0x10, %ebp
addl %ebp, %r15d
leaq 0x8(,%rcx,8), %rdi
callq 0x3340
movq %rax, 0x40(%rsp)
movl $0x80000000, %edi       # imm = 0x80000000
callq 0x3340
movq %rax, %r14
movl %r15d, 0x90(%rsp)
movslq %r15d, %rbx
movq %rbx, %rdi
shlq $0x1e, %rdi
movq %rdi, 0x100(%rsp)
callq 0x3340
movq %rax, %r15
movl $0x6974e5d0, %edi       # imm = 0x6974E5D0
callq 0x3340
movq 0x58(%rsp), %rcx
movl %r13d, 0x14(%rsp)
testl %r13d, %r13d
js 0xa72f
movq %rax, %rbp
incq 0x28(%rsp)
movslq %ecx, %rax
movq 0x38(%rsp), %rdx
movq %rax, 0xc8(%rsp)
imulq %rax, %rdx
movq %rdx, 0xd0(%rsp)
leaq (,%rdx,4), %rax
movq %rax, 0xd8(%rsp)
movq %rbx, %rax
shlq $0x1c, %rax
movq %rax, 0xf8(%rsp)
movl 0x14(%rsp), %eax
movl %eax, %edx
movq %rdx, 0xe8(%rsp)
incl %eax
movq %rax, 0xe0(%rsp)
movl %ebx, %r13d
xorl %edx, %edx
movl %ecx, %esi
cmpq 0xe8(%rsp), %rdx
jne 0xa358
movl 0x4c(%rsp), %eax
movl %eax, %esi
testl %eax, %eax
je 0xa71e
movl %esi, 0x1c(%rsp)
movslq %esi, %r9
movq 0x68(%rsp), %r11
imulq %r9, %r11
movq 0xd8(%rsp), %r10
movq %rdx, 0x30(%rsp)
imulq %rdx, %r10
leaq 0xbd16(%rip), %rdi      # 0x16096
movq 0x60(%rsp), %rsi
movq 0x20(%rsp), %rdx
movl 0x18(%rsp), %ecx
movl 0x14(%rsp), %r8d
xorl %eax, %eax
pushq %r10
movq %r11, 0xf8(%rsp)
pushq %r11
callq 0x3170
addq $0x10, %rsp
cmpl $0x0, (%rsp)
jle 0xa6ce
movq 0x30(%rsp), %rax
imulq 0xc8(%rsp), %rax
movq %rax, 0x118(%rsp)
movl 0x1c(%rsp), %eax
movq %rax, 0x110(%rsp)
xorl %ebx, %ebx
leaq 0x380(%rsp), %rdi
leaq 0xacd4(%rip), %rsi      # 0x150bb
movq 0x70(%rsp), %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3430
leaq 0x680(%rsp), %r12
movq %r12, %rdi
leaq 0xacc4(%rip), %rsi      # 0x150cb
movq 0x70(%rsp), %rdx
movl %ebx, 0x4(%rsp)
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3430
leaq 0x380(%rsp), %rdi
leaq 0xac3f(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xa7e2
movq %rax, %rbx
movl $0x8, %esi
movl $0x10000000, %edx       # imm = 0x10000000
movq %r14, %rdi
movq %rax, %rcx
callq 0x30c0
movl $0x4, %esi
movq %r15, %rdi
movq 0xf8(%rsp), %rdx
movq %rbx, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
movq %r12, %rdi
leaq 0xabef(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xa7fa
movq %rax, %rbx
movq %r12, %rdi
leaq 0x260(%rsp), %rsi
callq 0x32e0
movq 0x290(%rsp), %rdx
shrq $0x2, %rdx
movl $0x4, %esi
movq %rbp, %rdi
movq %rbx, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
leaq 0x580(%rsp), %rbx
movq %rbx, %rdi
leaq 0xabc2(%rip), %rsi      # 0x15091
movq 0x108(%rsp), %r12
movq %r12, %rdx
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x3430
movq %rbx, %rdi
leaq 0xab78(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xa812
movq %rbx, %rdi
leaq 0x2f0(%rsp), %rsi
movq %rax, 0x8(%rsp)
callq 0x32e0
movq 0x320(%rsp), %rbx
movq %rbx, %rdi
callq 0x3340
shrq $0x2, %rbx
movl $0x4, %esi
movq %rax, 0x80(%rsp)
movq %rax, %rdi
movq %rbx, %rdx
movq 0x8(%rsp), %rbx
movq %rbx, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
leaq 0x480(%rsp), %rbx
movq %rbx, %rdi
leaq 0xab1e(%rip), %rsi      # 0x1507e
movq %r12, %rdx
movl 0x4(%rsp), %ecx
xorl %eax, %eax
callq 0x3430
movq %rbx, %rdi
leaq 0xaaef(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xa82a
movq %rax, %rbx
movl $0x8, %esi
movq 0x40(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq %rax, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
cmpl $0x0, 0x1c(%rsp)
jle 0xa695
xorl %ecx, %ecx
movq 0x118(%rsp), %rax
movq %rcx, 0x120(%rsp)
addq %rcx, %rax
movq 0x88(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0xa67c
movq 0x40(%rsp), %rcx
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rcx
subq %rdx, %rcx
je 0xa67c
imulq 0x38(%rsp), %rax
movq 0x80(%rsp), %rsi
leaq (%rsi,%rdx,4), %rdx
movq %rdx, 0x8(%rsp)
movq 0x78(%rsp), %rdx
leaq (%rdx,%rax,4), %rsi
xorl %edi, %edi
cmpl $0x0, 0x90(%rsp)
jle 0xa674
movq 0x8(%rsp), %rax
movl (%rax,%rdi,4), %r8d
movl %r8d, %r9d
imull 0x90(%rsp), %r9d
xorl %r10d, %r10d
xorl %r11d, %r11d
leal (%r9,%r10), %eax
movl (%r15,%rax,4), %ebx
testl %ebx, %ebx
jle 0xa66c
movq (%r14,%r8,8), %rax
leaq (,%rax,4), %r12
addq %rbp, %r12
movl %r10d, %eax
shll $0x10, %eax
movl %r11d, %edx
movl (%r12,%rdx,4), %edx
addl %eax, %edx
incl (%rsi,%rdx,4)
incl %r11d
decl %ebx
jne 0xa659
incq %r10
cmpq %r13, %r10
jne 0xa638
incq %rdi
cmpq %rcx, %rdi
jne 0xa613
movq 0x120(%rsp), %rcx
incq %rcx
cmpq 0x110(%rsp), %rcx
jne 0xa5b5
movq 0x80(%rsp), %rdi
callq 0x3040
movl $0x80000000, %esi       # imm = 0x80000000
movq %r14, %rdi
callq 0x3360
movq %r15, %rdi
movq 0x100(%rsp), %rsi
callq 0x3360
movl 0x4(%rsp), %ebx
incl %ebx
cmpl (%rsp), %ebx
jne 0xa3d8
movq 0xd0(%rsp), %rax
imulq 0x30(%rsp), %rax
movq 0x78(%rsp), %rcx
leaq (%rcx,%rax,4), %rdi
movq %rdi, 0x8(%rsp)
movq 0xf0(%rsp), %rbx
movq %rbx, %rsi
movl $0x4, %edx
callq 0x3120
testl %eax, %eax
js 0xa847
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x3360
movq 0x58(%rsp), %rcx
movq 0x30(%rsp), %rdx
incq %rdx
cmpq 0xe0(%rsp), %rdx
jne 0xa33e
movq 0x40(%rsp), %rdi
movq %rcx, %r15
callq 0x3040
movq 0x20(%rsp), %rsi
movl %esi, 0x53da9(%rip)     # 0x5e4f0
movl 0x18(%rsp), %edx
movl %edx, 0x53da3(%rip)     # 0x5e4f4
movl 0x130(%rsp), %eax
movl 0x134(%rsp), %ecx
movl %eax, 0x53d93(%rip)     # 0x5e4f8
movl %ecx, 0x53d91(%rip)     # 0x5e4fc
subq $0x8, %rsp
movq 0xb8(%rsp), %rdi
movq 0xc8(%rsp), %r14
movq %r14, %rcx
movq 0x90(%rsp), %rbx
movq %rbx, %r8
movl %r15d, %r9d
pushq 0x58(%rsp)
movq 0xb8(%rsp), %r15
pushq %r15
movq 0xd0(%rsp), %r12
pushq %r12
callq 0xa965
addq $0x20, %rsp
movq %r14, %rdi
callq 0x3040
movq %rbx, %rdi
callq 0x3040
movq %r12, %rdi
callq 0x3040
movq %r15, %rdi
addq $0x788, %rsp            # imm = 0x788
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3040
callq 0x3060
movl (%rax), %edi
leaq 0xb801(%rip), %rsi      # 0x15ff1
leaq 0x380(%rsp), %rdx
jmp 0xa840
callq 0x3060
movl (%rax), %edi
leaq 0xb7e9(%rip), %rsi      # 0x15ff1
leaq 0x680(%rsp), %rdx
jmp 0xa840
callq 0x3060
movl (%rax), %edi
leaq 0xb7d1(%rip), %rsi      # 0x15ff1
leaq 0x580(%rsp), %rdx
jmp 0xa840
callq 0x3060
movl (%rax), %edi
leaq 0xb7b9(%rip), %rsi      # 0x15ff1
leaq 0x480(%rsp), %rdx
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xb897(%rip), %rsi      # 0x160ec
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xb787(%rip), %rsi      # 0x15ff1
leaq 0x160(%rsp), %rdx
jmp 0xa840
callq 0x3060
movl (%rax), %edi
leaq 0xb546(%rip), %rsi      # 0x15dc8
jmp 0xa855
callq 0x3060
movl (%rax), %edi
leaq 0xb57c(%rip), %rsi      # 0x15e0e
jmp 0xa855
callq 0x3060
movl (%rax), %edi
leaq 0xb5b1(%rip), %rsi      # 0x15e53
movl (%rsp), %edx
movl %ebx, %ecx
jmp 0xa8bb
callq 0x3060
movl (%rax), %edi
leaq 0xb5e3(%rip), %rsi      # 0x15e9a
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl $0x11, (%rax)
leaq 0xb71d(%rip), %rsi      # 0x15ff1
leaq 0x160(%rsp), %rdx
movl $0x11, %edi
jmp 0xa840
callq 0x3060
movl (%rax), %edi
leaq 0xb713(%rip), %rsi      # 0x16007
jmp 0xa855
callq 0x3060
movl (%rax), %edi
leaq 0xb642(%rip), %rsi      # 0x15f49
jmp 0xa855
callq 0x3060
movl (%rax), %edi
leaq 0xb70a(%rip), %rsi      # 0x16024
movl $0x10000000, %edx       # imm = 0x10000000
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3330
callq 0x3060
xorps %xmm0, %xmm0
cvtsi2ssl 0x20(%rsp), %xmm0
mulss 0xae0a(%rip), %xmm0     # 0x15748
movl (%rax), %edi
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
mulss 0xadfc(%rip), %xmm1     # 0x1574c
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0xb6f0(%rip), %rsi      # 0x1604e
movb $0x1, %al
callq 0x3330