// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/match_iterator_last.c
// Function: gt_match_iterator_last_new
GtMatchIterator* gt_match_iterator_last_new(GtEncseq *es1, GtEncseq *es2,
                                            int match_score,
                                            int mismatch_cost,
                                            int gap_open_cost,
                                            int gap_ext_cost,
                                            int xdrop,
                                            int ydrop,
                                            int zdrop,
                                            int k,
                                            int mscoregapped,
                                            int mscoregapless,
                                            GtError *err)
{
  GtMatchIterator *mp;
  GtMatchIteratorLast *mil;
  int had_err = 0;
  gt_assert(es1 && es2);
  gt_error_check(err);

  mp = gt_match_iterator_create(gt_match_iterator_last_class());
  mil = (GtMatchIteratorLast*) mp;
  mil->pvt = gt_calloc(1, sizeof (GtMatchIteratorLastMembers));
  mil->pvt->es1 = gt_encseq_ref(es1);
  mil->pvt->es2 = gt_encseq_ref(es2);
  mil->pvt->op.match_score = match_score;
  mil->pvt->op.mismatch_cost = mismatch_cost;
  mil->pvt->op.gap_open_cost = gap_open_cost;
  mil->pvt->op.gap_ext_cost = gap_ext_cost;
  mil->pvt->op.xdrop = xdrop;
  mil->pvt->op.ydrop = ydrop;
  mil->pvt->op.zdrop = zdrop;
  mil->pvt->op.mscoregapped = mscoregapped;
  mil->pvt->op.mscoregapless = mscoregapless;
  mil->pvt->op.k = k;
  mil->pvt->tmpdir = getenv("TMPDIR");
  if (!mil->pvt->tmpdir)
    mil->pvt->tmpdir = "/tmp";
  mil->pvt->linebuf = gt_str_new();
  mil->pvt->desc_to_seqno = gt_hashmap_new(GT_HASH_STRING, gt_free_func, NULL);

  had_err = last_prepare_indices(mil, err);
  if (had_err) {
    gt_match_iterator_delete(mp);
    return NULL;
  }
  gt_assert(mil->pvt->idxfilename);
  return mp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x166a7f
movq %rsi, %r13
testq %rsi, %rsi
je 0x166a7f
movq %rdi, %rbp
movl %edx, %r14d
movl %ecx, %r12d
movl %r8d, %r15d
movl %r9d, (%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x166683
callq 0x101a9a
testb %al, %al
jne 0x166a89
callq 0x166a98
movq %rax, %rdi
callq 0x165b25
movq %rax, %rbx
leaq 0x229e64(%rip), %rdx    # 0x3904fe
movl $0x1, %edi
movl $0x70, %esi
movl $0x1db, %ecx            # imm = 0x1DB
callq 0x1093ef
movq %rax, 0x8(%rbx)
movq %rbp, %rdi
callq 0xeef4f
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r13, %rdi
callq 0xeef4f
movq 0x8(%rbx), %r13
movq %rax, 0x8(%r13)
movl %r14d, 0x10(%r13)
movl %r12d, 0x14(%r13)
movl %r15d, 0x18(%r13)
movl (%rsp), %eax
movl %eax, 0x1c(%r13)
movl 0x40(%rsp), %eax
movl %eax, 0x20(%r13)
movl 0x48(%rsp), %eax
movl %eax, 0x24(%r13)
movl 0x50(%rsp), %eax
movl %eax, 0x28(%r13)
movl 0x60(%rsp), %eax
movl %eax, 0x2c(%r13)
movl 0x68(%rsp), %eax
movl %eax, 0x30(%r13)
movl 0x58(%rsp), %eax
movl %eax, 0x34(%r13)
leaq 0x278c40(%rip), %rdi    # 0x3df35b
callq 0x17950
testq %rax, %rax
leaq 0x20cb48(%rip), %rcx    # 0x373272
cmovneq %rax, %rcx
movq %rcx, 0x38(%r13)
callq 0x1208f8
movq 0x8(%rbx), %rcx
movq %rax, 0x58(%rcx)
leaq -0x5d017(%rip), %rsi    # 0x10972f
movl $0x1, %edi
xorl %edx, %edx
callq 0x105830
movq 0x8(%rbx), %rcx
movq %rax, 0x68(%rcx)
callq 0x1208f8
movq %rax, %r12
callq 0x1208f8
testq %rbx, %rbx
je 0x166a84
movq %rax, %r15
movq 0x70(%rsp), %r14
testq %r14, %r14
je 0x16679d
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x166a8e
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x166a93
movq %r12, %rdi
callq 0x120db4
movq 0x8(%rbx), %rax
movq 0x38(%rax), %rsi
movq %r12, %rdi
callq 0x12097f
leaq 0x1fd7ef(%rip), %rsi    # 0x363fab
movq %r12, %rdi
callq 0x12097f
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xed3c3
movq %r12, %rdi
movq %rax, %rsi
callq 0x12097f
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xec1d8
leaq 0x1(%rax), %rdi
leaq 0x229d0c(%rip), %rbp    # 0x3904fe
movq %rbp, %rsi
movl $0x191, %edx            # imm = 0x191
callq 0x1092b2
movq %rax, %r13
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xec1d8
movb $0x0, (%r13,%rax)
movq 0x8(%rbx), %rax
movq (%rax), %r14
movq %r14, %rdi
callq 0xec1d8
leaq -0x1(%rax), %rcx
movq %r14, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xed87b
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xec1d8
movq %r13, %rdi
movq %rax, %rsi
callq 0x10b95c
movq %rax, %r14
movq %r13, %rdi
movq %rbp, %rsi
movl $0x197, %edx            # imm = 0x197
callq 0x109670
movq 0x8(%rbx), %rax
movq 0x38(%rax), %rsi
movq %r15, %rdi
callq 0x12097f
movq %r15, %rdi
leaq 0x1fd733(%rip), %rsi    # 0x363fab
callq 0x12097f
movq %r15, %rdi
movq %r14, %rsi
callq 0x12097f
movq %r15, %rdi
callq 0x120e79
movq 0x8(%rbx), %rcx
movq %rax, 0x40(%rcx)
movq %rax, %rdi
callq 0x120e13
movq %rax, %rbp
leaq 0x229ca6(%rip), %rsi    # 0x390550
movq %rax, %rdi
callq 0x12097f
movq %rbp, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x10415c
testb %al, %al
je 0x166906
movq %rbp, %rdi
callq 0x121b03
leaq 0x229c29(%rip), %rsi    # 0x3904fe
movq %r14, %rdi
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x109670
movq %r12, %rdi
callq 0x121b03
movq %r15, %rdi
callq 0x121b03
movq 0x8(%rbx), %rax
cmpq $0x0, 0x40(%rax)
jne 0x1669d1
callq 0x4d08a
movq %r14, (%rsp)
movq 0x8(%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x120d23
movq 0x8(%rbx), %rcx
movq (%rcx), %rsi
movq 0x68(%rcx), %rdx
movq %rax, %rdi
movq 0x70(%rsp), %rcx
callq 0x1673bf
testl %eax, %eax
je 0x1669e3
xorl %r14d, %r14d
xorl %r13d, %r13d
testb %r13b, %r13b
je 0x16697f
movq %r14, %rdi
movq %r15, %rsi
callq 0x120a43
leaq 0x264ef4(%rip), %rsi    # 0x3cb848
movq %r14, %rdi
callq 0x12097f
movq %r14, %rdi
movq %r15, %rsi
callq 0x120a43
movq %r14, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x176a0
testl %eax, %eax
je 0x166a57
leaq 0x229c0a(%rip), %rsi    # 0x390590
movq 0x70(%rsp), %rdi
xorl %eax, %eax
callq 0x1019cf
movq %r14, %rdi
callq 0x121b03
movq %rbp, %rdi
callq 0x121b03
leaq 0x229b55(%rip), %rsi    # 0x3904fe
movq (%rsp), %rdi
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x109670
movq %r12, %rdi
callq 0x121b03
movq %r15, %rdi
callq 0x121b03
movq %rbx, %rdi
callq 0x165b8e
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1208f8
movq %rax, %r14
leaq 0x229b64(%rip), %rdi    # 0x390556
callq 0x17950
testq %rax, %rax
je 0x166a68
movq %r14, %rdi
movq %rax, %rsi
callq 0x12097f
leaq 0x229b55(%rip), %rsi    # 0x390563
movq %r14, %rdi
callq 0x12097f
movq %r14, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x10415c
movb $0x1, %r13b
testb %al, %al
jne 0x16693d
movq %r14, %rdi
callq 0x120d23
leaq 0x229b2c(%rip), %rsi    # 0x39056c
xorl %r13d, %r13d
movq 0x70(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
jmp 0x16693d
movq %r14, %rdi
callq 0x121b03
movq (%rsp), %r14
jmp 0x1668c6
leaq 0x229af5(%rip), %rsi    # 0x390564
movq %r14, %rdi
callq 0x12097f
movb $0x1, %r13b
jmp 0x16693d
callq 0x4cfa8
callq 0x4d0c3
callq 0x4cfe1
callq 0x4d051
callq 0x4d01a