// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/region_mapping.c
// Function: gt_region_mapping_get_description
int gt_region_mapping_get_description(GtRegionMapping *rm, GtStr *desc,
                                      GtStr *seqid, GtError *err)
{
  int had_err = 0;
  gt_error_check(err);
  gt_assert(rm && desc && seqid);
  if (rm->userawseq) {
    gt_str_append_cstr(desc, "<rawseq>");
    return 0;
  }
  had_err = update_seq_col_if_necessary(rm, seqid, err);
  if (!had_err) {
    if (gt_md5_seqid_has_prefix(gt_str_get(seqid))) {
      had_err = gt_seq_col_md5_to_description(rm->seq_col, desc, seqid,
                                              err);
    } else if (rm->usedesc) {
      GtUword filenum, seqnum;
      gt_assert(rm->seqid2seqnum_mapping);
      had_err = gt_seqid2seqnum_mapping_map(rm->seqid2seqnum_mapping,
                                            gt_str_get(seqid), NULL, &seqnum,
                                            &filenum, NULL, err);
      if (!had_err) {
        char *cdesc;
        cdesc = gt_seq_col_get_description(rm->seq_col, filenum, seqnum);
        gt_assert(cdesc);
        gt_str_append_cstr(desc, cdesc);
        gt_free(cdesc);
      }
    } else if (rm->useseqno) {
      GtUword seqno = GT_UNDEF_UWORD;
      gt_assert(rm->encseq);
      if (1 != sscanf(gt_str_get(seqid), "seq"GT_WU"", &seqno)) {
        gt_error_set(err, "seqid '%s' does not have the form 'seqX' "
                          "where X is a sequence number in the encoded "
                          "sequence", gt_str_get(seqid));
        had_err = -1;
      }
      gt_assert(had_err || seqno != GT_UNDEF_UWORD);
      if (!had_err && seqno >= gt_encseq_num_of_sequences(rm->encseq)) {
          gt_error_set(err, "trying to access sequence "GT_WU", but encoded"
                            "sequence contains only "GT_WU" sequences",
                            seqno, gt_encseq_num_of_sequences(rm->encseq));
          had_err = -1;
      }
      if (!had_err) {
        GtUword desclen;
        const char *edesc;
        edesc = gt_encseq_description(rm->encseq, &desclen, seqno);
        gt_str_append_cstr_nt(desc, edesc, desclen);
      }
    } else if (rm->matchdesc) {
      had_err = gt_seq_col_grep_desc_description(rm->seq_col, desc,
                                                 seqid, err);
    } else if (rm->mapping) {
      char *cdesc;
      cdesc = gt_seq_col_get_description(rm->seq_col, 0, 0);
      gt_assert(cdesc);
      gt_str_append_cstr(desc, cdesc);
      gt_free(cdesc);
    } else {
      gt_assert(!rm->usedesc && !rm->matchdesc);
      if (!had_err) {
        gt_error_set(err, "no mapping rule given and no MD5 tags "
                          "present in the query seqid \"%s\" -- no mapping can "
                          "be defined", gt_str_get(seqid));
        had_err = -1;
      }
    }
  }
  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
testq %rcx, %rcx
je 0x89cbd
movq %r15, %rdi
callq 0xc103
testb %al, %al
jne 0x89f5d
testq %r12, %r12
je 0x89f2f
testq %r14, %r14
je 0x89f2f
testq %r13, %r13
je 0x89f2f
cmpb $0x1, 0x1b(%r12)
jne 0x89cf3
leaq 0x5b375(%rip), %rsi     # 0xe505c
movq %r14, %rdi
callq 0x13dd3
xorl %ebx, %ebx
jmp 0x89d08
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x89778
pushq $-0x1
popq %rbx
testl %eax, %eax
je 0x89d18
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %r13, %rdi
callq 0x143d2
movq %rax, %rdi
callq 0x59a50
testb %al, %al
je 0x89d4c
movq 0x38(%r12), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xbfd34
cmpb $0x1, 0x19(%r12)
jne 0x89dd1
movq 0x40(%r12), %rbx
testq %rbx, %rbx
je 0x89f95
movq %r13, %rdi
callq 0x143d2
movq %r15, (%rsp)
leaq 0x18(%rsp), %rcx
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %r9d, %r9d
callq 0x8abc8
movl %eax, %ebx
testl %eax, %eax
jne 0x89d08
movq 0x38(%r12), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0xbff22
testq %rax, %rax
je 0x89ff1
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x13dd3
leaq 0x5adea(%rip), %rsi     # 0xe4bae
movq %r15, %rdi
movl $0x1b9, %edx            # imm = 0x1B9
jmp 0x89ec8
cmpb $0x1, 0x1c(%r12)
jne 0x89e62
orq $-0x1, 0x10(%rsp)
cmpq $0x0, 0x30(%r12)
je 0x89fc3
movq %r13, %rdi
callq 0x143d2
leaq 0x5afff(%rip), %rsi     # 0xe4dfd
leaq 0x10(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0xb680
cmpl $0x1, %eax
jne 0x89ed2
movq 0x10(%rsp), %r13
cmpq $-0x1, %r13
je 0x8a022
movq 0x30(%r12), %rdi
callq 0xa1f8d
cmpq %rax, %r13
jae 0x89ee3
movq 0x30(%r12), %rdi
movq 0x10(%rsp), %rdx
leaq 0x18(%rsp), %rbx
movq %rbx, %rsi
callq 0xa7510
movq (%rbx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x13f76
jmp 0x89cef
cmpb $0x1, 0x18(%r12)
jne 0x89e8a
movq 0x38(%r12), %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xbfc2d
cmpq $0x0, 0x20(%r12)
je 0x89f0e
movq 0x38(%r12), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
xorl %edx, %edx
callq 0xbff22
testq %rax, %rax
je 0x8a053
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x13dd3
leaq 0x5acee(%rip), %rsi     # 0xe4bae
movq %r15, %rdi
movl $0x1d9, %edx            # imm = 0x1D9
callq 0xd249
jmp 0x89d08
movq %r13, %rdi
callq 0x143d2
leaq 0x5af23(%rip), %rsi     # 0xe4e04
jmp 0x89f1d
movq 0x10(%rsp), %r14
movq 0x30(%r12), %rdi
callq 0xa1f8d
leaq 0x5b172(%rip), %rsi     # 0xe506b
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0xc007
jmp 0x89d08
movq %r13, %rdi
callq 0x143d2
leaq 0x5b074(%rip), %rsi     # 0xe4f91
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
jmp 0x89d08
movq 0xa4082(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x40126(%rip), %rsi     # 0xca066
leaq 0x5b101(%rip), %rdx     # 0xe5048
leaq 0x5b0d8(%rip), %rcx     # 0xe5026
leaq 0x5ac59(%rip), %r8      # 0xe4bae
movl $0x1a4, %r9d            # imm = 0x1A4
jmp 0x89f89
movq 0xa4054(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x400f8(%rip), %rsi     # 0xca066
leaq 0x406e4(%rip), %rdx     # 0xca659
leaq 0x5b0aa(%rip), %rcx     # 0xe5026
leaq 0x5ac2b(%rip), %r8      # 0xe4bae
movl $0x1a3, %r9d            # imm = 0x1A3
xorl %eax, %eax
callq 0xb8c0
callq 0xb300
movq 0xa401c(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x400c0(%rip), %rsi     # 0xca066
leaq 0x5ad59(%rip), %rdx     # 0xe4d06
leaq 0x5b072(%rip), %rcx     # 0xe5026
leaq 0x5abf3(%rip), %r8      # 0xe4bae
movl $0x1b0, %r9d            # imm = 0x1B0
jmp 0x89f89
movq 0xa3fee(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x40092(%rip), %rsi     # 0xca066
leaq 0x5ae17(%rip), %rdx     # 0xe4df2
leaq 0x5b044(%rip), %rcx     # 0xe5026
leaq 0x5abc5(%rip), %r8      # 0xe4bae
movl $0x1bd, %r9d            # imm = 0x1BD
jmp 0x89f89
movq 0xa3fc0(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x40064(%rip), %rsi     # 0xca066
leaq 0x5b05c(%rip), %rdx     # 0xe5065
leaq 0x5b016(%rip), %rcx     # 0xe5026
leaq 0x5ab97(%rip), %r8      # 0xe4bae
movl $0x1b7, %r9d            # imm = 0x1B7
jmp 0x89f89
movq 0xa3f8f(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x40033(%rip), %rsi     # 0xca066
leaq 0x5ae28(%rip), %rdx     # 0xe4e62
leaq 0x5afe5(%rip), %rcx     # 0xe5026
leaq 0x5ab66(%rip), %r8      # 0xe4bae
movl $0x1c4, %r9d            # imm = 0x1C4
jmp 0x89f89
movq 0xa3f5e(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x40002(%rip), %rsi     # 0xca066
leaq 0x5affa(%rip), %rdx     # 0xe5065
leaq 0x5afb4(%rip), %rcx     # 0xe5026
leaq 0x5ab35(%rip), %r8      # 0xe4bae
movl $0x1d7, %r9d            # imm = 0x1D7
jmp 0x89f89