// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_readjoiner_cgraph.c
// Function: gt_readjoiner_cgraph_runner
static int gt_readjoiner_cgraph_runner(GT_UNUSED int argc,
    GT_UNUSED const char **argv, GT_UNUSED int parsed_args,
    void *tool_arguments, GtError *err)
{
  GtReadjoinerCgraphArguments *arguments = tool_arguments;
  GtLogger *verbose_logger, *default_logger;
  const char *readset = gt_str_get(arguments->readset);
  int had_err = 0;
  GtContigsGraph *cg = NULL;
  FILE *cjl_i_fp = NULL, *cjl_o_fp = NULL, *j_fp = NULL, *rlt_fp = NULL,
       *di_fp = NULL;

  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 cgraph");
  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);

  GT_READJOINER_CGRAPH_GET_FP(cjl_i_fp, readset,
      GT_READJOINER_SUFFIX_CJ_I_LINKS, "r");
  GT_READJOINER_CGRAPH_GET_FP(cjl_o_fp, readset,
      GT_READJOINER_SUFFIX_CJ_O_LINKS, "r");
  GT_READJOINER_CGRAPH_GET_FP(j_fp, readset,
      GT_READJOINER_SUFFIX_JUNCTIONS, "r");
  GT_READJOINER_CGRAPH_GET_FP(rlt_fp, readset,
      GT_READJOINER_SUFFIX_READSLIBRARYTABLE, "r");
  GT_READJOINER_CGRAPH_GET_FP(di_fp, readset,
      GT_READJOINER_SUFFIX_DEPTHINFO, "r");
  if (!had_err)
  {
    cg = gt_contigs_graph_new(cjl_i_fp, cjl_o_fp, j_fp, rlt_fp, di_fp, err);
    if (cg == NULL)
      had_err = -1;
  }
  if (cjl_i_fp != NULL)
    gt_fa_fclose(cjl_i_fp);
  if (cjl_o_fp != NULL)
    gt_fa_fclose(cjl_o_fp);
  if (j_fp != NULL)
    gt_fa_fclose(j_fp);
  if (rlt_fp != NULL)
    gt_fa_fclose(rlt_fp);
  if (di_fp != NULL)
    gt_fa_fclose(di_fp);
  if (!had_err && arguments->smp1)
  {
    gt_contigs_graph_simplify(cg, false);
    if (arguments->ext)
      gt_contigs_graph_extend_contigs(cg, true);
  }
  if (!had_err && arguments->smp2)
  {
    gt_contigs_graph_simplify(cg, true);
    if (arguments->ext)
      gt_contigs_graph_extend_contigs(cg, false);
  }
  if (!had_err && arguments->dotdel)
    gt_contigs_graph_enable_dot_show_deleted(cg);
  if (!had_err && arguments->dot)
  {
    FILE *dot_fp = NULL;
    GT_READJOINER_CGRAPH_GET_FP(dot_fp, readset,
        GT_READJOINER_SUFFIX_CG_DOT, "w");
    if (!had_err)
    {
      GtFile *dot_gtfile;
      dot_gtfile = gt_file_new_from_fileptr(dot_fp);
      gt_contigs_graph_show_dot(cg, dot_gtfile);
      gt_file_delete_without_handle(dot_gtfile);
    }
    if (dot_fp != NULL)
      gt_fa_fclose(dot_fp);
  }
  if (!had_err)
  {
    GtUword nofcnums = gt_str_array_size(arguments->subgraph);
    if (nofcnums > 0)
    {
      FILE *dot_fp = NULL;
      GtUword i, *cnums;
      const char *cnum_str;
      cnums = gt_malloc(sizeof (*cnums) * nofcnums);
      for (i = 0; i < nofcnums && !had_err; i++)
      {
        cnum_str = gt_str_array_get(arguments->subgraph, i);
        if (sscanf(cnum_str, ""GT_WU"", cnums + i) != 1)
        {
          gt_error_set(err, "argument of option -subgraph is invalid");
          had_err = -1;
        }
      }
      GT_READJOINER_CGRAPH_GET_FP(dot_fp, readset,
          GT_READJOINER_SUFFIX_CG_SUB_DOT, "w");
      if (!had_err)
      {
        GtFile *dot_gtfile;
        dot_gtfile = gt_file_new_from_fileptr(dot_fp);
        had_err = gt_contigs_graph_show_dot_subgraph(cg, dot_gtfile, cnums,
            nofcnums, arguments->subgraph_depth, err);
        gt_file_delete_without_handle(dot_gtfile);
      }
      if (dot_fp != NULL)
        gt_fa_fclose(dot_fp);
      gt_free(cnums);
    }
  }
  if (!had_err)
  {
    FILE *paths_fp = NULL;
    GT_READJOINER_CGRAPH_GET_FP(paths_fp, readset,
        GT_READJOINER_SUFFIX_CG_PATHS, "w");
    if (!had_err)
      gt_contigs_graph_output_paths(cg, paths_fp);
    if (paths_fp != NULL)
      gt_fa_fclose(paths_fp);
  }
  gt_contigs_graph_delete(cg);
  gt_logger_delete(default_logger);
  gt_logger_delete(verbose_logger);
  return had_err;
}

