// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/test-mtrieins.c
// Function: gt_test_trieins
int gt_test_trieins(bool onlyins,const char *indexname,GtError *err)
{
  Suffixarray suffixarray;
  bool haserr = false;
  GtUword totallength = 0;

  gt_error_check(err);
  if (streamsuffixarray(&suffixarray,
                        SARR_ESQTAB,
                        indexname,
                        NULL,
                        err) != 0)
  {
    haserr = true;
  } else
  {
    totallength = gt_encseq_total_length(suffixarray.encseq);
  }
  if (!haserr)
  {
    Mergertrierep trierep;
    const GtUchar *characters;

    trierep.encseqreadinfo = gt_malloc(sizeof *trierep.encseqreadinfo);
    trierep.encseqreadinfo->encseqptr = suffixarray.encseq;
    trierep.encseqreadinfo->readmode = suffixarray.readmode;
    characters
      = gt_alphabet_characters(gt_encseq_alphabet(suffixarray.encseq));
    gt_mergertrie_initnodetable(&trierep,totallength,1U);
    maketrie(&trierep,characters,totallength);
    if (onlyins)
    {
#ifdef WITHTRIEIDENT
#ifdef WITHTRIESHOW
      showtrie(&trierep,characters);
#endif
      checktrie(&trierep,totallength+1,totallength,err);
#endif
    } else
    {
#ifdef WITHTRIEIDENT
#ifdef WITHTRIESHOW
      mergertrie_showallnoderelations(trierep.root);
#endif
#endif
      successivelydeletesmallest(&trierep,totallength,characters,err);
    }
    gt_mergertrie_delete(&trierep);
  }
  gt_freesuffixarray(&suffixarray);
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movb %dil, %al
andb $0x1, %al
movb %al, 0x167(%rsp)
movq %rsi, 0x158(%rsp)
movq %rdx, 0x150(%rsp)
movb $0x0, 0x4f(%rsp)
movq $0x0, 0x40(%rsp)
cmpq $0x0, 0x150(%rsp)
je 0x2f2bf7
movq 0x150(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2f2bbf
jmp 0x2f2bf7
movq 0x3493da(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x223443(%rip), %rsi    # 0x516013
leaq 0x2235e8(%rip), %rdx    # 0x5161bf
leaq 0x29caa0(%rip), %rcx    # 0x58f67e
leaq 0x29caa9(%rip), %r8     # 0x58f68e
movl $0x52, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f2bf9
movq 0x158(%rsp), %rdx
movq 0x150(%rsp), %r8
leaq 0x50(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x233500
cmpl $0x0, %eax
je 0x2f2c28
movb $0x1, 0x4f(%rsp)
jmp 0x2f2c37
movq 0x50(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x40(%rsp)
testb $0x1, 0x4f(%rsp)
jne 0x2f2cea
movl $0x10, %edi
leaq 0x29ca40(%rip), %rsi    # 0x58f68e
movl $0x63, %edx
callq 0xe80f0
movq %rax, 0x10(%rsp)
movq 0x50(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movl 0x98(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x50(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7e970
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x10(%rsp), %rdi
movl $0x1, %edx
callq 0x4d2d30
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq 0x2f2d10
testb $0x1, 0x167(%rsp)
je 0x2f2cc4
jmp 0x2f2ce0
movq 0x40(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x150(%rsp), %rcx
leaq 0x10(%rsp), %rdi
callq 0x2f2d70
leaq 0x10(%rsp), %rdi
callq 0x4d2df0
leaq 0x50(%rsp), %rdi
callq 0x233320
movb 0x4f(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x168, %rsp            # imm = 0x168
retq
nopl (%rax)