// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/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);

    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_ENCODE_MAX_DEPTH;
    cfg->decode_max_depth = DEFAULT_DECODE_MAX_DEPTH;
    cfg->encode_invalid_numbers = DEFAULT_ENCODE_INVALID_NUMBERS;
    cfg->decode_invalid_numbers = DEFAULT_DECODE_INVALID_NUMBERS;
    cfg->encode_keep_buffer = DEFAULT_ENCODE_KEEP_BUFFER;
    cfg->encode_number_precision = DEFAULT_ENCODE_NUMBER_PRECISION;

#if DEFAULT_ENCODE_KEEP_BUFFER > 0
    strbuf_init(&cfg->encode_buf, 0);
#endif

    /* 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 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x548, %esi            # imm = 0x548
callq 0xae860
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0xad9e0
movq -0x8(%rbp), %rdi
leaq 0x1daa(%rip), %rsi      # 0xcaf40
xorl %edx, %edx
callq 0xad5a0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x81696(%rip), %rdx     # 0x14a843
callq 0xadca0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xadee0
movq -0x10(%rbp), %rax
movl $0x0, 0x520(%rax)
movq -0x10(%rbp), %rax
movl $0x2, 0x524(%rax)
movq -0x10(%rbp), %rax
movl $0xa, 0x528(%rax)
movq -0x10(%rbp), %rax
movl $0x3e8, 0x52c(%rax)     # imm = 0x3E8
movq -0x10(%rbp), %rax
movl $0x3e8, 0x540(%rax)     # imm = 0x3E8
movq -0x10(%rbp), %rax
movl $0x0, 0x530(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x53c(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x538(%rax)
movq -0x10(%rbp), %rax
movl $0xe, 0x534(%rax)
movq -0x10(%rbp), %rdi
addq $0x500, %rdi            # imm = 0x500
xorl %esi, %esi
callq 0xd2990
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xc927a
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 0xc9257
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 0xc93b1
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 0xc938c
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0xc93dc
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 0xc93b8
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 %cs:(%rax,%rax)