// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/querymatch.c
// Function: gt_querymatch_extract_sequence_pair
void gt_querymatch_extract_sequence_pair(GtSequencepairbuffer *seqpairbuf,
                                         const GtEncseq *db_encseq,
                                         const GtEncseq *query_encseq,
                                         const GtQuerymatch *querymatch)
{
  GtReadmode query_readmode = gt_querymatch_query_readmode(querymatch);
  const GtUword dblen = gt_querymatch_dblen(querymatch),
                querylen = gt_querymatch_querylen(querymatch),
                apos_ab = gt_querymatch_dbstart(querymatch),
                bpos_ab = querymatch->query_seqstart +
                          querymatch->querystart_fwdstrand;

  if (dblen >= seqpairbuf->a_allocated)
  {
    seqpairbuf->a_sequence = gt_realloc(seqpairbuf->a_sequence,
                                        sizeof *seqpairbuf->a_sequence * dblen);
    seqpairbuf->a_allocated = dblen;
  }
  if (querylen >= seqpairbuf->b_allocated)
  {
    seqpairbuf->b_sequence = gt_realloc(seqpairbuf->b_sequence,
                                        sizeof *seqpairbuf->b_sequence *
                                        querylen);
    seqpairbuf->b_allocated = querylen;
  }
  gt_encseq_extract_encoded(db_encseq, seqpairbuf->a_sequence, apos_ab,
                            apos_ab + dblen - 1);
  gt_encseq_extract_encoded(query_encseq, seqpairbuf->b_sequence, bpos_ab,
                            bpos_ab + querylen - 1);
  if (query_readmode == GT_READMODE_REVCOMPL)
  {
    gt_inplace_reverse_complement(seqpairbuf->b_sequence,querylen);
  }
  seqpairbuf->a_len = dblen;
  seqpairbuf->b_len = querylen;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2677e0
movl %eax, 0x24(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2676e0
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2676a0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x2676b0
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x50(%rax), %rax
movq 0x28(%rsp), %rcx
addq 0x38(%rcx), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x26a9b4
movq 0x40(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
shlq $0x0, %rsi
leaq 0x3137ef(%rip), %rdx    # 0x57e180
movl $0x4dd, %ecx            # imm = 0x4DD
callq 0xe8540
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x26aa01
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
shlq $0x0, %rsi
leaq 0x3137a3(%rip), %rdx    # 0x57e180
movl $0x4e4, %ecx            # imm = 0x4E4
callq 0xe8540
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rsp), %rdx
movq 0x8(%rsp), %rcx
addq 0x18(%rsp), %rcx
subq $0x1, %rcx
callq 0xac280
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rsi
movq (%rsp), %rdx
movq (%rsp), %rcx
addq 0x10(%rsp), %rcx
subq $0x1, %rcx
callq 0xac280
cmpl $0x3, 0x24(%rsp)
jne 0x26aa64
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x2a9a30
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x28(%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)