// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/condenseq.c
// Function: condenseq_io
static int condenseq_io(GtCondenseq *condenseq,
                        FILE* fp,
                        GtIOFunc io_func,
                        GtError *err)
{
  int had_err = 0;
  int file_format = GT_CONDENSEQ_VERSION;
  GtUword idx;
  had_err = gt_condenseq_io_one(condenseq->orig_len);
  if (!had_err)
    had_err = gt_condenseq_io_one(file_format);
  if (!had_err && file_format != GT_CONDENSEQ_VERSION) {
    gt_error_set(err, "condenseq index is format version %d, current is "
                 "%d -- please re-encode",
                 file_format, GT_CONDENSEQ_VERSION);
    had_err = -1;
  }
  if (!had_err)
    had_err = gt_condenseq_io_one(condenseq->orig_num_seq);
  if (!had_err)
    had_err = gt_condenseq_io_one(condenseq->lds_nelems);
  if (!had_err) {
    if (condenseq->lds_nelems == 0) {
      gt_warning("compression of condenseq did not succeed in finding any "
                 "compressable similarities, maybe the input is to small or "
                 "the chosen parameters should be reconsidered.");
    }
    if (condenseq->links == NULL) {
      condenseq->links = gt_calloc((size_t) condenseq->lds_nelems,
                                   sizeof (*condenseq->links));
      condenseq->lds_allocated = condenseq->lds_nelems;
    }

    had_err = gt_condenseq_io_one(condenseq->uds_nelems);
  }

  if (!had_err) {
    gt_assert(condenseq->uds_nelems > 0);

    if (condenseq->uniques == NULL) {
      condenseq->uniques = gt_malloc(sizeof (*condenseq->uniques) *
                                     condenseq->uds_nelems );
      condenseq->uds_allocated = condenseq->uds_nelems;
    }
  }

  for (idx = 0; !had_err && idx < condenseq->lds_nelems; idx++) {
    had_err = condenseq_linkentry_io(&condenseq->links[idx], fp, io_func, err);
  }

  for (idx = 0; !had_err && idx < condenseq->uds_nelems; idx++) {
    had_err = condenseq_uniqueentry_io(&condenseq->uniques[idx], fp, io_func,
                                       err);
  }
  if (!had_err && condenseq->orig_num_seq > (GtUword) 1) {
    condenseq->ssptab = gt_intset_io(condenseq->ssptab, fp, err);
    if (condenseq->ssptab == NULL)
      had_err = 1;
  }
  if (!had_err)
    had_err = gt_condenseq_io_one(condenseq->id_len);
  if (!had_err) {
    if (condenseq->id_len == GT_UNDEF_UWORD) {
      condenseq->sdstab = gt_intset_io(condenseq->sdstab, fp, err);
      if (condenseq->sdstab == NULL)
        had_err = 1;
    }
  }
  if (!had_err)
    had_err = gt_condenseq_io_one(condenseq->ids_total_len);
  if (!had_err) {
    condenseq->orig_ids = gt_realloc(condenseq->orig_ids,
                                     (size_t) condenseq->ids_total_len);
    had_err = io_func(condenseq->orig_ids, sizeof (*condenseq->orig_ids),
                      (size_t) condenseq->ids_total_len, fp, err);
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
movl $0x1, 0x24(%rsp)
leaq 0x78(%rdi), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
movq %r14, %r8
callq *%r12
testl %eax, %eax
movq %r14, 0x18(%rsp)
movq %r12, 0x28(%rsp)
je 0xc1ccf
movl %eax, %esi
jmp 0xc1d1d
leaq 0x24(%rsp), %rbx
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
callq *%r12
movl %eax, %esi
movl (%rbx), %edx
testl %eax, %eax
sete %al
cmpl $0x1, %edx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xc1d15
leaq 0x257acb(%rip), %rsi    # 0x3197ce
pushq $0x1
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rsi
jmp 0xc1d1d
testl %esi, %esi
je 0xc1f89
pushq $0x10
popq %r9
xorl %ebx, %ebx
pushq $0x1
popq %rbp
pushq $0x4
popq %r12
movq %r15, 0x8(%rsp)
movq %r13, 0x30(%rsp)
testl %esi, %esi
jne 0xc1e3f
cmpq 0x70(%r13), %rbx
jae 0xc1e3f
movq 0x8(%r13), %r14
testq %r14, %r14
je 0xc206c
leaq (%r14,%r9), %rdi
addq $-0x8, %rdi
pushq $0x8
popq %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq 0x18(%rsp), %r15
movq %r15, %r8
movq %r9, 0x10(%rsp)
movq 0x28(%rsp), %r13
callq *%r13
testl %eax, %eax
je 0xc1d86
movl %eax, %esi
movq 0x10(%rsp), %r9
jmp 0xc1dd1
movq 0x10(%rsp), %rax
leaq (%r14,%rax), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq 0x8(%rsp), %rcx
movq %r15, %r8
callq *%r13
testl %eax, %eax
jne 0xc1dc6
movq 0x10(%rsp), %rax
leaq (%r14,%rax), %rdi
addq $0x4, %rdi
pushq $0x4
popq %rsi
movq %rbp, %rdx
movq 0x8(%rsp), %rcx
movq %r15, %r8
callq *%r13
testl %eax, %eax
je 0xc1de7
movl %eax, %esi
movq 0x10(%rsp), %r9
pushq $0x4
popq %r12
incq %rbx
addq $0x20, %r9
movq 0x8(%rsp), %r15
movq 0x30(%rsp), %r13
jmp 0xc1d34
movq 0x10(%rsp), %rax
leaq (%r14,%rax), %rdi
addq $0x8, %rdi
pushq $0x4
popq %rsi
movq %rbp, %rdx
movq 0x8(%rsp), %rcx
movq %r15, %r8
callq *%r13
testl %eax, %eax
je 0xc1e12
movl %eax, %esi
movq 0x10(%rsp), %r9
jmp 0xc1e3a
movq 0x10(%rsp), %r13
movq -0x10(%r14,%r13), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rdx
callq 0xcf95d
movq %rax, -0x10(%r14,%r13)
xorl %esi, %esi
testq %rax, %rax
sete %sil
movq %r13, %r9
pushq $0x1
popq %rbp
jmp 0xc1dd1
movq 0x28(%rsp), %r12
pushq $0x20
popq %r14
xorl %r15d, %r15d
pushq $0x8
popq %rbp
testl %esi, %esi
jne 0xc1f74
cmpq 0x98(%r13), %r15
jae 0xc1eb1
movq 0x10(%r13), %rbx
testq %rbx, %rbx
je 0xc209a
leaq (%rbx,%r14), %rdi
addq $-0x8, %rdi
movq %rbp, %rsi
pushq $0x1
popq %rdx
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %r8
callq *%r12
movl %eax, %esi
testl %eax, %eax
jne 0xc1ea8
addq %r14, %rbx
movq %rbx, %rdi
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %r8
callq *%r12
movl %eax, %esi
incq %r15
addq $0x28, %r14
jmp 0xc1e4e
cmpq $0x2, 0x80(%r13)
pushq $0x1
popq %rbp
movq 0x8(%rsp), %r14
jb 0xc1ee1
movq 0x28(%r13), %rdi
movq %r14, %rsi
movq 0x18(%rsp), %rdx
callq 0xf3cc7
movq %rax, 0x28(%r13)
testq %rax, %rax
je 0xc1f85
leaq 0x58(%r13), %rbx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rcx
movq 0x18(%rsp), %r8
callq *%r12
testl %eax, %eax
jne 0xc1f72
cmpq $-0x1, (%rbx)
jne 0xc1f21
movq 0x20(%r13), %rdi
movq 0x8(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xf3cc7
movl %ebp, %esi
movq %rax, 0x20(%r13)
testq %rax, %rax
je 0xc1f74
leaq 0x60(%r13), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq 0x8(%rsp), %r14
movq %r14, %rcx
movq 0x18(%rsp), %rbx
movq %rbx, %r8
callq *%r12
testl %eax, %eax
jne 0xc1f72
movq 0x48(%r13), %rdi
movq 0x60(%r13), %rsi
leaq 0x257023(%rip), %rdx    # 0x318f74
movl $0x204, %ecx            # imm = 0x204
callq 0x93472
movq %rax, 0x48(%r13)
movq 0x60(%r13), %rdx
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r14, %rcx
movq %rbx, %r8
callq *%r12
movl %eax, %esi
movl %esi, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %esi
jmp 0xc1f74
leaq 0x80(%r13), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
movq %r14, %r8
callq *%r12
testl %eax, %eax
jne 0xc1ccb
leaq 0x70(%r13), %rbx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
callq *%r12
testl %eax, %eax
jne 0xc1ccb
cmpq $0x0, (%rbx)
jne 0xc1fd9
leaq 0x257844(%rip), %rdi    # 0x319816
xorl %eax, %eax
callq 0xb2cd0
cmpq $0x0, 0x8(%r13)
jne 0xc2004
movq 0x70(%r13), %rdi
leaq 0x256f89(%rip), %rdx    # 0x318f74
pushq $0x20
popq %rsi
movl $0x1d9, %ecx            # imm = 0x1D9
callq 0x9334a
movq %rax, 0x8(%r13)
movq 0x70(%r13), %rax
movq %rax, 0x68(%r13)
leaq 0x98(%r13), %rbx
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rcx
movq %r14, %r8
callq *%r12
testl %eax, %eax
jne 0xc1ccb
movq (%rbx), %rax
testq %rax, %rax
je 0xc20d2
xorl %esi, %esi
cmpq $0x0, 0x10(%r13)
jne 0xc1d1d
imulq $0x28, %rax, %rdi
leaq 0x256f2b(%rip), %rsi    # 0x318f74
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x93160
xorl %esi, %esi
movq %rax, 0x10(%r13)
movq 0x98(%r13), %rax
movq %rax, 0x90(%r13)
jmp 0xc1d1d
movq 0x375ef5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222f96(%rip), %rsi    # 0x2e5013
leaq 0x2574de(%rip), %rdx    # 0x319562
leaq 0x257838(%rip), %rcx    # 0x3198c3
leaq 0x256ee2(%rip), %r8     # 0x318f74
movl $0x19d, %r9d            # imm = 0x19D
jmp 0xc20c6
movq 0x375ec7(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222f68(%rip), %rsi    # 0x2e5013
leaq 0x257828(%rip), %rdx    # 0x3198da
leaq 0x257830(%rip), %rcx    # 0x3198e9
leaq 0x256eb4(%rip), %r8     # 0x318f74
movl $0x1b5, %r9d            # imm = 0x1B5
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x375e8f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222f30(%rip), %rsi    # 0x2e5013
leaq 0x257309(%rip), %rdx    # 0x3193f3
leaq 0x2577c5(%rip), %rcx    # 0x3198b6
leaq 0x256e7c(%rip), %r8     # 0x318f74
movl $0x1e1, %r9d            # imm = 0x1E1
jmp 0xc20c6