// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/wtree_encseq.c
// Function: gt_wtree_encseq_new
GtWtree* gt_wtree_encseq_new(GtEncseq *encseq)
{
  /* sample rate for compressd bitseq */
  const unsigned int samplerate = 32U;
  GtWtree *wtree;
  GtWtreeEncseq *wtree_encseq;
  wtree = gt_wtree_create(gt_wtree_encseq_class());
  wtree_encseq = gt_wtree_encseq_cast(wtree);
  wtree_encseq->encseq = gt_encseq_ref(encseq);
  wtree_encseq->alpha = gt_alphabet_ref(gt_encseq_alphabet(encseq));
  /* encoded chars + WC given by gt_alphabet_size,
     we have to encode GT_UNDEFCHAR and GT_SEPARATOR too */
  wtree_encseq->alpha_size = gt_alphabet_size(wtree_encseq->alpha) + 2;
  wtree->members->num_of_symbols = (GtUword) wtree_encseq->alpha_size;
  /* levels in tree: \lceil log_2(\sigma)\rceil */
  wtree_encseq->levels =
    gt_determinebitspervalue((GtUword) wtree_encseq->alpha_size);
  wtree_encseq->root_fo = gt_wtree_encseq_fill_offset_new();
  wtree_encseq->current_fo = wtree_encseq->root_fo;
  wtree->members->length =
    gt_encseq_total_length(encseq);
  /* each level has number of symbols bits */
  wtree_encseq->num_of_bits =
    wtree_encseq->levels *
    wtree->members->length;
  wtree_encseq->bits_size =
    wtree_encseq->num_of_bits / (sizeof (GtBitsequence) * CHAR_BIT);
  if (wtree_encseq->num_of_bits % (sizeof (GtBitsequence) * CHAR_BIT) != 0)
    wtree_encseq->bits_size++;
  wtree_encseq->bits =
    gt_calloc((size_t) wtree_encseq->bits_size, sizeof (GtBitsequence));
  wtree_encseq->node_start = 0;
  gt_wtree_encseq_fill_bits(wtree_encseq);
  wtree_encseq->c_bits =
    gt_compressed_bitsequence_new(wtree_encseq->bits,
                                  samplerate,
                                  wtree_encseq->num_of_bits);
  gt_free(wtree_encseq->bits);
  wtree_encseq->bits = NULL;
  return wtree;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
callq 0x12c432
movq %rax, %rdi
callq 0x12c000
movq %rax, %rbx
callq 0x12c432
movq %rax, %rdi
movq %rbx, %rsi
callq 0x12c0db
movq %rax, %r14
movq %r15, %rdi
callq 0x73cbe
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x754dd
movq %rax, %rdi
callq 0x5644e
movq %rax, 0x18(%r14)
movq %rax, %rdi
callq 0x56cd2
leal 0x2(%rax), %edi
movl %edi, 0x58(%r14)
movq 0x8(%rbx), %rax
movq %rdi, 0x8(%rax)
callq 0x9580f
movl %eax, 0x5c(%r14)
callq 0x12cdd2
leaq 0x28(%r14), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x28(%r14)
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0x7055e
movq %rbx, 0x20(%rsp)
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movl 0x5c(%r14), %ecx
imulq %rax, %rcx
movq %rcx, 0x50(%r14)
movq %rcx, %rdi
shrq $0x6, %rdi
andl $0x3f, %ecx
cmpq $0x1, %rcx
sbbq $-0x1, %rdi
movq %rdi, 0x40(%r14)
leaq 0x2101a9(%rip), %rdx    # 0x33ccbb
pushq $0x8
popq %rsi
movl $0x1e9, %ecx            # imm = 0x1E9
callq 0x9334a
movq %rax, 0x20(%r14)
andq $0x0, 0x48(%r14)
movq 0x10(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x72260
xorl %edi, %edi
movq %rax, 0x8(%rsp)
cmpl 0x5c(%r14), %edi
jae 0x12ccd0
xorl %r15d, %r15d
movq %rdi, (%rsp)
movq 0x8(%r14), %rax
cmpq (%rax), %r15
jae 0x12ccb3
movq 0x8(%rsp), %rdi
callq 0x70f55
movl 0x58(%r14), %r13d
cmpb $-0x3, %al
ja 0x12cb71
movzbl %al, %ebx
jmp 0x12cb7f
cmpb $-0x1, %al
je 0x12cb7b
leaq -0x2(%r13), %rbx
jmp 0x12cb7f
leaq -0x1(%r13), %rbx
movq (%rsp), %rdi
decl %r13d
cmpq %r13, %rbx
ja 0x12cd3e
movq %r15, 0x10(%rsp)
movq 0x28(%r14), %rdx
movq %rdx, 0x30(%r14)
andq $0x0, 0x48(%r14)
xorl %ecx, %ecx
xorl %ebp, %ebp
movl %r13d, %r12d
xorl %r15d, %r15d
shrl %r12d
cmpl %edi, %r15d
jae 0x12cc46
cmpl %ebp, %r13d
jbe 0x12cc46
cmpq %r12, %rbx
jbe 0x12cc03
movl %r12d, %ebp
incl %ebp
cmpl %ebp, %r13d
jbe 0x12cbeb
cmpq $0x0, 0x8(%rdx)
jne 0x12cbeb
callq 0x12cdd2
movq (%rsp), %rdi
movq 0x30(%r14), %rdx
movq %rax, 0x8(%rdx)
movq 0x48(%r14), %rcx
movq 0x8(%r14), %rax
addq (%rax), %rcx
addq 0x18(%rdx), %rcx
movq %rcx, 0x48(%r14)
addq $0x8, %rdx
movl %r13d, %r12d
jmp 0x12cc2d
cmpl %ebp, %r12d
jbe 0x12cc22
cmpq $0x0, (%rdx)
jne 0x12cc22
callq 0x12cdd2
movq (%rsp), %rdi
movq 0x30(%r14), %rdx
movq %rax, (%rdx)
movq 0x48(%r14), %rcx
movq 0x8(%r14), %rax
addq (%rax), %rcx
movq %rcx, 0x48(%r14)
movq (%rdx), %rdx
movq %rdx, 0x30(%r14)
movl %r12d, %r13d
leal (%r12,%rbp), %eax
incl %r15d
movl %eax, %r12d
jmp 0x12cbab
cmpq %r12, %rbx
jbe 0x12cc82
testq %rdx, %rdx
movq 0x10(%rsp), %r15
je 0x12ccab
addq 0x10(%rdx), %rcx
cmpq 0x50(%r14), %rcx
jae 0x12cd6c
addq $0x10, %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
movq 0x20(%r14), %rsi
shrq $0x6, %rcx
orq %rax, (%rsi,%rcx,8)
jmp 0x12cca8
testq %rdx, %rdx
movq 0x10(%rsp), %r15
je 0x12ccab
movq 0x10(%rdx), %rax
addq %rax, %rcx
cmpq 0x50(%r14), %rcx
jae 0x12cd9a
incq %rax
movq %rax, 0x10(%rdx)
addq $0x18, %rdx
incq (%rdx)
incq %r15
jmp 0x12cb4d
movq 0x10(%r14), %rsi
movq 0x8(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x71f38
movq (%rsp), %rdi
incl %edi
jmp 0x12cb3c
movq 0x8(%rsp), %rdi
callq 0x722ae
movq 0x28(%r14), %rdi
callq 0x12cf6f
xorps %xmm0, %xmm0
movq 0x18(%rsp), %rax
movups %xmm0, (%rax)
movq 0x10(%r14), %rdi
callq 0x735fd
andq $0x0, 0x10(%r14)
movq 0x20(%r14), %rdi
movq 0x50(%r14), %rdx
pushq $0x20
popq %rsi
callq 0xbeef4
movq %rax, 0x38(%r14)
movq 0x20(%r14), %rdi
leaq 0x20ffa0(%rip), %rsi    # 0x33ccbb
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x936f9
andq $0x0, 0x20(%r14)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30b223(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b82c4(%rip), %rsi    # 0x2e5013
leaq 0x2100e0(%rip), %rdx    # 0x33ce36
leaq 0x2100fa(%rip), %rcx    # 0x33ce57
leaq 0x20ff57(%rip), %r8     # 0x33ccbb
movl $0x181, %r9d            # imm = 0x181
jmp 0x12cdc6
movq 0x30b1f5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b8296(%rip), %rsi    # 0x2e5013
leaq 0x210078(%rip), %rdx    # 0x33cdfc
leaq 0x210057(%rip), %rcx    # 0x33cde2
leaq 0x20ff29(%rip), %r8     # 0x33ccbb
movl $0x1bb, %r9d            # imm = 0x1BB
jmp 0x12cdc6
movq 0x30b1c7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1b8268(%rip), %rsi    # 0x2e5013
leaq 0x21004a(%rip), %rdx    # 0x33cdfc
leaq 0x210029(%rip), %rcx    # 0x33cde2
leaq 0x20fefb(%rip), %r8     # 0x33ccbb
movl $0x1b4, %r9d            # imm = 0x1B4
xorl %eax, %eax
callq 0x17a50
callq 0x17390