// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x17fec1
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
callq 0x17f3cc
movq %rax, %rdi
callq 0x16aef0
movq %rax, %rbx
callq 0x17f3cc
movq %rax, %rdi
movq %rbx, %rsi
callq 0x16af21
movq %rax, %r12
callq 0x231b44
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x17fdfc
leaq 0x33f5f7(%rip), %rsi    # 0x4bef50
movq %rax, %rdi
callq 0x17fecb
movq 0x10(%r12), %rdi
leaq 0x33f643(%rip), %rsi    # 0x4befb0
callq 0x17fecb
movq %r15, %rdi
callq 0x120955
movq %rax, 0x18(%r12)
movq %r13, 0x68(%r12)
movq $0x0, 0x28(%r12)
leaq -0x76265(%rip), %rdx    # 0x10972f
movl $0x1, %edi
movq %rdx, %rsi
callq 0x105830
movq %rax, 0x20(%r12)
movl $0x8, %edi
callq 0xd46fc
movq %rax, 0x60(%r12)
movb $0x0, 0x70(%r12)
movq %r14, %rdi
callq 0x101b22
testq %r12, %r12
je 0x17fec6
movq %rax, %r13
movq 0x10(%r12), %rdi
leaq 0x21d4ac(%rip), %rdx    # 0x39ce87
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x22e6f4
movq 0x10(%r12), %rdi
leaq 0x21d4ae(%rip), %rsi    # 0x39ce9f
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x654(%rip), %rsi       # 0x180056
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d494(%rip), %rsi    # 0x39ceb8
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x628(%rip), %rsi       # 0x18005d
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d59a(%rip), %rsi    # 0x39cff1
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x5ff(%rip), %rsi       # 0x180067
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d5e3(%rip), %rsi    # 0x39d06d
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x65b(%rip), %rsi       # 0x1800f6
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d5d9(%rip), %rsi    # 0x39d096
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x7d1(%rip), %rsi       # 0x18029f
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x1fac2e(%rip), %rdx    # 0x37a71e
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x22e6f4
movq 0x10(%r12), %rdi
leaq 0x220cf3(%rip), %rsi    # 0x3a07f9
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x887(%rip), %rsi       # 0x18039e
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d5aa(%rip), %rsi    # 0x39d0e3
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x980(%rip), %rsi       # 0x1804ca
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e8fc
movq 0x10(%r12), %rdi
leaq 0x209feb(%rip), %rsi    # 0x389b65
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xa6b(%rip), %rsi       # 0x1805f6
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x1f8d20(%rip), %rsi    # 0x3788cd
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xb47(%rip), %rsi       # 0x180705
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x227439(%rip), %rsi    # 0x3a7019
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xbc5(%rip), %rsi       # 0x1807b6
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x251b28(%rip), %rsi    # 0x3d173b
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xc43(%rip), %rsi       # 0x180867
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21c5d9(%rip), %rsi    # 0x39c21f
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xcc1(%rip), %rsi       # 0x180918
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ecef
movq 0x10(%r12), %rdi
leaq 0x21d25d(%rip), %rdx    # 0x39ced6
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x22ec93
movq 0x10(%r12), %rdi
leaq 0xd3a(%rip), %rsi       # 0x1809c9
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
leaq 0x1f6eab(%rip), %rdx    # 0x376b4d
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x22ec93
movq 0x10(%r12), %rdi
leaq 0xdc4(%rip), %rsi       # 0x180a7c
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
leaq 0x1f4a98(%rip), %rdx    # 0x374763
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x22ec93
movq 0x10(%r12), %rdi
leaq 0x21d1fe(%rip), %rsi    # 0x39cedf
callq 0x230d3b
movq 0x10(%r12), %rdi
leaq 0x21d204(%rip), %rsi    # 0x39cef6
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0xe51(%rip), %rsi       # 0x180b54
xorl %edx, %edx
callq 0x22e48c
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ea7e
movq 0x10(%r12), %rdi
leaq 0x21d1d9(%rip), %rsi    # 0x39cefe
callq 0x22e0c4
movq 0x10(%r12), %rdi
leaq 0x1d3d0b(%rip), %rsi    # 0x353a41
callq 0x22e0c4
movq 0x10(%r12), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ea7e
callq 0x1208f8
movq %rax, %rbp
movq %r13, %rdi
movl $0x20, %esi
callq 0xe885c
movq %rbp, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x120a9d
movq %rbp, %rdi
callq 0x120d23
movq %rax, %rdi
xorl %esi, %esi
callq 0x105688
movq %rax, %r13
movq %rbp, %rdi
callq 0x121b03
leaq 0x21d174(%rip), %rsi    # 0x39cf05
movq %r13, %rdi
callq 0x12097f
movq 0x10(%r12), %rbp
movq %r13, %rdi
callq 0x120d23
movq %rbp, %rdi
movq %rax, %rsi
callq 0x23180b
movb $0x1, %cl
testl %eax, %eax
jne 0x17fdcc
movq 0x10(%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x22f092
testl %eax, %eax
setne %cl
testb %cl, %cl
je 0x17fe12
movq 0x10(%r12), %rdi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x22db9e
leaq 0x2523e4(%rip), %rsi    # 0x3d21d1
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
jmp 0x17fe15
leaq 0x21cd21(%rip), %rsi    # 0x39cb24
movq %r14, %rdi
xorl %eax, %eax
callq 0x1019cf
jmp 0x17fea5
movzbl %cl, %ebp
movq %r13, %rdi
callq 0x121b03
movq 0x10(%r12), %rdi
leaq 0x3453cf(%rip), %rsi    # 0x4c51f8
callq 0x22e58a
movq 0x10(%r12), %rdi
movq %r12, %rsi
callq 0x22e58a
movq 0x10(%r12), %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x22ea7e
movaps 0x1e1c2f(%rip), %xmm0   # 0x361a80
movups %xmm0, 0x30(%r12)
testl %ebp, %ebp
jne 0x17fea5
movq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0x23180b
testl %eax, %eax
jne 0x17fe80
movq 0x10(%r12), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x22f092
testl %eax, %eax
je 0x17feaf
movq 0x10(%r12), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x22db9e
leaq 0x252339(%rip), %rsi    # 0x3d21d1
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movq %rbx, %rdi
callq 0x16b162
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x565b1
callq 0x56578