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

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

    for (i = 0; i < count; ++i) {
        switch (item_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");     return NULL;
        }

        if ((node = pjson_create_item(item_type, value, mem)) == NULL) {
            JsonErr("create item failed!\n");
            return NULL;
        }
        json_list_add_tail(&node->list, &json->value.head);
    }

    return json;
}

// Assembly:
subq $0x58, %rsp
movl %edi, 0x4c(%rsp)
movq %rsi, 0x40(%rsp)
movl %edx, 0x3c(%rsp)
movq %rcx, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq 0x30(%rsp), %rdi
callq 0x5650
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jne 0x5496
jmp 0x5460
leaq 0xe3d1(%rip), %rdi      # 0x13838
leaq 0xe4b9(%rip), %rsi      # 0x13927
movl $0x48f, %edx            # imm = 0x48F
movb $0x0, %al
callq 0x2100
leaq 0xe3d9(%rip), %rdi      # 0x1385a
movb $0x0, %al
callq 0x2100
movq $0x0, 0x50(%rsp)
jmp 0x563f
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cmpl 0x3c(%rsp), %eax
jge 0x5635
movl 0x4c(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x6, %eax
ja 0x5587
movq 0x8(%rsp), %rax
leaq 0xdcba(%rip), %rcx      # 0x13188
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
movq 0x40(%rsp), %rax
movslq 0x2c(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0x55bf
jmp 0x5589
leaq 0xe2a8(%rip), %rdi      # 0x13838
leaq 0xe390(%rip), %rsi      # 0x13927
movl $0x49c, %edx            # imm = 0x49C
movb $0x0, %al
callq 0x2100
leaq 0xe2c6(%rip), %rdi      # 0x13870
movb $0x0, %al
callq 0x2100
movq $0x0, 0x50(%rsp)
jmp 0x563f
movl 0x4c(%rsp), %edi
movq 0x20(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x21d0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
jne 0x5612
jmp 0x55df
leaq 0xe252(%rip), %rdi      # 0x13838
leaq 0xe33a(%rip), %rsi      # 0x13927
movl $0x4a0, %edx            # imm = 0x4A0
movb $0x0, %al
callq 0x2100
leaq 0xe288(%rip), %rdi      # 0x13888
movb $0x0, %al
callq 0x2100
movq $0x0, 0x50(%rsp)
jmp 0x563f
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
callq 0x2b00
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x549e
movq 0x18(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)