// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_reader_next_encoded_char
GtUchar gt_encseq_reader_next_encoded_char(GtEncseqReader *esr)
{
  GtUchar cc;
  gt_assert(esr->encseq
              && esr->currentpos < esr->encseq->logicaltotallength);
  /* if we have mirroring enabled, we need to check whether we cross the
     boundary between real and virtual sequences, turn around if necessary */
  if (esr->encseq->hasmirror && esr->currentpos == esr->encseq->totallength) {
    if (!esr->startedonmiddle) {
      /* only turn around if we arrived from complementary side */
      gt_readmode_invert(esr->readmode);
      /* from now on, we can only go backwards on the original sequence! */
      gt_assert(GT_ISDIRREVERSE(esr->readmode));
    }
    /* go back */
    esr->currentpos--;
    if (esr->encseq->accesstype_via_utables) {
      /* prepare esr for directional change */
      if (esr->encseq->has_wildcardranges) {
        gt_assert(esr->wildcardrangestate != NULL);
        binpreparenextrangeGtEncseqReader(esr, SWtable_wildcardrange);
        advancerangeGtEncseqReader(esr, SWtable_wildcardrange);
      }
      if (esr->encseq->numofdbsequences > 1UL) {
        gt_assert(esr->ssptabstate != NULL);
        binpreparenextrangeGtEncseqReader(esr, SWtable_ssptab);
        advancerangeGtEncseqReader(esr, SWtable_ssptab);
      }
    }
    else {
      if (esr->encseq->sat == GT_ACCESS_TYPE_EQUALLENGTH) {
        esr->currentpos++;
        singlepositioninseparatorViaequallength_updatestate(esr);
        esr->currentpos--;
      }
    }
    return (GtUchar) GT_SEPARATOR;
  }
  gt_assert(esr && esr->currentpos < esr->encseq->totallength);

  switch (esr->readmode) {
    case GT_READMODE_FORWARD:
      cc = esr->encseq->seqdeliverchar(esr);
      esr->currentpos++;
      return cc;
    case GT_READMODE_REVERSE:
      cc = esr->encseq->seqdeliverchar(esr);
      esr->currentpos--;
      return cc;
    case GT_READMODE_COMPL: /* only works with dna */
      cc = esr->encseq->seqdeliverchar(esr);
      esr->currentpos++;
      return GT_ISSPECIAL(cc) ? cc : GT_COMPLEMENTBASE(cc);
    case GT_READMODE_REVCOMPL: /* only works with dna */
      cc = esr->encseq->seqdeliverchar(esr);
      esr->currentpos--;
      return GT_ISSPECIAL(cc) ? cc : GT_COMPLEMENTBASE(cc);
    default:
      fprintf(stderr, "gt_encseq_get_encoded_char: "
                     "readmode %d not implemented\n", (int) esr->readmode);
      exit(GT_EXIT_PROGRAMMING_ERROR);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0x11503b
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
cmpq 0x38(%rcx), %rax
jb 0x115073
movq 0x9ef96(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x4901a(%rip), %rsi     # 0x15e066
leaq 0x70855(%rip), %rdx     # 0x1858a8
leaq 0x7088f(%rip), %rcx     # 0x1858e9
leaq 0x705fd(%rip), %r8      # 0x18565e
movl $0x208, %r9d            # imm = 0x208
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x115075
movq 0x18(%rsp), %rax
movq (%rax), %rax
testb $0x1, 0x3a8(%rax)
je 0x115267
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jne 0x115267
movq 0x18(%rsp), %rax
testb $0x1, 0x20(%rax)
jne 0x115117
movq 0x18(%rsp), %rax
movl $0x3, %ecx
subl 0x8(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rax
cmpl $0x1, 0x8(%rax)
je 0x115113
movq 0x18(%rsp), %rax
cmpl $0x3, 0x8(%rax)
je 0x115113
movq 0x9eef6(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x48f7a(%rip), %rsi     # 0x15e066
leaq 0x7452f(%rip), %rdx     # 0x189622
leaq 0x707ef(%rip), %rcx     # 0x1858e9
leaq 0x7055d(%rip), %r8      # 0x18565e
movl $0x210, %r9d            # imm = 0x210
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x115115
jmp 0x115117
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rax
testb $0x1, 0x3a9(%rax)
je 0x115222
movq 0x18(%rsp), %rax
movq (%rax), %rax
testb $0x1, 0x29(%rax)
je 0x1151ab
jmp 0x11514d
movq 0x18(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x115191
movq 0x9ee78(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x48efc(%rip), %rsi     # 0x15e066
leaq 0x7079b(%rip), %rdx     # 0x18590c
leaq 0x70771(%rip), %rcx     # 0x1858e9
leaq 0x704df(%rip), %r8      # 0x18565e
movl $0x217, %r9d            # imm = 0x217
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x115193
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x115450
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x115520
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpq $0x1, 0x40(%rax)
jbe 0x115220
jmp 0x1151bc
movq 0x18(%rsp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x115200
movq 0x9ee09(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x48e8d(%rip), %rsi     # 0x15e066
leaq 0x7074c(%rip), %rdx     # 0x18592c
leaq 0x70702(%rip), %rcx     # 0x1858e9
leaq 0x70470(%rip), %r8      # 0x18565e
movl $0x21c, %r9d            # imm = 0x21C
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x115202
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x115450
movq 0x18(%rsp), %rdi
movl $0x1, %esi
callq 0x115520
jmp 0x11525d
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpl $0x2, (%rax)
jne 0x11525b
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rdi
callq 0x1155f0
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x11525d
movb $-0x1, 0x27(%rsp)
jmp 0x115440
jmp 0x115269
cmpq $0x0, 0x18(%rsp)
je 0x115288
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
cmpq 0x30(%rcx), %rax
jb 0x1152c0
movq 0x9ed49(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x48dcd(%rip), %rsi     # 0x15e066
leaq 0x706a5(%rip), %rdx     # 0x185945
leaq 0x70642(%rip), %rcx     # 0x1858e9
leaq 0x703b0(%rip), %r8      # 0x18565e
movl $0x22a, %r9d            # imm = 0x22A
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x1152c2
movq 0x18(%rsp), %rax
movl 0x8(%rax), %eax
movq %rax, 0x8(%rsp)
subq $0x3, %rax
ja 0x115416
movq 0x8(%rsp), %rax
leaq 0x7014b(%rip), %rcx     # 0x185430
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movb 0x17(%rsp), %al
movb %al, 0x27(%rsp)
jmp 0x115440
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movb 0x17(%rsp), %al
movb %al, 0x27(%rsp)
jmp 0x115440
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
movzbl 0x17(%rsp), %eax
cmpl $0xfe, %eax
jl 0x1153a0
movzbl 0x17(%rsp), %eax
movl %eax, 0x4(%rsp)
jmp 0x1153b0
movzbl 0x17(%rsp), %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
movb %al, 0x27(%rsp)
jmp 0x115440
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x110(%rax), %rax
movq 0x18(%rsp), %rdi
callq *%rax
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x10(%rax)
movzbl 0x17(%rsp), %eax
cmpl $0xfe, %eax
jl 0x1153fe
movzbl 0x17(%rsp), %eax
movl %eax, (%rsp)
jmp 0x11540d
movzbl 0x17(%rsp), %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, (%rsp)
movl (%rsp), %eax
movb %al, 0x27(%rsp)
jmp 0x115440
movq 0x9ebbb(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
movq 0x18(%rsp), %rax
movl 0x8(%rax), %edx
leaq 0x70548(%rip), %rsi     # 0x185977
movb $0x0, %al
callq 0xb890
movl $0x2, %edi
callq 0xb780
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nopl (%rax)