// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-suffixer.c
// Function: gt_Sfxiterator_delete
int gt_Sfxiterator_delete(Sfxiterator *sfi,GtError *err)
{
  bool haserr = false;

  if (sfi == NULL)
  {
    return 0;
  }
#ifdef SKDEBUG
  if (sfi->bcktab != NULL)
  {
    gt_bcktab_checkcountspecialcodes(sfi->bcktab);
  }
#endif
  if (sfi->sri != NULL)
  {
    gt_specialrangeiterator_delete(sfi->sri);
  }
  gt_free(sfi->spaceCodeatposition);
  sfi->spaceCodeatposition = NULL;
  gt_suffixsortspace_delete(sfi->suffixsortspace,
                            sfi->sfxstrategy.spmopt_minlength == 0
                              ? true : false);
  if (sfi->suftabparts != NULL &&
      gt_suftabparts_numofparts(sfi->suftabparts) > 1U &&
      sfi->outfpbcktab != NULL)
  {
    gt_suftabparts_showallrecords(sfi->suftabparts,true);
    if (gt_bcktab_remap_all(sfi->bcktab,err) != 0)
    {
      haserr = true;
    } else
    {
      int ret = gt_bcktab_flush_to_file(sfi->outfpbcktab,sfi->bcktab,err);
      gt_fa_fclose(sfi->outfpbcktab);
      if (ret != 0)
      {
        haserr = true;
      }
    }
  }
  gt_bcktab_delete(sfi->bcktab);
#ifdef GT_THREADS_ENABLED
#ifdef GT_THREADS_PARTITION
  gt_suftabparts_multi_delete(sfi->partitions_for_threads,
                              gt_suftabparts_numofparts(sfi->suftabparts));
#endif
#endif
  gt_suftabparts_delete(sfi->suftabparts);
  gt_Outlcpinfo_delete(sfi->outlcpinfoforsample);
  if (sfi->mappedmarkprefixbuckets == NULL)
  {
    gt_free(sfi->markprefixbuckets);
  }
  gt_Sfxmappedrange_delete(sfi->mappedmarkprefixbuckets);
  sfi->mappedmarkprefixbuckets = NULL;
  gt_free(sfi->marksuffixbuckets);
  gt_differencecover_delete(sfi->dcov);
  gt_SSSPbuf_delete(sfi->sssp_buf);
  gt_free(sfi);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movb $0x0, 0xf(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x2dd958
movl $0x0, 0x24(%rsp)
jmp 0x2ddb64
movq 0x18(%rsp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x2dd978
movq 0x18(%rsp), %rax
movq 0xe8(%rax), %rdi
callq 0xafc80
movq 0x18(%rsp), %rax
movq 0x108(%rax), %rdi
leaq 0x2af8a9(%rip), %rsi    # 0x58d234
movl $0x22b, %edx            # imm = 0x22B
callq 0xe88c0
movq 0x18(%rsp), %rax
movq $0x0, 0x108(%rax)
movq 0x18(%rsp), %rax
movq 0x90(%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x50(%rax), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
callq 0x2e9940
movq 0x18(%rsp), %rax
cmpq $0x0, 0x68(%rax)
je 0x2dda83
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x2ce430
cmpl $0x1, %eax
jbe 0x2dda83
movq 0x18(%rsp), %rax
cmpq $0x0, 0xf0(%rax)
je 0x2dda83
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
movl $0x1, %esi
callq 0x2cced0
movq 0x18(%rsp), %rax
movq 0x78(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x2052b0
cmpl $0x0, %eax
je 0x2dda3f
movb $0x1, 0xf(%rsp)
jmp 0x2dda81
movq 0x18(%rsp), %rax
movq 0xf0(%rax), %rdi
movq 0x18(%rsp), %rax
movq 0x78(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0x204860
movl %eax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq 0xf0(%rax), %rdi
callq 0xd9390
cmpl $0x0, 0x8(%rsp)
je 0x2dda7f
movb $0x1, 0xf(%rsp)
jmp 0x2dda81
jmp 0x2dda83
movq 0x18(%rsp), %rax
movq 0x78(%rax), %rdi
callq 0x204540
movq 0x18(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x2ce1c0
movq 0x18(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x2c64d0
movq 0x18(%rsp), %rax
cmpq $0x0, 0x158(%rax)
jne 0x2ddad9
movq 0x18(%rsp), %rax
movq 0x130(%rax), %rdi
leaq 0x2af765(%rip), %rsi    # 0x58d234
movl $0x24d, %edx            # imm = 0x24D
callq 0xe88c0
movq 0x18(%rsp), %rax
movq 0x158(%rax), %rdi
callq 0x2cca80
movq 0x18(%rsp), %rax
movq $0x0, 0x158(%rax)
movq 0x18(%rsp), %rax
movq 0x138(%rax), %rdi
leaq 0x2af727(%rip), %rsi    # 0x58d234
movl $0x251, %edx            # imm = 0x251
callq 0xe88c0
movq 0x18(%rsp), %rax
movq 0x88(%rax), %rdi
callq 0x2bd790
movq 0x18(%rsp), %rax
movq 0xe0(%rax), %rdi
callq 0x2eab10
movq 0x18(%rsp), %rdi
leaq 0x2af6ef(%rip), %rsi    # 0x58d234
movl $0x254, %edx            # imm = 0x254
callq 0xe88c0
movb 0xf(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)