// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/spec_visitor.c
// Function: gt_spec_visitor_new
GtNodeVisitor* gt_spec_visitor_new(const char *specfile, GtSpecResults *res,
                                   GtError *err)
{
  GtNodeVisitor *nv;
  GtSpecVisitor *sv;
  int had_err = 0;
  gt_assert(specfile);
  nv = gt_node_visitor_create(gt_spec_visitor_class());
  sv = spec_visitor_cast(nv);
  sv->L = luaL_newstate();
  if (!sv->L) {
    gt_error_set(err, "cannot create new Lua state");
    gt_node_visitor_delete(nv);
    return NULL;
  }
  spec_luaL_opencustomlibs(sv->L, spec_luasecurelibs);
  spec_luaL_opencustomlibs(sv->L, spec_luainsecurelibs);
  sv->filename = gt_str_new_cstr(specfile);
  sv->res = res;
  sv->type_checker = NULL;
  sv->type_specs = gt_hashmap_new(GT_HASH_STRING, gt_free_func, gt_free_func);
  sv->graph_context = gt_array_new(sizeof (GtFeatureNode*));
  sv->runtime_fail_hard = false;

  had_err = spec_init_lua_env(sv, gt_error_get_progname(err), err);
  if (!had_err) {
    if (luaL_loadfile(sv->L, specfile) || lua_pcall(sv->L, 0, 0, 0)) {
      gt_error_set(err, "%s", lua_tostring(sv->L, -1));
      gt_node_visitor_delete(nv);
      return NULL;
    }
  } else {
    gt_node_visitor_delete(nv);
    return NULL;
  }
  return nv;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x38(%rsp)
jne 0x1dcf2b
movq 0x45f0a6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x33910f(%rip), %rsi    # 0x516013
leaq 0x34fb9b(%rip), %rdx    # 0x52caa6
leaq 0x389394(%rip), %rcx    # 0x5662a6
leaq 0x3892b8(%rip), %r8     # 0x5661d1
movl $0x3b0, %r9d            # imm = 0x3B0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1dcf2d
callq 0x1dc500
movq %rax, %rdi
callq 0x1b22c0
movq %rax, 0x20(%rsp)
callq 0x1dc500
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x1b2350
movq %rax, 0x18(%rsp)
callq 0x33bb50
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x1dcf9e
movq 0x28(%rsp), %rdi
leaq 0x389039(%rip), %rsi    # 0x565fb8
movb $0x0, %al
callq 0xd88c0
movq 0x20(%rsp), %rdi
callq 0x1b29d0
movq $0x0, 0x40(%rsp)
jmp 0x1dd105
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x459752(%rip), %rsi    # 0x636700
callq 0x1dd110
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
leaq 0x45979d(%rip), %rsi    # 0x636760
callq 0x1dd110
movq 0x38(%rsp), %rdi
callq 0x11d510
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x28(%rax)
movl $0x1, %edi
leaq -0xf45d5(%rip), %rdx    # 0xe8a30
movq %rdx, %rsi
callq 0xe0c40
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x20(%rax)
movl $0x8, %edi
callq 0x80990
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x18(%rsp), %rax
movb $0x0, 0x70(%rax)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rsp), %rdi
callq 0xd8c20
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x28(%rsp), %rdx
callq 0x1dd180
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
jne 0x1dd0e6
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0x33b630
cmpl $0x0, %eax
jne 0x1dd09a
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x3375c0
cmpl $0x0, %eax
je 0x1dd0e4
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x334f50
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0x3bef59(%rip), %rsi    # 0x59c021
movb $0x0, %al
callq 0xd88c0
movq 0x20(%rsp), %rdi
callq 0x1b29d0
movq $0x0, 0x40(%rsp)
jmp 0x1dd105
jmp 0x1dd0fb
movq 0x20(%rsp), %rdi
callq 0x1b29d0
movq $0x0, 0x40(%rsp)
jmp 0x1dd105
movq 0x20(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nop