// File: /workspace/github_c_makefile_star2_O0/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 %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edi, 0x104(%rsp)
movq %rsi, 0xf8(%rsp)
movl %edx, 0xf4(%rsp)
movq %rcx, 0xe8(%rsp)
movq %r8, 0xe0(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0xd8(%rsp)
movl $0x0, 0xd4(%rsp)
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
cmpq $0x0, 0xe0(%rsp)
je 0x41600
movq 0xe0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x415c8
jmp 0x41600
movq 0x5fa9d1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d4a3a(%rip), %rsi    # 0x516013
leaq 0x4d4bdf(%rip), %rdx    # 0x5161bf
leaq 0x4dfbfa(%rip), %rcx    # 0x5211e1
leaq 0x4df4d2(%rip), %r8     # 0x520ac0
movl $0x2ef, %r9d            # imm = 0x2EF
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x41602
jmp 0x41604
cmpq $0x0, 0xd8(%rsp)
jne 0x41647
movq 0x5fa98a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d49f3(%rip), %rsi    # 0x516013
leaq 0x539538(%rip), %rdx    # 0x57ab5f
leaq 0x4dfbb3(%rip), %rcx    # 0x5211e1
leaq 0x4df48b(%rip), %r8     # 0x520ac0
movl $0x2f0, %r9d            # imm = 0x2F0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x41649
callq 0x42cc0
movq %rax, 0xb0(%rsp)
callq 0x42cc0
movq %rax, 0xa8(%rsp)
callq 0x129e10
movq %rax, 0xc8(%rsp)
movb $0x0, %al
callq 0x1a2fe0
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x1a3960
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x41717
movq 0xb0(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x41c40
movq 0xb0(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq 0xa8(%rsp), %rdi
movq 0xd8(%rsp), %rax
movq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0x41c40
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
jmp 0x417bd
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x417bb
movq 0xb0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f960
movq 0x70(%rsp), %rdi
movq %rax, %rsi
movq 0xe0(%rsp), %rdx
callq 0x41cf0
movl %eax, 0xd4(%rsp)
cmpl $0x0, 0xd4(%rsp)
jne 0x417b9
movq 0xa8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xd8(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0x11f960
movq 0x68(%rsp), %rdi
movq %rax, %rsi
movq 0xe0(%rsp), %rdx
callq 0x41cf0
movl %eax, 0xd4(%rsp)
jmp 0x417bb
jmp 0x417bd
movq 0xd8(%rsp), %rax
testb $0x1, 0x3b(%rax)
je 0x417da
callq 0x7e4b0
movq %rax, 0x88(%rsp)
jmp 0x41831
jmp 0x417dc
movq 0xd8(%rsp), %rax
testb $0x1, 0x3c(%rax)
jne 0x41822
movq 0x5fa7af(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d4818(%rip), %rsi    # 0x516013
leaq 0x4df9f8(%rip), %rdx    # 0x5211fa
leaq 0x4df9d8(%rip), %rcx    # 0x5211e1
leaq 0x4df2b0(%rip), %r8     # 0x520ac0
movl $0x30e, %r9d            # imm = 0x30E
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x41824
callq 0x7e610
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x41da0
movq 0x88(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x41da0
cmpl $0x0, 0xd4(%rsp)
jne 0x418fe
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x41e50
movq %rax, 0x98(%rsp)
cmpq $0x0, 0x98(%rsp)
jne 0x4189e
movl $0xffffffff, 0xd4(%rsp) # imm = 0xFFFFFFFF
jmp 0x418fc
movq 0xd8(%rsp), %rax
testb $0x1, 0x38(%rax)
je 0x418fa
movq 0xd8(%rsp), %rax
testb $0x1, 0x3c(%rax)
je 0x418fa
movq 0xd8(%rsp), %rax
testb $0x1, 0x3d(%rax)
jne 0x418fa
movq 0x98(%rsp), %rdi
callq 0x1d1450
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x1d1150
movq 0x80(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0x418fc
jmp 0x418fe
cmpl $0x0, 0xd4(%rsp)
jne 0x419be
movq 0xd8(%rsp), %rax
testb $0x1, 0x3a(%rax)
je 0x419be
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x419bc
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11f8c0
movq %rax, %rdx
movq 0xe0(%rsp), %r8
movl $0x328, %edi            # imm = 0x328
leaq 0xc0(%rsp), %rsi
xorl %ecx, %ecx
callq 0x42200
movl %eax, 0xd4(%rsp)
cmpl $0x0, 0xd4(%rsp)
jne 0x419ba
movq 0xd8(%rsp), %rax
movq 0x28(%rax), %rdi
movl $0x1, %esi
callq 0x11f8c0
movq %rax, %rdx
movq 0xe0(%rsp), %r8
movl $0x32d, %edi            # imm = 0x32D
leaq 0xb8(%rsp), %rsi
xorl %ecx, %ecx
callq 0x42200
movl %eax, 0xd4(%rsp)
jmp 0x419bc
jmp 0x419be
cmpl $0x0, 0xd4(%rsp)
jne 0x419e3
movq 0xd8(%rsp), %rax
testb $0x1, 0x42(%rax)
je 0x419e3
callq 0x121340
movq %rax, 0x90(%rsp)
cmpl $0x0, 0xd4(%rsp)
jne 0x41b4c
movq 0xd8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x41a0f
movb $0x0, 0x7f(%rsp)
jmp 0x41a67
jmp 0x41a11
movq 0xd8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
ja 0x41a60
movq 0x5fa571(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4d45da(%rip), %rsi    # 0x516013
leaq 0x4df7cd(%rip), %rdx    # 0x52120d
leaq 0x4df79a(%rip), %rcx    # 0x5211e1
leaq 0x4df072(%rip), %r8     # 0x520ac0
movl $0x342, %r9d            # imm = 0x342
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x41a62
movb $0x1, 0x7f(%rsp)
movb 0x7f(%rsp), %al
movb %al, 0x3f(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x88(%rsp), %rdi
callq 0x7e970
movq %rax, 0x60(%rsp)
movq 0x88(%rsp), %rdi
callq 0x7e9d0
movb 0x3f(%rsp), %dil
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x60(%rsp), %r9
movb %al, %bpl
movq 0xb0(%rsp), %r15
movq 0xa8(%rsp), %r14
movq 0xc0(%rsp), %rbx
movq 0xb8(%rsp), %r11
movq 0x90(%rsp), %r10
movq 0xe0(%rsp), %rax
andb $0x1, %dil
movzbl %dil, %edi
movzbl %bpl, %ebp
movl %ebp, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x422a0
movl %eax, 0xd4(%rsp)
cmpl $0x0, 0xd4(%rsp)
jne 0x41bd0
movq 0xd8(%rsp), %rax
testb $0x1, 0x42(%rax)
je 0x41bd0
movq 0xa0(%rsp), %rdi
callq 0x1a3110
movq %rax, %xmm0
movaps 0x4d6db3(%rip), %xmm1   # 0x518930
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x4d6db7(%rip), %xmm1   # 0x518940
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x4def18(%rip), %xmm1   # 0x520ab8
divsd %xmm1, %xmm0
leaq 0x4df690(%rip), %rdi    # 0x52123b
movb $0x1, %al
callq 0x19070
movq 0x90(%rsp), %rdi
movq 0x5fa377(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4df698(%rip), %rsi    # 0x521263
callq 0x121520
movq 0x90(%rsp), %rdi
callq 0x121f00
movq 0xa0(%rsp), %rdi
callq 0x1a3080
movq 0xb0(%rsp), %rdi
callq 0x42c30
movq 0xa8(%rsp), %rdi
callq 0x42c30
movq 0xc8(%rsp), %rdi
callq 0x12c3e0
movq 0x88(%rsp), %rdi
callq 0x7e3d0
movq 0x98(%rsp), %rdi
callq 0x1d1150
movl 0xd4(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq