// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/command_dist.c
// Function: run_stageII
void run_stageII(const char * co_dstat_fpath, const char* dist_mco_dir, int p_fit_mem)
{
    const char* dist_co_dir = get_pathname(co_dstat_fpath,co_dstat);
   if ( mkdir(dist_mco_dir, 0700) ) {
    if(errno == EEXIST)
     printf("Warning: write mco file to an exists outdir:%s\n",dist_mco_dir);
    else
     err(errno,"run_stageII(): mkdir %s error", dist_mco_dir);
   }
      const char* mco_dstat_fpath = malloc(PATHLEN*sizeof(char));
   sprintf((char*)mco_dstat_fpath,"%s/%s",dist_mco_dir,mco_dstat);
   FILE *co_stat_fp,*mco_stat_fp;
   if( ( co_stat_fp = fopen(co_dstat_fpath,"rb")) == NULL ) err(errno,"run_stageII(():%s",co_dstat_fpath);
   co_dstat_t co_dstat_readin;
   fread( &co_dstat_readin, sizeof(co_dstat_t),1,co_stat_fp );
   if( ( mco_stat_fp = fopen(mco_dstat_fpath,"wb")) == NULL ) err(errno,"run_stageII(():%s",mco_dstat_fpath);
   mco_dstat_t mco_dstat_writeout;
   mco_dstat_writeout.shuf_id = co_dstat_readin.shuf_id;
   mco_dstat_writeout.kmerlen = co_dstat_readin.kmerlen ;
      mco_dstat_writeout.dim_rd_len = co_dstat_readin.dim_rd_len ;
   mco_dstat_writeout.infile_num = co_dstat_readin.infile_num;
   mco_dstat_writeout.comp_num = co_dstat_readin.comp_num ;
   fwrite(&mco_dstat_writeout,sizeof(mco_dstat_writeout),1, mco_stat_fp );
   ctx_obj_ct_t *tmp_ctx_ct = malloc(sizeof(ctx_obj_ct_t)*co_dstat_readin.infile_num);
   fread(tmp_ctx_ct,sizeof(ctx_obj_ct_t),co_dstat_readin.infile_num,co_stat_fp);
   fwrite(tmp_ctx_ct,sizeof(ctx_obj_ct_t),co_dstat_readin.infile_num,mco_stat_fp);
   char (*tmpname)[PATHLEN] = malloc( PATHLEN * co_dstat_readin.infile_num );
   fread(tmpname,PATHLEN,co_dstat_readin.infile_num,co_stat_fp);
   fwrite(tmpname,PATHLEN,co_dstat_readin.infile_num,mco_stat_fp);
   free(tmp_ctx_ct);
   free(tmpname);
   fclose(co_stat_fp);
   fclose(mco_stat_fp);
   combco2mco(dist_mco_dir,dist_co_dir,co_dstat_readin.infile_num,co_dstat_readin.comp_num,p_fit_mem);
   free((char*)dist_co_dir );
   free((char*)mco_dstat_fpath);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x136ef(%rip), %rsi     # 0x1c6f0
callq 0x17a00
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3080
cmpl $0x0, %eax
je 0x9056
callq 0x3050
cmpl $0x11, (%rax)
jne 0x903b
movq -0x10(%rbp), %rsi
leaq 0x13d06(%rip), %rdi     # 0x1cd38
movb $0x0, %al
callq 0x3150
jmp 0x9054
callq 0x3050
movl (%rax), %edi
movq -0x10(%rbp), %rdx
leaq 0x13d1b(%rip), %rsi     # 0x1cd68
movb $0x0, %al
callq 0x3300
jmp 0x9056
movl $0x100, %edi            # imm = 0x100
callq 0x3310
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x132b8(%rip), %rsi     # 0x1c32b
leaq 0x13683(%rip), %rcx     # 0x1c6fd
movb $0x0, %al
callq 0x3400
movq -0x8(%rbp), %rdi
leaq 0x12fcb(%rip), %rsi     # 0x1c057
callq 0x3370
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x90b4
callq 0x3050
movl (%rax), %edi
movq -0x8(%rbp), %rdx
leaq 0x13cd9(%rip), %rsi     # 0x1cd86
movb $0x0, %al
callq 0x3300
movq -0x30(%rbp), %rcx
leaq -0x58(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
callq 0x30a0
movq -0x28(%rbp), %rdi
leaq 0x12f84(%rip), %rsi     # 0x1c05a
callq 0x3370
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x90fe
callq 0x3050
movl (%rax), %edi
movq -0x28(%rbp), %rdx
leaq 0x13c8f(%rip), %rsi     # 0x1cd86
movb $0x0, %al
callq 0x3300
movl -0x58(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x64(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x38(%rbp), %rcx
leaq -0x6c(%rbp), %rdi
movl $0x14, %esi
movl $0x1, %edx
callq 0x3420
movslq -0x44(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3310
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
movslq -0x44(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x4, %esi
callq 0x30a0
movq -0x78(%rbp), %rdi
movslq -0x44(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x4, %esi
callq 0x3420
movl -0x44(%rbp), %eax
shll $0x8, %eax
movslq %eax, %rdi
callq 0x3310
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rdi
movslq -0x44(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x30a0
movq -0x80(%rbp), %rdi
movslq -0x44(%rbp), %rdx
movq -0x38(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
callq 0x3420
movq -0x78(%rbp), %rdi
callq 0x3040
movq -0x80(%rbp), %rdi
callq 0x3040
movq -0x30(%rbp), %rdi
callq 0x30e0
movq -0x38(%rbp), %rdi
callq 0x30e0
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %ecx
movl -0x14(%rbp), %r8d
callq 0x35b0
movq -0x20(%rbp), %rdi
callq 0x3040
movq -0x28(%rbp), %rdi
callq 0x3040
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)