// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/rdj-spmlist.c
// Function: gt_spmlist_parse
int gt_spmlist_parse(const char* filename, GtUword min_length,
    GtSpmproc processoverlap, void *data, GtError *err)
{
  int c, retval = 0;
  FILE *file;
  GtFile *infp;

  file = gt_fa_fopen(filename, "rb", err);
  if (file == NULL)
    return -1;
  infp = gt_file_new_from_fileptr(file);
  if (infp == NULL)
    return -1;

  c = gt_file_xfgetc(infp);
  switch (c)
  {
    case EOF:
      gt_error_set(err, "%s: file is empty", filename);
      retval = -1;
      break;
    case GT_SPMLIST_BIN32:
      gt_log_log("Spm file %s format: readjoiner-bin32", filename);
      retval = gt_spmlist_parse_bin32(file, min_length, processoverlap, data,
          err);
      break;
    case GT_SPMLIST_BIN64:
      gt_log_log("Spm file %s format: readjoiner-bin64", filename);
      retval = gt_spmlist_parse_bin64(file, min_length, processoverlap, data,
          err);
      break;
    default:
      gt_file_unget_char(infp, c);
      gt_log_log("Spm file %s format: readjoiner-text", filename);
      retval = gt_spmlist_parse_ascii(infp, min_length, processoverlap, data,
          err);
  }
  gt_file_delete(infp);
  return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r14
movq %rcx, 0x8(%rsp)
movq %rdx, (%rsp)
movq %rsi, %r13
movq %rdi, %r12
leaq 0x1d9158(%rip), %rsi    # 0x3aecbf
leaq 0x1e232b(%rip), %rdx    # 0x3b7e99
movl $0x102, %ecx            # imm = 0x102
callq 0x101c23
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1d5e06
movq %rax, %rbp
movq %rax, %rdi
callq 0x103c55
testq %rax, %rax
je 0x1d5e06
movq %rax, %rbx
movq %rax, %rdi
callq 0x103ca0
cmpl $0x3, %eax
je 0x1d5ccc
cmpl $0x2, %eax
je 0x1d5bdc
cmpl $-0x1, %eax
jne 0x1d5dc6
leaq 0x1e238b(%rip), %rsi    # 0x3b7f4f
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1d5dfe
leaq 0x1e237e(%rip), %rdi    # 0x3b7f61
xorl %r15d, %r15d
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1d5dfe
xorl %r15d, %r15d
movl $0x4, %esi
movl $0x3, %edx
leaq 0x10(%rsp), %rdi
movq %rbp, %rcx
callq 0x17b40
cmpq $0x3, %rax
je 0x1d5c88
movq %rax, %r12
testq %rax, %rax
jne 0x1d5c3e
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1d5dfe
cmpq $0x3, %r12
je 0x1d5c88
leaq 0x1e242d(%rip), %rdi    # 0x3b8072
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbp, %rdi
callq 0x17be0
leaq 0x1e243a(%rip), %rdx    # 0x3b8098
testl %eax, %eax
jne 0x1d5c71
callq 0x17060
movl (%rax), %edi
callq 0x17240
movq %rax, %rdx
movq %r14, %rdi
leaq 0x1e2403(%rip), %rsi    # 0x3b807e
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %r15d, %r15d
jne 0x1d5cb7
movl 0x18(%rsp), %ecx
movl %ecx, %edx
shrl $0x2, %edx
cmpq %r13, %rdx
jb 0x1d5cb7
movl %ecx, %r8d
andl $0x1, %r8d
andl $0x2, %ecx
shrl %ecx
movl 0x10(%rsp), %edi
movl 0x14(%rsp), %esi
movq 0x8(%rsp), %r9
callq *(%rsp)
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
je 0x1d5c03
jmp 0x1d5dfe
leaq 0x1e22b3(%rip), %rdi    # 0x3b7f86
xorl %r15d, %r15d
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1d5dfe
xorl %r15d, %r15d
movl $0x8, %esi
movl $0x3, %edx
leaq 0x10(%rsp), %rdi
movq %rbp, %rcx
callq 0x17b40
cmpq $0x3, %rax
je 0x1d5d78
movq %rax, %r12
testq %rax, %rax
jne 0x1d5d2e
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1d5dfe
cmpq $0x3, %r12
je 0x1d5d78
leaq 0x1e233d(%rip), %rdi    # 0x3b8072
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbp, %rdi
callq 0x17be0
leaq 0x1e234a(%rip), %rdx    # 0x3b8098
testl %eax, %eax
jne 0x1d5d61
callq 0x17060
movl (%rax), %edi
callq 0x17240
movq %rax, %rdx
movq %r14, %rdi
leaq 0x1e2313(%rip), %rsi    # 0x3b807e
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
testl %r15d, %r15d
setne %al
cmpq %r13, %rdx
setb %sil
orb %al, %sil
jne 0x1d5db4
movl %ecx, %r8d
andl $0x1, %r8d
andl $0x2, %ecx
shrl %ecx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x8(%rsp), %r9
callq *(%rsp)
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
je 0x1d5cf3
jmp 0x1d5dfe
movsbl %al, %esi
movq %rbx, %rdi
callq 0x103cf4
leaq 0x1e21d3(%rip), %rdi    # 0x3b7fab
movq %r12, %rsi
xorl %eax, %eax
callq 0x108e02
movq %rbx, %rdi
movq %r13, %rsi
movq (%rsp), %rdx
xorl %ecx, %ecx
movq 0x8(%rsp), %r8
movq %r14, %r9
callq 0x1d5a94
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1040fc
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq