// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/encdesc_header_io.c
// Function: io_numeric_field_header
static int io_numeric_field_header(DescField *field, FILE *fp, GtIOFunc io_func,
                                   GtError *err)
{
  int had_err = 0;
  bool needs_zero_dist = false,
       needs_delta_dist = false,
       needs_value_dist = false;
  EncsecDistriData data;

  data.fp = fp;

  had_err = GT_ENCDESC_IO_ONE(field->is_delta_positive);
  if (field->is_delta_positive)
    gt_log_log("strictly increasing");
  if (!had_err) {
    had_err = GT_ENCDESC_IO_ONE(field->is_delta_negative);
    if (field->is_delta_negative)
      gt_log_log("strictly decreasing");
  }

  if (!had_err)
    had_err = io_zero_padding(field, fp, io_func, err);
  if (!had_err) {
    needs_zero_dist = zero_padding_needs_dist(field);
    had_err = io_min_max_calc_ranges(field, fp, io_func, err);
  }
  if (!had_err) {
    numeric_field_check_distri_dependence(field, &needs_delta_dist,
                                          &needs_value_dist);
    if (field->use_hc)
      gt_log_log("uses huffman");
    if (field->use_delta_coding)
      gt_log_log("uses delta values");
  }

  if (!had_err && needs_delta_dist) {
    field->delta_values = io_hashmap_distri(field->delta_values,
                                            field->delta_values_size,
                                            &data, err);
    if (field->delta_values == NULL)
      had_err = -1;
  }

  if (!had_err && needs_value_dist) {
    field->num_values = io_hashmap_distri(field->num_values,
                                          field->num_values_size,
                                          &data, err);
  }

  /* TODO DW change this distribution, to hashtable like the others, this
     reduces functions */
  if (!had_err && needs_zero_dist) {
    field->zero_count = io_zero_disc_distri(field->zero_count, &data, err);
    if (field->zero_count == NULL)
      had_err = -1;
  }
  return had_err;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
movb $0x0, 0x33(%rsp)
movb $0x0, 0x32(%rsp)
movb $0x0, 0x31(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdi
addq $0xbd, %rdi
movq 0x48(%rsp), %rcx
movq 0x38(%rsp), %r8
movl $0x1, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rax
testb $0x1, 0xbd(%rax)
je 0x164b4e
leaq 0x3c94cc(%rip), %rdi    # 0x52e013
movb $0x0, %al
callq 0xe7740
cmpl $0x0, 0x34(%rsp)
jne 0x164b9c
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rdi
addq $0xbe, %rdi
movq 0x48(%rsp), %rcx
movq 0x38(%rsp), %r8
movl $0x1, %edx
movq %rdx, %rsi
callq *%rax
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rax
testb $0x1, 0xbe(%rax)
je 0x164b9a
leaq 0x3ea2ff(%rip), %rdi    # 0x54ee92
movb $0x0, %al
callq 0xe7740
jmp 0x164b9c
cmpl $0x0, 0x34(%rsp)
jne 0x164bc0
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x1656a0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x164bf4
movq 0x50(%rsp), %rdi
callq 0x1657b0
andb $0x1, %al
movb %al, 0x33(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
callq 0x1657f0
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x164c49
movq 0x50(%rsp), %rdi
leaq 0x32(%rsp), %rsi
leaq 0x31(%rsp), %rdx
callq 0x165cd0
movq 0x50(%rsp), %rax
testb $0x1, 0xc2(%rax)
je 0x164c2b
leaq 0x3ea282(%rip), %rdi    # 0x54eea6
movb $0x0, %al
callq 0xe7740
movq 0x50(%rsp), %rax
testb $0x1, 0xc1(%rax)
je 0x164c47
leaq 0x3ea273(%rip), %rdi    # 0x54eeb3
movb $0x0, %al
callq 0xe7740
jmp 0x164c49
cmpl $0x0, 0x34(%rsp)
jne 0x164c9a
testb $0x1, 0x32(%rsp)
je 0x164c9a
movq 0x50(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x48(%rax), %rsi
movq 0x38(%rsp), %rcx
leaq 0x8(%rsp), %rdx
callq 0x165da0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x164c98
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x164c9a
cmpl $0x0, 0x34(%rsp)
jne 0x164cd5
testb $0x1, 0x31(%rsp)
je 0x164cd5
movq 0x50(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x50(%rsp), %rax
movq 0x60(%rax), %rsi
movq 0x38(%rsp), %rcx
leaq 0x8(%rsp), %rdx
callq 0x165da0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x20(%rax)
cmpl $0x0, 0x34(%rsp)
jne 0x164d1d
testb $0x1, 0x33(%rsp)
je 0x164d1d
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x38(%rsp), %rdx
leaq 0x8(%rsp), %rsi
callq 0x165e10
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x50(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x164d1b
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x164d1d
movl 0x34(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)