// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_readjoiner_cnttest.c
// Function: gt_readjoiner_cnttest_runner
static int gt_readjoiner_cnttest_runner(GT_UNUSED int argc,
    GT_UNUSED const char **argv, GT_UNUSED int parsed_args,
    void *tool_arguments, GT_UNUSED GtError *err)
{
  GtReadjoinerCnttestArguments *arguments = tool_arguments;
  GtEncseqLoader *el = NULL;
  GtEncseq *reads = NULL;
  GtBitsequence *bits = NULL;
  GtUword nofreads;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  if (arguments->test == GT_READJOINER_CNTTEST_SHOWLIST)
  {
    GtStr *fn = NULL;
    fn = gt_str_clone(arguments->readset);
    gt_str_append_cstr(fn, GT_READJOINER_SUFFIX_CNTLIST);
    had_err = gt_cntlist_parse(gt_str_get(fn), true, &bits, &nofreads, err);
    gt_str_delete(fn);
  }
  else if (arguments->test == GT_READJOINER_CNTTEST_BRUTEFORCE ||
      arguments->test == GT_READJOINER_CNTTEST_KMP)
  {
    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
    {
      gt_rdj_pairwise_exact(GT_OVLFIND_CNT, reads, !arguments->singlestrand,
          false, arguments->test == GT_READJOINER_CNTTEST_KMP, 1UL, true,
          NULL, NULL, false, NULL, &bits, &nofreads);
    }
    gt_encseq_delete(reads);
    gt_encseq_loader_delete(el);
  }
  else if (arguments->test == GT_READJOINER_CNTTEST_ESA)
  {
    Sequentialsuffixarrayreader *ssar = NULL;
    GtUword readlength = 0, firstrevcompl = 0;
    GtLogger *verbose_logger = gt_logger_new(arguments->verbose,
        GT_LOGGER_DEFLT_PREFIX, stderr);
    ssar = gt_newSequentialsuffixarrayreaderfromfile(gt_str_get(
          arguments->readset), SARR_LCPTAB | SARR_SUFTAB | SARR_SSPTAB,
        true, verbose_logger, err);
    if (gt_error_is_set(err))
      had_err = -1;
    else
    {
      nofreads = gt_encseq_num_of_sequences(ssar->encseq);
      if (!arguments->singlestrand)
      {
        nofreads = GT_DIV2(nofreads);
        firstrevcompl = nofreads;
      }
      GT_INITBITTAB(bits, nofreads);
      if (!arguments->singlestrand)
      if (gt_encseq_accesstype_get(ssar->encseq) == GT_ACCESS_TYPE_EQUALLENGTH)
        readlength = gt_encseq_seqlength(ssar->encseq, 0);
      (void)gt_contfind_bottomup(ssar, false, bits, arguments->singlestrand ? 0
          : firstrevcompl, readlength);
    }
    if (ssar != NULL)
      gt_freeSequentialsuffixarrayreader(&ssar);
    gt_logger_delete(verbose_logger);
  }
  else
  {
    gt_assert(false);
  }
  if (!had_err)
    had_err = gt_cntlist_show(bits, nofreads, NULL, false, err);
  gt_free(bits);
  return had_err;
}

