// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/wtree_encseq.c
// Function: gt_wtree_encseq_set_nodestart_and_current_fo
static bool gt_wtree_encseq_set_nodestart_and_current_fo(GtWtreeEncseq *we,
                                                         unsigned int level,
                                                         GtWtreeSymbol sym)
{
  unsigned int alpha_end = we->alpha_size - 1,
               alpha_start = 0,
               middle = GT_DIV2(alpha_end);
  unsigned int c_level = 0;
  gt_assert(sym <= (GtWtreeSymbol) alpha_end);
  we->current_fo = we->root_fo;
  we->node_start = 0;

  while (c_level < level &&
         alpha_end > alpha_start) {
    if (sym <= (GtWtreeSymbol) middle) {
      alpha_end = middle;
      if (alpha_end > alpha_start &&
          we->current_fo->left == NULL)
        we->current_fo->left = gt_wtree_encseq_fill_offset_new();

      we->node_start =
        we->node_start + we->parent_instance.members->length;
      we->current_fo = we->current_fo->left;
    }
    else {
      alpha_start = middle + 1;
      if (alpha_end > alpha_start &&
          we->current_fo->right == NULL)
        we->current_fo->right = gt_wtree_encseq_fill_offset_new();

      /* start of right child: start of left + size of left */
      we->node_start =
        we->node_start + we->parent_instance.members->length +
        we->current_fo->left_size;
      we->current_fo = we->current_fo->right;
    }
    middle = GT_DIV2(alpha_start + alpha_end);
    c_level++;
  }
  return (sym <= (GtWtreeSymbol) middle);
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl %esi, 0x2c(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rax
movl 0x58(%rax), %eax
subl $0x1, %eax
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x1c(%rsp), %eax
shrl %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
cmpq %rcx, %rax
jbe 0x1f85d1
movq 0x443a00(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x31da69(%rip), %rsi    # 0x516013
leaq 0x376f93(%rip), %rdx    # 0x56f544
leaq 0x376fad(%rip), %rcx    # 0x56f565
leaq 0x376dca(%rip), %r8     # 0x56f389
movl $0x181, %r9d            # imm = 0x181
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f85d3
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x30(%rsp), %rax
movq $0x0, 0x48(%rax)
movl 0x10(%rsp), %ecx
xorl %eax, %eax
cmpl 0x2c(%rsp), %ecx
movb %al, 0xf(%rsp)
jae 0x1f8611
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
seta %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x1f861e
jmp 0x1f872f
movq 0x20(%rsp), %rax
movl 0x14(%rsp), %ecx
cmpq %rcx, %rax
ja 0x1f8696
movl 0x14(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
jbe 0x1f8661
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
cmpq $0x0, (%rax)
jne 0x1f8661
callq 0x1f79d0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x1f8711
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
jbe 0x1f86d0
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1f86d0
callq 0x1f79d0
movq %rax, %rcx
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
addq (%rax), %rcx
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
addq 0x18(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x30(%rax)
movl 0x18(%rsp), %eax
addl 0x1c(%rsp), %eax
shrl %eax
movl %eax, 0x14(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x1f85f2
movq 0x20(%rsp), %rax
movl 0x14(%rsp), %ecx
cmpq %rcx, %rax
setbe %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)