// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/sspliced_alignment_parsing.c
// Function: gt_sspliced_alignment_parse
int gt_sspliced_alignment_parse(GtArray *spliced_alignments,
                                const char *filename,
                                GtError *err)
{
  FILE *input_file;
  GtSSplicedAlignment *sa;
  int had_err = 0;
  GtStr *line;
  gt_error_check(err);

  line = gt_str_new();
  input_file = gt_fa_xfopen(filename, "r");

  while (!had_err && gt_str_read_next_line(line, input_file) != EOF) {
    /* parse input line and save result in spliced alignment */
    had_err = parse_input_line(&sa, gt_str_get(line), gt_str_length(line), err);
    if (!had_err) {
      /* store spliced alignment */
      gt_array_add(spliced_alignments, sa);
      /* reset array */
      gt_str_reset(line);
    }
  }

  gt_fa_xfclose(input_file);
  gt_str_delete(line);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, 0x20(%rsp)
testq %rdx, %rdx
je 0x18290e
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x182ba4
callq 0x1208f8
movq %rax, %rbx
leaq 0x1e15ac(%rip), %rsi    # 0x363ec9
leaq 0x21b410(%rip), %rdx    # 0x39dd34
movq %r14, %rdi
movl $0x80, %ecx
callq 0x101dbd
movq %rbx, %rdi
movq %rax, 0x10(%rsp)
movq %rax, %rsi
callq 0x120e88
cmpl $-0x1, %eax
je 0x182b78
movq %r15, (%rsp)
movq %rbx, 0x18(%rsp)
movq %rbx, %rdi
callq 0x120d23
movq %rax, %rbp
movq %rbx, %rdi
callq 0x120d4c
movq %rax, %r14
testq %r15, %r15
je 0x18297e
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0x182b9f
callq 0x1208f8
movq $0x0, 0x8(%rsp)
testq %r14, %r14
je 0x182a40
movq %rax, %r13
movq %r14, %rbx
negq %rbx
movl $0x1, %r15d
movb -0x1(%rbp,%r15), %al
cmpb $0x2c, %al
je 0x1829ca
movsbl %al, %esi
movq %r13, %rdi
callq 0x120ba5
leaq (%rbx,%r15), %rax
incq %rax
incq %r15
cmpq $0x1, %rax
jne 0x1829a4
jmp 0x182a40
cmpq %r14, %r15
jae 0x182a40
movzbl (%rbp,%r15), %eax
cmpl $0x2d, %eax
je 0x1829f1
cmpl $0x2b, %eax
jne 0x182a0c
movq %r13, %rdi
callq 0x120d23
movq %rax, %rdi
movl $0x1, %esi
jmp 0x1829fe
movq %r13, %rdi
callq 0x120d23
movq %rax, %rdi
xorl %esi, %esi
callq 0x182728
movq %rax, 0x8(%rsp)
movb $0x1, %dl
jmp 0x182a2d
movq (%rsp), %rdi
leaq 0x21b376(%rip), %rsi    # 0x39dd8d
movl $0x2b, %edx
movl $0x2d, %ecx
movq %rbp, %r8
xorl %eax, %eax
callq 0x1019cf
xorl %edx, %edx
leaq 0x1(%r15), %rbx
cmpq %r14, %rbx
setb %al
movl %edx, %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x182aa3
movq (%rsp), %r15
movq %r15, %rdi
leaq 0x21b321(%rip), %rsi    # 0x39dd6f
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testl %r12d, %r12d
movq 0x18(%rsp), %rbx
jne 0x182b7b
movl $0x8, %edx
movq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xd49ce
movq %rbx, %rdi
callq 0x120db4
movq %rbx, %rdi
movq 0x10(%rsp), %rsi
callq 0x120e88
cmpl $-0x1, %eax
jne 0x182953
jmp 0x182b7b
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
testb %dl, %dl
je 0x182ad8
xorl %r12d, %r12d
cmpb $0x2c, 0x1(%rbp,%r15)
movq (%rsp), %r15
je 0x182adc
movq %r15, %rdi
leaq 0x21b2a9(%rip), %rsi    # 0x39dd6f
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x182adc
movq (%rsp), %r15
testl %r12d, %r12d
jne 0x182b50
cmpb $0x2c, (%rbp,%rbx)
jne 0x182b48
incq %rbx
cmpq %r14, %rbx
jae 0x182a44
leaq (%rbx,%rbp), %rdi
leaq 0x21b2cf(%rip), %rsi    # 0x39ddce
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
xorl %eax, %eax
callq 0x177f0
cmpl $0x2, %eax
jne 0x182b2e
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x8(%rsp), %rdi
callq 0x1827ce
xorl %r12d, %r12d
jmp 0x182b48
movq %r15, %rdi
leaq 0x21b237(%rip), %rsi    # 0x39dd6f
movq %rbp, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
incq %rbx
cmpq %r14, %rbx
jb 0x182adc
movq 0x8(%rsp), %rdi
testl %r12d, %r12d
je 0x182b61
callq 0x18277b
jmp 0x182b6b
callq 0x1827fe
testq %rax, %rax
je 0x182ba9
movq %r13, %rdi
callq 0x121b03
jmp 0x182a5e
xorl %r12d, %r12d
movq 0x10(%rsp), %rdi
callq 0x101f02
movq %rbx, %rdi
callq 0x121b03
movl %r12d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x57290
callq 0x57259
callq 0x572c7
nop