// Assembly:
subq $0xe8, %rsp
movl %edi, 0xe4(%rsp)
movq %rsi, 0xd8(%rsp)
movl %edx, 0xd4(%rsp)
movq %rcx, 0xc8(%rsp)
movq %r8, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq $0x0, 0xb0(%rsp)
movq $0x0, 0xa8(%rsp)
movq $0x0, 0xa0(%rsp)
movl $0x0, 0x94(%rsp)
cmpq $0x0, 0xc0(%rsp)
je 0x50392
movq 0xc0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x5035a
jmp 0x50392
movq 0x5ebc3f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c5ca8(%rip), %rsi    # 0x516013
leaq 0x4c5e4d(%rip), %rdx    # 0x5161bf
leaq 0x4d4327(%rip), %rcx    # 0x5246a0
leaq 0x4d410d(%rip), %r8     # 0x52448d
movl $0x91, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x50394
jmp 0x50396
cmpq $0x0, 0xb8(%rsp)
jne 0x503d9
movq 0x5ebbf8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c5c61(%rip), %rsi    # 0x516013
leaq 0x52a7a6(%rip), %rdx    # 0x57ab5f
leaq 0x4d42e0(%rip), %rcx    # 0x5246a0
leaq 0x4d40c6(%rip), %r8     # 0x52448d
movl $0x92, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x503db
movq 0xb8(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x50470
movq $0x0, 0x88(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
callq 0x11e280
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
leaq 0x4d3446(%rip), %rsi    # 0x523866
callq 0x11d550
movq 0x88(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0xc0(%rsp), %r8
movl $0x1, %esi
leaq 0xa0(%rsp), %rdx
leaq 0x98(%rsp), %rcx
callq 0x275430
movl %eax, 0x94(%rsp)
movq 0x88(%rsp), %rdi
callq 0x11f560
jmp 0x5083e
movq 0xb8(%rsp), %rax
cmpl $0x1, 0x10(%rax)
je 0x50490
movq 0xb8(%rsp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x505cb
callq 0xb7a40
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rdi
callq 0xba570
movq 0xb0(%rsp), %rdi
callq 0xba760
movq 0xb8(%rsp), %rax
testb $0x1, 0x14(%rax)
jne 0x504d2
movq 0xb0(%rsp), %rdi
callq 0xba710
movq 0xb0(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
callq 0x11dee0
movq 0x58(%rsp), %rdi
movq %rax, %rsi
movq 0xc0(%rsp), %rdx
callq 0xb7aa0
movq %rax, 0xa8(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x50527
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x505ac
movq 0xa8(%rsp), %rsi
movq 0xb8(%rsp), %rax
movb 0x14(%rax), %cl
xorb $-0x1, %cl
movq 0xb8(%rsp), %rax
cmpl $0x2, 0x10(%rax)
sete %al
movq %rsp, %rdx
leaq 0x98(%rsp), %rdi
movq %rdi, 0x30(%rdx)
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x28(%rdx)
movq $0x0, 0x20(%rdx)
movl $0x0, 0x18(%rdx)
movq $0x0, 0x10(%rdx)
movq $0x0, 0x8(%rdx)
movl $0x1, (%rdx)
movzbl %cl, %edx
andl $0x1, %edx
movzbl %al, %r8d
andl $0x1, %r8d
movl $0x1, %edi
xorl %ecx, %ecx
movl $0x1, %r9d
callq 0x2862f0
movq 0xa8(%rsp), %rdi
callq 0xae070
movq 0xb0(%rsp), %rdi
callq 0xb7e50
jmp 0x5083c
movq 0xb8(%rsp), %rax
cmpl $0x3, 0x10(%rax)
jne 0x50800
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq 0xb8(%rsp), %rax
movb 0x15(%rax), %al
movq 0x5eb993(%rip), %rcx    # 0x63bfa0
movq (%rcx), %rdx
leaq 0x4c72d5(%rip), %rsi    # 0x5178ec
andb $0x1, %al
movzbl %al, %edi
callq 0xe7870
movq %rax, 0x68(%rsp)
movq 0xb8(%rsp), %rax
movq (%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x68(%rsp), %rcx
movq 0xc0(%rsp), %r8
movl $0x86, %esi
movl $0x1, %edx
callq 0x23b3e0
movq %rax, 0x80(%rsp)
movq 0xc0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x50670
jmp 0x50680
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0x507dc
movq 0x80(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xa9d50
movq %rax, 0x98(%rsp)
movq 0xb8(%rsp), %rax
testb $0x1, 0x14(%rax)
jne 0x506c7
movq 0x98(%rsp), %rax
shrq %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x98(%rsp), %rax
shrq $0x6, %rax
cmpq $0x0, %rax
jne 0x506e5
movl $0x1, %eax
movq %rax, 0x50(%rsp)
jmp 0x506fe
movq 0x98(%rsp), %rax
subq $0x1, %rax
shrq $0x6, %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rsi
shlq $0x3, %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0x4d3d71(%rip), %rdx    # 0x52448d
movl $0xc3, %ecx
callq 0xe8540
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x60(%rsp), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x19360
movq 0xb8(%rsp), %rax
testb $0x1, 0x14(%rax)
jne 0x50786
movq 0x80(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xc2d90
cmpl $0x2, %eax
jne 0x50784
movq 0x80(%rsp), %rax
movq 0x38(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb09f0
movq %rax, 0x78(%rsp)
jmp 0x50786
movq 0x80(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xb8(%rsp), %rax
testb $0x1, 0x14(%rax)
je 0x507b7
xorl %eax, %eax
movq %rax, 0x38(%rsp)
jmp 0x507c1
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdx
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rcx
movq 0x78(%rsp), %r8
xorl %esi, %esi
callq 0x276520
cmpq $0x0, 0x80(%rsp)
je 0x507f4
leaq 0x80(%rsp), %rdi
callq 0x23b5e0
movq 0x68(%rsp), %rdi
callq 0xe7ed0
jmp 0x5083a
jmp 0x50802
movq 0x5eb797(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c5800(%rip), %rsi    # 0x516013
leaq 0x508549(%rip), %rdx    # 0x558d63
leaq 0x4d3e7f(%rip), %rcx    # 0x5246a0
leaq 0x4d3c65(%rip), %r8     # 0x52448d
movl $0xd0, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x5083c
jmp 0x5083e
cmpl $0x0, 0x94(%rsp)
jne 0x50872
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0xc0(%rsp), %r8
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x275100
movl %eax, 0x94(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x4d3c0c(%rip), %rsi    # 0x52448d
movl $0xd4, %edx
callq 0xe88c0
movl 0x94(%rsp), %eax
addq $0xe8, %rsp
retq
nopw (%rax,%rax)