// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-bltrie.c
// Function: gt_blindtrie_insertsuffix
static void gt_blindtrie_insertsuffix(GtBlindtrie *blindtrie,
                                      GtUword offset,
                                      GtUword sortmaxdepth,
                                      GtUword currentstartpos)
{

  gt_assert(sortmaxdepth == 0 || sortmaxdepth > offset);
  if (blindtrie->nextfreeBlindtrienode == 0)
  { /* empty tree */
    if (sortmaxdepth == 0)
    {
      blindtrie->sortmaxdepthminusoffset = 0;
    } else
    {
      blindtrie->sortmaxdepthminusoffset = sortmaxdepth - offset;
    }
    blindtrie->overflowsuffixes.nextfreeGtUword = 0;
    blindtrie_makeroot(blindtrie,currentstartpos,ULONG_MAX);
  } else
  {
    if (blindtrie_isleftofboundary(blindtrie,currentstartpos,0))
    {
      GtUword lcp, currenttwobitencodingstoppos;
      GtBlindtriesnodeptr leafinsubtrie, splitnode;
      GtBlindtriesymbol mm_oldsuffix, mm_newsuffix;

      currenttwobitencodingstoppos
        = blindtrie_currenttwobitencodingstoppos_get(blindtrie,currentstartpos);
      leafinsubtrie = blindtrie_findcompanion(blindtrie,currentstartpos,
                                              currenttwobitencodingstoppos);
      gt_assert(blindtrie_isleaf(blindtrie,leafinsubtrie));
      lcp = blindtrie_getlcp(&mm_oldsuffix,
                             NULL,
                             &mm_newsuffix,
                             blindtrie,
                             leafinsubtrie,
                             currentstartpos,
                             currenttwobitencodingstoppos);
      splitnode = blindtrie_findsplitnode(blindtrie,lcp);
      blindtrie_insertatsplitnode(blindtrie,
                                  splitnode,
                                  mm_oldsuffix,
                                  lcp,
                                  mm_newsuffix,
                                  currentstartpos,
                                  currenttwobitencodingstoppos);
    } else
    {
      GT_STOREINARRAY(&blindtrie->overflowsuffixes,GtUword,32,currentstartpos);
    }
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x2b8494
movq 0x40(%rsp), %rax
cmpq 0x48(%rsp), %rax
ja 0x2b8494
movq 0x383b3d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25dba6(%rip), %rsi    # 0x516013
leaq 0x2d0805(%rip), %rdx    # 0x588c79
leaq 0x2d0829(%rip), %rcx    # 0x588ca4
leaq 0x2d06f1(%rip), %r8     # 0x588b73
movl $0x454, %r9d            # imm = 0x454
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b8496
movq 0x50(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x2b84f3
cmpq $0x0, 0x40(%rsp)
jne 0x2b84b8
movq 0x50(%rsp), %rax
movq $0x0, 0x70(%rax)
jmp 0x2b84cb
movq 0x40(%rsp), %rcx
subq 0x48(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x50(%rsp), %rax
movq $0x0, 0x38(%rax)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq $-0x1, %rdx
callq 0x2b8a10
jmp 0x2b871f
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2b96c0
testb $0x1, %al
jne 0x2b850f
jmp 0x2b85fa
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2b8b60
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x2b8c20
movl %eax, 0x24(%rsp)
movq 0x50(%rsp), %rdi
movl 0x24(%rsp), %esi
callq 0x2b9080
testb $0x1, %al
jne 0x2b8585
movq 0x383a4c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25dab5(%rip), %rsi    # 0x516013
leaq 0x2d06ea(%rip), %rdx    # 0x588c4f
leaq 0x2d0738(%rip), %rcx    # 0x588ca4
leaq 0x2d0600(%rip), %r8     # 0x588b73
movl $0x46c, %r9d            # imm = 0x46C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b8587
movq 0x50(%rsp), %rcx
movl 0x24(%rsp), %r8d
movq 0x38(%rsp), %r9
movq 0x28(%rsp), %rax
leaq 0x18(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
leaq 0x10(%rsp), %rdx
movq %rax, (%rsp)
callq 0x2b9110
movq %rax, 0x30(%rsp)
movq 0x50(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2b9260
movl %eax, 0x20(%rsp)
movq 0x50(%rsp), %rdi
movl 0x20(%rsp), %esi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %r8
movq 0x38(%rsp), %r9
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
callq 0x2b92f0
jmp 0x2b871d
jmp 0x2b85fc
jmp 0x2b85fe
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
addq $0x0, %rax
movq 0x50(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x2b86ab
movq $0x20, 0x8(%rsp)
xorl %eax, %eax
cmpq 0x8(%rsp), %rax
jbe 0x2b8664
movq 0x38396d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25d9d6(%rip), %rsi    # 0x516013
leaq 0x260b63(%rip), %rdx    # 0x5191a7
leaq 0x2d0659(%rip), %rcx    # 0x588ca4
leaq 0x2d0521(%rip), %r8     # 0x588b73
movl $0x47e, %r9d            # imm = 0x47E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b8666
movq 0x8(%rsp), %rcx
movq 0x50(%rsp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x30(%rax), %rsi
shlq $0x3, %rsi
leaq 0x2d04de(%rip), %rdx    # 0x588b73
movl $0x47e, %ecx            # imm = 0x47E
callq 0xe8540
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x28(%rax)
jmp 0x2b86ad
movq 0x50(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x2b86f1
movq 0x3838e0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25d949(%rip), %rsi    # 0x516013
leaq 0x2d05ed(%rip), %rdx    # 0x588cbe
leaq 0x2d05cc(%rip), %rcx    # 0x588ca4
leaq 0x2d0494(%rip), %r8     # 0x588b73
movl $0x47e, %r9d            # imm = 0x47E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b86f3
jmp 0x2b86f5
movq 0x38(%rsp), %rdx
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rax
movq 0x50(%rsp), %rsi
movq 0x38(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x38(%rsi)
movq %rdx, (%rax,%rcx,8)
jmp 0x2b871d
jmp 0x2b871f
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)