// File: /workspace/github_c_makefile_star2_O2/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 0x11526f
movq %rsi, %r15
testq %rsi, %rsi
je 0x11526f
movq %rdx, %r14
movq %rdi, %rbx
testq %rdx, %rdx
je 0x115113
movq %r14, %rdi
callq 0x89eb7
testb %al, %al
jne 0x11529d
movq (%rbx), %rdi
callq 0x1db3c5
movl %eax, %ebp
movq (%rbx), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
movq %r15, %rdx
callq 0x1dc63b
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x1db731
movq (%rbx), %rdi
testl %eax, %eax
je 0x115209
pushq $-0x1
popq %rsi
callq 0x1db731
cmpl $0x6, %eax
jne 0x1151d4
movq (%rbx), %rdi
pushq $0x1
popq %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x1dcedd
testl %eax, %eax
je 0x1151d4
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x1dbb73
leaq 0x253d2e(%rip), %rsi    # 0x368ea9
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
movq (%rbx), %rdi
pushq $-0x2
popq %rsi
callq 0x1db3d2
movq (%rbx), %rdi
callq 0x1db3c5
cmpl %ebp, %eax
je 0x115262
movq 0x322dbe(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cfe5f(%rip), %rsi    # 0x2e5013
leaq 0x21d566(%rip), %rdx    # 0x332721
leaq 0x21d543(%rip), %rcx    # 0x332705
leaq 0x21d356(%rip), %r8     # 0x33251f
movl $0xa2, %r9d
jmp 0x1152f7
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x1db731
testl %eax, %eax
je 0x115227
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
callq 0x1db803
testl %eax, %eax
je 0x115227
movq (%rbx), %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1dbb73
pushq $-0x2
popq %rsi
callq 0x1db3d2
leaq 0x1e80ab(%rip), %rdi    # 0x2fd2c3
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xaed4b
movq (%rbx), %rdi
pushq $-0x2
popq %rsi
callq 0x1db3d2
movq (%rbx), %rdi
callq 0x1db3c5
cmpl %ebp, %eax
jne 0x1152cb
movq 0x8(%rbx), %rdi
callq 0xad1fa
leaq 0x21d4fa(%rip), %rsi    # 0x33274c
movq %r14, %rdi
movq %rax, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x89dbb
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x322cf2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cfd93(%rip), %rsi    # 0x2e5013
leaq 0x21d468(%rip), %rdx    # 0x3326ef
leaq 0x21d477(%rip), %rcx    # 0x332705
leaq 0x21d28a(%rip), %r8     # 0x33251f
movl $0x8e, %r9d
jmp 0x1152f7
movq 0x322cc4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cfd65(%rip), %rsi    # 0x2e5013
leaq 0x1cff0a(%rip), %rdx    # 0x2e51bf
leaq 0x21d449(%rip), %rcx    # 0x332705
leaq 0x21d25c(%rip), %r8     # 0x33251f
movl $0x8f, %r9d
jmp 0x1152f7
movq 0x322c96(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1cfd37(%rip), %rsi    # 0x2e5013
leaq 0x21d43e(%rip), %rdx    # 0x332721
leaq 0x21d41b(%rip), %rcx    # 0x332705
leaq 0x21d22e(%rip), %r8     # 0x33251f
movl $0xa9, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390