// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/wtree_encseq.c
// Function: gt_wtree_encseq_rank
static GtUword gt_wtree_encseq_rank(GtWtree *wtree,
                                    GtUword pos,
                                    GtWtreeSymbol symbol)
{
  unsigned int alpha_start = 0,
               alpha_end;
  GtUword node_start = 0,
          node_size;
  GtWtreeEncseq *we;
  gt_assert(wtree != NULL);

  we = gt_wtree_encseq_cast(wtree);
  gt_assert(pos < wtree->members->length);

  alpha_end = we->alpha_size - 1;
  node_size = wtree->members->length;

  return gt_wtree_encseq_rank_rec(we, pos, symbol, node_start, node_size,
                                  alpha_start, alpha_end);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x10(%rsp)
testq %rdi, %rdi
je 0x18496d
movq %rsi, %rbx
movq %rdi, %r14
movq 0x33a1cc(%rip), %rdi    # 0x4be900
testq %rdi, %rdi
jne 0x184769
leaq -0x231(%rip), %rsi      # 0x18450f
leaq -0x3c(%rip), %rdx       # 0x18470b
leaq 0x229(%rip), %rcx       # 0x184977
leaq 0x2c6(%rip), %r8        # 0x184a1b
movl $0x60, %edi
callq 0x184371
movq %rax, %rdi
movq %rax, 0x33a197(%rip)    # 0x4be900
movq %r14, %rsi
callq 0x1842c1
movq 0x8(%r14), %rcx
movq (%rcx), %r14
cmpq %rbx, %r14
jbe 0x184972
movq %rax, 0x28(%rsp)
movl 0x58(%rax), %ebp
decl %ebp
movl %ebp, %r13d
shrl %r13d
leaq 0x218253(%rip), %rdi    # 0x39c9eb
movq $0x0, 0x20(%rsp)
xorl %esi, %esi
movl %r13d, %edx
movl %ebp, %ecx
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x103d72
leaq 0x201030(%rip), %rdi    # 0x3857eb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x103d72
xorl %r12d, %r12d
xorl %r15d, %r15d
cmpl %ebp, %r12d
jae 0x184940
movq %r12, 0x30(%rsp)
movq %rbp, 0x38(%rsp)
movq %r14, %rbp
cmpl 0x10(%rsp), %r13d
setb 0xf(%rsp)
testq %r15, %r15
je 0x18480d
movq 0x28(%rsp), %r12
movq 0x38(%r12), %rdi
leaq -0x1(%r15), %r14
movq %r14, %rsi
callq 0x12a011
movq %rax, 0x18(%rsp)
jmp 0x184822
movq $-0x1, %r14
movq 0x28(%rsp), %r12
movq $0x0, 0x18(%rsp)
movq 0x38(%r12), %rdi
movq %rbp, %rsi
addq %r14, %rsi
movq %rsi, 0x40(%rsp)
callq 0x12a011
movq %rax, %rbp
subq 0x18(%rsp), %rbp
cmpl 0x10(%rsp), %r13d
jae 0x18485d
testq %r15, %r15
je 0x18488a
movq 0x38(%r12), %rdi
movq %r14, %rsi
callq 0x129f92
movq %rax, %r14
jmp 0x18488d
movq 0x38(%r12), %rdi
addq %r15, %rbx
movq %rbx, %rsi
callq 0x12a011
movq %rax, %rbx
subq 0x18(%rsp), %rbx
movq 0x8(%r12), %rax
movq %rbp, %r14
movq (%rax), %rbp
movl %r13d, %eax
movq %rax, 0x38(%rsp)
jmp 0x1848cb
xorl %r14d, %r14d
movq 0x38(%r12), %rdi
addq %r15, %rbx
movq %rbx, %rsi
callq 0x129f92
movq %rax, %rbx
subq %r14, %rbx
incl %r13d
movq 0x38(%r12), %rdi
movq 0x40(%rsp), %rsi
callq 0x129f92
subq %r14, %rax
movq %rax, %r14
movq 0x8(%r12), %rax
addq (%rax), %rbp
movl %r13d, %eax
movq %rax, 0x30(%rsp)
xorl %esi, %esi
movb 0xf(%rsp), %al
movb %al, %sil
leaq 0x218146(%rip), %rdi    # 0x39ca21
movq %r14, %rdx
xorl %eax, %eax
callq 0x103d72
testq %r14, %r14
je 0x184959
testq %rbx, %rbx
je 0x184959
addq %rbp, %r15
decq %rbx
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %r12
leal (%r12,%rbp), %r13d
shrl %r13d
leaq 0x2180de(%rip), %rdi    # 0x39c9eb
movl %r12d, %esi
movl %r13d, %edx
movl %ebp, %ecx
movq 0x10(%rsp), %r8
xorl %eax, %eax
callq 0x103d72
leaq 0x200ec3(%rip), %rdi    # 0x3857eb
movq %rbx, %rsi
xorl %eax, %eax
callq 0x103d72
cmpq %r14, %rbx
jb 0x1847cb
callq 0x59b86
incq %rbx
leaq 0x2180ee(%rip), %rdi    # 0x39ca38
movq %rbx, %rsi
xorl %eax, %eax
callq 0x103d72
movq %rbx, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x59bbf
callq 0x59b4d