// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/tooldriver.c
// Function: gt_toolobjdriver
int gt_toolobjdriver(GtToolConstructor tool_constructor,
                     GtShowVersionFunc version_func, int argc, char *argv[])
{
  gt_assert(tool_constructor && argv);
  GtTool *tool;
  GtError *err;
  int had_err;
  gt_lib_init();
  gt_assert(tool_constructor && argv);
  err = gt_error_new();
  gt_error_set_progname(err, argv[0]);
  tool = tool_constructor();
  if (version_func) {
    GtOptionParser *op = gt_tool_get_option_parser(tool);
    gt_option_parser_set_version_func(op, version_func);
  }
  had_err = gt_tool_run(tool, argc, (const char**) argv, err);
  gt_tool_delete(tool);
  if (gt_error_is_set(err)) {
    fprintf(stderr, "%s: error: %s\n", gt_error_get_progname(err),
            gt_error_get(err));
    gt_assert(had_err);
  }
  gt_error_delete(err);
  if (gt_lib_clean())
    return GT_EXIT_PROGRAMMING_ERROR; /* programmer error */
  if (had_err)
    return EXIT_FAILURE;
  return EXIT_SUCCESS;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movq %rcx, 0x30(%rsp)
cmpq $0x0, 0x48(%rsp)
je 0x1a1cd7
cmpq $0x0, 0x30(%rsp)
jne 0x1a1d0f
movq 0x45a2ea(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0x3598b5(%rip), %rsi    # 0x4fb59d
leaq 0x37174e(%rip), %rdx    # 0x51343d
leaq 0x371760(%rip), %rcx    # 0x513456
leaq 0x37171b(%rip), %r8     # 0x513418
movl $0x31, %r9d
movb $0x0, %al
callq 0x33960
callq 0x2f830
jmp 0x1a1d11
callq 0x31590
cmpq $0x0, 0x48(%rsp)
je 0x1a1d26
cmpq $0x0, 0x30(%rsp)
jne 0x1a1d5e
movq 0x45a29b(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0x359866(%rip), %rsi    # 0x4fb59d
leaq 0x3716ff(%rip), %rdx    # 0x51343d
leaq 0x371711(%rip), %rcx    # 0x513456
leaq 0x3716cc(%rip), %r8     # 0x513418
movl $0x36, %r9d
movb $0x0, %al
callq 0x33960
callq 0x2f830
jmp 0x1a1d60
callq 0x30150
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rsi
callq 0x33a50
callq *0x48(%rsp)
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x1a1dab
movq 0x28(%rsp), %rdi
callq 0x1a0c40
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x337c0
movq 0x28(%rsp), %rdi
movl 0x3c(%rsp), %esi
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x32c70
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rdi
callq 0x30180
movq 0x20(%rsp), %rdi
callq 0x33160
testb $0x1, %al
jne 0x1a1de4
jmp 0x1a1e68
movq 0x45a1dd(%rip), %rax    # 0x5fbfc8
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x327d0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x32a80
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq %rax, %rcx
leaq 0x371610(%rip), %rsi    # 0x51342e
movb $0x0, %al
callq 0x33960
cmpl $0x0, 0x1c(%rsp)
jne 0x1a1e64
movq 0x45a195(%rip), %rax    # 0x5fbfc8
movq (%rax), %rdi
leaq 0x359760(%rip), %rsi    # 0x4fb59d
leaq 0x37af6a(%rip), %rdx    # 0x51cdae
leaq 0x37160b(%rip), %rcx    # 0x513456
leaq 0x3715c6(%rip), %r8     # 0x513418
movl $0x43, %r9d
movb $0x0, %al
callq 0x33960
callq 0x2f830
jmp 0x1a1e66
jmp 0x1a1e68
movq 0x20(%rsp), %rdi
callq 0x33fe0
callq 0x32c10
cmpl $0x0, %eax
je 0x1a1e86
movl $0x2, 0x54(%rsp)
jmp 0x1a1e9f
cmpl $0x0, 0x1c(%rsp)
je 0x1a1e97
movl $0x1, 0x54(%rsp)
jmp 0x1a1e9f
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)