// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/swalign.c
// Function: smith_waterman_align
static GtAlignment* smith_waterman_align(const char *u_orig,
                                         const char *v_orig,
                                         const GtUchar *u_enc,
                                         const GtUchar *v_enc,
                                         GtUword u_len,
                                         GtUword v_len,
                                         const int **scores,
                                         int deletion_score,
                                         int insertion_score,
                                         const GtAlphabet *u_alpha,
                                         const GtAlphabet *v_alpha)
{
  gt_assert(u_orig && v_orig && u_enc && v_enc && u_len && v_len && scores
            && u_alpha && v_alpha);
  Coordinate alignment_start,
             alignment_end = { GT_UNDEF_UWORD, GT_UNDEF_UWORD };
  GtRange urange, vrange;
  DPentry **dptable;
  GtAlignment *a = NULL;
  gt_array2dim_calloc(dptable, u_len+1, v_len+1);
  swalign_fill_table(dptable, u_enc, u_len, v_enc, v_len, scores,
                     deletion_score, insertion_score, &alignment_end,
                     gt_alphabet_size(u_alpha), gt_alphabet_size(v_alpha));
  gt_assert(alignment_end.x != GT_UNDEF_UWORD);
  gt_assert(alignment_end.y != GT_UNDEF_UWORD);
  if (dptable[alignment_end.x][alignment_end.y].score) {
    /* construct only an alignment if a (positive) score was computed */
    a = gt_alignment_new();
    alignment_start = traceback(a, dptable, alignment_end.x, alignment_end.y);
    /* transform the positions in the DP matrix to sequence positions */
    urange.start = --alignment_start.x;
    vrange.start = --alignment_start.y;
    urange.end = --alignment_end.x;
    vrange.end = --alignment_end.y;
    /* employ sequence positions to set alignment sequences */
    gt_alignment_set_seqs(a,
                          (const GtUchar *) (u_orig + alignment_start.x),
                          alignment_end.x - alignment_start.x + 1,
                          (const GtUchar *) (v_orig + alignment_start.y),
                          alignment_end.y - alignment_start.y + 1);
    gt_alignment_set_urange(a, urange);
    gt_alignment_set_vrange(a, vrange);
  }
  gt_array2dim_delete(dptable);
  return a;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xf8, %rsp
movq 0x130(%rsp), %rax
movq 0x128(%rsp), %rax
movl 0x120(%rsp), %eax
movl 0x118(%rsp), %eax
movq 0x110(%rsp), %rax
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rcx, 0xd8(%rsp)
movq %r8, 0xd0(%rsp)
movq %r9, 0xc8(%rsp)
cmpq $0x0, 0xf0(%rsp)
je 0x1eb102
cmpq $0x0, 0xe8(%rsp)
je 0x1eb102
cmpq $0x0, 0xe0(%rsp)
je 0x1eb102
cmpq $0x0, 0xd8(%rsp)
je 0x1eb102
cmpq $0x0, 0xd0(%rsp)
je 0x1eb102
cmpq $0x0, 0xc8(%rsp)
je 0x1eb102
cmpq $0x0, 0x110(%rsp)
je 0x1eb102
cmpq $0x0, 0x128(%rsp)
je 0x1eb102
cmpq $0x0, 0x130(%rsp)
jne 0x1eb13a
movq 0x450e97(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x32af00(%rip), %rsi    # 0x516013
leaq 0x37d36f(%rip), %rdx    # 0x568489
leaq 0x37d3bd(%rip), %rcx    # 0x5684de
leaq 0x37d34a(%rip), %r8     # 0x568472
movl $0x72, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1eb13c
movq 0x3563c5(%rip), %rax    # 0x541508
movq %rax, 0xa8(%rsp)
movq 0x3563be(%rip), %rax    # 0x541510
movq %rax, 0xb0(%rsp)
movq $0x0, 0x78(%rsp)
movq 0xd0(%rsp), %rdi
addq $0x1, %rdi
shlq $0x3, %rdi
leaq 0x37d2f8(%rip), %rsi    # 0x568472
movl $0x78, %edx
callq 0xe80f0
movq %rax, 0x80(%rsp)
movq 0xd0(%rsp), %rdi
addq $0x1, %rdi
movq 0xc8(%rsp), %rax
addq $0x1, %rax
imulq %rax, %rdi
movl $0x10, %esi
leaq 0x37d2be(%rip), %rdx    # 0x568472
movl $0x78, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x80(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0xd0(%rsp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x1eb234
movq 0x80(%rsp), %rax
movq 0x70(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq 0xc8(%rsp), %rax
addq $0x1, %rax
shlq $0x4, %rax
addq %rax, %rdx
movq 0x80(%rsp), %rax
movq 0x70(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x70(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x1eb1d5
movq 0x80(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x110(%rsp), %rax
movq %rax, 0x50(%rsp)
movl 0x118(%rsp), %ebp
movl 0x120(%rsp), %ebx
movq 0x128(%rsp), %rdi
callq 0x7e920
movl %eax, 0x5c(%rsp)
movq 0x130(%rsp), %rdi
callq 0x7e920
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
movl 0x5c(%rsp), %r10d
leaq 0xa8(%rsp), %r11
movl %ebp, (%rsp)
movl %ebx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x1eb540
cmpq $-0x1, 0xa8(%rsp)
jne 0x1eb336
movq 0x450c9b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x32ad04(%rip), %rsi    # 0x516013
leaq 0x37d1dd(%rip), %rdx    # 0x5684f3
leaq 0x37d1c1(%rip), %rcx    # 0x5684de
leaq 0x37d14e(%rip), %r8     # 0x568472
movl $0x7c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1eb338
jmp 0x1eb33a
cmpq $-0x1, 0xb0(%rsp)
jne 0x1eb37d
movq 0x450c54(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x32acbd(%rip), %rsi    # 0x516013
leaq 0x37d1b8(%rip), %rdx    # 0x568515
leaq 0x37d17a(%rip), %rcx    # 0x5684de
leaq 0x37d107(%rip), %r8     # 0x568472
movl $0x7d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1eb37f
movq 0x80(%rsp), %rax
movq 0xa8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0xb0(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x1eb4f2
callq 0x129e10
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0xa8(%rsp), %rdx
movq 0xb0(%rsp), %rcx
callq 0x1eba30
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0xb8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xb8(%rsp)
movq %rax, 0x98(%rsp)
movq 0xc0(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xc0(%rsp)
movq %rax, 0x88(%rsp)
movq 0xa8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xa8(%rsp)
movq %rax, 0xa0(%rsp)
movq 0xb0(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xb0(%rsp)
movq %rax, 0x90(%rsp)
movq 0x78(%rsp), %rdi
movq 0xf0(%rsp), %rsi
addq 0xb8(%rsp), %rsi
movq 0xa8(%rsp), %rdx
subq 0xb8(%rsp), %rdx
addq $0x1, %rdx
movq 0xe8(%rsp), %rcx
addq 0xc0(%rsp), %rcx
movq 0xb0(%rsp), %r8
subq 0xc0(%rsp), %r8
addq $0x1, %r8
callq 0x129f60
movq 0x78(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
callq 0x12a210
movq 0x78(%rsp), %rdi
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rdx
callq 0x12a300
movq 0x80(%rsp), %rax
movq (%rax), %rdi
leaq 0x37cf6e(%rip), %rsi    # 0x568472
movl $0x90, %edx
callq 0xe88c0
movq 0x80(%rsp), %rdi
leaq 0x37cf55(%rip), %rsi    # 0x568472
movl $0x90, %edx
callq 0xe88c0
movq 0x78(%rsp), %rax
addq $0xf8, %rsp
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)