// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %r13
movl 0x4(%rdi), %esi
movsd 0x110(%rdi), %xmm0
leaq 0x122(%rdi), %r12
movq 0x658(%rdi), %rax
movq (%rax), %rbp
leaq 0xbea1(%rip), %rdi      # 0x15ff7
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 0xb25c(%rip), %r15      # 0x153e3
leaq 0xb62f(%rip), %rcx      # 0x157bd
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, 0x70(%rsp)
movq %r12, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xb606(%rip), %rcx      # 0x157b0
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, 0x68(%rsp)
movq %rbp, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xaea1(%rip), %rsi      # 0x15067
movq %rbx, %rdi
callq 0x33a0
testq %rax, %rax
je 0xaafc
movq %rax, %rbx
movq %r13, 0x48(%rsp)
leaq 0xae81(%rip), %rsi      # 0x15067
movq %r14, %rdi
callq 0x33a0
testq %rax, %rax
je 0xab0c
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, 0x10(%rsp)
movslq %eax, %r12
leaq (,%r12,4), %rdi
movq %rdi, 0x20(%rsp)
callq 0x3340
movq %rax, %rbp
movl 0x10(%r15), %eax
movq %rax, 0x18(%rsp)
movslq %eax, %r13
leaq (,%r13,4), %rdi
movq %rdi, 0x58(%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, 0xb8(%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, 0x30(%rsp)
movq %r12, %rdx
movq %r14, %rcx
callq 0x30c0
movl $0x100, %esi            # imm = 0x100
movq %rbp, 0xb0(%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, 0x4(%rsp)
cmpl %ebx, %eax
jne 0xab1c
movl 0x14c(%rsp), %ebx
movl 0x128(%rsp), %ebp
cmpl %ebp, %ebx
movq 0x48(%rsp), %rcx
jne 0xab32
movq 0x18(%rsp), %rax
leal 0xffff(%rax), %ebp
testl %eax, %eax
cmovnsl %eax, %ebp
leaq 0x322(%rcx), %r12
testl $0x8000ffff, %eax       # imm = 0x8000FFFF
setg %r14b
leaq 0xbcb9(%rip), %rsi      # 0x1602f
leaq 0x160(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %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 0xab4b
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 0xaae4
movl %eax, %ebx
movq 0x20(%rsp), %rsi
imulq 0x38(%rsp), %rsi
movl %eax, %edi
movq %rsi, 0x20(%rsp)
callq 0x31e0
cmpl $-0x1, %eax
je 0xab6f
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 0xaae4
movl %eax, %ebx
xorl %edi, %edi
movq 0x20(%rsp), %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, 0x78(%rsp)
cmpq $-0x1, %rax
je 0xab82
movq %r12, 0xa8(%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 0xab95
movq %r15, 0xa0(%rsp)
movapd 0x90(%rsp), %xmm0
cvttsd2si %xmm0, %rdx
movq %rdx, %rsi
subsd 0xb2c1(%rip), %xmm0     # 0x15760
sarq $0x3f, %rsi
cvttsd2si %xmm0, %rax
andq %rsi, %rax
orq %rdx, %rax
shlq $0x1e, %rax
imulq 0x58(%rsp), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
testl %esi, %esi
jle 0xabb1
xorl %r15d, %r15d
movb %r14b, %r15b
imull %ebx, %esi
movq %rsi, 0x50(%rsp)
movq 0x30(%rsp), %rcx
movl %ecx, %eax
cltd
idivl %esi
movl %eax, %r12d
movl %edx, (%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, 0xf8(%rsp)
callq 0x3340
movq %rax, %r15
movl $0x6974e5d0, %edi       # imm = 0x6974E5D0
callq 0x3340
movq 0x50(%rsp), %rcx
movl %r12d, 0xc(%rsp)
testl %r12d, %r12d
js 0xa9b7
movq %rax, %rbp
incq 0x30(%rsp)
movslq %ecx, %rax
movq 0x38(%rsp), %rdx
movq %rax, 0x60(%rsp)
imulq %rax, %rdx
movq %rdx, 0xc8(%rsp)
leaq (,%rdx,4), %rax
movq %rax, 0xd0(%rsp)
movq %rbx, %rax
shlq $0x1c, %rax
movq %rax, 0xf0(%rsp)
movl 0xc(%rsp), %eax
movl %eax, %edx
movq %rdx, 0xe0(%rsp)
incl %eax
movq %rax, 0xd8(%rsp)
movl %ebx, %r13d
movslq (%rsp), %rax
movq %rax, 0xc0(%rsp)
xorl %eax, %eax
movq 0x60(%rsp), %r11
movl %ecx, %r9d
cmpq 0xe0(%rsp), %rax
jne 0xa5db
cmpl $0x0, (%rsp)
je 0xa9a6
movq 0xc0(%rsp), %r11
movl (%rsp), %r9d
imulq 0x58(%rsp), %r11
movq 0xd0(%rsp), %r10
movq %rax, 0x28(%rsp)
imulq %rax, %r10
leaq 0xbaed(%rip), %rdi      # 0x160e6
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
movl 0x10(%rsp), %ecx
movl 0xc(%rsp), %r8d
movl %r9d, 0x14(%rsp)
xorl %eax, %eax
pushq %r10
movq %r11, 0xf0(%rsp)
pushq %r11
callq 0x3170
addq $0x10, %rsp
cmpl $0x0, 0x4(%rsp)
jle 0xa95a
movq 0x28(%rsp), %rax
imulq 0x60(%rsp), %rax
movq %rax, 0x108(%rsp)
movl 0x14(%rsp), %eax
movq %rax, 0x100(%rsp)
xorl %ebx, %ebx
leaq 0x380(%rsp), %rdi
leaq 0xaa58(%rip), %rsi      # 0x150bb
movq 0x70(%rsp), %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3430
leaq 0x680(%rsp), %r12
movq %r12, %rdi
leaq 0xaa48(%rip), %rsi      # 0x150cb
movq 0x70(%rsp), %rdx
movl %ebx, 0x8(%rsp)
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3430
leaq 0x380(%rsp), %rdi
leaq 0xa9c3(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xaa6a
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 0xf0(%rsp), %rdx
movq %rbx, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
movq %r12, %rdi
leaq 0xa973(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xaa82
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), %r12
movq %r12, %rdi
leaq 0xa946(%rip), %rsi      # 0x15091
movq 0x68(%rsp), %rdx
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x3430
movq %r12, %rdi
leaq 0xa902(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xaa9a
movq %r12, %rdi
leaq 0x2f0(%rsp), %rsi
movq %rax, %r12
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 %r12, %rcx
callq 0x30c0
movq %r12, %rdi
callq 0x3100
leaq 0x480(%rsp), %rbx
movq %rbx, %rdi
leaq 0xa8af(%rip), %rsi      # 0x1507e
movq 0x68(%rsp), %rdx
movl 0x8(%rsp), %ecx
xorl %eax, %eax
callq 0x3430
movq %rbx, %rdi
leaq 0xa87e(%rip), %rsi      # 0x15067
callq 0x33a0
testq %rax, %rax
je 0xaab2
movq %rax, %rbx
movl $0x8, %esi
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq %rax, %rcx
callq 0x30c0
movq %rbx, %rdi
callq 0x3100
cmpl $0x0, 0x14(%rsp)
jle 0xa920
xorl %ecx, %ecx
movq 0x108(%rsp), %rax
movq %rcx, 0x110(%rsp)
addq %rcx, %rax
movq 0x88(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0xa907
movq 0x40(%rsp), %rcx
movq (%rcx,%rax,8), %rdx
movq 0x8(%rcx,%rax,8), %rcx
subq %rdx, %rcx
movq %rcx, 0x120(%rsp)
je 0xa907
imulq 0x38(%rsp), %rax
movq 0x80(%rsp), %rcx
leaq (%rcx,%rdx,4), %rcx
movq %rcx, 0x118(%rsp)
movq 0x78(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
xorl %edi, %edi
cmpl $0x0, 0x90(%rsp)
jle 0xa8fa
movq 0x118(%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 0xa8f2
movq (%r14,%r8,8), %rax
leaq (,%rax,4), %r12
addq %rbp, %r12
leal (%r11,%rbx), %eax
movl %r10d, %edx
shll $0x10, %edx
movl %r11d, %ecx
movl (%r12,%rcx,4), %ecx
addl %edx, %ecx
incl (%rsi,%rcx,4)
incl %r11d
decl %ebx
jne 0xa8dc
movl %eax, %r11d
incq %r10
cmpq %r13, %r10
jne 0xa8b7
incq %rdi
cmpq 0x120(%rsp), %rdi
jne 0xa88f
movq 0x110(%rsp), %rcx
incq %rcx
cmpq 0x100(%rsp), %rcx
jne 0xa826
movq 0x80(%rsp), %rdi
callq 0x3040
movl $0x80000000, %esi       # imm = 0x80000000
movq %r14, %rdi
callq 0x3360
movq %r15, %rdi
movq 0xf8(%rsp), %rsi
callq 0x3360
movl 0x8(%rsp), %ebx
incl %ebx
cmpl 0x4(%rsp), %ebx
jne 0xa654
movq 0xc8(%rsp), %rax
imulq 0x28(%rsp), %rax
movq 0x78(%rsp), %rcx
leaq (%rcx,%rax,4), %rbx
movq %rbx, %rdi
movq 0xe8(%rsp), %r12
movq %r12, %rsi
movl $0x4, %edx
callq 0x3120
testl %eax, %eax
js 0xaacf
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3360
movq 0x50(%rsp), %rcx
movq 0x28(%rsp), %rax
incq %rax
cmpq 0xd8(%rsp), %rax
jne 0xa5b3
movq 0x40(%rsp), %rdi
movq %rcx, %r15
callq 0x3040
movq 0x18(%rsp), %rsi
movl %esi, 0x53b21(%rip)     # 0x5e4f0
movl 0x10(%rsp), %edx
movl %edx, 0x53b1b(%rip)     # 0x5e4f4
movl 0x130(%rsp), %eax
movl 0x134(%rsp), %ecx
movl %eax, 0x53b0b(%rip)     # 0x5e4f8
movl %ecx, 0x53b09(%rip)     # 0x5e4fc
subq $0x8, %rsp
movq 0xb0(%rsp), %rdi
movq 0xc0(%rsp), %r14
movq %r14, %rcx
movq 0x90(%rsp), %rbx
movq %rbx, %r8
movl %r15d, %r9d
pushq 0x50(%rsp)
movq 0xb0(%rsp), %r15
pushq %r15
movq 0xc8(%rsp), %r12
pushq %r12
callq 0xabee
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 0xb5c9(%rip), %rsi      # 0x16041
leaq 0x380(%rsp), %rdx
jmp 0xaac8
callq 0x3060
movl (%rax), %edi
leaq 0xb5b1(%rip), %rsi      # 0x16041
leaq 0x680(%rsp), %rdx
jmp 0xaac8
callq 0x3060
movl (%rax), %edi
leaq 0xb599(%rip), %rsi      # 0x16041
leaq 0x580(%rsp), %rdx
jmp 0xaac8
callq 0x3060
movl (%rax), %edi
leaq 0xb581(%rip), %rsi      # 0x16041
leaq 0x480(%rsp), %rdx
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xb65f(%rip), %rsi      # 0x1613c
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xb54f(%rip), %rsi      # 0x16041
leaq 0x160(%rsp), %rdx
jmp 0xaac8
callq 0x3060
movl (%rax), %edi
leaq 0xb30e(%rip), %rsi      # 0x15e18
jmp 0xaadd
callq 0x3060
movl (%rax), %edi
leaq 0xb344(%rip), %rsi      # 0x15e5e
jmp 0xaadd
callq 0x3060
movl (%rax), %edi
leaq 0xb379(%rip), %rsi      # 0x15ea3
movl 0x4(%rsp), %edx
movl %ebx, %ecx
jmp 0xab44
callq 0x3060
movl (%rax), %edi
leaq 0xb3aa(%rip), %rsi      # 0x15eea
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl $0x11, (%rax)
leaq 0xb4e4(%rip), %rsi      # 0x16041
leaq 0x160(%rsp), %rdx
movl $0x11, %edi
jmp 0xaac8
callq 0x3060
movl (%rax), %edi
leaq 0xb4da(%rip), %rsi      # 0x16057
jmp 0xaadd
callq 0x3060
movl (%rax), %edi
leaq 0xb409(%rip), %rsi      # 0x15f99
jmp 0xaadd
callq 0x3060
movl (%rax), %edi
leaq 0xb4d1(%rip), %rsi      # 0x16074
movl $0x10000000, %edx       # imm = 0x10000000
movl %ebx, %ecx
xorl %eax, %eax
callq 0x3330
callq 0x3060
xorps %xmm0, %xmm0
cvtsi2ssl 0x18(%rsp), %xmm0
mulss 0xabd1(%rip), %xmm0     # 0x15798
movl (%rax), %edi
cvtsi2ss %ebx, %xmm1
mulss %xmm0, %xmm1
mulss 0xabc3(%rip), %xmm1     # 0x1579c
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0xb4b7(%rip), %rsi      # 0x1609e
movb $0x1, %al
callq 0x3330