// File: /workspace/github_c_makefile_star2_O3/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, 0x38(%rsp)
addq $0xbd, %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
cmpb $0x1, 0xbd(%rbx)
jne 0x13dee2
leaq 0x21efb8(%rip), %rdi    # 0x35ce93
xorl %eax, %eax
callq 0x103d72
testl %ebp, %ebp
jne 0x13df40
leaq 0xbe(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
cmpb $0x1, 0xbe(%rbx)
jne 0x13df19
leaq 0x23e9d5(%rip), %rdi    # 0x37c8e7
xorl %eax, %eax
callq 0x103d72
testl %ebp, %ebp
jne 0x13df40
leaq 0xba(%rbx), %r13
movl $0x1, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
je 0x13df51
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 0x13dfad
leaq 0xb9(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
movzbl 0xb9(%rbx), %eax
leaq 0xb4(%rbx), %rdi
leaq 0x50(%rbx), %rcx
testl %eax, %eax
leaq 0x4(,%rax,4), %rsi
cmovneq %rcx, %rdi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
movb (%r13), %al
testb $0x1, %al
je 0x13dfba
cmpb $0x1, 0xb9(%rbx)
jne 0x13dfbf
movb $0x1, %r13b
jmp 0x13dfc2
xorl %r13d, %r13d
leaq 0x98(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
movl %r13d, 0x14(%rsp)
leaq 0x88(%rbx), %r13
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x98(%rbx), %rax
cmpq 0x88(%rbx), %rax
jg 0x13e480
testl %ebp, %ebp
jne 0x13df40
leaq 0x90(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
leaq 0x80(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rdi, 0x8(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x90(%rbx), %rax
cmpq 0x80(%rbx), %rax
jg 0x13e485
testl %ebp, %ebp
jne 0x13df40
leaq 0xc0(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rdi, 0x18(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
cmpb $0x1, 0xc0(%rbx)
jne 0x13e0c2
leaq 0x78(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
testl %eax, %eax
jne 0x13df40
movq 0x18(%rsp), %rax
cmpb $0x1, (%rax)
jne 0x13e0f1
movq 0x98(%rbx), %rax
cmpq 0x78(%rbx), %rax
jne 0x13e48a
cmpq %rax, (%r13)
jne 0x13e48f
leaq 0xbc(%rbx), %r13
movl $0x1, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
movq %r13, 0x30(%rsp)
cmpb $0x1, (%r13)
jne 0x13e162
leaq 0x70(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
movl %eax, %ebp
movq 0x90(%rbx), %rax
cmpq 0x70(%rbx), %rax
jne 0x13e494
movq 0x8(%rsp), %rcx
cmpq %rax, (%rcx)
jne 0x13e499
testl %ebp, %ebp
jne 0x13df40
leaq 0xc1(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rdi, 0x8(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
leaq 0x48(%rbx), %r13
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
leaq 0x60(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rdi, 0x28(%rsp)
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
leaq 0xac(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
leaq 0xb0(%rbx), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x13df3e
movb $0x0, 0xc2(%rbx)
cmpb $0x1, 0xc1(%rbx)
jne 0x13e256
movq 0x30(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x13e291
movq (%r13), %rsi
cmpq $0x400, %rsi            # imm = 0x400
ja 0x13e291
movb $0x1, 0xc2(%rbx)
leaq 0x23e7d3(%rip), %rdi    # 0x37ca1b
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x103d72
movb $0x1, %r15b
jmp 0x13e296
movq 0x18(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x13e291
movq 0x28(%rsp), %rax
movq (%rax), %rsi
leaq -0x1(%rsi), %rax
cmpq $0x3ff, %rax            # imm = 0x3FF
ja 0x13e291
movb $0x1, 0xc2(%rbx)
leaq 0x23e7b0(%rip), %rdi    # 0x37ca32
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x103d72
movb $0x1, %bpl
jmp 0x13e296
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpb $0x1, 0xc2(%rbx)
jne 0x13e2ad
leaq 0x23e655(%rip), %rdi    # 0x37c8fb
xorl %eax, %eax
callq 0x103d72
movq 0x8(%rsp), %rax
cmpb $0x1, (%rax)
jne 0x13e2c5
leaq 0x23e64a(%rip), %rdi    # 0x37c908
xorl %eax, %eax
callq 0x103d72
testb %r15b, %r15b
je 0x13e2ec
movq 0x28(%rbx), %rdi
movq 0x48(%rbx), %rsi
leaq 0x38(%rsp), %rdx
movq %r14, %rcx
callq 0x13e9e5
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x13e3c6
testb %bpl, %bpl
je 0x13e30a
movq 0x20(%rbx), %rdi
movq 0x60(%rbx), %rsi
leaq 0x38(%rsp), %rdx
movq %r14, %rcx
callq 0x13e9e5
movq %rax, 0x20(%rbx)
xorl %ebp, %ebp
cmpb $0x0, 0x14(%rsp)
jne 0x13df40
movq 0x38(%rbx), %r15
testq %r15, %r15
je 0x13e3d0
leaq 0x38(%rsp), %r12
movq $0x0, 0x8(%r12)
movq %r14, 0x18(%r12)
movl $0x0, 0x20(%r12)
leaq 0x896(%rip), %rsi       # 0x13ebdd
movq %r15, %rdi
movq %r12, %rdx
callq 0xe56e5
cmpl $0x0, 0x20(%r12)
jne 0x13e363
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rcx
movq %rsp, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %r8
callq 0x156cc4
movl %eax, 0x58(%rsp)
testl %eax, %eax
jne 0x13e464
leaq 0x38(%rsp), %r14
movq $0x0, 0x8(%r14)
leaq 0x845(%rip), %rsi       # 0x13ebe2
movq %r15, %rdi
movq %r14, %rdx
callq 0xe56e5
movq 0x8(%r14), %rax
cmpq (%rsp), %rax
jne 0x13e49e
cmpl $0x0, 0x58(%rsp)
jne 0x13e464
jmp 0x13e46f
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x13df40
movq 0x38(%rsp), %r12
callq 0xe54e0
movq %rax, %r15
leaq 0x20(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r12, %rcx
movq %r14, %r8
callq 0x156d03
testl %eax, %eax
jne 0x13e460
cmpq $0x0, 0x20(%rsp)
je 0x13e460
xorl %r13d, %r13d
leaq 0x60(%rsp), %rbp
movl $0x8, %esi
movl $0x1, %edx
movq %rsp, %rdi
movq %r12, %rcx
movq %r14, %r8
callq 0x156d03
testl %eax, %eax
jne 0x13e464
movl $0x8, %esi
movl $0x1, %edx
movq %rbp, %rdi
movq %r12, %rcx
movq %r14, %r8
callq 0x156d03
testl %eax, %eax
jne 0x13e464
movq (%rsp), %rsi
movq 0x60(%rsp), %rdx
movq %r15, %rdi
callq 0xe5505
incq %r13
cmpq 0x20(%rsp), %r13
jb 0x13e40b
jmp 0x13e46f
testl %eax, %eax
je 0x13e46f
movq %r15, %rdi
callq 0xe5a93
xorl %r15d, %r15d
movq %r15, 0x38(%rbx)
xorl %ebp, %ebp
cmpq $0x1, %r15
sbbl %ebp, %ebp
jmp 0x13df40
callq 0x411c5
callq 0x4118c
callq 0x4106f
callq 0x410a8
callq 0x410e1
callq 0x4111a
callq 0x41153