// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movq $0x20, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x494dc9
movq 0x30(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x494d91
jmp 0x494dc9
movq 0x1a7208(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x81271(%rip), %rsi     # 0x516013
leaq 0x81416(%rip), %rdx     # 0x5161bf
leaq 0x11edab(%rip), %rcx    # 0x5b3b5b
leaq 0x11ed8b(%rip), %r8     # 0x5b3b42
movl $0x80, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x494dcb
callq 0x494cb0
movq %rax, %rdi
movq 0x40(%rsp), %rsi
callq 0x1968d0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
leaq 0x18(%rsp), %rdi
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494e30
cmpq $0x20, 0x18(%rsp)
je 0x494e30
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x11ed45(%rip), %rsi    # 0x5b3b6e
movb $0x0, %al
callq 0xd88c0
cmpl $0x0, 0x24(%rsp)
jne 0x495007
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdi
addq $0x10, %rdi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494ea0
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdi
addq $0x18, %rdi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494ecf
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdi
addq $0x20, %rdi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494efe
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdi
addq $0x28, %rdi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494f2d
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rdi
addq $0x38, %rdi
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
movl $0x1, %edx
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x494f9b
movq 0x8(%rsp), %rax
movq $0x20, 0x8(%rax)
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shrq %cl, %rax
movq %rax, %rcx
addq $0x1, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x30(%rax), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
leaq 0x11ebbc(%rip), %rdx    # 0x5b3b42
movl $0x9a, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rcx), %rdi
movq 0x8(%rsp), %rcx
movq 0x30(%rcx), %rdx
addq $0x1, %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x8, %esi
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jne 0x495005
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x495005
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rdx
leaq 0x11e504(%rip), %rsi    # 0x5b3502
movb $0x0, %al
callq 0xd88c0
jmp 0x495007
cmpl $0x0, 0x24(%rsp)
jne 0x49506d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x2, %rsi
leaq 0x11eb17(%rip), %rdx    # 0x5b3b42
movl $0xa6, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x10(%rcx), %rdi
movq 0x8(%rsp), %rcx
movq 0x28(%rcx), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x4, %esi
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x495087
movq 0x40(%rsp), %rdi
callq 0x4950a0
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)