// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_readjoiner_spmtest.c
// Function: gt_readjoiner_spmtest_runner
static int gt_readjoiner_spmtest_runner(GT_UNUSED int argc,
    GT_UNUSED const char **argv, GT_UNUSED int parsed_args,
    void *tool_arguments, GT_UNUSED GtError *err)
{
  GtReadjoinerSpmtestArguments *arguments = tool_arguments;
  GtEncseqLoader *el = NULL;
  GtEncseq *reads = NULL;
  GtLogger *verbose_logger;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  if (arguments->test == GT_READJOINER_SPMTEST_SHOWLIST)
  {
    GtStr *fn = NULL;
    fn = gt_str_clone(arguments->readset);
    gt_str_append_cstr(fn, GT_READJOINER_SUFFIX_SPMLIST);
    had_err = gt_spmlist_parse(gt_str_get(fn), 0, gt_spmproc_show_ascii,
        NULL, err);
    gt_str_delete(fn);
    return had_err;
  }
  verbose_logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX,
      stderr);
  el = gt_encseq_loader_new();
  gt_encseq_loader_drop_description_support(el);
  gt_encseq_loader_disable_autosupport(el);
  if (!arguments->singlestrand)
    gt_encseq_loader_mirror(el);
  reads = gt_encseq_loader_load(el, gt_str_get(arguments->readset), err);
  if (reads == NULL)
    had_err = -1;
  else
  {
    Sequentialsuffixarrayreader *ssar = NULL;
    switch (arguments->test)
    {
      case GT_READJOINER_SPMTEST_BRUTEFORCE:
        gt_rdj_pairwise_exact(GT_OVLFIND_SPM, reads, !arguments->singlestrand,
            false, false, (GtUword)arguments->minmatchlength, true,
            gt_spmproc_show_ascii, NULL, false, NULL, NULL, NULL);
        break;
      case GT_READJOINER_SPMTEST_KMP:
        gt_rdj_pairwise_exact(GT_OVLFIND_SPM, reads, !arguments->singlestrand,
            false, true, (GtUword)arguments->minmatchlength, true,
            gt_spmproc_show_ascii, NULL, false, NULL, NULL, NULL);
        break;
      case GT_READJOINER_SPMTEST_GUSFIELD:
        ssar = gt_newSequentialsuffixarrayreaderfromfile(gt_str_get(
              arguments->readset), SARR_LCPTAB | SARR_SUFTAB | SARR_SSPTAB |
            SARR_ESQTAB, false, verbose_logger, err);
        if (gt_error_is_set(err))
          had_err = -1;
        else
          gt_rdj_gusfield(ssar, (GtUword)arguments->minmatchlength, true,
              true, arguments->singlestrand ? 0 :
              GT_DIV2(gt_encseq_num_of_sequences(reads)), gt_spmproc_show_ascii,
              NULL);
        if (ssar != NULL)
          gt_freeSequentialsuffixarrayreader(&ssar);
        break;
      default:
        gt_assert(false);
    }
    gt_encseq_delete(reads);
  }
  gt_encseq_loader_delete(el);
  gt_logger_delete(verbose_logger);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movq %rcx, %r12
testq %r8, %r8
je 0xbd31e
movq %r13, %rdi
callq 0x101a9a
testb %al, %al
jne 0xbd582
testq %r12, %r12
je 0xbd57d
cmpl $0x0, 0x10(%r12)
je 0xbd413
movzbl 0x19(%r12), %edi
movq 0x406c40(%rip), %rax    # 0x4c3f80
movq (%rax), %rdx
leaq 0x29258a(%rip), %rsi    # 0x34f8d4
callq 0x108ed0
movq %rax, %rbx
callq 0xf36ef
movq %rax, %r14
movq %rax, %rdi
callq 0xf6920
movq %r14, %rdi
callq 0xf69cc
cmpb $0x0, 0x18(%r12)
jne 0xbd37a
movq %r14, %rdi
callq 0xf69bc
movq (%r12), %rdi
callq 0x120d23
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xf374b
testq %rax, %rax
je 0xbd45d
movq %rax, %r15
movq $0x0, 0x40(%rsp)
movl 0x10(%r12), %eax
cmpl $0x3, %eax
je 0xbd4bd
cmpl $0x2, %eax
je 0xbd468
cmpl $0x1, %eax
jne 0xbd587
movzbl 0x18(%r12), %edx
movl 0x14(%r12), %r9d
xorl %r13d, %r13d
movq %r13, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movq %r13, 0x10(%rsp)
leaq 0x118a2b(%rip), %rax    # 0x1d5e18
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x1, (%rsp)
xorl $0x1, %edx
xorl %edi, %edi
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
jmp 0xbd4b3
movq (%r12), %rdi
callq 0x120e13
movq %rax, %rbx
leaq 0x29fb01(%rip), %rsi    # 0x35cf27
movq %rax, %rdi
callq 0x12097f
movq %rbx, %rdi
callq 0x120d23
leaq 0x1189db(%rip), %rdx    # 0x1d5e18
movq %rax, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movq %r13, %r8
callq 0x1d5b40
movl %eax, %ebp
movq %rbx, %rdi
callq 0x121b03
movl %ebp, %eax
jmp 0xbd56e
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0xbd55b
movzbl 0x18(%r12), %edx
movl 0x14(%r12), %r9d
xorl %r13d, %r13d
movq %r13, 0x30(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
movq %r13, 0x10(%rsp)
leaq 0x118989(%rip), %rax    # 0x1d5e18
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x1, (%rsp)
xorl $0x1, %edx
xorl %edi, %edi
movq %r15, %rsi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x1d3480
jmp 0xbd553
movq (%r12), %rdi
callq 0x120d23
movq %rax, %rdi
movl $0x87, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r13, %r8
callq 0x1ae094
movq %rax, 0x40(%rsp)
movq %r13, %rdi
callq 0x101a9a
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0xbd541
movq 0x40(%rsp), %rbp
movl 0x14(%r12), %esi
xorl %r13d, %r13d
cmpb $0x0, 0x18(%r12)
je 0xbd50c
xorl %r8d, %r8d
jmp 0xbd520
movq %r15, %rdi
movq %rsi, %r12
callq 0xec1e8
movq %r12, %rsi
movq %rax, %r8
shrq %r8
movq $0x0, (%rsp)
leaq 0x1188e9(%rip), %r9     # 0x1d5e18
movq %rbp, %rdi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x1d2820
cmpq $0x0, 0x40(%rsp)
je 0xbd553
leaq 0x40(%rsp), %rdi
callq 0x1ae1ac
movq %r15, %rdi
callq 0xee90c
movq %r14, %rdi
callq 0xf424d
movq %rbx, %rdi
callq 0x10916a
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1e1bc
callq 0x1e14a
callq 0x1e183