// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_create_config
static void json_create_config(lua_State *l)
{
    json_config_t *cfg;
    int i;

    cfg = lua_newuserdata(l, sizeof(*cfg));

    /* Create GC method to clean up strbuf */
    lua_newtable(l);
    lua_pushcfunction(l, json_destroy_config);
    lua_setfield(l, -2, "__gc");
    lua_setmetatable(l, -2);

    strbuf_init(&cfg->encode_buf, 0);

    cfg->encode_sparse_convert = DEFAULT_SPARSE_CONVERT;
    cfg->encode_sparse_ratio = DEFAULT_SPARSE_RATIO;
    cfg->encode_sparse_safe = DEFAULT_SPARSE_SAFE;
    cfg->encode_max_depth = DEFAULT_MAX_DEPTH;
    cfg->encode_refuse_badnum = DEFAULT_ENCODE_REFUSE_BADNUM;
    cfg->decode_refuse_badnum = DEFAULT_DECODE_REFUSE_BADNUM;
    cfg->encode_keep_buffer = DEFAULT_ENCODE_KEEP_BUFFER;
    json_set_number_precision(cfg, 14);

    /* Decoding init */

    /* Tag all characters as an error */
    for (i = 0; i < 256; i++)
        cfg->ch2token[i] = T_ERROR;

    /* Set tokens that require no further processing */
    cfg->ch2token['{'] = T_OBJ_BEGIN;
    cfg->ch2token['}'] = T_OBJ_END;
    cfg->ch2token['['] = T_ARR_BEGIN;
    cfg->ch2token[']'] = T_ARR_END;
    cfg->ch2token[','] = T_COMMA;
    cfg->ch2token[':'] = T_COLON;
    cfg->ch2token['\0'] = T_END;
    cfg->ch2token[' '] = T_WHITESPACE;
    cfg->ch2token['\t'] = T_WHITESPACE;
    cfg->ch2token['\n'] = T_WHITESPACE;
    cfg->ch2token['\r'] = T_WHITESPACE;

    /* Update characters that require further processing */
    cfg->ch2token['f'] = T_UNKNOWN;     /* false? */
    cfg->ch2token['i'] = T_UNKNOWN;     /* inf, ininity? */
    cfg->ch2token['I'] = T_UNKNOWN;
    cfg->ch2token['n'] = T_UNKNOWN;     /* null, nan? */
    cfg->ch2token['N'] = T_UNKNOWN;
    cfg->ch2token['t'] = T_UNKNOWN;     /* true? */
    cfg->ch2token['"'] = T_UNKNOWN;     /* string? */
    cfg->ch2token['+'] = T_UNKNOWN;     /* number? */
    cfg->ch2token['-'] = T_UNKNOWN;
    for (i = 0; i < 10; i++)
        cfg->ch2token['0' + i] = T_UNKNOWN;

    /* Lookup table for parsing escape characters */
    for (i = 0; i < 256; i++)
        cfg->escape2char[i] = 0;          /* String error */
    cfg->escape2char['"'] = '"';
    cfg->escape2char['\\'] = '\\';
    cfg->escape2char['/'] = '/';
    cfg->escape2char['b'] = '\b';
    cfg->escape2char['t'] = '\t';
    cfg->escape2char['n'] = '\n';
    cfg->escape2char['f'] = '\f';
    cfg->escape2char['r'] = '\r';
    cfg->escape2char['u'] = 'u';          /* Unicode parsing required */


#if 0
    /* Initialise separate storage for pre-generated escape codes.
     * Escapes 0-31 map directly, 34, 92, 127 follow afterwards to
     * save memory. */
    for (i = 0 ; i < 32; i++)
        sprintf(cfg->escapes[i], "\\u%04x", i);
    strcpy(cfg->escapes[8], "\b");              /* Override simpler escapes */
    strcpy(cfg->escapes[9], "\t");
    strcpy(cfg->escapes[10], "\n");
    strcpy(cfg->escapes[12], "\f");
    strcpy(cfg->escapes[13], "\r");
    strcpy(cfg->escapes[32], "\\\"");           /* chr(34) */
    strcpy(cfg->escapes[33], "\\\\");           /* chr(92) */
    sprintf(cfg->escapes[34], "\\u%04x", 127);  /* char(127) */

    /* Initialise encoding escape lookup table */
    for (i = 0; i < 32; i++)
        cfg->char2escape[i] = cfg->escapes[i];
    for (i = 32; i < 256; i++)
        cfg->char2escape[i] = NULL;
    cfg->char2escape[34] = cfg->escapes[32];
    cfg->char2escape[92] = cfg->escapes[33];
    cfg->char2escape[127] = cfg->escapes[34];
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x550, %esi            # imm = 0x550
callq 0x8d9e0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x8cb60
movq -0x8(%rbp), %rdi
leaq 0x1c6a(%rip), %rsi      # 0xa9ec0
xorl %edx, %edx
callq 0x8c720
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x433d6(%rip), %rdx     # 0xeb643
callq 0x8ce20
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x8d060
movq -0x10(%rbp), %rdi
addq $0x500, %rdi            # imm = 0x500
xorl %esi, %esi
callq 0xb0ad0
movq -0x10(%rbp), %rax
movl $0x0, 0x52c(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x530(%rax)
movq -0x10(%rbp), %rax
movl $0xa, 0x534(%rax)
movq -0x10(%rbp), %rax
movl $0x14, 0x538(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x53c(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x540(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x544(%rax)
movq -0x10(%rbp), %rdi
movl $0xe, %esi
callq 0xa9da0
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xa832c
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl $0xc, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa8309
movq -0x10(%rbp), %rax
movl $0x0, 0x1ec(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x1f4(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x16c(%rax)
movq -0x10(%rbp), %rax
movl $0x3, 0x174(%rax)
movq -0x10(%rbp), %rax
movl $0x9, 0xb0(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0xe8(%rax)
movq -0x10(%rbp), %rax
movl $0xa, (%rax)
movq -0x10(%rbp), %rax
movl $0xb, 0x80(%rax)
movq -0x10(%rbp), %rax
movl $0xb, 0x24(%rax)
movq -0x10(%rbp), %rax
movl $0xb, 0x28(%rax)
movq -0x10(%rbp), %rax
movl $0xb, 0x34(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x198(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x1a4(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x124(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x1b8(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x138(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x1d0(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0x88(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0xac(%rax)
movq -0x10(%rbp), %rax
movl $0xd, 0xb4(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0xa, -0x14(%rbp)
jge 0xa8463
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x30, %ecx
movslq %ecx, %rcx
movl $0xd, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa843e
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xa848e
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movb $0x0, 0x400(%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xa846a
movq -0x10(%rbp), %rax
movb $0x22, 0x422(%rax)
movq -0x10(%rbp), %rax
movb $0x5c, 0x45c(%rax)
movq -0x10(%rbp), %rax
movb $0x2f, 0x42f(%rax)
movq -0x10(%rbp), %rax
movb $0x8, 0x462(%rax)
movq -0x10(%rbp), %rax
movb $0x9, 0x474(%rax)
movq -0x10(%rbp), %rax
movb $0xa, 0x46e(%rax)
movq -0x10(%rbp), %rax
movb $0xc, 0x466(%rax)
movq -0x10(%rbp), %rax
movb $0xd, 0x472(%rax)
movq -0x10(%rbp), %rax
movb $0x75, 0x475(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)