// File: /workspace/github_c_makefile_star2_O3/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 0x15eccc
movq %rsi, %r13
testq %rsi, %rsi
je 0x15eccc
movq %rdi, %rbp
movl %edx, %r14d
movl %ecx, %r12d
movl %r8d, %r15d
movl %r9d, 0x4(%rsp)
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x15e938
callq 0xfcc32
testb %al, %al
jne 0x15ecd1
callq 0x15ecdb
movq %rax, %rdi
callq 0x15ddfd
movq %rax, %rbx
leaq 0x2287da(%rip), %rdx    # 0x387129
movl $0x1, %edi
movl $0x70, %esi
movl $0x1db, %ecx            # imm = 0x1DB
callq 0x10436a
movq %rax, 0x8(%rbx)
movq %rbp, %rdi
callq 0xea9be
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movq %r13, %rdi
callq 0xea9be
movq 0x8(%rbx), %r13
movq %rax, 0x8(%r13)
movl %r14d, 0x10(%r13)
movl %r12d, 0x14(%r13)
movl %r15d, 0x18(%r13)
movl 0x4(%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 0x277236(%rip), %rdi    # 0x3d5c07
callq 0x17950
testq %rax, %rax
leaq 0x20b63a(%rip), %rcx    # 0x36a01a
cmovneq %rax, %rcx
movq %rcx, 0x38(%r13)
callq 0x11ac6c
movq 0x8(%rbx), %rcx
movq %rax, 0x58(%rcx)
leaq -0x5a352(%rip), %rsi    # 0x1046aa
movl $0x1, %edi
xorl %edx, %edx
callq 0x1008fc
movq 0x8(%rbx), %rcx
movq %rax, 0x68(%rcx)
callq 0x11ac6c
movq %rax, %r12
callq 0x11ac6c
movq %rax, %r15
movq 0x70(%rsp), %r14
testq %r14, %r14
je 0x15ea45
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x15ecd6
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
jmp 0x15ea4d
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x15f5df
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xe7b9c
leaq 0x1(%rax), %rdi
leaq 0x2286c0(%rip), %r14    # 0x387129
movq %r14, %rsi
movl $0x191, %edx            # imm = 0x191
callq 0x104226
movq %rax, %rbp
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xe7b9c
movb $0x0, (%rbp,%rax)
movq 0x8(%rbx), %rax
movq (%rax), %r13
movq %r13, %rdi
callq 0xe7b9c
leaq -0x1(%rax), %rcx
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xe92be
movq 0x8(%rbx), %rax
movq (%rax), %rdi
callq 0xe7b9c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x1068d0
movq %rax, %r13
movq %rbp, %rdi
movq %r14, %rsi
movl $0x197, %edx            # imm = 0x197
callq 0x1045eb
movq 0x8(%rbx), %rax
movq 0x38(%rax), %rsi
movq %r15, %rdi
callq 0x11acf3
leaq 0x2006b7(%rip), %rsi    # 0x35f1a2
movq %r15, %rdi
callq 0x11acf3
movq %r15, %rdi
movq %r13, %rsi
callq 0x11acf3
movq %r15, %rdi
callq 0x11b1f3
movq 0x8(%rbx), %rcx
movq %rax, 0x40(%rcx)
movq %rax, %rdi
callq 0x11b191
movq %rax, %rbp
leaq 0x228657(%rip), %rsi    # 0x387177
movq %rax, %rdi
callq 0x11acf3
movq %rbp, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xff28c
testb %al, %al
je 0x15eb7c
movq %rbp, %rdi
callq 0x11bdbf
leaq 0x2285de(%rip), %rsi    # 0x387129
movq %r13, %rdi
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x1045eb
movq %r12, %rdi
callq 0x11bdbf
movq %r15, %rdi
callq 0x11bdbf
movq 0x8(%rbx), %rax
cmpq $0x0, 0x40(%rax)
jne 0x15ecad
callq 0x4c240
movq 0x8(%rbx), %rax
movq 0x40(%rax), %rdi
callq 0x11b0a1
movq 0x8(%rbx), %rcx
movq (%rcx), %rsi
movq 0x68(%rcx), %rdx
movq %rax, %rdi
movq 0x70(%rsp), %rcx
callq 0x15f644
testl %eax, %eax
je 0x15ebad
xorl %r14d, %r14d
jmp 0x15ec5c
callq 0x11ac6c
movq %rax, %r14
leaq 0x2285c1(%rip), %rdi    # 0x38717d
callq 0x17950
testq %rax, %rax
je 0x15ec14
movq %r14, %rdi
movq %rax, %rsi
callq 0x11acf3
leaq 0x2285b2(%rip), %rsi    # 0x38718a
movq %r14, %rdi
callq 0x11acf3
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xff28c
testb %al, %al
jne 0x15ec23
movq %r14, %rdi
callq 0x11b0a1
leaq 0x228590(%rip), %rsi    # 0x387193
movq 0x70(%rsp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xfcb67
jmp 0x15ec5c
leaq 0x228570(%rip), %rsi    # 0x38718b
movq %r14, %rdi
callq 0x11acf3
movq %r14, %rdi
movq %r15, %rsi
callq 0x11adc1
leaq 0x2634eb(%rip), %rsi    # 0x3c2120
movq %r14, %rdi
callq 0x11acf3
movq %r14, %rdi
movq %r15, %rsi
callq 0x11adc1
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0x176a0
testl %eax, %eax
je 0x15ecbf
leaq 0x228554(%rip), %rsi    # 0x3871b7
movq 0x70(%rsp), %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r14, %rdi
callq 0x11bdbf
movq %rbp, %rdi
callq 0x11bdbf
leaq 0x2284a3(%rip), %rsi    # 0x387129
movq %r13, %rdi
movl $0x1bf, %edx            # imm = 0x1BF
callq 0x1045eb
movq %r12, %rdi
callq 0x11bdbf
movq %r15, %rdi
callq 0x11bdbf
movq %rbx, %rdi
callq 0x15de66
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x11bdbf
jmp 0x15eb3c
callq 0x4c195
callq 0x4c1ce
callq 0x4c207