// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/linearalign_affinegapcost.c
// Function: gt_linearalign_affinegapcost_check
void gt_linearalign_affinegapcost_check(GT_UNUSED bool forward,
                                        const GtUchar *useq,
                                        GtUword ulen,
                                        const GtUchar *vseq,
                                        GtUword vlen)
{
  GtAlignment *align;
  GtUword affine_score1, affine_score2, affine_score3,
          matchcost = 0, mismatchcost = 4, gap_opening = 4, gap_extension = 1;
  GtLinspaceManagement *spacemanager;
  GtScoreHandler *scorehandler;

  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);
  }

  /* affinealign (square) handles lower/upper cases  in another way*/
  scorehandler = gt_scorehandler_new(matchcost, mismatchcost,
                                     gap_opening, gap_extension);
  gt_scorehandler_plain(scorehandler);
  align = gt_alignment_new_with_seqs(useq, ulen, vseq, vlen);
  spacemanager = gt_linspace_management_new();

  affine_score1 = gt_calc_affinealign_linear(spacemanager, scorehandler, align,
                                             useq, 0, ulen,
                                             vseq, 0, vlen);
  gt_linspace_management_delete(spacemanager);
  affine_score2 = gt_alignment_eval_with_affine_score(align,  true,matchcost,
                                                      mismatchcost, gap_opening,
                                                      gap_extension);
  gt_alignment_delete(align);
  gt_scorehandler_delete(scorehandler);
  if (affine_score1 != affine_score2)
  {
    fprintf(stderr,"gt_calc_affinealign_linear = "GT_WU" != "GT_WU
            " = gt_alignment_eval_with_affine_score\n", affine_score1,
                                                        affine_score2);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  align = gt_affinealign(useq, ulen, vseq, vlen, matchcost,
                         mismatchcost, gap_opening, gap_extension);

  affine_score3 = gt_alignment_eval_with_affine_score(align,  true, matchcost,
                                                      mismatchcost, gap_opening,
                                                      gap_extension);

  if (affine_score1 != affine_score3)
  {
    fprintf(stderr,"gt_calc_affinealign_linear = "GT_WU" != "GT_WU
            " = gt_affinealign\n", affine_score1, affine_score3);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  gt_alignment_delete(align);
}

// Assembly:
subq $0x98, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, 0x97(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movq %r8, 0x70(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x4, 0x40(%rsp)
movq $0x4, 0x38(%rsp)
movq $0x1, 0x30(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x1a0294
cmpq $0x0, 0x78(%rsp)
jne 0x1a02cc
movq 0x49bd05(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x375d6e(%rip), %rsi    # 0x516013
leaq 0x3b841e(%rip), %rdx    # 0x5586ca
leaq 0x382cc8(%rip), %rcx    # 0x522f7b
leaq 0x3b83e7(%rip), %r8     # 0x5586a1
movl $0x44c, %r9d            # imm = 0x44C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1a02ce
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rdx
movl $0xff, %esi
callq 0x197f0
cmpq $0x0, %rax
je 0x1a0317
movq 0x49bcab(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3ace4c(%rip), %rsi    # 0x54d14b
leaq 0x382c75(%rip), %rdx    # 0x522f7b
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rdx
movl $0xff, %esi
callq 0x197f0
cmpq $0x0, %rax
je 0x1a035a
movq 0x49bc68(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3ace2d(%rip), %rsi    # 0x54d16f
leaq 0x382c32(%rip), %rdx    # 0x522f7b
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x30(%rsp), %rcx
callq 0x1d0fb0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1d10b0
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x129ec0
movq %rax, 0x68(%rsp)
movb $0x0, %al
callq 0x1a2fe0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x88(%rsp), %rcx
movq 0x80(%rsp), %r9
movq 0x78(%rsp), %r10
movq 0x70(%rsp), %rax
xorl %r8d, %r8d
movq %r10, (%rsp)
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x19e910
movq %rax, 0x60(%rsp)
movq 0x28(%rsp), %rdi
callq 0x1a3080
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
movl $0x1, %esi
callq 0x12aeb0
movq %rax, 0x58(%rsp)
movq 0x68(%rsp), %rdi
callq 0x12c3e0
movq 0x20(%rsp), %rdi
callq 0x1d1150
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
je 0x1a0478
movq 0x49bb4d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x3b8270(%rip), %rsi    # 0x5586d7
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x40(%rsp), %r9
movq 0x38(%rsp), %r10
movq 0x30(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x484060
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
movl $0x1, %esi
callq 0x12aeb0
movq %rax, 0x50(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x1a0519
movq 0x49baac(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x60(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x3b821e(%rip), %rsi    # 0x558726
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x68(%rsp), %rdi
callq 0x12c3e0
addq $0x98, %rsp
retq
nopl (%rax,%rax)