// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x20, 0x1c(%rsp)
callq 0x1f7380
movq %rax, %rdi
callq 0x1f6c50
movq %rax, 0x10(%rsp)
callq 0x1f7380
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x1f6d70
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0xaebc0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0x7dc50
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x7e920
movl %eax, %ecx
addl $0x2, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x58(%rax)
movq 0x8(%rsp), %rax
movl 0x58(%rax), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
movl 0x58(%rax), %eax
movl %eax, %edi
callq 0xec660
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x5c(%rax)
callq 0x1f79d0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x20(%rsp), %rdi
callq 0xa9d00
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movl 0x5c(%rax), %eax
movl %eax, %ecx
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
imulq (%rax), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rcx
shrq $0x6, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
andq $0x3f, %rax
cmpq $0x0, %rax
je 0x1f792f
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x8, %esi
leaq 0x377a45(%rip), %rdx    # 0x56f389
movl $0x1e9, %ecx            # imm = 0x1E9
callq 0xe83c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
movq $0x0, 0x48(%rax)
movq 0x8(%rsp), %rdi
callq 0x1f7a20
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rdx
movl $0x20, %esi
callq 0x13a230
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
leaq 0x3779e0(%rip), %rsi    # 0x56f389
movl $0x1f0, %edx            # imm = 0x1F0
callq 0xe88c0
movq 0x8(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)