// File: /workspace/github_c_makefile_star2_O1/yhg926[P]public_kssd/command_dist.c
// Function: mco_cbdco_nobin_dist
void mco_cbdco_nobin_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;
  mkdir(distout_dir,0700);
  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);
  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_cbdco_nobin_dist()::%s",onedist);
  }else err(EEXIST," mco_cbdco_nobin_dist():%s",onedist);
  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 );
  size_t maplength;
  int bnum_infile;
  size_t *mco_offset_index = malloc(sizeof(size_t) * comp_sz);
#define MCOMM_SZ 442317172
  gidobj_t* mco_mem = malloc( sizeof(gidobj_t) * MCOMM_SZ );
  char mco_fcode[PATHLEN]; char mco_index_fcode[PATHLEN];
  char co_cbd_fcode[PATHLEN];char co_cbd_index_fcode[PATHLEN];
  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;
  char distf[PATHLEN];
  sprintf(distf, "%s/distance.out", distout_dir);
  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;
  if( opt_val_in->shared_kmerpath[0] != '\0'){
    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);
    return;
  }
  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 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_cbdco_nobin_dist()::ftruncate");
  close(dist_bfp);
  dist_bfp = open(onedist,O_RDWR, 0600);
  if (dist_bfp == -1) err(errno,"mco_cbdco_nobin_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);
 mmp_any_t* mco_offset_index_comps = malloc(sizeof( mmp_any_t) * mco_dstat_readin.comp_num);
 mmp_any_t* mco_mem_comps = malloc(sizeof( mmp_any_t) * mco_dstat_readin.comp_num);
 mmp_any_t* fco_pos_comps = malloc(sizeof( mmp_any_t) * mco_dstat_readin.comp_num);
 mmp_any_t* cbd_fcode_mem_comps = malloc(sizeof( mmp_any_t) * mco_dstat_readin.comp_num);
 for ( int j = 0; j < mco_dstat_readin.comp_num; j++ ) {
  sprintf(mco_index_fcode,"%s/%s.%d",refmco_dname,mco_idx_prefix,j);
  mco_offset_index_comps[j] = mmp_any(mco_index_fcode);
  sprintf(mco_fcode,"%s/%s.%d",refmco_dname,mco_gids_prefix,j);
  mco_mem_comps[j] = mmp_any(mco_fcode);
  sprintf(co_cbd_index_fcode,"%s/%s.%d",qryco_dname,idx_prefix,j);
  fco_pos_comps[j] = mmp_any(co_cbd_index_fcode);
  sprintf(co_cbd_fcode,"%s/%s.%d",qryco_dname,skch_prefix,j);
  cbd_fcode_mem_comps[j] = mmp_any(co_cbd_fcode);
 }
  for(int b=0;b<=num_mapping_distf;b++){
    if(b==num_mapping_distf) bnum_infile = co_dstat_readin.infile_num % num_cof_batch ;
  else bnum_infile = num_cof_batch;
    if( bnum_infile == 0 ) continue;
    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=%d\tbatch_qrynum=%d\t%lu\t%lu\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++ ) {
   size_t *mco_offset_index= (size_t *) mco_offset_index_comps[j].mmp;
   gidobj_t* mco_mem = (gidobj_t*) mco_mem_comps[j].mmp;
   size_t *fco_pos = (size_t *)fco_pos_comps[j].mmp;
   unsigned int *cbd_fcode_mem = (unsigned int *)cbd_fcode_mem_comps[j].mmp;
#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;
        size_t distf_offset = (size_t)k * mco_dstat_readin.infile_num;
        for(size_t n = fco_pos[k]; n < fco_pos[k+1]; n++){
          unsigned int ind = cbd_fcode_mem[n];
     size_t s = ind > 0 ? mco_offset_index[ind-1] : 0 ;
     for(size_t g = s; g < mco_offset_index[ind] ; g++)
      ctx_obj_ct[distf_offset + mco_mem[g]]++ ;
        }
      }
    }
    if ( msync( ctx_obj_ct + (size_t)b*num_cof_batch*mco_dstat_readin.infile_num, maplength, MS_SYNC ) < 0 )
      err(errno,"mco_cbdco_nobin_dist()::ctx_obj_ct msync failed");
    munmap(ctx_obj_ct + (size_t)b*num_cof_batch*mco_dstat_readin.infile_num, maplength);
  }
 for ( int j = 0; j < mco_dstat_readin.comp_num; j++ ){
  munmap(mco_offset_index_comps[j].mmp,mco_offset_index_comps[j].fsize);
  munmap(mco_mem_comps[j].mmp,mco_mem_comps[j].fsize);
  munmap(fco_pos_comps[j].mmp,fco_pos_comps[j].fsize);
  munmap(cbd_fcode_mem_comps[j].mmp,cbd_fcode_mem_comps[j].fsize);
 }
  free(mco_offset_index_comps);
  free( mco_mem_comps);
  free( fco_pos_comps);
  free (cbd_fcode_mem_comps);
  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(mco_offset_index);
  free(mco_mem);
  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 $0x7c8, %rsp            # imm = 0x7C8
movsd 0x110(%rdi), %xmm0
movapd %xmm0, 0xc0(%rsp)
leaq 0x122(%rdi), %r12
movq 0x658(%rdi), %rax
movq (%rax), %r13
movq %rdi, 0xa0(%rsp)
addq $0x322, %rdi            # imm = 0x322
movq %rdi, 0x30(%rsp)
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3090
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %r14
leaq 0xdb35(%rip), %r15      # 0x15393
leaq 0xdf08(%rip), %rcx      # 0x1576d
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xdee4(%rip), %rcx      # 0x15760
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xd7d4(%rip), %rsi      # 0x15067
movq %rbx, %rdi
callq 0x33a0
testq %rax, %rax
je 0x8347
movq %rax, %rbx
movq %r13, 0x38(%rsp)
movq %r12, 0x28(%rsp)
leaq 0xd7af(%rip), %rsi      # 0x15067
movq %r14, %rdi
callq 0x33a0
testq %rax, %rax
je 0x8357
movq %rax, %r12
leaq 0x11c(%rsp), %rdi
movl $0x14, %esi
movl $0x1, %edx
movq %rdi, %r14
movq %rbx, %rcx
callq 0x30c0
leaq 0xf8(%rsp), %r15
movl $0x20, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rcx
callq 0x30c0
movl 0x14(%r15), %eax
movl %eax, 0x24(%rsp)
movslq %eax, %rbp
leaq (,%rbp,4), %rdi
callq 0x3340
movq %rax, %r15
movl 0x10(%r14), %eax
movl %eax, 0x20(%rsp)
movq %rbx, %r13
movslq %eax, %rbx
leaq (,%rbx,4), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x3340
movq %rax, %r14
movl $0x4, %esi
movq %r15, 0x78(%rsp)
movq %r15, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x4, %esi
movq %r14, 0x98(%rsp)
movq %r14, %rdi
movq %rbx, %rdx
movq %r13, %rcx
movq %r13, %r15
callq 0x30c0
movq %rbp, %rdi
shlq $0x8, %rdi
callq 0x3340
movq %rax, %r14
movq %rbx, %rdi
shlq $0x8, %rdi
callq 0x3340
movq %rax, %r13
movl $0x100, %esi            # imm = 0x100
movq %r14, 0x90(%rsp)
movq %r14, %rdi
movq %rbp, %r14
movq %rbp, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x100, %esi            # imm = 0x100
movq %r13, 0x88(%rsp)
movq %r13, %rdi
movq %rbx, 0x70(%rsp)
movq %rbx, %rdx
movq %r15, %rcx
callq 0x30c0
movq %r15, %rdi
callq 0x3100
movq %r12, %rdi
callq 0x3100
leaq 0x11c(%rsp), %rax
movslq 0xc(%rax), %rax
leaq 0xf8(%rsp), %rcx
movl 0x10(%rcx), %ebx
movq %rax, 0x68(%rsp)
cmpl %ebx, %eax
jne 0x8367
movl 0x11c(%rsp), %ebx
movl 0xf8(%rsp), %ebp
cmpl %ebp, %ebx
jne 0x837e
leaq 0xe5b5(%rip), %rsi      # 0x15fdf
leaq 0x1c0(%rsp), %rbx
movq %rbx, %rdi
movq 0x30(%rsp), %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 0x8397
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3220
leaq 0x1c0(%rsp), %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3380
cmpl $-0x1, %eax
je 0x83b0
movl %eax, %ebx
movl $0x1e, %edi
callq 0x33d0
movq %rax, %r12
movslq %r12d, %rbp
movl $0x10000000, %eax       # imm = 0x10000000
xorl %edx, %edx
divq %rbp
testq %rdx, %rdx
jne 0x83c0
movapd 0xc0(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0xdc48(%rip), %xmm0     # 0x15710
sarq $0x3f, %rcx
cvttsd2si %xmm0, %r13
andq %rcx, %r13
orq %rax, %r13
shlq $0x1e, %r13
movl 0x20(%rsp), %eax
movl %eax, 0x56a0b(%rip)     # 0x5e4f0
movl 0x24(%rsp), %eax
movl %eax, 0x56a05(%rip)     # 0x5e4f4
movl 0x100(%rsp), %eax
movl 0x104(%rsp), %ecx
movl %eax, 0x569f5(%rip)     # 0x5e4f8
movl %ecx, 0x569f3(%rip)     # 0x5e4fc
leaq 0xe476(%rip), %rsi      # 0x15f86
leaq 0x6c0(%rsp), %rdi
movq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x3430
imulq 0xb0(%rsp), %rbp
movq %r13, %rax
xorl %edx, %edx
divq %rbp
movq %rax, %r13
testl %r13d, %r13d
jle 0x83dd
imull %r12d, %r13d
movq 0xa0(%rsp), %rax
cmpb $0x0, 0x54b(%rax)
je 0x7b9e
movl 0x56994(%rip), %esi     # 0x5e4f0
movl 0x56992(%rip), %edx     # 0x5e4f4
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq 0xa0(%rsp), %rcx
movq 0x80(%rsp), %r8
movl %r13d, %r9d
pushq %rax
pushq 0xa0(%rsp)
pushq 0xa0(%rsp)
callq 0xa965
addq $0x7e8, %rsp            # imm = 0x7E8
jmp 0x8327
movl 0x24(%rsp), %eax
cltd
idivl %r13d
movl %eax, 0x1c(%rsp)
movl %edx, 0x84(%rsp)
movq %r14, %rsi
imulq 0x70(%rsp), %rsi
shlq $0x2, %rsi
movl %ebx, %edi
movq %rsi, 0xa8(%rsp)
callq 0x31e0
cmpl $-0x1, %eax
je 0x841b
movl %ebx, %edi
callq 0x3220
leaq 0x1c0(%rsp), %rdi
movl $0x2, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x3380
cmpl $-0x1, %eax
movq 0x68(%rsp), %r14
je 0x842e
movl %eax, %ebx
movq %r13, 0x40(%rsp)
xorl %edi, %edi
movq 0xa8(%rsp), %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %eax, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, 0xc0(%rsp)
cmpq $-0x1, %rax
je 0x844b
movl %ebx, %edi
callq 0x3220
movq %r14, %rbx
shlq $0x4, %rbx
movq %rbx, %rdi
callq 0x3340
movq %rax, 0x60(%rsp)
movq %rbx, %rdi
callq 0x3340
movq %rax, 0x58(%rsp)
movq %rbx, %rdi
callq 0x3340
movq %rax, 0xb8(%rsp)
movq %rbx, 0xd8(%rsp)
movq %rbx, %rdi
callq 0x3340
testl %r14d, %r14d
movq %rax, 0x50(%rsp)
jle 0x8031
movl $0x8, %r15d
xorl %ecx, %ecx
movq %rcx, 0x10(%rsp)
leaq 0x4c0(%rsp), %rbx
movq %rbx, %rdi
leaq 0xd3ad(%rip), %rsi      # 0x1505e
movq 0x28(%rsp), %rdx
leaq 0xd397(%rip), %rcx      # 0x15054
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x3430
movq %rbx, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3380
movl %eax, %ebp
movl %eax, %r12d
shrl $0x1f, %r12d
callq 0x3060
movq %rax, %r13
movl (%rax), %edi
callq 0x3470
movl %r12d, %edi
leaq 0xd4b8(%rip), %rsi      # 0x151af
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
leaq 0x130(%rsp), %rsi
callq 0x34a0
movq 0x160(%rsp), %rsi
movq %rsi, 0x8(%rsp)
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, %rbx
xorl %r12d, %r12d
cmpq $-0x1, %rax
sete %r12b
movl (%r13), %edi
callq 0x3470
movl %r12d, %edi
leaq 0xd46a(%rip), %rsi      # 0x151c2
leaq 0x4c0(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
callq 0x3220
movq 0x60(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, -0x8(%rax,%r15)
movq %rbx, (%rax,%r15)
leaq 0x5c0(%rsp), %r12
movq %r12, %rdi
leaq 0xd2c8(%rip), %rsi      # 0x1505e
movq 0x28(%rsp), %rdx
leaq 0xd2ae(%rip), %rcx      # 0x15050
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x3430
movq %r12, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3380
movl %eax, %ebp
movl %eax, %ebx
shrl $0x1f, %ebx
movl (%r13), %edi
callq 0x3470
movl %ebx, %edi
leaq 0xd3dc(%rip), %rsi      # 0x151af
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
leaq 0x130(%rsp), %rsi
callq 0x34a0
movq 0x160(%rsp), %rsi
movq %rsi, 0x8(%rsp)
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, %rbx
xorl %r12d, %r12d
cmpq $-0x1, %rax
sete %r12b
movl (%r13), %edi
callq 0x3470
movl %r12d, %edi
leaq 0xd38e(%rip), %rsi      # 0x151c2
leaq 0x5c0(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
callq 0x3220
movq 0x58(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, -0x8(%rax,%r15)
movq %rbx, (%rax,%r15)
leaq 0x2c0(%rsp), %r12
movq %r12, %rdi
leaq 0xd1ec(%rip), %rsi      # 0x1505e
movq 0x38(%rsp), %rdx
leaq 0xf105(%rip), %rcx      # 0x16f83
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x3430
movq %r12, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3380
movl %eax, %ebp
movl %eax, %ebx
shrl $0x1f, %ebx
movl (%r13), %edi
callq 0x3470
movl %ebx, %edi
leaq 0xd300(%rip), %rsi      # 0x151af
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
leaq 0x130(%rsp), %rsi
callq 0x34a0
movq 0x160(%rsp), %rsi
movq %rsi, 0x8(%rsp)
xorl %edi, %edi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, %rbx
xorl %r12d, %r12d
cmpq $-0x1, %rax
sete %r12b
movl (%r13), %edi
movq %r13, 0x48(%rsp)
callq 0x3470
movl %r12d, %edi
leaq 0xd2ad(%rip), %rsi      # 0x151c2
leaq 0x2c0(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
callq 0x3220
movq 0xb8(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, -0x8(%rax,%r15)
movq %rbx, (%rax,%r15)
leaq 0x3c0(%rsp), %r12
movq %r12, %rdi
leaq 0xd108(%rip), %rsi      # 0x1505e
movq 0x38(%rsp), %rdx
leaq 0xf01a(%rip), %rcx      # 0x16f7c
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x3430
movq %r12, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3380
movl %eax, %ebp
movl %eax, %ebx
shrl $0x1f, %ebx
movl (%r13), %edi
callq 0x3470
movl %ebx, %edi
leaq 0xd21c(%rip), %rsi      # 0x151af
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
leaq 0x130(%rsp), %rsi
callq 0x34a0
movq 0x160(%rsp), %r13
xorl %edi, %edi
movq %r13, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x3150
movq %rax, %rbx
xorl %r12d, %r12d
cmpq $-0x1, %rax
sete %r12b
movq 0x48(%rsp), %rax
movl (%rax), %edi
callq 0x3470
movl %r12d, %edi
leaq 0xd1cd(%rip), %rsi      # 0x151c2
leaq 0x3c0(%rsp), %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xbca1
movl %ebp, %edi
callq 0x3220
movq 0x10(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %r13, -0x8(%rax,%r15)
movq %rbx, (%rax,%r15)
incq %rcx
addq $0x10, %r15
cmpq %rcx, %r14
jne 0x7c9a
cmpl $0x0, 0x1c(%rsp)
movq 0x40(%rsp), %rdx
movq 0xb8(%rsp), %r13
js 0x8228
movslq %edx, %rax
movq 0x70(%rsp), %rcx
movq %rax, 0xe0(%rsp)
imulq %rax, %rcx
movq %rcx, 0xf0(%rsp)
leaq (,%rcx,4), %rax
movq %rax, 0xe8(%rsp)
movl 0x1c(%rsp), %eax
movl %eax, %ecx
movq %rcx, 0x48(%rsp)
incl %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
movq %r13, %r15
cmpq 0x48(%rsp), %r12
movl %edx, %ebx
cmovel 0x84(%rsp), %ebx
testl %ebx, %ebx
je 0x821a
movslq %ebx, %r11
imulq 0xb0(%rsp), %r11
movq 0xe8(%rsp), %r10
movq %r12, 0x28(%rsp)
imulq %r12, %r10
leaq 0xe0a8(%rip), %rdi      # 0x16170
movq 0xa8(%rsp), %rsi
movl 0x20(%rsp), %edx
movl 0x24(%rsp), %ecx
movl 0x1c(%rsp), %r8d
movl %ebx, %r9d
xorl %eax, %eax
pushq %r10
movq %r11, 0x40(%rsp)
pushq %r11
callq 0x3170
addq $0x10, %rsp
testl %r14d, %r14d
jle 0x81d0
movq 0x28(%rsp), %rax
imulq 0xe0(%rsp), %rax
movl %ebx, %ecx
xorl %edx, %edx
movl %ebx, 0x10(%rsp)
testl %ebx, %ebx
jle 0x81bb
movq %rdx, %r9
shlq $0x4, %r9
movq 0x60(%rsp), %rsi
movq 0x8(%rsi,%r9), %rsi
movq 0x58(%rsp), %rdi
movq 0x8(%rdi,%r9), %rdi
movq 0x8(%r13,%r9), %r8
movq 0x50(%rsp), %r10
movq 0x8(%r10,%r9), %r9
xorl %r10d, %r10d
leaq (%r10,%rax), %rbx
movq 0x78(%rsp), %r11
cmpl $0x0, (%r11,%rbx,4)
je 0x81b3
movq (%r8,%rbx,8), %r11
movq 0x8(%r8,%rbx,8), %r12
cmpq %r12, %r11
jae 0x81b3
imulq 0x70(%rsp), %rbx
movq 0xc0(%rsp), %r14
leaq (%r14,%rbx,4), %rbp
movl (%r9,%r11,4), %ebx
testq %rbx, %rbx
je 0x818b
leal -0x1(%rbx), %r14d
movq (%rsi,%r14,8), %r14
jmp 0x818e
xorl %r14d, %r14d
movq (%rsi,%rbx,8), %rbx
cmpq %rbx, %r14
jae 0x81a8
movl (%rdi,%r14,4), %r13d
incl (%rbp,%r13,4)
incq %r14
cmpq %r14, %rbx
jne 0x8197
incq %r11
cmpq %r12, %r11
movq %r15, %r13
jne 0x8178
incq %r10
cmpq %rcx, %r10
jne 0x8148
incq %rdx
movq 0x68(%rsp), %r14
cmpq %r14, %rdx
movl 0x10(%rsp), %ebx
jne 0x8113
movq 0xf0(%rsp), %rax
movq 0x28(%rsp), %r12
imulq %r12, %rax
movq 0xc0(%rsp), %rcx
leaq (%rcx,%rax,4), %rbx
movq %rbx, %rdi
movq 0x38(%rsp), %rbp
movq %rbp, %rsi
movl $0x4, %edx
callq 0x3120
testl %eax, %eax
js 0x8332
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x3360
movq 0x40(%rsp), %rdx
incq %r12
cmpq 0x8(%rsp), %r12
jne 0x808d
testl %r14d, %r14d
movq 0xd8(%rsp), %r14
movq %r13, %r12
movq 0x60(%rsp), %r13
movq 0x58(%rsp), %rbp
movq 0x50(%rsp), %r15
jle 0x828c
xorl %ebx, %ebx
movq (%r13,%rbx), %rsi
movq 0x8(%r13,%rbx), %rdi
callq 0x3360
movq (%rbp,%rbx), %rsi
movq 0x8(%rbp,%rbx), %rdi
callq 0x3360
movq (%r12,%rbx), %rsi
movq 0x8(%r12,%rbx), %rdi
callq 0x3360
movq (%r15,%rbx), %rsi
movq 0x8(%r15,%rbx), %rdi
callq 0x3360
addq $0x10, %rbx
cmpq %rbx, %r14
jne 0x8249
movq %r13, %rdi
callq 0x3040
movq %rbp, %rdi
callq 0x3040
movq %r12, %rdi
callq 0x3040
movq %r15, %rdi
callq 0x3040
movl 0x5623e(%rip), %esi     # 0x5e4f0
movl 0x5623c(%rip), %edx     # 0x5e4f4
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movq 0xa0(%rsp), %rbx
movq %rbx, %rcx
movq 0x80(%rsp), %r15
movq %r15, %r8
movq 0x48(%rsp), %r9
pushq 0xa8(%rsp)
movq 0xa0(%rsp), %r14
pushq %r14
movq 0xa0(%rsp), %r12
pushq %r12
callq 0xa965
addq $0x20, %rsp
movq %rbx, %rdi
callq 0x3040
movq %r15, %rdi
callq 0x3040
movq %r12, %rdi
callq 0x3040
movq %r14, %rdi
callq 0x3040
addq $0x7c8, %rsp            # imm = 0x7C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3060
movl (%rax), %edi
leaq 0xde7e(%rip), %rsi      # 0x161be
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xda73(%rip), %rsi      # 0x15dc8
jmp 0x8340
callq 0x3060
movl (%rax), %edi
leaq 0xdaa9(%rip), %rsi      # 0x15e0e
jmp 0x8340
callq 0x3060
movl (%rax), %edi
leaq 0xdade(%rip), %rsi      # 0x15e53
movq 0x68(%rsp), %rdx
movl %ebx, %ecx
jmp 0x8390
callq 0x3060
movl (%rax), %edi
leaq 0xdb0e(%rip), %rsi      # 0x15e9a
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x3330
leaq 0xdd95(%rip), %rsi      # 0x16133
leaq 0x1c0(%rsp), %rdx
movl $0x11, %edi
jmp 0x8444
callq 0x3060
movl (%rax), %edi
leaq 0xdd59(%rip), %rsi      # 0x16117
jmp 0x843c
callq 0x3060
movl (%rax), %edi
leaq 0xdc56(%rip), %rsi      # 0x16024
movl $0x10000000, %edx       # imm = 0x10000000
movl %r12d, %ecx
xorl %eax, %eax
callq 0x3330
callq 0x3060
xorps %xmm0, %xmm0
cvtsi2ssl 0x20(%rsp), %xmm0
mulss 0xd355(%rip), %xmm0     # 0x15748
movl (%rax), %edi
cvtsi2ss %r12d, %xmm1
mulss %xmm0, %xmm1
mulss 0xd346(%rip), %xmm1     # 0x1574c
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
leaq 0xdc3a(%rip), %rsi      # 0x1604e
movb $0x1, %al
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xdd25(%rip), %rsi      # 0x1614e
jmp 0x8340
callq 0x3060
movl (%rax), %edi
leaq 0xdcdc(%rip), %rsi      # 0x16118
leaq 0x1c0(%rsp), %rdx
xorl %eax, %eax
callq 0x3330
callq 0x3060
movl (%rax), %edi
leaq 0xdaf0(%rip), %rsi      # 0x15f49
jmp 0x8340