// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl $0x0, 0x14(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0xfae30
movq 0xb91d9(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x6325d(%rip), %rsi     # 0x15e066
leaq 0x81aea(%rip), %rdx     # 0x17c8fa
leaq 0x81a88(%rip), %rcx     # 0x17c89f
leaq 0x81a31(%rip), %r8      # 0x17c84f
movl $0x3f, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xfae32
callq 0xfa860
movq %rax, %rdi
movq 0x48(%rsp), %rsi
callq 0x34d50
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
leaq 0x787d9(%rip), %rdx     # 0x173637
callq 0x559c0
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
leaq 0x78905(%rip), %rdx     # 0x173782
callq 0x559c0
movq %rax, 0x28(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpq 0x40(%rsp), %rax
je 0xfaece
movq 0xb913b(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x631bf(%rip), %rsi     # 0x15e066
leaq 0x81a17(%rip), %rdx     # 0x17c8c5
leaq 0x819ea(%rip), %rcx     # 0x17c89f
leaq 0x81993(%rip), %r8      # 0x17c84f
movl $0x44, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xfaed0
jmp 0xfaed2
movq 0x28(%rsp), %rax
movq (%rax), %rax
cmpq 0x48(%rsp), %rax
je 0xfaf19
movq 0xb90f0(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x63174(%rip), %rsi     # 0x15e066
leaq 0x819e8(%rip), %rdx     # 0x17c8e1
leaq 0x8199f(%rip), %rcx     # 0x17c89f
leaq 0x81948(%rip), %r8      # 0x17c84f
movl $0x45, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xfaf1b
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x4f790
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x38(%rsp), %rsi
callq 0x50970
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x51440
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4f800
cmpl $0x0, %eax
jne 0xfaf8c
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4f100
movl 0x14(%rsp), %eax
movl %eax, 0x54(%rsp)
jmp 0xfb022
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
callq 0x4f790
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rdi
callq 0x25140
movq (%rsp), %rdi
movq %rax, %rsi
callq 0xaade0
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0x2, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x527f0
cmpl $0x0, %eax
je 0xfb01a
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
movl %eax, %edx
callq 0x50180
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rdi
movq 0x8(%rsp), %rdx
leaq 0x70ea2(%rip), %rsi     # 0x16bead
movb $0x0, %al
callq 0xc0d0
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl 0x14(%rsp), %eax
movl %eax, 0x54(%rsp)
movl 0x54(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax,%rax)