// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/hpol_processor.c
// Function: gt_hpol_processor_refregioncheck
static void gt_hpol_processor_refregioncheck(
    GtAlignedSegment *as, void *data)
{
  GtHpolProcessor *hpp = data;
  GtUword rlen, i, startpos;
  char *r;
  bool haserr = false;
  gt_assert(hpp != NULL);
  gt_aligned_segment_ungap_refregion(as);
  gt_aligned_segment_assign_refregion_chars(as, hpp->encseq);
  r = gt_aligned_segment_refregion(as);
  rlen = (GtUword)strlen(r);
  startpos = gt_aligned_segment_refregion_startpos(as);
  for (i = 0; i < rlen; i++)
  {
    if (r[i] != gt_encseq_get_decoded_char(hpp->encseq, startpos + i,
          GT_READMODE_FORWARD))
    {
      haserr = true;
    }
  }
  if (haserr)
  {
    char *s;
    gt_aligned_segment_ungap_seq_and_qual(as);
    s = gt_aligned_segment_seq(as);
    fprintf(stderr, "segment   = %s\n", s);
    fprintf(stderr, "refregion = %s\n", r);
    fprintf(stderr, "            ");
    for (i = 0; i < rlen; i++)
    {
      if (r[i] != gt_encseq_get_decoded_char(hpp->encseq, startpos + i,
            GT_READMODE_FORWARD))
        fprintf(stderr, "X");
      else
        fprintf(stderr, " ");
    }
    fprintf(stderr, "\n");
    fprintf(stderr, "cognate = ");
    for (i = 0; i < rlen; i++)
    {
      fprintf(stderr, "%c", gt_encseq_get_decoded_char(hpp->encseq,
            startpos + i, GT_READMODE_FORWARD));
    }
    fprintf(stderr, "\n");
    fprintf(stderr, "[startpos = "GT_WU"]\n", startpos);
    exit(EXIT_FAILURE);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0xee60b
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2966ea
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x296b4a
movq %r14, %rdi
callq 0x2963b3
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0x172d0
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x296439
movq %rax, %r14
xorl %ebp, %ebp
xorl %r13d, %r13d
cmpq %r13, %r15
je 0xee4ed
movq 0x8(%rsp), %rax
movb (%rax,%r13), %r12b
movq (%rbx), %rdi
leaq (%r14,%r13), %rsi
xorl %edx, %edx
callq 0x709bc
cmpb %al, %r12b
setne %al
orb %al, %bpl
incq %r13
jmp 0xee4c3
testb $0x1, %bpl
jne 0xee502
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x29680e
movq %r12, %rdi
callq 0x29632e
movq 0x349a4a(%rip), %r13    # 0x437f68
movq (%r13), %rdi
leaq 0x23566b(%rip), %rsi    # 0x323b94
xorl %ebp, %ebp
movq %rax, %rdx
xorl %eax, %eax
callq 0x17a50
movq (%r13), %rdi
leaq 0x235664(%rip), %rsi    # 0x323ba4
movq 0x8(%rsp), %rdx
xorl %eax, %eax
callq 0x17a50
movq (%r13), %rcx
leaq 0x23565d(%rip), %rdi    # 0x323bb4
pushq $0xc
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
cmpq %rbp, %r15
je 0xee598
movq 0x8(%rsp), %rax
movb (%rax,%rbp), %r12b
movq (%rbx), %rdi
leaq (%r14,%rbp), %rsi
xorl %edx, %edx
callq 0x709bc
cmpb %al, %r12b
movq (%r13), %rsi
pushq $0x58
popq %rdi
pushq $0x20
popq %rax
cmovel %eax, %edi
callq 0x17930
incq %rbp
jmp 0xee562
movq (%r13), %rsi
pushq $0xa
popq %rdi
callq 0x17930
movq (%r13), %rcx
leaq 0x235612(%rip), %rdi    # 0x323bc1
pushq $0xa
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
xorl %ebp, %ebp
movq (%r13), %r12
cmpq %rbp, %r15
je 0xee5e3
movq (%rbx), %rdi
leaq (%r14,%rbp), %rsi
xorl %edx, %edx
callq 0x709bc
movsbl %al, %edi
movq %r12, %rsi
callq 0x17930
incq %rbp
jmp 0xee5bc
pushq $0xa
popq %rdi
movq %r12, %rsi
callq 0x17930
movq (%r13), %rdi
leaq 0x2355d3(%rip), %rsi    # 0x323bcc
movq %r14, %rdx
xorl %eax, %eax
callq 0x17a50
pushq $0x1
popq %rdi
callq 0x178f0
movq 0x349956(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1f69f7(%rip), %rsi    # 0x2e5013
leaq 0x2353db(%rip), %rdx    # 0x3239fe
leaq 0x235549(%rip), %rcx    # 0x323b73
leaq 0x235390(%rip), %r8     # 0x3239c1
movl $0xf8, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390