// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/querymatch.c
// Function: gt_querymatch_alignment_prepare
static void gt_querymatch_alignment_prepare(GtQuerymatch *querymatch,
                                            const GtSeqorEncseq *dbes,
                                            const GtSeqorEncseq *queryes,
                                            bool greedyextension)
{
  bool seeded_alignment;
  GtUword abs_querystart_fwdstrand;

  gt_assert(querymatch != NULL);
  if (querymatch->ref_querymatchoutoptions == NULL)
  {
    return;
  }
  gt_assert(queryes != NULL);
  if (querymatch->distance > 0)
  {
    gt_querymatchoutoptions_seededmatch2eoplist(
                        querymatch->ref_querymatchoutoptions,
                        dbes,
                        gt_querymatch_dbstart_relative(querymatch),
                        querymatch->db_seqstart,
                        gt_querymatch_dblen(querymatch),
                        querymatch->query_readmode,
                        queryes,
                        querymatch->query_seqstart,
                        querymatch->query_seqlen,
                        querymatch->querystart,
                        querymatch->querylen,
                        querymatch->db_seedpos_rel,
                        querymatch->query_seedpos_rel,
                        querymatch->seedlen,
                        querymatch->verify_alignment,
                        greedyextension);
    seeded_alignment = true;
  } else
  {
    seeded_alignment = false;
  }
  abs_querystart_fwdstrand = querymatch->query_seqstart +
                             querymatch->querystart_fwdstrand;
  gt_querymatchoutoptions_extract_seq(querymatch->ref_querymatchoutoptions,
                                      dbes,
                                      querymatch->dbstart_relative,
                                      gt_querymatch_dbstart(querymatch),
                                      gt_querymatch_dblen(querymatch),
                                      querymatch->query_readmode,
                                      queryes,
                                      querymatch->querystart,
                                      abs_querystart_fwdstrand,
                                      querymatch->querylen,
                                      seeded_alignment);
  if (seeded_alignment && !greedyextension)
  {
    gt_querymatch_applycorrection(querymatch);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0x16baae
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
testq %rdi, %rdi
je 0x16baa5
movq %rdx, %r14
testq %rdx, %rdx
je 0x16badc
movl %ecx, %ebp
movq %rsi, %r15
movq 0x70(%rbx), %r12
testq %r12, %r12
je 0x16b9cc
movq 0x20(%rbx), %rcx
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %r8
movl 0x88(%rbx), %r9d
movzbl 0x8d(%rbx), %eax
movzbl %bpl, %r10d
movq %r15, %rsi
pushq %r10
pushq %rax
pushq 0x68(%rbx)
pushq 0x60(%rbx)
pushq 0x58(%rbx)
pushq 0x40(%rbx)
pushq 0x30(%rbx)
pushq 0x48(%rbx)
pushq 0x50(%rbx)
pushq %r14
callq 0x1683ea
addq $0x50, %rsp
movq 0x90(%rbx), %rdi
xorl %eax, %eax
testq %r12, %r12
sete %r12b
setne %al
movq 0x38(%rbx), %r10
addq 0x50(%rbx), %r10
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %r8
movq 0x20(%rbx), %rcx
addq %rdx, %rcx
movl 0x88(%rbx), %r9d
subq $0x8, %rsp
movq %r15, %rsi
pushq %rax
pushq 0x40(%rbx)
pushq %r10
pushq 0x30(%rbx)
pushq %r14
callq 0x168b06
addq $0x30, %rsp
orb %bpl, %r12b
jne 0x16baa5
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x16bb0a
cmpq $0x0, 0x70(%rbx)
je 0x16bb0a
callq 0x169037
movq 0x10(%rax), %rsi
movq (%rax), %rcx
addq 0x8(%rbx), %rcx
movq 0x8(%rax), %r14
movq 0x20(%rbx), %r8
movq (%rbx), %rdx
movq 0x18(%rbx), %r9
movq 0x20(%rax), %r10
movq 0x18(%rax), %r15
leaq (%r15,%rsi), %rdi
imulq $-0x3, %r10, %r11
addq %rdi, %r11
movzbl 0x8c(%rbx), %r12d
addq 0x30(%rbx), %r14
subq $0x8, %rsp
movq %rbx, %rdi
pushq 0xa8(%rbx)
pushq 0xa0(%rbx)
pushq 0x48(%rbx)
pushq 0x50(%rbx)
pushq %r14
pushq %r15
pushq 0x28(%rbx)
pushq %r12
pushq 0x28(%rax)
pushq %r10
pushq %r11
callq 0x16a116
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2cc4b3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x179554(%rip), %rsi    # 0x2e5013
leaq 0x1e9995(%rip), %rdx    # 0x35545b
leaq 0x1e05e1(%rip), %rcx    # 0x34c0ae
leaq 0x1dffc4(%rip), %r8     # 0x34ba98
movl $0x356, %r9d            # imm = 0x356
jmp 0x16bb36
movq 0x2cc485(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x179526(%rip), %rsi    # 0x2e5013
leaq 0x1e0412(%rip), %rdx    # 0x34bf06
leaq 0x1e05b3(%rip), %rcx    # 0x34c0ae
leaq 0x1dff96(%rip), %r8     # 0x34ba98
movl $0x35b, %r9d            # imm = 0x35B
jmp 0x16bb36
movq 0x2cc457(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1794f8(%rip), %rsi    # 0x2e5013
leaq 0x1e05ac(%rip), %rdx    # 0x34c0ce
leaq 0x1e0604(%rip), %rcx    # 0x34c12d
leaq 0x1dff68(%rip), %r8     # 0x34ba98
movl $0x337, %r9d            # imm = 0x337
xorl %eax, %eax
callq 0x17a50
callq 0x17390