// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/spec_visitor.c
// Function: spec_part_of
static int spec_part_of(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.part_of()' requires a type "
                      "checker (-typecheck)");
    lua_concat(L, 2);
    return lua_error(L);
  }

  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_partof(sv->type_checker, parent, child);
  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 0x45f8a6(%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 0x1de282
movq 0x45dd4f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x337db8(%rip), %rsi    # 0x516013
leaq 0x3892bf(%rip), %rdx    # 0x567521
leaq 0x388353(%rip), %rcx    # 0x5665bc
leaq 0x387f61(%rip), %r8     # 0x5661d1
movl $0x316, %r9d            # imm = 0x316
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x1de284
movq 0x20(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x1de2d2
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0x33a490
movq 0x28(%rsp), %rdi
leaq 0x38831e(%rip), %rsi    # 0x5665c9
callq 0x335740
movq 0x28(%rsp), %rdi
movl $0x2, %esi
callq 0x338280
movq 0x28(%rsp), %rdi
callq 0x337ea0
movl %eax, 0x34(%rsp)
jmp 0x1de393
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 0x1de312
movq 0x28(%rsp), %rdi
movl $0x1, %esi
leaq 0x388159(%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 0x1de356
movq 0x28(%rsp), %rdi
movl $0x2, %esi
leaq 0x388115(%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 0x1f42e0
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
nopl (%rax)