// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/giextract.c
// Function: readfileofkeystoextract
static Fastakeyquery *readfileofkeystoextract(bool verbose,
                                              GtUword *numofqueries,
                                              const GtStr *fileofkeystoextract,
                                              GtError *err)
{
  FILE *fp;
  GtStr *currentline;
  bool haserr = false;
  uint64_t linenum;
  Fastakeyquery *fastakeyqueries;
#undef SKDEBUG
#ifdef SKDEBUG
  GtUword i;
#endif

  gt_error_check(err);
  *numofqueries = gt_file_number_of_lines(gt_str_get(fileofkeystoextract));
  if (*numofqueries == 0)
  {
    gt_error_set(err,"empty file \"%s\" not allowed",
                 gt_str_get(fileofkeystoextract));
    return NULL;
  }
  fp = gt_fa_fopen(gt_str_get(fileofkeystoextract),"r",err);
  if (fp == NULL)
  {
    return NULL;
  }
  if (verbose)
  {
    printf("# opened keyfile \"%s\"\n",gt_str_get(fileofkeystoextract));
  }
  fastakeyqueries = gt_malloc(sizeof (*fastakeyqueries) * (*numofqueries));
  currentline = gt_str_new();
  for (linenum = 0; gt_str_read_next_line(currentline, fp) != EOF; linenum++)
  {
    if (extractkeyfromcurrentline(fastakeyqueries + linenum,
                                  0,
                                  currentline,
                                  linenum,
                                  fileofkeystoextract,
                                  err) != 0)
    {
      haserr = true;
      break;
    }
    gt_str_reset(currentline);
  }
  gt_str_delete(currentline);
  gt_fa_fclose(fp);
  if (haserr)
  {
    fastakeyqueries_delete(fastakeyqueries,*numofqueries);
    return NULL;
  }
  qsort(fastakeyqueries,(size_t) *numofqueries,sizeof (*fastakeyqueries),
        comparefastakeys);
  if (verbose)
  {
    printf("# "GT_WU" fastakey-queries successfully parsed and sorted\n",
            *numofqueries);
  }
  *numofqueries = remdupsfastakeyqueries(fastakeyqueries,*numofqueries,verbose);
#ifdef SKDEBUG
  for (i=0; i<*numofqueries; i++)
  {
    printf(""GT_WU" %s\n",i,fastakeyqueries[i].fastakey);
  }
#endif
  return fastakeyqueries;
}

// Assembly:
subq $0x58, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movb $0x0, 0x1f(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x252bc1
movq 0x30(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x252b89
jmp 0x252bc1
movq 0x3e9410(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c3479(%rip), %rsi    # 0x516013
leaq 0x2c361e(%rip), %rdx    # 0x5161bf
leaq 0x3271fd(%rip), %rcx    # 0x579da5
leaq 0x326dc4(%rip), %r8     # 0x579973
movl $0xf5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x252bc3
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xdeaa0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x252c21
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x3271b1(%rip), %rsi    # 0x579dbd
movb $0x0, %al
callq 0xd88c0
movq $0x0, 0x50(%rsp)
jmp 0x252dc8
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x30(%rsp), %r8
leaq 0x2d93a0(%rip), %rsi    # 0x52bfda
leaq 0x326d32(%rip), %rdx    # 0x579973
movl $0xfd, %ecx
callq 0xd8df0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x252c66
movq $0x0, 0x50(%rsp)
jmp 0x252dc8
testb $0x1, 0x4f(%rsp)
je 0x252c88
movq 0x38(%rsp), %rdi
callq 0x11dee0
movq %rax, %rsi
leaq 0x327158(%rip), %rdi    # 0x579dd9
movb $0x0, %al
callq 0x19070
movq 0x40(%rsp), %rax
movq (%rax), %rdi
shlq $0x5, %rdi
leaq 0x326cd8(%rip), %rsi    # 0x579973
movl $0x106, %edx            # imm = 0x106
callq 0xe80f0
movq %rax, 0x8(%rsp)
callq 0x11d4a0
movq %rax, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11e3a0
cmpl $-0x1, %eax
je 0x252d25
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
shlq $0x5, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
xorl %eax, %eax
movl %eax, %esi
callq 0x2530a0
cmpl $0x0, %eax
je 0x252d0b
movb $0x1, 0x1f(%rsp)
jmp 0x252d25
movq 0x20(%rsp), %rdi
callq 0x11e110
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x252cbd
movq 0x20(%rsp), %rdi
callq 0x11f560
movq 0x28(%rsp), %rdi
callq 0xd9390
testb $0x1, 0x1f(%rsp)
je 0x252d5d
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
callq 0x253020
movq $0x0, 0x50(%rsp)
jmp 0x252dc8
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movl $0x20, %edx
leaq 0x79a(%rip), %rcx       # 0x253510
callq 0x19e70
testb $0x1, 0x4f(%rsp)
je 0x252d98
movq 0x40(%rsp), %rax
movq (%rax), %rsi
leaq 0x32705f(%rip), %rdi    # 0x579df0
movb $0x0, %al
callq 0x19070
movq 0x8(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movb 0x4f(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x2535f0
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)