// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_readjoiner_assembly.c
// Function: gt_readjoiner_assembly_runner
static int gt_readjoiner_assembly_runner(GT_UNUSED int argc,
    GT_UNUSED const char **argv, GT_UNUSED int parsed_args,
    void *tool_arguments, GtError *err)
{
  GtReadjoinerAssemblyArguments *arguments = tool_arguments;
  GtLogger *verbose_logger, *default_logger;
  GtEncseqLoader *el;
  GtEncseq *reads;
  GtTimer *timer = NULL;
  GtStrgraph *strgraph = NULL;
  GtBitsequence *contained = NULL;
  const char *readset = gt_str_get(arguments->readset);
  bool eqlen = true;
  GtUword nreads, tlen, rlen;
  int had_err = 0;

  gt_assert(arguments);
  gt_error_check(err);
  default_logger = gt_logger_new(!arguments->quiet, GT_LOGGER_DEFLT_PREFIX,
      stdout);
  gt_logger_log(default_logger,
      "gt readjoiner assembly (version "GT_READJOINER_VERSION")");
  verbose_logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX,
      stdout);
  gt_logger_log(verbose_logger, "verbose output activated");
  gt_logger_log(verbose_logger, "readset name = %s", readset);
  if (gt_showtime_enabled())
  {
    timer = gt_timer_new_with_progress_description(
        GT_READJOINER_ASSEMBLY_MSG_COUNTSPM);
    gt_timer_start(timer);
    gt_timer_show_cpu_time_by_progress(timer);
  }

  if (!arguments->paths2seq)
  {
    el = gt_encseq_loader_new();
    gt_encseq_loader_drop_description_support(el);
    gt_encseq_loader_disable_autosupport(el);
    reads = gt_encseq_loader_load(el, readset, err);
    if (reads == NULL)
    {
      had_err = -1;
    }
    if (had_err == 0)
    {
      eqlen = gt_encseq_accesstype_get(reads) == GT_ACCESS_TYPE_EQUALLENGTH;
      nreads = gt_encseq_num_of_sequences(reads);
      gt_logger_log(default_logger, "number of reads in filtered readset = "
                    GT_WU, nreads);
      tlen = gt_encseq_total_length(reads) - nreads + 1;
      gt_logger_log(verbose_logger, "total length of filtered readset = " GT_WU,
          tlen);

      if (eqlen)
      {
        rlen = gt_encseq_seqlength(reads, 0);
        gt_logger_log(verbose_logger, "read length = " GT_WU, rlen);
        gt_encseq_delete(reads);
        reads = NULL;
      }
      else
      {
        had_err = gt_readjoiner_assembly_build_contained_reads_list(
          arguments, &contained, err);
        rlen = 0;
        gt_logger_log(verbose_logger, "read length = variable");
        gt_assert(reads != NULL);
      }
    }

    if (had_err == 0)
    {
      if (!arguments->load)
      {
        had_err = gt_readjoiner_assembly_build_graph(arguments, &strgraph,
            reads, readset, eqlen, rlen, nreads, contained, default_logger,
            verbose_logger, timer, err);
      }
      else
      {
        gt_readjoiner_assembly_load_graph(&strgraph, reads, readset, rlen,
            default_logger, timer);
      }
    }

    if (!eqlen && reads != NULL && !arguments->errors)
    {
      gt_encseq_delete(reads);
      reads = NULL;
      if (had_err == 0)
        gt_strgraph_set_encseq(strgraph, NULL);
    }

    if (had_err == 0 && arguments->redtrans)
    {
      if (gt_showtime_enabled())
        gt_timer_show_progress(timer, GT_READJOINER_ASSEMBLY_MSG_REDTRANS,
            stdout);
      gt_strgraph_sort_edges_by_len(strgraph, false);
      (void)gt_strgraph_redtrans(strgraph, false);
      (void)gt_strgraph_redself(strgraph, false);
      (void)gt_strgraph_redwithrc(strgraph, false);
      gt_strgraph_log_stats(strgraph, verbose_logger);
    }

    if (had_err == 0 && arguments->errors)
    {
      if (gt_showtime_enabled())
        gt_timer_show_progress(timer, GT_READJOINER_ASSEMBLY_MSG_CLEANSG,
            stdout);
      gt_logger_log(default_logger, GT_READJOINER_ASSEMBLY_MSG_CLEANSG);
      had_err = gt_readjoiner_assembly_error_correction(strgraph,
          arguments->bubble, arguments->deadend, arguments->deadend_depth,
          verbose_logger);
    }

    if (had_err == 0 && arguments->save)
    {
      if (gt_showtime_enabled())
        gt_timer_show_progress(timer, GT_READJOINER_ASSEMBLY_MSG_SAVESG,
            stdout);
      gt_logger_log(default_logger, GT_READJOINER_ASSEMBLY_MSG_SAVESG);
      gt_strgraph_show(strgraph, GT_STRGRAPH_BIN,
          gt_str_get(arguments->readset), GT_READJOINER_SUFFIX_SG, false);
    }

    if (!eqlen && reads != NULL)
    {
      gt_encseq_delete(reads);
      reads = NULL;
      if (had_err == 0)
        gt_strgraph_set_encseq(strgraph, NULL);
    }

    if (had_err == 0)
    {
      if (gt_showtime_enabled())
        gt_timer_show_progress(timer, GT_READJOINER_ASSEMBLY_MSG_TRAVERSESG,
            stdout);
      gt_logger_log(default_logger, GT_READJOINER_ASSEMBLY_MSG_TRAVERSESG);
      gt_readjoiner_assembly_show_current_space("(before traversal)");
      gt_strgraph_spell(strgraph, (GtUword)arguments->depthcutoff,
          (GtUword)arguments->lengthcutoff, arguments->vd, readset,
          GT_READJOINER_SUFFIX_CONTIG_PATHS, NULL, true,
          arguments->show_contigs_info, false, verbose_logger);
    }

    if (contained != NULL)
      gt_free(contained);
    gt_strgraph_delete(strgraph);
    strgraph = NULL;
    gt_assert(reads == NULL);
    gt_encseq_loader_delete(el);
  }

  if (had_err == 0)
  {
    gt_readjoiner_assembly_show_current_space("(before paths2seq)");
    had_err = gt_readjoiner_assembly_paths2seq(readset,
        (GtUword)arguments->lengthcutoff, arguments->vd,
        arguments->astat, arguments->coverage, arguments->copynum,
        arguments->buffersize, default_logger, &timer, err);
  }

  if (gt_showtime_enabled())
  {
    gt_timer_show_progress_final(timer, stdout);
    gt_timer_delete(timer);
  }
  gt_logger_delete(default_logger);
  gt_logger_delete(verbose_logger);
  return had_err;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movl %edi, 0xcc(%rsp)
