// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdx, 0x8(%rsp)
movq %rsi, %r13
movq %rdi, %r12
leaq 0x1d8e4f(%rip), %rsi    # 0x3a571d
leaq 0x1e1fc4(%rip), %rdx    # 0x3ae899
movl $0x102, %ecx            # imm = 0x102
callq 0xfcdbb
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x1ccb6f
movq %rax, %rbp
movq %rbx, (%rsp)
movq %rax, %rdi
callq 0xfed85
testq %rax, %rax
je 0x1ccb6f
movq %rax, %rbx
movq %rax, %rdi
callq 0xfedd0
cmpl $0x3, %eax
je 0x1cca36
cmpl $0x2, %eax
je 0x1cc947
cmpl $-0x1, %eax
jne 0x1ccb2f
leaq 0x1e2020(%rip), %rsi    # 0x3ae94f
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1ccb67
leaq 0x1e2013(%rip), %rdi    # 0x3ae961
xorl %r15d, %r15d
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1ccb67
xorl %r15d, %r15d
movl $0x4, %esi
movl $0x3, %edx
leaq 0x10(%rsp), %rdi
movq %rbp, %rcx
callq 0x17b40
cmpq $0x3, %rax
je 0x1cc9ef
movq %rax, %r12
testq %rax, %rax
jne 0x1cc9a3
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1ccb67
leaq 0x1e20c8(%rip), %rdi    # 0x3aea72
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbp, %rdi
callq 0x17be0
leaq 0x1e20d5(%rip), %rdx    # 0x3aea98
testl %eax, %eax
jne 0x1cc9d6
callq 0x17060
movl (%rax), %edi
callq 0x17240
movq %rax, %rdx
movq %r14, %rdi
leaq 0x1e209e(%rip), %rsi    # 0x3aea7e
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1cca21
testl %r15d, %r15d
jne 0x1cca21
movl 0x18(%rsp), %ecx
movl %ecx, %edx
shrl $0x2, %edx
cmpq %r13, %rdx
jb 0x1cca21
movl %ecx, %r8d
andl $0x1, %r8d
andl $0x2, %ecx
shrl %ecx
movl 0x10(%rsp), %edi
movl 0x14(%rsp), %esi
movq (%rsp), %r9
callq *0x8(%rsp)
xorl %r15d, %r15d
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
je 0x1cc96e
jmp 0x1ccb67
leaq 0x1e1f49(%rip), %rdi    # 0x3ae986
xorl %r15d, %r15d
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1ccb67
xorl %r15d, %r15d
movl $0x8, %esi
movl $0x3, %edx
leaq 0x10(%rsp), %rdi
movq %rbp, %rcx
callq 0x17b40
cmpq $0x3, %rax
je 0x1ccade
movq %rax, %r12
testq %rax, %rax
jne 0x1cca92
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
jne 0x1ccb67
leaq 0x1e1fd9(%rip), %rdi    # 0x3aea72
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbp, %rdi
callq 0x17be0
leaq 0x1e1fe6(%rip), %rdx    # 0x3aea98
testl %eax, %eax
jne 0x1ccac5
callq 0x17060
movl (%rax), %edi
callq 0x17240
movq %rax, %rdx
movq %r14, %rdi
leaq 0x1e1faf(%rip), %rsi    # 0x3aea7e
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x1ccb1d
movq 0x20(%rsp), %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
testl %r15d, %r15d
setne %al
cmpq %r13, %rdx
setb %sil
orb %al, %sil
jne 0x1ccb1d
movl %ecx, %r8d
andl $0x1, %r8d
andl $0x2, %ecx
shrl %ecx
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq (%rsp), %r9
callq *0x8(%rsp)
xorl %r15d, %r15d
movq %rbp, %rdi
callq 0x17be0
testl %eax, %eax
je 0x1cca5d
jmp 0x1ccb67
movsbl %al, %esi
movq %rbx, %rdi
callq 0xfee24
leaq 0x1e1e6a(%rip), %rdi    # 0x3ae9ab
movq %r12, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbx, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
xorl %ecx, %ecx
movq (%rsp), %r8
movq %r14, %r9
callq 0x1cc80c
movl %eax, %r15d
movq %rbx, %rdi
callq 0xff22c
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq