// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x810, %rsp            # imm = 0x810
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movsd 0x110(%rax), %xmm0
movsd 0x13473(%rip), %xmm2    # 0x1c6b0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rcx
cvttsd2si %xmm0, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
andq %rdx, %rcx
orq %rcx, %rax
shlq $0x1e, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x122, %rax            # imm = 0x122
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x658(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
addq $0x322, %rax            # imm = 0x322
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3080
movl $0x100, %edi            # imm = 0x100
callq 0x3310
movq %rax, -0x48(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x3310
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rdx
leaq 0x13061(%rip), %rsi     # 0x1c32b
leaq 0x1342c(%rip), %rcx     # 0x1c6fd
movb $0x0, %al
callq 0x3400
movq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x13044(%rip), %rsi     # 0x1c32b
leaq 0x13402(%rip), %rcx     # 0x1c6f0
movb $0x0, %al
callq 0x3400
movq -0x48(%rbp), %rdi
leaq 0x12d57(%rip), %rsi     # 0x1c057
callq 0x3370
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x9324
callq 0x3050
movl (%rax), %edi
leaq 0x13a7b(%rip), %rsi     # 0x1cd98
movb $0x0, %al
callq 0x3300
movq -0x50(%rbp), %rdi
leaq 0x12d28(%rip), %rsi     # 0x1c057
callq 0x3370
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x9353
callq 0x3050
movl (%rax), %edi
leaq 0x13a92(%rip), %rsi     # 0x1cdde
movb $0x0, %al
callq 0x3300
movq -0x38(%rbp), %rcx
leaq -0x64(%rbp), %rdi
movl $0x14, %esi
movl $0x1, %edx
callq 0x30a0
movq -0x40(%rbp), %rcx
leaq -0x88(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
callq 0x30a0
movslq -0x74(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3310
movq %rax, -0x90(%rbp)
movslq -0x54(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3310
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rdi
movslq -0x74(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl $0x4, %esi
callq 0x30a0
movq -0x98(%rbp), %rdi
movslq -0x54(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x4, %esi
callq 0x30a0
movl -0x74(%rbp), %eax
shll $0x8, %eax
movslq %eax, %rdi
callq 0x3310
movq %rax, -0xa0(%rbp)
movl -0x54(%rbp), %eax
shll $0x8, %eax
movslq %eax, %rdi
callq 0x3310
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
movslq -0x74(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x30a0
movq -0xa8(%rbp), %rdi
movslq -0x54(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x30a0
movq -0x38(%rbp), %rdi
callq 0x30e0
movq -0x40(%rbp), %rdi
callq 0x30e0
movl -0x58(%rbp), %eax
cmpl -0x78(%rbp), %eax
je 0x946f
callq 0x3050
movl (%rax), %edi
movl -0x58(%rbp), %edx
movl -0x78(%rbp), %ecx
leaq 0x139bb(%rip), %rsi     # 0x1ce23
movb $0x0, %al
callq 0x3300
movl -0x64(%rbp), %eax
cmpl -0x88(%rbp), %eax
je 0x9498
callq 0x3050
movl (%rax), %edi
movl -0x64(%rbp), %edx
movl -0x88(%rbp), %ecx
leaq 0x139d9(%rip), %rsi     # 0x1ce6a
movb $0x0, %al
callq 0x3300
leaq -0x1b0(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x13b05(%rip), %rsi     # 0x1cfaf
movb $0x0, %al
callq 0x3400
leaq -0x1b0(%rbp), %rdi
movl $0x2, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x3350
movl %eax, -0x1b4(%rbp)
cmpl $-0x1, -0x1b4(%rbp)
jne 0x9528
movl -0x1b4(%rbp), %edi
callq 0x3200
leaq -0x1b0(%rbp), %rdi
movl $0x42, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x3350
movl %eax, -0x1b4(%rbp)
cmpl $-0x1, -0x1b4(%rbp)
jne 0x9526
callq 0x3050
movl (%rax), %edi
leaq -0x1b0(%rbp), %rdx
leaq 0x13bc8(%rip), %rsi     # 0x1d0e7
movb $0x0, %al
callq 0x3300
jmp 0x9542
leaq -0x1b0(%rbp), %rdx
movl $0x11, %edi
leaq 0x13bc8(%rip), %rsi     # 0x1d103
movb $0x0, %al
callq 0x3300
movl $0x1e, %edi
callq 0x33a0
movl %eax, -0x1b8(%rbp)
movq $0x10000000, -0x1c0(%rbp) # imm = 0x10000000
movq -0x1c0(%rbp), %rax
movslq -0x1b8(%rbp), %rcx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0x9598
callq 0x3050
movl (%rax), %edi
movq -0x1c0(%rbp), %rdx
movl -0x1b8(%rbp), %ecx
leaq 0x13a63(%rip), %rsi     # 0x1cff4
movb $0x0, %al
callq 0x3300
movq -0x1c0(%rbp), %rdi
shlq $0x3, %rdi
callq 0x3310
movq %rax, -0x1d8(%rbp)
movl $0x6974e5d0, %edi       # imm = 0x6974E5D0
callq 0x3310
movq %rax, -0x1e0(%rbp)
movl -0x54(%rbp), %eax
movl %eax, 0x5af17(%rip)     # 0x644e0
movl -0x74(%rbp), %eax
movl %eax, 0x5af12(%rip)     # 0x644e4
movl -0x80(%rbp), %eax
movl %eax, 0x5af0d(%rip)     # 0x644e8
movl -0x7c(%rbp), %eax
movl %eax, 0x5af08(%rip)     # 0x644ec
leaq -0x6e0(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x13960(%rip), %rsi     # 0x1cf56
movb $0x0, %al
callq 0x3400
movq -0x18(%rbp), %rax
movslq -0x54(%rbp), %rcx
shlq $0x2, %rcx
movslq -0x1b8(%rbp), %rdx
imulq %rdx, %rcx
xorl %edx, %edx
divq %rcx
movl %eax, -0x6e4(%rbp)
cmpl $0x1, -0x6e4(%rbp)
jge 0x966a
callq 0x3050
movl (%rax), %edi
cvtsi2ssl -0x54(%rbp), %xmm0
movss 0x130a8(%rip), %xmm1    # 0x1c6e4
mulss %xmm1, %xmm0
cvtsi2ssl -0x1b8(%rbp), %xmm1
mulss %xmm1, %xmm0
movss 0x1308c(%rip), %xmm1    # 0x1c6e0
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x139bb(%rip), %rsi     # 0x1d01e
movb $0x1, %al
callq 0x3300
movl -0x6e4(%rbp), %eax
imull -0x1b8(%rbp), %eax
movl %eax, -0x6e8(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x54b(%rax), %eax
cmpl $0x0, %eax
je 0x96dc
movq -0x30(%rbp), %rdi
movl 0x5ae49(%rip), %esi     # 0x644e0
movl 0x5ae47(%rip), %edx     # 0x644e4
movq -0x98(%rbp), %rcx
movq -0x90(%rbp), %r8
movl -0x6e8(%rbp), %r9d
movq -0xa8(%rbp), %r11
movq -0xa0(%rbp), %r10
movq -0x8(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xcf20
jmp 0x9fb8
movslq -0x6e8(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
movq %rax, -0x6f0(%rbp)
movl -0x74(%rbp), %eax
cltd
idivl -0x6e8(%rbp)
movl %eax, -0x6f4(%rbp)
movslq -0x54(%rbp), %rax
movslq -0x74(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
movq %rax, -0x700(%rbp)
movl -0x1b4(%rbp), %edi
movq -0x700(%rbp), %rsi
callq 0x31c0
cmpl $-0x1, %eax
jne 0x9749
callq 0x3050
movl (%rax), %edi
leaq 0x139dc(%rip), %rsi     # 0x1d11e
movb $0x0, %al
callq 0x3300
movl -0x1b4(%rbp), %edi
callq 0x3200
leaq -0x1b0(%rbp), %rdi
movl $0x2, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x3350
movl %eax, -0x1b4(%rbp)
cmpl $-0x1, -0x1b4(%rbp)
jne 0x9797
callq 0x3050
movl (%rax), %edi
leaq -0x1b0(%rbp), %rdx
leaq 0x13958(%rip), %rsi     # 0x1d0e8
movb $0x0, %al
callq 0x3300
movq -0x700(%rbp), %rsi
movl -0x1b4(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x1, %ecx
movq %r9, %rdi
callq 0x3130
movq %rax, -0x708(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x708(%rbp)
jne 0x97e8
callq 0x3050
movl (%rax), %edi
leaq 0x13738(%rip), %rsi     # 0x1cf19
movb $0x0, %al
callq 0x3300
movl -0x1b4(%rbp), %edi
callq 0x3200
movslq -0x58(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3310
movq %rax, -0x710(%rbp)
movslq -0x58(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3310
movq %rax, -0x718(%rbp)
movslq -0x58(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3310
movq %rax, -0x720(%rbp)
movslq -0x58(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3310
movq %rax, -0x728(%rbp)
movl $0x0, -0x72c(%rbp)
movl -0x72c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x9a60
leaq -0x3e0(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl -0x72c(%rbp), %r8d
leaq 0x127d9(%rip), %rsi     # 0x1c04e
leaq 0x127c8(%rip), %rcx     # 0x1c044
movb $0x0, %al
callq 0x3400
movq -0x710(%rbp), %rax
movslq -0x72c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x7f0(%rbp)
leaq -0x3e0(%rbp), %rdi
callq 0xd8e0
movq %rax, %rcx
movq -0x7f0(%rbp), %rax
movq %rcx, -0x740(%rbp)
movq %rdx, -0x738(%rbp)
movq -0x740(%rbp), %rcx
movq %rcx, (%rax)
movq -0x738(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x2e0(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl -0x72c(%rbp), %r8d
leaq 0x1275d(%rip), %rsi     # 0x1c04e
leaq 0x12748(%rip), %rcx     # 0x1c040
movb $0x0, %al
callq 0x3400
movq -0x718(%rbp), %rax
movslq -0x72c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x7e8(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0xd8e0
movq %rax, %rcx
movq -0x7e8(%rbp), %rax
movq %rcx, -0x750(%rbp)
movq %rdx, -0x748(%rbp)
movq -0x750(%rbp), %rcx
movq %rcx, (%rax)
movq -0x748(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x5e0(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x72c(%rbp), %r8d
leaq 0x126e1(%rip), %rsi     # 0x1c04e
leaq 0x14aec(%rip), %rcx     # 0x1e460
movb $0x0, %al
callq 0x3400
movq -0x720(%rbp), %rax
movslq -0x72c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x7e0(%rbp)
leaq -0x5e0(%rbp), %rdi
callq 0xd8e0
movq %rax, %rcx
movq -0x7e0(%rbp), %rax
movq %rcx, -0x760(%rbp)
movq %rdx, -0x758(%rbp)
movq -0x760(%rbp), %rcx
movq %rcx, (%rax)
movq -0x758(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x4e0(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x72c(%rbp), %r8d
leaq 0x12665(%rip), %rsi     # 0x1c04e
leaq 0x14a69(%rip), %rcx     # 0x1e459
movb $0x0, %al
callq 0x3400
movq -0x728(%rbp), %rax
movslq -0x72c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x7d8(%rbp)
leaq -0x4e0(%rbp), %rdi
callq 0xd8e0
movq %rax, %rcx
movq -0x7d8(%rbp), %rax
movq %rcx, -0x770(%rbp)
movq %rdx, -0x768(%rbp)
movq -0x770(%rbp), %rcx
movq %rcx, (%rax)
movq -0x768(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x72c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x72c(%rbp)
jmp 0x984d
movl $0x0, -0x774(%rbp)
movl -0x774(%rbp), %eax
cmpl -0x6f4(%rbp), %eax
jg 0x9df1
movl -0x774(%rbp), %eax
cmpl -0x6f4(%rbp), %eax
jne 0x9a9c
movl -0x74(%rbp), %eax
cltd
idivl -0x6e8(%rbp)
movl %edx, -0x1cc(%rbp)
jmp 0x9aa8
movl -0x6e8(%rbp), %eax
movl %eax, -0x1cc(%rbp)
cmpl $0x0, -0x1cc(%rbp)
jne 0x9ab6
jmp 0x9ddd
movslq -0x1cc(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
movq %rax, -0x1c8(%rbp)
movq -0x700(%rbp), %rsi
movl -0x54(%rbp), %edx
movl -0x74(%rbp), %ecx
movl -0x6f4(%rbp), %r8d
movl -0x1cc(%rbp), %r9d
movq -0x1c8(%rbp), %r10
movslq -0x774(%rbp), %rax
imulq -0x6f0(%rbp), %rax
leaq 0x13638(%rip), %rdi     # 0x1d140
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x3150
movl $0x0, -0x778(%rbp)
movl -0x778(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x9d56
movq -0x710(%rbp), %rax
movslq -0x778(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x780(%rbp)
movq -0x718(%rbp), %rax
movslq -0x778(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x788(%rbp)
movq -0x720(%rbp), %rax
movslq -0x778(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x790(%rbp)
movq -0x728(%rbp), %rax
movslq -0x778(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x798(%rbp)
movl $0x0, -0x79c(%rbp)
movl -0x79c(%rbp), %eax
cmpl -0x1cc(%rbp), %eax
jge 0x9d40
movl -0x774(%rbp), %eax
imull -0x6e8(%rbp), %eax
addl -0x79c(%rbp), %eax
movl %eax, -0x7a0(%rbp)
movq -0x90(%rbp), %rax
movslq -0x7a0(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x9bff
jmp 0x9d2c
movslq -0x7a0(%rbp), %rax
movslq -0x54(%rbp), %rcx
imulq %rcx, %rax
movq %rax, -0x7a8(%rbp)
movq -0x790(%rbp), %rax
movslq -0x7a0(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x7b0(%rbp)
movq -0x7b0(%rbp), %rax
movq -0x790(%rbp), %rcx
movl -0x7a0(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0x9d2a
movq -0x798(%rbp), %rax
movq -0x7b0(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x7b4(%rbp)
cmpl $0x0, -0x7b4(%rbp)
jbe 0x9c91
movq -0x780(%rbp), %rax
movl -0x7b4(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x7f8(%rbp)
jmp 0x9c9c
xorl %eax, %eax
movq %rax, -0x7f8(%rbp)
jmp 0x9c9c
movq -0x7f8(%rbp), %rax
movq %rax, -0x7c0(%rbp)
movq -0x7c0(%rbp), %rax
movq %rax, -0x7c8(%rbp)
movq -0x7c8(%rbp), %rax
movq -0x780(%rbp), %rcx
movl -0x7b4(%rbp), %edx
cmpq (%rcx,%rdx,8), %rax
jae 0x9d11
movq -0x708(%rbp), %rax
movq -0x7a8(%rbp), %rcx
movq -0x788(%rbp), %rdx
movq -0x7c8(%rbp), %rsi
movl (%rdx,%rsi,4), %edx
addq %rdx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
movq -0x7c8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x7c8(%rbp)
jmp 0x9cb8
jmp 0x9d13
movq -0x7b0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x7b0(%rbp)
jmp 0x9c2e
jmp 0x9d2c
movl -0x79c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x79c(%rbp)
jmp 0x9bbb
jmp 0x9d42
movl -0x778(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x778(%rbp)
jmp 0x9b22
movq -0x708(%rbp), %rdi
movslq -0x774(%rbp), %rax
movslq -0x6e8(%rbp), %rcx
imulq %rcx, %rax
movslq -0x54(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1c8(%rbp), %rsi
movl $0x4, %edx
callq 0x3100
cmpl $0x0, %eax
jge 0x9da9
callq 0x3050
movl (%rax), %edi
leaq 0x133ec(%rip), %rsi     # 0x1d18e
movb $0x0, %al
callq 0x3300
movq -0x708(%rbp), %rdi
movslq -0x774(%rbp), %rax
movslq -0x6e8(%rbp), %rcx
imulq %rcx, %rax
movslq -0x54(%rbp), %rcx
imulq %rcx, %rax
shlq $0x2, %rax
addq %rax, %rdi
movq -0x1c8(%rbp), %rsi
callq 0x3330
movl -0x774(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x774(%rbp)
jmp 0x9a6a
movl $0x0, -0x7cc(%rbp)
movl -0x7cc(%rbp), %eax
cmpl -0x58(%rbp), %eax
jge 0x9ef6
movq -0x710(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x710(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3330
movq -0x718(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x718(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3330
movq -0x720(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x720(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3330
movq -0x728(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x728(%rbp), %rax
movslq -0x7cc(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3330
movl -0x7cc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7cc(%rbp)
jmp 0x9dfb
movq -0x710(%rbp), %rdi
callq 0x3040
movq -0x718(%rbp), %rdi
callq 0x3040
movq -0x720(%rbp), %rdi
callq 0x3040
movq -0x728(%rbp), %rdi
callq 0x3040
movq -0x30(%rbp), %rdi
movl 0x5a5b0(%rip), %esi     # 0x644e0
movl 0x5a5ae(%rip), %edx     # 0x644e4
movq -0x98(%rbp), %rcx
movq -0x90(%rbp), %r8
movl -0x6e8(%rbp), %r9d
movq -0xa8(%rbp), %r11
movq -0xa0(%rbp), %r10
movq -0x8(%rbp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0xcf20
movq -0x1d8(%rbp), %rdi
callq 0x3040
movq -0x1e0(%rbp), %rdi
callq 0x3040
movq -0x98(%rbp), %rdi
callq 0x3040
movq -0x90(%rbp), %rdi
callq 0x3040
movq -0xa8(%rbp), %rdi
callq 0x3040
movq -0xa0(%rbp), %rdi
callq 0x3040
addq $0x810, %rsp            # imm = 0x810
popq %rbp
retq
nopw %cs:(%rax,%rax)