// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq %rsi, 0x30(%rsp)
addq $0xbd, %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
cmpb $0x1, 0xbd(%rbx)
jne 0xd4a15
leaq 0x2283db(%rip), %rdi    # 0x2fcde9
xorl %eax, %eax
callq 0x92a82
testl %ebp, %ebp
jne 0xd4a6b
leaq 0xbe(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
cmpb $0x1, 0xbe(%rbx)
jne 0xd4a48
leaq 0x2482b1(%rip), %rdi    # 0x31ccf2
xorl %eax, %eax
callq 0x92a82
testl %ebp, %ebp
jne 0xd4a6b
leaq 0xba(%rbx), %r13
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
je 0xd4a7c
movl %eax, %ebp
movl %ebp, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb (%r13), %al
cmpb $0x1, %al
jne 0xd4ad2
leaq 0xb9(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
movzbl 0xb9(%rbx), %eax
leaq 0xb4(%rbx), %rdi
leaq 0x50(%rbx), %rcx
testl %eax, %eax
leaq 0x4(,%rax,4), %rsi
cmovneq %rcx, %rdi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
movb (%r13), %al
testb $0x1, %al
je 0xd4adf
cmpb $0x1, 0xb9(%rbx)
jne 0xd4ae4
movb $0x1, %r13b
jmp 0xd4ae7
xorl %r13d, %r13d
leaq 0x98(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
movl %r13d, (%rsp)
leaq 0x88(%rbx), %r13
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x98(%rbx), %rax
cmpq 0x88(%rbx), %rax
jg 0xd4f67
testl %ebp, %ebp
jne 0xd4a6b
leaq 0x90(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
leaq 0x80(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rdi, 0x10(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x90(%rbx), %rax
cmpq 0x80(%rbx), %rax
jg 0xd4f9f
testl %ebp, %ebp
jne 0xd4a6b
leaq 0xc0(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rdi, 0x18(%rsp)
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
cmpb $0x1, 0xc0(%rbx)
jne 0xd4bce
leaq 0x78(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
testl %eax, %eax
jne 0xd4a6b
movq 0x18(%rsp), %rax
cmpb $0x1, (%rax)
jne 0xd4bfd
movq 0x98(%rbx), %rax
cmpq 0x78(%rbx), %rax
jne 0xd4fcd
cmpq %rax, (%r13)
jne 0xd4ffb
leaq 0xbc(%rbx), %r13
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
movq %r13, 0x28(%rsp)
cmpb $0x1, (%r13)
jne 0xd4c66
leaq 0x70(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x90(%rbx), %rax
cmpq 0x70(%rbx), %rax
jne 0xd502c
movq 0x10(%rsp), %rcx
cmpq %rax, (%rcx)
jne 0xd505d
testl %ebp, %ebp
jne 0xd4a6b
leaq 0xc1(%rbx), %rdi
pushq $0x1
popq %rdx
movq %rdi, 0x10(%rsp)
movq %rdx, %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
leaq 0x48(%rbx), %r13
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
leaq 0x60(%rbx), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rdi, 0x20(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
leaq 0xac(%rbx), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
leaq 0xb0(%rbx), %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0xd4a69
movb $0x0, 0xc2(%rbx)
cmpb $0x1, 0xc1(%rbx)
jne 0xd4d46
movq 0x28(%rsp), %rax
cmpb $0x0, (%rax)
jne 0xd4d81
movq (%r13), %rsi
cmpq $0x400, %rsi            # imm = 0x400
ja 0xd4d81
movb $0x1, 0xc2(%rbx)
leaq 0x2480ee(%rip), %rdi    # 0x31ce26
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x92a82
movb $0x1, %r15b
jmp 0xd4d86
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
jne 0xd4d81
movq 0x20(%rsp), %rax
movq (%rax), %rsi
leaq -0x1(%rsi), %rax
cmpq $0x3ff, %rax            # imm = 0x3FF
ja 0xd4d81
movb $0x1, 0xc2(%rbx)
leaq 0x2480cb(%rip), %rdi    # 0x31ce3d
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x92a82
movb $0x1, %bpl
jmp 0xd4d86
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpb $0x1, 0xc2(%rbx)
jne 0xd4d9d
leaq 0x247f70(%rip), %rdi    # 0x31cd06
xorl %eax, %eax
callq 0x92a82
movq 0x10(%rsp), %rax
cmpb $0x1, (%rax)
jne 0xd4db5
leaq 0x247f65(%rip), %rdi    # 0x31cd13
xorl %eax, %eax
callq 0x92a82
testb %r15b, %r15b
je 0xd4ddc
movq 0x28(%rbx), %rdi
movq 0x48(%rbx), %rsi
leaq 0x30(%rsp), %rdx
movq %r14, %rcx
callq 0xd5517
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0xd4eae
testb %bpl, %bpl
je 0xd4dfa
movq 0x20(%rbx), %rdi
movq 0x60(%rbx), %rsi
leaq 0x30(%rsp), %rdx
movq %r14, %rcx
callq 0xd5517
movq %rax, 0x20(%rbx)
xorl %ebp, %ebp
cmpb $0x0, (%rsp)
jne 0xd4a6b
movq 0x38(%rbx), %rcx
movq %rcx, (%rsp)
testq %rcx, %rcx
je 0xd4eb6
leaq 0x30(%rsp), %r15
andq $0x0, 0x8(%r15)
movq %r14, 0x18(%r15)
andl $0x0, 0x20(%r15)
leaq 0x9b3(%rip), %rsi       # 0xd57e4
movq (%rsp), %rdi
movq %r15, %rdx
callq 0x6dc7c
cmpl $0x0, 0x20(%r15)
jne 0xd4e4e
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rcx
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %r8
callq 0xf3eb0
movl %eax, 0x50(%rsp)
testl %eax, %eax
jne 0xd4f41
leaq 0x30(%rsp), %r14
andq $0x0, 0x8(%r14)
leaq 0x966(%rip), %rsi       # 0xd57e9
movq (%rsp), %rdi
movq %r14, %rdx
callq 0x6dc7c
movq 0x8(%r14), %rax
cmpq 0x8(%rsp), %rax
jne 0xd508e
cmpl $0x0, 0x50(%rsp)
jne 0xd4f41
jmp 0xd4f52
pushq $-0x1
popq %rbp
jmp 0xd4a6b
movq 0x30(%rsp), %r12
callq 0x6d958
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
pushq $0x8
popq %r13
pushq $0x1
popq %rbp
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0xf3eed
xorl %r15d, %r15d
testl %eax, %eax
jne 0xd4f3d
cmpq 0x58(%rsp), %r15
jae 0xd4f3d
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0xf3eed
testl %eax, %eax
jne 0xd4f38
leaq 0x60(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0xf3eed
testl %eax, %eax
jne 0xd4f38
movq 0x8(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq (%rsp), %rdi
callq 0x6d975
xorl %eax, %eax
incq %r15
jmp 0xd4ee4
testl %eax, %eax
je 0xd4f52
movq (%rsp), %rdi
callq 0x6e064
movq $0x0, (%rsp)
movq (%rsp), %rax
movq %rax, 0x38(%rbx)
xorl %ebp, %ebp
cmpq $0x1, %rax
sbbl %ebp, %ebp
jmp 0xd4a6b
movq 0x362ffa(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x21009b(%rip), %rsi    # 0x2e5013
leaq 0x247da6(%rip), %rdx    # 0x31cd25
leaq 0x247dc4(%rip), %rcx    # 0x31cd4a
leaq 0x247ca7(%rip), %r8     # 0x31cc34
movl $0x96, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x362fc2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210063(%rip), %rsi    # 0x2e5013
leaq 0x247daa(%rip), %rdx    # 0x31cd61
leaq 0x247d8c(%rip), %rcx    # 0x31cd4a
leaq 0x247c6f(%rip), %r8     # 0x31cc34
movl $0x9c, %r9d
jmp 0xd4f93
movq 0x362f94(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210035(%rip), %rsi    # 0x2e5013
leaq 0x247da1(%rip), %rdx    # 0x31cd86
leaq 0x247d5e(%rip), %rcx    # 0x31cd4a
leaq 0x247c41(%rip), %r8     # 0x31cc34
movl $0xa6, %r9d
jmp 0xd4f93
movq 0x362f66(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x210007(%rip), %rsi    # 0x2e5013
leaq 0x247d9b(%rip), %rdx    # 0x31cdae
leaq 0x247d30(%rip), %rcx    # 0x31cd4a
leaq 0x247c13(%rip), %r8     # 0x31cc34
movl $0xa7, %r9d
jmp 0xd4f93
movq 0x362f35(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20ffd6(%rip), %rsi    # 0x2e5013
leaq 0x247d92(%rip), %rdx    # 0x31cdd6
leaq 0x247cff(%rip), %rcx    # 0x31cd4a
leaq 0x247be2(%rip), %r8     # 0x31cc34
movl $0xad, %r9d
jmp 0xd4f93
movq 0x362f04(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20ffa5(%rip), %rsi    # 0x2e5013
leaq 0x247d89(%rip), %rdx    # 0x31cdfe
leaq 0x247cce(%rip), %rcx    # 0x31cd4a
leaq 0x247bb1(%rip), %r8     # 0x31cc34
movl $0xae, %r9d
jmp 0xd4f93
movq 0x362ed3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20ff74(%rip), %rsi    # 0x2e5013
leaq 0x247e1d(%rip), %rdx    # 0x31cec3
leaq 0x247e40(%rip), %rcx    # 0x31ceed
leaq 0x247b80(%rip), %r8     # 0x31cc34
movl $0x161, %r9d            # imm = 0x161
jmp 0xd4f93