// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_filltailsuffixes
static void gt_sain_filltailsuffixes(GtUsainindextype *suftabtail,
                                     const GtSainseq *sainseq,
                                     GtReadmode readmode)
{
  if (sainseq->seqtype == GT_SAIN_ENCSEQ)
  {
    GtUword specialcharacters
              = gt_encseq_specialcharacters(sainseq->seq.encseq),
            totallength = gt_encseq_total_length(sainseq->seq.encseq);

    if (gt_encseq_has_specialranges(sainseq->seq.encseq))
    {
      GtSpecialrangeiterator *sri;
      GtRange range;
      GtUword countspecial = 0;

      sri = gt_specialrangeiterator_new(sainseq->seq.encseq,
                                        GT_ISDIRREVERSE(readmode) ? false
                                                                  : true);
      while (gt_specialrangeiterator_next(sri,&range))
      {
        GtUword idx;

        if (GT_ISDIRREVERSE(readmode))
        {
          gt_range_reverse(totallength,&range);
        }
        for (idx = range.start; idx < range.end; idx++)
        {
          gt_assert(countspecial < specialcharacters && idx < totallength);
          suftabtail[countspecial++] = (GtUsainindextype) idx;
        }
      }
      gt_assert(countspecial == specialcharacters);
      gt_specialrangeiterator_delete(sri);
    }
    suftabtail[specialcharacters] = (GtUsainindextype) totallength;
  } else
  {
    GtUword specialcharacters, totallength;

    gt_assert(sainseq->seqtype == GT_SAIN_BARE_ENCSEQ &&
              sainseq->bare_encseq != NULL);
    specialcharacters = gt_bare_encseq_specialcharacters(sainseq->bare_encseq);
    totallength = gt_bare_encseq_total_length(sainseq->bare_encseq);
    if (specialcharacters > 0)
    {
      GtRange range;
      GtUword countspecial = 0;
      GtBareSpecialrangeiterator *sri
        = gt_bare_encseq_specialrangeiterator_new(sainseq->bare_encseq,
                                        GT_ISDIRREVERSE(readmode) ? false
                                                                  : true);

      gt_assert(sri != NULL);
      while (gt_bare_encseq_specialrangeiterator_next(sri,&range))
      {
        GtUword idx;

        if (GT_ISDIRREVERSE(readmode))
        {
          gt_range_reverse(totallength,&range);
        }
        for (idx = range.start; idx < range.end; idx++)
        {
          gt_assert(countspecial < specialcharacters && idx < totallength);
          suftabtail[countspecial++] = (GtUsainindextype) idx;
        }
      }
      gt_assert(countspecial == specialcharacters);
      gt_bare_encseq_specialrangeiterator_delete(sri);
    }
    suftabtail[specialcharacters] = (GtUsainindextype) totallength;
  }
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movl %edx, 0x94(%rsp)
movq 0x98(%rsp), %rax
cmpl $0x2, 0x50(%rax)
jne 0x2d3f45
movq 0x98(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xb2530
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xa9d00
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xaf360
testb $0x1, %al
jne 0x2d3d7c
jmp 0x2d3f23
movq $0x0, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x10(%rsp)
movb $0x1, %al
cmpl $0x1, 0x94(%rsp)
movb %al, 0x1f(%rsp)
je 0x2d3db5
cmpl $0x3, 0x94(%rsp)
sete %al
movb %al, 0x1f(%rsp)
movq 0x10(%rsp), %rdi
movb 0x1f(%rsp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0xaf650
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xaf770
testb $0x1, %al
jne 0x2d3df9
jmp 0x2d3ece
cmpl $0x1, 0x94(%rsp)
je 0x2d3e0d
cmpl $0x3, 0x94(%rsp)
jne 0x2d3e1f
movq 0x80(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xc2f20
movq 0x68(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x70(%rsp), %rax
jae 0x2d3ec9
jmp 0x2d3e3b
movq 0x60(%rsp), %rax
cmpq 0x88(%rsp), %rax
jae 0x2d3e59
movq 0x58(%rsp), %rax
cmpq 0x80(%rsp), %rax
jb 0x2d3e91
movq 0x368140(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2421a9(%rip), %rsi    # 0x516013
leaq 0x2b90e5(%rip), %rdx    # 0x58cf56
leaq 0x2b9114(%rip), %rcx    # 0x58cf8c
leaq 0x2b81e9(%rip), %r8     # 0x58c068
movl $0x50f, %r9d            # imm = 0x50F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d3e93
movq 0x58(%rsp), %rax
movl %eax, %edx
movq 0xa0(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x60(%rsp)
movl %edx, (%rax,%rcx,4)
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x2d3e29
jmp 0x2d3de1
jmp 0x2d3ed0
movq 0x60(%rsp), %rax
cmpq 0x88(%rsp), %rax
je 0x2d3f17
movq 0x3680ba(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x242123(%rip), %rsi    # 0x516013
leaq 0x2b90ae(%rip), %rdx    # 0x58cfa5
leaq 0x2b908e(%rip), %rcx    # 0x58cf8c
leaq 0x2b8163(%rip), %r8     # 0x58c068
movl $0x513, %r9d            # imm = 0x513
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d3f19
movq 0x78(%rsp), %rdi
callq 0xafc80
movq 0x80(%rsp), %rax
movl %eax, %edx
movq 0xa0(%rsp), %rax
movq 0x88(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
jmp 0x2d41ca
jmp 0x2d3f47
movq 0x98(%rsp), %rax
cmpl $0x3, 0x50(%rax)
jne 0x2d3f64
movq 0x98(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2d3f9c
movq 0x368035(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24209e(%rip), %rsi    # 0x516013
leaq 0x2b87b9(%rip), %rdx    # 0x58c735
leaq 0x2b9009(%rip), %rcx    # 0x58cf8c
leaq 0x2b80de(%rip), %r8     # 0x58c068
movl $0x51c, %r9d            # imm = 0x51C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d3f9e
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x203210
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x2030f0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x50(%rsp)
jbe 0x2d41b3
movq $0x0, 0x30(%rsp)
movq 0x98(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, (%rsp)
movb $0x1, %al
cmpl $0x1, 0x94(%rsp)
movb %al, 0xf(%rsp)
je 0x2d400e
cmpl $0x3, 0x94(%rsp)
sete %al
movb %al, 0xf(%rsp)
movq (%rsp), %rdi
movb 0xf(%rsp), %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x203260
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x2d4079
movq 0x367f58(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x241fc1(%rip), %rsi    # 0x516013
leaq 0x261679(%rip), %rdx    # 0x5356d2
leaq 0x2b8f2c(%rip), %rcx    # 0x58cf8c
leaq 0x2b8001(%rip), %r8     # 0x58c068
movl $0x528, %r9d            # imm = 0x528
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d407b
jmp 0x2d407d
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x2033b0
testb $0x1, %al
jne 0x2d4095
jmp 0x2d4161
cmpl $0x1, 0x94(%rsp)
je 0x2d40a9
cmpl $0x3, 0x94(%rsp)
jne 0x2d40b8
movq 0x48(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xc2f20
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x2d415c
jmp 0x2d40d4
movq 0x30(%rsp), %rax
cmpq 0x50(%rsp), %rax
jae 0x2d40ec
movq 0x20(%rsp), %rax
cmpq 0x48(%rsp), %rax
jb 0x2d4124
movq 0x367ead(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x241f16(%rip), %rsi    # 0x516013
leaq 0x2b8e52(%rip), %rdx    # 0x58cf56
leaq 0x2b8e81(%rip), %rcx    # 0x58cf8c
leaq 0x2b7f56(%rip), %r8     # 0x58c068
movl $0x533, %r9d            # imm = 0x533
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d4126
movq 0x20(%rsp), %rax
movl %eax, %edx
movq 0xa0(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x30(%rsp)
movl %edx, (%rax,%rcx,4)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2d40c2
jmp 0x2d407d
jmp 0x2d4163
movq 0x30(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x2d41a7
movq 0x367e2a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x241e93(%rip), %rsi    # 0x516013
leaq 0x2b8e1e(%rip), %rdx    # 0x58cfa5
leaq 0x2b8dfe(%rip), %rcx    # 0x58cf8c
leaq 0x2b7ed3(%rip), %r8     # 0x58c068
movl $0x537, %r9d            # imm = 0x537
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2d41a9
movq 0x28(%rsp), %rdi
callq 0x203380
movq 0x48(%rsp), %rax
movl %eax, %edx
movq 0xa0(%rsp), %rax
movq 0x50(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)