movq %rsi, 0xc0(%rsp)
movl %edx, 0xbc(%rsp)
movq %rcx, 0xb0(%rsp)
movq %r8, 0xa8(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11dee0
movq %rax, 0x60(%rsp)
movb $0x1, 0x5f(%rsp)
movl $0x0, 0x3c(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x4de43
movq 0x5ee18e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c81f7(%rip), %rsi    # 0x516013
leaq 0x52cd3c(%rip), %rdx    # 0x57ab5f
leaq 0x4d5f97(%rip), %rcx    # 0x523dc1
leaq 0x4d5b28(%rip), %r8     # 0x523959
movl $0x1ef, %r9d            # imm = 0x1EF
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de45
jmp 0x4de47
cmpq $0x0, 0xa8(%rsp)
je 0x4de9d
movq 0xa8(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4de65
jmp 0x4de9d
movq 0x5ee134(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c819d(%rip), %rsi    # 0x516013
leaq 0x4c8342(%rip), %rdx    # 0x5161bf
leaq 0x4d5f3d(%rip), %rcx    # 0x523dc1
leaq 0x4d5ace(%rip), %r8     # 0x523959
movl $0x1f0, %r9d            # imm = 0x1F0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4de9f
movq 0xa0(%rsp), %rax
movb 0x1(%rax), %al
xorb $-0x1, %al
movq 0x5ee085(%rip), %rcx    # 0x63bf38
movq (%rcx), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x4c9a29(%rip), %rsi    # 0x5178ec
callq 0xe7870
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
leaq 0x4d5f00(%rip), %rsi    # 0x523ddf
movb $0x0, %al
callq 0xe7cd0
movq 0xa0(%rsp), %rax
movb (%rax), %al
movq 0x5ee041(%rip), %rcx    # 0x63bf38
movq (%rcx), %rdx
leaq 0x4c99eb(%rip), %rsi    # 0x5178ec
andb $0x1, %al
movzbl %al, %edi
callq 0xe7870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
leaq 0x4d58e1(%rip), %rsi    # 0x523803
movb $0x0, %al
callq 0xe7cd0
movq 0x98(%rsp), %rdi
movq 0x60(%rsp), %rdx
leaq 0x4d58df(%rip), %rsi    # 0x52381c
movb $0x0, %al
callq 0xe7cd0
callq 0x11aa90
testb $0x1, %al
jne 0x4df4f
jmp 0x4df74
leaq 0x4d5eae(%rip), %rdi    # 0x523e04
callq 0x1213a0
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1213f0
movq 0x78(%rsp), %rdi
callq 0x121ec0
movq 0xa0(%rsp), %rax
testb $0x1, 0x21(%rax)
jne 0x4e586
callq 0xb7a40
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
callq 0xba570
movq 0x88(%rsp), %rdi
callq 0xba760
movq 0x88(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0xa8(%rsp), %rdx
callq 0xb7aa0
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x4dfe2
movl $0xffffffff, 0x3c(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0x3c(%rsp)
jne 0x4e145
movq 0x80(%rsp), %rdi
callq 0xc2d90
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0x80(%rsp), %rdi
callq 0xa9d50
movq %rax, 0x50(%rsp)
movq 0x90(%rsp), %rdi
movq 0x50(%rsp), %rdx
leaq 0x4d5dfe(%rip), %rsi    # 0x523e2a
movb $0x0, %al
callq 0xe7cd0
movq 0x80(%rsp), %rdi
callq 0xa9d00
subq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0x98(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0x4d5df2(%rip), %rsi    # 0x523e54
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0x5f(%rsp)
je 0x4e0bf
movq 0x80(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb09f0
movq %rax, 0x40(%rsp)
movq 0x98(%rsp), %rdi
movq 0x40(%rsp), %rdx
leaq 0x4d5de1(%rip), %rsi    # 0x523e7b
movb $0x0, %al
callq 0xe7cd0
movq 0x80(%rsp), %rdi
callq 0xae070
movq $0x0, 0x80(%rsp)
jmp 0x4e143
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rdx
leaq 0x68(%rsp), %rsi
callq 0x4e680
movl %eax, 0x3c(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x98(%rsp), %rdi
leaq 0x4d5d98(%rip), %rsi    # 0x523e8d
movb $0x0, %al
callq 0xe7cd0
cmpq $0x0, 0x80(%rsp)
jne 0x4e13f
movq 0x5ede92(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c7efb(%rip), %rsi    # 0x516013
leaq 0x53165f(%rip), %rdx    # 0x57f77e
leaq 0x4d5c9b(%rip), %rcx    # 0x523dc1
leaq 0x4d582c(%rip), %r8     # 0x523959
movl $0x222, %r9d            # imm = 0x222
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e141
jmp 0x4e143
jmp 0x4e145
cmpl $0x0, 0x3c(%rsp)
jne 0x4e204
movq 0xa0(%rsp), %rax
testb $0x1, 0x24(%rax)
jne 0x4e1d9
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rdx
movq 0x60(%rsp), %rcx
movb 0x5f(%rsp), %r8b
movq 0x40(%rsp), %r9
movq 0x50(%rsp), %r15
movq 0x68(%rsp), %r14
movq 0x90(%rsp), %rbx
movq 0x98(%rsp), %r11
movq 0x78(%rsp), %r10
movq 0xa8(%rsp), %rax
leaq 0x70(%rsp), %rsi
andb $0x1, %r8b
movzbl %r8b, %r8d
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x4e810
movl %eax, 0x3c(%rsp)
jmp 0x4e202
movq 0x80(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x78(%rsp), %r9
leaq 0x70(%rsp), %rdi
callq 0x4ea20
jmp 0x4e204
testb $0x1, 0x5f(%rsp)
jne 0x4e254
cmpq $0x0, 0x80(%rsp)
je 0x4e254
movq 0xa0(%rsp), %rax
testb $0x1, 0x20(%rax)
jne 0x4e254
movq 0x80(%rsp), %rdi
callq 0xae070
movq $0x0, 0x80(%rsp)
cmpl $0x0, 0x3c(%rsp)
jne 0x4e252
movq 0x70(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x292700
jmp 0x4e254
cmpl $0x0, 0x3c(%rsp)
jne 0x4e2d1
movq 0xa0(%rsp), %rax
testb $0x1, 0x22(%rax)
je 0x4e2d1
callq 0x11aa90
testb $0x1, %al
jne 0x4e274
jmp 0x4e28f
movq 0x78(%rsp), %rdi
movq 0x5edcb8(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4d57b6(%rip), %rsi    # 0x523a40
callq 0x121930
movq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x292b40
movq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x293f20
movq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x293310
movq 0x70(%rsp), %rdi
xorl %esi, %esi
callq 0x2939c0
movq 0x70(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x29b7a0
cmpl $0x0, 0x3c(%rsp)
jne 0x4e35d
movq 0xa0(%rsp), %rax
testb $0x1, 0x20(%rax)
je 0x4e35d
callq 0x11aa90
testb $0x1, %al
jne 0x4e2f5
jmp 0x4e310
movq 0x78(%rsp), %rdi
movq 0x5edc37(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4d5b99(%rip), %rsi    # 0x523ea4
callq 0x121930
movq 0x90(%rsp), %rdi
leaq 0x4d5b85(%rip), %rsi    # 0x523ea4
movb $0x0, %al
callq 0xe7cd0
movq 0x70(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl 0x30(%rax), %esi
movq 0xa0(%rsp), %rax
movl 0x2c(%rax), %edx
movq 0xa0(%rsp), %rax
movl 0x34(%rax), %ecx
movq 0x98(%rsp), %r8
callq 0x4eac0
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
jne 0x4e3e9
movq 0xa0(%rsp), %rax
testb $0x1, 0x23(%rax)
je 0x4e3e9
callq 0x11aa90
testb $0x1, %al
jne 0x4e381
jmp 0x4e39c
movq 0x78(%rsp), %rdi
movq 0x5edbab(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4d5b27(%rip), %rsi    # 0x523ebe
callq 0x121930
movq 0x90(%rsp), %rdi
leaq 0x4d5b13(%rip), %rsi    # 0x523ebe
movb $0x0, %al
callq 0xe7cd0
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11dee0
movq 0x30(%rsp), %rdi
movq %rax, %rdx
movl $0x4, %esi
leaq 0x4d5af7(%rip), %rcx    # 0x523ed8
xorl %r8d, %r8d
callq 0x297ff0
testb $0x1, 0x5f(%rsp)
jne 0x4e42b
cmpq $0x0, 0x80(%rsp)
je 0x4e42b
movq 0x80(%rsp), %rdi
callq 0xae070
movq $0x0, 0x80(%rsp)
cmpl $0x0, 0x3c(%rsp)
jne 0x4e429
movq 0x70(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x292700
jmp 0x4e42b
cmpl $0x0, 0x3c(%rsp)
jne 0x4e503
callq 0x11aa90
testb $0x1, %al
jne 0x4e441
jmp 0x4e45c
movq 0x78(%rsp), %rdi
movq 0x5edaeb(%rip), %rax    # 0x63bf38
movq (%rax), %rdx
leaq 0x4d5a85(%rip), %rsi    # 0x523edc
callq 0x121930
movq 0x90(%rsp), %rdi
leaq 0x4d5a71(%rip), %rsi    # 0x523edc
movb $0x0, %al
callq 0xe7cd0
leaq 0x4d5a75(%rip), %rdi    # 0x523eee
callq 0x4ec70
movq 0x70(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, %esi
movq 0xa0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
movq 0xa0(%rsp), %rax
movb 0x25(%rax), %cl
movq 0x60(%rsp), %r8
movq 0xa0(%rsp), %rax
movb 0x28(%rax), %r10b
movq 0x98(%rsp), %rax
leaq 0x4d5fbe(%rip), %r9     # 0x524486
xorl %r11d, %r11d
xorl %r11d, %r11d
andb $0x1, %cl
andb $0x1, %r10b
movzbl %cl, %ecx
movq $0x0, (%rsp)
movl $0x1, 0x8(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x29b920
cmpq $0x0, 0x68(%rsp)
je 0x4e521
movq 0x68(%rsp), %rdi
leaq 0x4d5442(%rip), %rsi    # 0x523959
movl $0x274, %edx            # imm = 0x274
callq 0xe88c0
movq 0x70(%rsp), %rdi
callq 0x290110
movq $0x0, 0x70(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x4e577
movq 0x5eda5a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c7ac3(%rip), %rsi    # 0x516013
leaq 0x4d59aa(%rip), %rdx    # 0x523f01
leaq 0x4d5863(%rip), %rcx    # 0x523dc1
leaq 0x4d53f4(%rip), %r8     # 0x523959
movl $0x277, %r9d            # imm = 0x277
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e579
movq 0x88(%rsp), %rdi
callq 0xb7e50
cmpl $0x0, 0x3c(%rsp)
jne 0x4e62a
leaq 0x4d5977(%rip), %rdi    # 0x523f0f
callq 0x4ec70
movq 0x60(%rsp), %rdi
movq 0xa0(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, %esi
movq 0xa0(%rsp), %rax
movb 0x25(%rax), %dl
movq 0xa0(%rsp), %rax
movb 0x26(%rax), %cl
movq 0xa0(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0xa0(%rsp), %rax
movb 0x27(%rax), %r8b
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %r9
movq 0x90(%rsp), %r11
movq 0xa8(%rsp), %rax
leaq 0x78(%rsp), %r10
andb $0x1, %dl
andb $0x1, %cl
andb $0x1, %r8b
movzbl %dl, %edx
movzbl %cl, %ecx
movzbl %r8b, %r8d
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x4ed60
movl %eax, 0x3c(%rsp)
callq 0x11aa90
testb $0x1, %al
jne 0x4e635
jmp 0x4e653
movq 0x78(%rsp), %rdi
movq 0x5ed8f7(%rip), %rax    # 0x63bf38
movq (%rax), %rsi
callq 0x121d70
movq 0x78(%rsp), %rdi
callq 0x121f00
movq 0x90(%rsp), %rdi
callq 0xe7ed0
movq 0x98(%rsp), %rdi
callq 0xe7ed0
movl 0x3c(%rsp), %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop