// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_create_item_array
json_object *json_create_item_array(json_type_t type, void *values, int count)
{
    int i = 0;
    void *value = NULL;
    json_object *json = NULL, *node = NULL;

    if ((json = json_create_array()) == NULL) {
        JsonErr("create array failed!\n");
        return NULL;
    }

    for (i = 0; i < count; ++i) {
        switch (type) {
        case JSON_BOOL:   value = ((bool *)values) + i;         break;
        case JSON_INT:    value = ((int32_t *)values) + i;      break;
        case JSON_HEX:    value = ((uint32_t *)values) + i;     break;
        case JSON_LINT:   value = ((int64_t *)values) + i;      break;
        case JSON_LHEX:   value = ((uint64_t *)values) + i;     break;
        case JSON_DOUBLE: value = ((double *)values) + i;       break;
        case JSON_STRING: value = ((json_string_t *)values) + i;break;
        default:          JsonErr("not support json type.\n");  goto err;
        }

        if ((node = json_create_item(type, value)) == NULL) {
            JsonErr("create item failed!\n");
            goto err;
        }
        json_list_add_tail(&node->list, &json->value.head);
    }

    return json;
err:
    json_del_object(json);
    return NULL;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x3c(%rsp)
movq %rsi, 0x30(%rsp)
movl %edx, 0x2c(%rsp)
movl $0x0, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x2af0
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jne 0x293c
jmp 0x2906
leaq 0x10f2b(%rip), %rdi     # 0x13838
leaq 0x11014(%rip), %rsi     # 0x13928
movl $0x171, %edx            # imm = 0x171
movb $0x0, %al
callq 0x2100
leaq 0x10f33(%rip), %rdi     # 0x1385a
movb $0x0, %al
callq 0x2100
movq $0x0, 0x40(%rsp)
jmp 0x2add
movl $0x0, 0x28(%rsp)
movl 0x28(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x2abe
movl 0x3c(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x6, %eax
ja 0x2a2a
movq 0x8(%rsp), %rax
leaq 0x106b4(%rip), %rcx     # 0x13028
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
movq 0x30(%rsp), %rax
movslq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x2a56
jmp 0x2a2c
leaq 0x10e05(%rip), %rdi     # 0x13838
leaq 0x10eee(%rip), %rsi     # 0x13928
movl $0x17e, %edx            # imm = 0x17E
movb $0x0, %al
callq 0x2100
leaq 0x10e23(%rip), %rdi     # 0x13870
movb $0x0, %al
callq 0x2100
jmp 0x2aca
movl 0x3c(%rsp), %edi
movq 0x20(%rsp), %rsi
callq 0x22c0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
jne 0x2a9b
jmp 0x2a71
leaq 0x10dc0(%rip), %rdi     # 0x13838
leaq 0x10ea9(%rip), %rsi     # 0x13928
movl $0x182, %edx            # imm = 0x182
movb $0x0, %al
callq 0x2100
leaq 0x10df6(%rip), %rdi     # 0x13888
movb $0x0, %al
callq 0x2100
jmp 0x2aca
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x2b00
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x2944
movq 0x18(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x2add
movq 0x18(%rsp), %rdi
callq 0x22a0
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopw (%rax,%rax)