// File: /workspace/github_c_makefile_star2_O3/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 0x152655
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2fa902
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x2faad3
movq %r14, %rdi
callq 0x2fa7ca
movq %rax, %r12
movq %rax, %rdi
callq 0x172f0
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x2fa7ea
testq %r15, %r15
je 0x152530
movq %rax, %r14
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %r12, 0x8(%rsp)
movq 0x8(%rsp), %rax
movb (%rax,%rbp), %r12b
movq (%rbx), %rdi
leaq (%r14,%rbp), %rsi
xorl %edx, %edx
callq 0xe7e3c
cmpb %al, %r12b
movq 0x8(%rsp), %r12
setne %al
orb %al, %r13b
incq %rbp
cmpq %rbp, %r15
jne 0x1524fd
testb $0x1, %r13b
jne 0x15253f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x2fa974
movq %r13, %rdi
callq 0x2fa7ab
movq 0x366a25(%rip), %r13    # 0x4b8f80
movq (%r13), %rdi
leaq 0x231226(%rip), %rsi    # 0x38378c
xorl %ebp, %ebp
movq %rax, %rdx
xorl %eax, %eax
callq 0x17ab0
movq (%r13), %rdi
leaq 0x23121f(%rip), %rsi    # 0x38379c
movq %r12, %rdx
xorl %eax, %eax
callq 0x17ab0
movq (%r13), %rcx
leaq 0x23121a(%rip), %rdi    # 0x3837ac
movl $0xc, %esi
movl $0x1, %edx
callq 0x17fa0
movq 0x8(%rsp), %rax
movb (%rax,%rbp), %r12b
movq (%rbx), %rdi
leaq (%r14,%rbp), %rsi
xorl %edx, %edx
callq 0xe7e3c
cmpb %al, %r12b
movq (%r13), %rsi
movl $0x58, %edi
movl $0x20, %eax
cmovel %eax, %edi
callq 0x17980
incq %rbp
cmpq %rbp, %r15
jne 0x1525a1
movq (%r13), %rsi
movl $0xa, %edi
callq 0x17980
movq (%r13), %rcx
leaq 0x2311c7(%rip), %rdi    # 0x3837b9
movl $0xa, %esi
movl $0x1, %edx
callq 0x17fa0
xorl %ebp, %ebp
movq (%r13), %r12
movq (%rbx), %rdi
leaq (%r14,%rbp), %rsi
xorl %edx, %edx
callq 0xe7e3c
movsbl %al, %edi
movq %r12, %rsi
callq 0x17980
incq %rbp
cmpq %rbp, %r15
jne 0x152603
movq (%r13), %rsi
movl $0xa, %edi
callq 0x17980
movq (%r13), %rdi
leaq 0x231183(%rip), %rsi    # 0x3837c4
movq %r14, %rdx
xorl %eax, %eax
callq 0x17ab0
movl $0x1, %edi
callq 0x17940
callq 0x4861c