// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/gumbo/parse.c
// Function: push_node
static void push_node(lua_State *L, const GumboNode *node)
{
    luaL_checkstack(L, 10, "Unable to allocate Lua stack space");
    switch (node->type) {
    case GUMBO_NODE_ELEMENT: {
        const GumboElement *element = &node->v.element;
        lua_createtable(L, 0, 7);
        set_tag(L, element);
        set_sourcepos(L, element->start_pos);
        if (node->parse_flags != GUMBO_INSERTION_NORMAL) {
            set_integer(L, "parseFlags", node->parse_flags);
        }
        set_attributes(L, &element->attributes);
        set_children(L, &element->children, 1);
        setmetatable(L, Element);
        return;
    }
    case GUMBO_NODE_TEMPLATE: {
        const GumboElement *element = &node->v.element;
        lua_createtable(L, 0, 8);
        set_literal(L, "localName", "template");
        set_sourcepos(L, element->start_pos);
        set_attributes(L, &element->attributes);
        lua_createtable(L, 0, 0);
        setmetatable(L, NodeList);
        lua_setfield(L, -2, "childNodes");
        lua_createtable(L, 0, 1);
        set_children(L, &element->children, 1);
        setmetatable(L, DocumentFragment);
        lua_setfield(L, -2, "content");
        setmetatable(L, Element);
        return;
    }
    case GUMBO_NODE_TEXT:
        create_text_node(L, &node->v.text, Text);
        return;
    case GUMBO_NODE_WHITESPACE:
        create_text_node(L, &node->v.text, Text);
        set_literal(L, "type", "whitespace");
        return;
    case GUMBO_NODE_COMMENT:
        create_text_node(L, &node->v.text, Comment);
        return;
    case GUMBO_NODE_CDATA:
        create_text_node(L, &node->v.text, Text);
        set_literal(L, "type", "cdata");
        return;
    default:
        luaL_error(L, "GumboNodeType value out of bounds: %d", node->type);
        return;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x2a862(%rip), %rdx     # 0x2f09d
movl $0xa, %esi
callq 0x41c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x5, %eax
ja 0x4aff
movq -0x28(%rbp), %rax
leaq 0x2a799(%rip), %rcx     # 0x2f000
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x7, %edx
callq 0x40a0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4b20
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x38, %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x4c90
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x48fd
movq -0x8(%rbp), %rdi
leaq 0x2a7e8(%rip), %rsi     # 0x2f0c0
callq 0x4260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, %esi
callq 0x4130
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x68, %rsi
callq 0x4d40
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x4710
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x47e0
jmp 0x4b17
movq -0x10(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x8, %edx
callq 0x40a0
movq -0x8(%rbp), %rdi
leaq 0x2a771(%rip), %rsi     # 0x2f0cb
callq 0x4260
movq -0x8(%rbp), %rdi
leaq 0x2a76b(%rip), %rsi     # 0x2f0d5
callq 0x4260
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
addq $0x38, %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x4c90
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x68, %rsi
callq 0x4d40
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x40a0
movq -0x8(%rbp), %rdi
movl $0x8, %esi
callq 0x47e0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x2a692(%rip), %rdx     # 0x2f075
callq 0x4110
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x40a0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x1, %edx
callq 0x4710
movq -0x8(%rbp), %rdi
movl $0x7, %esi
callq 0x47e0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x306aa(%rip), %rdx     # 0x350d2
callq 0x4110
movq -0x8(%rbp), %rdi
movl $0x3, %esi
callq 0x47e0
jmp 0x4b17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x4f10
jmp 0x4b17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x4f10
movq -0x8(%rbp), %rdi
leaq 0x689c2(%rip), %rsi     # 0x6d43e
callq 0x4260
movq -0x8(%rbp), %rdi
leaq 0x2a652(%rip), %rsi     # 0x2f0de
callq 0x4260
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
jmp 0x4b17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x2, %edx
callq 0x4f10
jmp 0x4b17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x18, %rsi
movl $0x1, %edx
callq 0x4f10
movq -0x8(%rbp), %rdi
leaq 0x68964(%rip), %rsi     # 0x6d43e
callq 0x4260
movq -0x8(%rbp), %rdi
leaq 0x2a5ff(%rip), %rsi     # 0x2f0e9
callq 0x4260
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
jmp 0x4b17
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl (%rax), %edx
leaq 0x2a5df(%rip), %rsi     # 0x2f0ef
movb $0x0, %al
callq 0x4230
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)