// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/condenseq.c
// Function: gt_condenseq_new_from_file
GtCondenseq *gt_condenseq_new_from_file(const char *indexname,
                                        GtLogger *logger, GtError *err)
{
  int had_err = 0;
  FILE* fp;
  GtEncseqLoader *esl;
  GtEncseq *unique_es;
  GtCondenseq *condenseq = NULL;
  /*load unique_es*/
  esl = gt_encseq_loader_new();
  gt_encseq_loader_disable_autosupport(esl);
  gt_encseq_loader_drop_md5_support(esl);
  gt_encseq_loader_require_ssp_tab(esl);
  unique_es = gt_encseq_loader_load(esl, indexname, err);
  if (!unique_es)
    had_err = -1;
  if (!had_err) {
    gt_encseq_loader_delete(esl);
    condenseq = condenseq_new_empty(gt_encseq_alphabet(unique_es));
    condenseq->filename = gt_cstr_dup(indexname);
    condenseq->unique_es = unique_es;
    fp = gt_fa_fopen_with_suffix(indexname, GT_CONDENSEQ_FILE_SUFFIX,
                                 "rb", err);
    if (fp == NULL) {
      had_err = -1;
    }
    else {
      had_err = condenseq_io(condenseq, fp, gt_io_error_fread, err);
      if (!had_err) {
        GtUword i;
        gt_assert(condenseq->uniques);
        gt_assert(condenseq->links);
        gt_fa_fclose(fp);
        /*create link array for each unique entry*/
        for (i = 0; i < condenseq->uds_nelems; i++) {
          GT_INITARRAY(&(condenseq->uniques[i].links),uint32_t);
        }
        /* check for overflows */
        if (condenseq->lds_nelems > (GtUword) ((uint32_t) 0 - (uint32_t) 1)) {
          gt_error_set(err, "Overflow, to many link-elements. Can't be stored");
          had_err = -1;
        }
        /* iterate through link entrys and store ids in corresponding unique
          entry array */
        for (i = 0; !had_err && (GtUword) i < condenseq->lds_nelems; i++) {
          GtUword uid = condenseq->links[i].unique_id;
          gt_assert(uid < condenseq->uds_nelems);
          GT_STOREINARRAY(&(condenseq->uniques[uid].links),
                          uint32_t,
                          10,
                          (uint32_t) i);
        }
      }
    }
  }
  if (!had_err) {
    gt_assert(condenseq != NULL);
    if (condenseq->id_len != GT_UNDEF_UWORD)
      gt_logger_log(logger, "IDs const len: " GT_WU, condenseq->id_len);
    else
      gt_logger_log(logger, "using sdstab to access IDs");
  }
  if (had_err) {
    gt_condenseq_delete(condenseq);
    condenseq = NULL;
  }
  return (condenseq);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0xef0cd
movq %rax, %rbx
movq %rax, %rdi
callq 0xf238b
movq %rbx, %rdi
callq 0xf22da
movq %rbx, %rdi
callq 0xf23c9
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xef129
testq %rax, %rax
je 0x12ca60
movq %rax, %r13
movq %r14, 0x30(%rsp)
movq %rbx, %rdi
callq 0xefbe3
movq %r13, %rdi
callq 0xebcd9
movq %rax, %r14
leaq 0x24c2cb(%rip), %rbp    # 0x378c26
movl $0xa0, %edi
movq %rbp, %rsi
movl $0xdf, %edx
callq 0x104226
movq %rax, %rbx
movq %r14, %rdi
callq 0xd0a3f
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movq $0x0, 0x98(%rbx)
movq $-0x1, 0x58(%rbx)
movups %xmm0, 0x8(%rbx)
movups %xmm0, 0x18(%rbx)
movups %xmm0, 0x28(%rbx)
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
movq %r12, %rdi
callq 0xe4290
movq %rax, 0x40(%rbx)
movq %r13, 0x18(%rbx)
leaq 0x24c5b5(%rip), %rsi    # 0x378f80
leaq 0x278d4b(%rip), %rdx    # 0x3a571d
movq %r12, %rdi
movq %rbp, %rcx
movl $0x228, %r8d            # imm = 0x228
movq %r15, %r9
callq 0xfcf97
testq %rax, %rax
je 0x12ca62
movq %rax, %r13
movl $0x1, 0x2c(%rsp)
leaq 0x78(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rax, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq 0x2c(%rsp), %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
sete %cl
movl (%r14), %edx
cmpl $0x1, %edx
setne %sil
andb %cl, %sil
cmpb $0x1, %sil
jne 0x12ca7e
leaq 0x24ca31(%rip), %rsi    # 0x379480
movq %r15, %rdi
movl $0x1, %ecx
xorl %eax, %eax
callq 0xfcb67
jmp 0x12ca62
xorl %ebx, %ebx
movq %rbx, %rdi
callq 0x12c3a7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x12ca62
leaq 0x80(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rdi, 0x40(%rsp)
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq 0x70(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rdi, 0x8(%rsp)
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq 0x8(%rbx), %rbp
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x12cae6
leaq 0x24c9e9(%rip), %rdi    # 0x3794c8
xorl %eax, %eax
callq 0x11f68c
cmpq $0x0, (%rbp)
jne 0x12cb1b
leaq 0x68(%rbx), %r14
movq 0x8(%rsp), %r12
movq (%r12), %rdi
leaq 0x24c125(%rip), %rdx    # 0x378c26
movl $0x20, %esi
movl $0x1d9, %ecx            # imm = 0x1D9
callq 0x10436a
movq %rax, (%rbp)
movq (%r12), %rax
movq %rax, (%r14)
movq %rbp, 0x20(%rsp)
leaq 0x98(%rbx), %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %rdi, 0x10(%rsp)
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
movq 0x10(%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x12cf2c
cmpq $0x0, 0x10(%rbx)
jne 0x12cb8c
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
leaq 0x24c0b6(%rip), %rsi    # 0x378c26
movl $0x1e5, %edx            # imm = 0x1E5
callq 0x104226
movq %rax, 0x10(%rbx)
movq 0x98(%rbx), %rax
movq %rax, 0x90(%rbx)
leaq 0x58(%rbx), %rax
movq %rax, 0x18(%rsp)
movl $0x10, %r14d
movq $-0x1, %r12
incq %r12
movq 0x8(%rsp), %rax
cmpq (%rax), %r12
jae 0x12cc85
movq 0x20(%rsp), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x12cf22
leaq (%r14,%rbp), %rdi
addq $-0x8, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq (%r14,%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq (%r14,%rbp), %rdi
addq $0x4, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq (%r14,%rbp), %rdi
addq $0x8, %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
leaq 0x20(%r14), %rax
movq %rax, 0x38(%rsp)
movq -0x10(%rbp,%r14), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x138e05
movq %rax, -0x10(%rbp,%r14)
movq 0x38(%rsp), %r14
testq %rax, %rax
jne 0x12cba2
jmp 0x12ca62
movl $0x20, %r14d
movq $-0x1, %rbp
incq %rbp
movq 0x10(%rsp), %rax
cmpq (%rax), %rbp
jae 0x12ccf9
movq 0x10(%rbx), %r12
testq %r12, %r12
je 0x12cf27
leaq (%r12,%r14), %rdi
addq $-0x8, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
addq %r14, %r12
addq $0x28, %r14
movl $0x4, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
je 0x12cc92
jmp 0x12ca62
movq 0x40(%rsp), %rax
cmpq $0x2, (%rax)
jb 0x12cd20
movq 0x28(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x156b5b
movq %rax, 0x28(%rbx)
testq %rax, %rax
je 0x12ca62
movl $0x8, %esi
movl $0x1, %edx
movq 0x18(%rsp), %rdi
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
movq 0x18(%rsp), %rax
cmpq $-0x1, (%rax)
jne 0x12cd69
movq 0x20(%rbx), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x156b5b
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x12ca62
movq %rbx, %rdi
addq $0x60, %rdi
movl $0x8, %esi
movl $0x1, %edx
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
movq 0x48(%rbx), %rdi
movq 0x60(%rbx), %rsi
leaq 0x24be8a(%rip), %rdx    # 0x378c26
movl $0x204, %ecx            # imm = 0x204
callq 0x104461
movq %rax, 0x48(%rbx)
movq 0x60(%rbx), %rdx
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rcx
movq %r15, %r8
callq 0x156d03
testl %eax, %eax
jne 0x12ca62
cmpq $0x0, 0x10(%rbx)
je 0x12cf3b
movq 0x20(%rsp), %rax
cmpq $0x0, (%rax)
je 0x12cf40
movq %r13, %rdi
callq 0xfd018
movq 0x10(%rsp), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x12ce13
movq 0x10(%rbx), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq $0x0, 0x10(%rcx)
addq $0x28, %rcx
decq %rax
jne 0x12cdff
movq 0x8(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x12cef4
movq 0x8(%rsp), %rax
cmpq $0x0, (%rax)
je 0x12cece
movl $0x14, %r14d
xorl %r12d, %r12d
leaq 0x24bde5(%rip), %r15    # 0x378c26
movq 0x20(%rsp), %rax
movq (%rax), %rax
movl (%rax,%r14), %eax
movq 0x10(%rsp), %rcx
cmpq %rax, (%rcx)
jbe 0x12cf31
movq 0x10(%rbx), %rcx
leaq (%rax,%rax,4), %r13
leaq (%rcx,%r13,8), %rax
movq 0x8(%rax), %rdx
cmpq %rdx, 0x10(%rax)
jae 0x12ce76
movq (%rax), %rax
jmp 0x12ce9e
leaq 0xa(%rdx), %rcx
movq %rcx, 0x8(%rax)
movq (%rax), %rdi
leaq 0x28(,%rdx,4), %rsi
movq %r15, %rdx
movl $0x244, %ecx            # imm = 0x244
callq 0x104461
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r13,8)
testq %rax, %rax
je 0x12cf36
movq 0x10(%rcx,%r13,8), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx,%r13,8)
movl %r12d, (%rax,%rdx,4)
incq %r12
addq $0x20, %r14
movq 0x8(%rsp), %rax
cmpq (%rax), %r12
jb 0x12ce41
movq 0x18(%rsp), %rax
movq (%rax), %rdx
cmpq $-0x1, %rdx
je 0x12cf0a
leaq 0x24c168(%rip), %rsi    # 0x37904b
movq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0x12ca6c
leaq 0x24c0c9(%rip), %rsi    # 0x378fc4
movq %r15, %rdi
xorl %eax, %eax
callq 0xfcb67
jmp 0x12ca62
leaq 0x24c14d(%rip), %rsi    # 0x37905e
movq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x103fe1
jmp 0x12ca6c
callq 0x3d300
callq 0x3d2c7
callq 0x3d339
callq 0x3d1e3
callq 0x3d21c
callq 0x3d28e
callq 0x3d255