// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/bioseq_col.c
// Function: md5_to_index
static int md5_to_index(GtBioseq **bioseq, GtUword *seqnum,
                        GtBioseqCol *bsc, GtStr *md5_seqid, GtError *err)
{
  bool seqid_changed = false;
  char *seqid = NULL;
  GtUword i;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(seqnum && bsc && md5_seqid);
  /* performance hack to avoid string duplication */
  if (gt_str_length(md5_seqid) >= GT_MD5_SEQID_TOTAL_LEN) {
    seqid = gt_str_get(md5_seqid);
    if (seqid[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) {
      seqid[GT_MD5_SEQID_TOTAL_LEN-1] = '\0';
      seqid_changed = true;
    }
  }
  for (i = 0; !had_err && i < bsc->num_of_seqfiles; i++) {
    *bioseq = bsc->bioseqs[i];
    *seqnum = gt_bioseq_md5_to_index(*bioseq, gt_str_get(md5_seqid) +
                                     GT_MD5_SEQID_PREFIX_LEN);
    if (*seqnum != GT_UNDEF_UWORD)
      break;
  }
  if (seqid_changed) /* reset seqid no matter what */
    seqid[GT_MD5_SEQID_TOTAL_LEN-1] = GT_MD5_SEQID_SEPARATOR;
  if (!had_err && *seqnum == GT_UNDEF_UWORD) {
    gt_error_set(err, "sequence %s not found", gt_str_get(md5_seqid));
    had_err = -1;
  }
  return had_err;
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movb $0x0, 0x3f(%rsp)
movq $0x0, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x10e553
movq 0x40(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x10e51b
jmp 0x10e553
movq 0xa5ab6(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4fb3a(%rip), %rsi     # 0x15e066
leaq 0x50115(%rip), %rdx     # 0x15e648
leaq 0x75f37(%rip), %rcx     # 0x184471
leaq 0x761c2(%rip), %r8      # 0x184703
movl $0xf2, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x10e555
jmp 0x10e557
cmpq $0x0, 0x58(%rsp)
je 0x10e56f
cmpq $0x0, 0x50(%rsp)
je 0x10e56f
cmpq $0x0, 0x48(%rsp)
jne 0x10e5a7
movq 0xa5a62(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4fae6(%rip), %rsi     # 0x15e066
leaq 0x7623c(%rip), %rdx     # 0x1847c3
leaq 0x75ee3(%rip), %rcx     # 0x184471
leaq 0x7616e(%rip), %r8      # 0x184703
movl $0xf3, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x10e5a9
movq 0x48(%rsp), %rdi
callq 0x19a00
cmpq $0x25, %rax
jb 0x10e624
movq 0x48(%rsp), %rdi
callq 0x19940
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movsbl 0x24(%rax), %eax
cmpl $0x3a, %eax
je 0x10e60d
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0x19940
movq 0x18(%rsp), %rdi
movq %rax, %rdx
leaq 0x761e5(%rip), %rsi     # 0x1847de
movl $0x3a, %ecx
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x24(%rsp)
jne 0x10e622
movq 0x30(%rsp), %rax
movb $0x0, 0x24(%rax)
movb $0x1, 0x3f(%rsp)
jmp 0x10e624
movq $0x0, 0x28(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x24(%rsp)
movb %al, 0x17(%rsp)
jne 0x10e64f
movq 0x28(%rsp), %rax
movq 0x50(%rsp), %rcx
cmpq 0x10(%rcx), %rax
setb %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x10e659
jmp 0x10e6c8
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x60(%rsp), %rax
movq %rcx, (%rax)
movq 0x60(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x19940
movq 0x8(%rsp), %rdi
movq %rax, %rsi
addq $0x4, %rsi
callq 0x10d2c0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
cmpq $-0x1, (%rax)
je 0x10e6b3
jmp 0x10e6c8
jmp 0x10e6b5
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x10e62d
testb $0x1, 0x3f(%rsp)
je 0x10e6d8
movq 0x30(%rsp), %rax
movb $0x3a, 0x24(%rax)
cmpl $0x0, 0x24(%rsp)
jne 0x10e71a
movq 0x58(%rsp), %rax
cmpq $-0x1, (%rax)
jne 0x10e71a
movq 0x40(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rsp), %rdi
callq 0x19940
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x760ff(%rip), %rsi     # 0x18480a
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)