// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %rbx
movq %rsi, %r12
movq %rsi, %rdi
movl $0xff, %esi
callq 0x178a0
testq %rax, %rax
jne 0x161a19
movq %rbx, 0x20(%rsp)
movq %rbp, %rdi
movl $0xff, %esi
movq %r15, %rdx
callq 0x178a0
testq %rax, %rax
jne 0x161a1e
movl $0x2, %edi
movq $-0x2, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
callq 0x179740
movq %rax, %rbx
movq %rax, %rdi
callq 0x1797a3
xorl %eax, %eax
callq 0x1638ec
movq %rax, %r14
callq 0x126b24
movq %rax, %r13
subq $0x8, %rsp
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r12, 0x10(%rsp)
movq %r12, %rcx
xorl %r8d, %r8d
movq 0x28(%rsp), %r12
movq %r12, %r9
movq %r15, 0x20(%rsp)
pushq %r15
pushq $0x0
movq %rbp, 0x28(%rsp)
pushq %rbp
callq 0x161058
addq $0x20, %rsp
movq %rax, %rbp
movl $0x2, %edx
movq %r13, %rdi
movl $0x1, %esi
movq $-0x2, %rcx
movq $-0x1, %r8
callq 0x126fa5
movq %rax, %r15
movq %r14, %rdi
callq 0x163927
movq %rbx, %rdi
callq 0x1797c3
cmpq %r15, %rbp
jne 0x161a23
movq %r13, %rdi
callq 0x126d7c
subq $0x8, %rsp
xorl %edi, %edi
movq %r13, %rsi
movq 0x10(%rsp), %rdx
xorl %ecx, %ecx
movq %r12, %r8
movq 0x18(%rsp), %r9
pushq $-0x1
pushq $-0x2
pushq $0x2
pushq 0x38(%rsp)
pushq $0x0
callq 0x1826a0
addq $0x30, %rsp
movq %rax, %rbx
cmpq %rax, %rbp
jne 0x161a2e
movl $0x2, %edx
movq %r13, %rdi
movl $0x1, %esi
movq $-0x2, %rcx
movq $-0x1, %r8
callq 0x126fa5
cmpq %rax, %rbx
jne 0x161a39
movq %r13, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x127c25
callq 0x4b847
callq 0x4b86f
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4b897
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4b8be
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4b8e5