// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/linearalign_affinegapcost.c
// Function: gt_linearalign_affinegapcost_check_local
void gt_linearalign_affinegapcost_check_local(GT_UNUSED bool forward,
                                              const GtUchar *useq,
                                              GtUword ulen,
                                              const GtUchar *vseq,
                                              GtUword vlen)
{
  GtAlignment *align;
  GtWord affine_score1, affine_score2, affine_score3, affine_score4,
         matchscore = 6, mismatchscore = -3,
         gap_opening = -2, gap_extension = -1;
  GtScoreHandler *scorehandler;
  GtLinspaceManagement *spacemanager;

  gt_assert(useq && vseq);
  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,
                                     gap_opening, gap_extension);
  align = gt_alignment_new();
  spacemanager = gt_linspace_management_new();
  affine_score1 = gt_linearalign_affinegapcost_compute_local_generic(
                                                            spacemanager,
                                                            scorehandler, align,
                                                            useq, 0, ulen,
                                                            vseq,  0, vlen);
  gt_linspace_management_delete(spacemanager);
  gt_scorehandler_delete(scorehandler);

  affine_score2 = gt_alignment_eval_with_affine_score(align, true, matchscore,
                                    mismatchscore, gap_opening, gap_extension);

  if (affine_score1 != affine_score2)
  {
    fprintf(stderr,"gt_linearalign_affinegapcost_compute_local_generic ="
            " "GT_WD"!= "GT_WD
            " = gt_alignment_eval_with_affine_score\n", affine_score1,
                                                        affine_score2);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  gt_alignment_reset(align);
  affine_score3 = gt_affinealign_calculate_local(NULL, align, useq, 0,
                                                 ulen, vseq, 0, vlen,
                                                 matchscore, mismatchscore,
                                                 gap_opening, gap_extension);

  if (affine_score1 != affine_score3)
  {
    fprintf(stderr,"gt_calc_affinealign_linear_local = "GT_WD" != "GT_WD
            " = affinealign_in_square_space_local\n", affine_score1,
                                                        affine_score3);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  affine_score4 = gt_alignment_eval_with_affine_score(align, true, matchscore,
                                    mismatchscore, gap_opening, gap_extension);

  if (affine_score3 != affine_score4)
  {
    fprintf(stderr,"affinealign_in_square_space_local = "GT_WD" != "GT_WD
            " = gt_alignment_eval_generic_with_affine_score\n", affine_score3,
                                                        affine_score4);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  gt_alignment_delete(align);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0xb7(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq $0x6, 0x60(%rsp)
movq $-0x3, 0x58(%rsp)
movq $-0x2, 0x50(%rsp)
movq $-0x1, 0x48(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x1a05a0
cmpq $0x0, 0x98(%rsp)
jne 0x1a05d8
movq 0x49b9f9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x375a62(%rip), %rsi    # 0x516013
leaq 0x3b8112(%rip), %rdx    # 0x5586ca
leaq 0x3829df(%rip), %rcx    # 0x522f9e
leaq 0x3b80db(%rip), %r8     # 0x5586a1
movl $0x48d, %r9d            # imm = 0x48D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1a05da
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rdx
movl $0xff, %esi
callq 0x197f0
cmpq $0x0, %rax
je 0x1a0623
movq 0x49b99f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3acb40(%rip), %rsi    # 0x54d14b
leaq 0x38298c(%rip), %rdx    # 0x522f9e
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rdx
movl $0xff, %esi
callq 0x197f0
cmpq $0x0, %rax
je 0x1a066c
movq 0x49b956(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3acb1b(%rip), %rsi    # 0x54d16f
leaq 0x382943(%rip), %rdx    # 0x522f9e
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
callq 0x1d0fb0
movq %rax, 0x40(%rsp)
callq 0x129e10
movq %rax, 0x88(%rsp)
movb $0x0, %al
callq 0x1a2fe0
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq 0xa0(%rsp), %r9
movq 0x98(%rsp), %r10
movq 0x90(%rsp), %rax
xorl %r8d, %r8d
movq %r10, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x19fc80
movq %rax, 0x80(%rsp)
movq 0x38(%rsp), %rdi
callq 0x1a3080
movq 0x40(%rsp), %rdi
callq 0x1d1150
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %r9
movl $0x1, %esi
callq 0x12aeb0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rax
cmpq 0x78(%rsp), %rax
je 0x1a0774
movq 0x49b854(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
leaq 0x3b7ffd(%rip), %rsi    # 0x558760
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x88(%rsp), %rdi
callq 0x12a560
movq 0x88(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0xa0(%rsp), %r8
movq 0x98(%rsp), %r9
movq 0x90(%rsp), %r14
movq 0x60(%rsp), %rbx
movq 0x58(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0x48(%rsp), %rax
xorl %ecx, %ecx
movq %rcx, %rdi
movq $0x0, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x487ba0
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rax
cmpq 0x70(%rsp), %rax
je 0x1a082b
movq 0x49b79d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x80(%rsp), %rdx
movq 0x70(%rsp), %rcx
leaq 0x3b7fac(%rip), %rsi    # 0x5587c6
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %r9
movl $0x1, %esi
callq 0x12aeb0
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
cmpq 0x68(%rsp), %rax
je 0x1a088e
movq 0x49b737(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
leaq 0x3b7f9c(%rip), %rsi    # 0x558819
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x88(%rsp), %rdi
callq 0x12c3e0
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
nopw %cs:(%rax,%rax)