// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_diagbandseed_verify
static int gt_diagbandseed_verify(const GtSeedpairlist *seedpairlist,
                                  const GtEncseq *aencseq,
                                  const GtEncseq *bencseq,
                                  unsigned int seedlength,
                                  bool reverse,
                                  bool verbose,
                                  FILE *stream,
                                  GtError *err) {
  const GtUword mlistlen = gt_seedpairlist_length(seedpairlist);
  GtTimer *timer = NULL;
  GtUword idx;
  char *buf1 = gt_malloc(3 * (seedlength + 1) * sizeof *buf1);
  char *buf2 = buf1 + 1 + seedlength;
  char *buf3 = buf2 + 1 + seedlength;
  buf1[seedlength] = buf2[seedlength] = buf3[seedlength] = '\0';

  if (verbose) {
    fprintf(stream, "# start verifying seeds ...\n");
    timer = gt_timer_new();
    gt_timer_start(timer);
  }

  gt_assert(aencseq != NULL && bencseq != NULL);
  for (idx = 0; idx < mlistlen; idx++)
  {
    GtDiagbandseedSeedPair seedpair;
    GtDiagbandseedPosition abs_apos, abs_bpos;

    gt_seedpairlist_at(&seedpair,seedpairlist,idx);
    /* extract decoded k-mers at seed positions */
    abs_apos = GT_DIAGBANDSEED_GETPOS_A(&seedpair) +
               gt_encseq_seqstartpos(aencseq, seedpair.aseqnum);
    gt_encseq_extract_decoded(aencseq, buf1, abs_apos + 1 - seedlength,
                              abs_apos);

    if (!reverse) {
      GtDiagbandseedPosition apos = GT_DIAGBANDSEED_GETPOS_A(&seedpair),
                             bpos = GT_DIAGBANDSEED_GETPOS_B(&seedpair);

      abs_bpos = GT_DIAGBANDSEED_CONV_B(apos,bpos) +
                 gt_encseq_seqstartpos(bencseq,seedpair.bseqnum);
      gt_encseq_extract_decoded(bencseq, buf2, abs_bpos + 1 - seedlength,
                                abs_bpos);
      if (strcmp(buf1, buf2) != 0) {
        gt_error_set(err, "Wrong SeedPair (%" PRIu32
                          ",%" PRIu32 ",%" PRIu32 ",%" GT_WUS "): %s != %s\n",
                     seedpair.aseqnum, seedpair.bseqnum,
                     apos,
                     GT_DIAGBANDSEED_CONV_B(apos,bpos),
                     buf1, buf2);
        gt_free(buf1);
        if (verbose)
        {
          gt_timer_delete(timer);
        }
        return -1;
      }
    } else {
      /* get reverse k-mer */
      char *bufptr;
      abs_bpos = gt_encseq_seqstartpos(bencseq, seedpair.bseqnum) +
                 gt_encseq_seqlength(bencseq, seedpair.bseqnum)
                 - GT_DIAGBANDSEED_GETPOS_B(&seedpair) - 1;
      gt_encseq_extract_decoded(bencseq, buf2, abs_bpos,
                                abs_bpos + seedlength - 1);

      for (bufptr = buf3; bufptr < buf3 + seedlength; bufptr++) {
        gt_complement(bufptr, buf2[seedlength + buf3 - bufptr - 1], NULL);
      }
      if (strcmp(buf1, buf3) != 0) {
        gt_error_set(err, "Wrong SeedPair (" "%"PRIu32
                          ",%"PRIu32",%"PRIu32",%"PRIu32"): %s != %s\n",
                     seedpair.aseqnum, seedpair.bseqnum,
                     GT_DIAGBANDSEED_GETPOS_A(&seedpair),
                     GT_DIAGBANDSEED_GETPOS_B(&seedpair), buf1, buf3);
        gt_free(buf1);
        if (verbose)
        {
          gt_timer_delete(timer);
        }
        return -1;
      }
    }
  }
  if (verbose) {
    fprintf(stream, "# ...successfully verified all seeds ");
    gt_timer_show_formatted(timer, GT_DIAGBANDSEED_FMT, stream);
    gt_timer_delete(timer);
  }
  gt_free(buf1);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, %ebp
movl %r8d, 0x44(%rsp)
movl %ecx, %ebx
movq %rdx, 0x30(%rsp)
movq %rsi, 0x68(%rsp)
movq 0xc0(%rsp), %r13
movq %rdi, 0x60(%rsp)
callq 0x13f027
movq %rax, 0x78(%rsp)
leal (%rbx,%rbx,2), %edi
addl $0x3, %edi
leaq 0x200d41(%rip), %rsi    # 0x33febc
movl $0x808, %edx            # imm = 0x808
callq 0x93160
movq %rax, %r12
movq %rbx, 0x38(%rsp)
movl %ebx, %ebx
leaq (%rax,%rbx), %r14
leaq (%rbx,%r14), %r15
incq %r15
xorl %eax, %eax
movb %al, 0x1(%rbx,%r15)
movb %al, 0x1(%rbx,%r14)
movb %al, (%r12,%rbx)
movl %ebp, 0xc(%rsp)
testl %ebp, %ebp
je 0x13f1db
leaq 0x201fa1(%rip), %rdi    # 0x34115a
pushq $0x1c
popq %rsi
pushq $0x1
popq %rdx
movq %r13, %rcx
callq 0x17f00
callq 0xaf478
movq %rax, 0x10(%rsp)
movq %rax, %rdi
callq 0xaf4d6
jmp 0x13f1e4
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x13f4ac
cmpq $0x0, 0x30(%rsp)
je 0x13f4ac
leaq (%r12,%rbx), %rax
incq %rax
movq %rax, 0x28(%rsp)
leaq 0x2(%rbx,%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0x1(%rbx,%r15), %r13
movq 0x38(%rsp), %rax
decl %eax
movl %eax, 0x40(%rsp)
leaq (%r12,%rbx,2), %rax
movq %rax, 0x70(%rsp)
xorl %edx, %edx
cmpq 0x78(%rsp), %rdx
movq 0x60(%rsp), %r15
je 0x13f38f
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rdx, 0x80(%rsp)
callq 0x14191c
movl 0x4c(%rsp), %esi
movl 0x50(%rsp), %ebp
movq 0x68(%rsp), %rbx
movq %rbx, %rdi
movq %rsi, 0x58(%rsp)
callq 0x74d9c
leal (%rax,%rbp), %ecx
movl %ecx, %edx
subl 0x38(%rsp), %edx
incl %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x7239d
cmpb $0x0, 0x44(%rsp)
je 0x13f31a
movq %rbp, 0x18(%rsp)
movq %r12, %r15
movl 0x48(%rsp), %r14d
movq 0x30(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x74d9c
movq %rax, %rbx
movq %r12, %rdi
movq %r14, %rsi
callq 0x75173
addq %rax, %rbx
movl 0x54(%rsp), %ebp
movq %rbp, %rcx
notq %rcx
addq %rbx, %rcx
movl %ecx, %edx
addl 0x40(%rsp), %ecx
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0x7239d
movq 0x70(%rsp), %r12
movq 0x20(%rsp), %rbx
cmpq %r13, %rbx
jae 0x13f301
movsbl (%r12), %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x292b2c
incq %rbx
decq %r12
jmp 0x13f2e5
movq %r15, %r12
movq %r15, %rdi
movq 0x20(%rsp), %rsi
callq 0x179e0
testl %eax, %eax
je 0x13f37f
jmp 0x13f3ed
movl 0x54(%rsp), %eax
cmpb $0x1, 0xb0(%r15)
movq %rax, %rbx
jne 0x13f336
leaq (%rax,%rbp), %rbx
subq 0xb8(%r15), %rbx
movq %rax, 0x18(%rsp)
movl 0x48(%rsp), %r15d
movq 0x30(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x74d9c
addq %rbx, %rax
movl %eax, %ecx
subl 0x38(%rsp), %eax
leal 0x1(%rax), %edx
movq %r14, %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x7239d
movq %r12, %rdi
movq %rbx, %rsi
callq 0x179e0
testl %eax, %eax
jne 0x13f42c
movq 0x80(%rsp), %rdx
incq %rdx
jmp 0x13f22d
cmpb $0x0, 0xc(%rsp)
je 0x13f3d2
leaq 0x201e65(%rip), %rdi    # 0x341202
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
movq 0xc0(%rsp), %r14
movq %r14, %rcx
callq 0x17f00
leaq 0x201558(%rip), %rsi    # 0x340912
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rdx
callq 0xaf5b6
movq %rbx, %rdi
callq 0xafc5b
leaq 0x200ae3(%rip), %rsi    # 0x33febc
movq %r12, %rdi
movl $0x856, %edx            # imm = 0x856
callq 0x936f9
xorl %eax, %eax
jmp 0x13f49a
leaq 0x201de6(%rip), %rsi    # 0x3411da
movq 0xc8(%rsp), %rdi
movq 0x58(%rsp), %rdx
movl %r14d, %ecx
movq 0x18(%rsp), %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq 0x20(%rsp)
pushq %r12
callq 0x89dbb
popq %rax
popq %rcx
leaq 0x200a9a(%rip), %rsi    # 0x33febc
movq %r12, %rdi
movl $0x848, %edx            # imm = 0x848
jmp 0x13f481
movq 0x60(%rsp), %rax
cmpb $0x1, 0xb0(%rax)
movq 0x18(%rsp), %r9
jne 0x13f449
addq %rbp, %r9
subq 0xb8(%rax), %r9
leaq 0x201d61(%rip), %rsi    # 0x3411b1
movq 0xc8(%rsp), %rdi
movq 0x58(%rsp), %rdx
movl %r15d, %ecx
movl %ebp, %r8d
xorl %eax, %eax
pushq 0x28(%rsp)
pushq %r12
callq 0x89dbb
popq %rax
popq %rcx
leaq 0x200a43(%rip), %rsi    # 0x33febc
movq %r12, %rdi
movl $0x82f, %edx            # imm = 0x82F
callq 0x936f9
cmpb $0x0, 0xc(%rsp)
je 0x13f497
movq 0x10(%rsp), %rdi
callq 0xafc5b
pushq $-0x1
popq %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2f8ab5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1a5b56(%rip), %rsi    # 0x2e5013
leaq 0x201cb3(%rip), %rdx    # 0x341177
leaq 0x201ccf(%rip), %rcx    # 0x34119a
leaq 0x2009ea(%rip), %r8     # 0x33febc
movl $0x813, %r9d            # imm = 0x813
xorl %eax, %eax
callq 0x17a50
callq 0x17390