// File: /workspace/github_c_makefile_star2_O0/yhg926[P]public_kssd/global_basic.c
// Function: organize_infile_list
infile_tab_t * organize_infile_list(char* list_path, int fmt_ck)
{
  infile_tab_t *infile_stat = malloc(sizeof(infile_tab_t));
  int alloc_usize = 1024;
  infile_stat->organized_infile_tab = malloc( sizeof(infile_entry_t) * alloc_usize );
    struct stat path_stat;
    FILE * list;
    list = fopen(list_path,"r");
    if(!list) err(errno,"can't open file %s",list_path);
    char *buf = malloc( LMAX * sizeof(char));
    int file_num = 0;
  if(fmt_ck){
     while ( (fgets(buf,LMAX,list))!=NULL){
    while(isspace(*buf)) buf++;
       buf[strcspn(buf, "\r\n")] = 0;
       if( strlen(buf) < 1 )
         continue;
       if( strlen(buf) > PATHLEN )
         err(errno,"the input list: %s\n %dth line:  %s  has %lu characters exceed the maximal allowed length %d",
            list_path,file_num, buf,strlen(buf),PATHLEN);
       memset(&path_stat, 0, sizeof path_stat);
       stat(buf, &path_stat) ;
       if(!S_ISREG(path_stat.st_mode))
          err(errno,"%dth line: %s",file_num, buf);
    else if(!isOK_fmt_infile(buf,acpt_infile_fmt,ACPT_FMT_SZ)){
      printf ("isOK_fmt_infile(): wrong format %dth line: %s\nSupported format are:\n",file_num, buf);
      for(int i=0; acpt_infile_fmt[i]!=NULL;i++)
       printf(".%s ",acpt_infile_fmt[i]);
      printf("\n");
       err(errno,"program exit");
    }
    else {
     infile_stat->organized_infile_tab[file_num].fsize = path_stat.st_size;
     infile_stat->organized_infile_tab[file_num].fpath = malloc(PATHLEN * sizeof(char) );
     strcpy(infile_stat->organized_infile_tab[file_num].fpath, buf);
     file_num++;
     if( file_num >= alloc_usize){
         alloc_usize+=alloc_usize;
          infile_stat->organized_infile_tab
                = realloc(infile_stat->organized_infile_tab, sizeof(infile_entry_t) * alloc_usize );
         }
    }
     };
  }
  else{
   while ( (fgets(buf,LMAX,list))!=NULL){
        while(isspace(*buf)) buf++;
        buf[strcspn(buf, "\r\n")] = 0;
        if( strlen(buf) < 1 )
          continue;
        if( strlen(buf) > PATHLEN )
          err(errno,"the input list: %s\n %dth line:  %s  has %lu characters exceed the maximal allowed length %d",
            list_path,file_num, buf,strlen(buf),PATHLEN);
    infile_stat->organized_infile_tab[file_num].fsize = 0;
    infile_stat->organized_infile_tab[file_num].fpath = malloc(PATHLEN * sizeof(char) );
    strcpy(infile_stat->organized_infile_tab[file_num].fpath, buf);
    file_num++;
    if( file_num >= alloc_usize){
            alloc_usize+=alloc_usize;
            infile_stat->organized_infile_tab
                = realloc(infile_stat->organized_infile_tab, sizeof(infile_entry_t) * alloc_usize );
       }
  }
 }
    infile_stat->infile_num = file_num ;
    fclose(list);
  free(buf);
    return infile_stat;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x10, %edi
callq 0x3310
movq %rax, -0x18(%rbp)
movl $0x400, -0x1c(%rbp)     # imm = 0x400
movslq -0x1c(%rbp), %rdi
shlq $0x4, %rdi
callq 0x3310
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rdi
leaq 0x74ce(%rip), %rsi      # 0x1dcd8
callq 0x3370
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0x16839
callq 0x3050
movl (%rax), %edi
movq -0x8(%rbp), %rdx
leaq 0x8409(%rip), %rsi      # 0x1ec3b
movb $0x0, %al
callq 0x3300
movl $0x1000, %edi           # imm = 0x1000
callq 0x3310
movq %rax, -0xc0(%rbp)
movl $0x0, -0xc4(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x16b49
jmp 0x16860
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rdx
movl $0x1000, %esi           # imm = 0x1000
callq 0x3260
cmpq $0x0, %rax
je 0x16b44
jmp 0x16884
callq 0x34a0
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x168bb
movq -0xc0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc0(%rbp)
jmp 0x16884
movq -0xc0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rdi
leaq 0x8377(%rip), %rsi      # 0x1ec4e
callq 0x3230
movq %rax, %rcx
movq -0xd0(%rbp), %rax
movb $0x0, (%rax,%rcx)
movq -0xc0(%rbp), %rdi
callq 0x3110
cmpq $0x1, %rax
jae 0x16901
jmp 0x16860
movq -0xc0(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x16985
callq 0x3050
movl (%rax), %eax
movl %eax, -0xec(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x3110
movl -0xec(%rbp), %edi
movq -0xe8(%rbp), %rdx
movl -0xdc(%rbp), %ecx
movq -0xd8(%rbp), %r8
movq %rax, %r9
leaq 0x82da(%rip), %rsi      # 0x1ec51
movl $0x100, (%rsp)          # imm = 0x100
movb $0x0, %al
callq 0x3300
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x31f0
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x32b0
movl -0x98(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x169df
callq 0x3050
movl (%rax), %edi
movl -0xc4(%rbp), %edx
movq -0xc0(%rbp), %rcx
leaq 0x82d5(%rip), %rsi      # 0x1ecad
movb $0x0, %al
callq 0x3300
movq -0xc0(%rbp), %rdi
leaq 0xd583(%rip), %rsi      # 0x23f70
movl $0x7, %edx
callq 0x16d60
cmpl $0x0, %eax
jne 0x16a8e
movl -0xc4(%rbp), %esi
movq -0xc0(%rbp), %rdx
leaq 0x82a7(%rip), %rdi      # 0x1ecbb
movb $0x0, %al
callq 0x3150
movl $0x0, -0xc8(%rbp)
movslq -0xc8(%rbp), %rcx
leaq 0xd53d(%rip), %rax      # 0x23f70
cmpq $0x0, (%rax,%rcx,8)
je 0x16a6b
movslq -0xc8(%rbp), %rcx
leaq 0xd528(%rip), %rax      # 0x23f70
movq (%rax,%rcx,8), %rsi
leaq 0x82ad(%rip), %rdi      # 0x1ed00
movb $0x0, %al
callq 0x3150
movl -0xc8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc8(%rbp)
jmp 0x16a25
leaq 0x853d(%rip), %rdi      # 0x1efaf
movb $0x0, %al
callq 0x3150
callq 0x3050
movl (%rax), %edi
leaq 0x827e(%rip), %rsi      # 0x1ed05
movb $0x0, %al
callq 0x3300
movq -0x80(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movl $0x100, %edi            # imm = 0x100
callq 0x3310
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0xc0(%rbp), %rsi
callq 0x3070
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x16b3b
movl -0x1c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
shlq $0x4, %rsi
callq 0x3320
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16b3d
jmp 0x16b3f
jmp 0x16860
jmp 0x16d24
jmp 0x16b4b
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rdx
movl $0x1000, %esi           # imm = 0x1000
callq 0x3260
cmpq $0x0, %rax
je 0x16d22
jmp 0x16b6f
callq 0x34a0
movq (%rax), %rax
movq -0xc0(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x16ba6
movq -0xc0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc0(%rbp)
jmp 0x16b6f
movq -0xc0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xc0(%rbp), %rdi
leaq 0x808c(%rip), %rsi      # 0x1ec4e
callq 0x3230
movq %rax, %rcx
movq -0xf8(%rbp), %rax
movb $0x0, (%rax,%rcx)
movq -0xc0(%rbp), %rdi
callq 0x3110
cmpq $0x1, %rax
jae 0x16bec
jmp 0x16b4b
movq -0xc0(%rbp), %rdi
callq 0x3110
cmpq $0x100, %rax            # imm = 0x100
jbe 0x16c70
callq 0x3050
movl (%rax), %eax
movl %eax, -0x114(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0xc4(%rbp), %eax
movl %eax, -0x104(%rbp)
movq -0xc0(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x3110
movl -0x114(%rbp), %edi
movq -0x110(%rbp), %rdx
movl -0x104(%rbp), %ecx
movq -0x100(%rbp), %r8
movq %rax, %r9
leaq 0x7fef(%rip), %rsi      # 0x1ec51
movl $0x100, (%rsp)          # imm = 0x100
movb $0x0, %al
callq 0x3300
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
movl $0x100, %edi            # imm = 0x100
callq 0x3310
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc4(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0xc0(%rbp), %rsi
callq 0x3070
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x16d1d
movl -0x1c(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movslq -0x1c(%rbp), %rsi
shlq $0x4, %rsi
callq 0x3320
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x16b4b
jmp 0x16d24
movl -0xc4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0xb8(%rbp), %rdi
callq 0x30e0
movq -0xc0(%rbp), %rdi
callq 0x3040
movq -0x18(%rbp), %rax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)