// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-cntlist.c
// Function: gt_cntlist_parse
int gt_cntlist_parse(const char *filename, bool alloc_cntlist,
    GtBitsequence **cntlist, GtUword *nofreads, GtError *err)
{
  int c, retval = 0;
  FILE *infp;

  gt_log_log("parse contained reads list file: %s", filename);
  infp = gt_fa_fopen(filename, "rb", err);

  if (infp == NULL)
    return -1;

  c = gt_xfgetc(infp);
  switch (c)
  {
    case EOF:
      gt_error_set(err, "%s: unexpected end of file", filename);
      retval = 1;
      break;
    case GT_CNTLIST_BIN_HEADER:
      gt_log_log("contained reads list format: BIN");
      retval = gt_cntlist_parse_bin(infp, alloc_cntlist, cntlist, nofreads,
          err);
      break;
    case GT_CNTLIST_BIT_HEADER:
      gt_log_log("contained reads list format: BIT");
      retval = gt_cntlist_parse_bit(infp, alloc_cntlist, cntlist, nofreads,
          err);
      break;
    case GT_CNTLIST_ASCII_HEADER:
      gt_xungetc(c, infp);
      gt_log_log("contained reads list format: ASCII");
      retval = gt_cntlist_parse_ascii(infp, alloc_cntlist, cntlist, nofreads,
          err);
      break;
    default:
      gt_error_set(err, "%s: unrecognized format", filename);
      retval = 1;
      break;
  }
  gt_fa_fclose(infp);

  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r13
leaq 0x1eb128(%rip), %rdi    # 0x3b6099
movq %r13, %rsi
xorl %eax, %eax
callq 0x108e02
leaq 0x1e3d3d(%rip), %rsi    # 0x3aecbf
leaq 0x1eb0e8(%rip), %rdx    # 0x3b6071
movq %r13, %rdi
movl $0xd9, %ecx
movq %r14, %r8
callq 0x101c23
testq %rax, %rax
je 0x1cb0a0
movq %rax, %rbx
movq %rax, %rdi
callq 0x12554f
testl %eax, %eax
jg 0x1cb0ab
cmpl $-0x1, %eax
je 0x1cb1c7
testl %eax, %eax
jne 0x1cb1be
leaq 0x1eb12c(%rip), %rdi    # 0x3b60f9
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, 0x8(%rsp)
movq %r14, %rdx
callq 0x1cb470
movl %eax, %r13d
testl %eax, %eax
jne 0x1cb30b
testq %r15, %r15
je 0x1cb3a4
testb %bpl, %bpl
je 0x1cb325
movq (%r12), %rax
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rbp
movl $0x8, %eax
cmovbq %rax, %rbp
leaq 0x1eb045(%rip), %rdx    # 0x3b6071
xorl %r13d, %r13d
xorl %edi, %edi
movq %rbp, %rsi
movl $0x78, %ecx
callq 0x1094e6
movq %rax, (%r15)
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, %rdx
callq 0x173a0
movq (%r15), %rdi
movq (%r12), %rax
leaq -0x1(%rax), %rdx
shrq $0x6, %rdx
incq %rdx
cmpq $0x40, %rax
movl $0x1, %r14d
cmovbq %r14, %rdx
movl $0x8, %esi
movq %rbx, %rcx
callq 0x17b40
movq (%r12), %rcx
leaq -0x1(%rcx), %rdx
shrq $0x6, %rdx
incq %rdx
cmpq $0x40, %rcx
cmovbq %r14, %rdx
cmpq %rdx, %rax
jne 0x1cb2d7
jmp 0x1cb30b
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x1cb313
cmpl $0x1, %eax
je 0x1cb1e6
cmpl $0x5b, %eax
jne 0x1cb1be
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x125723
leaq 0x1eb049(%rip), %rdi    # 0x3b611a
xorl %eax, %eax
callq 0x108e02
testq %r15, %r15
je 0x1cb39a
testq %r12, %r12
je 0x1cb39a
testq %r14, %r14
je 0x1cb0ff
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1cb39f
leaq 0x1eb15f(%rip), %rsi    # 0x3b6265
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x17ea0
cmpl $0x1, %eax
jne 0x1cb2f4
movq (%r12), %rax
testq %rax, %rax
je 0x1cb2f4
movq %r14, 0x8(%rsp)
testb %bpl, %bpl
je 0x1cb177
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rax
movl $0x8, %r12d
cmovaeq %rax, %r12
leaq 0x1eaf19(%rip), %rdx    # 0x3b6071
xorl %edi, %edi
movq %r12, %rsi
movl $0xc2, %ecx
callq 0x1094e6
movq %rax, (%r15)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x173a0
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
leaq 0x18e8db(%rip), %r12    # 0x359a63
leaq 0x10(%rsp), %r13
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x17ea0
cmpl $0x1, %eax
jne 0x1cb2e5
movq 0x10(%rsp), %rcx
movq %r14, %rax
shrq %cl, %rax
movq (%r15), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
jmp 0x1cb18d
leaq 0x1eaf78(%rip), %rsi    # 0x3b613d
jmp 0x1cb1ce
leaq 0x1eaeef(%rip), %rsi    # 0x3b60bd
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0x1, %r13d
jmp 0x1cb30b
leaq 0x1eaeeb(%rip), %rdi    # 0x3b60d8
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, 0x8(%rsp)
movq %r14, %rdx
callq 0x1cb470
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x1cb30b
testq %r15, %r15
je 0x1cb3a9
testb %bpl, %bpl
je 0x1cb26b
movq (%r12), %rax
leaq -0x1(%rax), %rcx
shrq $0x6, %rcx
cmpq $0x40, %rax
leaq 0x8(,%rcx,8), %rax
movl $0x8, %r12d
cmovaeq %rax, %r12
leaq 0x1eae25(%rip), %rdx    # 0x3b6071
xorl %edi, %edi
movq %r12, %rsi
movl $0xa0, %ecx
callq 0x1094e6
movq %rax, (%r15)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x173a0
leaq 0x10(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x17b40
cmpq $0x1, %rax
jne 0x1cb2c8
movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000
leaq 0x10(%rsp), %r12
movq 0x10(%rsp), %rcx
movq %r14, %rax
shrq %cl, %rax
movq (%r15), %rdx
shrq $0x6, %rcx
orq %rax, (%rdx,%rcx,8)
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x17b40
cmpq $0x1, %rax
je 0x1cb297
movq %rbx, %rdi
callq 0x17be0
xorl %r13d, %r13d
testl %eax, %eax
jne 0x1cb30b
leaq 0x1eafa6(%rip), %rsi    # 0x3b6284
movq 0x8(%rsp), %rdi
jmp 0x1cb2fe
cmpl $-0x1, %eax
movq 0x8(%rsp), %r14
jne 0x1cb2f4
xorl %r13d, %r13d
jmp 0x1cb30b
leaq 0x1eaf89(%rip), %rsi    # 0x3b6284
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x101e80
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
xorl %r13d, %r13d
movl $0x8, %esi
movl $0x1, %edx
leaq 0x10(%rsp), %rdi
movq %rbx, %rcx
callq 0x17b40
movq %rax, %rbp
cmpq $0x1, %rax
jne 0x1cb359
movq 0x10(%rsp), %rax
movq (%r15,%r14,8), %rcx
orq %rax, (%rcx)
jmp 0x1cb372
movq 0x8(%rsp), %rdi
leaq 0x1eaf1f(%rip), %rsi    # 0x3b6284
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpq $0x1, %rbp
jne 0x1cb30b
movq (%r12), %rax
cmpq $0x40, %rax
jb 0x1cb30b
leaq 0x1(%r14), %rcx
decq %rax
shrq $0x6, %rax
cmpq %r14, %rax
movq %rcx, %r14
ja 0x1cb32b
jmp 0x1cb30b
callq 0x6aa46
callq 0x6aa7f
callq 0x6aab8
callq 0x6aaef