// File: /workspace/github_c_makefile_star2_O1/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 0x2b447b(%rip), %rdx    # 0x34e145
movl $0x1, %edi
movl $0x58, %esi
movl $0x5a, %ecx
callq 0x1093ef
movq %rax, %rbx
leaq 0x2b4467(%rip), %rdi    # 0x34e14f
callq 0x17950
movq %rbx, %rdi
addq $0x8, %rdi
testq %rax, %rax
je 0x99d24
movq %rax, %r15
movq %rax, %rsi
callq 0x110347
testl %eax, %eax
je 0x99d2a
leaq 0x2b4448(%rip), %rsi    # 0x34e157
xorl %r12d, %r12d
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1019cf
jmp 0x99ecd
movl $0x0, (%rdi)
callq 0x1208f8
movq %rax, 0x10(%rbx)
callq 0x1208f8
movq %rax, 0x18(%rbx)
callq 0x1208f8
movq %rax, 0x38(%rbx)
callq 0x1208f8
movq %rax, 0x30(%rbx)
callq 0x231b44
movq %rax, 0x40(%rbx)
testq %rax, %rax
je 0x99eb9
movq %rax, %rdi
callq 0x231f72
movq 0x40(%rbx), %rdi
callq 0x1912c4
movq 0x40(%rbx), %rdi
leaq 0x1ac11c(%rip), %rsi    # 0x245e98
xorl %r12d, %r12d
xorl %edx, %edx
callq 0x22e48c
movq 0x40(%rbx), %rdi
leaq 0x2b4423(%rip), %rsi    # 0x34e1b4
callq 0x22e0c4
movq 0x40(%rbx), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x22efe6
movq 0x40(%rbx), %rdi
leaq 0x1aab47(%rip), %rsi    # 0x2448f8
xorl %edx, %edx
callq 0x22e48c
movq 0x40(%rbx), %rdi
leaq 0x2db8e1(%rip), %r15    # 0x3756a4
movq %r15, %rsi
callq 0x22e0c4
movq 0x40(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x22efe6
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r15, %rdx
callq 0x22ec93
movq 0x40(%rbx), %rdi
leaq 0x1ab593(%rip), %rsi    # 0x24538d
xorl %edx, %edx
callq 0x22e48c
movq 0x40(%rbx), %rdi
leaq 0x338c8e(%rip), %rsi    # 0x3d2a9a
callq 0x22e0c4
movq 0x40(%rbx), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x22efe6
movq 0x40(%rbx), %rdi
leaq 0x1aaff4(%rip), %rsi    # 0x244e20
xorl %edx, %edx
callq 0x22e48c
movq 0x40(%rbx), %rdi
leaq 0x2b437b(%rip), %r15    # 0x34e1b9
movq %r15, %rsi
callq 0x22e0c4
movq 0x40(%rbx), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x22efe6
movq 0x40(%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r15, %rdx
callq 0x22ec93
movq 0x40(%rbx), %rdi
movq %r14, %rsi
callq 0x163e80
testl %eax, %eax
jne 0x99ecd
movq 0x40(%rbx), %rdi
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x22d42e
movq 0x40(%rbx), %rdi
callq 0x229214
movq %rax, 0x48(%rbx)
testq %rax, %rax
je 0x99ecd
movq %r14, %rdi
callq 0x101b22
movq %rax, %rdi
movq %r14, %rsi
callq 0x105688
movq %rax, %r15
testq %rax, %rax
setne %r12b
jmp 0x99ed0
leaq 0x2b42c8(%rip), %rsi    # 0x34e188
xorl %r12d, %r12d
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
xorl %r15d, %r15d
testb %r12b, %r12b
je 0x99f16
leaq 0x334db8(%rip), %rsi    # 0x3cec94
movq %r15, %rdi
callq 0x12097f
movq %r15, %rdi
callq 0x120d23
movq %rax, %rdi
callq 0x10415c
testb %al, %al
je 0x99f43
movq 0x48(%rbx), %r12
movq %r15, %rdi
callq 0x120d23
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2293f6
testl %eax, %eax
je 0x99f36
movq %r15, %rdi
callq 0x121b03
leaq 0x2b4220(%rip), %rsi    # 0x34e145
movq %rbx, %rdi
movl $0x96, %edx
callq 0x109670
xorl %ebx, %ebx
jmp 0x99f4b
movq 0x40(%rbx), %rdi
movq 0x48(%rbx), %rsi
callq 0x228d84
movq %r15, %rdi
callq 0x121b03
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq