// File: /workspace/github_c_makefile_star2_O1/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
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r15
testq %r8, %r8
je 0xcc86a
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0xcc9a5
testq %r12, %r12
je 0xcc9a0
movl 0x18(%r12), %edi
movq %rbx, %rsi
callq 0x123cca
movq %rax, %r14
movslq %ebp, %r13
testq %rax, %rax
je 0xcc8a1
movq (%r15,%r13,8), %rdi
callq 0x14d0a8
movq %rax, 0x8(%rsp)
testq %rax, %rax
setne %al
jmp 0xcc8ac
movq $0x0, 0x8(%rsp)
xorl %eax, %eax
testb %al, %al
je 0xcc8c5
movq 0x8(%r15,%r13,8), %rdi
callq 0x14d0a8
movq %rax, %r13
testq %rax, %rax
setne %al
jmp 0xcc8ca
xorl %r13d, %r13d
xorl %eax, %eax
testb %al, %al
je 0xcc8e2
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x17b3bd
testq %rax, %rax
setne %cl
jmp 0xcc8e6
xorl %eax, %eax
xorl %ecx, %ecx
testb %cl, %cl
movq %rax, 0x10(%rsp)
je 0xcc916
testq %r14, %r14
je 0xcc9aa
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x17d11e
movq %rax, %r15
testq %rax, %rax
setne %al
jmp 0xcc91b
xorl %r15d, %r15d
xorl %eax, %eax
movq %r14, %rbp
movq %r13, %r14
testb %al, %al
je 0xcc93d
movq 0x10(%r12), %rsi
movq %r15, %rdi
callq 0x14e310
movq %rax, %r12
testq %rax, %rax
setne %al
jmp 0xcc942
xorl %r12d, %r12d
xorl %eax, %eax
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testb %al, %al
je 0xcc95a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x16adca
movl %eax, %r13d
movq %r15, %rdi
callq 0x16ac6e
movq 0x8(%rsp), %rdi
callq 0x16ac6e
movq %r14, %rdi
callq 0x16ac6e
movq %r12, %rdi
callq 0x16ac6e
movq %rbp, %rdi
callq 0x124000
movq 0x10(%rsp), %rdi
callq 0x1758da
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x20a93
callq 0x20a23
callq 0x20a5a
nop