// Assembly:
subq $0xd8, %rsp
movl %edi, 0xd4(%rsp)
movq %rsi, 0xc8(%rsp)
movl %edx, 0xc4(%rsp)
movq %rcx, 0xb8(%rsp)
movq %r8, 0xb0(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11dee0
movq %rax, 0x90(%rsp)
movl $0x0, 0x8c(%rsp)
movq $0x0, 0x80(%rsp)
movq $0x0, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movq $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
cmpq $0x0, 0xa8(%rsp)
jne 0x4f76d
movq 0x5ec864(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c68cd(%rip), %rsi    # 0x516013
leaq 0x52b412(%rip), %rdx    # 0x57ab5f
leaq 0x4d4ca9(%rip), %rcx    # 0x5243fd
leaq 0x4d4af3(%rip), %r8     # 0x52424e
movl $0x96, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4f76f
jmp 0x4f771
cmpq $0x0, 0xb0(%rsp)
je 0x4f7c7
movq 0xb0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4f78f
jmp 0x4f7c7
movq 0x5ec80a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4c6873(%rip), %rsi    # 0x516013
leaq 0x4c6a18(%rip), %rdx    # 0x5161bf
leaq 0x4d4c4f(%rip), %rcx    # 0x5243fd
leaq 0x4d4a99(%rip), %r8     # 0x52424e
movl $0x97, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4f7c9
movq 0xa8(%rsp), %rax
movb 0x1(%rax), %al
xorb $-0x1, %al
movq 0x5ec75b(%rip), %rcx    # 0x63bf38
movq (%rcx), %rdx
movzbl %al, %edi
andl $0x1, %edi
leaq 0x4c80ff(%rip), %rsi    # 0x5178ec
callq 0xe7870
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rdi
leaq 0x4d4c10(%rip), %rsi    # 0x524419
movb $0x0, %al
callq 0xe7cd0
movq 0xa8(%rsp), %rax
movb (%rax), %al
movq 0x5ec717(%rip), %rcx    # 0x63bf38
movq (%rcx), %rdx
leaq 0x4c80c1(%rip), %rsi    # 0x5178ec
andb $0x1, %al
movzbl %al, %edi
callq 0xe7870
movq %rax, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x4d3fb7(%rip), %rsi    # 0x523803
movb $0x0, %al
callq 0xe7cd0
movq 0xa0(%rsp), %rdi
movq 0x90(%rsp), %rdx
leaq 0x4d3fb2(%rip), %rsi    # 0x52381c
movb $0x0, %al
callq 0xe7cd0
cmpl $0x0, 0x8c(%rsp)
jne 0x4f8c5
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4b9c(%rip), %rsi    # 0x52442e
leaq 0x4dc741(%rip), %rdx    # 0x52bfda
leaq 0x4d49ae(%rip), %rcx    # 0x52424e
movl $0xa1, %r8d
callq 0xd92c0
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x78(%rsp)
jne 0x4f8c3
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f8c5
cmpl $0x0, 0x8c(%rsp)
jne 0x4f919
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4b4d(%rip), %rsi    # 0x524433
leaq 0x4dc6ed(%rip), %rdx    # 0x52bfda
leaq 0x4d495a(%rip), %rcx    # 0x52424e
movl $0xa3, %r8d
callq 0xd92c0
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x4f917
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f919
cmpl $0x0, 0x8c(%rsp)
jne 0x4f96d
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4afe(%rip), %rsi    # 0x524438
leaq 0x4dc699(%rip), %rdx    # 0x52bfda
leaq 0x4d4906(%rip), %rcx    # 0x52424e
movl $0xa5, %r8d
callq 0xd92c0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x4f96b
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f96d
cmpl $0x0, 0x8c(%rsp)
jne 0x4f9c1
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4aaf(%rip), %rsi    # 0x52443d
leaq 0x4dc645(%rip), %rdx    # 0x52bfda
leaq 0x4d48b2(%rip), %rcx    # 0x52424e
movl $0xa7, %r8d
callq 0xd92c0
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
jne 0x4f9bf
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4f9c1
cmpl $0x0, 0x8c(%rsp)
jne 0x4fa15
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4a60(%rip), %rsi    # 0x524442
leaq 0x4dc5f1(%rip), %rdx    # 0x52bfda
leaq 0x4d485e(%rip), %rcx    # 0x52424e
movl $0xa9, %r8d
callq 0xd92c0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x4fa13
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fa15
cmpl $0x0, 0x8c(%rsp)
jne 0x4fa65
movq 0x78(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0xb0(%rsp), %r9
callq 0x27dbd0
movq %rax, 0x80(%rsp)
cmpq $0x0, 0x80(%rsp)
jne 0x4fa63
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fa65
cmpq $0x0, 0x78(%rsp)
je 0x4fa77
movq 0x78(%rsp), %rdi
callq 0xd9390
cmpq $0x0, 0x70(%rsp)
je 0x4fa89
movq 0x70(%rsp), %rdi
callq 0xd9390
cmpq $0x0, 0x68(%rsp)
je 0x4fa9b
movq 0x68(%rsp), %rdi
callq 0xd9390
cmpq $0x0, 0x60(%rsp)
je 0x4faad
movq 0x60(%rsp), %rdi
callq 0xd9390
cmpq $0x0, 0x58(%rsp)
je 0x4fabf
movq 0x58(%rsp), %rdi
callq 0xd9390
cmpl $0x0, 0x8c(%rsp)
jne 0x4fb08
movq 0xa8(%rsp), %rax
testb $0x1, 0x3(%rax)
je 0x4fb08
movq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x27fad0
movq 0xa8(%rsp), %rax
testb $0x1, 0x6(%rax)
je 0x4fb06
movq 0x80(%rsp), %rdi
movl $0x1, %esi
callq 0x280ce0
jmp 0x4fb08
cmpl $0x0, 0x8c(%rsp)
jne 0x4fb51
movq 0xa8(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x4fb51
movq 0x80(%rsp), %rdi
movl $0x1, %esi
callq 0x27fad0
movq 0xa8(%rsp), %rax
testb $0x1, 0x6(%rax)
je 0x4fb4f
movq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x280ce0
jmp 0x4fb51
cmpl $0x0, 0x8c(%rsp)
jne 0x4fb76
movq 0xa8(%rsp), %rax
testb $0x1, 0x5(%rax)
je 0x4fb76
movq 0x80(%rsp), %rdi
callq 0x27d550
cmpl $0x0, 0x8c(%rsp)
jne 0x4fc3c
movq 0xa8(%rsp), %rax
testb $0x1, 0x2(%rax)
je 0x4fc3c
movq $0x0, 0x50(%rsp)
cmpl $0x0, 0x8c(%rsp)
jne 0x4fbf3
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4887(%rip), %rsi    # 0x524447
leaq 0x5162fe(%rip), %rdx    # 0x565ec5
leaq 0x4d4680(%rip), %rcx    # 0x52424e
movl $0xcc, %r8d
callq 0xd92c0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x4fbf1
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fbf3
cmpl $0x0, 0x8c(%rsp)
jne 0x4fc28
movq 0x50(%rsp), %rdi
callq 0xdda20
movq %rax, 0x48(%rsp)
movq 0x80(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x27e9f0
movq 0x48(%rsp), %rdi
callq 0xdd730
cmpq $0x0, 0x50(%rsp)
je 0x4fc3a
movq 0x50(%rsp), %rdi
callq 0xd9390
jmp 0x4fc3c
cmpl $0x0, 0x8c(%rsp)
jne 0x4fe1c
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11fcc0
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jbe 0x4fe1a
movq $0x0, 0x38(%rsp)
movq 0x40(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x4d45c9(%rip), %rsi    # 0x52424e
movl $0xdf, %edx
callq 0xe80f0
movq %rax, 0x28(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rcx
xorl %eax, %eax
cmpq 0x40(%rsp), %rcx
movb %al, 0xf(%rsp)
jae 0x4fcc0
cmpl $0x0, 0x8c(%rsp)
setne %al
xorb $-0x1, %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4fcca
jmp 0x4fd44
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x30(%rsp), %rsi
callq 0x11f8c0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdx
leaq 0x53f307(%rip), %rsi    # 0x58f009
movb $0x0, %al
callq 0x19770
cmpl $0x1, %eax
je 0x4fd2f
movq 0xb0(%rsp), %rdi
leaq 0x4d4732(%rip), %rsi    # 0x52444f
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fd31
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x4fc9d
cmpl $0x0, 0x8c(%rsp)
jne 0x4fd98
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d4712(%rip), %rsi    # 0x524477
leaq 0x516159(%rip), %rdx    # 0x565ec5
leaq 0x4d44db(%rip), %rcx    # 0x52424e
movl $0xea, %r8d
callq 0xd92c0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x4fd96
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fd98
cmpl $0x0, 0x8c(%rsp)
jne 0x4fdf2
movq 0x38(%rsp), %rdi
callq 0xdda20
movq %rax, 0x18(%rsp)
movq 0x80(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %r8
movq 0xb0(%rsp), %r9
callq 0x281250
movl %eax, 0x8c(%rsp)
movq 0x18(%rsp), %rdi
callq 0xdd730
cmpq $0x0, 0x38(%rsp)
je 0x4fe04
movq 0x38(%rsp), %rdi
callq 0xd9390
movq 0x28(%rsp), %rdi
leaq 0x4d443e(%rip), %rsi    # 0x52424e
movl $0xf5, %edx
callq 0xe88c0
jmp 0x4fe1c
cmpl $0x0, 0x8c(%rsp)
jne 0x4feb7
movq $0x0, 0x10(%rsp)
cmpl $0x0, 0x8c(%rsp)
jne 0x4fe87
movq 0x90(%rsp), %rdi
movq 0xb0(%rsp), %r9
leaq 0x4d462f(%rip), %rsi    # 0x524483
leaq 0x51606a(%rip), %rdx    # 0x565ec5
leaq 0x4d43ec(%rip), %rcx    # 0x52424e
movl $0xfc, %r8d
callq 0xd92c0
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jne 0x4fe85
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x4fe87
cmpl $0x0, 0x8c(%rsp)
jne 0x4fea3
movq 0x80(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x27d1e0
cmpq $0x0, 0x10(%rsp)
je 0x4feb5
movq 0x10(%rsp), %rdi
callq 0xd9390
jmp 0x4feb7
movq 0x80(%rsp), %rdi
callq 0x27e8b0
movq 0x98(%rsp), %rdi
callq 0xe7ed0
movq 0xa0(%rsp), %rdi
callq 0xe7ed0
movl 0x8c(%rsp), %eax
addq $0xd8, %rsp
retq
nopl (%rax)