// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/seqid2seqnum_mapping.c
// Function: gt_seqid2seqnum_mapping_map
int gt_seqid2seqnum_mapping_map(GtSeqid2SeqnumMapping *mapping,
                                const char *seqid, const GtRange *inrange,
                                GtUword *seqnum, GtUword *filenum,
                                GtUword *offset, GtError *err)
{
  SeqidInfo *seqid_info;
  GtRange outrange;
  gt_error_check(err);
  gt_assert(mapping && seqid && seqnum);
  /* try to answer request from cache */
  if (mapping->cached_seqid && !strcmp(seqid, mapping->cached_seqid) &&
      (mapping->cached_range.end == GT_UNDEF_UWORD ||
       gt_range_contains(&mapping->cached_range, inrange))) {
    *seqnum = mapping->cached_seqnum;
    *filenum = mapping->cached_filenum;
    if (offset)
      *offset = mapping->cached_range.start;
    return 0;
  }
  /* cache miss -> regular mapping */
  if (!(seqid_info = gt_hashmap_get(mapping->map, seqid))) {
    gt_error_set(err, "no sequence with ID \"%s\" found in input sequence(s)",
                 seqid);
    return -1;
  }
  /* get results from seqid info */
  if (seqid_info_get(seqid_info, seqnum, filenum, &outrange, inrange,
                     mapping->filename, seqid, err)) {
    return -1;
  }
  /* report offset */
  if (offset)
    *offset = outrange.start;
  /* store result in cache */
  mapping->cached_seqid = gt_hashmap_get_key(mapping->map, seqid);
  gt_assert(mapping->cached_seqid);
  mapping->cached_seqnum = *seqnum;
  mapping->cached_filenum = *filenum;
  mapping->cached_range = outrange;
  return 0;
}

// Assembly:
subq $0x68, %rsp
movq 0x70(%rsp), %rax
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
cmpq $0x0, 0x70(%rsp)
je 0xeb737
movq 0x70(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0xeb6ff
jmp 0xeb737
movq 0xc88d2(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x72956(%rip), %rsi     # 0x15e066
leaq 0x72f31(%rip), %rdx     # 0x15e648
leaq 0x8ec6f(%rip), %rcx     # 0x17a38d
leaq 0x8ec21(%rip), %r8      # 0x17a346
movl $0xf1, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xeb739
jmp 0xeb73b
cmpq $0x0, 0x58(%rsp)
je 0xeb753
cmpq $0x0, 0x50(%rsp)
je 0xeb753
cmpq $0x0, 0x40(%rsp)
jne 0xeb78b
movq 0xc887e(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x72902(%rip), %rsi     # 0x15e066
leaq 0x8ec3e(%rip), %rdx     # 0x17a3a9
leaq 0x8ec1b(%rip), %rcx     # 0x17a38d
leaq 0x8ebcd(%rip), %r8      # 0x17a346
movl $0xf2, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xeb78d
movq 0x58(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0xeb822
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rax
movq 0x10(%rax), %rsi
callq 0xb850
cmpl $0x0, %eax
jne 0xeb822
movq 0x58(%rsp), %rax
cmpq $-0x1, 0x30(%rax)
je 0xeb7da
movq 0x58(%rsp), %rdi
addq $0x28, %rdi
movq 0x48(%rsp), %rsi
callq 0x93ea0
testb $0x1, %al
jne 0xeb7da
jmp 0xeb822
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
cmpq $0x0, 0x30(%rsp)
je 0xeb815
movq 0x58(%rsp), %rax
movq 0x28(%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x64(%rsp)
jmp 0xeb96b
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x86470
movq %rax, 0x28(%rsp)
cmpq $0x0, %rax
jne 0xeb865
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x8eb73(%rip), %rsi     # 0x17a3c4
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xeb96b
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x48(%rsp), %r8
movq 0x58(%rsp), %rax
movq (%rax), %r9
movq 0x50(%rsp), %r10
movq 0x70(%rsp), %rax
leaq 0x18(%rsp), %rcx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0xeb980
cmpl $0x0, %eax
je 0xeb8b0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0xeb96b
cmpq $0x0, 0x30(%rsp)
je 0xeb8c5
movq 0x18(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x50(%rsp), %rsi
callq 0x864c0
movq %rax, %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xeb928
movq 0xc86e1(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x72765(%rip), %rsi     # 0x15e066
leaq 0x8eaf0(%rip), %rdx     # 0x17a3f8
leaq 0x8ea7e(%rip), %rcx     # 0x17a38d
leaq 0x8ea30(%rip), %r8      # 0x17a346
movl $0x10d, %r9d            # imm = 0x10D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xeb92a
movq 0x40(%rsp), %rax
movq (%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x38(%rsp), %rax
movq (%rax), %rcx
movq 0x58(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x58(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x30(%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)