// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/sfx-bltrie.c
// Function: blindtrie_insertatsplitnode
static void blindtrie_insertatsplitnode(GtBlindtrie *blindtrie,
                                        GtBlindtriesnodeptr oldnode,
                                        GtBlindtriesymbol mm_oldsuffix,
                                        GtUword lcp,
                                        GtBlindtriesymbol mm_newsuffix,
                                        GtUword currentstartpos,
                                        GtUword
                                           currenttwobitencodingstoppos)
{
  GtBlindtriesnodeptr newleaf, newnode, previousnode, currentnode;

  gt_assert(GT_ISUNIQUEINT(mm_oldsuffix) ||
            GT_ISUNIQUEINT(mm_newsuffix) ||
            mm_oldsuffix != mm_newsuffix ||
            blindtrie_isleaf(blindtrie,oldnode) ||
            blindtrie_getdepth(blindtrie,oldnode) == lcp);

  /* insert a new node before node oldnode if necessary */
  if (blindtrie_isleaf(blindtrie,oldnode))
  {
    gt_assert(lcp > 0);
  }
  if (blindtrie_isleaf(blindtrie,oldnode) ||
      blindtrie_getdepth(blindtrie,oldnode) > lcp)
  {
    newnode = blindtrie_newnode(blindtrie);
    blindtrie_firstchar_set(blindtrie,newnode,
                            blindtrie_isleaf(blindtrie,oldnode),mm_oldsuffix);
    if (!blindtrie_isleaf(blindtrie,oldnode))
    {
      blindtrie_setdepth(blindtrie,newnode,
                         blindtrie_getdepth(blindtrie,oldnode));
      /* newnode inherits depth+children */
    }
    blindtrie_copy_either(blindtrie,newnode,oldnode);
    blindtrie_rightsibling_set(blindtrie,newnode,GT_BLINDTRIE_REFNULL);
    blindtrie_setleaf(blindtrie,oldnode,false);
    gt_assert(!GT_ISUNIQUEINT(blindtrie_firstchar_get(blindtrie,oldnode)));
    gt_assert(lcp > 0);
    blindtrie_setdepth(blindtrie,oldnode,lcp);
    /* oldnode has newnode as only child*/
    blindtrie_firstchild_set(blindtrie,oldnode,newnode);
  }
  gt_assert(blindtrie_isleaf(blindtrie,oldnode) ||
            blindtrie_getdepth(blindtrie,oldnode) == lcp);
  previousnode = GT_BLINDTRIE_REFNULL;
  currentnode = blindtrie_firstchild_get(blindtrie,oldnode);
  while (currentnode != GT_BLINDTRIE_REFNULL &&
         blindtrie_comparecharacters(blindtrie_firstchar_get(blindtrie,
                                                             currentnode),
                                     mm_newsuffix) < 0)
  {
    previousnode = currentnode;
    currentnode = blindtrie_rightsibling_get(blindtrie,currentnode);
  }
  /* insert new leaf with current suffix */
  /* search S[lcp] among the offsprings */
  newleaf = blindtrie_newleaf(blindtrie,currentstartpos,
                              currenttwobitencodingstoppos,mm_newsuffix,
                              currentnode);
  if (previousnode != GT_BLINDTRIE_REFNULL)
  {
    blindtrie_rightsibling_set(blindtrie,previousnode,newleaf);
  } else
  {
    blindtrie_firstchild_set(blindtrie,oldnode,newleaf);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r8, %rax
orq %rdx, %rax
cmpq $0x100, %rax            # imm = 0x100
setae %al
cmpq %r8, %rdx
setne %cl
orb %al, %cl
jne 0x1e71fb
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
testb %al, %al
jne 0x1e71fb
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e7455
cmpq %rbp, %rax
jne 0x1e7423
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
testq %rbp, %rbp
jne 0x1e7212
testb %al, %al
jne 0x1e7405
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
testb %al, %al
jne 0x1e7233
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e7455
cmpq %rbp, %rax
jbe 0x1e7349
movq %rbp, (%rsp)
movq %r14, %rdi
callq 0x1e74ec
movl %eax, %r12d
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
movzbl %al, %ebp
movq %r14, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0x1e767c
cmpq $0x100, %r13            # imm = 0x100
setb %al
orb %al, %bpl
je 0x1e740a
movq 0x8(%r14), %rax
movl %r12d, %ebp
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movq %r13, (%rax,%rcx,8)
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
testb %al, %al
jne 0x1e72ab
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e7455
movq %r14, %rdi
movl %r12d, %esi
movq %rax, %rdx
callq 0x1e753e
movl 0x4(%r14), %eax
cmpl %r12d, %eax
jbe 0x1e740f
cmpl %ebx, %eax
jbe 0x1e740f
movq 0x8(%r14), %rax
shlq $0x3, %rbp
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
movl %ebx, %edx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
movq 0x8(%rax,%rdx), %rsi
movq %rsi, 0x8(%rax,%rcx)
movq 0x8(%r14), %rax
movl 0x10(%rax,%rdx), %edx
movl %edx, 0x10(%rax,%rcx)
movq %r14, %rdi
movl %r12d, %esi
xorl %edx, %edx
callq 0x1e76a7
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x1e767c
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e770b
cmpq $0x100, %rax            # imm = 0x100
jae 0x1e7414
movq (%rsp), %rbp
testq %rbp, %rbp
je 0x1e7419
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x1e753e
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x1e756c
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e6d66
testb %al, %al
jne 0x1e736a
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e7455
cmpq %rbp, %rax
jne 0x1e741e
movq %r14, %rdi
movl %ebx, %esi
callq 0x1e7428
testl %eax, %eax
je 0x1e73ad
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x1e770b
cmpq %r15, %rax
jae 0x1e73af
movl %ebp, %r12d
movq %r14, %rdi
movl %ebp, %esi
callq 0x1e74b1
testl %eax, %eax
je 0x1e7401
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0x1e770b
cmpq %r15, %rax
jb 0x1e7389
jmp 0x1e73b2
xorl %ebp, %ebp
xorl %r12d, %r12d
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r15, %rcx
movl %ebp, %r8d
callq 0x1e7598
movq %r14, %rdi
testl %r12d, %r12d
je 0x1e73ea
movl %r12d, %esi
movl %eax, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1e76a7
movl %ebx, %esi
movl %eax, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1e756c
xorl %ebp, %ebp
jmp 0x1e73b2
callq 0x76743
callq 0x76626
callq 0x7665f
callq 0x7670a
callq 0x766d1
callq 0x76698
callq 0x765ed