// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/extended/linearalign.c
// Function: gt_linearalign_check_local
void gt_linearalign_check_local(GT_UNUSED bool forward,
                                const GtUchar *useq, GtUword ulen,
                                const GtUchar *vseq, GtUword vlen)
{
  GtAlignment *align;
  GtWord score1, score2, score3, score4,
         matchscore = 2, mismatchscore = -2, gapscore = -1;
  GtLinspaceManagement *spacemanager;
  GtScoreHandler *scorehandler;

  if (memchr(useq, LINEAR_EDIST_GAP,ulen) != NULL)
  {
    fprintf(stderr,"%s: sequence u contains gap symbol\n",__func__);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  if (memchr(vseq, LINEAR_EDIST_GAP,vlen) != NULL)
  {
    fprintf(stderr,"%s: sequence v contains gap symbol\n",__func__);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  scorehandler = gt_scorehandler_new(matchscore, mismatchscore, 0, gapscore);
  gt_scorehandler_plain(scorehandler);
  spacemanager = gt_linspace_management_new();
  align = gt_alignment_new();
  score1 = gt_linearalign_compute_local_generic(spacemanager, scorehandler,
                                                align, useq, 0, ulen,
                                                vseq, 0, vlen);

  score2 = gt_alignment_eval_with_score(align, true, matchscore,
                                        mismatchscore, gapscore);
  gt_linspace_management_delete(spacemanager);
  gt_scorehandler_delete(scorehandler);
  if (score1 != score2)
  {
    fprintf(stderr,"gt_linearalign_compute_local_generic = "GT_WD" != "GT_WD
            " = gt_alignment_eval_generic_with_score\n", score1, score2);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  gt_alignment_reset(align);
  score3 = gt_squarealign_calculate_local(NULL, align, useq, 0, ulen,
                                          vseq, 0, vlen, matchscore,
                                          mismatchscore, gapscore);

  if (score1 != score3)
  {
    fprintf(stderr,"gt_linearalign_compute_local_generic = "GT_WD" != "GT_WD
            " = gt_squarealign_calculate_local\n", score1, score3);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  score4 = gt_alignment_eval_with_score(align, true, matchscore,
                                        mismatchscore, gapscore);
  if (score3 != score4)
  {
    fprintf(stderr,"gt_squarealign_calculate_local = "GT_WD" != "GT_WD
            " = gt_alignment_eval_generic_with_score\n", score3, score4);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  gt_alignment_delete(align);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rsi, %rdi
movl $0xff, %esi
callq 0x17850
testq %rax, %rax
jne 0xf7789
movq %r15, %rdi
movl $0xff, %esi
movq %r14, 0x30(%rsp)
movq %r14, %rdx
callq 0x17850
testq %rax, %rax
jne 0xf779c
pushq $0x2
popq %rdi
pushq $-0x2
popq %rsi
pushq $-0x1
popq %rcx
xorl %edx, %edx
callq 0x1148f4
movq %rax, %rbx
movq %rax, %rdi
callq 0x114981
xorl %eax, %eax
callq 0xf9624
movq %rax, %r14
callq 0xb4e60
movq %rax, %rbp
andq $0x0, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r15, 0x40(%rsp)
movq %r15, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq 0xf6dd7
movq %r13, 0x38(%rsp)
movq %rax, %r13
pushq $0x1
popq %rsi
movq %rbp, %rdi
pushq $0x2
popq %rdx
pushq $-0x2
popq %rcx
pushq $-0x1
popq %r8
callq 0xb55cb
movq %rax, %r15
movq %r14, %rdi
callq 0xf9658
movq %rbx, %rdi
callq 0x114a03
cmpq %r15, %r13
jne 0xf77bd
movq %rbp, %rdi
callq 0xb52f8
orq $-0x1, 0x20(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
andq $0x0, (%rsp)
movq $-0x2, 0x18(%rsp)
movq $0x2, 0x10(%rsp)
xorl %edi, %edi
movq %rbp, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movq 0x38(%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x11f54c
cmpq %rax, %r13
jne 0xf77d6
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
pushq $-0x2
popq %rcx
pushq $-0x1
popq %r8
movq %rbp, %rdi
callq 0xb55cb
cmpq %rax, %r13
jne 0xf77e9
movq %rbp, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb647f
movq 0x3407d8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x223880(%rip), %rsi    # 0x31b01a
jmp 0xf77ad
movq 0x3407c5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x223891(%rip), %rsi    # 0x31b03e
leaq 0x1fa73c(%rip), %rdx    # 0x2f1ef0
xorl %eax, %eax
callq 0x17a50
jmp 0xf7807
movq 0x3407a4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x22e909(%rip), %rsi    # 0x3260d7
movq %r13, %rdx
movq %r15, %rcx
jmp 0xf7800
movq 0x34078b(%rip), %rcx    # 0x437f68
movq (%rcx), %rdi
leaq 0x22e94a(%rip), %rsi    # 0x326131
jmp 0xf77fa
movq 0x340778(%rip), %rcx    # 0x437f68
movq (%rcx), %rdi
leaq 0x22e98b(%rip), %rsi    # 0x326185
movq %r13, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17a50
pushq $0x2
popq %rdi
callq 0x178f0