// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/command_dist.c
// Function: dist_dispatch
int dist_dispatch(dist_opt_val_t *opt_val)
{
 if( opt_val->mmry == 0 )
  opt_val->mmry = get_sys_mmry();
 llint base_mem = (llint)( (opt_val->mmry - get_sys_mmry()) * BBILLION ) - mem_usage_stat.others ;
 real_time_mem = base_mem + (llint)(get_sys_mmry()*BBILLION) ;
 int p_fit_mem = 1;
 if( ( opt_val->refpath[0] != '\0' ) )
  {
  const char *refco_dstat_fpath = test_get_fullpath(opt_val->refpath,co_dstat);
  const char *refmco_dstat_fpath = test_get_fullpath(opt_val->refpath,mco_dstat);
  if( (refco_dstat_fpath == NULL ) && ( refmco_dstat_fpath == NULL) ){
   infile_tab_t *ref_stat = dist_organize_refpath(opt_val);
   if(ref_stat->infile_num == 0)
    err(errno,"no valid input .fas/.fq file or absent %s | %s in %s \n", co_dstat, mco_dstat, opt_val->refpath ) ;
   infile_fmt_count_t* ref_fmt_count;
      ref_fmt_count = infile_fmt_count(ref_stat);
   if( (ref_stat->infile_num == 0) || (ref_fmt_count->fasta + ref_fmt_count->fastq != ref_stat->infile_num ))
    err(errno,"not a valid input files: make sure input files are .fas/.fq format"
     "or .co.num |.mco.num files with %s | %s in %s \n", co_dstat, mco_dstat, opt_val->refpath );
   const char *dist_refco_dir = opt_val->outdir;
   mkdir(dist_refco_dir,0777);
   int *shuffled_refname_ind = shuffleN( ref_stat->infile_num, 0 );
   mem_usage_stat.input_file_name_sz = ref_stat->infile_num * ( sizeof(llong) + PATHLEN*sizeof(char) );
real_time_mem -= mem_usage_stat.input_file_name_sz;
   dim_shuffle = get_dim_shuffle(opt_val);
    hashsize = get_hashsz(dim_shuffle);
    seq2co_global_var_initial();
    mem_usage_stat.shuffled_subctx_arr_sz = (1LLU << 4*( dim_shuffle->dim_shuffle_stat.subk) )*sizeof(int);
real_time_mem -= mem_usage_stat.shuffled_subctx_arr_sz;
   p_fit_mem = real_time_mem / ( (hashsize + 1) * sizeof(llong));
   if( opt_val->p < p_fit_mem )
    p_fit_mem = opt_val->p;
   else if(p_fit_mem < 1)
    err(errno,"dist_dispatch():\n"
    " Kmer hashing need mem.(%lf G) exceed the mem. system or user provide (%lf G)\n"
    " user can either consider specify more mem.(-m ) or use smaller k value ( -k)\n"
    " or increase dimension reduction level ( -L)\n",
    (double)hashsize * sizeof(llong)/1e9, opt_val->mmry);
   size_t phash_mem = (llong)p_fit_mem * (hashsize + 1) * sizeof(llong);
real_time_mem -= phash_mem;
   opt_val->abundance = false;
   const char *refcostat = run_stageI(opt_val, ref_stat, shuffled_refname_ind, dist_refco_dir, p_fit_mem);
   run_stageII(refcostat, opt_val->outdir , opt_val->p);
   free(dim_shuffle->shuffled_dim);
real_time_mem += mem_usage_stat.shuffled_subctx_arr_sz;
  }
  else if ( refco_dstat_fpath != NULL) {
   if (refmco_dstat_fpath == NULL)
    run_stageII(refco_dstat_fpath, opt_val->refpath ,opt_val->p);
  }
  else if(refmco_dstat_fpath != NULL) {;}
  free((char*)refco_dstat_fpath);
  free((char*)refmco_dstat_fpath);
 }
 if ( (opt_val->num_remaining_args >0) || (opt_val->fpath[0] != '\0' ) )
 {
  const char *qryco_dstat_fpath = NULL;
  const char *qrymco_dstat_fpath = NULL;
  if((opt_val->pipecmd[0]=='\0') && (opt_val->num_remaining_args >0)){
   qryco_dstat_fpath = test_get_fullpath(opt_val->remaining_args[0],co_dstat);
   qrymco_dstat_fpath = test_get_fullpath(opt_val->remaining_args[0],mco_dstat);
  }
  if(opt_val->refpath[0] != '\0'){
   const char *ref_db = test_get_fullpath(opt_val->refpath, mco_dstat);
   if(ref_db==NULL) err(errno,"need speficy the ref-sketch path for -r to run the query-ref search model");
   FILE * ref_mco_stat_fp;
    if ((ref_mco_stat_fp = fopen(ref_db,"rb")) == NULL) err(errno,"mco stat file:%s",ref_db );
   mco_dstat_t mco_ref_dstat;
   fread( &mco_ref_dstat, sizeof(mco_dstat_t),1,ref_mco_stat_fp );
   fclose(ref_mco_stat_fp);
   if( qryco_dstat_fpath != NULL ){
    FILE *qry_co_stat_fp;
    if (( qry_co_stat_fp = fopen(qryco_dstat_fpath,"rb")) == NULL) err(errno,"qry co stat file:%s",qryco_dstat_fpath);
    co_dstat_t co_qry_dstat;
    fread( &co_qry_dstat, sizeof(co_dstat_t), 1, qry_co_stat_fp);
    if(co_qry_dstat.shuf_id != mco_ref_dstat.shuf_id )
     err(errno, "qry shuf_id: %d not match ref shuf_id: %d\ntry regenerate .co dir and feed -s the .shuf"
           "file used to generated ref database",co_qry_dstat.shuf_id,mco_ref_dstat.shuf_id);
    else if(co_qry_dstat.comp_num != mco_ref_dstat.comp_num)
     err(errno, "qry comp_num: %d not match ref comp_num: %d",co_qry_dstat.comp_num, mco_ref_dstat.comp_num);
    mco_cbdco_nobin_dist(opt_val);
    }
   else if (qrymco_dstat_fpath != NULL)
    err(errno,"when -r specified, the query sould not be .mco format, the valid query format shoulde be .fas/.fq file or .co");
   else{
    infile_tab_t *infile_stat = dist_organize_infiles(opt_val);
    infile_fmt_count_t* qry_fmt_count;
      qry_fmt_count = infile_fmt_count(infile_stat);
    bool is_valid_fas_fq_in = (infile_stat->infile_num != 0) &&
       (qry_fmt_count->fasta + qry_fmt_count->fastq == infile_stat->infile_num );
    if(is_valid_fas_fq_in){
    }
    else err(errno,"please specify valid query genomes seq or .co file for database search");
   }
  }
  else if( qryco_dstat_fpath != NULL) {
   if( opt_val->num_remaining_args == 1 ){
       run_stageII(qryco_dstat_fpath,opt_val->outdir, opt_val->p);
   }
   else if (opt_val->num_remaining_args > 1){
    combine_queries(opt_val);
   }
    }
  else if ( (qrymco_dstat_fpath != NULL) && (opt_val->num_remaining_args > 1 )){
  }
  else {
    infile_tab_t *infile_stat = dist_organize_infiles(opt_val);
        infile_fmt_count_t* qry_fmt_count;
        qry_fmt_count = infile_fmt_count(infile_stat);
        bool is_valid_fas_fq_in = (infile_stat->infile_num != 0) &&
          (qry_fmt_count->fasta + qry_fmt_count->fastq == infile_stat->infile_num );
        if(is_valid_fas_fq_in || (opt_val->pipecmd[0] != '\0') ){
          const char *dist_co_dir = opt_val->outdir;
     mkdir(dist_co_dir,0777);
     int *shuffled_refname_ind = shuffleN( infile_stat->infile_num, 0 );
     mem_usage_stat.input_file_name_sz = infile_stat->infile_num * ( sizeof(llong) + PATHLEN*sizeof(char) );
real_time_mem -= mem_usage_stat.input_file_name_sz;
     dim_shuffle = get_dim_shuffle(opt_val);
        hashsize = get_hashsz(dim_shuffle);
        seq2co_global_var_initial();
        mem_usage_stat.shuffled_subctx_arr_sz = (1LLU << 4*( dim_shuffle->dim_shuffle_stat.subk) )*sizeof(int);
real_time_mem -= mem_usage_stat.shuffled_subctx_arr_sz;
     p_fit_mem = real_time_mem / ( (hashsize + 1) * sizeof(llong));
     if( opt_val->p < p_fit_mem ) p_fit_mem = opt_val->p;
        else if(p_fit_mem < 1)
          err(errno,"dist_dispatch():\n"
          " Kmer hashing need mem.(%lf G) exceed the mem. system or user provide (%lf G)\n"
          " user can either consider specify more mem.(-m ) or use smaller k value ( -k)\n"
          " or increase dimension reduction level ( -L)\n",
          (double)hashsize * sizeof(llong)/1e9, opt_val->mmry);
     size_t phash_mem = (llong)p_fit_mem * (hashsize + 1) * sizeof(llong);
real_time_mem -= phash_mem ;
        run_stageI(opt_val,infile_stat,shuffled_refname_ind,dist_co_dir,p_fit_mem);
        }
    else err(errno,"not valid raw seq format");
  }
 }
 return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movsd 0x110(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7917
jp 0x7917
callq 0x165c0
movq -0x8(%rbp), %rax
movsd %xmm0, 0x110(%rax)
movq -0x8(%rbp), %rax
movsd 0x110(%rax), %xmm0
movsd %xmm0, -0x110(%rbp)
callq 0x165c0
movaps %xmm0, %xmm1
movsd -0x110(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd 0x14d49(%rip), %xmm1    # 0x1c690
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
subq 0x1ae89(%rip), %rax     # 0x227e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
callq 0x165c0
movq -0x108(%rbp), %rax
movsd 0x14d16(%rip), %xmm1    # 0x1c690
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
addq %rcx, %rax
movq %rax, 0x1cb43(%rip)     # 0x244d0
movl $0x1, -0x14(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x122(%rax), %eax
cmpl $0x0, %eax
je 0x7cd1
movq -0x8(%rbp), %rdi
addq $0x122, %rdi            # imm = 0x122
leaq 0x14d36(%rip), %rsi     # 0x1c6f0
callq 0x8250
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x122, %rdi            # imm = 0x122
leaq 0x14d28(%rip), %rsi     # 0x1c6fd
callq 0x8250
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7c87
cmpq $0x0, -0x28(%rbp)
jne 0x7c87
movq -0x8(%rbp), %rdi
callq 0x8340
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x7a38
callq 0x3050
movl (%rax), %edi
movq -0x8(%rbp), %r8
addq $0x122, %r8             # imm = 0x122
leaq 0x14da1(%rip), %rsi     # 0x1c7c4
leaq 0x14cc6(%rip), %rdx     # 0x1c6f0
leaq 0x14ccc(%rip), %rcx     # 0x1c6fd
movb $0x0, %al
callq 0x3300
movq -0x30(%rbp), %rdi
callq 0x17460
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x7a63
movq -0x38(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
addl 0x4(%rcx), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx), %eax
je 0x7a91
callq 0x3050
movl (%rax), %edi
movq -0x8(%rbp), %r8
addq $0x122, %r8             # imm = 0x122
leaq 0x14d7f(%rip), %rsi     # 0x1c7fb
leaq 0x14c6d(%rip), %rdx     # 0x1c6f0
leaq 0x14c73(%rip), %rcx     # 0x1c6fd
movb $0x0, %al
callq 0x3300
movq -0x8(%rbp), %rax
addq $0x322, %rax            # imm = 0x322
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x3080
movq -0x30(%rbp), %rax
movl (%rax), %edi
xorl %esi, %esi
callq 0x16220
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movslq (%rax), %rax
imulq $0x108, %rax, %rax      # imm = 0x108
movq %rax, 0x1ad05(%rip)     # 0x227d8
movq 0x1acfe(%rip), %rcx     # 0x227d8
movq 0x1c9ef(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c9e5(%rip)     # 0x244d0
movq -0x8(%rbp), %rdi
callq 0x8430
movq %rax, %rcx
leaq 0x5cb02(%rip), %rax     # 0x64600
movq %rcx, (%rax)
leaq 0x5caf8(%rip), %rax     # 0x64600
movq (%rax), %rdi
callq 0x8570
movl %eax, %ecx
leaq 0x5cb03(%rip), %rax     # 0x6461c
movl %ecx, (%rax)
callq 0x18000
leaq 0x5cad9(%rip), %rax     # 0x64600
movq (%rax), %rax
movl 0x8(%rax), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
shlq $0x2, %rax
movq %rax, 0x1ac89(%rip)     # 0x227d0
movq 0x1ac82(%rip), %rcx     # 0x227d0
movq 0x1c97b(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c971(%rip)     # 0x244d0
movq 0x1c96a(%rip), %rax     # 0x244d0
leaq 0x5caaf(%rip), %rcx     # 0x6461c
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x3, %rcx
xorl %edx, %edx
divq %rcx
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x7b98
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x7be7
cmpl $0x1, -0x14(%rbp)
jge 0x7be5
callq 0x3050
movl (%rax), %edi
leaq 0x5ca70(%rip), %rax     # 0x6461c
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
movsd 0x14ae5(%rip), %xmm1    # 0x1c6a0
mulsd %xmm1, %xmm0
movsd 0x14ad1(%rip), %xmm1    # 0x1c698
divsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd 0x110(%rax), %xmm1
leaq 0x14c8f(%rip), %rsi     # 0x1c86d
movb $0x2, %al
callq 0x3300
jmp 0x7be7
movslq -0x14(%rbp), %rax
leaq 0x5ca2a(%rip), %rcx     # 0x6461c
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq 0x1c8c0(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c8b6(%rip)     # 0x244d0
movq -0x8(%rbp), %rax
movb $0x0, 0x449(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rcx
movl -0x14(%rbp), %r8d
callq 0x8660
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x322, %rsi            # imm = 0x322
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x8fe0
leaq 0x5c99c(%rip), %rax     # 0x64600
movq (%rax), %rax
movq 0x10(%rax), %rdi
callq 0x3040
movq 0x1ab59(%rip), %rax     # 0x227d0
addq 0x1c852(%rip), %rax     # 0x244d0
movq %rax, 0x1c84b(%rip)     # 0x244d0
jmp 0x7cbf
cmpq $0x0, -0x20(%rbp)
je 0x7cb2
cmpq $0x0, -0x28(%rbp)
jne 0x7cb0
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x122, %rsi            # imm = 0x122
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x8fe0
jmp 0x7cbd
cmpq $0x0, -0x28(%rbp)
je 0x7cbb
jmp 0x7cbb
jmp 0x7cbd
jmp 0x7cbf
movq -0x20(%rbp), %rdi
callq 0x3040
movq -0x28(%rbp), %rdi
callq 0x3040
movq -0x8(%rbp), %rax
cmpl $0x0, 0x650(%rax)
jg 0x7cf2
movq -0x8(%rbp), %rax
movsbl 0x222(%rax), %eax
cmpl $0x0, %eax
je 0x823e
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x44b(%rax), %eax
cmpl $0x0, %eax
jne 0x7d5b
movq -0x8(%rbp), %rax
cmpl $0x0, 0x650(%rax)
jle 0x7d5b
movq -0x8(%rbp), %rax
movq 0x658(%rax), %rax
movq (%rax), %rdi
leaq 0x149bc(%rip), %rsi     # 0x1c6f0
callq 0x8250
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rax
movq 0x658(%rax), %rax
movq (%rax), %rdi
leaq 0x149ab(%rip), %rsi     # 0x1c6fd
callq 0x8250
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movsbl 0x122(%rax), %eax
cmpl $0x0, %eax
je 0x7f71
movq -0x8(%rbp), %rdi
addq $0x122, %rdi            # imm = 0x122
leaq 0x1497c(%rip), %rsi     # 0x1c6fd
callq 0x8250
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x7da6
callq 0x3050
movl (%rax), %edi
leaq 0x14ba9(%rip), %rsi     # 0x1c948
movb $0x0, %al
callq 0x3300
movq -0x70(%rbp), %rdi
leaq 0x142a6(%rip), %rsi     # 0x1c057
callq 0x3370
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
jne 0x7dd9
callq 0x3050
movl (%rax), %edi
movq -0x70(%rbp), %rdx
leaq 0x14bc0(%rip), %rsi     # 0x1c992
movb $0x0, %al
callq 0x3300
movq -0x78(%rbp), %rcx
leaq -0x8c(%rbp), %rdi
movl $0x14, %esi
movl $0x1, %edx
callq 0x30a0
movq -0x78(%rbp), %rdi
callq 0x30e0
cmpq $0x0, -0x60(%rbp)
je 0x7ec2
movq -0x60(%rbp), %rdi
leaq 0x14245(%rip), %rsi     # 0x1c057
callq 0x3370
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
jne 0x7e3d
callq 0x3050
movl (%rax), %edi
movq -0x60(%rbp), %rdx
leaq 0x14b6d(%rip), %rsi     # 0x1c9a3
movb $0x0, %al
callq 0x3300
movq -0x98(%rbp), %rcx
leaq -0xb8(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
callq 0x30a0
movl -0xb8(%rbp), %eax
cmpl -0x8c(%rbp), %eax
je 0x7e89
callq 0x3050
movl (%rax), %edi
movl -0xb8(%rbp), %edx
movl -0x8c(%rbp), %ecx
leaq 0x14b35(%rip), %rsi     # 0x1c9b7
movb $0x0, %al
callq 0x3300
movl -0xa8(%rbp), %eax
cmpl -0x80(%rbp), %eax
je 0x7eb2
callq 0x3050
movl (%rax), %edi
movl -0xa8(%rbp), %edx
movl -0x80(%rbp), %ecx
leaq 0x14b86(%rip), %rsi     # 0x1ca31
movb $0x0, %al
callq 0x3300
jmp 0x7eb4
movq -0x8(%rbp), %rdi
callq 0x9210
jmp 0x7f6c
cmpq $0x0, -0x68(%rbp)
je 0x7ede
callq 0x3050
movl (%rax), %edi
leaq 0x14b86(%rip), %rsi     # 0x1ca5d
movb $0x0, %al
callq 0x3300
movq -0x8(%rbp), %rdi
callq 0x9fd0
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x17460
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x111(%rbp)
je 0x7f3a
movq -0xc8(%rbp), %rax
movl (%rax), %eax
movq -0xc8(%rbp), %rcx
addl 0x4(%rcx), %eax
movq -0xc0(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
movb %al, -0x111(%rbp)
movb -0x111(%rbp), %al
andb $0x1, %al
movb %al, -0xc9(%rbp)
testb $0x1, -0xc9(%rbp)
je 0x7f53
jmp 0x7f68
callq 0x3050
movl (%rax), %edi
leaq 0x14b6a(%rip), %rsi     # 0x1cacb
movb $0x0, %al
callq 0x3300
jmp 0x7f6a
jmp 0x7f6c
jmp 0x823c
cmpq $0x0, -0x60(%rbp)
je 0x7fbf
movq -0x8(%rbp), %rax
cmpl $0x1, 0x650(%rax)
jne 0x7fa2
movq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rsi
addq $0x322, %rsi            # imm = 0x322
movq -0x8(%rbp), %rax
movl 0x4(%rax), %edx
callq 0x8fe0
jmp 0x7fba
movq -0x8(%rbp), %rax
cmpl $0x1, 0x650(%rax)
jle 0x7fb8
movq -0x8(%rbp), %rdi
callq 0xa080
jmp 0x7fba
jmp 0x823a
cmpq $0x0, -0x68(%rbp)
je 0x7fd8
movq -0x8(%rbp), %rax
cmpl $0x1, 0x650(%rax)
jle 0x7fd8
jmp 0x8238
movq -0x8(%rbp), %rdi
callq 0x9fd0
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
callq 0x17460
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, (%rcx)
movb %al, -0x112(%rbp)
je 0x8034
movq -0xe0(%rbp), %rax
movl (%rax), %eax
movq -0xe0(%rbp), %rcx
addl 0x4(%rcx), %eax
movq -0xd8(%rbp), %rcx
cmpl (%rcx), %eax
sete %al
movb %al, -0x112(%rbp)
movb -0x112(%rbp), %al
andb $0x1, %al
movb %al, -0xe1(%rbp)
testb $0x1, -0xe1(%rbp)
jne 0x805f
movq -0x8(%rbp), %rax
movsbl 0x44b(%rax), %eax
cmpl $0x0, %eax
je 0x8221
movq -0x8(%rbp), %rax
addq $0x322, %rax            # imm = 0x322
movq %rax, -0xf0(%rbp)
movq -0xf0(%rbp), %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x3080
movq -0xd8(%rbp), %rax
movl (%rax), %edi
xorl %esi, %esi
callq 0x16220
movq %rax, -0xf8(%rbp)
movq -0xd8(%rbp), %rax
movslq (%rax), %rax
imulq $0x108, %rax, %rax      # imm = 0x108
movq %rax, 0x1a728(%rip)     # 0x227d8
movq 0x1a721(%rip), %rcx     # 0x227d8
movq 0x1c412(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c408(%rip)     # 0x244d0
movq -0x8(%rbp), %rdi
callq 0x8430
movq %rax, %rcx
leaq 0x5c525(%rip), %rax     # 0x64600
movq %rcx, (%rax)
leaq 0x5c51b(%rip), %rax     # 0x64600
movq (%rax), %rdi
callq 0x8570
movl %eax, %ecx
leaq 0x5c526(%rip), %rax     # 0x6461c
movl %ecx, (%rax)
callq 0x18000
leaq 0x5c4fc(%rip), %rax     # 0x64600
movq (%rax), %rax
movl 0x8(%rax), %eax
shll $0x2, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
shlq $0x2, %rax
movq %rax, 0x1a6ac(%rip)     # 0x227d0
movq 0x1a6a5(%rip), %rcx     # 0x227d0
movq 0x1c39e(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c394(%rip)     # 0x244d0
movq 0x1c38d(%rip), %rax     # 0x244d0
leaq 0x5c4d2(%rip), %rcx     # 0x6461c
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x3, %rcx
xorl %edx, %edx
divq %rcx
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x8175
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0x81c4
cmpl $0x1, -0x14(%rbp)
jge 0x81c2
callq 0x3050
movl (%rax), %edi
leaq 0x5c493(%rip), %rax     # 0x6461c
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
movsd 0x14508(%rip), %xmm1    # 0x1c6a0
mulsd %xmm1, %xmm0
movsd 0x144f4(%rip), %xmm1    # 0x1c698
divsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd 0x110(%rax), %xmm1
leaq 0x146b2(%rip), %rsi     # 0x1c86d
movb $0x2, %al
callq 0x3300
jmp 0x81c4
movslq -0x14(%rbp), %rax
leaq 0x5c44d(%rip), %rcx     # 0x6461c
movl (%rcx), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
imulq %rcx, %rax
shlq $0x3, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rcx
movq 0x1c2dd(%rip), %rax     # 0x244d0
subq %rcx, %rax
movq %rax, 0x1c2d3(%rip)     # 0x244d0
movq -0x8(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xf8(%rbp), %rdx
movq -0xf0(%rbp), %rcx
movl -0x14(%rbp), %r8d
callq 0x8660
jmp 0x8236
callq 0x3050
movl (%rax), %edi
leaq 0x148e3(%rip), %rsi     # 0x1cb12
movb $0x0, %al
callq 0x3300
jmp 0x8238
jmp 0x823a
jmp 0x823c
jmp 0x823e
xorl %eax, %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax)