// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/gtlua/genome_visitor_lua.c
// Function: lua_custom_visitor_visit_node_generic
static int lua_custom_visitor_visit_node_generic(GT_UNUSED GtNodeVisitor *nv,
                                                 GtGenomeNode *fn,
                                                 const char *function,
                                                 GtError *err)
{
  GT_UNUSED GtNodeVisitor **vis;
  GtLuaCustomVisitor *lcv;
  GT_UNUSED GtGenomeNode **node;
  int had_err = 0;
  gt_assert(nv);
  lcv = lua_custom_visitor_cast(nv);

  node = check_genome_node(lcv->L, 1);
  vis = check_genome_visitor(lcv->L, 2);
  gt_assert(*node == (GtGenomeNode*) fn);
  gt_assert(*vis == (GtNodeVisitor*) nv);
  lua_pushvalue(lcv->L, 2);
  lua_pushstring(lcv->L, function);
  lua_gettable(lcv->L, 2);
  if (lua_isnil(lcv->L, -1)) {
    lua_pop(lcv->L, 1);
    return had_err;
  }
  lua_pushvalue(lcv->L, 2);
  gt_lua_genome_node_push(lcv->L, gt_genome_node_ref((GtGenomeNode*) fn));
  if (lua_pcall(lcv->L, 2, 0, 0)) {
    const char *error = lua_tostring(lcv->L, -1);
    gt_error_set(err, "%s", error);
    had_err = -1;
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x94ddc
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
callq 0x94968
movq %rax, %rdi
movq %r13, %rsi
callq 0x2603e
movq %rax, %r14
movq 0x10(%rax), %rdi
leaq 0x49a94(%rip), %rdx     # 0xde787
pushq $0x1
popq %rsi
callq 0x3ae77
movq %rax, %rbp
movq 0x10(%r14), %rdi
leaq 0x49bc9(%rip), %rdx     # 0xde8d2
pushq $0x2
popq %rsi
callq 0x3ae77
cmpq %r15, (%rbp)
jne 0x94e06
cmpq %r13, (%rax)
jne 0x94e30
movq 0x10(%r14), %rdi
pushq $0x2
popq %rbp
movl %ebp, %esi
callq 0x37b39
movq 0x10(%r14), %rdi
movq %r12, %rsi
callq 0x38431
movq 0x10(%r14), %rdi
movl %ebp, %esi
callq 0x3894c
movq 0x10(%r14), %rdi
pushq $-0x1
popq %rbp
movl %ebp, %esi
callq 0x37b59
movq 0x10(%r14), %rdi
testl %eax, %eax
je 0x94dbf
pushq $0x2
popq %r12
movl %r12d, %esi
callq 0x37b39
movq 0x10(%r14), %r13
movq %r15, %rdi
callq 0x1bec8
movq %r13, %rdi
movq %rax, %rsi
callq 0x67934
movq 0x10(%r14), %rdi
xorl %r15d, %r15d
movl %r12d, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x39305
testl %eax, %eax
je 0x94dca
movq 0x10(%r14), %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x37f9b
leaq 0x42cfc(%rip), %rsi     # 0xd7aa9
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xc007
movl %ebp, %r15d
jmp 0x94dca
pushq $-0x2
popq %rsi
callq 0x377fa
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x991d5(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x35279(%rip), %rsi     # 0xca066
leaq 0x52946(%rip), %rdx     # 0xe773a
leaq 0x528e4(%rip), %rcx     # 0xe76df
leaq 0x5288d(%rip), %r8      # 0xe768f
pushq $0x3f
jmp 0x94e58
movq 0x991ab(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x3524f(%rip), %rsi     # 0xca066
leaq 0x528e7(%rip), %rdx     # 0xe7705
leaq 0x528ba(%rip), %rcx     # 0xe76df
leaq 0x52863(%rip), %r8      # 0xe768f
pushq $0x44
jmp 0x94e58
movq 0x99181(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x35225(%rip), %rsi     # 0xca066
leaq 0x528d9(%rip), %rdx     # 0xe7721
leaq 0x52890(%rip), %rcx     # 0xe76df
leaq 0x52839(%rip), %r8      # 0xe768f
pushq $0x45
popq %r9
xorl %eax, %eax
callq 0xb8c0
callq 0xb300