// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_linspace_align.c
// Function: gt_linspace_align_runner
static int gt_linspace_align_runner(GT_UNUSED int argc,
                                    GT_UNUSED const char **argv,
                                    GT_UNUSED int parsed_args,
                                    void *tool_arguments,
                                    GtError *err)
{
  GtLinspaceArguments *arguments = tool_arguments;
  int had_err = 0;
  GtAlignment *align;
  GtWord left_dist = 0, right_dist = 0;
  GtSequenceTable *sequence_table1, *sequence_table2;
  GtLinspaceManagement *spacemanager;
  GtScoreHandler *scorehandler = NULL;
  GtTimer *linspacetimer = NULL;
  GtAlphabet *alphabet = NULL;

  gt_error_check(err);
  gt_assert(arguments);
  sequence_table1 = gt_sequence_table_new();
  sequence_table2 = gt_sequence_table_new();
  align = gt_alignment_new();
  spacemanager = gt_linspace_management_new();
  gt_linspace_management_set_TSfactor(spacemanager,arguments->timesquarefactor);

  /* get sequences */
  if (gt_str_array_size(arguments->strings) > 0)
  {
    get_onesequence(sequence_table1, arguments->strings, 0);
    sequence_table1->size++;
    get_onesequence(sequence_table2, arguments->strings, 1);
    sequence_table2->size++;
  }
  else if (gt_str_array_size(arguments->files) > 0)
  {
    had_err = get_fastasequences(sequence_table1,
                                 gt_str_array_get_str(arguments->files,0),err);
    if (!had_err)
    {
      had_err = get_fastasequences(sequence_table2,
                                  gt_str_array_get_str(arguments->files,1),err);
    }
  }
  if (arguments->dna)
  {
    alphabet = gt_alphabet_new_dna();
  } else
  {
    gt_assert(arguments->protein);
    alphabet = gt_alphabet_new_protein();
  }
  gt_encode_sequence_table(alphabet,sequence_table1);
  gt_encode_sequence_table(alphabet,sequence_table2);
  if (!had_err)
  {
    scorehandler = gt_arguments2scorehandler(arguments,err);
    if (scorehandler == NULL)
    {
      had_err = -1;
    } else
    {
      if (arguments->global && arguments->protein && !arguments->has_costmatrix)
      {
        GtScoreHandler *costhandler = gt_scorehandler2costhandler(scorehandler);
        gt_scorehandler_delete(scorehandler);
        scorehandler = costhandler;
      }
    }
  }
  /* get diagonal band */
  if (!had_err && arguments->diagonal)
  {
    if (gt_str_array_size(arguments->diagonalbonds) > 0)
    {
      had_err = gt_parse_score_value(__LINE__,&left_dist,
                                  gt_str_array_get(arguments->diagonalbonds,0),
                                  false, err);
      if (!had_err)
      {
        had_err = gt_parse_score_value(__LINE__,&right_dist,
                                  gt_str_array_get(arguments->diagonalbonds,1),
                                  false, err);
      }
    }
  }
  if (!had_err && arguments->spacetime)
  {
    linspacetimer = gt_timer_new();
  }

  /* alignment functions with linear gap costs */
  if (!had_err)
  {
    bool affine;

    if (gt_str_array_size(arguments->linearcosts) > 0)
    {
      affine = false;
    } else
    {
      gt_assert(gt_str_array_size(arguments->affinecosts) > 0);
      affine = true;
    }
    had_err = gt_all_against_all_alignment_check (
                            affine, align, arguments,
                            spacemanager,
                            scorehandler,
                            gt_alphabet_characters(alphabet),
                            gt_alphabet_wildcard_show(alphabet),
                            sequence_table1,
                            sequence_table2,
                            left_dist,
                            right_dist,
                            linspacetimer,err);
  }
  /*spacetime option*/
  if (!had_err && arguments->spacetime)
  {
    printf("# combined space peak in kilobytes: %f\n",
           GT_KILOBYTES(gt_linspace_management_get_spacepeak(spacemanager)));
    gt_timer_show_formatted(linspacetimer,"# TIME overall " GT_WD ".%02ld\n",
                            stdout);
  }
  gt_timer_delete(linspacetimer);
  gt_linspace_management_delete(spacemanager);
  gt_sequence_table_delete(sequence_table1);
  gt_sequence_table_delete(sequence_table2);
  gt_alignment_delete(align);
  gt_alphabet_delete(alphabet);
  gt_scorehandler_delete(scorehandler);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %r15
movq %rcx, %r13
xorl %eax, %eax
movq %rax, 0x98(%rsp)
movq %rax, 0x90(%rsp)
testq %r8, %r8
je 0xae12d
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xaeb0c
testq %r13, %r13
je 0xaeb07
callq 0xaecee
movq %rax, %r14
callq 0xaecee
movq %rax, %rbp
callq 0x120d2c
movq %rax, 0x30(%rsp)
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x15bb80
movq 0x48(%r13), %rsi
movq %rax, 0x40(%rsp)
movq %rax, %rdi
callq 0x15bebd
movq 0x8(%r13), %rdi
callq 0x11c131
testq %rax, %rax
je 0xae1e6
movq 0x8(%r13), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0xaeb25
incq 0x8(%r14)
movq 0x8(%r13), %rsi
movl $0x1, %edx
movq %rbp, %rdi
callq 0xaeb25
incq 0x8(%rbp)
cmpb $0x1, 0x3b(%r13)
jne 0xae1ae
callq 0xd0ece
jmp 0xae1be
cmpb $0x0, 0x3c(%r13)
je 0xaeb11
callq 0xd0fdd
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0xaebb9
movq %rbx, %rdi
movq %rbp, %rsi
callq 0xaebb9
testl %r12d, %r12d
je 0xae238
xorl %r15d, %r15d
xorl %edi, %edi
jmp 0xae561
movq 0x10(%r13), %rdi
callq 0x11c131
testq %rax, %rax
je 0xae1a0
movq 0x10(%r13), %rdi
xorl %esi, %esi
callq 0x11bfee
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xaeb6e
movl %eax, %r12d
testl %eax, %eax
jne 0xae1a0
movq 0x10(%r13), %rdi
movl $0x1, %esi
callq 0x11bfee
movq %rbp, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xaeb6e
movl %eax, %r12d
jmp 0xae1a0
movq %rbx, 0x38(%rsp)
testq %r15, %r15
je 0xae252
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xaeb16
leaq 0x18(%r13), %r12
movq 0x18(%r13), %rdi
callq 0x11c131
movb 0x3c(%r13), %bl
testq %rax, %rax
movq %r14, 0x58(%rsp)
movq %r12, 0x18(%rsp)
je 0xae41d
movq (%r12), %rdi
xorl %esi, %esi
callq 0x11bfb3
testb %bl, %bl
je 0xae49f
movq %rax, %rdi
movq %r15, %rsi
callq 0x113469
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0x48(%rsp)
testq %rbx, %rbx
je 0xae54c
movq %r15, %r12
movq %rbp, 0x20(%rsp)
movl $0x1, %r15d
movq $0x0, 0xa0(%rsp)
movl $0x294, %ebp            # imm = 0x294
movq 0x18(%rsp), %r14
movq (%r14), %rdi
movq %r15, %rsi
callq 0x11bfb3
leaq 0xd0(%rsp), %rsi
movl %ebp, %edi
movq %rax, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0xaec10
testl %eax, %eax
movq 0x20(%rsp), %rbp
jne 0xae54c
movq %r12, 0x70(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0xd0(%rsp), %rcx
callq 0x17137c
movq %rax, %r14
testq %rbx, %rbx
je 0xae336
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1713cf
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %r14, 0x10(%rsp)
testq %r14, %r14
movq 0x58(%rsp), %r14
movq 0x70(%rsp), %r15
movq 0x38(%rsp), %rbx
je 0xae1dc
cmpb $0x1, 0x38(%r13)
jne 0xae39d
cmpb $0x1, 0x3c(%r13)
jne 0xae39d
cmpb $0x0, 0x3d(%r13)
jne 0xae39d
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1714fe
movq %rax, 0x80(%rsp)
movq %rbx, %rdi
callq 0x1713ff
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rbx
cmpb $0x1, 0x3a(%r13)
jne 0xae5af
movq 0x28(%r13), %rdi
callq 0x11c131
testq %rax, %rax
je 0xae5af
movq 0x28(%r13), %rdi
xorl %esi, %esi
callq 0x11bfb3
leaq 0x98(%rsp), %rsi
movl $0x328, %edi            # imm = 0x328
movq %rax, %rdx
xorl %ecx, %ecx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
jne 0xae413
movq 0x28(%r13), %rdi
movl $0x1, %esi
callq 0x11bfb3
leaq 0x90(%rsp), %rsi
movl $0x32d, %edi            # imm = 0x32D
movq %rax, %rdx
xorl %ecx, %ecx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
je 0xae5af
movq 0x10(%rsp), %r15
jmp 0xae1df
movq 0x20(%r13), %rdi
xorl %esi, %esi
callq 0x11bfb3
testb %bl, %bl
je 0xae502
movq %rax, %rdi
movq %r15, %rsi
callq 0x113469
movq %rax, %rbx
xorl %eax, %eax
movq %rax, 0x48(%rsp)
movq %rax, 0x50(%rsp)
testq %rbx, %rbx
je 0xae54c
movq %r15, %r12
movl $0x1, %r15d
leaq 0x20(%r13), %r14
movq (%r14), %rdi
movq %r15, %rsi
callq 0x11bfb3
leaq 0xa0(%rsp), %rsi
movl $0x2b7, %edi            # imm = 0x2B7
movq %rax, %rdx
xorl %ecx, %ecx
movq %r12, %r8
callq 0xaec10
testl %eax, %eax
jne 0xae54c
movq %rbp, 0x20(%rsp)
incq %r15
movl $0x2be, %ebp            # imm = 0x2BE
jmp 0xae2d0
movzbl 0x38(%r13), %ecx
leaq 0x50(%rsp), %rsi
movl $0x285, %edi            # imm = 0x285
movq %rax, %rdx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
jne 0xae54c
movq 0x18(%r13), %rdi
movl $0x1, %esi
callq 0x11bfb3
movzbl 0x38(%r13), %ecx
leaq 0x48(%rsp), %rsi
movl $0x28b, %edi            # imm = 0x28B
movq %rax, %rdx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
jne 0xae54c
movq %r15, %r12
movq %rbp, 0x20(%rsp)
movl $0x2, %r15d
xorl %ebx, %ebx
jmp 0xae2ba
movzbl 0x38(%r13), %ecx
leaq 0x50(%rsp), %rsi
movl $0x2a9, %edi            # imm = 0x2A9
movq %rax, %rdx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
jne 0xae54c
movq 0x20(%r13), %rdi
movl $0x1, %esi
callq 0x11bfb3
movzbl 0x38(%r13), %ecx
leaq 0x48(%rsp), %rsi
movl $0x2af, %edi            # imm = 0x2AF
movq %rax, %rdx
movq %r15, %r8
callq 0xaec10
testl %eax, %eax
je 0xae5c2
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
xorl %r15d, %r15d
xorl %edi, %edi
movq 0x58(%rsp), %r14
movq 0x38(%rsp), %rbx
callq 0x11d054
movq 0x40(%rsp), %rdi
callq 0x15bbbb
movq %r14, %rdi
callq 0xaec94
movq %rbp, %rdi
callq 0xaec94
movq 0x30(%rsp), %rdi
callq 0x121e3c
movq %rbx, %rdi
callq 0xd0e1c
movq %r15, %rdi
callq 0x1713ff
movl %r12d, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x1, 0x42(%r13)
jne 0xae5d2
callq 0x11c954
movq %rax, 0x28(%rsp)
jmp 0xae5db
movq %r15, %r12
movl $0x2, %r15d
xorl %ebx, %ebx
jmp 0xae45c
movq $0x0, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0x11c131
movq %rax, %rbx
testq %rax, %rax
jne 0xae602
movq 0x20(%r13), %rdi
callq 0x11c131
testq %rax, %rax
je 0xaeb20
movq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0xd11de
movq %rax, 0x88(%rsp)
movq %r12, %rdi
callq 0xd11f1
movb %al, 0xf(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x68(%rsp)
testq %r15, %r15
je 0xae652
movq %r15, %rdi
callq 0xfcc32
testb %al, %al
jne 0xaeb1b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xae661
callq 0x11c9e3
testq %rbx, %rbx
leaq 0xaad0e(%rip), %rax     # 0x159379
cmoveq 0x40a985(%rip), %rax    # 0x4b8ff8
movq %rax, 0x80(%rsp)
leaq 0xaabf5(%rip), %rax     # 0x159277
cmoveq 0x40a8b6(%rip), %rax    # 0x4b8f40
movq %rax, 0xc8(%rsp)
leaq 0x847ba(%rip), %rax     # 0x132e53
cmoveq 0x40a90f(%rip), %rax    # 0x4b8fb0
movq %rax, 0xa8(%rsp)
xorl %eax, %eax
movq 0x38(%rsp), %rbx
movq %rax, %r15
movq 0x8(%r14), %rcx
movzbl 0xf(%rsp), %eax
movq %rax, 0x60(%rsp)
cmpq %rcx, %r15
movq %rcx, 0xb0(%rsp)
jae 0xaea48
movq (%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x11b0ca
movq %rax, 0x18(%rsp)
movq (%r14), %rax
movq %r15, 0xb8(%rsp)
movq (%rax,%r15,8), %rdi
callq 0x11b0a1
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x8(%rbp)
je 0xaea24
xorl %r12d, %r12d
xorl %r14d, %r14d
movq (%rbp), %rax
movq (%rax,%r14,8), %rdi
callq 0x11b0ca
movq %rax, %r15
movq (%rbp), %rax
movq (%rax,%r14,8), %rdi
callq 0x11b0a1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
callq 0x120f84
cmpb $0x1, 0x38(%r13)
jne 0xae870
cmpb $0x1, 0x3a(%r13)
movq 0xc8(%rsp), %rax
jne 0xae87f
movq 0x28(%r13), %rdi
callq 0x11c131
testq %rax, %rax
jne 0xae7f6
movsd 0x297ab9(%rip), %xmm0   # 0x346228
subsd 0x30(%r13), %xmm0
movq 0x18(%rsp), %rdx
movq %rdx, %rax
subq %r15, %rax
movq %r15, %rcx
cmovaq %rdx, %rcx
movq %rcx, %xmm1
punpckldq 0x29914c(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x299154(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
movq %rax, %rcx
sarq $0x3f, %rcx
andq %rax, %rcx
testq %rax, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
addsd %xmm2, %xmm0
xorpd 0x2a1283(%rip), %xmm0   # 0x34fa50
cvttsd2si %xmm0, %rcx
movq %rcx, 0x78(%rsp)
movl $0x0, %ecx
cmovleq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
subsd %xmm0, %xmm2
cvttsd2si %xmm2, %rax
movq %rax, 0x68(%rsp)
movq %r15, %rax
subq 0x18(%rsp), %rax
movq %rax, %rcx
sarq $0x3f, %rcx
andq %rax, %rcx
testq %rax, %rax
movl $0x0, %edx
cmovleq %rdx, %rax
cmpq %rcx, 0x78(%rsp)
jg 0xae98a
cmpq %rax, 0x68(%rsp)
jl 0xae98a
testl %r12d, %r12d
jne 0xaea15
subq $0x8, %rsp
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
xorl %r8d, %r8d
movq 0x20(%rsp), %r9
pushq 0x70(%rsp)
pushq 0x88(%rsp)
pushq %r15
pushq $0x0
pushq %rbx
callq *0xd8(%rsp)
addq $0x30, %rsp
jmp 0xae8b3
cmpb $0x1, 0x39(%r13)
movq 0x80(%rsp), %rax
jne 0xae8aa
subq $0x8, %rsp
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rcx
xorl %r8d, %r8d
movq 0x20(%rsp), %r9
pushq %r15
pushq $0x0
pushq %rbx
callq *%rax
addq $0x20, %rsp
testl %r12d, %r12d
jne 0xaea15
cmpq $0x0, 0x30(%rsp)
je 0xaeb02
movq (%r13), %rdi
callq 0x11b0a1
movq %rax, %rdi
leaq 0x310669(%rip), %rsi    # 0x3bef3b
callq 0x17a40
testl %eax, %eax
je 0xae9ad
movq (%r13), %rdi
callq 0x11b0a1
movq %rax, %rdi
leaq 0x2b3f07(%rip), %rsi    # 0x3627f9
leaq 0x2a1167(%rip), %rdx    # 0x34fa60
movl $0x24b, %ecx            # imm = 0x24B
movq 0x70(%rsp), %r8
callq 0xfcdbb
testq %rax, %rax
je 0xaea0f
movq %rax, %r12
movzbl 0x3e(%r13), %eax
movq %rax, 0xc0(%rsp)
movzbl 0x40(%r13), %r10d
movzbl 0x3f(%r13), %r11d
movq %rbp, %rax
movzbl 0x38(%r13), %ebp
subq $0x8, %rsp
xorl $0x1, %r10d
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq 0x38(%rsp), %r8
movq 0x90(%rsp), %r9
pushq %r12
pushq 0x20(%rsp)
pushq %rbp
movq %rax, %rbp
pushq %r11
pushq %r10
pushq 0xf0(%rsp)
pushq 0x98(%rsp)
callq 0xaed9e
addq $0x40, %rsp
movq %r12, %rdi
callq 0xfd018
jmp 0xaea0a
movq 0x70(%rsp), %rdi
leaq 0x2a196b(%rip), %rsi    # 0x350301
movq 0x18(%rsp), %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0xfcb67
movl $0x1, %r12d
jmp 0xaea15
movzbl 0x3e(%r13), %eax
movzbl 0x40(%r13), %r10d
movzbl 0x3f(%r13), %r11d
movzbl 0x38(%r13), %r12d
subq $0x8, %rsp
xorl $0x1, %r10d
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq 0x38(%rsp), %r8
movq 0x90(%rsp), %r9
movq 0x40a4eb(%rip), %rbx    # 0x4b8ed8
pushq (%rbx)
pushq 0x20(%rsp)
pushq %r12
pushq %r11
pushq %r10
pushq %rax
pushq 0x98(%rsp)
callq 0xaed9e
addq $0x40, %rsp
xorl %r12d, %r12d
jmp 0xaea15
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
incq %r14
cmpq 0x8(%rbp), %r14
jb 0xae70d
jmp 0xaea27
xorl %r12d, %r12d
movq 0xb8(%rsp), %r15
leaq 0x1(%r15), %rax
testl %r12d, %r12d
movq 0x58(%rsp), %r14
movq 0x38(%rsp), %rbx
je 0xae6b0
jmp 0xaea4b
xorl %r12d, %r12d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0xaea5f
callq 0x11ca28
movq 0x28(%rsp), %rdi
cmpq 0xb0(%rsp), %r15
jb 0xaea88
cmpb $0x1, 0x41(%r13)
jne 0xaea88
leaq 0x2a191b(%rip), %rdi    # 0x350392
movq 0x60(%rsp), %rsi
xorl %eax, %eax
callq 0x17070
movq 0x28(%rsp), %rdi
testl %r12d, %r12d
jne 0xaeaf8
xorl %r12d, %r12d
cmpb $0x1, 0x42(%r13)
jne 0xaeaf8
movq 0x40(%rsp), %rdi
callq 0x15bc2e
movq %rax, %xmm1
punpckldq 0x298e32(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x298e3a(%rip), %xmm1   # 0x3478f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x2a0f7e(%rip), %xmm0   # 0x34fa48
leaq 0x2a170a(%rip), %rdi    # 0x3501db
movb $0x1, %al
callq 0x17070
movq 0x40a3f9(%rip), %rax    # 0x4b8ed8
movq (%rax), %rdx
leaq 0x2a171a(%rip), %rsi    # 0x350203
movq 0x28(%rsp), %rdi
callq 0x11ca64
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %r15
jmp 0xae561
callq 0x1c2d2
callq 0x1c344
callq 0x1c1ee
callq 0x1c227
callq 0x1c260
callq 0x1c299
callq 0x1c30b