// File: /workspace/github_c_makefile_star2_O1/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 0x18cbd7
movq %rax, %rdi
callq 0x18c98c
movq %rax, %rbx
callq 0x18cbd7
movq %rax, %rdi
movq %rbx, %rsi
callq 0x18ca01
movq %rax, %r14
movq %r15, %rdi
callq 0xeef4f
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0xf02da
movq %rax, %rdi
callq 0xd3007
movq %rax, 0x18(%r14)
movq %rax, %rdi
callq 0xd3724
leal 0x2(%rax), %edi
movl %edi, 0x58(%r14)
movq 0x8(%rbx), %rax
movq %rdi, 0x8(%rax)
callq 0x10af48
movl %eax, 0x5c(%r14)
leaq 0x219026(%rip), %r12    # 0x3a5e2b
movl $0x20, %edi
movq %r12, %rsi
movl $0x168, %edx            # imm = 0x168
callq 0x1092b2
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rax, 0x28(%r14)
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0xec1d8
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)
movl $0x8, %esi
movq %r12, %rdx
movl $0x1e9, %ecx            # imm = 0x1E9
callq 0x1093ef
movq %rax, 0x20(%r14)
movq $0x0, 0x48(%r14)
movq 0x10(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xed76d
movq %rax, 0x10(%rsp)
testq %r14, %r14
je 0x18d126
cmpl $0x0, 0x5c(%r14)
je 0x18d0a5
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq 0x8(%r14), %rax
cmpq $0x0, (%rax)
je 0x18d082
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0xec7be
cmpb $-0x3, %al
ja 0x18cece
movzbl %al, %ebp
jmp 0x18cedf
movl 0x58(%r14), %ebp
cmpb $-0x1, %al
je 0x18cedc
addq $-0x2, %rbp
jmp 0x18cedf
decq %rbp
movq 0x8(%rsp), %rdx
movl 0x58(%r14), %ebx
decl %ebx
cmpq %rbx, %rbp
ja 0x18d117
movq %r15, 0x18(%rsp)
movl %ebx, %r13d
shrl %r13d
movq 0x28(%r14), %rax
movq %rax, 0x30(%r14)
movq $0x0, 0x48(%r14)
testl %edx, %edx
je 0x18cffe
testl %ebx, %ebx
je 0x18cffe
xorl %r12d, %r12d
movl $0x1, %r15d
movl %r13d, %eax
cmpq %rax, %rbp
jbe 0x18cf92
movl %r13d, %r12d
incl %r12d
cmpl %r12d, %ebx
jbe 0x18cf72
movq 0x30(%r14), %rax
cmpq $0x0, 0x8(%rax)
jne 0x18cf72
movl $0x20, %edi
leaq 0x218eda(%rip), %rsi    # 0x3a5e2b
movl $0x168, %edx            # imm = 0x168
callq 0x1092b2
movq 0x8(%rsp), %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq 0x30(%r14), %rcx
movq %rax, 0x8(%rcx)
movq 0x8(%r14), %rcx
movq 0x30(%r14), %rax
movq (%rcx), %rcx
addq 0x48(%r14), %rcx
addq 0x18(%rax), %rcx
movq %rcx, 0x48(%r14)
addq $0x8, %rax
movl %ebx, %r13d
jmp 0x18cfdc
cmpl %r12d, %r13d
jbe 0x18cfcd
movq 0x30(%r14), %rax
cmpq $0x0, (%rax)
jne 0x18cfcd
movl $0x20, %edi
leaq 0x218e7e(%rip), %rsi    # 0x3a5e2b
movl $0x168, %edx            # imm = 0x168
callq 0x1092b2
movq 0x8(%rsp), %rdx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq 0x30(%r14), %rcx
movq %rax, (%rcx)
movq 0x8(%r14), %rcx
movq 0x30(%r14), %rax
movq (%rcx), %rcx
addq %rcx, 0x48(%r14)
movl %r13d, %ebx
movq (%rax), %rax
movq %rax, 0x30(%r14)
leal (%r12,%rbx), %r13d
shrl %r13d
cmpl %edx, %r15d
jae 0x18cffe
incl %r15d
cmpl %r12d, %ebx
ja 0x18cf27
movl %r13d, %ecx
movq 0x30(%r14), %rax
cmpq %rcx, %rbp
jbe 0x18d045
testq %rax, %rax
movq 0x18(%rsp), %r15
je 0x18d072
movq 0x10(%rax), %rcx
addq 0x48(%r14), %rcx
cmpq 0x50(%r14), %rcx
jae 0x18d121
addq $0x10, %rax
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x20(%r14), %rsi
shrq $0x6, %rcx
orq %rdx, (%rsi,%rcx,8)
jmp 0x18d06f
testq %rax, %rax
movq 0x18(%rsp), %r15
je 0x18d072
movq 0x10(%rax), %rcx
movq 0x48(%r14), %rdx
addq %rcx, %rdx
cmpq 0x50(%r14), %rdx
jae 0x18d11c
incq %rcx
movq %rcx, 0x10(%rax)
addq $0x18, %rax
incq (%rax)
incq %r15
movq 0x8(%r14), %rax
cmpq (%rax), %r15
jb 0x18cebb
movq 0x10(%r14), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xed48e
movq 0x8(%rsp), %rax
incl %eax
cmpl 0x5c(%r14), %eax
jb 0x18cea5
movq %r14, %rbx
addq $0x28, %rbx
movq 0x10(%rsp), %rdi
callq 0xed7bf
movq 0x28(%r14), %rdi
callq 0x18d5a7
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rdi
callq 0xee90c
xorl %ebx, %ebx
movq %rbx, 0x10(%r14)
movq 0x20(%r14), %rdi
movq 0x50(%r14), %rdx
movl $0x20, %esi
callq 0x12f230
movq %rax, 0x38(%r14)
movq 0x20(%r14), %rdi
leaq 0x218d36(%rip), %rsi    # 0x3a5e2b
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x109670
movq %rbx, 0x20(%r14)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5aee3
callq 0x5ae71
callq 0x5aeaa
callq 0x5af1c