// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/tools/gt_snpper.c
// Function: gt_snpper_runner
static int gt_snpper_runner(GT_UNUSED int argc, const char **argv,
                                 int parsed_args, void *tool_arguments,
                                 GtError *err)
{
  GtNodeStream *gff3_in_stream = NULL,
               *gvf_in_stream = NULL,
               *gvf_out_stream = NULL,
               *snp_annotator_stream = NULL;
  GtSnpperArguments *arguments = tool_arguments;
  GtRegionMapping *region_mapping = NULL;
  GtTransTable *tt = NULL;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  if (!(tt = gt_trans_table_new(arguments->ttable, err)))
    had_err = -1;

  if (!had_err) {
    /* create GFF3 input stream */
    gff3_in_stream = gt_gff3_in_stream_new_sorted(argv[parsed_args]);
    if (!gff3_in_stream)
      had_err = -1;
  }

  if (!had_err) {
    /* create GVF input stream */
    gvf_in_stream = gt_gff3_in_stream_new_sorted(argv[parsed_args+1]);
    if (!gvf_in_stream)
      had_err = -1;
  }

  if (!had_err) {
    /* create region mapping */
    region_mapping = gt_seqid2file_region_mapping_new(arguments->s2fi, err);
    if (!region_mapping)
      had_err = -1;
  }

  if (!had_err) {
    gt_assert(tt);
    snp_annotator_stream = gt_snp_annotator_stream_new(gvf_in_stream,
                                                       gff3_in_stream,
                                                       tt,
                                                       region_mapping);
    if (!snp_annotator_stream)
      had_err = -1;
  }

  if (!had_err) {
    gvf_out_stream = gt_gff3_out_stream_new(snp_annotator_stream,
                                            arguments->outfp);
    if (!gvf_out_stream)
      had_err = -1;
  }

  if (!had_err) {
    /* pull the features through the stream and free them afterwards */
    had_err = gt_node_stream_pull(gvf_out_stream, err);
  }

  /* free */
  gt_node_stream_delete(snp_annotator_stream);
  gt_node_stream_delete(gff3_in_stream);
  gt_node_stream_delete(gvf_in_stream);
  gt_node_stream_delete(gvf_out_stream);
  gt_trans_table_delete(tt);
  gt_region_mapping_delete(region_mapping);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %r13
movl %edx, %r14d
movq %rsi, %rbx
testq %r8, %r8
je 0xca588
movq %rbp, %rdi
callq 0xfcc32
testb %al, %al
jne 0xca6a1
testq %r13, %r13
je 0xca69c
movl 0x18(%r13), %edi
movq %rbp, %rsi
callq 0x11dfba
movq %rax, (%rsp)
testq %rax, %rax
je 0xca62d
movslq %r14d, %r15
movq (%rbx,%r15,8), %rdi
callq 0x145d7c
testq %rax, %rax
je 0xca62d
movq %rax, %r14
movq 0x8(%rbx,%r15,8), %rdi
callq 0x145d7c
testq %rax, %rax
je 0xca682
movq %rax, %r12
movq (%r13), %rdi
movq %rbp, %rsi
callq 0x172fdd
testq %rax, %rax
je 0xca68a
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
movq (%rsp), %rdx
movq %rax, %rcx
callq 0x174d4e
testq %rax, %rax
je 0xca692
movq %rax, %rbx
movq 0x10(%r13), %rsi
movq %rax, %rdi
callq 0x146fc0
testq %rax, %rax
je 0xca697
movq %rax, %r13
movq %rax, %rdi
movq %rbp, %rsi
callq 0x162f5d
movl %eax, %ebp
jmp 0xca640
xorl %r13d, %r13d
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %ebx, %ebx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x162dee
movq %r14, %rdi
callq 0x162dee
movq %r12, %rdi
callq 0x162dee
movq %r13, %rdi
callq 0x162dee
movq (%rsp), %rdi
callq 0x11e318
movq %r15, %rdi
callq 0x16d652
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0xca636
xorl %r13d, %r13d
xorl %r15d, %r15d
jmp 0xca639
xorl %r13d, %r13d
jmp 0xca639
xorl %r13d, %r13d
jmp 0xca63b
callq 0x2065e
callq 0x20627
nop