// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/lua/src/lua_cjson.c
// Function: lua_cjson_new
static int lua_cjson_new(lua_State *l)
{
    luaL_Reg reg[] = {
        { "encode", json_encode },
        { "decode", json_decode },
        { "encode_sparse_array", json_cfg_encode_sparse_array },
        { "encode_max_depth", json_cfg_encode_max_depth },
        { "decode_max_depth", json_cfg_decode_max_depth },
        { "encode_number_precision", json_cfg_encode_number_precision },
        { "encode_keep_buffer", json_cfg_encode_keep_buffer },
        { "encode_invalid_numbers", json_cfg_encode_invalid_numbers },
        { "decode_invalid_numbers", json_cfg_decode_invalid_numbers },
        { "new", lua_cjson_new },
        { NULL, NULL }
    };

    /* Initialise number conversions */
    fpconv_init();

    /* cjson module table */
    lua_newtable(l);

    /* Register functions with config data as upvalue */
    json_create_config(l);
    luaL_setfuncs(l, reg, 1);

    /* Set cjson.null */
    lua_pushlightuserdata(l, NULL);
    lua_setfield(l, -2, "null");

    /* Set module name / version fields */
    lua_pushliteral(l, CJSON_MODNAME);
    lua_setfield(l, -2, "_NAME");
    lua_pushliteral(l, CJSON_VERSION);
    lua_setfield(l, -2, "_VERSION");

    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x8dca5
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x78ddb
movl $0x548, %esi            # imm = 0x548
movq %rbx, %rdi
callq 0x794cb
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x78ddb
leaq 0x15d4(%rip), %rsi      # 0x894fc
movq %rbx, %rdi
xorl %edx, %edx
callq 0x78c17
leaq 0x395ea(%rip), %rdx     # 0xc1523
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x78efa
movq %rbx, %rdi
movl %ebp, %esi
callq 0x7902d
movaps 0x3a269(%rip), %xmm0    # 0xc21c0
movups %xmm0, 0x520(%r14)
movl $0x3e8, 0x540(%r14) # imm = 0x3E8
movaps 0x3a25f(%rip), %xmm0    # 0xc21d0
movups %xmm0, 0x530(%r14)
movq %r14, %rdi
addq $0x500, %rdi            # imm = 0x500
xorl %esi, %esi
callq 0x8d624
cmpq $0x100, %r15            # imm = 0x100
je 0x87fa0
movl $0xc, (%r14,%r15,4)
incq %r15
jmp 0x87f8a
andl $0x0, 0x1ec(%r14)
movl $0x1, 0x1f4(%r14)
movl $0x2, 0x16c(%r14)
movl $0x3, 0x174(%r14)
movl $0x8, 0xe8(%r14)
movl $0xa, (%r14)
pushq $0xb
popq %rax
movl %eax, 0x80(%r14)
movabsq $0xb0000000b, %rcx      # imm = 0xB0000000B
movq %rcx, 0x24(%r14)
movl %eax, 0x34(%r14)
pushq $0xd
popq %rax
movl %eax, 0x198(%r14)
movl %eax, 0x1a4(%r14)
movl %eax, 0x124(%r14)
movl %eax, 0x1b8(%r14)
movl %eax, 0x138(%r14)
movl %eax, 0x1d0(%r14)
movl %eax, 0x88(%r14)
movabsq $0x90000000d, %rcx      # imm = 0x90000000D
movq %rcx, 0xac(%r14)
movl %eax, 0xb4(%r14)
xorl %eax, %eax
cmpq $0xa, %rax
je 0x8805c
movl $0xd, 0xc0(%r14,%rax,4)
incq %rax
jmp 0x88045
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x88074
movb $0x0, 0x400(%r14,%rax)
incq %rax
jmp 0x8805e
movb $0x22, 0x422(%r14)
movb $0x5c, 0x45c(%r14)
movb $0x2f, 0x42f(%r14)
movb $0x8, 0x462(%r14)
movw $0x7509, 0x474(%r14)    # imm = 0x7509
movb $0xa, 0x46e(%r14)
movb $0xc, 0x466(%r14)
movb $0xd, 0x472(%r14)
leaq 0x3a613(%rip), %rdx     # 0xc26d0
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x82a46
leaq 0x6a70f(%rip), %r13     # 0xf27e0
pushq $-0x1
popq %r14
pushq $-0x3
popq %r15
movq (%r13), %r12
testq %r12, %r12
je 0x8810f
movq %rbx, %rdi
movl %r14d, %esi
callq 0x78698
movq 0x8(%r13), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x78c17
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rdx
callq 0x78efa
addq $0x10, %r13
jmp 0x880d9
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x78478
movq %rbx, %rdi
xorl %esi, %esi
callq 0x78cca
leaq 0x285aa(%rip), %rdx     # 0xb06d7
movq %rbx, %rdi
movl %ebp, %esi
callq 0x78efa
leaq 0x32a79(%rip), %rsi     # 0xbabb7
pushq $0x5
popq %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x78a95
leaq 0x3a15e(%rip), %rdx     # 0xc22b2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x78efa
leaq 0x3a153(%rip), %rsi     # 0xc22b8
movq %rbx, %rdi
movq %r14, %rdx
callq 0x78a95
leaq 0x39790(%rip), %rdx     # 0xc1907
movq %rbx, %rdi
movl %ebp, %esi
callq 0x78efa
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq