// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/linearalign.c
// Function: gt_linearalign_check
void gt_linearalign_check(GT_UNUSED bool forward,
                          const GtUchar *useq,
                          GtUword ulen,
                          const GtUchar *vseq,
                          GtUword vlen)
{
  GtAlignment *align;
  GtUword edist1, edist2, edist3, edist4,
          matchcost = 0, mismatchcost = 1, gapcost = 1;
  GtLinspaceManagement *spacemanager;
  GtScoreHandler *scorehandler;
  const bool downcase = true;

  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(matchcost,  mismatchcost, 0, gapcost);
  gt_scorehandler_plain(scorehandler);
  gt_scorehandler_downcase(scorehandler);
  spacemanager = gt_linspace_management_new();
  align = gt_alignment_new_with_seqs(useq, ulen, vseq, vlen);
  edist1 = gt_calc_linearalign(spacemanager, scorehandler, align,
                               useq, 0, ulen,
                               vseq, 0, vlen);
  edist2 = gt_squarealign_global_distance_only(useq, 0, ulen, vseq, 0, vlen,
                                               scorehandler);

  if (edist1 != edist2)
  {
    fprintf(stderr,"gt_calc_linearalign = "GT_WU" != "GT_WU
            " = gt_squarealign_global_distance_only\n", edist1,edist2);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  edist3 = gt_alignment_eval_with_score(align, true, matchcost,
                                        mismatchcost, gapcost);

  if (edist2 != edist3)
  {
    fprintf(stderr,"gt_squarealign_global_distance_only = "GT_WU" != "GT_WU
            " = gt_alignment_eval_with_score\n", edist2,edist3);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  edist4 = gt_calc_linearedist(downcase,useq, ulen, vseq, vlen);
  if (edist3 != edist4)
  {
    fprintf(stderr,"gt_alignment_eval_with_score = "GT_WU" != "GT_WU
            " = gt_calc_linearedist\n", edist3, edist4);
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }
  gt_linspace_management_delete(spacemanager);
  gt_scorehandler_delete(scorehandler);
  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, 0x40(%rsp)
movq $0x1, 0x38(%rsp)
movq $0x1, 0x30(%rsp)
movb $0x1, 0x1f(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rdx
movl $0xff, %esi
callq 0x197f0
cmpq $0x0, %rax
je 0x19d2e6
movq 0x49ecdc(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3afe7d(%rip), %rsi    # 0x54d14b
leaq 0x385c76(%rip), %rdx    # 0x522f4b
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 0x19d329
movq 0x49ec99(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3afe5e(%rip), %rsi    # 0x54d16f
leaq 0x385c33(%rip), %rdx    # 0x522f4b
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rcx
xorl %eax, %eax
movl %eax, %edx
callq 0x1d0fb0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x1d10b0
movq 0x20(%rsp), %rdi
callq 0x1d1100
movb $0x0, %al
callq 0x1a2fe0
movq %rax, 0x28(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0x70(%rsp), %rcx
callq 0x129ec0
movq %rax, 0x68(%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 0x19bdf0
movq %rax, 0x60(%rsp)
movq 0x88(%rsp), %rdi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %r9
movq 0x20(%rsp), %rax
xorl %esi, %esi
movl %esi, %r8d
movq %r8, %rsi
movq %rax, (%rsp)
callq 0x1e0f60
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x58(%rsp), %rax
je 0x19d43f
movq 0x49eb86(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
leaq 0x3baf6f(%rip), %rsi    # 0x55839d
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x1, %esi
callq 0x12a9d0
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x19d49a
movq 0x49eb2b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
leaq 0x3baf5c(%rip), %rsi    # 0x5583e5
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x88(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %r8
movl $0x1, %edi
callq 0x19d530
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x48(%rsp), %rax
je 0x19d4fb
movq 0x49eaca(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x3baf4c(%rip), %rsi    # 0x558436
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x28(%rsp), %rdi
callq 0x1a3080
movq 0x20(%rsp), %rdi
callq 0x1d1150
movq 0x68(%rsp), %rdi
callq 0x12c3e0
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)