// File: /workspace/github_c_makefile_star2_O3/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 0xbb2a0
movq %r13, %rdi
callq 0xfcc32
testb %al, %al
jne 0xbb4ff
testq %r12, %r12
je 0xbb4fa
cmpl $0x0, 0x10(%r12)
je 0xbb395
movzbl 0x19(%r12), %edi
movq 0x3fdcbe(%rip), %rax    # 0x4b8f80
movq (%rax), %rdx
leaq 0x28b608(%rip), %rsi    # 0x3468d4
callq 0x103e40
movq %rax, %rbx
callq 0xef0cd
movq %rax, %r14
movq %rax, %rdi
callq 0xf22df
movq %r14, %rdi
callq 0xf238b
cmpb $0x0, 0x18(%r12)
jne 0xbb2fc
movq %r14, %rdi
callq 0xf237b
movq (%r12), %rdi
callq 0x11b0a1
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xef129
testq %rax, %rax
je 0xbb3df
movq %rax, %r15
movq $0x0, 0x40(%rsp)
movl 0x10(%r12), %eax
cmpl $0x3, %eax
je 0xbb43f
cmpl $0x2, %eax
je 0xbb3ea
cmpl $0x1, %eax
jne 0xbb504
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 0x111812(%rip), %rax    # 0x1ccb81
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 0xbb435
movq (%r12), %rdi
callq 0x11b191
movq %rax, %rbx
leaq 0x298b47(%rip), %rsi    # 0x353eef
movq %rax, %rdi
callq 0x11acf3
movq %rbx, %rdi
callq 0x11b0a1
leaq 0x1117c2(%rip), %rdx    # 0x1ccb81
movq %rax, %rdi
xorl %esi, %esi
xorl %ecx, %ecx
movq %r13, %r8
callq 0x1cc8a8
movl %eax, %ebp
movq %rbx, %rdi
callq 0x11bdbf
movl %ebp, %eax
jmp 0xbb4eb
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0xbb4d8
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 0x111770(%rip), %rax    # 0x1ccb81
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 0x1ca224
jmp 0xbb4d0
movq (%r12), %rdi
callq 0x11b0a1
movq %rax, %rdi
movl $0x87, %esi
xorl %edx, %edx
movq %rbx, %rcx
movq %r13, %r8
callq 0x1a5580
movq %rax, %rbp
movq %rax, 0x40(%rsp)
movq %r13, %rdi
callq 0xfcc32
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0xbb4c1
movl 0x14(%r12), %esi
xorl %r13d, %r13d
cmpb $0x0, 0x18(%r12)
je 0xbb48c
xorl %r8d, %r8d
jmp 0xbb4a0
movq %r15, %rdi
movq %rsi, %r12
callq 0xe7bac
movq %r12, %rsi
movq %rax, %r8
shrq %r8
movq $0x0, (%rsp)
leaq 0x1116d2(%rip), %r9     # 0x1ccb81
movq %rbp, %rdi
movl $0x1, %edx
movl $0x1, %ecx
callq 0x1c95d8
testq %rbp, %rbp
je 0xbb4d0
leaq 0x40(%rsp), %rdi
callq 0x1a5698
movq %r15, %rdi
callq 0xea375
movq %r14, %rdi
callq 0xefbe3
movq %rbx, %rdi
callq 0x1040e0
movl %r13d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1de6b
callq 0x1ddf9
callq 0x1de32
nopl (%rax)