// File: /workspace/github_c_makefile_star2_O1/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 $0xd8, %rsp
movl %edx, %ebx
movq %rsi, 0x38(%rsp)
movq %rdi, 0x30(%rsp)
movl $0x18, %edi
callq 0x3340
movq %rax, %r14
movl %ebx, %eax
shll $0x7, %eax
movslq %eax, %rdi
callq 0x3340
movq %rax, 0x20(%rsp)
movq %rax, 0x8(%r14)
movq %r14, 0x18(%rsp)
movq $0x0, (%r14)
testl %ebx, %ebx
jle 0x11e58
movl %ebx, %eax
movq %rax, 0x28(%rsp)
leaq 0x50(%rsp), %r13
leaq 0x46(%rsp), %rbx
xorl %r14d, %r14d
movq 0x38(%rsp), %rax
movq %r14, 0x10(%rsp)
movslq (%rax,%r14,4), %rax
shlq $0x4, %rax
movq 0x30(%rsp), %rcx
movq (%rcx,%rax), %rdx
movq %rdx, 0x8(%rsp)
movq 0x8(%rcx,%rax), %r12
movq %r12, %rdi
movl $0x2f, %esi
callq 0x31d0
leaq 0x1(%rax), %r15
testq %rax, %rax
cmoveq %r12, %r15
movq %r15, %rdi
callq 0x3130
cmpq $0x81, %rax
jae 0x11e6f
movq %r13, %rdi
movq %r15, %rsi
callq 0x3080
movq %r15, %rdi
callq 0x3130
movq %rax, %r12
xorl %r13d, %r13d
leaq 0xc2e7(%rip), %rax      # 0x1e000
movq (%r13,%rax), %r14
movq %r14, %rdi
callq 0x3130
movl %r12d, %ecx
subl %eax, %ecx
movslq %ecx, %rbp
leaq (%r15,%rbp), %rdi
movq %r14, %rsi
callq 0x32b0
testl %eax, %eax
je 0x11d4a
addq $0x8, %r13
cmpq $0x8, %r13
je 0x11d12
jmp 0x11d73
movq 0x10(%rsp), %rdi
shlq $0x7, %rdi
addq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x3080
movb $0x0, 0x50(%rsp,%rbp)
movq 0x8(%rsp), %rax
leaq (%rax,%rax,4), %rax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0xc1fe(%rip), %rbp      # 0x1df80
movq (%r12,%rbp), %rdx
movq %rbx, %rdi
leaq 0x35ec(%rip), %rsi      # 0x1537c
xorl %eax, %eax
callq 0x3430
movq %r13, %rdi
callq 0x3130
movq %rax, %r14
movq %rbx, %rdi
callq 0x3130
subl %eax, %r14d
movslq %r14d, %rax
leaq (%rsp,%rax), %r15
addq $0x50, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x32b0
testl %eax, %eax
je 0x11ddd
addq $0x8, %r12
cmpq $0x38, %r12
jne 0x11d82
movq 0x10(%rsp), %r14
movq 0x8(%rsp), %rdx
jmp 0x11e2e
movq %r13, %rdi
leaq 0xc1f9(%rip), %rsi      # 0x1dfe0
movl $0x2, %edx
callq 0x115d0
testl %eax, %eax
je 0x11dff
movq 0x8(%rsp), %rdx
shrq %rdx
jmp 0x11e25
movq %r13, %rdi
leaq 0xc1e7(%rip), %rsi      # 0x1dff0
movl $0x1, %edx
callq 0x115d0
movq 0x8(%rsp), %rdx
movq %rdx, %rcx
shrq $0x3, %rcx
testl %eax, %eax
cmovneq %rcx, %rdx
movq 0x10(%rsp), %r14
movb $0x0, (%r15)
movq 0x18(%rsp), %rax
addq %rdx, (%rax)
movq %r14, %rdi
shlq $0x7, %rdi
addq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x3080
incq %r14
cmpq 0x28(%rsp), %r14
jne 0x11ca8
movq 0x18(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3060
movl (%rax), %edi
leaq 0x6090(%rip), %rsi      # 0x17f0d
movq %r15, %rdx
movl $0x80, %ecx
xorl %eax, %eax
callq 0x3330