// File: /workspace/github_c_makefile_star2_O1/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 0xbdae6
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xbdc4c
testq %rbx, %rbx
je 0xbdae6
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xbdc51
leaq 0x2a0424(%rip), %rdi    # 0x35df11
leaq 0x2a0434(%rip), %rsi    # 0x35df28
callq 0x10cc4e
movq %rax, %r15
leaq 0x2a046d(%rip), %rdi    # 0x35df70
leaq 0x2a0475(%rip), %rsi    # 0x35df7f
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x10f4c7
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
leaq 0x18(%rsp), %rdi
callq 0x10f473
movq %r15, %rdi
movq %rax, %rsi
callq 0x10cd10
movq %r15, %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x10d784
leaq 0x67879(%rip), %r8      # 0x1253c8
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r9
callq 0x10d796
movl %eax, %r12d
movq %r15, %rdi
callq 0x10f2d0
cmpl $0x1, %r12d
je 0xbdb82
cmpl $0x2, %r12d
jne 0xbdb8c
xorl %ebp, %ebp
jmp 0xbdc3d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xbdc3d
movslq 0xc(%rsp), %rax
cmpl %ebp, %eax
jge 0xbdc56
movq (%r14,%rax,8), %rdi
callq 0x14d0a8
movq %rax, %r14
cmpb $0x1, 0x18(%rsp)
jne 0xbdbb4
movq %r14, %rdi
callq 0x14ce62
movq 0x10(%rsp), %rdi
callq 0x17703c
movq %rax, %r15
movq %rsp, %r12
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x16ace8
movl %eax, %ebp
testl %eax, %eax
sete %al
movq (%r12), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xbdc21
movq %rsp, %r12
movq %r15, %rsi
movq %rbx, %rdx
callq 0x14b992
movq (%rsp), %rdi
callq 0x14c43a
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x16ace8
movl %eax, %ebp
testl %eax, %eax
sete %al
jne 0xbdc21
movq (%rsp), %rdi
testq %rdi, %rdi
jne 0xbdbed
testb %al, %al
je 0xbdc2d
movq %r15, %rdi
callq 0x177090
movq %r15, %rdi
callq 0x16b162
movq %r14, %rdi
callq 0x16ac6e
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1e3b5
callq 0x1e37e
callq 0x1e3ec
nop