// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_paircmp.c
// Function: gt_paircmp
int gt_paircmp(int argc, const char **argv, GtError *err)
{
  int parsed_args;
  Cmppairwiseopt cmppairwise;
  GtOPrval oprval;
  GtFastaReader *reader0 = NULL,
                *reader1 = NULL;

  gt_error_check(err);

  oprval = parse_options(&parsed_args, &cmppairwise, argc, argv, err);
  if (oprval == GT_OPTION_PARSER_OK)
  {
    gt_assert(parsed_args == argc);
    showsimpleoptions(&cmppairwise);
    if (cmppairwise.showedist)
    {
      GtUword edist, len1, len2;
      GtStr *s1, *s2;

      gt_assert(gt_str_array_size(cmppairwise.strings) >= 2);
      s1 = gt_str_array_get_str(cmppairwise.strings,0);
      s2 = gt_str_array_get_str(cmppairwise.strings,1UL);
      len1 = gt_str_length(s1);
      len2 = gt_str_length(s2);
      edist = gt_computegreedyunitedist((const GtUchar *) gt_str_get(s1),
                                        len1,
                                        (const GtUchar *) gt_str_get(s2),
                                        len2);
      printf(GT_WU " " GT_WU " " GT_WU " " GT_WU "%% errors\n",
             edist, len1,len2,(200 * edist)/(len1+len2));
    }
    else if (cmppairwise.print)
    {
      const GtStr *str0 = gt_str_array_get_str(cmppairwise.strings,0),
                  *str1 = gt_str_array_get_str(cmppairwise.strings,1);

      gt_squarealign_print_edit_alignment((const GtUchar *) gt_str_get(str0),0,
                                          gt_str_length(str0),
                                          (const GtUchar *) gt_str_get(str1),0,
                                          gt_str_length(str1));
    } else
    {
      size_t idx;
      Checkfunctiontabentry checkfunction_tab[] = {
        MAKECheckfunctiontabentry(gt_checkgreedyunitedist),
        MAKECheckfunctiontabentry(gt_linearalign_check),
        MAKECheckfunctiontabentry(gt_linearalign_check_local),
        MAKECheckfunctiontabentry(gt_linearalign_affinegapcost_check),
        MAKECheckfunctiontabentry(gt_linearalign_affinegapcost_check_local),
        MAKECheckfunctiontabentry(gt_diagonalbandalign_check),
        MAKECheckfunctiontabentry(gt_diagonalbandalign_affinegapcost_check)
      };

      if (cmppairwise.fasta)
      {
        gt_assert(gt_str_array_size(cmppairwise.files) == 3);
        cmppairwise.fastasequences0 = gt_str_array_new();
        cmppairwise.fastasequences1 = gt_str_array_new();

        reader0 = gt_fasta_reader_rec_new(gt_str_array_get_str(
                                                        cmppairwise.files,1UL));
        gt_fasta_reader_run(reader0, NULL, save_fastaentry,
                            NULL, cmppairwise.fastasequences0, err);
        reader1 = gt_fasta_reader_rec_new (gt_str_array_get_str(
                                                        cmppairwise.files,2UL));
        gt_fasta_reader_run(reader1, NULL, save_fastaentry,
                            NULL, cmppairwise.fastasequences1, err);
        gt_error_check(err);
      }
      for (idx = 0; idx < sizeof checkfunction_tab/sizeof checkfunction_tab[0];
           idx++)
      {
        GtUword testcases;

        printf("run %s\n",checkfunction_tab[idx].name);
        testcases
          = applycheckfunctiontosimpleoptions(checkfunction_tab[idx].function,
                                              &cmppairwise);
        printf("# number of testcases for %s: " GT_WU "\n",
               checkfunction_tab[idx].name,testcases);
      }
      gt_fasta_reader_delete(reader0);
      gt_fasta_reader_delete(reader1);
    }
  }
  freesimpleoption(&cmppairwise);
  if (oprval == GT_OPTION_PARSER_REQUESTS_EXIT)
  {
    return 0;
  }
  if (oprval == GT_OPTION_PARSER_ERROR)
  {
    return -1;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r12
movq %rsi, %r14
movl %edi, %ebx
testq %rdx, %rdx
je 0xb2ccf
movq %r12, %rdi
callq 0xfcc32
testb %al, %al
jne 0xb32de
leaq 0x44(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebx, %edx
movq %r14, %rcx
movq %r12, %r8
jmp 0xb2ce1
leaq 0x44(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl %ebx, %edx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0xb32f7
movl %eax, %ebp
testl %eax, %eax
jne 0xb3231
cmpl %ebx, 0x44(%rsp)
jne 0xb32e3
movq 0x8(%rsp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xb2d3e
cmpb $0x0, 0x39(%rsp)
jne 0xb2dd6
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfb3
leaq 0x29f408(%rip), %rdi    # 0x352141
jmp 0xb2dc9
movq 0x10(%rsp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xb2d7e
movq 0x10(%rsp), %rdi
cmpb $0x1, 0x38(%rsp)
jne 0xb2da9
movl $0x1, %esi
callq 0x11bfb3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x11bfb3
leaq 0x29f3de(%rip), %rdi    # 0x35215a
jmp 0xb2dc9
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xb32ab
movq (%rax), %rdi
callq 0x11b0a1
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdx
leaq 0x29f3ea(%rip), %rdi    # 0x35218e
movq %rax, %rsi
jmp 0xb2dcf
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfb3
leaq 0x29f3ae(%rip), %rdi    # 0x352177
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x17070
cmpb $0x1, 0x39(%rsp)
jne 0xb2e7f
movq 0x8(%rsp), %rdi
callq 0x11c131
cmpq $0x1, %rax
jbe 0xb32e8
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfee
movq %rax, %r15
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfee
movq %rax, %r12
movq %r15, %rdi
callq 0x11b0ca
movq %rax, %rbx
movq %r12, %rdi
callq 0x11b0ca
movq %rax, %r14
movq %r15, %rdi
callq 0x11b0a1
movq %rax, %r15
movq %r12, %rdi
callq 0x11b0a1
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %r14, %rcx
callq 0x200e56
movq %rax, %rsi
imulq $0xc8, %rax, %rax
leaq (%r14,%rbx), %rcx
xorl %edx, %edx
divq %rcx
leaq 0x29f02f(%rip), %rdi    # 0x351e99
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x17070
jmp 0xb3231
movl %ebp, 0x40(%rsp)
cmpb $0x1, 0x3a(%rsp)
jne 0xb2eef
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfee
movq %rax, %r14
movq %rbx, %rdi
callq 0x11b0a1
movq %rax, %r15
movq %rbx, %rdi
callq 0x11b0ca
movq %rax, %rbx
movq %r14, %rdi
callq 0x11b0a1
movq %rax, %r12
movq %r14, %rdi
callq 0x11b0ca
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x179bc4
jmp 0xb322d
cmpb $0x1, 0x38(%rsp)
jne 0xb2fa8
movq 0x10(%rsp), %rdi
callq 0x11c131
cmpq $0x3, %rax
jne 0xb32f2
callq 0x11be10
movq %rax, 0x18(%rsp)
callq 0x11be10
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfee
movq %rax, %rdi
callq 0xfe82b
movq %rax, %r14
movq 0x18(%rsp), %r8
leaq 0x807(%rip), %rbx       # 0xb374f
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r9
callq 0xfe3f8
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x11bfee
movq %rax, %rdi
callq 0xfe82b
movq 0x20(%rsp), %r8
movq %rax, 0x58(%rsp)
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r12, %r9
callq 0xfe3f8
testq %r12, %r12
movq %r14, 0x60(%rsp)
je 0xb2fba
movq %r12, %rdi
callq 0xfcc32
testb %al, %al
je 0xb2fba
callq 0x1d17f
movq $0x0, 0x58(%rsp)
movq $0x0, 0x60(%rsp)
xorl %r15d, %r15d
movq %r15, %rax
shlq $0x4, %rax
leaq 0x4003d5(%rip), %rcx    # 0x4b33a0
movq (%rax,%rcx), %r14
movq 0x8(%rax,%rcx), %r12
leaq 0x29efda(%rip), %rdi    # 0x351fb5
movq %r12, %rsi
xorl %eax, %eax
callq 0x17070
movq 0x8(%rsp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xb308c
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movb $0x1, %r13b
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rbx
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rdi
callq 0x172f0
movq %rax, %r15
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfb3
movq %rax, %r12
movq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfb3
movq %rax, %rdi
callq 0x172f0
movzbl %r13b, %ebp
movl %ebp, %edi
andl $0x1, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rax, %r8
callq *%r14
movl $0x0, %r13d
testb $0x1, %bpl
jne 0xb3005
movl $0x2, %edx
movq 0x50(%rsp), %r15
movq 0x48(%rsp), %r12
jmp 0xb31fb
movq 0x10(%rsp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xb3175
cmpb $0x1, 0x38(%rsp)
jne 0xb319d
movq 0x18(%rsp), %rdi
callq 0x11c131
movl $0x2, %edx
testq %rax, %rax
je 0xb31fb
movq %r12, 0x48(%rsp)
movq %r15, 0x50(%rsp)
xorl %ebx, %ebx
movq 0x20(%rsp), %rdi
callq 0x11c131
testq %rax, %rax
je 0xb3153
xorl %r12d, %r12d
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x11bfb3
movq %rax, %r13
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0x172f0
movq %rax, %rbp
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %r15
movq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0x172f0
movl $0x1, %edi
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq %rax, %r8
callq *%r14
incq %r12
movq 0x20(%rsp), %rdi
callq 0x11c131
cmpq %rax, %r12
jb 0xb30e0
incq %rbx
movq 0x18(%rsp), %rdi
callq 0x11c131
cmpq %rax, %rbx
jb 0xb30ce
movq 0x50(%rsp), %r15
movq 0x48(%rsp), %r12
jmp 0xb31c9
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xb31d0
movq (%rax), %rdi
callq 0x11b0a1
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x200cee
jmp 0xb31f8
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
movl $0x1, %esi
callq 0x11bfb3
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x200b6c
movl $0x2, %edx
jmp 0xb31fb
movq 0x30(%rsp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xb32ed
movq 0x30(%rsp), %rdi
callq 0x11b0a1
movq %r14, %rdi
movq %rax, %rsi
callq 0x200c2f
movq %rax, %rdx
leaq 0x29edbb(%rip), %rdi    # 0x351fbd
movq %r12, %rsi
xorl %eax, %eax
callq 0x17070
incq %r15
cmpq $0x7, %r15
jne 0xb2fbd
movq 0x60(%rsp), %rdi
callq 0xfe3bd
movq 0x58(%rsp), %rdi
callq 0xfe3bd
movl 0x40(%rsp), %ebp
movq 0x8(%rsp), %rdi
callq 0x11c144
movq 0x10(%rsp), %rdi
callq 0x11c144
movq 0x30(%rsp), %rdi
callq 0x11bdbf
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0xb3277
movq (%rax), %rdi
callq 0x11bdbf
movq 0x28(%rsp), %rdi
leaq 0x29ebe9(%rip), %rsi    # 0x351e56
movl $0xee, %edx
callq 0x1045eb
cmpb $0x1, 0x38(%rsp)
jne 0xb3292
movq 0x18(%rsp), %rdi
callq 0x11c144
movq 0x20(%rsp), %rdi
callq 0x11c144
xorl %eax, %eax
cmpl $0x1, %ebp
sete %al
negl %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rdi
callq 0x11b0ca
testq %rax, %rax
je 0xb2dd6
movq 0x30(%rsp), %rdi
callq 0x11b0a1
leaq 0x29eed4(%rip), %rdi    # 0x3521a3
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
jmp 0xb2dd6
callq 0x1d0d4
callq 0x1d10d
callq 0x1d1f1
callq 0x1d1b8
callq 0x1d146