// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/seed-extend.c
// Function: gt_greedy_extend_init
static void gt_greedy_extend_init(GtFTsequenceResources *ufsr,
                                  GtFTsequenceResources *vfsr,
                                  const GtSeqorEncseq *dbes,
                                  const GtSeqorEncseq *queryes,
                                  GtReadmode query_readmode,
                                  const GtUword query_seqlen,
                                  GtGreedyextendmatchinfo *ggemi)
{
  if (ggemi->left_front_trace != NULL)
  {
    front_trace_reset(ggemi->left_front_trace,0);
  }
  if (ggemi->right_front_trace != NULL)
  {
    front_trace_reset(ggemi->right_front_trace,0);
  }
  if (dbes->encseq != NULL)
  {
    if (ggemi->encseq_r_in_u == NULL)
    {
      ggemi->encseq_r_in_u
        = gt_encseq_create_reader_with_readmode(dbes->encseq,
                                                GT_READMODE_FORWARD,
                                                0);
      if (gt_encseq_wildcards(dbes->encseq) > 0)
      {
        ggemi->db_haswildcards = true;
        ggemi->db_twobit_possible = false;
      } else
      {
        ggemi->db_haswildcards = false;
        if (ggemi->db_extend_char_access == GT_EXTEND_CHAR_ACCESS_ANY &&
            gt_encseq_has_twobitencoding(dbes->encseq))
        {
          ggemi->db_twobit_possible = true;
        } else
        {
          ggemi->db_twobit_possible = false;
        }
      }
    }
  } else
  {
    ggemi->db_twobit_possible = false;
    ggemi->db_haswildcards = dbes->haswildcards;
  }
  if (queryes->encseq != NULL)
  {
    if (ggemi->encseq_r_in_v == NULL)
    {
      ggemi->encseq_r_in_v
        = gt_encseq_create_reader_with_readmode(queryes->encseq,
                                                query_readmode,0);
      if (gt_encseq_wildcards(queryes->encseq) > 0)
      {
        ggemi->query_haswildcards = true;
        ggemi->query_twobit_possible = false;
      } else
      {
        ggemi->query_haswildcards = false;
        if (ggemi->query_extend_char_access == GT_EXTEND_CHAR_ACCESS_ANY &&
            gt_encseq_has_twobitencoding(queryes->encseq))
        {
          ggemi->query_twobit_possible = true;
        } else
        {
          ggemi->query_twobit_possible = false;
        }
      }
    }
  } else
  {
    ggemi->query_twobit_possible = false;
    ggemi->query_haswildcards = queryes->haswildcards;
  }
  if (ggemi->db_totallength == GT_UWORD_MAX)
  {
    if (dbes->encseq != NULL)
    {
      ggemi->db_totallength = gt_encseq_total_length(dbes->encseq);
    } else
    {
      ggemi->db_totallength = 0;
    }
  }
  if (dbes->encseq != NULL)
  {
    gt_FTsequenceResources_init(ufsr,
                                dbes->encseq,
                                GT_READMODE_FORWARD,
                                ggemi->encseq_r_in_u,
                                &ggemi->usequence_cache,
                                NULL,
                                ggemi->db_totallength,
                                ggemi->db_totallength,
                                ggemi->db_extend_char_access,
                                ggemi->db_twobit_possible,
                                ggemi->db_haswildcards);
  } else
  {
    gt_FTsequenceResources_init(ufsr,
                                NULL,
                                GT_READMODE_FORWARD,
                                ggemi->encseq_r_in_u,
                                &ggemi->usequence_cache,
                                dbes->seq,
                                dbes->seqlength,
                                0,
                                GT_EXTEND_CHAR_ACCESS_DIRECT,
                                false,
                                ggemi->db_haswildcards);
  }
  if (queryes->encseq != NULL)
  {
    gt_FTsequenceResources_init(vfsr,
                                queryes->encseq,
                                query_readmode,
                                ggemi->encseq_r_in_v,
                                &ggemi->vsequence_cache,
                                NULL,
                                query_seqlen,
                                gt_encseq_total_length(queryes->encseq),
                                ggemi->query_extend_char_access,
                                ggemi->query_twobit_possible,
                                ggemi->query_haswildcards);
  } else
  {
    gt_FTsequenceResources_init(vfsr,
                                NULL,
                                query_readmode,
                                ggemi->encseq_r_in_v,
                                &ggemi->vsequence_cache,
                                queryes->seq,
                                query_seqlen,
                                0,
                                GT_EXTEND_CHAR_ACCESS_DIRECT,
                                false,
                                ggemi->query_haswildcards);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movl %r8d, %ebp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
movq 0x40(%rsp), %r14
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1e0e8c
xorl %esi, %esi
callq 0x31a0c7
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x1e0e9c
xorl %esi, %esi
callq 0x31a0c7
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x1e0ed1
cmpq $0x0, 0x58(%r14)
jne 0x1e0f17
xorl %esi, %esi
xorl %edx, %edx
callq 0xe91b2
movq %rax, 0x58(%r14)
movq 0x8(%r13), %rdi
callq 0xec68e
testq %rax, %rax
je 0x1e0ee6
movb $0x1, 0xc0(%r14)
jmp 0x1e0f0f
movb $0x0, 0xbe(%r14)
movb 0x31(%r13), %al
movb %al, 0xc0(%r14)
jmp 0x1e0f17
movb $0x0, 0xc0(%r14)
cmpl $0x3, 0xb4(%r14)
jne 0x1e0f0f
movq 0x8(%r13), %rdi
callq 0xe935b
testb %al, %al
je 0x1e0f0f
movb $0x1, 0xbe(%r14)
jmp 0x1e0f17
movb $0x0, 0xbe(%r14)
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x1e0f4c
cmpq $0x0, 0x60(%r14)
jne 0x1e0f92
movl %ebp, %esi
xorl %edx, %edx
callq 0xe91b2
movq %rax, 0x60(%r14)
movq 0x8(%r15), %rdi
callq 0xec68e
testq %rax, %rax
je 0x1e0f5f
movb $0x1, 0xc1(%r14)
jmp 0x1e0f87
movb $0x0, 0xbf(%r14)
movb 0x31(%r15), %al
movl $0xc1, %ecx
jmp 0x1e0f8e
movb $0x0, 0xc1(%r14)
cmpl $0x3, 0xb8(%r14)
jne 0x1e0f87
movq 0x8(%r15), %rdi
callq 0xe935b
testb %al, %al
je 0x1e0f87
movb $0x1, %al
movl $0xbf, %ecx
jmp 0x1e0f8e
movl $0xbf, %ecx
xorl %eax, %eax
movb %al, (%r14,%rcx)
movq 0x30(%r14), %rax
movq 0x8(%r13), %rdi
cmpq $-0x1, %rax
jne 0x1e0fb2
testq %rdi, %rdi
je 0x1e0fcc
callq 0xe7b9c
movq %rax, 0x30(%r14)
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0x1e0fd4
movl 0xb4(%r14), %ecx
movb 0xbe(%r14), %sil
xorl %edx, %edx
movq %rax, %r8
jmp 0x1e0fe8
movq $0x0, 0x30(%r14)
movq (%r13), %rdx
movq 0x20(%r13), %rax
movl $0x2, %ecx
xorl %edi, %edi
xorl %r8d, %r8d
xorl %esi, %esi
leaq 0x68(%r14), %r9
movq 0x58(%r14), %r10
movb 0xc0(%r14), %r11b
movq %rdi, (%r12)
movl $0x0, 0x30(%r12)
movq %rax, 0x20(%r12)
movq %r8, 0x28(%r12)
movq %r10, 0x10(%r12)
movq %r9, 0x8(%r12)
movq %rdx, 0x18(%r12)
movl %ecx, 0x34(%r12)
movb %sil, 0x38(%r12)
movb %r11b, 0x39(%r12)
movq 0x8(%r15), %r12
movq 0x60(%r14), %r13
testq %r12, %r12
je 0x1e1053
movq %r12, %rdi
callq 0xe7b9c
movl 0xb8(%r14), %ecx
movb 0xbf(%r14), %sil
xorl %edx, %edx
jmp 0x1e1062
movq (%r15), %rdx
movl $0x2, %ecx
xorl %r12d, %r12d
xorl %eax, %eax
xorl %esi, %esi
movb 0xc1(%r14), %dil
movq %r12, (%rbx)
movl %ebp, 0x30(%rbx)
subq $-0x80, %r14
movq (%rsp), %r8
movq %r8, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movq %r13, 0x10(%rbx)
movq %r14, 0x8(%rbx)
movq %rdx, 0x18(%rbx)
movl %ecx, 0x34(%rbx)
movb %sil, 0x38(%rbx)
movb %dil, 0x39(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq