// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/script_filter.c
// Function: gt_script_filter_new_generic
static GtScriptFilter* gt_script_filter_new_generic(const char *file,
                                                    bool unsafe,
                                                    GtError *err)
{
  GtScriptFilter *script_filter;
  gt_assert(file);
  script_filter = gt_malloc(sizeof (GtScriptFilter));
  script_filter->filename = gt_str_new_cstr(file);
  script_filter->L = luaL_newstate();
  script_filter->reference_count = 0;
  if (!script_filter->L) {
    gt_error_set(err, "out of memory (cannot create new Lua state)");
    gt_free(script_filter);
    return NULL;
  }
  script_filter_luaL_opencustomlibs(script_filter->L,
                                     script_filter_luasecurelibs);
  if (unsafe)
    script_filter_luaL_opencustomlibs(script_filter->L,
                                      script_filter_luainsecurelibs);
  if (luaL_loadfile(script_filter->L, file) ||
                               lua_pcall(script_filter->L, 0, 0, 0)) {
    gt_error_set(err, "cannot run file: %s",
                 lua_tostring(script_filter->L, -1));
    lua_pop(script_filter->L, 1);
    lua_close(script_filter->L);
    gt_str_delete(script_filter->filename);
    gt_free(script_filter);
    return NULL;
  }
  return script_filter;
}

// Assembly:
subq $0x38, %rsp
movb %sil, %al
movq %rdi, 0x28(%rsp)
andb $0x1, %al
movb %al, 0x27(%rsp)
movq %rdx, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x1d1a17
movq 0x46a5ba(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x344623(%rip), %rsi    # 0x516013
leaq 0x348f0d(%rip), %rdx    # 0x51a904
leaq 0x3931ec(%rip), %rcx    # 0x564bea
leaq 0x393037(%rip), %r8     # 0x564a3c
movl $0x45, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1d1a19
movl $0x18, %edi
leaq 0x393017(%rip), %rsi    # 0x564a3c
movl $0x46, %edx
callq 0xe80f0
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x11d510
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
callq 0x33bb50
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rax
movq $0x0, 0x10(%rax)
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x1d1aa9
movq 0x18(%rsp), %rdi
leaq 0x382b73(%rip), %rsi    # 0x5545f1
movb $0x0, %al
callq 0xd88c0
movq 0x10(%rsp), %rdi
leaq 0x392fab(%rip), %rsi    # 0x564a3c
movl $0x4c, %edx
callq 0xe88c0
movq $0x0, 0x30(%rsp)
jmp 0x1d1b99
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x464b18(%rip), %rsi    # 0x6365d0
callq 0x1d1d90
testb $0x1, 0x27(%rsp)
je 0x1d1ad8
movq 0x10(%rsp), %rax
movq (%rax), %rdi
leaq 0x464b5d(%rip), %rsi    # 0x636630
callq 0x1d1d90
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x33b630
cmpl $0x0, %eax
jne 0x1d1b0b
movq 0x10(%rsp), %rax
movq (%rax), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
movl %ecx, %edx
callq 0x3375c0
cmpl $0x0, %eax
je 0x1d1b8f
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x334f50
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x387581(%rip), %rsi    # 0x5590bb
movb $0x0, %al
callq 0xd88c0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x333ed0
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x339e40
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
callq 0x11f560
movq 0x10(%rsp), %rdi
leaq 0x392ec2(%rip), %rsi    # 0x564a3c
movl $0x5b, %edx
callq 0xe88c0
movq $0x0, 0x30(%rsp)
jmp 0x1d1b99
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)