// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/querymatch-align.c
// Function: gt_querymatchoutoptions_extract_seq
void gt_querymatchoutoptions_extract_seq(GtQuerymatchoutoptions
                                           *querymatchoutoptions,
                                         const GtSeqorEncseq *dbes,
                                         GtUword dbstart_relative,
                                         GtUword dbstart,
                                         GtUword dblen,
                                         GtReadmode query_readmode,
                                         const GtSeqorEncseq *queryes,
                                         GtUword querystart,
                                         GtUword abs_querystart_fwdstrand,
                                         GtUword querylen,
                                         bool withcorrection)
{
  gt_assert(querymatchoutoptions != NULL);
  if (querymatchoutoptions->characters == NULL)
  {
    if (dbes->encseq != NULL)
    {
      querymatchoutoptions->characters
        = gt_encseq_alphabetcharacters(dbes->encseq);
      querymatchoutoptions->wildcardshow
        = gt_alphabet_wildcard_show(gt_encseq_alphabet(dbes->encseq));
    } else
    {
      querymatchoutoptions->characters = dbes->characters;
      querymatchoutoptions->wildcardshow = dbes->wildcardshow;
    }
  }
  if (dbes->encseq != NULL)
  {
    if (querymatchoutoptions->db_esr_for_align_show == NULL)
    {
      querymatchoutoptions->db_esr_for_align_show
        = gt_encseq_create_reader_with_readmode(dbes->encseq,
                                                GT_READMODE_FORWARD,
                                                0);
    }
    if (dblen > querymatchoutoptions->useqbuffer_size)
    {
      querymatchoutoptions->useqbuffer
        = gt_realloc(querymatchoutoptions->useqbuffer,
                     sizeof *querymatchoutoptions->useqbuffer * dblen);
      querymatchoutoptions->useqbuffer_size = dblen;
    }
    gt_encseq_extract_encoded_with_reader(
                            querymatchoutoptions->db_esr_for_align_show,
                            dbes->encseq,
                            querymatchoutoptions->useqbuffer,
                            dbstart,
                            dbstart + dblen - 1);
  } else
  {
    querymatchoutoptions->useqbuffer = (GtUchar *) (dbes->seq + dbstart);
  }
  if ((queryes->encseq != NULL || query_readmode != GT_READMODE_FORWARD) &&
      querylen > querymatchoutoptions->vseqbuffer_size)
  {
    querymatchoutoptions->vseqbuffer
      = gt_realloc(querymatchoutoptions->vseqbuffer,
                   sizeof *querymatchoutoptions->vseqbuffer * querylen);
    querymatchoutoptions->vseqbuffer_size = querylen;
  }
  if (queryes->encseq != NULL)
  {
    if (querymatchoutoptions->query_esr_for_align_show == NULL)
    {
      querymatchoutoptions->query_esr_for_align_show
        = gt_encseq_create_reader_with_readmode(queryes->encseq,
                                                GT_READMODE_FORWARD,
                                                0);
    }
    gt_encseq_extract_encoded_with_reader(
                            querymatchoutoptions->query_esr_for_align_show,
                            queryes->encseq,
                            querymatchoutoptions->vseqbuffer,
                            abs_querystart_fwdstrand,
                            abs_querystart_fwdstrand + querylen - 1);
  } else
  {
    if (query_readmode != GT_READMODE_FORWARD)
    {
      memcpy(querymatchoutoptions->vseqbuffer,
             queryes->seq + abs_querystart_fwdstrand,
             querylen * sizeof *querymatchoutoptions->vseqbuffer);
    } else
    {
      querymatchoutoptions->vseqbuffer
        = (GtUchar *) (queryes->seq + abs_querystart_fwdstrand);
    }
  }
  if (query_readmode == GT_READMODE_REVERSE)
  {
    gt_inplace_reverse(querymatchoutoptions->vseqbuffer,querylen);
  } else
  {
    if (query_readmode == GT_READMODE_REVCOMPL)
    {
      gt_inplace_reverse_complement(querymatchoutoptions->vseqbuffer,querylen);
    } else
    {
      gt_assert(query_readmode == GT_READMODE_FORWARD);
    }
  }
  gt_querymatchoutoptions_set_sequences(querymatchoutoptions,
                                        dbstart_relative,
                                        dblen,
                                        querystart,
                                        querylen,
                                        withcorrection);
}

