// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: multicharactercompare_withtest
static void multicharactercompare_withtest(const GtEncseq *encseq,
                                           GtReadmode readmode,
                                           GtUword pos1,
                                           GtUword pos2)
{
  GtEndofTwobitencoding ptbe1, ptbe2;
  GtCommonunits commonunits1;
  GtUword commonunits2, twobitencodingstoppos1, twobitencodingstoppos2;
  int ret1, ret2;
  GtEncseqReader *esr1, *esr2;
  bool fwd = GT_ISDIRREVERSE(readmode) ? false : true,
       complement = GT_ISDIRCOMPLEMENT(readmode) ? true : false;

  esr1 = gt_encseq_create_reader_with_readmode(encseq, readmode, pos1);
  if (gt_encseq_has_twobitencoding_stoppos_support(encseq))
    twobitencodingstoppos1 = gt_getnexttwobitencodingstoppos (fwd, esr1);
  else
    twobitencodingstoppos1 = GT_TWOBITENCODINGSTOPPOSUNDEF(encseq);

  ptbe1.referstartpos = esr1->currentpos;
  esr1->currentpos = gt_encseq_extract2bitenc(&ptbe1, encseq, fwd,
                                              esr1->currentpos,
                                              twobitencodingstoppos1);
  esr2 = gt_encseq_create_reader_with_readmode(encseq, readmode, pos2);
  if (gt_encseq_has_twobitencoding_stoppos_support(encseq))
    twobitencodingstoppos2 = gt_getnexttwobitencodingstoppos (fwd, esr2);
  else
    twobitencodingstoppos2 = GT_TWOBITENCODINGSTOPPOSUNDEF(encseq);

  ptbe2.referstartpos = esr2->currentpos;
  esr2->currentpos = gt_encseq_extract2bitenc(&ptbe2, encseq, fwd,
                                              esr2->currentpos,
                                              twobitencodingstoppos2);
  gt_encseq_reader_delete(esr1);
  gt_encseq_reader_delete(esr2);
  ret1 = gt_encseq_compare_pairof_twobitencodings(fwd, complement,
                                                  &commonunits1, &ptbe1,
                                                  &ptbe2);
  commonunits2 = (GtUword) GT_UNITSIN2BITENC;
  if (GT_ISDIRREVERSE(readmode)) {
    pos1 = GT_REVERSEPOS(encseq->totallength, pos1);
    pos2 = GT_REVERSEPOS(encseq->totallength, pos2);
  }
  ret2 = gt_encseq_check_comparetwostrings(encseq, fwd, complement,
                                           &commonunits2, pos1, pos2, 0);
  if (ret1 != ret2 || commonunits2 != (GtUword) commonunits1.common) {
    char buf1[GT_INTWORDSIZE+1], buf2[GT_INTWORDSIZE+1];

    fprintf(stderr, "fwd=%s, complement=%s: "
                   "pos1="GT_WU", pos2="GT_WU"\n",
            fwd ? "true" : "false",
            complement ? "true" : "false",
            pos1, pos2);
    fprintf(stderr, "ret1=%d, ret2=%d\n", ret1, ret2);
    fprintf(stderr, "commonunits1=%u, commonunits2="GT_WU"\n",
            commonunits1.common, commonunits2);
    gt_encseq_showatstartpos(stderr, fwd, complement, encseq, pos1);
    gt_bitsequence_tostring(buf1, ptbe1.tbe);
    fprintf(stderr, "v1=%s(unitsnotspecial=%u)\n", buf1, ptbe1.unitsnotspecial);
    gt_encseq_showatstartpos(stderr, fwd, complement, encseq, pos2);
    gt_bitsequence_tostring(buf2, ptbe2.tbe);
    fprintf(stderr, "v2=%s(unitsnotspecial=%u)\n", buf2, ptbe2.unitsnotspecial);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, %eax
andl $-0x3, %eax
movl %eax, 0x14(%rsp)
movq %rdx, 0x38(%rsp)
callq 0xa3c4c
movq %rax, %r12
movq %rbx, %rdi
callq 0xa3eb4
testb %al, %al
je 0xb4ec2
xorl %edi, %edi
movq %r12, %rsi
callq 0xa808b
movq %rax, %r8
jmp 0xb4ece
movzbl 0x3a8(%rbx), %eax
movq 0x30(%rbx,%rax,8), %r8
movl %ebp, %eax
andl $-0x2, %eax
movl %eax, 0x28(%rsp)
xorl %edx, %edx
cmpl $0x1, 0x14(%rsp)
setne %dl
movq 0x10(%r12), %rcx
leaq 0x60(%rsp), %rdi
movq %rcx, 0x10(%rdi)
movq %rbx, %rsi
callq 0xa8312
movq %rax, 0x10(%r12)
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0xa3c4c
movq %rax, %r14
movq %rbx, %rdi
callq 0xa3eb4
testb %al, %al
movq %r15, 0x30(%rsp)
movq %r12, 0x18(%rsp)
je 0xb4f31
xorl %edi, %edi
movq %r14, %rsi
callq 0xa808b
movq %rax, %r8
jmp 0xb4f3d
movzbl 0x3a8(%rbx), %eax
movq 0x30(%rbx,%rax,8), %r8
xorl %ebp, %ebp
cmpl $0x2, 0x28(%rsp)
sete %bpl
xorl %r15d, %r15d
movl 0x14(%rsp), %r12d
cmpl $0x1, %r12d
setne %r15b
movq 0x10(%r14), %rcx
leaq 0x78(%rsp), %r13
movq %rcx, 0x10(%r13)
movq %r13, %rdi
movq %rbx, %rsi
movl %r15d, %edx
callq 0xa8312
movq %rax, 0x10(%r14)
movq 0x18(%rsp), %rdi
callq 0xa3c9a
movq %r14, %rdi
callq 0xa3c9a
leaq 0x50(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movl %r15d, %edi
movl %ebp, %esi
movq %r13, %r8
callq 0xa8a60
movl %eax, 0x2c(%rsp)
cmpl $0x1, %r12d
movq %rbx, 0x40(%rsp)
je 0xb4fe3
movq 0x38(%rbx), %rdx
movq %rdx, %rcx
movq 0x38(%rsp), %r10
subq %r10, %rcx
movq 0x30(%rsp), %r13
jbe 0xb524d
movq %rdx, %rax
subq %r13, %rax
jbe 0xb527b
movq %rdx, 0x18(%rsp)
cmpq %rax, %rcx
cmovbq %rcx, %rax
jmp 0xb500f
movq 0x30(%rbx), %r13
movq 0x38(%rbx), %rax
movq %rax, 0x18(%rsp)
decq %r13
movq %r13, %r10
subq 0x38(%rsp), %r10
subq 0x30(%rsp), %r13
leaq 0x1(%r10), %rsi
leaq 0x1(%r13), %rax
cmpq %rax, %rsi
cmovbq %rsi, %rax
cmpq $0x20, %rax
pushq $0x20
popq %r15
cmovbq %rax, %r15
pushq $-0x1
popq %r12
movq %r13, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
cmpq %r12, %r15
je 0xb50d5
leaq 0x1(%r12), %r9
movq %r9, 0x48(%rsp)
xorl %ebx, %ebx
cmpl $0x2, 0x28(%rsp)
sete %bl
xorl %r13d, %r13d
cmpl $0x1, 0x14(%rsp)
setne %r13b
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %ebx, %edx
movq %r10, %rcx
movq %r10, %rbp
movq %r15, %r8
callq 0xb52b3
movq %rax, 0x38(%rsp)
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
movq %r14, %rdi
movl %r13d, %esi
movq 0x30(%rsp), %r13
movl %ebx, %edx
movq 0x48(%rsp), %rbx
movq %r13, %rcx
movq %r15, %r14
movq %r15, %r8
movq %rbx, %r9
callq 0xb52b3
movq 0x38(%rsp), %rdx
cmpq %rax, %rdx
jne 0xb50da
incq %r12
cmpq %r13, %rbp
movq %rbp, %r10
movq %r14, %r15
jne 0xb5024
cmpq $0x100, %rdx            # imm = 0x100
jb 0xb5024
jmp 0xb510d
movq %r15, %r12
jmp 0xb510d
cmpl $0x1, 0x14(%rsp)
jne 0xb50f9
cmpq $0x100, %rdx            # imm = 0x100
jb 0xb50f9
cmpq $0x100, %rax            # imm = 0x100
jb 0xb50f9
xorl %ecx, %ecx
cmpq %rdx, %rax
jmp 0xb50fe
xorl %ecx, %ecx
cmpq %rax, %rdx
sbbl %ecx, %ecx
orl $0x1, %ecx
movl %ecx, 0x24(%rsp)
movq %rbx, %r12
movq %rbp, %r10
movl 0x24(%rsp), %ebp
cmpl %ebp, 0x2c(%rsp)
jne 0xb5132
movl 0x50(%rsp), %eax
cmpq %rax, %r12
jne 0xb5132
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
cmpl $0x1, 0x14(%rsp)
leaq 0x3f912(%rip), %rax     # 0xf4a52
leaq 0x28dc8(%rip), %rcx     # 0xddf0f
movq %rcx, %rdx
cmovneq %rax, %rdx
setne %sil
movl %esi, 0x18(%rsp)
xorl %r14d, %r14d
cmpl $0x2, 0x28(%rsp)
sete %r14b
movq 0x78e4f(%rip), %r15     # 0x12dfb8
movq (%r15), %rdi
cmoveq %rax, %rcx
leaq 0x3aced(%rip), %rsi     # 0xefe64
movq %r10, %rbx
movq %r10, %r8
movq %r13, %r9
xorl %eax, %eax
callq 0xb8c0
movq (%r15), %rdi
leaq 0x3acfe(%rip), %rsi     # 0xefe8f
movl 0x2c(%rsp), %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0xb8c0
movq (%r15), %rdi
movl 0x50(%rsp), %edx
leaq 0x3acf5(%rip), %rsi     # 0xefea1
movq %r12, %rcx
xorl %eax, %eax
callq 0xb8c0
movq (%r15), %rdi
movl 0x18(%rsp), %ebp
movl %ebp, %esi
movl %r14d, %r12d
movl %r14d, %edx
movq 0x40(%rsp), %r14
movq %r14, %rcx
movq %rbx, %r8
callq 0xa92c8
movq 0x60(%rsp), %rsi
leaq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0xb4e4d
movq (%r15), %rdi
movl 0x68(%rsp), %ecx
leaq 0x3accc(%rip), %rsi     # 0xefec4
movq %rbx, %rdx
xorl %eax, %eax
callq 0xb8c0
movq (%r15), %rdi
movl %ebp, %esi
movl %r12d, %edx
movq %r14, %rcx
movq %r13, %r8
callq 0xa92c8
movq 0x78(%rsp), %rsi
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0xb4e4d
movq (%r15), %rdi
movl 0x80(%rsp), %ecx
leaq 0x3aca4(%rip), %rsi     # 0xefedf
movq %rbx, %rdx
xorl %eax, %eax
callq 0xb8c0
pushq $0x2
popq %rdi
callq 0xb7b0
movq 0x78d64(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x14e08(%rip), %rsi     # 0xca066
leaq 0x3ac95(%rip), %rdx     # 0xefefa
leaq 0x3aca1(%rip), %rcx     # 0xeff0d
leaq 0x36927(%rip), %r8      # 0xebb9a
movl $0x1b52, %r9d           # imm = 0x1B52
jmp 0xb52a7
movq 0x78d36(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x14dda(%rip), %rsi     # 0xca066
leaq 0x3ac9c(%rip), %rdx     # 0xeff2f
leaq 0x3ac73(%rip), %rcx     # 0xeff0d
leaq 0x368f9(%rip), %r8      # 0xebb9a
movl $0x1b53, %r9d           # imm = 0x1B53
xorl %eax, %eax
callq 0xb8c0
callq 0xb300