// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
leaq 0xe16f(%rip), %rsi      # 0x15760
callq 0x11ed1
movq %rax, %r14
movq %rbx, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3090
testl %eax, %eax
je 0x762b
callq 0x3060
movl (%rax), %edi
cmpl $0x11, %edi
jne 0x77db
leaq 0xe747(%rip), %rdi      # 0x15d68
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3170
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %r15
leaq 0xdd54(%rip), %rsi      # 0x15393
leaq 0xe127(%rip), %rcx      # 0x1576d
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xda0d(%rip), %rsi      # 0x15067
movq %r13, %rdi
callq 0x33a0
testq %rax, %rax
je 0x77b3
movq %rax, %r12
movq %r14, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
movq %rbx, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x20, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x30c0
leaq 0xd9d0(%rip), %rsi      # 0x1506a
movq %r15, 0x8(%rsp)
movq %r15, %rdi
callq 0x33a0
testq %rax, %rax
je 0x77c6
movq %rax, %r13
movl 0x20(%rsp), %eax
leaq 0x44(%rsp), %rdi
movl %eax, (%rdi)
movq 0x28(%rsp), %rax
movq %rax, 0x4(%rdi)
movl 0x34(%rsp), %eax
movslq %eax, %rbp
movl %ebp, 0x10(%rdi)
movl 0x30(%rsp), %r14d
movl %r14d, 0xc(%rdi)
movl $0x14, %esi
movl $0x1, %edx
movq %r13, %rcx
callq 0x3450
leaq (,%rbp,4), %rdi
callq 0x3340
movq %rax, %r15
movl $0x4, %esi
movq %rax, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x4, %esi
movq %r15, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3450
movq %rbp, %rdi
shlq $0x8, %rdi
callq 0x3340
movq %rax, %rbx
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x3450
movq %r15, %rdi
callq 0x3040
movq %rbx, %rdi
callq 0x3040
movq %r12, %rdi
callq 0x3100
movq %r13, %rdi
callq 0x3100
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rbx
movq %rbx, %rsi
movl %ebp, %edx
movl %r14d, %ecx
movl 0x4(%rsp), %r8d
callq 0x35fc
movq %rbx, %rdi
callq 0x3040
movq 0x8(%rsp), %rdi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3040
callq 0x3060
movl (%rax), %edi
leaq 0xe5f5(%rip), %rsi      # 0x15db6
movq %r13, %rdx
jmp 0x77e5
callq 0x3060
movl (%rax), %edi
leaq 0xe5e2(%rip), %rsi      # 0x15db6
movq 0x8(%rsp), %rdx
jmp 0x77e5
leaq 0xe5b6(%rip), %rsi      # 0x15d98
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3330