// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0xa0ae1
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8a31b
movl $0x548, %esi            # imm = 0x548
movq %rbx, %rdi
callq 0x8aa06
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8a31b
leaq 0x17e3(%rip), %rsi      # 0x9bbd5
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8a159
leaq 0x39530(%rip), %rdx     # 0xd3933
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a43e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a563
movaps 0x3a18c(%rip), %xmm0    # 0xd45b0
movups %xmm0, 0x520(%r14)
movl $0x0, 0x530(%r14)
movabsq $0x3e800000001, %rax    # imm = 0x3E800000001
movq %rax, 0x53c(%r14)
movabsq $0x10000000e, %rax      # imm = 0x10000000E
movq %rax, 0x534(%r14)
leaq 0x500(%r14), %rdi
xorl %esi, %esi
callq 0xa0424
movl $0xc, (%r14,%r15,4)
incq %r15
cmpq $0x100, %r15            # imm = 0x100
jne 0x9a467
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)
xorl %eax, %eax
movl $0xd, 0xc0(%r14,%rax,4)
incq %rax
cmpq $0xa, %rax
jne 0x9a527
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 0x3a512(%rip), %rdx     # 0xd4aad
movq %rbx, %rdi
movl $0x1, %esi
callq 0x94a2c
leaq 0x650a1(%rip), %r15     # 0xff650
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x89ba4
movq -0x10(%r15), %r14
movq -0x8(%r15), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x8a159
movq %rbx, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
movq %r14, %rdx
callq 0x8a43e
cmpq $0x0, (%r15)
leaq 0x10(%r15), %r15
jne 0x9a5af
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x89976
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8a20a
leaq 0x2716c(%rip), %rdx     # 0xc1775
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a43e
leaq 0x326d2(%rip), %rsi     # 0xcccef
movl $0x5, %edx
movq %rbx, %rdi
callq 0x89fd4
leaq 0x3a061(%rip), %rdx     # 0xd4692
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a43e
leaq 0x3a053(%rip), %rsi     # 0xd4698
movl $0x5, %edx
movq %rbx, %rdi
callq 0x89fd4
leaq 0x396be(%rip), %rdx     # 0xd3d17
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8a43e
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq