// File: /workspace/github_c_makefile_star2_O2/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, %r12
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r13
movl %esi, %ebx
movq %rdi, %r14
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r8, %rax
orq %rdx, %rax
cmpq $0x100, %rax            # imm = 0x100
setae %al
cmpq %r8, %rdx
setne %cl
orb %al, %cl
jne 0x19653d
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
testb %al, %al
jne 0x19653d
movq %r14, %rdi
movl %ebx, %esi
callq 0x196880
cmpq %rbp, %rax
jne 0x1967e8
movq %r12, 0x8(%rsp)
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
testq %rbp, %rbp
jne 0x196559
testb %al, %al
jne 0x1966f9
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
testb %al, %al
jne 0x19657a
movq %r14, %rdi
movl %ebx, %esi
callq 0x196880
cmpq %rbp, %rax
jbe 0x196654
movq %r14, %rdi
callq 0x196ab4
movl %eax, %r12d
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
movzbl %al, %edx
movq %r14, %rdi
movl %r12d, %esi
movq %r13, %rcx
callq 0x196b5e
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
testb %al, %al
jne 0x1965c6
movq %r14, %rdi
movl %ebx, %esi
callq 0x196880
movq %r14, %rdi
movl %r12d, %esi
movq %rax, %rdx
callq 0x196bd5
movl 0x4(%r14), %eax
cmpl %r12d, %eax
jbe 0x19672a
cmpl %ebx, %eax
jbe 0x19672a
movq 0x8(%r14), %rax
movl %r12d, %ecx
imulq $0x18, %rcx, %rcx
movl %ebx, %edx
imulq $0x18, %rdx, %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 0x196eb6
movq %r14, %rdi
movl %ebx, %esi
xorl %edx, %edx
callq 0x196e5a
movq %r14, %rdi
movl %ebx, %esi
callq 0x196f80
cmpq $0x100, %rax            # imm = 0x100
jae 0x19675b
testq %rbp, %rbp
je 0x19678c
movq %r14, %rdi
movl %ebx, %esi
movq %rbp, %rdx
callq 0x196bd5
movq %r14, %rdi
movl %ebx, %esi
movl %r12d, %edx
callq 0x196c36
movq %r14, %rdi
movl %ebx, %esi
callq 0x195fa6
testb %al, %al
jne 0x196675
movq %r14, %rdi
movl %ebx, %esi
callq 0x196880
cmpq %rbp, %rax
jne 0x1967ba
movq %r14, %rdi
movl %ebx, %esi
callq 0x196820
movl %eax, %r12d
xorl %ebp, %ebp
testl %r12d, %r12d
je 0x1966ac
movq %r14, %rdi
movl %r12d, %esi
callq 0x196f80
cmpq %r15, %rax
jae 0x1966ac
movq %r14, %rdi
movl %r12d, %esi
callq 0x196a13
movl %r12d, %ebp
movl %eax, %r12d
jmp 0x196684
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x196c95
movq %r14, %rdi
testl %ebp, %ebp
je 0x1966e2
movl %ebp, %esi
movl %eax, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x196eb6
movl %ebx, %esi
movl %eax, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x196c36
movq 0x2a1868(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e909(%rip), %rsi    # 0x2e5013
leaq 0x1c022d(%rip), %rdx    # 0x35693e
leaq 0x1c020a(%rip), %rcx    # 0x356922
leaq 0x1bfa5f(%rip), %r8     # 0x35617e
movl $0x21a, %r9d            # imm = 0x21A
jmp 0x196814
movq 0x2a1837(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e8d8(%rip), %rsi    # 0x2e5013
leaq 0x1c0240(%rip), %rdx    # 0x356982
leaq 0x1c0293(%rip), %rcx    # 0x3569dc
leaq 0x1bfa2e(%rip), %r8     # 0x35617e
movl $0x121, %r9d            # imm = 0x121
jmp 0x196814
movq 0x2a1806(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e8a7(%rip), %rsi    # 0x2e5013
leaq 0x1c01d3(%rip), %rdx    # 0x356946
leaq 0x1c01a8(%rip), %rcx    # 0x356922
leaq 0x1bf9fd(%rip), %r8     # 0x35617e
movl $0x22b, %r9d            # imm = 0x22B
jmp 0x196814
movq 0x2a17d5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e876(%rip), %rsi    # 0x2e5013
leaq 0x1c019a(%rip), %rdx    # 0x35693e
leaq 0x1c0177(%rip), %rcx    # 0x356922
leaq 0x1bf9cc(%rip), %r8     # 0x35617e
movl $0x22c, %r9d            # imm = 0x22C
jmp 0x196814
movq 0x2a17a7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e848(%rip), %rsi    # 0x2e5013
leaq 0x1c00fc(%rip), %rdx    # 0x3568ce
leaq 0x1c0149(%rip), %rcx    # 0x356922
leaq 0x1bf99e(%rip), %r8     # 0x35617e
movl $0x232, %r9d            # imm = 0x232
jmp 0x196814
movq 0x2a1779(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x14e81a(%rip), %rsi    # 0x2e5013
leaq 0x1c006e(%rip), %rdx    # 0x35686e
leaq 0x1c011b(%rip), %rcx    # 0x356922
leaq 0x1bf970(%rip), %r8     # 0x35617e
movl $0x215, %r9d            # imm = 0x215
xorl %eax, %eax
callq 0x17a50
callq 0x17390