// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-run.c
// Function: suffixeratorwithoutput
static int suffixeratorwithoutput(Outfileinfo *outfileinfo,
                                  const GtEncseq *encseq,
                                  GtReadmode readmode,
                                  unsigned int prefixlength,
                                  unsigned int numofparts,
                                  GtUword maximumspace,
                                  bool swallow_tail,
                                  const Sfxstrategy *sfxstrategy,
                                  GtTimer *sfxprogress,
                                  bool withprogressbar,
                                  GtLogger *logger,
                                  GtError *err)
{
  bool haserr = false;
  Sfxiterator *sfi = NULL;

  sfi = gt_Sfxiterator_new_withadditionalvalues(encseq,
                           readmode,
                           prefixlength,
                           numofparts,
                           maximumspace,
                           outfileinfo->outlcpinfo,
                           outfileinfo->outfpbcktab,
                           sfxstrategy,
                           sfxprogress,
                           withprogressbar,
                           logger,
                           err);
  if (sfi == NULL)
  {
    haserr = true;
  } else
  {
    const GtSuffixsortspace *suffixsortspace;
    GtBitbuffer *bitbuffer = NULL;
    GtUword numberofsuffixes;
    bool specialsuffixes = false;

    if (sfxstrategy->compressedoutput)
    {
      GtUword totallength = gt_encseq_total_length(encseq);
      unsigned int bitsperentry = gt_determinebitspervalue(totallength);

      bitbuffer = gt_bitbuffer_FILE_new(outfileinfo->outfpsuftab,bitsperentry);
    }
    while (true)
    {
      suffixsortspace = gt_Sfxiterator_next(&numberofsuffixes,&specialsuffixes,
                                            sfi);
      if (suffixsortspace == NULL)
      {
        break;
      }
      if (outfileinfo->outfpsuftab != NULL &&
          (!specialsuffixes || !swallow_tail))
      {
        if (sfxstrategy->compressedoutput)
        {
          gt_suffixsortspace_compressed_to_file (suffixsortspace,
                                                 bitbuffer,
                                                 numberofsuffixes);
        } else
        {
          gt_suffixsortspace_to_file (outfileinfo->outfpsuftab,
                                      suffixsortspace,
                                      numberofsuffixes);
        }
      }
      if (bwttab2file(outfileinfo,suffixsortspace,readmode,numberofsuffixes,
                      err) != 0)
      {
        haserr = true;
        break;
      }
      outfileinfo->numberofallsortedsuffixes += numberofsuffixes;
    }
    if (sfxstrategy->compressedoutput)
    {
      gt_bitbuffer_delete(bitbuffer);
    }
  }
  if (haserr)
  {
    outfileinfo->longest.defined = false;
    outfileinfo->longest.valueunsignedlong = 0;
  } else
  {
    outfileinfo->longest.defined = true;
    outfileinfo->longest.valueunsignedlong = gt_Sfxiterator_longest(sfi);
    gt_assert(outfileinfo->longest.valueunsignedlong <
              gt_encseq_total_length(encseq));
    if (outfileinfo->outfpbcktab != NULL)
    {
      if (gt_Sfxiterator_bcktab2file(outfileinfo->outfpbcktab,sfi,err) != 0)
      {
        haserr = true;
      }
      outfileinfo->outfpbcktab = NULL;
    }
  }
  if (gt_Sfxiterator_delete(sfi,err) != 0)
  {
    haserr = true;
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movl %ecx, 0x38(%rsp)
movl %edx, %eax
movl 0x38(%rsp), %edx
movl %eax, 0x3c(%rsp)
movq %rsi, %rax
movl 0x3c(%rsp), %esi
movq %rax, 0x40(%rsp)
movq %rdi, %r10
movq 0x40(%rsp), %rdi
movq 0xf8(%rsp), %rax
movq 0xf0(%rsp), %rax
movb 0xe8(%rsp), %al
movq 0xe0(%rsp), %rcx
movq 0xd8(%rsp), %rcx
movb 0xd0(%rsp), %cl
movq %r10, 0xa8(%rsp)
movq %rdi, 0xa0(%rsp)
movl %esi, 0x9c(%rsp)
movl %edx, 0x98(%rsp)
movl %r8d, 0x94(%rsp)
movq %r9, 0x88(%rsp)
andb $0x1, %cl
movb %cl, 0x87(%rsp)
andb $0x1, %al
movb %al, 0x86(%rsp)
movb $0x0, 0x85(%rsp)
movq $0x0, 0x78(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x9c(%rsp), %esi
movl 0x98(%rsp), %edx
movl 0x94(%rsp), %ecx
movq 0x88(%rsp), %r8
movq 0xa8(%rsp), %rax
movq 0x38(%rax), %r9
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %r15
movq 0xd8(%rsp), %r14
movq 0xe0(%rsp), %rbx
movb 0x86(%rsp), %r11b
movq 0xf0(%rsp), %r10
movq 0xf8(%rsp), %rax
andb $0x1, %r11b
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movzbl %r11b, %r11d
movl %r11d, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x2deac0
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x2cfde7
movb $0x1, 0x85(%rsp)
jmp 0x2cff2f
movq $0x0, 0x68(%rsp)
movb $0x0, 0x5f(%rsp)
movq 0xd8(%rsp), %rax
testb $0x1, 0x36(%rax)
je 0x2cfe3f
movq 0xa0(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0xec660
movl %eax, 0x4c(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rdi
movl 0x4c(%rsp), %eax
movzwl %ax, %esi
callq 0x88980
movq %rax, 0x68(%rsp)
jmp 0x2cfe41
movq 0x78(%rsp), %rdx
leaq 0x60(%rsp), %rdi
leaq 0x5f(%rsp), %rsi
callq 0x2e1b70
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x2cfe67
jmp 0x2cff15
movq 0xa8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x2cfec6
testb $0x1, 0x5f(%rsp)
je 0x2cfe86
testb $0x1, 0x87(%rsp)
jne 0x2cfec6
movq 0xd8(%rsp), %rax
testb $0x1, 0x36(%rax)
je 0x2cfeaa
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x2ea970
jmp 0x2cfec4
movq 0xa8(%rsp), %rax
movq (%rax), %rdi
movq 0x70(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x2ea880
jmp 0x2cfec6
movq 0xa8(%rsp), %rdi
movq 0x70(%rsp), %rsi
movl 0x9c(%rsp), %edx
movq 0x60(%rsp), %rcx
movq 0xf8(%rsp), %r8
callq 0x2d04b0
cmpl $0x0, %eax
je 0x2cfefb
movb $0x1, 0x85(%rsp)
jmp 0x2cff15
movq 0x60(%rsp), %rcx
movq 0xa8(%rsp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
jmp 0x2cfe41
movq 0xd8(%rsp), %rax
testb $0x1, 0x36(%rax)
je 0x2cff2d
movq 0x68(%rsp), %rdi
callq 0x895a0
jmp 0x2cff2f
testb $0x1, 0x85(%rsp)
je 0x2cff5a
movq 0xa8(%rsp), %rax
movb $0x0, 0x28(%rax)
movq 0xa8(%rsp), %rax
movq $0x0, 0x30(%rax)
jmp 0x2d0030
movq 0xa8(%rsp), %rax
movb $0x1, 0x28(%rax)
movq 0x78(%rsp), %rdi
callq 0x2e28d0
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0xa8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jb 0x2cffe2
movq 0x36bfef(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x246058(%rip), %rsi    # 0x516013
leaq 0x2bbf55(%rip), %rdx    # 0x58bf17
leaq 0x2bbf96(%rip), %rcx    # 0x58bf5f
leaq 0x2bbdc3(%rip), %r8     # 0x58bd93
movl $0x12e, %r9d            # imm = 0x12E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2cffe4
movq 0xa8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0x2d002e
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x78(%rsp), %rsi
movq 0xf8(%rsp), %rdx
callq 0x2e27c0
cmpl $0x0, %eax
je 0x2d001e
movb $0x1, 0x85(%rsp)
movq 0xa8(%rsp), %rax
movq $0x0, 0x10(%rax)
jmp 0x2d0030
movq 0x78(%rsp), %rdi
movq 0xf8(%rsp), %rsi
callq 0x2dd930
cmpl $0x0, %eax
je 0x2d004f
movb $0x1, 0x85(%rsp)
movb 0x85(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq