// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/encdesc.c
// Function: encdesc_init_huffman
static void encdesc_init_huffman(GtEncdesc *encdesc)
{
  DescField *field;
  GtUword field_idx,
                alphabet_size = 0,
                char_idx;
  GtUword const char_alphabet_size = 256UL;
  EncdescHuffDist huffdist;

  for (field_idx = 0;
       field_idx < encdesc->num_of_fields;
       field_idx++) {
    field = &encdesc->fields[field_idx];
    if (!field->is_const) {
      if (field->is_numeric) {
        if (field->use_delta_coding && field->use_hc) {
          huffdist.correction_base = field->min_delta;
          gt_assert(field->delta_values != NULL);
          huffdist.li_ull_hashmap = field->delta_values;
          alphabet_size =
            (GtUword) labs(field->max_delta - field->min_delta) + 1;
        }
        else if (!field->is_value_const && field->use_hc) {
          huffdist.correction_base = field->min_value;
          gt_assert(field->num_values != NULL);
          huffdist.li_ull_hashmap = field->num_values;
          alphabet_size =
            (GtUword) labs(field->max_value - field->min_value) + 1;
        }

        if (field->use_hc) {
          field->huffman_num =
            gt_huffman_new(&huffdist, encdesc_hashmap_distr_get_corrected,
                           alphabet_size);
        }

        if (field->has_zero_padding && !field->fieldlen_is_const) {
          field->huffman_zero_count =
            gt_huffman_new(field->zero_count,
                           encdesc_distri_get_symbol_freq,
                           (GtUword) field->max_zero + 1);
        }
      }
      else {
        field->huffman_chars = gt_calloc((size_t) (field->max_len + 1),
                                         sizeof (field->huffman_chars));
        for (char_idx = 0; char_idx < field->max_len; char_idx++) {
          if (char_idx >= field->len ||
              !gt_bittab_bit_is_set(field->bittab, char_idx)) {
            field->huffman_chars[char_idx] =
              gt_huffman_new(field->chars[char_idx],
                             encdesc_hashmap_distr_get,
                             char_alphabet_size);
          }
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x40(%rdi)
je 0x13c2c3
movq %rdi, %rbx
xorl %r15d, %r15d
leaq 0x113f(%rip), %rbp      # 0x13d280
xorl %r12d, %r12d
movq 0x18(%rbx), %r13
imulq $0xc8, %r15, %rax
cmpb $0x0, 0xbb(%r13,%rax)
jne 0x13c2b6
addq %rax, %r13
cmpb $0x1, 0xbf(%r13)
jne 0x13c1ab
cmpb $0x1, 0xc1(%r13)
jne 0x13c21b
movb 0xc2(%r13), %al
cmpb $0x1, %al
jne 0x13c21b
movq 0x90(%r13), %rcx
movq %rcx, 0x10(%rsp)
movq 0x28(%r13), %rdx
movl $0x80, %esi
testq %rdx, %rdx
jne 0x13c24e
jmp 0x13c2d2
movq 0x68(%r13), %rdi
incq %rdi
movl $0x8, %esi
leaq 0x23fb6a(%rip), %rdx    # 0x37bd28
movl $0x3d0, %ecx            # imm = 0x3D0
callq 0x10436a
movq %rax, (%r13)
cmpq $0x0, 0x68(%r13)
je 0x13c2b6
xorl %r14d, %r14d
cmpq 0x50(%r13), %r14
jae 0x13c1f0
movq 0x18(%r13), %rdi
movq %r14, %rsi
callq 0xd6e4a
testb %al, %al
jne 0x13c20d
movq 0x30(%r13), %rax
movq (%rax,%r14,8), %rdi
movl $0x100, %edx            # imm = 0x100
movq %rbp, %rsi
callq 0x153ff8
movq (%r13), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq 0x68(%r13), %r14
jb 0x13c1da
jmp 0x13c2b6
movb 0xc2(%r13), %al
cmpb $0x0, 0xc0(%r13)
jne 0x13c268
testb $0x1, %al
je 0x13c268
movq 0x98(%r13), %rcx
movq %rcx, 0x10(%rsp)
movq 0x20(%r13), %rdx
movl $0x88, %esi
testq %rdx, %rdx
je 0x13c2d7
movq %rdx, 0x8(%rsp)
movq (%r13,%rsi), %rdx
subq %rcx, %rdx
movq %rdx, %r12
negq %r12
cmovsq %rdx, %r12
incq %r12
testb $0x1, %al
je 0x13c284
leaq 0x8(%rsp), %rdi
leaq 0xfd1(%rip), %rsi       # 0x13d249
movq %r12, %rdx
callq 0x153ff8
movq %rax, 0x8(%r13)
cmpb $0x1, 0xba(%r13)
jne 0x13c2b6
cmpb $0x0, 0xb9(%r13)
jne 0x13c2b6
movq 0x38(%r13), %rdi
movl 0xb4(%r13), %edx
incq %rdx
leaq 0xfce(%rip), %rsi       # 0x13d27b
callq 0x153ff8
movq %rax, 0x10(%r13)
incq %r15
cmpq 0x40(%rbx), %r15
jb 0x13c144
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4080d
callq 0x407d4