// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_description
const char* gt_encseq_description(const GtEncseq *encseq,
                                  GtUword *desclen,
                                  GtUword seqnum)
{
  GtUword destablen;

  gt_assert(encseq != NULL && encseq->destab != NULL);
  if (encseq->destab[encseq->destablength - 1] == '\n') {
    destablen = encseq->destablength;
  } else {
    /* XXX: hard-coded! final two ulongs are max desc length and
       terminator constant */
    destablen = encseq->destablength - (2 * sizeof (GtUword));
  }
  if (seqnum >= encseq->numofdbsequences) {
      seqnum = encseq->logicalnumofdbsequences - 1 - seqnum;
  }
  if (seqnum > 0) {
    GtUword nextend;
    gt_assert(seqnum < encseq->numofdbsequences);
    if (seqnum < encseq->numofdbsequences - 1)
      nextend = encseq->sdstab[seqnum];
    else
      nextend = destablen - 1;
    gt_assert(encseq->sdstab[seqnum-1] < nextend);
    *desclen = nextend - encseq->sdstab[seqnum-1] - 1;
    return encseq->destab + encseq->sdstab[seqnum-1] + 1;
  }
  gt_assert(seqnum == 0);
  if (encseq->numofdbsequences > 1UL) {
    gt_assert(encseq->sdstab != NULL);
    *desclen = encseq->sdstab[0];
  }
  else {
    *desclen = destablen - 1;
  }
  return encseq->destab;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0xa75bf
movq 0x200(%rdi), %rax
testq %rax, %rax
je 0xa75bf
movq 0x40(%rdi), %r8
movq 0x210(%rdi), %r9
cmpb $0xa, -0x1(%rax,%r9)
leaq -0x10(%r9), %rcx
cmoveq %r9, %rcx
cmpq %rdx, %r8
ja 0xa754f
notq %rdx
addq 0x48(%rdi), %rdx
testq %rdx, %rdx
je 0xa7572
cmpq %r8, %rdx
jae 0xa75f0
decq %r8
cmpq %r8, %rdx
jae 0xa758d
movq 0x218(%rdi), %rdi
movq (%rdi,%rdx,8), %rcx
jmp 0xa7597
cmpq $0x2, %r8
jb 0xa75b7
movq 0x218(%rdi), %rcx
testq %rcx, %rcx
je 0xa764c
movq (%rcx), %rcx
jmp 0xa75ba
decq %rcx
movq 0x218(%rdi), %rdi
movq -0x8(%rdi,%rdx,8), %r8
cmpq %rcx, %r8
jae 0xa761e
notq %r8
addq %r8, %rcx
movq %rcx, (%rsi)
movq -0x8(%rdi,%rdx,8), %rcx
addq %rcx, %rax
incq %rax
jmp 0xa75bd
decq %rcx
movq %rcx, (%rsi)
popq %rcx
retq
movq 0x869f2(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22a96(%rip), %rsi     # 0xca066
leaq 0x45179(%rip), %rdx     # 0xec750
leaq 0x4519b(%rip), %rcx     # 0xec779
leaq 0x445b5(%rip), %r8      # 0xebb9a
movl $0x12df, %r9d           # imm = 0x12DF
jmp 0xa7678
movq 0x869c1(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22a65(%rip), %rsi     # 0xca066
leaq 0x44fb3(%rip), %rdx     # 0xec5bb
leaq 0x4516a(%rip), %rcx     # 0xec779
leaq 0x44584(%rip), %r8      # 0xebb9a
movl $0x12ec, %r9d           # imm = 0x12EC
jmp 0xa7678
movq 0x86993(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22a37(%rip), %rsi     # 0xca066
leaq 0x45159(%rip), %rdx     # 0xec78f
leaq 0x4513c(%rip), %rcx     # 0xec779
leaq 0x44556(%rip), %r8      # 0xebb9a
movl $0x12f1, %r9d           # imm = 0x12F1
jmp 0xa7678
movq 0x86965(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x22a09(%rip), %rsi     # 0xca066
leaq 0x4514e(%rip), %rdx     # 0xec7b2
leaq 0x4510e(%rip), %rcx     # 0xec779
leaq 0x44528(%rip), %r8      # 0xebb9a
movl $0x12f7, %r9d           # imm = 0x12F7
xorl %eax, %eax
callq 0xb8c0
callq 0xb300