// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/parson/parson.c
// Function: json_value_equals
int json_value_equals(const JSON_Value *a, const JSON_Value *b) {
    JSON_Object *a_object = NULL, *b_object = NULL;
    JSON_Array *a_array = NULL, *b_array = NULL;
    const char *a_string = NULL, *b_string = NULL;
    const char *key = NULL;
    size_t a_count = 0, b_count = 0, i = 0;
    JSON_Value_Type a_type, b_type;
    a_type = json_value_get_type(a);
    b_type = json_value_get_type(b);
    if (a_type != b_type) {
        return 0;
    }
    switch (a_type) {
        case JSONArray:
            a_array = json_value_get_array(a);
            b_array = json_value_get_array(b);
            a_count = json_array_get_count(a_array);
            b_count = json_array_get_count(b_array);
            if (a_count != b_count) {
                return 0;
            }
            for (i = 0; i < a_count; i++) {
                if (!json_value_equals(json_array_get_value(a_array, i),
                                       json_array_get_value(b_array, i))) {
                    return 0;
                }
            }
            return 1;
        case JSONObject:
            a_object = json_value_get_object(a);
            b_object = json_value_get_object(b);
            a_count = json_object_get_count(a_object);
            b_count = json_object_get_count(b_object);
            if (a_count != b_count) {
                return 0;
            }
            for (i = 0; i < a_count; i++) {
                key = json_object_get_name(a_object, i);
                if (!json_value_equals(json_object_get_value(a_object, key),
                                       json_object_get_value(b_object, key))) {
                    return 0;
                }
            }
            return 1;
        case JSONString:
            a_string = json_value_get_string(a);
            b_string = json_value_get_string(b);
            if (a_string == NULL || b_string == NULL) {
                return 0; /* shouldn't happen */
            }
            return strcmp(a_string, b_string) == 0;
        case JSONBoolean:
            return json_value_get_boolean(a) == json_value_get_boolean(b);
        case JSONNumber:
            return fabs(json_value_get_number(a) - json_value_get_number(b)) < 0.000001; /* EPSILON */
        case JSONError:
            return 1;
        case JSONNull:
            return 1;
        default:
            return 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3230
movl %eax, -0x6c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3230
movl %eax, -0x70(%rbp)
movl -0x6c(%rbp), %eax
cmpl -0x70(%rbp), %eax
je 0x605f
movl $0x0, -0x4(%rbp)
jmp 0x62ea
movl -0x6c(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x7, %eax
ja 0x62e3
movq -0x78(%rbp), %rax
leaq 0x34ba(%rip), %rcx      # 0x9538
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x2e80
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e80
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3340
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3340
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x60d1
movl $0x0, -0x4(%rbp)
jmp 0x62ea
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x612e
movq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x32e0
movq %rax, -0x80(%rbp)
movq -0x38(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x32e0
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x5fd0
cmpl $0x0, %eax
jne 0x611e
movl $0x0, -0x4(%rbp)
jmp 0x62ea
jmp 0x6120
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x60d9
movl $0x1, -0x4(%rbp)
jmp 0x62ea
movq -0x10(%rbp), %rdi
callq 0x2e10
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e10
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30a0
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x30a0
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x6184
movl $0x0, -0x4(%rbp)
jmp 0x62ea
movq $0x0, -0x68(%rbp)
movq -0x68(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x61f8
movq -0x20(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x30d0
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2be0
movq %rax, -0x88(%rbp)
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x2be0
movq -0x88(%rbp), %rdi
movq %rax, %rsi
callq 0x5fd0
cmpl $0x0, %eax
jne 0x61e8
movl $0x0, -0x4(%rbp)
jmp 0x62ea
jmp 0x61ea
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x68(%rbp)
jmp 0x618c
movl $0x1, -0x4(%rbp)
jmp 0x62ea
movq -0x10(%rbp), %rdi
callq 0x2d30
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2d30
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x622c
cmpq $0x0, -0x48(%rbp)
jne 0x6238
movl $0x0, -0x4(%rbp)
jmp 0x62ea
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x11d0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x62ea
movq -0x10(%rbp), %rdi
callq 0x2ef0
movl %eax, -0x8c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2ef0
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x62ea
movq -0x10(%rbp), %rdi
callq 0x2da0
movsd %xmm0, -0x98(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2da0
movsd -0x98(%rbp), %xmm1
subsd %xmm0, %xmm1
movaps 0x357c(%rip), %xmm0     # 0x9830
pand %xmm0, %xmm1
movsd 0x3560(%rip), %xmm0     # 0x9820
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x62ea
movl $0x1, -0x4(%rbp)
jmp 0x62ea
movl $0x1, -0x4(%rbp)
jmp 0x62ea
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)