// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/encseq_col.c
// Function: gt_encseq_col_md5_to_seq
static int gt_encseq_col_md5_to_seq(GtSeqCol *sc, char **seq,
                                    GtUword start, GtUword end,
                                    GtStr *md5_seqid, GtError *err)
{
  GtUword seqnum = GT_UNDEF_UWORD;
  char seqid[GT_MD5_SEQID_HASH_LEN + 1];
  int had_err = 0;
  GtEncseqCol *esc;
  esc = gt_encseq_col_cast(sc);
  gt_error_check(err);
  gt_assert(esc && seq && start <= end && md5_seqid && err);
  gt_assert(gt_md5_seqid_has_prefix(gt_str_get(md5_seqid)));
  if (gt_str_length(md5_seqid) >= GT_MD5_SEQID_TOTAL_LEN) {
    const char *cstrseqid = gt_str_get(md5_seqid);
    if (cstrseqid[GT_MD5_SEQID_TOTAL_LEN-1] != GT_MD5_SEQID_SEPARATOR) {
      gt_error_set(err, "MD5 sequence id %s not terminated with '%c'",
                   gt_str_get(md5_seqid), GT_MD5_SEQID_SEPARATOR);
      had_err = -1;
    }
    if (!had_err) {
      strncpy(seqid, cstrseqid + GT_MD5_SEQID_PREFIX_LEN,
              GT_MD5_SEQID_HASH_LEN);
      seqid[GT_MD5_SEQID_HASH_LEN] = '\0';
    }
  }
  seqnum = gt_md5_tab_map(esc->md5_tab, seqid);
  if (seqnum != GT_UNDEF_UWORD) {
    GtUword startpos = gt_encseq_seqstartpos(esc->encseq, seqnum),
                  GT_UNUSED seqlength = gt_encseq_seqlength(esc->encseq,
                                                            seqnum);
    *seq = gt_calloc(end - start + 1, sizeof (char));
    gt_encseq_extract_decoded(esc->encseq, (char*) *seq, startpos + start,
                              startpos + end);
  } else {
    gt_error_set(err, "sequence %s not found", gt_str_get(md5_seqid));
    had_err = -1;
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r13
movq %r8, %rbp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
callq 0xd3d78
movq %rax, %rdi
movq %rbx, %rsi
callq 0xd8196
movq %rax, %r12
testq %r13, %r13
je 0xd4361
movq %r13, %rdi
callq 0x34fea
testb %al, %al
jne 0xd44d2
cmpq $0x0, 0x8(%rsp)
je 0xd44c8
testq %r12, %r12
je 0xd44c8
movq %r14, %rbx
subq %r15, %rbx
jb 0xd44c8
testq %rbp, %rbp
je 0xd44c8
testq %r13, %r13
je 0xd44c8
movq %r15, 0x18(%rsp)
movq %rbp, %rdi
callq 0x3bb5d
movq %rax, %rdi
callq 0x7aa64
testb %al, %al
je 0xd44cd
movq %rbp, %rdi
callq 0x3bb86
xorl %r15d, %r15d
cmpq $0x25, %rax
movq %r14, 0x10(%rsp)
jb 0xd441c
movq %rbp, %rdi
callq 0x3bb5d
cmpb $0x3a, 0x24(%rax)
jne 0xd43f5
addq $0x4, %rax
leaq 0x20(%rsp), %r14
movl $0x20, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0xb2d0
movb $0x0, 0x20(%r14)
jmp 0xd441c
movq %rbp, %rdi
callq 0x3bb5d
leaq 0x2d75e(%rip), %rsi     # 0x101b62
movq %r13, %rdi
movq %rax, %rdx
movl $0x3a, %ecx
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movq 0x10(%r12), %rdi
leaq 0x20(%rsp), %rsi
callq 0xd7d4f
cmpq $-0x1, %rax
je 0xd4494
movq %rax, %r14
movq 0x8(%r12), %rdi
movq %rax, %rsi
callq 0xc3ab6
movq %rax, %r13
movq 0x8(%r12), %rdi
movq %r14, %rsi
callq 0xc3d9a
incq %rbx
leaq 0x33aab(%rip), %rdx     # 0x107f06
movl $0x1, %esi
movq %rbx, %rdi
movl $0x10f, %ecx            # imm = 0x10F
callq 0x359a6
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8(%r12), %rdi
movq 0x18(%rsp), %rdx
addq %r13, %rdx
movq 0x10(%rsp), %rcx
addq %r13, %rcx
movq %rax, %rsi
callq 0xc1686
jmp 0xd44b6
movq %rbp, %rdi
callq 0x3bb5d
leaq 0x2d6eb(%rip), %rsi     # 0x101b8e
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x34f1f
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x30188
callq 0x301c1
callq 0x301fa