// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_show_seedext.c
// Function: gt_querymatch_optimal_alignment
void gt_querymatch_optimal_alignment(const GtQuerymatch *querymatchptr,
                                     const GtSequencepairbuffer *seqpairbuf,
                                     GtLinspaceManagement
                                       *linspace_spacemanager,
                                     GtScoreHandler *linspace_scorehandler,
                                     GtAlignment *alignment,
                                     GtUchar *alignment_show_buffer,
                                     const GtSeedExtendDisplayFlag
                                       *out_display_flag,
                                     const GtUchar *characters,
                                     GtUchar wildcardshow)
{
  GtUword edist;
  const GtUword distance = gt_querymatch_distance(querymatchptr),
                alignmentwidth = gt_querymatch_display_alignmentwidth(
                                        out_display_flag);

  edist = gt_linearalign_compute_generic(linspace_spacemanager,
                                         linspace_scorehandler,
                                         alignment,
                                         seqpairbuf->a_sequence,
                                         0,
                                         seqpairbuf->a_len,
                                         seqpairbuf->b_sequence,
                                         0,
                                         seqpairbuf->b_len);
  if (edist < distance)
  {
    printf("# edist=" GT_WU " (smaller by " GT_WU ")\n",
           edist,distance - edist);
  }
  gt_assert(edist <= distance);
  if (alignmentwidth > 0)
  {
    const bool downcase = false;

    gt_alignment_show_generic(alignment_show_buffer,
                              downcase,
                              alignment,
                              stdout,
                              alignmentwidth,
                              characters,
                              wildcardshow);
    gt_alignment_reset(alignment);
  }
}

// Assembly:
subq $0x68, %rsp
movb 0x80(%rsp), %al
movq 0x78(%rsp), %rax
movq 0x70(%rsp), %rax
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movq 0x60(%rsp), %rdi
callq 0x267800
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rdi
callq 0x265c70
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x58(%rsp), %rax
movq (%rax), %rcx
movq 0x58(%rsp), %rax
movq 0x20(%rax), %r9
movq 0x58(%rsp), %rax
movq 0x8(%rax), %r10
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rax
xorl %r8d, %r8d
movq %r10, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x19c9f0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jae 0x6d5fb
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
subq 0x30(%rsp), %rdx
leaq 0x4bdfb1(%rip), %rdi    # 0x52b5a5
movb $0x0, %al
callq 0x19070
jmp 0x6d5fd
movq 0x30(%rsp), %rax
cmpq 0x28(%rsp), %rax
jbe 0x6d641
movq 0x5ce990(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4a89f9(%rip), %rsi    # 0x516013
leaq 0x4bdfa2(%rip), %rdx    # 0x52b5c3
leaq 0x4bdfad(%rip), %rcx    # 0x52b5d5
leaq 0x4bdfc6(%rip), %r8     # 0x52b5f5
movl $0xae, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6d643
cmpq $0x0, 0x20(%rsp)
jbe 0x6d68d
movb $0x0, 0x1f(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x5ce8d7(%rip), %rax    # 0x63bf38
movq (%rax), %rcx
movq 0x20(%rsp), %rax
movl %eax, %r8d
movq 0x78(%rsp), %r9
xorl %esi, %esi
movzbl 0x80(%rsp), %eax
movl %eax, (%rsp)
callq 0x12b440
movq 0x40(%rsp), %rdi
callq 0x12a560
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)