// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_regioncov.c
// Function: gt_regioncov
int gt_regioncov(int argc, const char **argv, GtError *err)
{
  GtNodeVisitor *regioncov_visitor;
  GtNodeStream *gff3_in_stream;
  GtGenomeNode *gn;
  RegionCovArguments arguments;
  int parsed_args, had_err = 0;
  gt_error_check(err);

  /* option parsing */
  switch (parse_options(&parsed_args, &arguments, argc, argv, err)) {
    case GT_OPTION_PARSER_OK: break;
    case GT_OPTION_PARSER_ERROR:
      return -1;
    case GT_OPTION_PARSER_REQUESTS_EXIT:
      return 0;
  }

  /* create gff3 input stream */
  gt_assert(parsed_args < argc);
  gff3_in_stream = gt_gff3_in_stream_new_sorted(argv[parsed_args]);
  if (arguments.verbose)
    gt_gff3_in_stream_show_progress_bar((GtGFF3InStream*) gff3_in_stream);

  /* create region coverage visitor */
  regioncov_visitor = gt_regioncov_visitor_new(arguments.max_feature_dist);

  /* pull the features through the stream and free them afterwards */
  while (!(had_err = gt_node_stream_next(gff3_in_stream, &gn, err)) && gn) {
      had_err = gt_genome_node_accept(gn, regioncov_visitor, err);
      gt_genome_node_delete(gn);
  }

  /* show region coverage */
  if (!had_err)
    gt_regioncov_visitor_show_coverage(regioncov_visitor);

  /* free */
  gt_node_visitor_delete(regioncov_visitor);
  gt_node_stream_delete(gff3_in_stream);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
testq %rdx, %rdx
je 0x3f239
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x3f372
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x3f39c
leaq 0x2b5ca9(%rip), %rdi    # 0x2f4ee9
leaq 0x2b5cb9(%rip), %rsi    # 0x2f4f00
callq 0x97df5
movq %rax, %r15
leaq 0x2b5cf2(%rip), %rdi    # 0x2f4f48
leaq 0x2b5cfa(%rip), %rsi    # 0x2f4f57
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x9a9e6
movq %r15, %rdi
movq %rax, %rsi
callq 0x97f31
leaq 0x18(%rsp), %rdi
callq 0x9a9b6
movq %r15, %rdi
movq %rax, %rsi
callq 0x97f31
pushq $0x1
popq %rdx
movq %r15, %rdi
movl %edx, %esi
callq 0x98c6b
leaq 0x739b3(%rip), %r8      # 0xb2c50
leaq 0x4(%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r9
callq 0x98cb0
movl %eax, %r12d
movq %r15, %rdi
callq 0x9a844
cmpl $0x1, %r12d
je 0x3f2d0
cmpl $0x2, %r12d
jne 0x3f2d8
xorl %ebp, %ebp
jmp 0x3f363
pushq $-0x1
popq %rbp
jmp 0x3f363
movslq 0x4(%rsp), %rax
cmpl %ebp, %eax
jge 0x3f3c6
movq (%r14,%rax,8), %rdi
callq 0xdef57
movq %rax, %r14
cmpb $0x1, 0x18(%rsp)
jne 0x3f300
movq %r14, %rdi
callq 0xdeb22
movq 0x10(%rsp), %rdi
callq 0x1117ae
movq %rax, %r15
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x102a22
movl %eax, %ebp
testl %eax, %eax
jne 0x3f347
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3f347
movq %r15, %rsi
movq %rbx, %rdx
callq 0xdd39c
movq 0x8(%rsp), %rdi
callq 0xde013
jmp 0x3f312
testl %ebp, %ebp
jne 0x3f353
movq %r15, %rdi
callq 0x111800
movq %r15, %rdi
callq 0x10327a
movq %r14, %rdi
callq 0x10297b
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x3f8bef(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5c90(%rip), %rsi    # 0x2e5013
leaq 0x2a5e35(%rip), %rdx    # 0x2e51bf
leaq 0x2b5b1f(%rip), %rcx    # 0x2f4eb0
leaq 0x2b5b25(%rip), %r8     # 0x2f4ebd
pushq $0x3f
jmp 0x3f3ee
movq 0x3f8bc5(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5c66(%rip), %rsi    # 0x2e5013
leaq 0x2a5e0b(%rip), %rdx    # 0x2e51bf
leaq 0x322b37(%rip), %rcx    # 0x361ef2
leaq 0x2b5afb(%rip), %r8     # 0x2f4ebd
pushq $0x24
jmp 0x3f3ee
movq 0x3f8b9b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5c3c(%rip), %rsi    # 0x2e5013
leaq 0x2b5af8(%rip), %rdx    # 0x2f4ed6
leaq 0x2b5acb(%rip), %rcx    # 0x2f4eb0
leaq 0x2b5ad1(%rip), %r8     # 0x2f4ebd
pushq $0x4b
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390