// File: /workspace/github_c_makefile_star2_O3/yhg926[P]public_kssd/global_basic.c
// Function: get_bin_basename_stat
bin_stat_t * get_bin_basename_stat( infile_entry_t* organized_infile_tab, int *shuffle_arr,int binsz)
{
 bin_stat_t *ret = malloc(sizeof(bin_stat_t));
 ret->seqfilebasename = malloc( binsz * BASENAME_LEN );
 llong fsize;
 ret->est_kmc_bf_dr = 0;
 char *fullname,*filename;
 char suftmp[10];
 char cp_filename[BASENAME_LEN];
  int compress_fmt_count = sizeof(compress_fmt)/sizeof(compress_fmt[0]) ;
 int acpt_infile_fmt_count = sizeof(acpt_infile_fmt)/sizeof(acpt_infile_fmt[0]);
 int basename_len;
 for(int i=0; i < binsz; i++){
  fsize = organized_infile_tab[shuffle_arr[i]].fsize;
  fullname = organized_infile_tab[shuffle_arr[i]].fpath;
  (filename = strrchr(fullname,'/') ) ? ++filename : (filename = fullname);
  if( strlen(filename) > BASENAME_LEN)
   err(errno,"input filename:%s excess %d ",filename,BASENAME_LEN);
  strcpy(cp_filename,filename);
  for(int j = 0; j < compress_fmt_count;j++ ){
   basename_len = strlen(filename) - strlen(compress_fmt[j]);
   if( strcmp( ( filename + basename_len ),compress_fmt[j]) == 0 ){
    strcpy( ret->seqfilebasename[i],filename);
    *(cp_filename + basename_len) = '\0';
    fsize *= GZCOMPRESS_RATE;
    break;
   };
  };
  for(int j = 0; j < acpt_infile_fmt_count; j++){
   sprintf(suftmp,".%s",acpt_infile_fmt[j]);
   basename_len = strlen(cp_filename) - strlen(suftmp);
   if( strcmp( (cp_filename + basename_len ), suftmp ) == 0 ){
    if( isOK_fmt_infile(cp_filename,fastq_fmt,FQ_FMT_SZ) )
     fsize = fsize / 2 ;
    else if( isOK_fmt_infile(cp_filename, co_fmt,CO_FMT_SZ ) )
     fsize = fsize / sizeof(llong) ;
    *(cp_filename + basename_len) = '\0';
    break;
   }
  };
  ret->est_kmc_bf_dr += fsize;
  strcpy(ret->seqfilebasename[i],cp_filename);
 };
 return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movl %edx, %ebx
movq %rsi, 0x58(%rsp)
movq %rdi, 0x50(%rsp)
movl $0x18, %edi
callq 0x3340
movq %rax, %r14
movl %ebx, %eax
shll $0x7, %eax
movslq %eax, %rdi
callq 0x3340
movq %rax, 0x18(%rsp)
movq %rax, 0x8(%r14)
movq %r14, 0x10(%rsp)
movq $0x0, (%r14)
testl %ebx, %ebx
jle 0x12821
movl %ebx, %eax
movq %rax, 0x48(%rsp)
leaq 0x60(%rsp), %r14
leaq 0x34(%rsp), %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq %r15, 0x20(%rsp)
movq 0x58(%rsp), %rax
movq %r12, 0x28(%rsp)
movslq (%rax,%r12,4), %rax
shlq $0x4, %rax
movq 0x50(%rsp), %rcx
movq (%rcx,%rax), %rdx
movq %rdx, 0x8(%rsp)
movq 0x8(%rcx,%rax), %r13
movq %r13, %rdi
movl $0x2f, %esi
callq 0x31d0
leaq 0x1(%rax), %r12
testq %rax, %rax
cmoveq %r13, %r12
movq %r12, %rdi
callq 0x3130
cmpq $0x81, %rax
jae 0x12838
movq %r14, %rdi
movq %r12, %rsi
callq 0x3080
movq %r12, %rdi
callq 0x3130
movq %rax, %r13
movb $0x1, %bpl
xorl %eax, %eax
leaq 0xbaa6(%rip), %rcx      # 0x1e000
movq (%rcx,%rax,8), %r15
movq %r15, %rdi
callq 0x3130
movl %r13d, %ecx
subl %eax, %ecx
movslq %ecx, %r14
leaq (%r12,%r14), %rdi
movq %r15, %rsi
callq 0x32b0
testl %eax, %eax
je 0x12590
movl $0x1, %eax
testb $0x1, %bpl
movl $0x0, %ebp
jne 0x12553
jmp 0x125ba
movq 0x28(%rsp), %rdi
shlq $0x7, %rdi
addq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x3080
movb $0x0, 0x60(%rsp,%r14)
movq 0x8(%rsp), %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x8(%rsp)
xorl %r13d, %r13d
leaq 0x60(%rsp), %r14
leaq 0xb9b7(%rip), %rbp      # 0x1df80
movq (%r13,%rbp), %rdx
movq %rbx, %rdi
leaq 0x2df4(%rip), %rsi      # 0x153cc
xorl %eax, %eax
callq 0x3430
movq %r14, %rdi
callq 0x3130
movq %rax, %r15
movq %rbx, %rdi
callq 0x3130
subl %eax, %r15d
movslq %r15d, %rax
leaq (%rsp,%rax), %r12
addq $0x60, %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x32b0
testl %eax, %eax
je 0x12628
addq $0x8, %r13
cmpq $0x38, %r13
jne 0x125c9
movq 0x20(%rsp), %r15
movq 0x8(%rsp), %rdx
jmp 0x127ef
movq %r14, %rdi
callq 0x3130
movq %rax, %r13
xorl %ebp, %ebp
xorl %ecx, %ecx
leaq 0xb9c2(%rip), %rax      # 0x1e000
movq (%rax,%rcx,8), %r15
movq %r15, %rdi
callq 0x3130
movl %r13d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (%rsp,%rax), %rdi
addq $0x60, %rdi
movq %r15, %rsi
callq 0x32b0
testb $0x1, %bpl
jne 0x12674
movl $0x1, %ecx
movb $0x1, %bpl
testl %eax, %eax
jne 0x12637
testl %eax, %eax
movq %r14, %r13
leaq 0xe0(%rsp), %rax
cmoveq %rax, %r13
movq 0xb954(%rip), %rdx      # 0x1dfe0
leaq 0x3e(%rsp), %rbp
movq %rbp, %rdi
leaq 0x2d31(%rip), %rsi      # 0x153cc
xorl %eax, %eax
callq 0x3430
movq %r13, %rdi
callq 0x3130
leaq (%rax,%r13), %r15
movq %rbp, %rdi
callq 0x3130
subq %rax, %r15
movq %r15, %rdi
movq %rbp, %rsi
callq 0x32b0
testl %eax, %eax
je 0x12726
xorl %ebp, %ebp
cmpq $0x1, %rbp
je 0x12733
leaq 0xb909(%rip), %rax      # 0x1dfe0
movq 0x8(%rax,%rbp,8), %rdx
leaq 0x3e(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2ce1(%rip), %rsi      # 0x153cc
xorl %eax, %eax
callq 0x3430
movq %r13, %rdi
callq 0x3130
leaq (%rax,%r13), %r15
movq %rbx, %rdi
callq 0x3130
subq %rax, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32b0
incq %rbp
testl %eax, %eax
jne 0x126ca
cmpq $0x1, %rbp
leaq 0x34(%rsp), %rbx
jne 0x12733
movq 0x8(%rsp), %rdx
shrq %rdx
jmp 0x127e5
movq %r14, %rdi
callq 0x3130
movq %rax, %r13
xorl %ebp, %ebp
xorl %ecx, %ecx
leaq 0xb8b7(%rip), %rax      # 0x1e000
movq (%rax,%rcx,8), %r15
movq %r15, %rdi
callq 0x3130
movl %r13d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (%rsp,%rax), %rdi
addq $0x60, %rdi
movq %r15, %rsi
callq 0x32b0
testb $0x1, %bpl
jne 0x1277f
movl $0x1, %ecx
movb $0x1, %bpl
testl %eax, %eax
jne 0x12742
testl %eax, %eax
movq %r14, %r15
leaq 0xe0(%rsp), %rax
cmoveq %rax, %r15
movq 0xb859(%rip), %rdx      # 0x1dff0
leaq 0x3e(%rsp), %rbx
movq %rbx, %rdi
leaq 0x2c26(%rip), %rsi      # 0x153cc
xorl %eax, %eax
callq 0x3430
movq %r15, %rdi
callq 0x3130
addq %rax, %r15
movq %rbx, %rdi
callq 0x3130
subq %rax, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32b0
movq 0x8(%rsp), %rdx
movq %rdx, %rcx
shrq $0x3, %rcx
testl %eax, %eax
cmoveq %rcx, %rdx
leaq 0x34(%rsp), %rbx
movb $0x0, (%r12)
movq 0x20(%rsp), %r15
addq %rdx, %r15
movq 0x10(%rsp), %rax
movq %r15, (%rax)
movq 0x28(%rsp), %r12
movq %r12, %rdi
shlq $0x7, %rdi
addq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3080
incq %r12
cmpq 0x48(%rsp), %r12
jne 0x124e2
movq 0x10(%rsp), %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3060
movl (%rax), %edi
leaq 0x56f7(%rip), %rsi      # 0x17f3d
movq %r12, %rdx
movl $0x80, %ecx
xorl %eax, %eax
callq 0x3330