// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-bwtseq-extinfo.c
// Function: isSortModeTransition
static inline int
isSortModeTransition(RandomSeqAccessor origSeqAccess, GtUword seqLen,
                     const MRAEnc *alphabet,
                     const enum rangeSortMode *rangeSort,
                     GtUword pos)
{
  Symbol syms[2];
  if (pos > 0 && pos < seqLen - 1)
  {
#ifndef NDEBUG
    int retcode =
#endif
      accessSequence(origSeqAccess, syms, pos - 1, 2);
    gt_assert(retcode == 2);
  }
  else if (pos == 0)
  {
#ifndef NDEBUG
    int retcode =
#endif
      accessSequence(origSeqAccess, syms + 1, 0, 1);
    gt_assert(retcode == 1);
    syms[0] = GT_UNDEFBWTCHAR;
  }
  else /* pos == seqLen - 1 */
  {
#ifndef NDEBUG
    int retcode =
#endif
      accessSequence(origSeqAccess, syms, seqLen - 2, 1);
    gt_assert(retcode == 1);
    syms[1] = GT_UNDEFBWTCHAR;
  }
  {
    AlphabetRangeID range[2];
    range[0] = MRAEncGetRangeOfSymbol(alphabet,
                                      MRAEncMapSymbol(alphabet, syms[0]));
    range[1] = MRAEncGetRangeOfSymbol(alphabet,
                                      MRAEncMapSymbol(alphabet, syms[1]));
    return rangeSort[range[0]] != rangeSort[range[1]];
  }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jbe 0x22433e
movq 0x28(%rsp), %rax
movq 0x40(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x22433e
leaq 0x26(%rsp), %rdx
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl $0x2, %r8d
callq 0x2245e0
movl %eax, 0x20(%rsp)
cmpl $0x2, 0x20(%rsp)
je 0x224337
movq 0x417c9a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f1d03(%rip), %rsi    # 0x516013
leaq 0x350ca4(%rip), %rdx    # 0x574fbb
leaq 0x350caa(%rip), %rcx    # 0x574fc8
leaq 0x35096f(%rip), %r8     # 0x574c94
movl $0x162, %r9d            # imm = 0x162
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x224339
jmp 0x224423
cmpq $0x0, 0x28(%rsp)
jne 0x2243b4
leaq 0x26(%rsp), %rdx
addq $0x1, %rdx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
xorl %eax, %eax
movl %eax, %ecx
movl $0x1, %r8d
callq 0x2245e0
movl %eax, 0x1c(%rsp)
cmpl $0x1, 0x1c(%rsp)
je 0x2243ab
movq 0x417c26(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f1c8f(%rip), %rsi    # 0x516013
leaq 0x350c52(%rip), %rdx    # 0x574fdd
leaq 0x350c36(%rip), %rcx    # 0x574fc8
leaq 0x3508fb(%rip), %r8     # 0x574c94
movl $0x16a, %r9d            # imm = 0x16A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2243ad
movb $-0x2, 0x26(%rsp)
jmp 0x224421
leaq 0x26(%rsp), %rdx
movq 0x40(%rsp), %rcx
subq $0x2, %rcx
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl $0x1, %r8d
callq 0x2245e0
movl %eax, 0x18(%rsp)
cmpl $0x1, 0x18(%rsp)
je 0x22441a
movq 0x417bb7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2f1c20(%rip), %rsi    # 0x516013
leaq 0x350be3(%rip), %rdx    # 0x574fdd
leaq 0x350bc7(%rip), %rcx    # 0x574fc8
leaq 0x35088c(%rip), %r8     # 0x574c94
movl $0x173, %r9d            # imm = 0x173
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x22441c
movb $-0x2, 0x27(%rsp)
jmp 0x224423
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
movzbl 0x26(%rsp), %esi
callq 0x2241b0
movq (%rsp), %rdi
movzbl %al, %esi
callq 0x224620
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movzbl 0x27(%rsp), %esi
callq 0x2241b0
movq 0x8(%rsp), %rdi
movzbl %al, %esi
callq 0x224620
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movl 0x10(%rsp), %ecx
movl (%rax,%rcx,4), %eax
movq 0x30(%rsp), %rcx
movl 0x14(%rsp), %edx
cmpl (%rcx,%rdx,4), %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
addq $0x58, %rsp
retq
nopw (%rax,%rax)