// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_get_encoded_char
GtUchar gt_encseq_get_encoded_char(const GtEncseq *encseq,
                                   GtUword pos,
                                   GtReadmode readmode)
{
  gt_assert(encseq != NULL && pos < encseq->logicaltotallength);
  /* translate into forward coords */
  if (GT_ISDIRREVERSE(readmode)) {
    pos = GT_REVERSEPOS(encseq->logicaltotallength, pos);
  }
  /* handle virtual coordinates */
  if (encseq->hasmirror) {
    if (pos > encseq->totallength) {
      /* invert coordinates and readmode */
      gt_readmode_invert(readmode);
      pos = GT_REVERSEPOS(encseq->totallength, pos - encseq->totallength - 1);
    } else if (pos == encseq->totallength) {
      return (GtUchar) GT_SEPARATOR;
    }
  }
  gt_assert(pos < encseq->totallength);
  if (encseq->twobitencoding != NULL) {
    GtUword twobits;

    twobits = EXTRACTENCODEDCHAR(encseq->twobitencoding, pos);
    if (encseq->accesstype_via_utables) {
      if (!encseq->has_specialranges ||
          twobits != (GtUword) encseq->leastprobablecharacter) {
        return GT_ISDIRCOMPLEMENT(readmode)
                 ? GT_COMPLEMENTBASE((GtUchar) twobits)
                 : (GtUchar) twobits;
      }
      if (encseq->numofdbsequences > 1UL &&
          encseq->issinglepositionseparator(encseq, pos)) {
        return (GtUchar) GT_SEPARATOR;
      }
      if (encseq->issinglepositioninwildcardrange(encseq, pos))
        return (GtUchar) GT_WILDCARD;

      return GT_ISDIRCOMPLEMENT(readmode)
               ? GT_COMPLEMENTBASE((GtUchar) twobits)
               : (GtUchar) twobits;
    }
    else {
      if (encseq->sat == GT_ACCESS_TYPE_EQUALLENGTH) {
        if (encseq->numofdbsequences == 1UL ||
            twobits != (GtUword) encseq->leastprobablecharacter ||
            !issinglepositioninspecialrangeViaequallength(encseq, pos)) {
          return GT_ISDIRCOMPLEMENT(readmode)
                   ? GT_COMPLEMENTBASE((GtUchar) twobits)
                   : (GtUchar) twobits;
        }
        return (GtUchar) GT_SEPARATOR;
      }
      else {
        gt_assert(encseq->sat == GT_ACCESS_TYPE_BITACCESS);
        if (!encseq->has_specialranges ||
            twobits > (GtUword) GT_TWOBITS_FOR_SEPARATOR ||
            !GT_ISIBITSET(encseq->specialbits, pos)) {
          return GT_ISDIRCOMPLEMENT(readmode)
                   ? GT_COMPLEMENTBASE((GtUchar) twobits)
                   : (GtUchar) twobits;
        }
        return (twobits == (GtUword) GT_TWOBITS_FOR_SEPARATOR)
                   ? (GtUchar) GT_SEPARATOR
                   : (GtUchar) GT_WILDCARD;
      }
    }
  }
  if (encseq->sat == GT_ACCESS_TYPE_BYTECOMPRESS) {
    gt_assert(!GT_ISDIRCOMPLEMENT(readmode));
    return delivercharViabytecompress(encseq, pos);
  }
  else {
    GtUchar cc;

    gt_assert(encseq->sat == GT_ACCESS_TYPE_DIRECTACCESS);
    cc = encseq->plainseq[pos];
    return (GT_ISNOTSPECIAL(cc) && GT_ISDIRCOMPLEMENT(readmode))
           ? GT_COMPLEMENTBASE(cc)
           : cc;
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x113faa
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x38(%rcx), %rax
jb 0x113fe2
movq 0xa0027(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4a0ab(%rip), %rsi     # 0x15e066
leaq 0x716f4(%rip), %rdx     # 0x1856b6
leaq 0x71720(%rip), %rcx     # 0x1856e9
leaq 0x7168e(%rip), %r8      # 0x18565e
movl $0xfe, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x113fe4
cmpl $0x1, 0x2c(%rsp)
je 0x113ff2
cmpl $0x3, 0x2c(%rsp)
jne 0x114009
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
subq $0x1, %rax
subq 0x30(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
testb $0x1, 0x3a8(%rax)
je 0x11407b
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jbe 0x11405d
movl $0x3, %eax
subl 0x2c(%rsp), %eax
movl %eax, 0x2c(%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rax), %rax
subq $0x1, %rax
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rdx
subq 0x30(%rdx), %rcx
subq $0x1, %rcx
subq %rcx, %rax
movq %rax, 0x30(%rsp)
jmp 0x114079
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jne 0x114077
movb $-0x1, 0x47(%rsp)
jmp 0x114493
jmp 0x114079
jmp 0x11407b
jmp 0x11407d
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
cmpq 0x30(%rcx), %rax
jb 0x1140c5
movq 0x9ff44(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x49fc8(%rip), %rsi     # 0x15e066
leaq 0x756e4(%rip), %rdx     # 0x189789
leaq 0x7163d(%rip), %rcx     # 0x1856e9
leaq 0x715ab(%rip), %r8      # 0x18565e
movl $0x10d, %r9d            # imm = 0x10D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1140c7
movq 0x38(%rsp), %rax
cmpq $0x0, 0x280(%rax)
je 0x11438c
movq 0x38(%rsp), %rax
movq 0x280(%rax), %rax
movq 0x30(%rsp), %rcx
shrq $0x5, %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rsp), %rdx
andq $0x1f, %rdx
movl $0x1f, %ecx
subq %rdx, %rcx
shlq %rcx
shrq %cl, %rax
andq $0x3, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
testb $0x1, 0x3a9(%rax)
je 0x114219
movq 0x38(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0x114145
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
movl 0x170(%rcx), %ecx
cmpq %rcx, %rax
je 0x114181
cmpl $0x2, 0x2c(%rsp)
je 0x114153
cmpl $0x3, 0x2c(%rsp)
jne 0x114168
movq 0x20(%rsp), %rax
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x18(%rsp)
jmp 0x114174
movq 0x20(%rsp), %rax
movzbl %al, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movb %al, 0x47(%rsp)
jmp 0x114493
movq 0x38(%rsp), %rax
cmpq $0x1, 0x40(%rax)
jbe 0x1141b5
movq 0x38(%rsp), %rax
movq 0x160(%rax), %rax
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq *%rax
testb $0x1, %al
jne 0x1141ab
jmp 0x1141b5
movb $-0x1, 0x47(%rsp)
jmp 0x114493
movq 0x38(%rsp), %rax
movq 0x140(%rax), %rax
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq *%rax
testb $0x1, %al
jne 0x1141d3
jmp 0x1141dd
movb $-0x2, 0x47(%rsp)
jmp 0x114493
cmpl $0x2, 0x2c(%rsp)
je 0x1141eb
cmpl $0x3, 0x2c(%rsp)
jne 0x114200
movq 0x20(%rsp), %rax
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
jmp 0x11420c
movq 0x20(%rsp), %rax
movzbl %al, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movb %al, 0x47(%rsp)
jmp 0x114493
movq 0x38(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x11429d
movq 0x38(%rsp), %rax
cmpq $0x1, 0x40(%rax)
je 0x114257
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
movl 0x170(%rcx), %ecx
cmpq %rcx, %rax
jne 0x114257
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1144a0
testb $0x1, %al
jne 0x114293
cmpl $0x2, 0x2c(%rsp)
je 0x114265
cmpl $0x3, 0x2c(%rsp)
jne 0x11427a
movq 0x20(%rsp), %rax
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x10(%rsp)
jmp 0x114286
movq 0x20(%rsp), %rax
movzbl %al, %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movb %al, 0x47(%rsp)
jmp 0x114493
movb $-0x1, 0x47(%rsp)
jmp 0x114493
jmp 0x11429f
movq 0x38(%rsp), %rax
cmpl $0x3, (%rax)
je 0x1142e1
movq 0x9fd28(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x49dac(%rip), %rsi     # 0x15e066
leaq 0x71443(%rip), %rdx     # 0x185704
leaq 0x71421(%rip), %rcx     # 0x1856e9
leaq 0x7138f(%rip), %r8      # 0x18565e
movl $0x130, %r9d            # imm = 0x130
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1142e3
movq 0x38(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0x114331
cmpq $0x1, 0x20(%rsp)
ja 0x114331
movq 0x38(%rsp), %rax
movq 0x2b0(%rax), %rax
movq 0x30(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0x30(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x11436d
cmpl $0x2, 0x2c(%rsp)
je 0x11433f
cmpl $0x3, 0x2c(%rsp)
jne 0x114354
movq 0x20(%rsp), %rax
movzbl %al, %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
jmp 0x114360
movq 0x20(%rsp), %rax
movzbl %al, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movb %al, 0x47(%rsp)
jmp 0x114493
movq 0x20(%rsp), %rdx
movl $0xfe, %eax
movl $0xff, %ecx
cmpq $0x1, %rdx
cmovel %ecx, %eax
movb %al, 0x47(%rsp)
jmp 0x114493
movq 0x38(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x1143f8
jmp 0x114398
cmpl $0x2, 0x2c(%rsp)
je 0x1143a6
cmpl $0x3, 0x2c(%rsp)
jne 0x1143de
movq 0x9fc2b(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x49caf(%rip), %rsi     # 0x15e066
leaq 0x7136e(%rip), %rdx     # 0x18572c
leaq 0x71324(%rip), %rcx     # 0x1856e9
leaq 0x71292(%rip), %r8      # 0x18565e
movl $0x13f, %r9d            # imm = 0x13F
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1143e0
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x1145e0
movb %al, 0x47(%rsp)
jmp 0x114493
jmp 0x1143fa
movq 0x38(%rsp), %rax
cmpl $0x0, (%rax)
je 0x11443c
movq 0x9fbcd(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x49c51(%rip), %rsi     # 0x15e066
leaq 0x7132e(%rip), %rdx     # 0x18574a
leaq 0x712c6(%rip), %rcx     # 0x1856e9
leaq 0x71234(%rip), %r8      # 0x18565e
movl $0x145, %r9d            # imm = 0x145
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x11443e
movq 0x38(%rsp), %rax
movq 0x290(%rax), %rax
movq 0x30(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0x1f(%rsp)
movzbl 0x1f(%rsp), %eax
cmpl $0xfe, %eax
jge 0x114482
cmpl $0x2, 0x2c(%rsp)
je 0x114470
cmpl $0x3, 0x2c(%rsp)
jne 0x114482
movzbl 0x1f(%rsp), %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x8(%rsp)
jmp 0x11448b
movzbl 0x1f(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
addq $0x48, %rsp
retq
nopl (%rax)