// File: /workspace/github_c_makefile_star2_O3/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 0xde11(%rip), %rsi      # 0x157b0
callq 0x1289a
movq %rax, %r14
movq %rbx, %rdi
movl $0x1c0, %esi            # imm = 0x1C0
callq 0x3090
testl %eax, %eax
je 0x79d9
callq 0x3060
movl (%rax), %edi
cmpl $0x11, %edi
jne 0x7b82
leaq 0xe3e9(%rip), %rdi      # 0x15db8
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3170
movl $0x100, %edi            # imm = 0x100
callq 0x3340
movq %rax, %r15
leaq 0xd9f6(%rip), %rsi      # 0x153e3
leaq 0xddc9(%rip), %rcx      # 0x157bd
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3430
leaq 0xd65f(%rip), %rsi      # 0x15067
movq %r13, %rdi
callq 0x33a0
testq %rax, %rax
je 0x7b5a
movq %rax, %r12
movq %r14, 0x18(%rsp)
movl %ebp, 0xc(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x20, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x30c0
leaq 0xd627(%rip), %rsi      # 0x1506a
movq %r15, 0x10(%rsp)
movq %r15, %rdi
callq 0x33a0
testq %rax, %rax
je 0x7b6d
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)
movl $0x14, %esi
movl $0x1, %edx
movq %r13, %rcx
callq 0x3450
movslq %ebp, %r14
leaq (,%r14,4), %rdi
callq 0x3340
movq %rax, %rbp
movl $0x4, %esi
movq %rax, %rdi
movq %r14, %rdx
movq %r12, %rcx
callq 0x30c0
movl $0x4, %esi
movq %rbp, %rdi
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 0x35fc
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 0xe29e(%rip), %rsi      # 0x15e06
movq %r13, %rdx
jmp 0x7b8c
callq 0x3060
movl (%rax), %edi
leaq 0xe28b(%rip), %rsi      # 0x15e06
movq 0x10(%rsp), %rdx
jmp 0x7b8c
leaq 0xe25f(%rip), %rsi      # 0x15de8
movq %rbx, %rdx
xorl %eax, %eax
callq 0x3330