// File: /workspace/github_c_makefile_star2_O1/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 0x159f68
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3045aa
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x30477b
movq %r14, %rdi
callq 0x304472
movq %rax, %r12
movq %rax, %rdi
callq 0x172f0
movq %rax, %r15
movq %r14, 0x10(%rsp)
movq %r14, %rdi
callq 0x304492
testq %r15, %r15
je 0x159e43
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 0xec478
cmpb %al, %r12b
movq 0x8(%rsp), %r12
movzbl %r13b, %r13d
movl $0x1, %eax
cmovnel %eax, %r13d
incq %rbp
cmpq %rbp, %r15
jne 0x159e09
testb $0x1, %r13b
jne 0x159e52
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x30461c
movq %r13, %rdi
callq 0x304453
movq 0x36a112(%rip), %r13    # 0x4c3f80
movq (%r13), %rdi
leaq 0x232cd3(%rip), %rsi    # 0x38cb4c
xorl %ebp, %ebp
movq %rax, %rdx
xorl %eax, %eax
callq 0x17ab0
movq (%r13), %rdi
leaq 0x232ccc(%rip), %rsi    # 0x38cb5c
movq %r12, %rdx
xorl %eax, %eax
callq 0x17ab0
movq (%r13), %rcx
leaq 0x232cc7(%rip), %rdi    # 0x38cb6c
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 0xec478
cmpb %al, %r12b
movq (%r13), %rsi
movl $0x58, %edi
movl $0x20, %eax
cmovel %eax, %edi
callq 0x17980
incq %rbp
cmpq %rbp, %r15
jne 0x159eb4
movq (%r13), %rsi
movl $0xa, %edi
callq 0x17980
movq (%r13), %rcx
leaq 0x232c74(%rip), %rdi    # 0x38cb79
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 0xec478
movsbl %al, %edi
movq %r12, %rsi
callq 0x17980
incq %rbp
cmpq %rbp, %r15
jne 0x159f16
movq (%r13), %rsi
movl $0xa, %edi
callq 0x17980
movq (%r13), %rdi
leaq 0x232c30(%rip), %rsi    # 0x38cb84
movq %r14, %rdx
xorl %eax, %eax
callq 0x17ab0
movl $0x1, %edi
callq 0x17940
callq 0x49490