// File: /workspace/github_c_makefile_star2_O2/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, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
pushq $0x18
popq %rdi
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)
andq $0x0, (%r14)
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
movq %rbx, 0x38(%rsp)
leaq 0x50(%rsp), %r14
leaq 0x46(%rsp), %r12
xorl %ebx, %ebx
xorl %r15d, %r15d
cmpq 0x38(%rsp), %r15
je 0x11243
movq %rbx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %r15, 0x8(%rsp)
movslq (%rax,%r15,4), %rax
shlq $0x4, %rax
movq 0x28(%rsp), %rcx
movq (%rcx,%rax), %rdx
movq %rdx, (%rsp)
movq 0x8(%rcx,%rax), %r13
movq %r13, %rdi
pushq $0x2f
popq %rsi
callq 0x31d0
leaq 0x1(%rax), %rbx
testq %rax, %rax
cmoveq %r13, %rbx
movq %rbx, %rdi
callq 0x3130
cmpq $0x81, %rax
jae 0x1125a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3080
movq %rbx, %rdi
callq 0x3130
movq %rax, %r13
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x1115d
leaq 0xbef2(%rip), %rax      # 0x1d000
movq (%r14,%rax), %r15
movq %r15, %rdi
callq 0x3130
movl %r13d, %ecx
subl %eax, %ecx
movslq %ecx, %rbp
leaq (%rbx,%rbp), %rdi
movq %r15, %rsi
callq 0x32b0
addq $0x8, %r14
testl %eax, %eax
jne 0x11101
movq 0x8(%rsp), %rdi
shlq $0x7, %rdi
addq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x3080
movb $0x0, 0x50(%rsp,%rbp)
movq (%rsp), %rax
leaq (%rax,%rax,4), %rax
movq %rax, (%rsp)
xorl %r15d, %r15d
leaq 0x50(%rsp), %r14
leaq 0xbe14(%rip), %r13      # 0x1cf80
leaq 0x3209(%rip), %rbp      # 0x1437c
cmpq $0x38, %r15
je 0x111dc
movq (%r15,%r13), %rdx
movq %r12, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x3430
movq %r14, %rdi
callq 0x3130
movq %rax, %rbx
movq %r12, %rdi
callq 0x3130
subl %eax, %ebx
movslq %ebx, %rax
leaq (%rsp,%rax), %rbx
addq $0x50, %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x32b0
addq $0x8, %r15
testl %eax, %eax
jne 0x11173
movq %r14, %rdi
leaq 0xbe19(%rip), %rsi      # 0x1cfe0
pushq $0x2
popq %rdx
callq 0x10a80
testl %eax, %eax
je 0x111ec
movq (%rsp), %rdx
shrq %rdx
jmp 0x1120f
movq 0x20(%rsp), %rbx
movq 0x8(%rsp), %r15
movq (%rsp), %rdx
jmp 0x1121c
movq %r14, %rdi
leaq 0xbdfa(%rip), %rsi      # 0x1cff0
pushq $0x1
popq %rdx
callq 0x10a80
movq (%rsp), %rdx
movq %rdx, %rcx
shrq $0x3, %rcx
testl %eax, %eax
cmovneq %rcx, %rdx
movq 0x8(%rsp), %r15
movb $0x0, (%rbx)
movq 0x20(%rsp), %rbx
addq %rdx, %rbx
movq 0x10(%rsp), %rax
movq %rbx, (%rax)
movq %r15, %rdi
shlq $0x7, %rdi
addq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x3080
incq %r15
jmp 0x1108a
movq 0x10(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3060
movl (%rax), %edi
leaq 0x5c85(%rip), %rsi      # 0x16eed
movq %rbx, %rdx
movl $0x80, %ecx
xorl %eax, %eax
callq 0x3330