LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_init_boolean
JSON_Value * json_value_init_boolean(int boolean) {
    JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value));
    if (!new_value) {
        return NULL;
    }
    new_value->parent = NULL;
    new_value->type = JSONBoolean;
    new_value->value.boolean = boolean ? 1 : 0;
    return new_value;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
pushq $0x18
popq %rdi
callq *0x63b8(%rip)           # 0x9180
testq %rax, %rax
je 0x2de2
andq $0x0, (%rax)
movl $0x6, 0x8(%rax)
xorl %ecx, %ecx
testl %ebx, %ebx
setne %cl
movl %ecx, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_init_null
JSON_Value * json_value_init_null(void) {
    JSON_Value *new_value = (JSON_Value*)parson_malloc(sizeof(JSON_Value));
    if (!new_value) {
        return NULL;
    }
    new_value->parent = NULL;
    new_value->type = JSONNull;
    return new_value;
}

// Assembly:
pushq %rax
pushq $0x18
popq %rdi
callq *0x6392(%rip)           # 0x9180
testq %rax, %rax
je 0x2dfe
andq $0x0, (%rax)
movl $0x1, 0x8(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_add
static JSON_Status json_array_add(JSON_Array *array, JSON_Value *value) {
    if (array->count >= array->capacity) {
        size_t new_capacity = MAX(array->capacity * 2, STARTING_CAPACITY);
        if (new_capacity > ARRAY_MAX_CAPACITY) {
            return JSONFailure;
        }
        if (json_array_resize(array, new_capacity) == JSONFailure) {
            return JSONFailure;
        }
    }
    value->parent = json_array_get_wrapping_value(array);
    array->items[array->count] = value;
    array->count++;
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
cmpq %rcx, %rax
jb 0x3007
addq %rcx, %rcx
pushq $-0x1
popq %rbp
cmpq $0x1e000, %rcx          # imm = 0x1E000
ja 0x301e
cmpq $0x10, %rcx
pushq $0xf
popq %rsi
cmovaeq %rcx, %rsi
movq %rbx, %rdi
callq 0x4944
cmpl $-0x1, %eax
je 0x301e
movq 0x10(%rbx), %rax
movq (%rbx), %rcx
movq %rcx, (%r14)
movq 0x8(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
incq %rax
movq %rax, 0x10(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_add
static JSON_Status json_object_add(JSON_Object *object, const char *name, JSON_Value *value) {
    size_t index = 0;
    if (object == NULL || name == NULL || value == NULL) {
        return JSONFailure;
    }
    if (json_object_get_value(object, name) != NULL) {
        return JSONFailure;
    }
    if (object->count >= object->capacity) {
        size_t new_capacity = MAX(object->capacity * 2, STARTING_CAPACITY);
        if (new_capacity > OBJECT_MAX_CAPACITY) {
            return JSONFailure;
        }
        if (json_object_resize(object, new_capacity) == JSONFailure) {
            return JSONFailure;
        }
    }
    index = object->count;
    object->names[index] = parson_strdup(name);
    if (object->names[index] == NULL) {
        return JSONFailure;
    }
    value->parent = json_object_get_wrapping_value(object);
    object->values[index] = value;
    object->count++;
    return JSONSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
pushq $-0x1
popq %rbx
jne 0x3054
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
callq 0x25cc
testq %rax, %rax
je 0x3060
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x18(%r15), %r13
movq 0x20(%r15), %rax
cmpq %rax, %r13
jb 0x3094
addq %rax, %rax
cmpq $0x3c0, %rax            # imm = 0x3C0
ja 0x3054
cmpq $0x10, %rax
pushq $0xf
popq %rsi
cmovaeq %rax, %rsi
movq %r15, %rdi
callq 0x477b
cmpl $-0x1, %eax
je 0x3054
movq 0x18(%r15), %r13
movq %r12, %rdi
callq 0x24b3
movq 0x8(%r15), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x8(%r15), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x3054
movq (%r15), %rax
movq %rax, (%r14)
movq 0x10(%r15), %rax
movq %r14, (%rax,%r13,8)
incq 0x18(%r15)
xorl %ebx, %ebx
jmp 0x3054
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_buffer
JSON_Status json_serialize_to_buffer(const JSON_Value *value, char *buf, size_t buf_size_in_bytes) {
    int written = -1;
    size_t needed_size_in_bytes = json_serialization_size(value);
    if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) {
        return JSONFailure;
    }
    written = json_serialize_to_buffer_r(value, buf, 0, 0, NULL);
    if (written < 0) {
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x30c5
decq %rax
cmpq %r15, %rax
jae 0x36ba
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x30f1
sarl $0x1f, %eax
jmp 0x36bd
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_file
JSON_Status json_serialize_to_file(const JSON_Value *value, const char *filename) {
    JSON_Status return_code = JSONSuccess;
    FILE *fp = NULL;
    char *serialized_string = json_serialize_to_string(value);
    if (serialized_string == NULL) {
        return JSONFailure;
    }
    fp = fopen (filename, "w");
    if (fp == NULL) {
        json_free_serialized_string(serialized_string);
        return JSONFailure;
    }
    if (fputs(serialized_string, fp) == EOF) {
        return_code = JSONFailure;
    }
    if (fclose(fp) == EOF) {
        return_code = JSONFailure;
    }
    json_free_serialized_string(serialized_string);
    return return_code;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x3730
testq %rax, %rax
je 0x3718
movq %rax, %rbx
leaq 0x1dd3(%rip), %rsi      # 0x54b1
movq %r14, %rdi
callq 0x1280
testq %rax, %rax
je 0x371d
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1190
cmpl $-0x1, %eax
sete %bpl
movq %r14, %rdi
callq 0x10f0
cmpl $-0x1, %eax
sete %al
orb %bpl, %al
movzbl %al, %ebp
negl %ebp
jmp 0x3720
pushq $-0x1
popq %rbp
jmp 0x3729
pushq $-0x1
popq %rbp
movq %rbx, %rdi
callq *0x5a4f(%rip)           # 0x9178
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_string
char * json_serialize_to_string(const JSON_Value *value) {
    JSON_Status serialization_result = JSONFailure;
    size_t buf_size_bytes = json_serialization_size(value);
    char *buf = NULL;
    if (buf_size_bytes == 0) {
        return NULL;
    }
    buf = (char*)parson_malloc(buf_size_bytes);
    if (buf == NULL) {
        return NULL;
    }
    serialization_result = json_serialize_to_buffer(value, buf, buf_size_bytes);
    if (serialization_result == JSONFailure) {
        json_free_serialized_string(buf);
        return NULL;
    }
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x30c5
testq %rax, %rax
je 0x3772
movq %rax, %r15
movq %rax, %rdi
callq *0x5a32(%rip)           # 0x9180
testq %rax, %rax
je 0x3772
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x3688
cmpl $-0x1, %eax
jne 0x3774
movq %rbx, %rdi
callq *0x5a06(%rip)           # 0x9178
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_buffer_pretty
JSON_Status json_serialize_to_buffer_pretty(const JSON_Value *value, char *buf, size_t buf_size_in_bytes) {
    int written = -1;
    size_t needed_size_in_bytes = json_serialization_size_pretty(value);
    if (needed_size_in_bytes == 0 || buf_size_in_bytes < needed_size_in_bytes) {
        return JSONFailure;
    }
    written = json_serialize_to_buffer_r(value, buf, 0, 1, NULL);
    if (written < 0) {
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x3783
decq %rax
cmpq %r15, %rax
jae 0x37e3
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x30f1
sarl $0x1f, %eax
jmp 0x37e6
pushq $-0x1
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_file_pretty
JSON_Status json_serialize_to_file_pretty(const JSON_Value *value, const char *filename) {
    JSON_Status return_code = JSONSuccess;
    FILE *fp = NULL;
    char *serialized_string = json_serialize_to_string_pretty(value);
    if (serialized_string == NULL) {
        return JSONFailure;
    }
    fp = fopen (filename, "w");
    if (fp == NULL) {
        json_free_serialized_string(serialized_string);
        return JSONFailure;
    }
    if (fputs(serialized_string, fp) == EOF) {
        return_code = JSONFailure;
    }
    if (fclose(fp) == EOF) {
        return_code = JSONFailure;
    }
    json_free_serialized_string(serialized_string);
    return return_code;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
callq 0x3859
testq %rax, %rax
je 0x3841
movq %rax, %rbx
leaq 0x1caa(%rip), %rsi      # 0x54b1
movq %r14, %rdi
callq 0x1280
testq %rax, %rax
je 0x3846
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1190
cmpl $-0x1, %eax
sete %bpl
movq %r14, %rdi
callq 0x10f0
cmpl $-0x1, %eax
sete %al
orb %bpl, %al
movzbl %al, %ebp
negl %ebp
jmp 0x3849
pushq $-0x1
popq %rbp
jmp 0x3852
pushq $-0x1
popq %rbp
movq %rbx, %rdi
callq *0x5926(%rip)           # 0x9178
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_serialize_to_string_pretty
char * json_serialize_to_string_pretty(const JSON_Value *value) {
    JSON_Status serialization_result = JSONFailure;
    size_t buf_size_bytes = json_serialization_size_pretty(value);
    char *buf = NULL;
    if (buf_size_bytes == 0) {
        return NULL;
    }
    buf = (char*)parson_malloc(buf_size_bytes);
    if (buf == NULL) {
        return NULL;
    }
    serialization_result = json_serialize_to_buffer_pretty(value, buf, buf_size_bytes);
    if (serialization_result == JSONFailure) {
        json_free_serialized_string(buf);
        return NULL;
    }
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x3783
testq %rax, %rax
je 0x389b
movq %rax, %r15
movq %rax, %rdi
callq *0x5909(%rip)           # 0x9180
testq %rax, %rax
je 0x389b
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x37b0
cmpl $-0x1, %eax
jne 0x389d
movq %rbx, %rdi
callq *0x58dd(%rip)           # 0x9178
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_remove
JSON_Status json_array_remove(JSON_Array *array, size_t ix) {
    size_t to_move_bytes = 0;
    if (array == NULL || ix >= json_array_get_count(array)) {
        return JSONFailure;
    }
    json_value_free(json_array_get_value(array, ix));
    to_move_bytes = (json_array_get_count(array) - 1 - ix) * sizeof(JSON_Value**);
    memmove(array->items + ix, array->items + ix + 1, to_move_bytes);
    array->count -= 1;
    return JSONSuccess;
}

// Assembly:
pushq $-0x1
popq %rax
testq %rdi, %rdi
je 0x38fb
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, 0x10(%rdi)
jbe 0x38f4
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x29e6
movq %r14, %rdx
notq %rdx
addq 0x10(%rbx), %rdx
shlq $0x3, %rdx
movq 0x8(%rbx), %rax
leaq (%rax,%r14,8), %rdi
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
callq 0x1250
decq 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_replace_value
JSON_Status json_array_replace_value(JSON_Array *array, size_t ix, JSON_Value *value) {
    if (array == NULL || value == NULL || value->parent != NULL || ix >= json_array_get_count(array)) {
        return JSONFailure;
    }
    json_value_free(json_array_get_value(array, ix));
    value->parent = json_array_get_wrapping_value(array);
    array->items[ix] = value;
    return JSONSuccess;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
pushq $-0x1
popq %rax
jne 0x394b
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
cmpq $0x0, (%rdx)
jne 0x3946
movq %rsi, %r14
movq %rdi, %r15
cmpq %rsi, 0x10(%rdi)
jbe 0x3946
movq 0x8(%r15), %rax
movq (%rax,%r14,8), %rdi
callq 0x29e6
movq (%r15), %rax
movq %rax, (%rbx)
movq 0x8(%r15), %rax
movq %rbx, (%rax,%r14,8)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_replace_string
JSON_Status json_array_replace_string(JSON_Array *array, size_t i, const char* string) {
    JSON_Value *value = json_value_init_string(string);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_replace_value(array, i, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2b30
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x398b
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x38fc
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x398d
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_replace_number
JSON_Status json_array_replace_number(JSON_Array *array, size_t i, double number) {
    JSON_Value *value = json_value_init_number(number);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_replace_value(array, i, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x2d91
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x39d4
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x38fc
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x39d6
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_replace_boolean
JSON_Status json_array_replace_boolean(JSON_Array *array, size_t i, int boolean) {
    JSON_Value *value = json_value_init_boolean(boolean);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_replace_value(array, i, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %edi
callq 0x2dbc
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3a1f
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x38fc
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3a21
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_replace_null
JSON_Status json_array_replace_null(JSON_Array *array, size_t i) {
    JSON_Value *value = json_value_init_null();
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_replace_value(array, i, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x2de4
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3a68
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x38fc
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3a6a
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_clear
JSON_Status json_array_clear(JSON_Array *array) {
    size_t i = 0;
    if (array == NULL) {
        return JSONFailure;
    }
    for (i = 0; i < json_array_get_count(array); i++) {
        json_value_free(json_array_get_value(array, i));
    }
    array->count = 0;
    return JSONSuccess;
}

// Assembly:
testq %rdi, %rdi
je 0x3aab
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq 0x10(%rbx), %r14
jae 0x3a9c
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x29e6
incq %r14
jmp 0x3a84
andq $0x0, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_append_string
JSON_Status json_array_append_string(JSON_Array *array, const char *string) {
    JSON_Value *value = json_value_init_string(string);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_append_value(array, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x2b30
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3b03
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3aaf
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3b05
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_append_number
JSON_Status json_array_append_number(JSON_Array *array, double number) {
    JSON_Value *value = json_value_init_number(number);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_append_value(array, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x2d91
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3b3d
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3aaf
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3b3f
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_append_boolean
JSON_Status json_array_append_boolean(JSON_Array *array, int boolean) {
    JSON_Value *value = json_value_init_boolean(boolean);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_append_value(array, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl %esi, %edi
callq 0x2dbc
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3b79
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3aaf
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3b7b
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_append_null
JSON_Status json_array_append_null(JSON_Array *array) {
    JSON_Value *value = json_value_init_null();
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_array_append_value(array, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x2de4
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3bb3
movq %rax, %rbx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3aaf
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3bb5
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_set_value
JSON_Status json_object_set_value(JSON_Object *object, const char *name, JSON_Value *value) {
    size_t i = 0;
    JSON_Value *old_value;
    if (object == NULL || name == NULL || value == NULL || value->parent != NULL) {
        return JSONFailure;
    }
    old_value = json_object_get_value(object, name);
    if (old_value != NULL) { /* free and overwrite old value */
        json_value_free(old_value);
        for (i = 0; i < json_object_get_count(object); i++) {
            if (strcmp(object->names[i], name) == 0) {
                value->parent = json_object_get_wrapping_value(object);
                object->values[i] = value;
                return JSONSuccess;
            }
        }
    }
    /* add new key value pair */
    return json_object_add(object, name, value);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
pushq $-0x1
popq %rax
jne 0x3be7
movq %rdx, %rbx
cmpq $0x0, (%rdx)
je 0x3bf1
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rsi, %r15
movq %rdi, %r14
callq 0x25cc
testq %rax, %rax
je 0x3c2e
movq %rax, %rdi
callq 0x29e6
movq 0x18(%r14), %r13
xorl %r12d, %r12d
cmpq %r12, %r13
je 0x3c2e
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %r15, %rsi
callq 0x11d0
testl %eax, %eax
je 0x3c45
incq %r12
jmp 0x3c10
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x3025
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x10(%r14), %rax
movq %rbx, (%rax,%r12,8)
xorl %eax, %eax
jmp 0x3be7
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotset_value
JSON_Status json_object_dotset_value(JSON_Object *object, const char *name, JSON_Value *value) {
    const char *dot_pos = NULL;
    char *current_name = NULL;
    JSON_Object *temp_obj = NULL;
    JSON_Value *new_value = NULL;
    if (value == NULL || name == NULL || value == NULL) {
        return JSONFailure;
    }
    dot_pos = strchr(name, '.');
    if (dot_pos == NULL) {
        return json_object_set_value(object, name, value);
    } else {
        current_name = parson_strndup(name, dot_pos - name);
        temp_obj = json_object_get_object(object, current_name);
        if (temp_obj == NULL) {
            new_value = json_value_init_object();
            if (new_value == NULL) {
                parson_free(current_name);
                return JSONFailure;
            }
            if (json_object_add(object, current_name, new_value) == JSONFailure) {
                json_value_free(new_value);
                parson_free(current_name);
                return JSONFailure;
            }
            temp_obj = json_object_get_object(object, current_name);
        }
        parson_free(current_name);
        return json_object_dotset_value(temp_obj, dot_pos + 1, value);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdx, %rdx
je 0x3dbd
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
pushq $0x2e
popq %rbp
testq %r12, %r12
je 0x3dbd
movq %r12, %rdi
movl %ebp, %esi
callq 0x1120
testq %rax, %rax
je 0x3d90
movq %rax, %r15
movq %rax, %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x2d34
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x26d0
movq %rax, %r13
testq %rax, %rax
jne 0x3d79
callq 0x2a87
testq %rax, %rax
je 0x3db4
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x3025
cmpl $-0x1, %eax
je 0x3dac
movq %r14, %rdi
movq %r12, %rsi
callq 0x26d0
movq %rax, %r13
movq %r12, %rdi
callq *0x53f6(%rip)           # 0x9178
incq %r15
movq %r13, %r14
movq %r15, %r12
jmp 0x3d0c
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3bba
movq %r13, %rdi
callq 0x29e6
movq %r12, %rdi
callq *0x53bb(%rip)           # 0x9178
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotset_string
JSON_Status json_object_dotset_string(JSON_Object *object, const char *name, const char *string) {
    JSON_Value *value = json_value_init_string(string);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_object_dotset_value(object, name, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2b30
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3e0e
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3cec
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3e10
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotset_number
JSON_Status json_object_dotset_number(JSON_Object *object, const char *name, double number) {
    JSON_Value *value = json_value_init_number(number);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_object_dotset_value(object, name, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x2d91
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3e57
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3cec
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3e59
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotset_boolean
JSON_Status json_object_dotset_boolean(JSON_Object *object, const char *name, int boolean) {
    JSON_Value *value = json_value_init_boolean(boolean);
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_object_dotset_value(object, name, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %edi
callq 0x2dbc
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3ea2
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3cec
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3ea4
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotset_null
JSON_Status json_object_dotset_null(JSON_Object *object, const char *name) {
    JSON_Value *value = json_value_init_null();
    if (value == NULL) {
        return JSONFailure;
    }
    if (json_object_dotset_value(object, name, value) == JSONFailure) {
        json_value_free(value);
        return JSONFailure;
    }
    return JSONSuccess;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x2de4
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x3eeb
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x3cec
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x3eed
movq %rbx, %rdi
callq 0x29e6
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_remove
JSON_Status json_object_remove(JSON_Object *object, const char *name) {
    size_t i = 0, last_item_index = 0;
    if (object == NULL || json_object_get_value(object, name) == NULL) {
        return JSONFailure;
    }
    last_item_index = json_object_get_count(object) - 1;
    for (i = 0; i < json_object_get_count(object); i++) {
        if (strcmp(object->names[i], name) == 0) {
            parson_free(object->names[i]);
            json_value_free(object->values[i]);
            if (i != last_item_index) { /* Replace key value pair with one from the end */
                object->names[i] = object->names[last_item_index];
                object->values[i] = object->values[last_item_index];
            }
            object->count -= 1;
            return JSONSuccess;
        }
    }
    return JSONFailure; /* No execution path should end here */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbp
testq %rdi, %rdi
je 0x3f83
movq %rsi, %r14
movq %rdi, %rbx
callq 0x25cc
testq %rax, %rax
je 0x3f83
movq 0x18(%rbx), %r12
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x3f83
movq 0x8(%rbx), %rax
movq (%rax,%r13,8), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x11d0
testl %eax, %eax
je 0x3f43
incq %r13
jmp 0x3f22
movq %r15, %rdi
callq *0x522c(%rip)           # 0x9178
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x29e6
leaq -0x1(%r12), %rax
cmpq %r13, %rax
je 0x3f7d
movq 0x8(%rbx), %rax
movq -0x8(%rax,%r12,8), %rcx
movq %rcx, (%rax,%r13,8)
movq 0x10(%rbx), %rax
movq -0x8(%rax,%r12,8), %rcx
movq %rcx, (%rax,%r13,8)
decq 0x18(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_dotremove
JSON_Status json_object_dotremove(JSON_Object *object, const char *name) {
    const char *dot_pos = strchr(name, '.');
    char *current_name = NULL;
    JSON_Object *temp_obj = NULL;
    if (dot_pos == NULL) {
        return json_object_remove(object, name);
    } else {
        current_name = parson_strndup(name, dot_pos - name);
        temp_obj = json_object_get_object(object, current_name);
        parson_free(current_name);
        if (temp_obj == NULL) {
            return JSONFailure;
        }
        return json_object_dotremove(temp_obj, dot_pos + 1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
pushq $0x2e
popq %rbx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1120
testq %rax, %rax
je 0x3ff9
movq %rax, %r15
movq %rax, %rsi
subq %r12, %rsi
movq %r12, %rdi
callq 0x2d34
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0x26d0
movq %rax, %r14
movq %r12, %rdi
callq *0x5199(%rip)           # 0x9178
incq %r15
movq %r15, %r12
testq %r14, %r14
jne 0x3fa5
pushq $-0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %r12, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3ef8
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_clear
JSON_Status json_object_clear(JSON_Object *object) {
    size_t i = 0;
    if (object == NULL) {
        return JSONFailure;
    }
    for (i = 0; i < json_object_get_count(object); i++) {
        parson_free(object->names[i]);
        json_value_free(object->values[i]);
    }
    object->count = 0;
    return JSONSuccess;
}

// Assembly:
testq %rdi, %rdi
je 0x4053
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq 0x18(%rbx), %r14
jae 0x4044
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq *0x5146(%rip)           # 0x9178
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x29e6
incq %r14
jmp 0x401e
andq $0x0, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_object_resize
static JSON_Status json_object_resize(JSON_Object *object, size_t new_capacity) {
    char **temp_names = NULL;
    JSON_Value **temp_values = NULL;

    if ((object->names == NULL && object->values != NULL) ||
        (object->names != NULL && object->values == NULL) ||
        new_capacity == 0) {
            return JSONFailure; /* Shouldn't happen */
    }
    temp_names = (char**)parson_malloc(new_capacity * sizeof(char*));
    if (temp_names == NULL) {
        return JSONFailure;
    }
    temp_values = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*));
    if (temp_values == NULL) {
        parson_free(temp_names);
        return JSONFailure;
    }
    if (object->names != NULL && object->values != NULL && object->count > 0) {
        memcpy(temp_names, object->names, object->count * sizeof(char*));
        memcpy(temp_values, object->values, object->count * sizeof(JSON_Value*));
    }
    parson_free(object->names);
    parson_free(object->values);
    object->names = temp_names;
    object->values = temp_values;
    object->capacity = new_capacity;
    return JSONSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpq $0x0, 0x8(%rdi)
movq 0x10(%rdi), %rax
pushq $-0x1
popq %rbx
je 0x47a6
testq %r14, %r14
sete %cl
testq %rax, %rax
sete %al
jmp 0x47b2
testq %r14, %r14
sete %cl
testq %rax, %rax
setne %al
orb %cl, %al
jne 0x4855
leaq (,%r14,8), %r13
movq %r13, %rdi
callq *0x49b5(%rip)           # 0x9180
testq %rax, %rax
je 0x4855
movq %rax, %r12
movq %r13, %rdi
callq *0x49a0(%rip)           # 0x9180
testq %rax, %rax
je 0x4829
movq %rax, %r13
movq 0x8(%r15), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x4834
cmpq $0x0, 0x10(%r15)
je 0x4836
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x4836
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x1210
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0x1210
movq 0x8(%r15), %rsi
jmp 0x4836
movq %r12, %rdi
callq *0x4946(%rip)           # 0x9178
jmp 0x4855
xorl %esi, %esi
movq %rsi, %rdi
callq *0x4939(%rip)           # 0x9178
movq 0x10(%r15), %rdi
callq *0x492f(%rip)           # 0x9178
movq %r12, 0x8(%r15)
movq %r13, 0x10(%r15)
movq %r14, 0x20(%r15)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: parse_utf16_hex
static int parse_utf16_hex(const char *s, unsigned int *result) {
    int x1, x2, x3, x4;
    if (s[0] == '\0' || s[1] == '\0' || s[2] == '\0' || s[3] == '\0') {
        return 0;
    }
    x1 = hex_char_to_int(s[0]);
    x2 = hex_char_to_int(s[1]);
    x3 = hex_char_to_int(s[2]);
    x4 = hex_char_to_int(s[3]);
    if (x1 == -1 || x2 == -1 || x3 == -1 || x4 == -1) {
        return 0;
    }
    *result = (unsigned int)((x1 << 12) | (x2 << 8) | (x3 << 4) | x4);
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb (%rdi), %al
xorl %ebp, %ebp
testb %al, %al
je 0x4907
movb 0x1(%rdi), %r15b
testb %r15b, %r15b
je 0x4907
movb 0x2(%rdi), %r12b
testb %r12b, %r12b
je 0x4907
movb 0x3(%rdi), %r13b
testb %r13b, %r13b
je 0x4907
movq %rsi, %rbx
movsbl %al, %edi
callq 0x4918
movl %eax, %r14d
movsbl %r15b, %edi
callq 0x4918
movl %eax, %r15d
movsbl %r12b, %edi
callq 0x4918
movl %eax, %r12d
movsbl %r13b, %edi
callq 0x4918
cmpl $-0x1, %r14d
sete %cl
cmpl $-0x1, %r15d
sete %dl
orb %cl, %dl
cmpl $-0x1, %r12d
sete %cl
cmpl $-0x1, %eax
sete %sil
orb %cl, %sil
orb %dl, %sil
jne 0x4907
shll $0xc, %r14d
shll $0x8, %r15d
orl %r14d, %r15d
shll $0x4, %r12d
orl %eax, %r12d
orl %r15d, %r12d
movl %r12d, (%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: hex_char_to_int
static int hex_char_to_int(char c) {
    if (c >= '0' && c <= '9') {
        return c - '0';
    } else if (c >= 'a' && c <= 'f') {
        return c - 'a' + 10;
    } else if (c >= 'A' && c <= 'F') {
        return c - 'A' + 10;
    }
    return -1;
}

// Assembly:
movl %edi, %eax
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x4926
addl $-0x30, %eax
retq
leal -0x61(%rax), %ecx
cmpb $0x5, %cl
ja 0x4932
addl $-0x57, %eax
retq
leal -0x41(%rax), %ecx
addl $-0x37, %eax
cmpb $0x6, %cl
pushq $-0x1
popq %rcx
cmovbl %eax, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_array_resize
static JSON_Status json_array_resize(JSON_Array *array, size_t new_capacity) {
    JSON_Value **new_items = NULL;
    if (new_capacity == 0) {
        return JSONFailure;
    }
    new_items = (JSON_Value**)parson_malloc(new_capacity * sizeof(JSON_Value*));
    if (new_items == NULL) {
        return JSONFailure;
    }
    if (array->items != NULL && array->count > 0) {
        memcpy(new_items, array->items, array->count * sizeof(JSON_Value*));
    }
    parson_free(array->items);
    array->items = new_items;
    array->capacity = new_capacity;
    return JSONSuccess;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x1
popq %rbx
testq %rsi, %rsi
je 0x49a9
movq %rsi, %r14
movq %rdi, %r15
leaq (,%rsi,8), %rdi
callq *0x4818(%rip)           # 0x9180
testq %rax, %rax
je 0x49a9
movq %rax, %r12
movq 0x8(%r15), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x4996
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x4998
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x1210
movq 0x8(%r15), %rsi
jmp 0x4998
xorl %esi, %esi
movq %rsi, %rdi
callq *0x47d7(%rip)           # 0x9178
movq %r12, 0x8(%r15)
movq %r14, 0x18(%r15)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: append_indent
static int append_indent(char *buf, int level) {
    int i;
    int written = -1, written_total = 0;
    for (i = 0; i < level; i++) {
        APPEND_STRING("    ");
    }
    return written_total;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %ebp
leaq 0xade(%rip), %r15       # 0x54cd
pushq $-0x1
popq %r12
subl $0x1, %ebp
jb 0x4a1a
movq %r14, %rdi
movq %r15, %rsi
callq 0x49b7
testl %eax, %eax
js 0x4a17
movl %eax, %ecx
addq %r14, %rcx
testq %r14, %r14
cmovneq %rcx, %r14
addl %eax, %ebx
jmp 0x49f3
movl %r12d, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/crc64.c
// Function: crc64
uint64_t crc64(uint8_t type, void *str, size_t len){
	uint64_t crc = crctab64[type];
	uint8_t *p = (uint8_t*)str;

	while (len--)
		crc = crctab64[(crc ^ *(p++)) & 0xff] ^ (crc >> 8);
	return crc;
}

// Assembly:
movl %edi, %eax
leaq 0x2a7b(%rip), %rcx      # 0x5010
movq (%rcx,%rax,8), %rax
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x25b8
movb (%rsi,%rdi), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrq $0x8, %rax
xorq (%rcx,%r8,8), %rax
incq %rdi
jmp 0x259b
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdict_close
void hdict_close(hdict_t *hdict)
{
    if (hdict->fd > 0) close(hdict->fd);
    if (hdict->idx) free(hdict->idx);
    if (hdict->hdict_meta) free(hdict->hdict_meta);
    free(hdict->path);
    free(hdict);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x38(%rdi), %edi
testl %edi, %edi
jle 0x2861
callq 0x2190
movq 0x30(%rbx), %rdi
callq 0x2030
movq 0x58(%rbx), %rdi
callq 0x2030
movq 0x20(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdict_seek
int hdict_seek(hdict_t *hdict, const char* str_key, off_t *off, uint32_t *length)
{
    uint32_t low = 0;
    uint32_t high = hdict->idx_num;
    uint32_t mid;
    int hit = 0;
    int count = 0;
    uint64_t key = strtoull(str_key, NULL, 10);
    while (low < high) {
        ++count;
        mid = (low + high) / 2;
        if (hdict->idx[mid].key > key) {
            high = mid;
        } else if (hdict->idx[mid].key < key) {
            low = mid + 1;
        } else {
            *off = (hdict->idx[mid].pos & 0xFFFFFFFFFF);
            *length = (hdict->idx[mid].pos >> 40);
            hit = 1;
            break;
        }
    }
    return hit;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movl 0x28(%rdi), %r12d
xorl %r13d, %r13d
pushq $0xa
popq %rdx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x21f0
cmpl %r12d, %r13d
jae 0x28d9
leal (%r12,%r13), %ecx
shrl %ecx
movq 0x30(%r15), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
leaq (%rdx,%rsi), %rdi
cmpq %rax, (%rdx,%rsi)
ja 0x28d4
jae 0x28dd
incl %ecx
movl %ecx, %r13d
jmp 0x28ab
movl %ecx, %r12d
jmp 0x28ab
xorl %eax, %eax
jmp 0x28fc
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq 0x8(%rdi), %rax
movq %rax, (%r14)
movq 0x8(%rdx,%rsi), %rax
shrq $0x28, %rax
movl %eax, (%rbx)
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdict_seek_v2
int hdict_seek_v2(hdict_t *hdict, const char* str_key, off_t *off, uint32_t *length){
    uint32_t low = -1;
    uint32_t high = hdict->idx_num;
    uint32_t mid;
    int hit = 0;
    int count = 0;
    char buf[DATA_BUFFER_SIZE];
    uint64_t key = bkdr_hash(str_key);
    while (low + 1 != high) {
        ++count;
        mid = (low + high) / 2;
        if (key > hdict->idx[mid].key) {
            low = mid;
        } else {
            high = mid;
        } 
    }
     
    if(high >= hdict->idx_num || hdict->idx[high].key != key){
        return hit;
    }
    size_t len = strlen(str_key);
    while(high < hdict->idx_num){
        *off = (hdict->idx[high].pos & 0xFFFFFFFFFF);
        *length = (hdict->idx[high].pos >> 40);
        //compare the string key
        int res = hdict_read(hdict, buf, *length, *off);
        if (res != *length){
            return hit;
        }
        if (res > len && strncmp(buf, str_key, len) == 0 && buf[len] == ':'){
            *off = *off + len + 1;
            *length = *length - len - 1;
            hit = 1;
            return hit;
        }
        high++;
        if(hdict->idx[high].key != key){
            return hit;
        }
    }
    return hit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rdi, %r12
movl 0x28(%rdi), %ebx
movq %rsi, (%rsp)
movq %rsi, %rdi
callq 0x3ef0
movq %rax, %r13
pushq $-0x1
popq %rax
leal 0x1(%rax), %ecx
cmpl %ebx, %ecx
je 0x295f
leal (%rax,%rbx), %ecx
shrl %ecx
movq 0x30(%r12), %rdx
movq %rcx, %rsi
shlq $0x4, %rsi
cmpq (%rdx,%rsi), %r13
ja 0x295b
movl %ecx, %ebx
jmp 0x2939
movl %ecx, %eax
jmp 0x2939
xorl %eax, %eax
cmpl 0x28(%r12), %ebx
jae 0x2a30
movq 0x30(%r12), %r15
movl %ebx, %ebx
movq %rbx, %r14
shlq $0x4, %r14
cmpq %r13, (%r15,%r14)
jne 0x2a30
movq (%rsp), %rdi
callq 0x2130
movq %rax, %rbp
decq %rbx
movl 0x28(%r12), %eax
incq %rbx
cmpq %rax, %rbx
jae 0x2a2e
movq %rbx, 0x18(%rsp)
movq %rbp, %rbx
movq 0x8(%r15,%r14), %rcx
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%r15,%r14), %rdx
shrq $0x28, %rdx
movq 0x10(%rsp), %rbp
movl %edx, (%rbp)
movq %r12, %rdi
leaq 0x20(%rsp), %rsi
callq 0x2a65
cmpl (%rbp), %eax
jne 0x2a2e
movl %eax, %r15d
cltq
movq %rbx, %rbp
cmpq %rax, %rbx
jae 0x2a12
leaq 0x20(%rsp), %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0x2070
testl %eax, %eax
jne 0x2a12
cmpb $0x3a, 0x20(%rsp,%rbp)
je 0x2a42
leaq 0x10(%r14), %rax
movq 0x30(%r12), %r15
cmpq %r13, 0x10(%r15,%r14)
movq %rax, %r14
movq 0x18(%rsp), %rbx
je 0x2993
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rcx
movq (%rcx), %rax
addq %rbp, %rax
incq %rax
movq %rax, (%rcx)
notl %ebp
addl %ebp, %r15d
movq 0x10(%rsp), %rax
movl %r15d, (%rax)
pushq $0x1
popq %rax
jmp 0x2a30
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdict_search
int hdict_search(hdb_t *hdb, const char* label, const char* key, off_t *off, uint32_t *length, hdict_t **hdict){
    int hit = 0;
    if (NULL == label || NULL == key){
        return hit;
    }
    hdict_t *hd;
    uint64_t hdid = bkdr_hash(label);
    uint32_t hash = HASH(hdid);
    LOCK(hdb);
    hd = LIST_FIRST(&hdb->htab[hash]);

    while(hd){
        if (hd->hdid == hdid) {
            hd->ref++;
            *hdict = hd;
            if (hd->hdict_meta->idx_type == 2){
                hit = hdict_seek_v2(*hdict, key, off, length);
            }else{
                hit = hdict_seek(*hdict, key, off, length);
            }
            (*hdict)->num_qry++;
            if (hit){
                hd->ref--;
                UNLK(hdb);
                return hit;
            }
            hd->ref--;
            hd = LIST_NEXT(hd, h_link);
        }else{
            hd = LIST_NEXT(hd, h_link);
        }
    }
    UNLK(hdb);
    return hit;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, 0x8(%rsp)
movq %rcx, %r12
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %cl
xorl %r15d, %r15d
orb %al, %cl
jne 0x2b3a
movq %r9, %r14
movq %rdx, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x3ef0
movq %rax, %rbp
movq %rbx, %r15
movl %ebp, %ebx
andl $0x3ff, %ebx            # imm = 0x3FF
movq %r15, %rdi
callq 0x2460
movq %r15, 0x10(%rsp)
leaq (%r15,%rbx,8), %rbx
addq $0x50, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x2b2d
cmpq %rbp, 0x50(%rbx)
jne 0x2b27
incl 0x4c(%rbx)
movq %rbx, (%r14)
movq 0x58(%rbx), %rax
cmpb $0x2, 0x4(%rax)
jne 0x2b03
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
callq 0x2906
jmp 0x2b16
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
callq 0x2885
movl %eax, %r15d
movq (%r14), %rax
incl 0x48(%rax)
decl 0x4c(%rbx)
testl %r15d, %r15d
jne 0x2b30
addq $0x10, %rbx
jmp 0x2ad0
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0x22a0
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/desion[P]terminal/src/hdict.c
// Function: hdb_mgr
void *hdb_mgr(void *arg)
{
    hdb_t *hdb = (hdb_t *)arg;

    for (;;) {
        if (TAILQ_FIRST(&hdb->close_list)) {
            hdict_t *hdict, *next;
            hdict_t *hdicts[100];
            int i, k = 0;

            LOCK(hdb);
            for (hdict = TAILQ_FIRST(&hdb->close_list); hdict; hdict = next) {
                next = TAILQ_NEXT(hdict, link);
                if (hdict->ref == 0) {
                    hdicts[k++] = hdict;
                    TAILQ_REMOVE(&hdb->close_list, hdict, link);
                    hdb->num_close--;
                    if (k == 100)
                        break;
                }
            }
            UNLK(hdb);

            for (i = 0; i < k; ++i) {
                hdict = hdicts[i];
                hdict_close(hdict);
            }
        }
        sleep(1);
    }
    return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x320, %rsp            # imm = 0x320
movq %rdi, %rbx
pushq $0x1
popq %rbp
pushq $0x64
popq %r14
cmpq $0x0, 0x38(%rbx)
je 0x2c11
movq %rbx, %rdi
callq 0x2460
movq 0x38(%rbx), %rcx
xorl %eax, %eax
movl %eax, %r15d
testq %rcx, %rcx
je 0x2bf3
movq %rcx, %rdx
movq (%rcx), %rcx
cmpl $0x0, 0x4c(%rdx)
jne 0x2bb8
movq %rdx, (%rsp,%r15,8)
movq 0x8(%rdx), %rdx
testq %rcx, %rcx
je 0x2bdf
movq %rdx, 0x8(%rcx)
jmp 0x2be3
movq %rdx, 0x40(%rbx)
incl %eax
movq %rcx, (%rdx)
decl 0x4c(%rbx)
cmpl $0x64, %eax
jne 0x2bb8
movq %r14, %r15
movq %rbx, %rdi
callq 0x22a0
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x2c11
movq (%rsp,%r12,8), %rdi
callq 0x2851
incq %r12
jmp 0x2bfe
movl %ebp, %edi
callq 0x2440
jmp 0x2ba3