// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
movl %edi, 0x84(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x48(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x34b0e
movq 0x60(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x34ad6
jmp 0x34b0e
movq 0x6074c3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e152c(%rip), %rsi    # 0x516013
leaq 0x4e16d1(%rip), %rdx    # 0x5161bf
leaq 0x4e8a55(%rip), %rcx    # 0x51d54a
leaq 0x4e8805(%rip), %r8     # 0x51d301
movl $0xa9, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x34b10
jmp 0x34b12
cmpq $0x0, 0x48(%rsp)
jne 0x34b52
movq 0x60747f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4e14e8(%rip), %rsi    # 0x516013
leaq 0x54602d(%rip), %rdx    # 0x57ab5f
leaq 0x4e8a11(%rip), %rcx    # 0x51d54a
leaq 0x4e87c1(%rip), %r8     # 0x51d301
movl $0xaa, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x34b54
cmpl $0x0, 0x34(%rsp)
jne 0x34bb2
movq 0x78(%rsp), %rax
movslq 0x74(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1747b0
movq %rax, 0x58(%rsp)
movq 0x48(%rsp), %rax
testb $0x1, 0x4(%rax)
je 0x34b88
movq 0x58(%rsp), %rdi
callq 0x1741e0
movq 0x48(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x60(%rsp), %rsi
callq 0x1d4960
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x34bb0
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x34bb2
cmpl $0x0, 0x34(%rsp)
jne 0x34cb2
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0x11dee0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rax, %rdx
movq 0x48(%rsp), %rax
movb (%rax), %cl
movq 0x48(%rsp), %rax
movb 0x1(%rax), %r8b
movq 0x48(%rsp), %rax
movb 0x2(%rax), %r9b
movq 0x48(%rsp), %rax
movb 0x3(%rax), %r11b
movq 0x48(%rsp), %rax
movq 0x20(%rax), %r10
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
andb $0x1, %cl
andb $0x1, %r8b
andb $0x1, %r9b
andb $0x1, %r11b
movzbl %cl, %ecx
movzbl %r8b, %r8d
movzbl %r9b, %r9d
movzbl %r11b, %r11d
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x167820
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rax
testb $0x1, 0x6(%rax)
je 0x34c6b
movq 0x50(%rsp), %rdi
callq 0x167900
movq 0x48(%rsp), %rax
cmpl $0x1, 0x8(%rax)
je 0x34cb0
movq 0x48(%rsp), %rax
movl 0x8(%rax), %edi
movq 0x60(%rsp), %rsi
callq 0x123ef0
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x34c9f
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0x34cae
movq 0x50(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x167960
jmp 0x34cb0
jmp 0x34cb2
cmpl $0x0, 0x34(%rsp)
jne 0x34ce1
movq 0x48(%rsp), %rax
testb $0x1, 0x5(%rax)
je 0x34cce
movq 0x50(%rsp), %rdi
callq 0x1679d0
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0x1b1f90
movl %eax, 0x34(%rsp)
movq 0x50(%rsp), %rdi
callq 0x1b1cb0
movq 0x58(%rsp), %rdi
callq 0x1b1cb0
movq 0x38(%rsp), %rdi
callq 0x1246a0
movl 0x34(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax,%rax)