// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/intset_8.c
// Function: gt_intset_8_io_fp
GtIntset *gt_intset_8_io_fp(GtIntset *intset, FILE *fp, GtError *err,
                                    GtIOFunc io_func)
{
  int had_err = 0;
  GtUword type = (GtUword) GT_INTSET_8_TYPE;
  GtIntset8 *intset_8;
  GtIntsetMembers *members;

  gt_error_check(err);

  intset_8 = gt_intset_8_cast(intset);

  had_err = gt_intset_8_io_one(type);
  if (!had_err && type != GT_INTSET_8_TYPE) {
    /* only applies to reading */
    had_err = 1;
    gt_error_set(err, "Trying to read GtIntset8 from file,"
                 " type does not match!");
  }
  if (!had_err) {
    members = intset->members;
    had_err = gt_intset_8_io_one(members->currentsectionnum);
    if (!had_err)
      had_err = gt_intset_8_io_one(members->maxelement);
    if (!had_err)
      had_err = gt_intset_8_io_one(members->nextfree);
    if (!had_err)
      had_err = gt_intset_8_io_one(members->num_of_elems);
    if (!had_err)
      had_err = gt_intset_8_io_one(members->previouselem);
    if (!had_err) {
      members->logsectionsize = GT_BITS_FOR_TYPE(uint8_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_8->elements = gt_realloc(intset_8->elements,
                  sizeof (*intset_8->elements) * members->num_of_elems);
    had_err = io_func(intset_8->elements,
                      sizeof (*intset_8->elements),
                      (size_t) members->num_of_elems, fp, err);
  }
  if (had_err) {
    gt_intset_8_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 $0x8, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x496e89
movq 0x30(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x496e51
jmp 0x496e89
movq 0x1a5148(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x7f1b1(%rip), %rsi     # 0x516013
leaq 0x7f356(%rip), %rdx     # 0x5161bf
leaq 0x11d16d(%rip), %rcx    # 0x5b3fdd
leaq 0x11d14e(%rip), %r8     # 0x5b3fc5
movl $0x80, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x496e8b
callq 0x496d70
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 0x496ef0
cmpq $0x8, 0x18(%rsp)
je 0x496ef0
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x11d106(%rip), %rsi    # 0x5b3fef
movb $0x0, %al
callq 0xd88c0
cmpl $0x0, 0x24(%rsp)
jne 0x4970c7
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 0x496f60
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 0x496f8f
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 0x496fbe
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 0x496fed
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 0x49705b
movq 0x8(%rsp), %rax
movq $0x8, 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 0x11cf7f(%rip), %rdx    # 0x5b3fc5
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 0x4970c5
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x4970c5
movl $0x1, 0x24(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rdx
leaq 0x11c444(%rip), %rsi    # 0x5b3502
movb $0x0, %al
callq 0xd88c0
jmp 0x4970c7
cmpl $0x0, 0x24(%rsp)
jne 0x49712d
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x0, %rsi
leaq 0x11ceda(%rip), %rdx    # 0x5b3fc5
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 $0x1, %esi
callq *%rax
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x497147
movq 0x40(%rsp), %rdi
callq 0x497160
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)