// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
leaq 0x2ccf53(%rip), %rdx    # 0x2e5145
pushq $0x1
popq %rdi
pushq $0x58
popq %rsi
pushq $0x5a
popq %rcx
callq 0x9334a
movq %rax, %rbx
leaq 0x2ccf45(%rip), %rdi    # 0x2e514f
callq 0x17900
movq %rbx, %rdi
addq $0x8, %rdi
testq %rax, %rax
je 0x18246
movq %rax, %r12
movq %rax, %rsi
callq 0x9bbb9
testl %eax, %eax
je 0x18249
leaq 0x2ccf26(%rip), %rsi    # 0x2e5157
xorl %r15d, %r15d
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x89dbb
jmp 0x1843d
andl $0x0, (%rdi)
callq 0xacb84
movq %rax, 0x10(%rbx)
callq 0xacb84
movq %rax, 0x18(%rbx)
callq 0xacb84
movq %rax, 0x38(%rbx)
callq 0xacb84
movq %rax, 0x30(%rbx)
callq 0x1df5e2
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x18429
movq %rax, %rdi
callq 0x1df9e1
movq 0x40(%rbx), %rdi
callq 0x131710
movq 0x40(%rbx), %rdi
leaq 0x1d85b1(%rip), %rsi    # 0x1f084c
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x1dc3ec
movq 0x40(%rbx), %rdi
leaq 0x2ccf04(%rip), %rsi    # 0x2e51b4
callq 0x1dc009
movq 0x40(%rbx), %rdi
pushq $0x1
popq %rbp
movl %ebp, %esi
xorl %edx, %edx
callq 0x1dce3a
movq 0x40(%rbx), %rdi
leaq 0x1d70dc(%rip), %rsi    # 0x1ef3ac
xorl %edx, %edx
callq 0x1dc3ec
movq 0x40(%rbx), %rdi
leaq 0x2f4497(%rip), %r12    # 0x30c779
movq %r12, %rsi
callq 0x1dc009
movq 0x40(%rbx), %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x1dce3a
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r12, %rdx
callq 0x1dcb19
movq 0x40(%rbx), %rdi
leaq 0x1d7aeb(%rip), %rsi    # 0x1efdfe
xorl %edx, %edx
callq 0x1dc3ec
movq 0x40(%rbx), %rdi
leaq 0x351455(%rip), %rsi    # 0x36977a
callq 0x1dc009
movq 0x40(%rbx), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x1dce3a
movq 0x40(%rbx), %rdi
leaq 0x1d7562(%rip), %rsi    # 0x1ef8a4
xorl %edx, %edx
callq 0x1dc3ec
movq 0x40(%rbx), %rdi
leaq 0x2cce65(%rip), %r12    # 0x2e51b9
movq %r12, %rsi
callq 0x1dc009
movq 0x40(%rbx), %rdi
movl %ebp, %esi
movl %ebp, %edx
callq 0x1dce3a
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r12, %rdx
callq 0x1dcb19
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0xf9d1c
testl %eax, %eax
jne 0x1843d
movq 0x40(%rbx), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x1db3d2
movq 0x40(%rbx), %rdi
callq 0x1d6716
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x1843d
movq %r14, %rdi
callq 0x8a001
movq %rax, %rdi
movq %r14, %rsi
callq 0x8f124
testq %rax, %rax
je 0x18467
movq %rax, %r15
leaq 0x34d5a4(%rip), %rsi    # 0x36597c
movq %rax, %rdi
callq 0xacbfb
movq %r15, %rdi
callq 0xad1fa
movq %rax, %rdi
callq 0x8da98
testb %al, %al
je 0x1841f
movq 0x48(%rbx), %r12
movq %r15, %rdi
callq 0xad1fa
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1d6a41
testl %eax, %eax
jne 0x1843d
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x1d5f3c
movq %r15, %rdi
callq 0xae103
jmp 0x1845b
leaq 0x2ccd58(%rip), %rsi    # 0x2e5188
xorl %r15d, %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x89dbb
movq %r15, %rdi
callq 0xae103
leaq 0x2cccf9(%rip), %rsi    # 0x2e5145
movq %rbx, %rdi
movl $0x96, %edx
callq 0x936f9
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x1843d