// Assembly:
subq $0x38, %rsp
movb 0x60(%rsp), %al
movq 0x58(%rsp), %r10
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %r10
movq 0x40(%rsp), %r10
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %r8, 0x10(%rsp)
movl %r9d, 0xc(%rsp)
andb $0x1, %al
movb %al, 0xb(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x264db0
movq 0x3d7221(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b128a(%rip), %rsi    # 0x516013
leaq 0x319475(%rip), %rdx    # 0x57e205
leaq 0x317bf9(%rip), %rcx    # 0x57c990
leaq 0x317a2f(%rip), %r8     # 0x57c7cd
movl $0x1f8, %r9d            # imm = 0x1F8
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x264db2
movq 0x30(%rsp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x264e2a
movq 0x28(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x264e06
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb0f20
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e9d0
movb %al, %cl
movq 0x30(%rsp), %rax
movb %cl, 0x70(%rax)
jmp 0x264e28
movq 0x28(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x28(%rsp), %rax
movb 0x30(%rax), %cl
movq 0x30(%rsp), %rax
movb %cl, 0x70(%rax)
jmp 0x264e2a
movq 0x28(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x264ee6
movq 0x30(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x264e66
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xac380
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x10(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq (%rcx), %rax
jbe 0x264eb1
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
shlq $0x0, %rsi
leaq 0x31793f(%rip), %rdx    # 0x57c7cd
movl $0x214, %ecx            # imm = 0x214
callq 0xe8540
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq 0x58(%rax), %rdi
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdx
movq 0x18(%rsp), %rcx
movq 0x18(%rsp), %r8
addq 0x10(%rsp), %r8
subq $0x1, %r8
callq 0xabcc0
jmp 0x264efc
movq 0x28(%rsp), %rax
movq (%rax), %rcx
addq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x264f0f
cmpl $0x0, 0xc(%rsp)
je 0x264f5c
movq 0x58(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x264f5c
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
shlq $0x0, %rsi
leaq 0x317895(%rip), %rdx    # 0x57c7cd
movl $0x226, %ecx            # imm = 0x226
callq 0xe8540
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x58(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x264fc9
movq 0x30(%rsp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x264f94
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xac380
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x30(%rsp), %rax
movq 0x60(%rax), %rdi
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0x50(%rsp), %rcx
movq 0x50(%rsp), %r8
addq 0x58(%rsp), %r8
subq $0x1, %r8
callq 0xabcc0
jmp 0x26500e
cmpl $0x0, 0xc(%rsp)
je 0x264ff6
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
addq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
shlq $0x0, %rdx
callq 0x19610
jmp 0x26500c
movq 0x40(%rsp), %rax
movq (%rax), %rcx
addq 0x50(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x26500e
cmpl $0x1, 0xc(%rsp)
jne 0x26502a
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x2a9b80
jmp 0x26508d
cmpl $0x3, 0xc(%rsp)
jne 0x265046
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x58(%rsp), %rsi
callq 0x2a9a30
jmp 0x26508b
jmp 0x265048
cmpl $0x0, 0xc(%rsp)
je 0x265087
movq 0x3d6f4a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b0fb3(%rip), %rsi    # 0x516013
leaq 0x31794d(%rip), %rdx    # 0x57c9b4
leaq 0x317922(%rip), %rcx    # 0x57c990
leaq 0x317758(%rip), %r8     # 0x57c7cd
movl $0x24f, %r9d            # imm = 0x24F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x265089
jmp 0x26508b
jmp 0x26508d
movq 0x30(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x58(%rsp), %r8
movb 0xb(%rsp), %al
andb $0x1, %al
movzbl %al, %r9d
callq 0x2650c0
addq $0x38, %rsp
retq
nopw (%rax,%rax)