// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/gtr.c
// Function: gtr_run
int gtr_run(GtR *gtr, int argc, const char **argv, GtError *err)
{
  GtToolfunc toolfunc;
  GtTool *tool = NULL;
  char **nargv = NULL;
  void *mem, *map;
  int had_err = 0;
  gt_error_check(err);
  gt_assert(gtr);
  if (gtr->debug)
    enable_logging(gt_str_get(gtr->debugfp), &gtr->logfp);
  if (gtr->quiet)
    gt_warning_disable();
  gtr->seed = gt_ya_rand_init(gtr->seed);
  gt_log_log("seed=%u", gtr->seed);
  if (gtr->list)
    return list_tools(gtr);
  if (gt_str_length(gtr->manoutdir) > 0)
    return create_manpages(gtr, gt_str_get(gtr->manoutdir), err);
  if (gtr->check64bit)
    return check64bit();
  if (gtr->test)
    return run_tests(gtr, err);
  if (gt_str_length(gtr->testspacepeak)) {
    mem = gt_malloc(1 << 26); /* alloc 64 MB */;
    map = gt_fa_xmmap_read(gt_str_get(gtr->testspacepeak), NULL);
    gt_fa_xmunmap(map);
    gt_free(mem);
  }
  if (argc == 0 && !gtr->interactive) {
    gt_error_set(err, "neither tool nor script specified; option -help lists "
                      "possible tools");
    had_err = -1;
  }
  if (!had_err && argc) {
    if (!gtr->tools || !gt_toolbox_has_tool(gtr->tools, argv[0])) {
      /* no tool found -> try to open script */
      if (gt_file_exists(argv[0])) {
        /* export script */
        gt_lua_set_script_dir(gtr->L, argv[0]);
        /* run script */
        nargv = gt_cstr_array_prefix_first(argv, gt_error_get_progname(err));
        gt_lua_set_arg(gtr->L, nargv[0], (const char**) nargv+1);
        if (luaL_dofile(gtr->L, argv[0])) {
          /* error */
          gt_assert(lua_isstring(gtr->L, -1)); /* error message on top */
          gt_error_set(err, "could not execute script %s",
                       lua_tostring(gtr->L, -1));
          had_err = -1;
          lua_pop(gtr->L, 1); /* pop error message */
        }
      }
      else {
        GtStr *extpath, *extname;
        extpath = gt_str_new();
        extname = gt_str_new_cstr("gt-");
        gt_str_append_cstr(extname, argv[0]);
        had_err = gt_file_find_in_path(extpath, gt_str_get(extname), err);
        if (!had_err && gt_str_length(extpath) > 0) {
          extern char **environ;
          struct stat sb;
          nargv = gt_cstr_array_dup(argv);
          gt_str_append_cstr(extpath, "/");
          gt_str_append_str(extpath, extname);
          if (!(stat(gt_str_get(extpath), &sb) == 0 && sb.st_mode & S_IXUSR) ||
               execve(gt_str_get(extpath), nargv, environ)) {
            gt_error_set(err, "could not execute userscript %s",
                         gt_str_get(extpath));
            gt_cstr_array_delete(nargv);
            had_err = -1;
          }
        } else {
          /* neither tool nor script found */
          gt_error_set(err, "neither tool nor script '%s' found; option -help "
                            "lists possible tools", argv[0]);
          had_err = -1;
        }
        gt_str_delete(extpath);
        gt_str_delete(extname);
      }
    }
    else {
      /* run tool */
      if (!(toolfunc = gt_toolbox_get(gtr->tools, argv[0]))) {
        tool = gt_toolbox_get_tool(gtr->tools, argv[0]);
        gt_assert(tool);
      }
      nargv = gt_cstr_array_prefix_first(argv, gt_error_get_progname(err));
      gt_error_set_progname(err, nargv[0]);
      if (toolfunc)
        had_err = toolfunc(argc, (const char**) nargv, err);
      else
        had_err = gt_tool_run(tool, argc, (const char**) nargv, err);
    }
  }
  gt_cstr_array_delete(nargv);
  if (!had_err && gtr->interactive) {
    gt_showshortversion(gt_error_get_progname(err));
    gt_lua_set_arg(gtr->L, gt_error_get_progname(err), argv);
    run_interactive_lua_interpreter(gtr->L);
  }
  if (had_err)
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rcx, %r13
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %r14
testq %rcx, %rcx
je 0x18868
movq %r13, %rdi
callq 0x89eb7
testb %al, %al
jne 0x1903a
testq %r14, %r14
je 0x1900c
cmpb $0x1, 0x3(%r14)
jne 0x188eb
movq 0x10(%r14), %rdi
callq 0xad1fa
movq %rax, %rbx
callq 0x92a6a
leaq 0x346afb(%rip), %rsi    # 0x35f38b
movq %rbx, %rdi
callq 0x179e0
testl %eax, %eax
je 0x188d3
leaq 0x2ccc32(%rip), %rsi    # 0x2e54d5
movq %rbx, %rdi
callq 0x179e0
testl %eax, %eax
je 0x188dc
leaq 0x31b058(%rip), %rsi    # 0x33390e
leaq 0x2cc888(%rip), %rdx    # 0x2e5145
movq %rbx, %rdi
movl $0x1a7, %ecx            # imm = 0x1A7
callq 0x8a3a7
movq %rax, %rdi
movq %rax, 0x50(%r14)
jmp 0x188e6
movq 0x41f5d6(%rip), %rax    # 0x437eb0
jmp 0x188e3
movq 0x41f685(%rip), %rax    # 0x437f68
movq (%rax), %rdi
callq 0x92b35
cmpb $0x1, 0x2(%r14)
jne 0x188f7
callq 0xb2d73
movl 0x8(%r14), %edi
callq 0xb3ab8
movl %eax, 0x8(%r14)
leaq 0x2cc900(%rip), %rdi    # 0x2e520b
movl %eax, %esi
xorl %eax, %eax
callq 0x92a82
cmpb $0x1, 0x4(%r14)
jne 0x18a41
callq 0xacb84
movq %rax, %rbx
pushq $0xa
popq %rdi
callq 0x179c0
leaq 0x2ccd66(%rip), %rdi    # 0x2e569c
callq 0x17b60
movq %r14, %rdi
callq 0x18538
movq %rax, %r15
movq %rax, %rdi
callq 0x9b62e
leaq 0x2ccca0(%rip), %rdi    # 0x2e55f5
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movq %r15, %rdi
callq 0x9a844
movq 0x20(%r14), %rdi
callq 0xb08bc
movq %rax, %r14
pushq $0x20
popq %r12
movq %rax, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0xb09dc
leaq 0x20(%rsp), %r15
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xb0a48
testb %al, %al
je 0x18ac0
movq 0x10(%rsp), %rdi
callq 0xb07e3
movq %rax, %rbp
movq %rbx, %rdi
callq 0xad1fa
movq 0x18(%rsp), %r9
movl $0x2000, %esi           # imm = 0x2000
movq %r15, %rdi
leaq 0x2ccc2e(%rip), %rdx    # 0x2e55fb
movl %r12d, %ecx
movq %rax, %r8
xorl %eax, %eax
callq 0x17bf0
movq %r15, %rdi
callq 0x6c2be
movq %rax, %r13
movq %rax, %rdi
movl %r12d, %esi
pushq $0x5f
popq %rdx
callq 0x6c3a8
pushq $0xa
popq %rdi
callq 0x179c0
leaq 0x2ccc02(%rip), %rdi    # 0x2e5604
movq %r13, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x17070
movq %rbp, %rdi
callq 0x9b62e
leaq 0x2ccbd7(%rip), %rdi    # 0x2e55f5
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
movq %r13, %rdi
leaq 0x2cc713(%rip), %rsi    # 0x2e5145
movl $0x11f, %edx            # imm = 0x11F
callq 0x936f9
jmp 0x1898a
movq 0x30(%r14), %rdi
callq 0xad289
testq %rax, %rax
je 0x18ad7
movq 0x30(%r14), %rdi
callq 0xad1fa
movq %rax, %r12
callq 0xacb84
movq %rax, %r15
testq %r13, %r13
je 0x18a7c
movq %r13, %rdi
callq 0x89eb7
testb %al, %al
jne 0x19068
leaq 0x424aad(%rip), %rax    # 0x43d530
movb $0x1, (%rax)
movq %r14, %rdi
callq 0x18538
movq %rax, %rbx
leaq 0x36cc41(%rip), %rsi    # 0x3856d9
movq %r12, %rdi
movq %rax, %rdx
movq %r13, %rcx
callq 0x19202
movl %eax, %ebp
movq %rbx, %rdi
callq 0x9a844
testl %ebp, %ebp
je 0x18bac
pushq $0x1
popq %rbx
jmp 0x18c48
movq %r14, %rdi
callq 0xb0bbd
movq %rbx, %rdi
callq 0xae103
xorl %ebx, %ebx
jmp 0x18ff1
xorl %ebx, %ebx
cmpb $0x0, 0x5(%r14)
jne 0x18ff1
cmpb $0x1, (%r14)
jne 0x18c5f
andl $0x0, 0x20(%rsp)
testq %r13, %r13
je 0x18b08
movq %r13, %rdi
callq 0x89eb7
testb %al, %al
jne 0x190a0
movl 0x8(%r14), %esi
leaq 0x2ccb63(%rip), %rdi    # 0x2e5676
xorl %eax, %eax
callq 0x17070
movq %r13, %rdi
callq 0x8f5c1
cmpq $0x0, 0x28(%r14)
je 0x18de8
movq 0x38(%r14), %rdi
callq 0xad289
testq %rax, %rax
je 0x18dc8
movq 0x38(%r14), %rdi
callq 0xad1fa
movq %rax, %rbx
movq 0x28(%r14), %rdi
movq %rax, %rsi
callq 0x8f482
testq %rax, %rax
je 0x18e73
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rcx
callq 0xb2b18
testl %eax, %eax
je 0x18de8
movq 0x41f3e6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cc487(%rip), %rsi    # 0x2e5013
leaq 0x2ccaec(%rip), %rdx    # 0x2e567f
leaq 0x2ccad2(%rip), %rcx    # 0x2e566c
leaq 0x2cc5a4(%rip), %r8     # 0x2e5145
movl $0x18c, %r9d            # imm = 0x18C
jmp 0x19094
movq %r13, %rbx
movq 0x20(%r14), %rdi
callq 0xb08bc
movq %rax, %r14
pushq $0x20
popq %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0xb09dc
leaq 0x20(%rsp), %rbp
xorl %r13d, %r13d
testl %r13d, %r13d
jne 0x18c38
movq %r14, %rdi
leaq 0x18(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0xb0a48
testb %al, %al
je 0x18c38
movq 0x10(%rsp), %rdi
callq 0xb07e3
movq %rax, %r13
movq %r15, %rdi
callq 0xad1fa
movq 0x18(%rsp), %r9
movl $0x2000, %esi           # imm = 0x2000
movq %rbp, %rdi
leaq 0x2cc9e6(%rip), %rdx    # 0x2e55fb
pushq $0x20
popq %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x17bf0
movq %r12, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x19202
movl %eax, %r13d
jmp 0x18bd1
xorl %ebx, %ebx
testl %r13d, %r13d
setne %bl
movq %r14, %rdi
callq 0xb0bbd
movq %r15, %rdi
callq 0xae103
leaq 0x4248d9(%rip), %rax    # 0x43d530
movb $0x0, (%rax)
jmp 0x18ff1
movq 0x18(%r14), %rdi
callq 0xad289
testq %rax, %rax
je 0x18cbc
leaq 0x2cc4d1(%rip), %rbx    # 0x2e5145
movl $0x4000000, %edi        # imm = 0x4000000
movq %rbx, %rsi
movl $0x1c4, %edx            # imm = 0x1C4
callq 0x93160
movq %rax, %r12
movq 0x18(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movl $0x1c5, %ecx            # imm = 0x1C5
callq 0x8b635
movq %rax, %rdi
callq 0x8b9fa
movq %r12, %rdi
movq %rbx, %rsi
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x936f9
testl %ebp, %ebp
je 0x18db3
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x18cff
movq (%r15), %rsi
callq 0xb0d84
testb %al, %al
je 0x18cff
movq 0x20(%r14), %rdi
movq (%r15), %rsi
callq 0xb0e40
movq %rax, %rbx
testq %rax, %rax
je 0x18f44
movq $0x0, 0x8(%rsp)
jmp 0x18f5e
movq (%r15), %rdi
callq 0x8da98
testb %al, %al
je 0x18df4
movq 0x40(%r14), %rdi
movq (%r15), %rsi
callq 0xf9f52
movq %r13, %rdi
callq 0x8a001
movq %r15, %rdi
movq %rax, %rsi
callq 0x6c7c9
movq %rax, %r12
movq 0x40(%r14), %rdi
movq (%rax), %rsi
leaq 0x8(%rax), %rdx
callq 0xfa02b
movq 0x40(%r14), %rdi
movq (%r15), %rsi
callq 0x1df308
testl %eax, %eax
jne 0x18d6b
movq 0x40(%r14), %rdi
pushq $-0x1
popq %rdx
xorl %ebp, %ebp
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1dcedd
testl %eax, %eax
je 0x18fa4
movq 0x40(%r14), %rdi
pushq $-0x1
popq %rbp
movl %ebp, %esi
callq 0x1db803
testl %eax, %eax
je 0x190fc
movq 0x40(%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1dbb73
leaq 0x2cc4dc(%rip), %rsi    # 0x2e5271
movq %r13, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
movq 0x40(%r14), %rdi
pushq $-0x2
popq %rsi
callq 0x1db3d2
jmp 0x18fa4
cmpb $0x0, 0x1(%r14)
je 0x18e57
xorl %r12d, %r12d
xorl %ebp, %ebp
jmp 0x18fa4
movq 0x28(%r14), %rdi
leaq 0x99d45(%rip), %rsi     # 0xb2b18
leaq 0x20(%rsp), %rdx
movq %r13, %rcx
callq 0x8f595
testl %eax, %eax
jne 0x190ce
xorl %ebx, %ebx
cmpl $0x0, 0x20(%rsp)
jmp 0x18fee
callq 0xacb84
movq %r13, %r12
movq %rax, %r13
leaq 0x2cc487(%rip), %rdi    # 0x2e528d
callq 0xacbd1
movq %rax, %rbp
movq (%r15), %rsi
movq %rax, %rdi
callq 0xacbfb
movq %rbp, %rdi
callq 0xad1fa
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rbx
movq %r12, %rdx
callq 0x8dd2b
testl %eax, %eax
movq %rbp, 0x8(%rsp)
je 0x18e8f
movq (%r15), %rdx
leaq 0x2cc46c(%rip), %rsi    # 0x2e52b1
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x18f2a
leaq 0x2cc3b5(%rip), %rsi    # 0x2e5213
xorl %r12d, %r12d
movq %r13, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rbp
jmp 0x18fa4
leaq 0x2cc80e(%rip), %rsi    # 0x2e5688
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x89dbb
pushq $0x1
popq %rbx
jmp 0x18ff1
movq %r13, %rdi
callq 0xad289
testq %rax, %rax
je 0x18e3b
movq %r15, %rdi
callq 0x6c728
movq %rax, %r12
leaq 0x2e6259(%rip), %rsi    # 0x2ff107
movq %r13, %rdi
callq 0xacbfb
movq %r13, %rdi
movq %rbp, %rsi
callq 0xacd13
movq %r13, %rdi
callq 0xad1fa
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x17f60
testl %eax, %eax
jne 0x18f06
testb $0x40, 0x38(%rsp)
je 0x18f06
movq %r13, %rdi
callq 0xad1fa
movq 0x41f0c0(%rip), %rcx    # 0x437fb0
movq (%rcx), %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x17cd0
testl %eax, %eax
je 0x19005
movq %r13, %rdi
callq 0xad1fa
leaq 0x2cc37c(%rip), %rsi    # 0x2e5291
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
movq %r12, %rdi
callq 0x6ca1b
pushq $-0x1
popq %rbp
movq %r13, %rdi
callq 0xae103
movq 0x8(%rsp), %rdi
callq 0xae103
movq %rbx, %r13
jmp 0x18fa4
movq 0x20(%r14), %rdi
movq (%r15), %rsi
callq 0xb0d2d
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1912d
movq %r13, %rdi
callq 0x8a001
movq %r15, %rdi
movq %rax, %rsi
callq 0x6c7c9
movq %rax, %r12
movq (%rax), %rsi
movq %r13, %rdi
callq 0x89f8a
testq %rbx, %rbx
je 0x18f90
movl %ebp, %edi
movq %r12, %rsi
movq %r13, %rdx
callq *%rbx
jmp 0x18fa2
movq 0x8(%rsp), %rdi
movl %ebp, %esi
movq %r12, %rdx
movq %r13, %rcx
callq 0xb05a1
movl %eax, %ebp
movq %r12, %rdi
callq 0x6ca1b
testl %ebp, %ebp
jne 0x18fea
cmpb $0x1, 0x1(%r14)
jne 0x18fea
movq %r13, %rdi
callq 0x8a001
movq %rax, %rdi
callq 0xb2cb8
movq 0x40(%r14), %rbx
movq %r13, %rdi
callq 0x8a001
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0xfa02b
movq 0x40(%r14), %rdi
callq 0x1a2d4
xorl %ebx, %ebx
testl %ebp, %ebp
setne %bl
movl %ebx, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
jmp 0x18f2d
movq 0x41ef55(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbff6(%rip), %rsi    # 0x2e5013
leaq 0x2cc1c3(%rip), %rdx    # 0x2e51e7
leaq 0x2cc1d8(%rip), %rcx    # 0x2e5203
leaq 0x2cc113(%rip), %r8     # 0x2e5145
movl $0x1b4, %r9d            # imm = 0x1B4
jmp 0x19094
movq 0x41ef27(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbfc8(%rip), %rsi    # 0x2e5013
leaq 0x2cc16d(%rip), %rdx    # 0x2e51bf
leaq 0x2cc1aa(%rip), %rcx    # 0x2e5203
leaq 0x2cc0e5(%rip), %r8     # 0x2e5145
movl $0x1b3, %r9d            # imm = 0x1B3
jmp 0x19094
movq 0x41eef9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbf9a(%rip), %rsi    # 0x2e5013
leaq 0x2cc13f(%rip), %rdx    # 0x2e51bf
leaq 0x2cc597(%rip), %rcx    # 0x2e561e
leaq 0x2cc0b7(%rip), %r8     # 0x2e5145
movl $0x14d, %r9d            # imm = 0x14D
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x41eec1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbf62(%rip), %rsi    # 0x2e5013
leaq 0x2cc107(%rip), %rdx    # 0x2e51bf
leaq 0x2cc5ad(%rip), %rcx    # 0x2e566c
leaq 0x2cc07f(%rip), %r8     # 0x2e5145
movl $0x173, %r9d            # imm = 0x173
jmp 0x19094
movq 0x41ee93(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbf34(%rip), %rsi    # 0x2e5013
leaq 0x2cc599(%rip), %rdx    # 0x2e567f
leaq 0x2cc57f(%rip), %rcx    # 0x2e566c
leaq 0x2cc051(%rip), %r8     # 0x2e5145
movl $0x197, %r9d            # imm = 0x197
jmp 0x19094
movq 0x41ee65(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbf06(%rip), %rsi    # 0x2e5013
leaq 0x2cc144(%rip), %rdx    # 0x2e5258
leaq 0x2cc0e8(%rip), %rcx    # 0x2e5203
leaq 0x2cc023(%rip), %r8     # 0x2e5145
movl $0x1d9, %r9d            # imm = 0x1D9
jmp 0x19094
movq 0x41ee34(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2cbed5(%rip), %rsi    # 0x2e5013
leaq 0x2f9858(%rip), %rdx    # 0x31299d
leaq 0x2cc0b7(%rip), %rcx    # 0x2e5203
leaq 0x2cbff2(%rip), %r8     # 0x2e5145
movl $0x201, %r9d            # imm = 0x201
jmp 0x19094