// File: /workspace/github_c_makefile_star2_O3/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
movq 0x339e4b(%rip), %rdi    # 0x4be900
testq %rdi, %rdi
jne 0x184aea
leaq -0x5b2(%rip), %rsi      # 0x18450f
leaq -0x3bd(%rip), %rdx      # 0x18470b
leaq -0x158(%rip), %rcx      # 0x184977
leaq -0xbb(%rip), %r8        # 0x184a1b
movl $0x60, %edi
callq 0x184371
movq %rax, %rdi
movq %rax, 0x339e16(%rip)    # 0x4be900
callq 0x18424c
movq %rax, %rbx
movq 0x339e07(%rip), %rdi    # 0x4be900
testq %rdi, %rdi
jne 0x184b2e
leaq -0x5f6(%rip), %rsi      # 0x18450f
leaq -0x401(%rip), %rdx      # 0x18470b
leaq -0x19c(%rip), %rcx      # 0x184977
leaq -0xff(%rip), %r8        # 0x184a1b
movl $0x60, %edi
callq 0x184371
movq %rax, %rdi
movq %rax, 0x339dd2(%rip)    # 0x4be900
movq %rbx, %rsi
callq 0x1842c1
movq %rax, %r14
movq %r15, %rdi
callq 0xea9be
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0xebcd9
movq %rax, %rdi
callq 0xd0a3f
movq %rax, 0x18(%r14)
movq %rax, %rdi
callq 0xd11cf
leal 0x2(%rax), %edi
movl %edi, 0x58(%r14)
movq 0x8(%rbx), %rax
movq %rdi, 0x8(%rax)
callq 0x105e91
movl %eax, 0x5c(%r14)
leaq 0x217ddb(%rip), %r12    # 0x39c95b
movl $0x20, %edi
movq %r12, %rsi
movl $0x168, %edx            # imm = 0x168
callq 0x104226
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq %rax, 0x28(%r14)
movq %rax, 0x30(%r14)
movq %r15, %rdi
callq 0xe7b9c
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 0x10436a
movq %rax, 0x20(%r14)
movq $0x0, 0x48(%r14)
movq 0x10(%r14), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xe91b2
xorl %ecx, %ecx
movq %rax, 0x10(%rsp)
cmpl $0x0, 0x5c(%r14)
je 0x184e01
movq %rcx, 0x8(%rsp)
movq 0x8(%r14), %rax
cmpq $0x0, (%rax)
je 0x184dde
xorl %ebx, %ebx
movq 0x10(%rsp), %rdi
callq 0xe8186
movl 0x58(%r14), %r15d
cmpb $-0x3, %al
ja 0x184c43
movzbl %al, %ebp
jmp 0x184c51
cmpb $-0x1, %al
je 0x184c4d
leaq -0x2(%r15), %rbp
jmp 0x184c51
leaq -0x1(%r15), %rbp
movq 0x8(%rsp), %rsi
decl %r15d
cmpq %r15, %rbp
ja 0x184e73
movq %rbx, 0x18(%rsp)
movl %r15d, %r13d
shrl %r13d
movq 0x28(%r14), %rdx
movq %rdx, 0x30(%r14)
movq $0x0, 0x48(%r14)
testl %esi, %esi
je 0x184d64
testl %r15d, %r15d
je 0x184d64
xorl %ecx, %ecx
movl $0x1, %r12d
xorl %ebx, %ebx
movl %r13d, %eax
cmpq %rax, %rbp
jbe 0x184cfa
movl %r13d, %ebx
incl %ebx
cmpl %ebx, %r15d
jbe 0x184ce2
cmpq $0x0, 0x8(%rdx)
jne 0x184ce2
movl $0x20, %edi
leaq 0x217c9e(%rip), %rsi    # 0x39c95b
movl $0x168, %edx            # imm = 0x168
callq 0x104226
movq 0x8(%rsp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
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 %r15d, %r13d
jmp 0x184d40
cmpl %ebx, %r13d
jbe 0x184d35
cmpq $0x0, (%rdx)
jne 0x184d35
movl $0x20, %edi
leaq 0x217c4a(%rip), %rsi    # 0x39c95b
movl $0x168, %edx            # imm = 0x168
callq 0x104226
movq 0x8(%rsp), %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movq 0x30(%r14), %rdx
movq %rax, (%rdx)
movq 0x48(%r14), %rcx
movq 0x8(%r14), %rax
addq (%rax), %rcx
movq %rcx, 0x48(%r14)
movl %r13d, %r15d
movq (%rdx), %rdx
movq %rdx, 0x30(%r14)
leal (%rbx,%r15), %r13d
shrl %r13d
cmpl %esi, %r12d
jae 0x184d66
incl %r12d
cmpl %ebx, %r15d
ja 0x184c98
jmp 0x184d66
xorl %ecx, %ecx
movl %r13d, %eax
cmpq %rax, %rbp
jbe 0x184da5
testq %rdx, %rdx
movq 0x18(%rsp), %rbx
je 0x184dce
addq 0x10(%rdx), %rcx
cmpq 0x50(%r14), %rcx
jae 0x184e7d
addq $0x10, %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
shrq %cl, %rax
movq 0x20(%r14), %rsi
shrq $0x6, %rcx
orq %rax, (%rsi,%rcx,8)
jmp 0x184dcb
testq %rdx, %rdx
movq 0x18(%rsp), %rbx
je 0x184dce
movq 0x10(%rdx), %rax
addq %rax, %rcx
cmpq 0x50(%r14), %rcx
jae 0x184e78
incq %rax
movq %rax, 0x10(%rdx)
addq $0x18, %rdx
incq (%rdx)
incq %rbx
movq 0x8(%r14), %rax
cmpq (%rax), %rbx
jb 0x184c2c
movq 0x10(%r14), %rsi
movq 0x10(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xe8eed
movq 0x8(%rsp), %rcx
incl %ecx
cmpl 0x5c(%r14), %ecx
jb 0x184c17
movq %r14, %rbx
addq $0x28, %rbx
movq 0x10(%rsp), %rdi
callq 0xe9204
movq 0x28(%r14), %rdi
callq 0x18500a
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rdi
callq 0xea375
xorl %ebx, %ebx
movq %rbx, 0x10(%r14)
movq 0x20(%r14), %rdi
movq 0x50(%r14), %rdx
movl $0x20, %esi
callq 0x129358
movq %rax, 0x38(%r14)
movq 0x20(%r14), %rdi
leaq 0x217b0a(%rip), %rsi    # 0x39c95b
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x1045eb
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 0x59d15
callq 0x59ca3
callq 0x59cdc