// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/intset_32.c
// Function: gt_intset_32_io_fp
GtIntset *gt_intset_32_io_fp(GtIntset *intset, FILE *fp, GtError *err,
                                    GtIOFunc io_func)
{
  int had_err = 0;
  GtUword type = (GtUword) GT_INTSET_32_TYPE;
  GtIntset32 *intset_32;
  GtIntsetMembers *members;

  gt_error_check(err);

  intset_32 = gt_intset_32_cast(intset);

  had_err = gt_intset_32_io_one(type);
  if (!had_err && type != GT_INTSET_32_TYPE) {
    /* only applies to reading */
    had_err = 1;
    gt_error_set(err, "Trying to read GtIntset32 from file,"
                 " type does not match!");
  }
  if (!had_err) {
    members = intset->members;
    had_err = gt_intset_32_io_one(members->currentsectionnum);
    if (!had_err)
      had_err = gt_intset_32_io_one(members->maxelement);
    if (!had_err)
      had_err = gt_intset_32_io_one(members->nextfree);
    if (!had_err)
      had_err = gt_intset_32_io_one(members->num_of_elems);
    if (!had_err)
      had_err = gt_intset_32_io_one(members->previouselem);
    if (!had_err) {
      members->logsectionsize = GT_BITS_FOR_TYPE(uint32_t);
      members->numofsections = GT_ELEM2SECTION_M(members->maxelement) + 1;
      members->sectionstart = gt_realloc(members->sectionstart,
                sizeof (*members->sectionstart) * (members->numofsections + 1));
    }
    had_err = io_func(members->sectionstart, sizeof (*members->sectionstart),
                      (size_t) (members->numofsections + 1), fp, err);
    if (!had_err && members->sectionstart[0] != 0) {
      had_err = 1;
      gt_error_set(err, "Unexpected value in sectionstart[0]: "
                   GT_WU " expected 0!", members->sectionstart[0]);
    }
  }
  if (!had_err) {
    intset_32->elements = gt_realloc(intset_32->elements,
                  sizeof (*intset_32->elements) * members->num_of_elems);
    had_err = io_func(intset_32->elements,
                      sizeof (*intset_32->elements),
                      (size_t) members->num_of_elems, fp, err);
  }
  if (had_err) {
    gt_intset_32_delete(intset);
    intset = NULL;
  }
  return intset;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq $0x20, (%rsp)
testq %rdx, %rdx
je 0x29da7b
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x29dc0b
callq 0x29d9c5
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf3576
movq %rax, %r13
movq %rsp, %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29dac1
cmpq $0x20, (%rsp)
je 0x29dac1
leaq 0xe1011(%rip), %rsi     # 0x37eac3
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x29dbef
testl %eax, %eax
jne 0x29dbef
movq 0x8(%rbx), %rbp
leaq 0x10(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29db7d
leaq 0x18(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29db7d
leaq 0x20(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29db7d
leaq 0x28(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29db7d
leaq 0x38(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29db7d
movq $0x20, 0x8(%rbp)
movq (%rbp), %rdi
movq 0x18(%rbp), %rax
shrq $0x20, %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x30(%rbp)
leaq 0x10(,%rax,8), %rsi
leaq 0xe0f28(%rip), %rdx     # 0x37ea97
movl $0x9a, %ecx
callq 0x93472
movq %rax, (%rbp)
movq (%rbp), %rdi
movq 0x30(%rbp), %rdx
incq %rdx
pushq $0x8
popq %rsi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
jne 0x29dbef
movq (%rbp), %rax
movq (%rax), %rdx
testq %rdx, %rdx
je 0x29dbb7
leaq 0xe091b(%rip), %rsi     # 0x37e4c6
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x29dbef
movq 0x10(%r13), %rdi
movq 0x28(%rbp), %rsi
shlq $0x2, %rsi
leaq 0xe0ecd(%rip), %rdx     # 0x37ea97
movl $0xa6, %ecx
callq 0x93472
movq %rax, 0x10(%r13)
movq 0x28(%rbp), %rdx
pushq $0x4
popq %rsi
movq %rax, %rdi
movq %r12, %rcx
movq %r14, %r8
callq *%r15
testl %eax, %eax
je 0x29dbf9
movq %rbx, %rdi
callq 0x29dc43
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x19a356(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x473f7(%rip), %rsi     # 0x2e5013
leaq 0x4759c(%rip), %rdx     # 0x2e51bf
leaq 0xe0e86(%rip), %rcx     # 0x37eab0
leaq 0xe0e66(%rip), %r8      # 0x37ea97
movl $0x80, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390