// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_seqstartpos
GtUword gt_encseq_seqstartpos(const GtEncseq *encseq,
                                    GtUword seqnum)
{
  GtUword pos;
  bool wasmirrored = false;
  gt_assert(encseq != NULL && seqnum < encseq->logicalnumofdbsequences);
  if (encseq->hasmirror && seqnum >= encseq->numofdbsequences) {
    seqnum = encseq->logicalnumofdbsequences - 1 - seqnum;
    wasmirrored = true;
  }
  gt_assert(seqnum < encseq->numofdbsequences);
  if (encseq->numofdbsequences == 1UL) {
    gt_assert(seqnum == 0);
    return (wasmirrored ? encseq->totallength + 1 : 0);
  }
  if (encseq->sat != GT_ACCESS_TYPE_EQUALLENGTH) {
    pos = gt_encseq_seqstartpos_viautables(encseq, seqnum);
    if (wasmirrored) {
      if (seqnum == encseq->numofdbsequences - 1) {
        pos = encseq->totallength + 1;
      } else {
        gt_assert(seqnum + 1 < encseq->numofdbsequences);
        pos = encseq->totallength
                + (encseq->totallength
                    - (gt_encseq_seqstartpos_viautables(encseq,
                                                        seqnum + 1) - 2));
      }
    }
  } else {
    pos = gt_encseq_seqstartpos_Viaequallength(encseq, seqnum);
    if (wasmirrored) {
      if (seqnum == encseq->numofdbsequences - 1) {
        pos = encseq->totallength + 1;
      } else {
        gt_assert(seqnum + 1 < encseq->numofdbsequences);
        pos = encseq->totallength
                + (encseq->totallength
                    - (gt_encseq_seqstartpos_Viaequallength(encseq,
                                                            seqnum + 1) - 2));
      }
    }
  }
  return pos;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movb $0x0, 0x37(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x11a73b
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq 0x48(%rcx), %rax
jb 0x11a773
movq 0x99896(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4391a(%rip), %rsi     # 0x15e066
leaq 0x6b8f3(%rip), %rdx     # 0x186046
leaq 0x6b927(%rip), %rcx     # 0x186081
leaq 0x6aefd(%rip), %r8      # 0x18565e
movl $0xf76, %r9d            # imm = 0xF76
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11a775
movq 0x48(%rsp), %rax
testb $0x1, 0x3a8(%rax)
je 0x11a7af
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x11a7af
movq 0x48(%rsp), %rax
movq 0x48(%rax), %rax
subq $0x1, %rax
subq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
movb $0x1, 0x37(%rsp)
jmp 0x11a7b1
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x11a7f9
movq 0x99810(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x43894(%rip), %rsi     # 0x15e066
leaq 0x6b8be(%rip), %rdx     # 0x186097
leaq 0x6b8a1(%rip), %rcx     # 0x186081
leaq 0x6ae77(%rip), %r8      # 0x18565e
movl $0xf7b, %r9d            # imm = 0xF7B
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11a7fb
movq 0x48(%rsp), %rax
cmpq $0x1, 0x40(%rax)
jne 0x11a87e
jmp 0x11a809
cmpq $0x0, 0x40(%rsp)
je 0x11a849
movq 0x997c0(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x43844(%rip), %rsi     # 0x15e066
leaq 0x6b890(%rip), %rdx     # 0x1860b9
leaq 0x6b851(%rip), %rcx     # 0x186081
leaq 0x6ae27(%rip), %r8      # 0x18565e
movl $0xf7d, %r9d            # imm = 0xF7D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11a84b
testb $0x1, 0x37(%rsp)
je 0x11a866
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x11a86f
xorl %eax, %eax
movq %rax, 0x28(%rsp)
jmp 0x11a86f
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x11aa71
movq 0x48(%rsp), %rax
cmpl $0x2, (%rax)
je 0x11a97b
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x11aa80
movq %rax, 0x38(%rsp)
testb $0x1, 0x37(%rsp)
je 0x11a976
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq 0x40(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x11a8d9
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x11a974
jmp 0x11a8db
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq 0x48(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x11a927
movq 0x996e2(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x43766(%rip), %rsi     # 0x15e066
leaq 0x6b7be(%rip), %rdx     # 0x1860c5
leaq 0x6b773(%rip), %rcx     # 0x186081
leaq 0x6ad49(%rip), %r8      # 0x18565e
movl $0xf86, %r9d            # imm = 0xF86
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11a929
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x11aa80
movq 0x18(%rsp), %rcx
movq %rax, %rdx
movq 0x20(%rsp), %rax
subq $0x2, %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0x11a976
jmp 0x11aa67
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x11ab50
movq %rax, 0x38(%rsp)
testb $0x1, 0x37(%rsp)
je 0x11aa65
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq 0x40(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x11a9c8
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x11aa63
jmp 0x11a9ca
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq 0x48(%rsp), %rcx
cmpq 0x40(%rcx), %rax
jb 0x11aa16
movq 0x995f3(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x43677(%rip), %rsi     # 0x15e066
leaq 0x6b6cf(%rip), %rdx     # 0x1860c5
leaq 0x6b684(%rip), %rcx     # 0x186081
leaq 0x6ac5a(%rip), %r8      # 0x18565e
movl $0xf93, %r9d            # imm = 0xF93
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11aa18
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x11ab50
movq 0x8(%rsp), %rcx
movq %rax, %rdx
movq 0x10(%rsp), %rax
subq $0x2, %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
jmp 0x11aa65
jmp 0x11aa67
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)