// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: revextract2bitenc
static GtUword revextract2bitenc(GtEndofTwobitencoding *ptbe,
                                       const GtEncseq *encseq,
                                       GtUword currentpos,
                                       GtUword twobitencodingstoppos)
{
  gt_assert(encseq != NULL && currentpos < encseq->totallength);
  if (encseq->sat != GT_ACCESS_TYPE_BITACCESS) {
    if (currentpos >= twobitencodingstoppos) {
      if (currentpos - twobitencodingstoppos + 1 >
          (GtUword) GT_UNITSIN2BITENC) {
        ptbe->unitsnotspecial = (unsigned int) GT_UNITSIN2BITENC;
      }
      else {
        ptbe->unitsnotspecial
          = (unsigned int) (currentpos - twobitencodingstoppos + 1);
      }
      ptbe->tbe = calctbereverse(encseq->twobitencoding, currentpos);
    }
    else {
      ptbe->unitsnotspecial = 0;
      ptbe->tbe = 0;
    }
  }
  else {
    if (gt_encseq_has_specialranges(encseq)) {
      GtBitsequence spbits;

      spbits = revextractspecialbits(encseq->specialbits, currentpos);
      ptbe->unitsnotspecial = revbitaccessunitsnotspecial(spbits, currentpos);
    }
    else {
      ptbe->unitsnotspecial = revbitaccessunitsnotspecial0(currentpos);
    }
    if (ptbe->unitsnotspecial == 0) {
      ptbe->tbe = 0;
    }
    else {
      ptbe->tbe = calctbereverse(encseq->twobitencoding, currentpos);
    }
  }
  if (currentpos > (GtUword) GT_UNITSIN2BITENC) {
    return currentpos - (GtUword) GT_UNITSIN2BITENC;
  }
  else {
    return 0;
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x132740
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x132778
movq 0x81891(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x2b915(%rip), %rsi     # 0x15e066
leaq 0x57018(%rip), %rdx     # 0x189770
leaq 0x57092(%rip), %rcx     # 0x1897f1
leaq 0x52ef8(%rip), %r8      # 0x18565e
movl $0x17de, %r9d           # imm = 0x17DE
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x13277a
movq 0x20(%rsp), %rax
cmpl $0x3, (%rax)
je 0x13280e
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jb 0x1327f1
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
addq $0x1, %rax
cmpq $0x20, %rax
jbe 0x1327b6
movq 0x28(%rsp), %rax
movl $0x20, 0x8(%rax)
jmp 0x1327ce
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
addq $0x1, %rax
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq 0x280(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x132be0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x132809
movq 0x28(%rsp), %rax
movl $0x0, 0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x0, (%rax)
jmp 0x1328a4
movq 0x20(%rsp), %rdi
callq 0x119540
testb $0x1, %al
jne 0x13281e
jmp 0x132854
movq 0x20(%rsp), %rax
movq 0x2b0(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x132c90
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x132d70
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
jmp 0x132868
movq 0x18(%rsp), %rdi
callq 0x132db0
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x28(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x132881
movq 0x28(%rsp), %rax
movq $0x0, (%rax)
jmp 0x1328a2
movq 0x20(%rsp), %rax
movq 0x280(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x132be0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
jmp 0x1328a4
cmpq $0x20, 0x18(%rsp)
jbe 0x1328bc
movq 0x18(%rsp), %rax
subq $0x20, %rax
movq %rax, 0x30(%rsp)
jmp 0x1328c5
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nop