LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x4db0
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
cmpq $0x0, (%rdx)
jne 0x4dab
movq %rsi, %r14
movq %rdi, %r15
cmpq %rsi, 0x10(%rdi)
jbe 0x4dab
movq 0x8(%r15), %rax
movq (%rax,%r14,8), %rdi
callq 0x3c53
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_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x3dc3
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4df5
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d5f
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4df5
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x536d(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4e65
movq $0x0, (%rbx)
movl $0x3, 0x8(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d5f
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4e65
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x52ff(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4ed2
movq $0x0, (%rbx)
movl $0x6, 0x8(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d5f
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4ed2
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x5295(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4f32
movq $0x0, (%rbx)
movl $0x1, 0x8(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x4d5f
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4f32
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x4f84
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x4f72
xorl %r14d, %r14d
cmpq %r14, %rax
jbe 0x4f5f
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
jmp 0x4f61
xorl %edi, %edi
callq 0x3c53
incq %r14
movq 0x10(%rbx), %rax
cmpq %rax, %r14
jb 0x4f50
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, %rdi
callq 0x3dc3
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x4fde
testq %r14, %r14
je 0x4fd1
cmpq $0x0, (%rbx)
je 0x4fe6
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42ab
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x4fde
jmp 0x4fd1
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movsd %xmm0, (%rsp)
movq %rdi, %r14
movl $0x18, %edi
callq *0x5175(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x505e
movq $0x0, (%rbx)
movl $0x3, 0x8(%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
testq %r14, %r14
je 0x5051
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42ab
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x505e
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %esi, %ebp
movq %rdi, %r14
movl $0x18, %edi
callq *0x510e(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x50c5
movq $0x0, (%rbx)
movl $0x6, 0x8(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x10(%rbx)
testq %r14, %r14
je 0x50b8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42ab
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x50c5
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movl $0x18, %edi
callq *0x50ac(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x511d
movq $0x0, (%rbx)
movl $0x1, 0x8(%rbx)
testq %r14, %r14
je 0x5110
movq %r14, %rdi
movq %rbx, %rsi
callq 0x42ab
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x511d
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %al
orb %cl, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x5156
movq %rdx, %rbx
cmpq $0x0, (%rdx)
je 0x5165
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r15
movq %rdi, %r14
callq 0x3826
testq %rax, %rax
je 0x51a6
movq %rax, %rdi
callq 0x3c53
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x51a6
movq 0x8(%r14), %rbp
xorl %r13d, %r13d
movq (%rbp,%r13,8), %rdi
movq %r15, %rsi
callq 0x21e0
testl %eax, %eax
je 0x51c2
incq %r13
cmpq %r13, %r12
jne 0x518d
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x430f
movq (%r14), %rax
movq %rax, (%rbx)
movq 0x10(%r14), %rax
movq %rbx, (%rax,%r13,8)
xorl %eax, %eax
jmp 0x5156
// File: /workspace/github_c_makefile_star2_O3/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
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x53f4
movq %rdx, %rbx
movq %rsi, %r13
movq %rdi, %r15
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x2120
testq %rax, %rax
je 0x53c4
movq %rax, %r14
movq %r14, %rbp
subq %r13, %rbp
leaq 0x1(%rbp), %rdi
callq *0x4e6d(%rip)           # 0xa188
movq %rax, %r12
testq %rax, %rax
je 0x5336
movb $0x0, (%r12,%rbp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x2070
movq %r15, %rdi
movq %r12, %rsi
callq 0x3826
testq %rax, %rax
je 0x5355
cmpl $0x4, 0x8(%rax)
jne 0x5355
movq 0x10(%rax), %rbp
testq %rbp, %rbp
jne 0x5397
callq 0x3d03
testq %rax, %rax
je 0x53eb
movq %rax, %r13
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x430f
cmpl $-0x1, %eax
je 0x53e3
movq %r15, %rdi
movq %r12, %rsi
callq 0x3826
testq %rax, %rax
je 0x5395
cmpl $0x4, 0x8(%rax)
jne 0x5395
movq 0x10(%rax), %rbp
jmp 0x5397
xorl %ebp, %ebp
movq %r12, %rdi
callq *0x4de0(%rip)           # 0xa180
movq %r14, %r13
incq %r13
movq %r13, %rdi
movl $0x2e, %esi
callq 0x2120
movq %rax, %r14
movq %rbp, %r15
testq %rax, %rax
jne 0x530b
jmp 0x53c7
movq %r15, %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5125
movq %r13, %rdi
callq 0x3c53
movq %r12, %rdi
callq *0x4d8c(%rip)           # 0xa180
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rdx, %rdi
callq 0x3dc3
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x544c
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x52ca
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x544c
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x4d16(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x54bc
movq $0x0, (%rbx)
movl $0x3, 0x8(%rbx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x52ca
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x54bc
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x4ca8(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x5529
movq $0x0, (%rbx)
movl $0x6, 0x8(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x10(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x52ca
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x5529
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x18, %edi
callq *0x4c3e(%rip)           # 0xa188
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x5589
movq $0x0, (%rbx)
movl $0x1, 0x8(%rbx)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x52ca
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
jne 0x5589
movq %rbx, %rdi
callq 0x3c53
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rdi, %rdi
je 0x562b
movq %rsi, %r14
movq %rdi, %rbx
callq 0x3826
testq %rax, %rax
je 0x562b
movq 0x18(%rbx), %r12
testq %r12, %r12
je 0x562b
movq 0x8(%rbx), %rbp
xorl %r13d, %r13d
movq (%rbp,%r13,8), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x21e0
testl %eax, %eax
je 0x55eb
incq %r13
cmpq %r13, %r12
jne 0x55c8
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x562b
movq %r15, %rdi
callq *0x4b8c(%rip)           # 0xa180
movq 0x10(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x3c53
leaq -0x1(%r12), %rax
cmpq %r13, %rax
je 0x5625
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_O3/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 %r13
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x2120
testq %rax, %rax
je 0x56ce
movq %rax, %r14
movq %r14, %r13
subq %r15, %r13
leaq 0x1(%r13), %rdi
callq *0x4b18(%rip)           # 0xa188
movq %rax, %r12
testq %rax, %rax
je 0x568b
movb $0x0, (%r12,%r13)
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2070
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3826
testq %rax, %rax
je 0x56e2
cmpl $0x4, 0x8(%rax)
jne 0x56e2
movq 0x10(%rax), %rbx
movq %r12, %rdi
callq *0x4ad2(%rip)           # 0xa180
testq %rbx, %rbx
je 0x56eb
movq %r14, %r15
incq %r15
movq %r15, %rdi
movl $0x2e, %esi
callq 0x2120
movq %rax, %r14
testq %rax, %rax
jne 0x5660
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x558f
movq %r12, %rdi
callq *0x4a95(%rip)           # 0xa180
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5746
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
je 0x5734
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq *0x4a62(%rip)           # 0xa180
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x3c53
incq %r14
cmpq 0x18(%rbx), %r14
jb 0x5710
movq $0x0, 0x18(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
movq 0x10(%rdi), %rax
je 0x5ec8
testq %rbx, %rbx
sete %cl
testq %rax, %rax
sete %al
jmp 0x5ed4
testq %rbx, %rbx
sete %cl
testq %rax, %rax
setne %al
orb %cl, %al
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jne 0x5f84
leaq (,%rbx,8), %r13
movq %r13, %rdi
callq *0x4295(%rip)           # 0xa188
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x5f84
movq %rax, %r12
movq %r13, %rdi
callq *0x427a(%rip)           # 0xa188
testq %rax, %rax
je 0x5f58
movq %rax, %r13
movq 0x8(%r14), %rsi
xorl %r15d, %r15d
testq %rsi, %rsi
je 0x5f63
cmpq $0x0, 0x10(%r14)
je 0x5f65
movq 0x18(%r14), %rdx
testq %rdx, %rdx
je 0x5f65
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x2220
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
shlq $0x3, %rdx
movq %r13, %rdi
callq 0x2220
movq 0x8(%r14), %rsi
jmp 0x5f65
movq %r12, %rdi
callq *0x421f(%rip)           # 0xa180
jmp 0x5f84
xorl %esi, %esi
movq %rsi, %rdi
callq *0x4212(%rip)           # 0xa180
movq 0x10(%r14), %rdi
callq *0x4208(%rip)           # 0xa180
movq %r12, 0x8(%r14)
movq %r13, 0x10(%r14)
movq %rbx, 0x20(%r14)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movsbl (%rdi), %edx
xorl %eax, %eax
testl %edx, %edx
je 0x60ce
movsbl 0x1(%rdi), %ecx
testl %ecx, %ecx
je 0x60ce
movsbl 0x2(%rdi), %r8d
testl %r8d, %r8d
je 0x60ce
movsbl 0x3(%rdi), %edi
testl %edi, %edi
je 0x60ce
leal -0x30(%rdx), %r9d
cmpb $0x9, %r9b
ja 0x5fd3
addl $-0x30, %edx
jmp 0x5ffa
leal -0x61(%rdx), %r9d
cmpb $0x5, %r9b
ja 0x5fe2
addl $-0x57, %edx
jmp 0x5ffa
leal -0x41(%rdx), %r9d
addl $-0x37, %edx
cmpb $0x6, %r9b
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmovbl %edx, %r9d
movl %r9d, %edx
leal -0x30(%rcx), %r9d
cmpb $0x9, %r9b
ja 0x6009
addl $-0x30, %ecx
jmp 0x6030
leal -0x61(%rcx), %r9d
cmpb $0x5, %r9b
ja 0x6018
addl $-0x57, %ecx
jmp 0x6030
leal -0x41(%rcx), %r9d
addl $-0x37, %ecx
cmpb $0x6, %r9b
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmovbl %ecx, %r9d
movl %r9d, %ecx
leal -0x30(%r8), %r9d
cmpb $0x9, %r9b
ja 0x6040
addl $-0x30, %r8d
jmp 0x6069
leal -0x61(%r8), %r9d
cmpb $0x5, %r9b
ja 0x6050
addl $-0x57, %r8d
jmp 0x6069
leal -0x41(%r8), %r9d
addl $-0x37, %r8d
cmpb $0x6, %r9b
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmovbl %r8d, %r9d
movl %r9d, %r8d
leal -0x30(%rdi), %r9d
cmpb $0x9, %r9b
ja 0x6078
addl $-0x30, %edi
jmp 0x609f
leal -0x61(%rdi), %r9d
cmpb $0x5, %r9b
ja 0x6087
addl $-0x57, %edi
jmp 0x609f
leal -0x41(%rdi), %r9d
addl $-0x37, %edi
cmpb $0x6, %r9b
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmovbl %edi, %r9d
movl %r9d, %edi
cmpl $-0x1, %edx
je 0x60ce
cmpl $-0x1, %ecx
je 0x60ce
cmpl $-0x1, %r8d
je 0x60ce
cmpl $-0x1, %edi
je 0x60ce
shll $0xc, %edx
shll $0x8, %ecx
orl %edx, %ecx
shll $0x4, %r8d
orl %edi, %r8d
orl %ecx, %r8d
movl %r8d, (%rsi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rsi, %rsi
je 0x6136
movq %rsi, %r14
movq %rdi, %r15
leaq (,%rsi,8), %rdi
callq *0x4093(%rip)           # 0xa188
testq %rax, %rax
je 0x6136
movq %rax, %r12
movq 0x8(%r15), %rsi
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x6123
movq 0x10(%r15), %rdx
testq %rdx, %rdx
je 0x6125
shlq $0x3, %rdx
movq %r12, %rdi
callq 0x2220
movq 0x8(%r15), %rsi
jmp 0x6125
xorl %esi, %esi
movq %rsi, %rdi
callq *0x4052(%rip)           # 0xa180
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_O3/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 %rbx
pushq %rax
testl %esi, %esi
jle 0x619d
movl %esi, %ebp
movq %rdi, %r14
xorl %ebx, %ebx
leaq 0x1333(%rip), %r15      # 0x74ad
movq %r14, %rdi
movq %r15, %rsi
callq 0x6144
testl %eax, %eax
js 0x61a1
movl %eax, %ecx
addq %r14, %rcx
testq %r14, %r14
cmovneq %rcx, %r14
addl %eax, %ebx
decl %ebp
jne 0x617a
jmp 0x61a6
xorl %ebx, %ebx
jmp 0x61a6
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x281b(%rip), %rcx      # 0x5010
movq (%rcx,%rax,8), %rax
testq %rdx, %rdx
je 0x281b
xorl %edi, %edi
movb (%rsi,%rdi), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrq $0x8, %rax
xorq (%rcx,%r8,8), %rax
incq %rdi
cmpq %rdi, %rdx
jne 0x2800
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2ae8
callq 0x21a0
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x2af6
callq 0x2030
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x2b04
callq 0x2030
movq 0x20(%rbx), %rdi
callq 0x2030
movq %rbx, %rdi
popq %rbx
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O3/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, %r12
movl 0x28(%rdi), %r13d
xorl %r15d, %r15d
movq %rsi, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x2200
testl %r13d, %r13d
je 0x2b98
movq 0x30(%r12), %rcx
xorl %edx, %edx
leal (%rdx,%r13), %esi
shrl %esi
movq %rsi, %rdi
shlq $0x4, %rdi
leaq (%rcx,%rdi), %r8
cmpq %rax, (%rcx,%rdi)
jbe 0x2b66
movl %esi, %r13d
jmp 0x2b6c
jae 0x2b76
incl %esi
movl %esi, %edx
cmpl %r13d, %edx
jb 0x2b4a
xorl %r15d, %r15d
jmp 0x2b98
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq 0x8(%r8), %rax
movq %rax, (%r14)
movq 0x8(%rcx,%rdi), %rax
shrq $0x28, %rax
movl %eax, (%rbx)
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, %r14
movl 0x28(%rdi), %ebx
movq %rsi, (%rsp)
movq %rsi, %rdi
callq 0x4188
movq %r14, %r9
movq %rax, %r13
xorl %eax, %eax
movl $0x0, %r8d
testl %ebx, %ebx
je 0x2c12
movq 0x30(%r9), %rcx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl %ebx, %r8d
leal (%rdx,%r8), %esi
shrl %esi
movq %rsi, %rdi
shlq $0x4, %rdi
cmpq (%rcx,%rdi), %r13
ja 0x2c08
movl %esi, %r8d
jmp 0x2c0a
movl %esi, %edx
leal 0x1(%rdx), %esi
cmpl %r8d, %esi
jne 0x2bf0
cmpl 0x28(%r9), %r8d
jae 0x2cdb
movq 0x30(%r9), %r15
movl %r8d, %ebx
movq %rbx, %r14
shlq $0x4, %r14
cmpq %r13, (%r15,%r14)
jne 0x2cdb
movq (%rsp), %rdi
movq %r9, 0x8(%rsp)
callq 0x2130
movq 0x8(%rsp), %rsi
movq %rax, %r12
decq %rbx
movq 0x18(%rsp), %rbp
movl 0x28(%rsi), %eax
incq %rbx
cmpq %rax, %rbx
jae 0x2cd9
movq 0x8(%r15,%r14), %rcx
movabsq $0xffffffffff, %rax     # imm = 0xFFFFFFFFFF
andq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq 0x8(%r15,%r14), %rdx
shrq $0x28, %rdx
movl %edx, (%rbp)
movl 0x38(%rsi), %edi
leaq 0x20(%rsp), %rsi
callq 0x23e0
movq %rax, %r15
cmpl %r15d, (%rbp)
jne 0x2cd9
movslq %r15d, %rax
cmpq %rax, %r12
jae 0x2cbe
leaq 0x20(%rsp), %rdi
movq (%rsp), %rsi
movq %r12, %rdx
callq 0x2070
testl %eax, %eax
jne 0x2cbe
cmpb $0x3a, 0x20(%rsp,%r12)
je 0x2ced
leaq 0x10(%r14), %rax
movq 0x8(%rsp), %rsi
movq 0x30(%rsi), %r15
cmpq %r13, 0x10(%r15,%r14)
movq %rax, %r14
je 0x2c52
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
addq %r12, %rax
incq %rax
movq %rax, (%rcx)
notl %r12d
addl %r15d, %r12d
movq 0x18(%rsp), %rax
movl %r12d, (%rax)
movl $0x1, %eax
jmp 0x2cdb
// File: /workspace/github_c_makefile_star2_O3/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 0x2de2
movq %r9, %r14
movq %rdx, %r13
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4188
movq %rax, %rbp
movq %rbx, %r15
movl %ebp, %ebx
andl $0x3ff, %ebx            # imm = 0x3FF
movq %r15, %rdi
callq 0x2470
movq %r15, 0x10(%rsp)
movq 0x50(%r15,%rbx,8), %rbx
testq %rbx, %rbx
je 0x2dd5
cmpq %rbp, 0x50(%rbx)
jne 0x2dcf
incl 0x4c(%rbx)
movq %rbx, (%r14)
movq 0x58(%rbx), %rax
cmpb $0x2, 0x4(%rax)
jne 0x2dab
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
callq 0x2ba5
jmp 0x2dbe
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
callq 0x2b16
movl %eax, %r15d
movq (%r14), %rax
incl 0x48(%rax)
decl 0x4c(%rbx)
testl %r15d, %r15d
jne 0x2dd8
movq 0x10(%rbx), %rbx
jmp 0x2d7b
xorl %r15d, %r15d
movq 0x10(%rsp), %rdi
callq 0x22b0
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_O3/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 %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %rbx
cmpq $0x0, 0x38(%rbx)
je 0x2ed6
movq %rbx, %rdi
callq 0x2470
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
je 0x2ea8
xorl %ebp, %ebp
movq (%rcx), %rax
cmpl $0x0, 0x4c(%rcx)
jne 0x2e92
movslq %ebp, %rdx
movq %rcx, (%rsp,%rdx,8)
movq 0x8(%rcx), %rcx
testq %rax, %rax
je 0x2e81
movq %rcx, 0x8(%rax)
jmp 0x2e85
movq %rcx, 0x40(%rbx)
incl %ebp
movq %rax, (%rcx)
decl 0x4c(%rbx)
cmpl $0x64, %ebp
je 0x2eb2
movq %rax, %rcx
testq %rax, %rax
jne 0x2e62
movq %rbx, %rdi
callq 0x22b0
testl %ebp, %ebp
jg 0x2ebf
jmp 0x2ed6
movq %rbx, %rdi
callq 0x22b0
jmp 0x2ed6
movq %rbx, %rdi
callq 0x22b0
movl $0x64, %ebp
movl %ebp, %r14d
xorl %r15d, %r15d
movq (%rsp,%r15,8), %rdi
callq 0x2ad8
incq %r15
cmpq %r15, %r14
jne 0x2ec5
movl $0x1, %edi
callq 0x2450
jmp 0x2e44
// File: /workspace/github_c_makefile_star2_O3/desion[P]terminal/src/hdict.c
// Function: hdb_append
int hdb_append(hdb_t *hdb, const char *hdict_path){
    hdict_t *hd, *ihd = NULL;
    char rpath[1024];
    realpath(hdict_path, rpath);

    int hdict_errno = 0;
    hdict_t *hdict = hdict_open(rpath, &hdict_errno);
    if(NULL == hdict) return hdict_errno;
    LOCK(hdb);
    //use the label to generate hash id
    uint64_t key_hash = bkdr_hash(hdict->hdict_meta->label);
    uint32_t hash = HASH(key_hash);
    for (hd = LIST_FIRST(&hdb->htab[hash]); hd; hd = LIST_NEXT(hd, h_link)) {
        if (hd->hdict_meta->version <= hdict->hdict_meta->version) {
            ihd = hd;
            break;
        }
    }
    hdict->hdid = key_hash;
    TAILQ_INSERT_TAIL(&hdb->open_list, hdict, link);
    if(NULL == ihd){
        LIST_INSERT_HEAD(&hdb->htab[hash], hdict, h_link);
    }else{
        LIST_INSERT_BEFORE(ihd, hdict, h_link);
    }
    hdb->num_open++;
    UNLK(hdb);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x410, %rsp            # imm = 0x410
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2270
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
callq 0x281c
testq %rax, %rax
je 0x2fe8
movq %rax, %r14
movq %rbx, %rdi
callq 0x2470
movq 0x58(%r14), %r15
leaq 0x5(%r15), %rdi
callq 0x4188
movl %eax, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq 0x50(%rbx,%rcx,8), %rdx
testq %rdx, %rdx
je 0x2fab
movl (%r15), %esi
movq 0x58(%rdx), %rdi
cmpl %esi, (%rdi)
jbe 0x2fad
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
jne 0x2f9a
xorl %edx, %edx
movq %rax, 0x50(%r14)
movq $0x0, (%r14)
movq 0x30(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x30(%rbx)
testq %rdx, %rdx
je 0x2fee
movq 0x18(%rdx), %rax
movq %r14, %rcx
addq $0x10, %rcx
movq %rax, 0x18(%r14)
movq %rdx, 0x10(%r14)
movq %r14, (%rax)
movq %rcx, 0x18(%rdx)
jmp 0x3014
movl 0xc(%rsp), %eax
jmp 0x3021
leaq (%rbx,%rcx,8), %rax
addq $0x50, %rax
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
testq %rcx, %rcx
je 0x300d
movq %r14, %rdx
addq $0x10, %rdx
movq %rdx, 0x18(%rcx)
movq %r14, (%rax)
movq %rax, 0x18(%r14)
incl 0x48(%rbx)
movq %rbx, %rdi
callq 0x22b0
xorl %eax, %eax
addq $0x410, %rsp            # imm = 0x410
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/desion[P]terminal/src/hdict.c
// Function: hdb_reopen
int hdb_reopen(hdb_t *hdb, const char *hdict_path)
{
    hdict_t *hd, *next;
    uint32_t hash;
    char rpath[1024];
    realpath(hdict_path, rpath);

    int hdict_errno = 0;
    hdict_t *hdict = hdict_open(rpath, &hdict_errno);
    if (hdict == NULL) return hdict_errno;
    uint64_t hdid = bkdr_hash(hdict->hdict_meta->label);

    LOCK(hdb);
    for (hd = TAILQ_FIRST(&hdb->open_list); hd; hd = next) {
        next = TAILQ_NEXT(hd, link);
        if (hd->hdid == hdid && strcmp(hd->hdict_meta->label, hdict->hdict_meta->label) == 0) {
            LIST_REMOVE(hd, h_link);
            TAILQ_REMOVE(&hdb->open_list, hd, link);
            hdb->num_open--;
            TAILQ_INSERT_TAIL(&hdb->close_list, hd, link);
            hdb->num_close++;
            break;
        }
    }
    hdict->hdid = hdid;
    TAILQ_INSERT_TAIL(&hdb->open_list, hdict, link);
    /* put the hdb ptr to simple hash table */
    hash = HASH(hdict->hdid);
    LIST_INSERT_HEAD(&hdb->htab[hash], hdict, h_link);
    hdb->num_open++;
    UNLK(hdb);

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movq %r14, %rsi
callq 0x2270
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
movq %r14, %rdi
callq 0x281c
testq %rax, %rax
je 0x30bd
movq %rax, %r14
movq 0x58(%rax), %r12
addq $0x5, %r12
movq %r12, %rdi
callq 0x4188
movq %rax, %r15
movq %rbx, %rdi
callq 0x2470
movq 0x28(%rbx), %r13
testq %r13, %r13
je 0x311d
movq (%r13), %rbp
cmpq %r15, 0x50(%r13)
jne 0x30b3
movq 0x58(%r13), %rdi
addq $0x5, %rdi
movq %r12, %rsi
callq 0x2220
testl %eax, %eax
je 0x30c6
movq %rbp, %r13
testq %rbp, %rbp
jne 0x3095
jmp 0x311d
movl 0xc(%rsp), %eax
jmp 0x3171
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
testq %rax, %rax
je 0x30d7
movq %rcx, 0x18(%rax)
movq %rax, (%rcx)
movq (%r13), %rax
movq 0x8(%r13), %rcx
testq %rax, %rax
je 0x30ed
movq %rcx, 0x8(%rax)
jmp 0x30f1
movq %rcx, 0x30(%rbx)
movq %rax, (%rcx)
movq $0x0, (%r13)
movq 0x40(%rbx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x40(%rbx)
movq 0x48(%rbx), %xmm0
paddd 0x26f8(%rip), %xmm0     # 0x5810
movq %xmm0, 0x48(%rbx)
movq %r15, 0x50(%r14)
movq $0x0, (%r14)
movq 0x30(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, (%rax)
movq %r14, 0x30(%rbx)
andl $0x3ff, %r15d           # imm = 0x3FF
leaq (%rbx,%r15,8), %rax
addq $0x50, %rax
movq (%rax), %rcx
movq %rcx, 0x10(%r14)
testq %rcx, %rcx
je 0x315d
movq %r14, %rdx
addq $0x10, %rdx
movq %rdx, 0x18(%rcx)
movq %r14, (%rax)
movq %rax, 0x18(%r14)
incl 0x48(%rbx)
movq %rbx, %rdi
callq 0x22b0
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/desion[P]terminal/src/hdict.c
// Function: hdb_close
int hdb_close(hdb_t *hdb, const char* label, uint32_t version_id)
{
    if(NULL == label){
        return 0;
    }
    uint64_t hdid = bkdr_hash(label);
    int found = 0;
    hdict_t *hd, *next;
    LOCK(hdb);
    for (hd = TAILQ_FIRST(&hdb->open_list); hd; hd = next) {
        next = TAILQ_NEXT(hd, link);
        if (hd->hdid == hdid && strcmp(hd->hdict_meta->label, label) == 0) {
            if (version_id != 0 && hd->hdict_meta->version != version_id){
                continue;
            }
            LIST_REMOVE(hd, h_link);
            TAILQ_REMOVE(&hdb->open_list, hd, link);
            hdb->num_open--;
            TAILQ_INSERT_TAIL(&hdb->close_list, hd, link);
            hdb->num_close++;
            found += 1;
            if (version_id != 0){
                break;
            }
        }
    }
    UNLK(hdb);

    return found;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x3270
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4188
movq %rax, %r12
movq %rbx, %rdi
callq 0x2470
movq 0x28(%rbx), %rbp
testq %rbp, %rbp
je 0x3275
movq %r15, 0x10(%rsp)
movl %r14d, 0xc(%rsp)
xorl %r15d, %r15d
movq %rbp, %r13
movq (%rbp), %rbp
cmpq %r12, 0x50(%r13)
jne 0x3265
movq 0x58(%r13), %r14
leaq 0x5(%r14), %rdi
movq 0x10(%rsp), %rsi
callq 0x2220
testl %eax, %eax
jne 0x3265
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x3204
cmpl %eax, (%r14)
jne 0x3265
movq 0x10(%r13), %rax
movq 0x18(%r13), %rcx
testq %rax, %rax
je 0x3215
movq %rcx, 0x18(%rax)
movq %rax, (%rcx)
movq (%r13), %rax
movq 0x8(%r13), %rcx
testq %rax, %rax
je 0x322b
movq %rcx, 0x8(%rax)
jmp 0x322f
movq %rcx, 0x30(%rbx)
incl %r15d
movq %rax, (%rcx)
movq $0x0, (%r13)
movq 0x40(%rbx), %rax
movq %rax, 0x8(%r13)
movq %r13, (%rax)
movq %r13, 0x40(%rbx)
movq 0x48(%rbx), %xmm0
paddd 0x25b7(%rip), %xmm0     # 0x5810
movq %xmm0, 0x48(%rbx)
cmpl $0x0, 0xc(%rsp)
jne 0x3278
testq %rbp, %rbp
jne 0x31d0
jmp 0x3278
xorl %r15d, %r15d
jmp 0x3280
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x22b0
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_O3/desion[P]terminal/src/hdict.c
// Function: hdb_ref
hdict_t *hdb_ref(hdb_t *hdb, const char* label)
{
    hdict_t *hdict = NULL;
    if (NULL == label){
        return hdict;
    }
    hdict_t *hd;
    LOCK(hdb);
    uint64_t hdid = bkdr_hash(label);
    uint32_t hash = HASH(hdid);
    for (hd = LIST_FIRST(&hdb->htab[hash]); hd; hd = LIST_NEXT(hd, h_link)) {
        if (hd->hdid == hdid) {
            hd->ref++;
            hdict = hd;
            break;
        }
    }
    UNLK(hdb);
    return hdict;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x34ac
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2470
movq %r14, %rdi
callq 0x4188
movl %eax, %ecx
andl $0x3ff, %ecx            # imm = 0x3FF
movq 0x50(%rbx,%rcx,8), %r14
testq %r14, %r14
je 0x34a7
cmpq %rax, 0x50(%r14)
je 0x34b1
movq 0x10(%r14), %r14
jmp 0x3496
xorl %r14d, %r14d
jmp 0x34b5
xorl %r14d, %r14d
jmp 0x34bd
incl 0x4c(%r14)
movq %rbx, %rdi
callq 0x22b0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/desion[P]terminal/src/hdict.c
// Function: hdb_deref
int hdb_deref(hdb_t *hdb, hdict_t *hdict)
{
    LOCK(hdb);
    hdict->ref--;
    UNLK(hdb);
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2470
decl 0x4c(%rbx)
movq %r14, %rdi
callq 0x22b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq