// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/spec_visitor.c
// Function: spec_is_a
static int spec_is_a(lua_State *L)
{
  GtSpecVisitor *sv;
  const char *child, *parent;
  bool result = false;
  child = gt_symbol(luaL_checkstring(L, 1));
  parent = gt_symbol(luaL_checkstring(L, 2));

  lua_pushlightuserdata(L, (void *) &spec_defuserdata);
  lua_gettable(L, LUA_REGISTRYINDEX);
  sv = lua_touserdata(L, -1);
  gt_assert(sv);

  if (!sv->type_checker) {
    luaL_where(L, 1);
    lua_pushstring(L, "'string.is_a()' requires a type "
                      "checker (-typecheck)");
    lua_concat(L, 2);
    return lua_error(L);
  }

  if (sv->type_checker) {
    luaL_argcheck(L, gt_type_checker_is_valid(sv->type_checker, child),
                  1, "not a valid SO type");
    luaL_argcheck(L, gt_type_checker_is_valid(sv->type_checker, parent),
                  2, "not a valid SO type");
    result = gt_type_checker_is_a(sv->type_checker, parent, child);
  } else {
    result = (child == parent);
  }
  lua_pushboolean(L, result);

  return 1;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x28(%rsp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33a6b0
movq %rax, %rdi
callq 0x120930
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x33a6b0
movq %rax, %rdi
callq 0x120930
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x45fab6(%rip), %rsi    # 0x63dac0
callq 0x336160
movq 0x28(%rsp), %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x336210
movq 0x28(%rsp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x335300
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x1de072
movq 0x45df5f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x337fc8(%rip), %rsi    # 0x516013
leaq 0x3894cf(%rip), %rdx    # 0x567521
leaq 0x388524(%rip), %rcx    # 0x56657d
leaq 0x388171(%rip), %r8     # 0x5661d1
movl $0x2f3, %r9d            # imm = 0x2F3
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1de074
movq 0x20(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1de0c2
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x33a490
movq 0x28(%rsp), %rdi
leaq 0x3884ec(%rip), %rsi    # 0x566587
callq 0x335740
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x338280
movq 0x28(%rsp), %rdi
callq 0x337ea0
movl %eax, 0x34(%rsp)
jmp 0x1de1a8
movq 0x20(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x1de17a
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x1f41b0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xe(%rsp)
jne 0x1de112
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x388359(%rip), %rdx    # 0x56645c
callq 0x33a1f0
cmpl $0x0, %eax
setne %al
movb %al, 0xe(%rsp)
movb 0xe(%rsp), %al
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x1f41b0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0xd(%rsp)
jne 0x1de156
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x388315(%rip), %rdx    # 0x56645c
callq 0x33a1f0
cmpl $0x0, %eax
setne %al
movb %al, 0xd(%rsp)
movb 0xd(%rsp), %al
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1f4380
andb $0x1, %al
movb %al, 0xf(%rsp)
jmp 0x1de18d
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
sete %al
andb $0x1, %al
movb %al, 0xf(%rsp)
movq 0x28(%rsp), %rdi
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %esi
callq 0x336110
movl $0x1, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)