// File: /workspace/github_c_makefile_star2_O3/craigbarnes[P]lua-gumbo/gumbo/parse.c
// Function: set_attributes
static void set_attributes(lua_State *L, const GumboVector *attrs)
{
    static const char attrnsmap[][6] = {"none", "xlink", "xml", "xmlns"};
    const unsigned int length = attrs->length;
    if (length > 0) {
        lua_createtable(L, length, length);
        for (unsigned int i = 0; i < length; i++) {
            const GumboAttribute *attr = (const GumboAttribute *)attrs->data[i];
            if (attr->attr_namespace == GUMBO_ATTR_NAMESPACE_NONE) {
                lua_createtable(L, 0, 5);
            } else {
                lua_createtable(L, 0, 6);
                set_string(L, "prefix", attrnsmap[attr->attr_namespace]);
            }
            set_string(L, "name", attr->name);
            set_string(L, "value", attr->value);
            set_sourcepos(L, attr->name_start);
            lua_pushvalue(L, -1);
            lua_setfield(L, -3, attr->name);
            setmetatable(L, Attribute);
            lua_rawseti(L, -2, i + 1);
        }
        setmetatable(L, AttributeList);
        lua_setfield(L, -2, "attributes");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x8(%rsi), %r15d
testq %r15, %r15
je 0x6e04
movq %rsi, %r14
movq %rdi, %rbx
movl %r15d, %esi
movl %r15d, %edx
callq 0x40a0
negq %r15
movl $0x1, %r12d
leaq 0x14d77(%rip), %rbp     # 0x1ba17
movq (%r14), %rax
movq -0x8(%rax,%r12,8), %r13
cmpl $0x0, (%r13)
je 0x6cf7
movq %rbx, %rdi
xorl %esi, %esi
movl $0x6, %edx
callq 0x40a0
movq %rbx, %rdi
leaq 0x1146b(%rip), %rsi     # 0x18133
callq 0x4260
movl (%r13), %eax
leaq (%rax,%rax,2), %rax
leaq 0x11344(%rip), %rcx     # 0x18020
leaq (%rcx,%rax,2), %rsi
movq %rbx, %rdi
callq 0x4260
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
jmp 0x6d06
movq %rbx, %rdi
xorl %esi, %esi
movl $0x5, %edx
callq 0x40a0
movq %rbx, %rdi
leaq 0x11755(%rip), %rsi     # 0x18465
callq 0x4260
movq 0x8(%r13), %rsi
movq %rbx, %rdi
callq 0x4260
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4260
movq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x4260
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x40c0
movq 0x48(%r13), %rax
movq %rax, 0x10(%rsp)
movups 0x38(%r13), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x6bca
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x4150
movq 0x8(%r13), %rdx
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x4110
movq %rbx, %rdi
movl $0xfff0b9d4, %esi       # imm = 0xFFF0B9D4
callq 0x4150
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4170
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x4180
leaq (%r15,%r12), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x6ca0
movq %rbx, %rdi
movl $0xfff0b9cf, %esi       # imm = 0xFFF0B9CF
callq 0x4150
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x4170
leaq 0x11351(%rip), %rdx     # 0x1813a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4110
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq