// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x100, 0x18(%rsp)      # imm = 0x100
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x161448
movq 0x40(%rsp), %rax
movq 0x18(%rax), %rax
imulq $0xc8, 0x30(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
testb $0x1, 0xbb(%rax)
jne 0x161433
movq 0x38(%rsp), %rax
testb $0x1, 0xbf(%rax)
je 0x161378
movq 0x38(%rsp), %rax
testb $0x1, 0xc1(%rax)
je 0x16123f
movq 0x38(%rsp), %rax
testb $0x1, 0xc2(%rax)
je 0x16123f
movq 0x38(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1611ff
movq 0x4dadd2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3b4e3b(%rip), %rsi    # 0x516013
leaq 0x3ed75c(%rip), %rdx    # 0x54e93b
leaq 0x3ed771(%rip), %rcx    # 0x54e957
leaq 0x3ed07b(%rip), %r8     # 0x54e268
movl $0x3b4, %r9d            # imm = 0x3B4
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x161201
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x38(%rsp), %rcx
subq 0x90(%rcx), %rax
movq %rax, %rcx
negq %rcx
cmovnsq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1612f5
movq 0x38(%rsp), %rax
testb $0x1, 0xc0(%rax)
jne 0x1612f3
movq 0x38(%rsp), %rax
testb $0x1, 0xc2(%rax)
je 0x1612f3
movq 0x38(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1612b8
movq 0x4dad19(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3b4d82(%rip), %rsi    # 0x516013
leaq 0x3ed6d4(%rip), %rdx    # 0x54e96c
leaq 0x3ed6b8(%rip), %rcx    # 0x54e957
leaq 0x3ecfc2(%rip), %r8     # 0x54e268
movl $0x3bb, %r9d            # imm = 0x3BB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1612ba
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x88(%rax), %rax
movq 0x38(%rsp), %rcx
subq 0x98(%rcx), %rax
movq %rax, %rcx
negq %rcx
cmovnsq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x1612f5
movq 0x38(%rsp), %rax
testb $0x1, 0xc2(%rax)
je 0x161325
movq 0x28(%rsp), %rdx
leaq 0x8(%rsp), %rdi
leaq 0x245c(%rip), %rsi      # 0x163770
callq 0x191820
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
testb $0x1, 0xba(%rax)
je 0x161373
movq 0x38(%rsp), %rax
testb $0x1, 0xb9(%rax)
jne 0x161373
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x38(%rsp), %rax
movl 0xb4(%rax), %eax
movl %eax, %edx
addq $0x1, %rdx
leaq 0x24be(%rip), %rsi      # 0x163820
callq 0x191820
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x161431
movq 0x38(%rsp), %rax
movq 0x68(%rax), %rdi
addq $0x1, %rdi
movl $0x8, %esi
leaq 0x3eced7(%rip), %rdx    # 0x54e268
movl $0x3d0, %ecx            # imm = 0x3D0
callq 0xe83c0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x68(%rcx), %rax
jae 0x16142f
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x50(%rcx), %rax
jae 0x1613e6
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0x8a780
testb $0x1, %al
jne 0x16141d
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x2451(%rip), %rsi      # 0x163850
movl $0x100, %edx            # imm = 0x100
callq 0x191820
movq %rax, %rdx
movq 0x38(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x16141f
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x1613af
jmp 0x161431
jmp 0x161433
jmp 0x161435
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x161134
addq $0x48, %rsp
retq
nopl (%rax)