// File: /workspace/github_c_makefile_star2_O2/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 0xd51a(%rip), %rsi      # 0x14760
callq 0x112bc
movq %rax, %r14
movq %rbx, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3090
testl %eax, %eax
je 0x7280
callq 0x3060
movl (%rax), %edi
cmpl $0x11, %edi
jne 0x7421
leaq 0xdaf2(%rip), %rdi      # 0x14d68
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3170
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %r15
leaq 0xd0ff(%rip), %rsi      # 0x14393
leaq 0xd4d2(%rip), %rcx      # 0x1476d
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xcdb8(%rip), %rsi      # 0x14067
movq %r13, %rdi
callq 0x33a0
testq %rax, %rax
je 0x73f9
movq %rax, %r12
movq %r14, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
leaq 0x20(%rsp), %rdi
pushq $0x20
popq %rsi
pushq $0x1
popq %rdx
movq %rax, %rcx
callq 0x30c0
leaq 0xcd84(%rip), %rsi      # 0x1406a
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x33a0
testq %rax, %rax
je 0x740c
movq %rax, %r13
movl 0x20(%rsp), %eax
leaq 0x44(%rsp), %rdi
movl %eax, (%rdi)
movups 0x28(%rsp), %xmm0
movups %xmm0, 0x4(%rdi)
movl 0x34(%rsp), %ebp
movl 0x30(%rsp), %eax
movl %eax, 0x8(%rsp)
pushq $0x14
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x3450
movslq %ebp, %r14
leaq (,%r14,4), %rdi
callq 0x3340
movq %rax, %rbp
pushq $0x4
popq %r15
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x30c0
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x3450
movl %r14d, %eax
shll $0x8, %eax
movslq %eax, %rdi
callq 0x3340
movq %rax, %r15
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdi
movq %r14, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movq %r14, %rdx
movq %r13, %rcx
callq 0x3450
movq %rbp, %rdi
callq 0x3040
movq %r15, %rdi
callq 0x3040
movq %r12, %rdi
callq 0x3100
movq %r13, %rdi
callq 0x3100
movq %rbx, %rdi
movq 0x18(%rsp), %rbx
movq %rbx, %rsi
movl %r14d, %edx
movl 0x8(%rsp), %ecx
movl 0xc(%rsp), %r8d
callq 0x35dc
movq %rbx, %rdi
callq 0x3040
movq 0x10(%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 0xd9af(%rip), %rsi      # 0x14db6
movq %r13, %rdx
jmp 0x742b
callq 0x3060
movl (%rax), %edi
leaq 0xd99c(%rip), %rsi      # 0x14db6
movq 0x10(%rsp), %rdx
jmp 0x742b
leaq 0xd970(%rip), %rsi      # 0x14d98
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3330