// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_extractfeat.c
// Function: gt_extractfeat_runner
static int gt_extractfeat_runner(GT_UNUSED int argc, const char **argv,
                                 int parsed_args, void *tool_arguments,
                                 GtError *err)
{
  GtNodeStream *gff3_in_stream = NULL, *extract_feature_stream = NULL;
  GtExtractFeatArguments *arguments = tool_arguments;
  GtRegionMapping *region_mapping;
  GtTransTable *ttable = NULL;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  if (!had_err) {
    /* create gff3 input stream */
    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 mapping */
    region_mapping = gt_seqid2file_region_mapping_new(arguments->s2fi, err);
    if (!region_mapping)
      had_err = -1;
  }

  if (!had_err) {
    /* create extract feature stream */
    extract_feature_stream =
      gt_extract_feature_stream_new(gff3_in_stream,
                                    region_mapping,
                                    gt_str_get(arguments->type),
                                    arguments->join,
                                    arguments->translate,
                                    arguments->seqid,
                                    arguments->target,
                                    arguments->width,
                                    arguments->outfp);

    if (arguments->retainids)
      gt_extract_feature_stream_retain_id_attributes((GtExtractFeatureStream*)
                                                       extract_feature_stream);

    if (arguments->gcode != GT_STANDARD_TRANSLATION_SCHEME) {
      ttable = gt_trans_table_new(arguments->gcode, err);
      if (!ttable) {
        had_err = -1;
      } else {
        gt_extract_feature_stream_set_trans_table((GtExtractFeatureStream*)
                                                       extract_feature_stream,
                                                   ttable);
      }
    }
  }

  if (!had_err) {
    if (arguments->showcoords)
      gt_extract_feature_stream_show_coords((GtExtractFeatureStream*)
                                                        extract_feature_stream);

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

  /* free */
  gt_node_stream_delete(extract_feature_stream);
  gt_node_stream_delete(gff3_in_stream);
  gt_trans_table_delete(ttable);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
testq %r8, %r8
je 0x28bef
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x28d24
testq %r15, %r15
je 0x28cf6
movslq %ebp, %rax
movq (%rbx,%rax,8), %rdi
callq 0xdef57
movq %rax, %rbx
cmpb $0x1, 0x4(%r15)
jne 0x28c16
movq %rbx, %rdi
callq 0xdeb22
movq 0x18(%r15), %rdi
movq %r14, %rsi
callq 0x116b63
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x28c89
movq %rax, %r12
movq 0x10(%r15), %rdi
callq 0xad1fa
movzbl (%r15), %ecx
movzbl 0x1(%r15), %r8d
movzbl 0x2(%r15), %r9d
movzbl 0x3(%r15), %r10d
subq $0x8, %rsp
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
pushq 0x30(%r15)
pushq 0x20(%r15)
pushq %r10
callq 0xd657c
addq $0x20, %rsp
movq %rax, %r12
cmpb $0x1, 0x6(%r15)
jne 0x28c7b
movq %r12, %rdi
callq 0xd65bc
movl 0x8(%r15), %edi
cmpl $0x1, %edi
jne 0x28c91
xorl %r13d, %r13d
jmp 0x28cac
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x28cc8
movq %r14, %rsi
callq 0xb124a
testq %rax, %rax
je 0x28cf1
movq %rax, %r13
movq %r12, %rdi
movq %rax, %rsi
callq 0xd6606
cmpb $0x1, 0x5(%r15)
jne 0x28cbb
movq %r12, %rdi
callq 0xd6656
movq %r12, %rdi
movq %r14, %rsi
callq 0x102b93
movl %eax, %ebp
movq %r12, %rdi
callq 0x10297b
movq %rbx, %rdi
callq 0x10297b
movq %r13, %rdi
callq 0xb168a
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r13d, %r13d
jmp 0x28cc8
movq 0x40f26b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2bc30c(%rip), %rsi    # 0x2e5013
leaq 0x31f945(%rip), %rdx    # 0x348653
leaq 0x2c377f(%rip), %rcx    # 0x2ec494
leaq 0x2c355c(%rip), %r8     # 0x2ec278
movl $0xaa, %r9d
jmp 0x28d50
movq 0x40f23d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2bc2de(%rip), %rsi    # 0x2e5013
leaq 0x2bc483(%rip), %rdx    # 0x2e51bf
leaq 0x2c3751(%rip), %rcx    # 0x2ec494
leaq 0x2c352e(%rip), %r8     # 0x2ec278
movl $0xa9, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390