// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/wtree_encseq.c
// Function: gt_wtree_encseq_fill_bits
static void gt_wtree_encseq_fill_bits(GtWtreeEncseq *we)
{
  unsigned int level_idx;
  GtUword sym_idx;
  GtEncseqReader *er =
    gt_encseq_create_reader_with_readmode(we->encseq, GT_READMODE_FORWARD, 0);
  gt_assert(we != NULL);

  for (level_idx = 0; level_idx < we->levels; level_idx++) {
    for (sym_idx = 0;
         sym_idx < we->parent_instance.members->length;
         sym_idx++) {
      GtWtreeSymbol c_sym =
        gt_wtree_encseq_map(we, gt_encseq_reader_next_encoded_char(er));
      if (gt_wtree_encseq_set_nodestart_and_current_fo(we, level_idx, c_sym)) {
        /*0*/
        if (we->current_fo != NULL) {
          gt_assert(we->node_start + we->current_fo->offset < we->num_of_bits);
          we->current_fo->offset++;
          we->current_fo->left_size++;
        }
      }
      else {
        if (we->current_fo != NULL) {
          gt_assert(we->node_start + we->current_fo->offset < we->num_of_bits);
          GT_SETIBIT(we->bits, we->node_start + we->current_fo->offset);
          we->current_fo->offset++;
        }
      }
    }
    gt_encseq_reader_reinit_with_readmode(er, we->encseq,
                                          GT_READMODE_FORWARD, 0);
  }
  gt_encseq_reader_delete(er);
  gt_wtree_encseq_fill_offset_delete(we->root_fo);
  we->root_fo = we->current_fo = NULL;
  gt_encseq_delete(we->encseq);
  we->encseq = NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0xac380
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x1f7a82
movq 0x44454f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x31e5b8(%rip), %rsi    # 0x516013
leaq 0x377a4e(%rip), %rdx    # 0x56f4b0
leaq 0x377a52(%rip), %rcx    # 0x56f4bb
leaq 0x377919(%rip), %r8     # 0x56f389
movl $0x1a9, %r9d            # imm = 0x1A9
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f7a84
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x5c(%rcx), %eax
jae 0x1f7cb0
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
movq 0x8(%rcx), %rcx
cmpq (%rcx), %rax
jae 0x1f7c87
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0xaae30
movq 0x8(%rsp), %rdi
movzbl %al, %esi
callq 0x1f8480
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x1f8550
testb $0x1, %al
jne 0x1f7b00
jmp 0x1f7b9c
movq 0x30(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1f7b97
jmp 0x1f7b12
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rsp), %rcx
movq 0x30(%rcx), %rcx
addq 0x10(%rcx), %rax
movq 0x30(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x1f7b6b
movq 0x444466(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x31e4cf(%rip), %rsi    # 0x516013
leaq 0x37798a(%rip), %rdx    # 0x56f4d5
leaq 0x377969(%rip), %rcx    # 0x56f4bb
leaq 0x377830(%rip), %r8     # 0x56f389
movl $0x1b4, %r9d            # imm = 0x1B4
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f7b6d
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x18(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
jmp 0x1f7c72
movq 0x30(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x1f7c70
jmp 0x1f7bae
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x30(%rsp), %rcx
movq 0x30(%rcx), %rcx
addq 0x10(%rcx), %rax
movq 0x30(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jb 0x1f7c07
movq 0x4443ca(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x31e433(%rip), %rsi    # 0x516013
leaq 0x3778ee(%rip), %rdx    # 0x56f4d5
leaq 0x3778cd(%rip), %rcx    # 0x56f4bb
leaq 0x377794(%rip), %r8     # 0x56f389
movl $0x1bb, %r9d            # imm = 0x1BB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1f7c09
movq 0x30(%rsp), %rax
movq 0x48(%rax), %rcx
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
addq 0x10(%rax), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq 0x30(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x30(%rsp), %rcx
movq 0x48(%rcx), %rcx
movq 0x30(%rsp), %rsi
movq 0x30(%rsi), %rsi
addq 0x10(%rsi), %rcx
shrq $0x6, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x1f7c72
jmp 0x1f7c74
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1f7aa7
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rsi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0xabdb0
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x1f7a8c
movq 0x18(%rsp), %rdi
callq 0xac3f0
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x1f8750
movq 0x30(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x30(%rsp), %rax
movq $0x0, 0x28(%rax)
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xae070
movq 0x30(%rsp), %rax
movq $0x0, 0x10(%rax)
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)