// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/script_filter.c
// Function: gt_script_filter_get_string
static const char *gt_script_filter_get_string(GtScriptFilter *script_filter,
                                              const char *name, GtError *err)
{
#ifndef NDEBUG
  int stack_size;
#endif
  gt_assert(script_filter && name);
  gt_error_check(err);

#ifndef NDEBUG
  stack_size = lua_gettop(script_filter->L);
#endif

  lua_getglobal(script_filter->L, name);
  if (lua_isnil(script_filter->L, -1)) {
    lua_pop(script_filter->L, 1);
    return gt_symbol("undefined");
  }
  /* execute callback if function is given */
  if (lua_isfunction(script_filter->L, -1))
  {
    int num_of_args = 0;
    if (lua_pcall(script_filter->L, num_of_args, 1, 0) != 0)
    {
      gt_error_set(err, "%s", lua_tostring(script_filter->L, -1));
      lua_pop(script_filter->L, 1);
      gt_assert(lua_gettop(script_filter->L) == stack_size);
      return NULL;
    }
  }

  if (lua_isnil(script_filter->L, -1) || !lua_isstring(script_filter->L, -1)) {
    lua_pop(script_filter->L, 1);
    gt_assert(lua_gettop(script_filter->L) == stack_size);
    gt_error_set(err, "script filter '%s': '%s' must return a string",
                 gt_str_get(script_filter->filename), name);
    return NULL;
  }

  /* retrieve string */
  return lua_tostring(script_filter->L, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x179ecd
movq %rsi, %r15
testq %rsi, %rsi
je 0x179ecd
movq %rdx, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x179d91
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x179ed2
movq (%rbx), %rdi
callq 0x22d421
movl %eax, %ebp
movq (%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r15, %rdx
callq 0x22e6f4
movq (%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d7b8
movq (%rbx), %rdi
testl %eax, %eax
je 0x179e67
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d7b8
cmpl $0x6, %eax
jne 0x179e2c
movq (%rbx), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x22f092
testl %eax, %eax
je 0x179e2c
movq (%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x22db9e
leaq 0x2583d4(%rip), %rsi    # 0x3d21d1
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movq (%rbx), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
movq (%rbx), %rdi
callq 0x22d421
cmpl %ebp, %eax
je 0x179ec0
callq 0x5476f
movq (%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d7b8
testl %eax, %eax
je 0x179e87
movq (%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d88c
testl %eax, %eax
je 0x179e87
movq (%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22db9e
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
leaq 0x1ec595(%rip), %rdi    # 0x36640d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12234f
movq (%rbx), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
movq (%rbx), %rdi
callq 0x22d421
cmpl %ebp, %eax
jne 0x179ed7
movq 0x8(%rbx), %rdi
callq 0x120d23
leaq 0x22197c(%rip), %rsi    # 0x39b82c
movq %r14, %rdi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x1019cf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x546fd
callq 0x54736
callq 0x547a8