// File: /workspace/github_c_makefile_star2_O2/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
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x791cd
movq %rax, %rbx
movq %rax, %rdi
callq 0x7d046
movq %rbx, %rdi
callq 0x7cec9
movq %rbx, %rdi
callq 0x7d150
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x7921d
testq %rax, %rax
je 0xc2204
movq %rax, %r13
movq %rbx, %rdi
callq 0x79f01
movq %r13, %rdi
callq 0x754dd
movq %rax, %rdi
callq 0xc16d1
movq %rax, %rbx
movq %r12, %rdi
callq 0x6c2be
movq %rax, 0x40(%rbx)
movq %r13, 0x18(%rbx)
leaq 0x25714e(%rip), %rsi    # 0x3192ce
leaq 0x283916(%rip), %rdx    # 0x345a9d
leaq 0x256de6(%rip), %rcx    # 0x318f74
movq %r12, %rdi
movl $0x228, %r8d            # imm = 0x228
movq %r15, %r9
callq 0x8a449
testq %rax, %rax
je 0xc2206
movq %rax, %r12
leaq 0x31d3f(%rip), %rdx     # 0xf3eed
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0xc1c88
testl %eax, %eax
jne 0xc2206
cmpq $0x0, 0x10(%rbx)
je 0xc2381
cmpq $0x0, 0x8(%rbx)
je 0xc23af
movq %r12, %rdi
callq 0x8a4fd
movq 0x98(%rbx), %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
subq $0x1, %rax
jb 0xc2222
movq 0x10(%rbx), %rdx
movups %xmm0, (%rdx,%rcx)
andq $0x0, 0x10(%rdx,%rcx)
addq $0x28, %rcx
jmp 0xc21ea
xorl %ebx, %ebx
movq %rbx, %rdi
callq 0xc1b0c
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x70(%rbx), %rax
movq %rax, %rcx
shrq $0x20, %rcx
jne 0xc22cf
pushq $0x14
popq %r12
xorl %r13d, %r13d
leaq 0x256d33(%rip), %r15    # 0x318f74
cmpq %rax, %r13
jae 0xc22e5
movq 0x8(%rbx), %rax
movl (%rax,%r12), %eax
cmpq %rax, 0x98(%rbx)
jbe 0xc231b
movq 0x10(%rbx), %rcx
imulq $0x28, %rax, %rbp
leaq (%rcx,%rbp), %rax
movq 0x8(%rcx,%rbp), %rdx
cmpq %rdx, 0x10(%rcx,%rbp)
jae 0xc227c
movq (%rax), %rax
jmp 0xc22a4
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 0x93472
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%rbp)
testq %rax, %rax
je 0xc2349
movq 0x10(%rcx,%rbp), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x10(%rcx,%rbp)
movl %r13d, (%rax,%rdx,4)
incq %r13
movq 0x70(%rbx), %rax
addq $0x20, %r12
jmp 0xc2241
leaq 0x25703c(%rip), %rsi    # 0x319312
movq %r15, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0xc2206
movq 0x58(%rbx), %rdx
cmpq $-0x1, %rdx
je 0xc2305
leaq 0x2570a3(%rip), %rsi    # 0x319399
movq %r14, %rdi
xorl %eax, %eax
callq 0x92e71
jmp 0xc2210
leaq 0x2570a0(%rip), %rsi    # 0x3193ac
movq %r14, %rdi
xorl %eax, %eax
callq 0x92e71
jmp 0xc2210
movq 0x375c46(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222ce7(%rip), %rsi    # 0x2e5013
leaq 0x257010(%rip), %rdx    # 0x319343
leaq 0x256fac(%rip), %rcx    # 0x3192e6
leaq 0x256c33(%rip), %r8     # 0x318f74
movl $0x240, %r9d            # imm = 0x240
jmp 0xc2375
movq 0x375c18(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222cb9(%rip), %rsi    # 0x2e5013
leaq 0x256ffe(%rip), %rdx    # 0x31935f
leaq 0x256f7e(%rip), %rcx    # 0x3192e6
leaq 0x256c05(%rip), %r8     # 0x318f74
movl $0x244, %r9d            # imm = 0x244
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x375be0(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222c81(%rip), %rsi    # 0x2e5013
leaq 0x256f3a(%rip), %rdx    # 0x3192d3
leaq 0x256f46(%rip), %rcx    # 0x3192e6
leaq 0x256bcd(%rip), %r8     # 0x318f74
movl $0x230, %r9d            # imm = 0x230
jmp 0xc2375
movq 0x375bb2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x222c53(%rip), %rsi    # 0x2e5013
leaq 0x256f3a(%rip), %rdx    # 0x319301
leaq 0x256f18(%rip), %rcx    # 0x3192e6
leaq 0x256b9f(%rip), %r8     # 0x318f74
movl $0x231, %r9d            # imm = 0x231
jmp 0xc2375