// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/seed-extend.c
// Function: gt_combine_extensions
static bool gt_combine_extensions(
         bool forxdrop,
         GtProcessinfo_and_querymatchspaceptr *info_querymatch,
         const GtSeqorEncseq *dbes,
         const GtSeqorEncseq *queryes,
         const GtSeedextendSeqpair *sesp,
         GtUword u_left_ext,
         GtUword v_left_ext,
         GtUword u_right_ext,
         GtUword v_right_ext,
         GtXdropscore total_score,
         GtUword total_distance,
         GtUword total_mismatches)
{
  GtUword dblen, querylen, total_alignedlen;

  dblen = sesp->seedlength + u_left_ext + u_right_ext;
  querylen = sesp->seedlength + v_left_ext + v_right_ext;
  total_alignedlen = dblen + querylen;
  if (forxdrop)
  {
    total_distance = gt_querymatch_score2distance(total_score,total_alignedlen);
  } else
  {
    total_score = gt_querymatch_distance2score(total_distance,total_alignedlen);
  }
  gt_assert(sesp->dbstart_relative >= u_left_ext &&
            sesp->querystart_relative >= v_left_ext);

#ifdef SKDEBUG
  printf("total_distance=" GT_WU ", total_score=" GT_WD ",total_alignedlen="
         GT_WU ", err=%.2f\n",total_distance,total_score,total_alignedlen,
          gt_querymatch_error_rate(total_distance,total_alignedlen));
#endif
  info_querymatch->previous_match_a_start
    = sesp->dbstart_relative - u_left_ext;
  info_querymatch->previous_match_a_end
    = info_querymatch->previous_match_a_start + dblen - 1;
  info_querymatch->previous_match_b_start
    = sesp->querystart_relative - v_left_ext;
  info_querymatch->previous_match_b_end
    = info_querymatch->previous_match_b_start + querylen - 1;
  info_querymatch->previous_match_distance = total_distance;
  info_querymatch->previous_match_mismatches = total_mismatches;
  if (info_querymatch->querymatchspaceptr == NULL ||
      gt_querymatch_complete(info_querymatch->querymatchspaceptr,
                             info_querymatch->out_display_flag,
                             dblen,
                             sesp->dbseqnum,
                             info_querymatch->previous_match_a_start,
                             sesp->db_seqstart,
                             sesp->dbseqlength,
                             (GtWord) total_score,
                             total_distance,
                             total_mismatches,
                             sesp->same_encseq,
                             sesp->queryseqnum,
                             querylen,
                             info_querymatch->previous_match_b_start,
                             dbes,
                             queryes,
                             sesp->query_seqstart,
                             sesp->query_seqlen,
                             gt_sesp_db_seedpos(sesp),
                             gt_sesp_query_seedpos(sesp),
                             sesp->seedlength,
                             false)) /* greedyextension */
                             /*forxdrop ? false : true*/
  {
    return true;
  }
  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movb %dil, %al
movq 0x1a8(%rsp), %rdi
movq 0x1a0(%rsp), %rdi
movq 0x198(%rsp), %rdi
movq 0x190(%rsp), %rdi
movq 0x188(%rsp), %rdi
movq 0x180(%rsp), %rdi
andb $0x1, %al
movb %al, 0x146(%rsp)
movq %rsi, 0x138(%rsp)
movq %rdx, 0x130(%rsp)
movq %rcx, 0x128(%rsp)
movq %r8, 0x120(%rsp)
movq %r9, 0x118(%rsp)
movq 0x120(%rsp), %rax
movq 0x40(%rax), %rax
addq 0x118(%rsp), %rax
addq 0x188(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x120(%rsp), %rax
movq 0x40(%rax), %rax
addq 0x180(%rsp), %rax
addq 0x190(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x110(%rsp), %rax
addq 0x108(%rsp), %rax
movq %rax, 0x100(%rsp)
testb $0x1, 0x146(%rsp)
je 0x2aeb3e
movq 0x198(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0x2aeef0
movq %rax, 0x1a0(%rsp)
jmp 0x2aeb5b
movq 0x1a0(%rsp), %rdi
movq 0x100(%rsp), %rsi
callq 0x267810
movq %rax, 0x198(%rsp)
jmp 0x2aeb5d
movq 0x120(%rsp), %rax
movq 0x18(%rax), %rax
cmpq 0x118(%rsp), %rax
jb 0x2aeb89
movq 0x120(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0x180(%rsp), %rax
jae 0x2aebc1
movq 0x38d410(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x267479(%rip), %rsi    # 0x516013
leaq 0x2d9183(%rip), %rdx    # 0x587d24
leaq 0x2d91cc(%rip), %rcx    # 0x587d74
leaq 0x2d8b25(%rip), %r8     # 0x5876d4
movl $0xed, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2aebc3
movq 0x120(%rsp), %rax
movq 0x18(%rax), %rcx
subq 0x118(%rsp), %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x138(%rsp), %rax
movq 0x20(%rax), %rcx
addq 0x110(%rsp), %rcx
subq $0x1, %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x120(%rsp), %rax
movq 0x38(%rax), %rcx
subq 0x180(%rsp), %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x138(%rsp), %rax
movq 0x30(%rax), %rcx
addq 0x108(%rsp), %rcx
subq $0x1, %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x1a0(%rsp), %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x1a8(%rsp), %rcx
movq 0x138(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x138(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2aeeb8
movq 0x138(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x138(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x120(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x138(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x120(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x120(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0x198(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x1a0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0x120(%rsp), %rax
movb 0x4c(%rax), %al
movb %al, 0xc7(%rsp)
movq 0x120(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xf0(%rsp)
movq 0x108(%rsp), %rbp
movq 0x138(%rsp), %rax
movq 0x30(%rax), %r13
movq 0x130(%rsp), %r12
movq 0x128(%rsp), %r15
movq 0x120(%rsp), %rax
movq 0x30(%rax), %r14
movq 0x120(%rsp), %rax
movq 0x28(%rax), %rbx
movq 0x120(%rsp), %rdi
callq 0x2ab430
movq %rax, 0xb8(%rsp)
movq 0x120(%rsp), %rdi
callq 0x2ab480
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
movq 0xa0(%rsp), %rcx
movq 0xa8(%rsp), %r8
movq 0xb0(%rsp), %r9
movq 0xb8(%rsp), %r11
movq %rax, %r10
movq 0x120(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0xf8(%rsp)
xorl %eax, %eax
movb 0xc7(%rsp), %al
andb $0x1, %al
movb %al, 0xef(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, (%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
movb 0xef(%rsp), %al
movzbl %al, %eax
movl %eax, 0x20(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xf8(%rsp), %rax
movq %rbp, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movq %r12, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq %r11, 0x60(%rsp)
movq %r10, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movl $0x0, 0x78(%rsp)
callq 0x269e50
testb $0x1, %al
jne 0x2aeeb8
jmp 0x2aeec2
movb $0x1, 0x147(%rsp)
jmp 0x2aeeca
movb $0x0, 0x147(%rsp)
movb 0x147(%rsp), %al
andb $0x1, %al
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)