// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/deps/lua/src/lua_cjson.c
// Function: json_append_data
static void json_append_data(lua_State *l, json_config_t *cfg, strbuf_t *json)
{
    int len;

    switch (lua_type(l, -1)) {
    case LUA_TSTRING:
        json_append_string(l, json, -1);
        break;
    case LUA_TNUMBER:
        json_append_number(l, json, -1, cfg);
        break;
    case LUA_TBOOLEAN:
        if (lua_toboolean(l, -1))
            strbuf_append_mem(json, "true", 4);
        else
            strbuf_append_mem(json, "false", 5);
        break;
    case LUA_TTABLE:
        len = lua_array_length(l, cfg);
        if (len > 0)
            json_append_array(l, cfg, json, len);
        else
            json_append_object(l, cfg, json);
        break;
    case LUA_TNIL:
        strbuf_append_mem(json, "null", 4);
        break;
    case LUA_TLIGHTUSERDATA:
        if (lua_touserdata(l, -1) == NULL) {
            strbuf_append_mem(json, "null", 4);
            break;
        }
    default:
        /* Remaining types (LUA_TFUNCTION, LUA_TUSERDATA, LUA_TTHREAD,
         * and LUA_TLIGHTUSERDATA) cannot be serialised */
        json_encode_exception(l, cfg, -1, "type not supported");
        /* never returns */
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x662f0
cmpl $0x5, %eax
ja 0x772e2
movl %eax, %eax
leaq 0x2aebc(%rip), %rcx     # 0xa2128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x66508
movl 0xc(%rbx), %esi
movl %esi, %ecx
subl 0x8(%rbx), %ecx
testl %eax, %eax
je 0x7740f
cmpl $-0x4, %ecx
jl 0x772a2
addl $0x4, %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movl $0x65757274, (%rax,%rcx) # imm = 0x65757274
jmp 0x7732d
movq %r15, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7771a
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x66621
testq %rax, %rax
je 0x77307
leaq 0x2af28(%rip), %rcx     # 0xa2211
movq %r15, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7784e
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x4, %eax
jl 0x7731f
addl $0x4, %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movl $0x6c6c756e, (%rax,%rcx) # imm = 0x6C6C756E
addl $0x4, 0xc(%rbx)
jmp 0x7770b
movq %r15, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %r14, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x777ca
movq %r15, %rdi
callq 0x666bd
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x67058
testl %eax, %eax
je 0x7743b
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x662f0
cmpl $0x3, %eax
jne 0x773fa
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x664aa
ucomisd 0x2ad80(%rip), %xmm0    # 0xa2120
jne 0x773a4
jnp 0x773fa
movsd %xmm0, (%rsp)
callq 0x1fad0
movsd (%rsp), %xmm1
ucomisd 0x1fef5(%rip), %xmm1    # 0x972b0
jb 0x773fa
ucomisd %xmm1, %xmm0
jne 0x773fa
jp 0x773fa
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x773d8
cvttsd2si %xmm1, %r13d
incl %ebp
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x660a2
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x67058
testl %eax, %eax
jne 0x77379
jmp 0x77440
movq %r15, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x660a2
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x77489
cmpl $-0x5, %ecx
jl 0x7741f
addl $0x5, %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movb $0x65, 0x4(%rax,%rcx)
movl $0x736c6166, (%rax,%rcx) # imm = 0x736C6166
addl $0x5, 0xc(%rbx)
jmp 0x7770b
xorl %r13d, %r13d
xorl %ebp, %ebp
movl 0x530(%r14), %eax
testl %eax, %eax
jle 0x77489
imull %ebp, %eax
cmpl %eax, %r13d
jle 0x77489
cmpl 0x534(%r14), %r13d
jle 0x77489
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl $0x0, 0x52c(%r14)
jne 0x77489
leaq 0x2aea1(%rip), %rcx     # 0xa2314
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq %r15, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7784e
movq %r15, %rdi
movq %r14, %rsi
callq 0x778a1
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
testl %r13d, %r13d
jle 0x77571
cmpl $-0x1, %eax
jl 0x774b4
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x5b, (%rax,%rcx)
cmpl $0x2, %r13d
movl $0x1, %r12d
cmovll %r12d, %r13d
negl %r13d
movb $0x1, %al
testb $0x1, %al
jne 0x77504
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x774f3
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x2c, (%rax,%rcx)
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %r12d, %edx
callq 0x66a12
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x77240
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x660a2
leal (%r12,%r13), %ecx
incl %ecx
movl %r12d, %edx
incl %edx
xorl %eax, %eax
movl %edx, %r12d
cmpl $0x1, %ecx
jne 0x774d8
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x7755b
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x5d, (%rax,%rcx)
jmp 0x77704
cmpl $-0x1, %eax
jl 0x77580
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x7b, (%rax,%rcx)
movq %r15, %rdi
callq 0x666bd
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x67058
testl %eax, %eax
je 0x776dc
leaq 0x2ada1(%rip), %r12     # 0xa2356
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x662f0
cmpl $0x4, %eax
je 0x77636
cmpl $0x3, %eax
jne 0x77670
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x775e7
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x22, (%rax,%rcx)
movq %r15, %rdi
movq %rbx, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq %r14, %rcx
callq 0x777ca
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x2, %eax
jl 0x77623
addl $0x2, %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
movw $0x3a22, (%rax,%rcx)    # imm = 0x3A22
addl $0x2, 0xc(%rbx)
jmp 0x77683
movq %r15, %rdi
movq %rbx, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
callq 0x7771a
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x7765d
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x3a, (%rax,%rcx)
jmp 0x77683
movq %r15, %rdi
movq %r14, %rsi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq %r12, %rcx
callq 0x7784e
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x77240
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x660a2
movq %r15, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x67058
testl %eax, %eax
je 0x776dc
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x776c6
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x2c, (%rax,%rcx)
jmp 0x775b5
movl 0xc(%rbx), %esi
movl %esi, %eax
subl 0x8(%rbx), %eax
cmpl $-0x1, %eax
jl 0x776f3
incl %esi
movq %rbx, %rdi
callq 0x7bfe8
movq (%rbx), %rax
movslq 0xc(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0xc(%rbx)
movb $0x7d, (%rax,%rcx)
decl 0x528(%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq