// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x9d625
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x86818
movl $0x548, %esi            # imm = 0x548
movq %rbx, %rdi
callq 0x86f0d
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x86818
leaq 0x1889(%rip), %rsi      # 0x9867f
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8664f
leaq 0x39c5c(%rip), %rdx     # 0xd0a63
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8693b
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x86a6e
movaps 0x3a8b8(%rip), %xmm0    # 0xd16e0
movups %xmm0, 0x520(%r14)
movl $0x3e8, 0x540(%r14) # imm = 0x3E8
movaps 0x3a8ae(%rip), %xmm0    # 0xd16f0
movups %xmm0, 0x530(%r14)
leaq 0x500(%r14), %rdi
xorl %esi, %esi
callq 0x9cf7c
movaps 0x3a8a1(%rip), %xmm0    # 0xd1700
movups %xmm0, (%r14,%r15,4)
addq $0x4, %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x96e5f
movl $0x0, 0x1ec(%r14)
movl $0x1, 0x1f4(%r14)
movl $0x2, 0x16c(%r14)
movl $0x3, 0x174(%r14)
movl $0x8, 0xe8(%r14)
movl $0xa, (%r14)
movl $0xb, %eax
movl %eax, 0x80(%r14)
movabsq $0xb0000000b, %rcx      # imm = 0xB0000000B
movq %rcx, 0x24(%r14)
movl %eax, 0x34(%r14)
movl $0xd, %eax
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)
movdqa 0x2513d(%rip), %xmm0    # 0xbc060
xorl %eax, %eax
movdqa 0x25143(%rip), %xmm1    # 0xbc070
movdqa 0x3a7db(%rip), %xmm2    # 0xd1710
pshufd $0xf5, %xmm2, %xmm3     # xmm3 = xmm2[1,1,3,3]
movdqa 0x29fde(%rip), %xmm4    # 0xc0f20
movdqa %xmm0, %xmm5
pxor %xmm1, %xmm5
movdqa %xmm2, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm3, %xmm5
pand %xmm6, %xmm5
movd %xmm5, %ecx
testb $0x1, %cl
je 0x96f74
movl $0xd, 0xc0(%r14,%rax,4)
pextrw $0x4, %xmm5, %ecx
testb $0x1, %cl
je 0x96f91
movq %rax, %rcx
orq $0x31, %rcx
shlq $0x2, %rcx
movl $0xd, (%r14,%rcx)
addq $0x2, %rax
paddq %xmm4, %xmm0
cmpq $0xa, %rax
jne 0x96f42
movq %r14, %rdi
addq $0x400, %rdi            # imm = 0x400
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x26110
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 0x3ac0f(%rip), %rdx     # 0xd1c0d
movq %rbx, %rdi
movl $0x1, %esi
callq 0x914b9
leaq 0x637de(%rip), %r15     # 0xfa7f0
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x8609a
movq -0x10(%r15), %r14
movq -0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x8664f
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
movq %r14, %rdx
callq 0x8693b
cmpq $0x0, (%r15)
leaq 0x10(%r15), %r15
jne 0x97012
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x85d59
movq %rbx, %rdi
xorl %esi, %esi
callq 0x86707
leaq 0x2777b(%rip), %rdx     # 0xbe7e7
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8693b
leaq 0x32d07(%rip), %rsi     # 0xc9d87
movl $0x5, %edx
movq %rbx, %rdi
callq 0x864ca
leaq 0x3a75e(%rip), %rdx     # 0xd17f2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8693b
leaq 0x3a750(%rip), %rsi     # 0xd17f8
movl $0x5, %edx
movq %rbx, %rdi
callq 0x864ca
leaq 0x39d8b(%rip), %rdx     # 0xd0e47
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8693b
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq