// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq_col.c
// Function: gt_encseq_col_md5_to_description
static int gt_encseq_col_md5_to_description(GtSeqCol *sc, GtStr *desc,
                                            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 && desc && 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) {
    const char *cdesc;
    GtUword desc_len;
    gt_assert(seqnum < gt_encseq_num_of_sequences(esc->encseq));
    cdesc = gt_encseq_description(esc->encseq, &desc_len, seqnum);
    gt_str_append_cstr_nt(desc, cdesc, desc_len);
  } 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 $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
callq 0xb9a4c
movq %rax, %rdi
movq %r12, %rsi
callq 0xbfaea
movq %rax, %r12
testq %r14, %r14
je 0xba405
movq %r14, %rdi
callq 0xc103
testb %al, %al
jne 0xba57e
testq %r14, %r14
je 0xba51f
testq %r15, %r15
je 0xba51f
testq %rbx, %rbx
je 0xba51f
testq %r12, %r12
je 0xba51f
movq %r15, %rdi
callq 0x143d2
movq %rax, %rdi
callq 0x59a50
testb %al, %al
je 0xba550
movq %r15, %rdi
callq 0x14461
xorl %ebp, %ebp
cmpq $0x25, %rax
jb 0xba49f
movq %r15, %rdi
callq 0x143d2
cmpb $0x3a, 0x24(%rax)
jne 0xba47d
addq $0x4, %rax
leaq 0x10(%rsp), %r13
pushq $0x20
popq %rdx
movq %r13, %rdi
movq %rax, %rsi
callq 0xb2d0
movb $0x0, 0x20(%r13)
jmp 0xba49f
movq %r15, %rdi
callq 0x143d2
leaq 0x30952(%rip), %rsi     # 0xeadde
pushq $0x3a
popq %rcx
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
pushq $-0x1
popq %rbp
movq 0x10(%r12), %rdi
leaq 0x10(%rsp), %rsi
callq 0xbf3ee
cmpq $-0x1, %rax
je 0xba4ef
movq %rax, %r13
movq 0x8(%r12), %rdi
callq 0xa1f8d
cmpq %rax, %r13
jae 0xba5ac
movq 0x8(%r12), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
movq %r13, %rdx
callq 0xa7510
movq (%r14), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13f76
jmp 0xba50e
pushq $-0x1
popq %rbp
movq %r15, %rdi
callq 0x143d2
leaq 0x30909(%rip), %rsi     # 0xeae0a
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x73a92(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xfb36(%rip), %rsi      # 0xca066
leaq 0x36eca(%rip), %rdx     # 0xf1401
leaq 0x36ea2(%rip), %rcx     # 0xf13e0
leaq 0x36c6d(%rip), %r8      # 0xf11b2
movl $0x122, %r9d            # imm = 0x122
jmp 0xba5d8
movq 0x73a61(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xfb05(%rip), %rsi      # 0xca066
leaq 0x307d0(%rip), %rdx     # 0xead38
leaq 0x36e71(%rip), %rcx     # 0xf13e0
leaq 0x36c3c(%rip), %r8      # 0xf11b2
movl $0x123, %r9d            # imm = 0x123
jmp 0xba5d8
movq 0x73a33(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xfad7(%rip), %rsi      # 0xca066
leaq 0x100c3(%rip), %rdx     # 0xca659
leaq 0x36e43(%rip), %rcx     # 0xf13e0
leaq 0x36c0e(%rip), %r8      # 0xf11b2
movl $0x121, %r9d            # imm = 0x121
jmp 0xba5d8
movq 0x73a05(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0xfaa9(%rip), %rsi      # 0xca066
leaq 0x36f3d(%rip), %rdx     # 0xf1501
leaq 0x36e15(%rip), %rcx     # 0xf13e0
leaq 0x36be0(%rip), %r8      # 0xf11b2
movl $0x135, %r9d            # imm = 0x135
xorl %eax, %eax
callq 0xb8c0
callq 0xb300