// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/gtr.c
// Function: gtr_new
GtR* gtr_new(GtError *err)
{
  GtR *gtr;
  char *seedstr = NULL;
  int had_err = 0;
#ifndef WITHOUT_CAIRO
  GtStr *style_file = NULL;
#endif
  gtr = gt_calloc(1, sizeof (GtR));
  if ((seedstr = getenv("GT_SEED"))) {
    if (gt_parse_uint(&gtr->seed, seedstr) != 0) {
      gt_error_set(err, "invalid seed in GT_SEED environment variable: %s",
                   seedstr);
      had_err = -1;
    }
  } else gtr->seed = 0;
  if (!had_err) {
    gtr->debugfp = gt_str_new();
    gtr->testspacepeak = gt_str_new();
    gtr->test_only = gt_str_new();
    gtr->manoutdir = gt_str_new();
    gtr->L = luaL_newstate();
    if (!gtr->L) {
      gt_error_set(err, "out of memory (cannot create new lua state)");
      had_err = -1;
    }
  }
  if (!had_err) {
    luaL_openlibs(gtr->L);    /* open the standard libraries */
    gt_lua_open_lib(gtr->L);  /* open the GenomeTools library */
    lua_pushcfunction(gtr->L, luaopen_lpeg);
    lua_pushstring(gtr->L, "lpeg");
    lua_call(gtr->L, 1, 0);   /* open LPeg library */
    lua_pushcfunction(gtr->L, luaopen_md5_core);
    lua_pushstring(gtr->L, "md5");
    lua_call(gtr->L, 1, 1);   /* open MD5 library */
    lua_setglobal(gtr->L, "md5"); /* now it's our responsibility to bind */
    lua_pushcfunction(gtr->L, luaopen_lfs);
    lua_pushstring(gtr->L, "lfs");
    lua_call(gtr->L, 1, 0);   /* open Lua filesystem */
    lua_pushcfunction(gtr->L, luaopen_des56);
    lua_pushstring(gtr->L, "des56");
    lua_call(gtr->L, 1, 1);   /* open DES56 library */
    lua_setglobal(gtr->L, "des56"); /* now it's our responsibility to bind */
    had_err = gt_lua_set_modules_path(gtr->L, err);
  }
#ifndef WITHOUT_CAIRO
  if (!had_err) {
    lua_settop(gtr->L, 0);
    if (!(gtr->style = gt_style_new_with_state(gtr->L)))
      had_err = -1;
  }
  if (!had_err) {
    if (!(style_file = gt_get_gtdata_path(gt_error_get_progname(err), err)))
      had_err = -1;
  }
  if (!had_err) {
    gt_str_append_cstr(style_file, "/sketch/default.style");
    if (gt_file_exists(gt_str_get(style_file))) {
      if (gt_style_load_file(gtr->style, gt_str_get(style_file), err))
        had_err = -1;
      else
        gt_lua_put_style_in_registry(gtr->L, gtr->style);
    }
  }
  gt_str_delete(style_file);
#endif
  if (had_err) {
    gt_free(gtr);
    return NULL;
  }
  return gtr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x2ad62b(%rip), %rdx    # 0x345145
movl $0x1, %edi
movl $0x58, %esi
movl $0x5a, %ecx
callq 0x10436a
movq %rax, %rbx
leaq 0x2ad617(%rip), %rdi    # 0x34514f
callq 0x17950
movq %rbx, %rdi
addq $0x8, %rdi
testq %rax, %rax
je 0x97b74
movq %rax, %r12
movq %rax, %rsi
callq 0x10b11f
testl %eax, %eax
je 0x97b7a
leaq 0x2ad5f8(%rip), %rsi    # 0x345157
xorl %r15d, %r15d
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0xfcb67
jmp 0x97d7d
movl $0x0, (%rdi)
callq 0x11ac6c
movq %rax, 0x10(%rbx)
callq 0x11ac6c
movq %rax, 0x18(%rbx)
callq 0x11ac6c
movq %rax, 0x38(%rbx)
callq 0x11ac6c
movq %rax, 0x30(%rbx)
callq 0x22810a
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x97d69
movq %rax, %rdi
callq 0x228538
movq 0x40(%rbx), %rdi
callq 0x188c98
movq 0x40(%rbx), %rdi
leaq 0x1a58e0(%rip), %rsi    # 0x23d4ac
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x2247b8
movq 0x40(%rbx), %rdi
leaq 0x2ad5d3(%rip), %rsi    # 0x3451b4
callq 0x2243ba
movq 0x40(%rbx), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2252cf
movq 0x40(%rbx), %rdi
leaq 0x1a4293(%rip), %rsi    # 0x23be94
xorl %edx, %edx
callq 0x2247b8
movq 0x40(%rbx), %rdi
leaq 0x2d4841(%rip), %r12    # 0x36c454
movq %r12, %rsi
callq 0x2243ba
movq 0x40(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x2252cf
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r12, %rdx
callq 0x224f78
movq 0x40(%rbx), %rdi
leaq 0x1a4d57(%rip), %rsi    # 0x23c9a1
xorl %edx, %edx
callq 0x2247b8
movq 0x40(%rbx), %rdi
leaq 0x33171e(%rip), %rsi    # 0x3c937a
callq 0x2243ba
movq 0x40(%rbx), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2252cf
movq 0x40(%rbx), %rdi
leaq 0x1a477c(%rip), %rsi    # 0x23c3f8
xorl %edx, %edx
callq 0x2247b8
movq 0x40(%rbx), %rdi
leaq 0x2ad52b(%rip), %r12    # 0x3451b9
movq %r12, %rsi
callq 0x2243ba
movq 0x40(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x2252cf
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r12, %rdx
callq 0x224f78
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x15c0e4
testl %eax, %eax
jne 0x97d7d
movq 0x40(%rbx), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x2235b9
movq 0x40(%rbx), %rdi
callq 0x21f4f0
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x97d7d
movq %r14, %rdi
callq 0xfccba
movq %rax, %rdi
movq %r14, %rsi
callq 0x100758
testq %rax, %rax
je 0x97daa
movq %rax, %r15
leaq 0x32d854(%rip), %rsi    # 0x3c556c
movq %rax, %rdi
callq 0x11acf3
movq %r15, %rdi
callq 0x11b0a1
movq %rax, %rdi
callq 0xff28c
testb %al, %al
je 0x97d5f
movq 0x48(%rbx), %r12
movq %r15, %rdi
callq 0x11b0a1
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x21f6bf
testl %eax, %eax
jne 0x97d7d
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x21f060
movq %r15, %rdi
callq 0x11bdbf
jmp 0x97d9b
leaq 0x2ad418(%rip), %rsi    # 0x345188
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
movq %r15, %rdi
callq 0x11bdbf
leaq 0x2ad3b9(%rip), %rsi    # 0x345145
movq %rbx, %rdi
movl $0x96, %edx
callq 0x1045eb
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
xorl %r15d, %r15d
jmp 0x97d7d