// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/match_iterator_last.c
// Function: last_parse_match
static int last_parse_match(GtMatchIteratorLast *mil, GtMatch **match,
                            GtError *err)
{
  int had_err = 0;
  GtUword score = GT_UNDEF_UWORD,
                start1 = GT_UNDEF_UWORD,
                start2 = GT_UNDEF_UWORD,
                mlength1 = GT_UNDEF_UWORD,
                mlength2 = GT_UNDEF_UWORD,
                slength1 = GT_UNDEF_UWORD,
                slength2 = GT_UNDEF_UWORD,
                seqno1 = GT_UNDEF_UWORD,
                seqno2 = GT_UNDEF_UWORD;
  char strand1 = GT_UNDEF_CHAR,
       strand2 = GT_UNDEF_CHAR,
       seqid1[BUFSIZ],
       seqid2[BUFSIZ];

  gt_assert(mil && mil->pvt->matchfile);
  gt_error_check(err);

  gt_str_reset(mil->pvt->linebuf);
  had_err = gt_str_read_next_line_generic(mil->pvt->linebuf,
                                          mil->pvt->matchfile);
  if (!had_err) {
    if (11 != sscanf(gt_str_get(mil->pvt->linebuf),
                     GT_WU " %s " GT_WU " " GT_WU " %c " GT_WU " %s " GT_WU
                     " " GT_WU " %c " GT_WU,
                     &score, seqid1, &start1, &mlength1, &strand1, &slength1,
                     seqid2, &start2, &mlength2, &strand2, &slength2)) {
      gt_error_set(err, "error parsing LAST output: "
                        "could not parse line '%s'",
                   gt_str_get(mil->pvt->linebuf));
      had_err = -1;
    }
    if (!had_err) {
      seqno1 = (GtUword) gt_hashmap_get(mil->pvt->desc_to_seqno, seqid1);
      gt_assert(seqno1 != GT_UNDEF_UWORD);
      seqno2 = (GtUword) gt_hashmap_get(mil->pvt->desc_to_seqno, seqid2);
      gt_assert(seqno2 != GT_UNDEF_UWORD);
      *match = gt_match_last_new(seqid1, seqid2, score,
                                 seqno1, seqno2,
                                 start1, start2,
                                 start1 + mlength1 - 1, start2 + mlength2 - 1,
                                 strand1 == strand2 ? GT_MATCH_DIRECT :
                                                      GT_MATCH_REVERSE);
    }
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40b0, %rsp           # imm = 0x40B0
movq %rdi, 0x40a8(%rsp)
movq %rsi, 0x40a0(%rsp)
movq %rdx, 0x4098(%rsp)
movl $0x0, 0x4094(%rsp)
movq $-0x1, 0x4088(%rsp)
movq $-0x1, 0x4080(%rsp)
movq $-0x1, 0x4078(%rsp)
movq $-0x1, 0x4070(%rsp)
movq $-0x1, 0x4068(%rsp)
movq $-0x1, 0x4060(%rsp)
movq $-0x1, 0x4058(%rsp)
movq $-0x1, 0x4050(%rsp)
movq $-0x1, 0x4048(%rsp)
movb $0x7f, 0x4047(%rsp)
movb $0x7f, 0x4046(%rsp)
cmpq $0x0, 0x40a8(%rsp)
je 0x1aa54c
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x60(%rax)
jne 0x1aa584
movq 0x491a4d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36bab6(%rip), %rsi    # 0x516013
leaq 0x3af54e(%rip), %rdx    # 0x559ab2
leaq 0x3af57a(%rip), %rcx    # 0x559ae5
leaq 0x3af32c(%rip), %r8     # 0x55989e
movl $0xf2, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aa586
jmp 0x1aa588
cmpq $0x0, 0x4098(%rsp)
je 0x1aa5de
movq 0x4098(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x1aa5a6
jmp 0x1aa5de
movq 0x4919f3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36ba5c(%rip), %rsi    # 0x516013
leaq 0x36bc01(%rip), %rdx    # 0x5161bf
leaq 0x3af520(%rip), %rcx    # 0x559ae5
leaq 0x3af2d2(%rip), %r8     # 0x55989e
movl $0xf3, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aa5e0
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
callq 0x11e110
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x60(%rax), %rsi
callq 0x11e6f0
movl %eax, 0x4094(%rsp)
cmpl $0x0, 0x4094(%rsp)
jne 0x1aa89c
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x2040(%rsp), %rcx
leaq 0x40(%rsp), %r14
leaq 0x3af49b(%rip), %rsi    # 0x559af6
leaq 0x4088(%rsp), %rdx
leaq 0x4080(%rsp), %r8
leaq 0x4070(%rsp), %r9
leaq 0x4047(%rsp), %r12
leaq 0x4060(%rsp), %r15
leaq 0x4078(%rsp), %rbx
leaq 0x4068(%rsp), %r11
leaq 0x4046(%rsp), %r10
leaq 0x4058(%rsp), %rax
movq %r12, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
movb $0x0, %al
callq 0x19770
movl %eax, %ecx
movl $0xb, %eax
cmpl %ecx, %eax
je 0x1aa71a
movq 0x4098(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
callq 0x11dee0
movq 0x38(%rsp), %rdi
movq %rax, %rdx
leaq 0x3af416(%rip), %rsi    # 0x559b1e
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x4094(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x4094(%rsp)
jne 0x1aa89a
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rax), %rdi
leaq 0x2040(%rsp), %rsi
callq 0xe0f20
movq %rax, 0x4050(%rsp)
cmpq $-0x1, 0x4050(%rsp)
jne 0x1aa790
movq 0x491841(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36b8aa(%rip), %rsi    # 0x516013
leaq 0x3af3e3(%rip), %rdx    # 0x559b53
leaq 0x3af36e(%rip), %rcx    # 0x559ae5
leaq 0x3af120(%rip), %r8     # 0x55989e
movl $0x105, %r9d            # imm = 0x105
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aa792
movq 0x40a8(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x68(%rax), %rdi
leaq 0x40(%rsp), %rsi
callq 0xe0f20
movq %rax, 0x4048(%rsp)
cmpq $-0x1, 0x4048(%rsp)
jne 0x1aa7f7
movq 0x4917da(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x36b843(%rip), %rsi    # 0x516013
leaq 0x3af395(%rip), %rdx    # 0x559b6c
leaq 0x3af307(%rip), %rcx    # 0x559ae5
leaq 0x3af0b9(%rip), %r8     # 0x55989e
movl $0x107, %r9d            # imm = 0x107
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1aa7f9
leaq 0x2040(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq 0x4088(%rsp), %rdx
movq 0x4050(%rsp), %rcx
movq 0x4048(%rsp), %r8
movq 0x4080(%rsp), %r9
movq 0x4078(%rsp), %rbx
movq 0x4080(%rsp), %r11
addq 0x4070(%rsp), %r11
subq $0x1, %r11
movq 0x4078(%rsp), %r10
addq 0x4068(%rsp), %r10
subq $0x1, %r10
movsbl 0x4047(%rsp), %r14d
movsbl 0x4046(%rsp), %r15d
movl $0x1, %eax
xorl %ebp, %ebp
cmpl %r15d, %r14d
cmovel %ebp, %eax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0x1ab950
movq %rax, %rcx
movq 0x40a0(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1aa89c
movl 0x4094(%rsp), %eax
addq $0x40b0, %rsp           # imm = 0x40B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)