// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq $0x0, 0x8(%rsp)
movl $0x1, %edi
movl $0x58, %esi
leaq 0x4fbef1(%rip), %rdx    # 0x516145
movl $0x5a, %ecx
callq 0xe83c0
movq %rax, 0x20(%rsp)
leaq 0x4fbee5(%rip), %rdi    # 0x51614f
callq 0x198a0
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0x1a2b4
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
movq 0x18(%rsp), %rsi
callq 0xf8480
cmpl $0x0, %eax
je 0x1a2b2
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x4fbeb4(%rip), %rsi    # 0x516157
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a2c0
movq 0x20(%rsp), %rax
movl $0x0, 0x8(%rax)
cmpl $0x0, 0x14(%rsp)
jne 0x1a345
callq 0x11d4a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
callq 0x11d4a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
callq 0x11d4a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rax)
callq 0x11d4a0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x30(%rax)
callq 0x33bb50
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x20(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x1a343
movq 0x28(%rsp), %rdi
leaq 0x4fbe54(%rip), %rsi    # 0x516188
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a345
cmpl $0x0, 0x14(%rsp)
jne 0x1a4bb
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x33c100
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x1ff4d0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x343614(%rip), %rsi    # 0x35d990
xorl %edx, %edx
callq 0x335ef0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x4fbe21(%rip), %rsi    # 0x5161b4
callq 0x335740
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x337460
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x341263(%rip), %rsi    # 0x35b620
xorl %edx, %edx
callq 0x335ef0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x523d77(%rip), %rsi    # 0x53e14b
callq 0x335740
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x337460
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0x523d48(%rip), %rdx    # 0x53e14b
callq 0x336d90
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x342418(%rip), %rsi    # 0x35c830
xorl %edx, %edx
callq 0x335ef0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x5824bb(%rip), %rsi    # 0x59c8ea
callq 0x335740
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x337460
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x341a77(%rip), %rsi    # 0x35bed0
xorl %edx, %edx
callq 0x335ef0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
leaq 0x4fbd49(%rip), %rsi    # 0x5161b9
callq 0x335740
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0x1, %edx
movl %edx, %esi
callq 0x337460
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0x4fbd1a(%rip), %rdx    # 0x5161b9
callq 0x336d90
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x1a3d80
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x1a4f9
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
xorl %esi, %esi
callq 0x333ed0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x32ca60
movq 0x20(%rsp), %rcx
movq %rax, 0x48(%rcx)
cmpq $0x0, %rax
jne 0x1a4f7
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a4f9
cmpl $0x0, 0x14(%rsp)
jne 0x1a52c
movq 0x28(%rsp), %rdi
callq 0xd8c20
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0xe0950
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
jne 0x1a52a
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a52c
cmpl $0x0, 0x14(%rsp)
jne 0x1a5ae
movq 0x8(%rsp), %rdi
leaq 0x57e3fd(%rip), %rsi    # 0x59893c
callq 0x11d550
movq 0x8(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
callq 0xde820
testb $0x1, %al
jne 0x1a55c
jmp 0x1a5ac
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rdi
callq 0x11dee0
movq (%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
callq 0x32cea0
cmpl $0x0, %eax
je 0x1a593
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
jmp 0x1a5aa
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x48(%rax), %rsi
callq 0x32bf60
jmp 0x1a5ac
jmp 0x1a5ae
movq 0x8(%rsp), %rdi
callq 0x11f560
cmpl $0x0, 0x14(%rsp)
je 0x1a5e0
movq 0x20(%rsp), %rdi
leaq 0x4fbb7a(%rip), %rsi    # 0x516145
movl $0x96, %edx
callq 0xe88c0
movq $0x0, 0x30(%rsp)
jmp 0x1a5ea
movq 0x20(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)