// File: /workspace/github_c_makefile_star2_O0/ammarfaizi2[P]riyuu/src/third_party/cjson/cJSON_Utils.c
// Function: compare_json(cJSON*, cJSON*, int)
static cJSON_bool compare_json(cJSON *a, cJSON *b, const cJSON_bool case_sensitive)
{
    if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)))
    {
        /* mismatched type. */
        return false;
    }
    switch (a->type & 0xFF)
    {
        case cJSON_Number:
            /* numeric mismatch. */
            if ((a->valueint != b->valueint) || (a->valuedouble != b->valuedouble))
            {
                return false;
            }
            else
            {
                return true;
            }

        case cJSON_String:
            /* string mismatch. */
            if (strcmp(a->valuestring, b->valuestring) != 0)
            {
                return false;
            }
            else
            {
                return true;
            }

        case cJSON_Array:
            for ((void)(a = a->child), b = b->child; (a != NULL) && (b != NULL); (void)(a = a->next), b = b->next)
            {
                cJSON_bool identical = compare_json(a, b, case_sensitive);
                if (!identical)
                {
                    return false;
                }
            }

            /* array size mismatch? (one of both children is not NULL) */
            if ((a != NULL) || (b != NULL))
            {
                return false;
            }
            else
            {
                return true;
            }

        case cJSON_Object:
            sort_object(a, case_sensitive);
            sort_object(b, case_sensitive);
            for ((void)(a = a->child), b = b->child; (a != NULL) && (b != NULL); (void)(a = a->next), b = b->next)
            {
                cJSON_bool identical = false;
                /* compare object keys */
                if (compare_strings((unsigned char*)a->string, (unsigned char*)b->string, case_sensitive))
                {
                    /* missing member */
                    return false;
                }
                identical = compare_json(a, b, case_sensitive);
                if (!identical)
                {
                    return false;
                }
            }

            /* object length mismatch (one of both children is not null) */
            if ((a != NULL) || (b != NULL))
            {
                return false;
            }
            else
            {
                return true;
            }

        default:
            break;
    }

    /* null, true or false */
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x9aae
cmpq $0x0, -0x18(%rbp)
je 0x9aae
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
andl $0xff, %eax
movq -0x18(%rbp), %rcx
movl 0x18(%rcx), %ecx
andl $0xff, %ecx
cmpl %ecx, %eax
je 0x9aba
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movq -0x10(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x28(%rbp)
subl $0x8, %eax
je 0x9af5
jmp 0x9acc
movl -0x28(%rbp), %eax
subl $0x10, %eax
je 0x9b35
jmp 0x9ad6
movl -0x28(%rbp), %eax
subl $0x20, %eax
je 0x9b67
jmp 0x9ae4
movl -0x28(%rbp), %eax
subl $0x40, %eax
je 0x9c04
jmp 0x9ce0
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
movq -0x18(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jne 0x9b1d
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomisd 0x30(%rax), %xmm0
jne 0x9b1d
jp 0x9b1d
jmp 0x9b29
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movl $0x1, -0x4(%rbp)
jmp 0x9ce9
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x2250
cmpl $0x0, %eax
je 0x9b5b
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movl $0x1, -0x4(%rbp)
jmp 0x9ce9
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0x9b96
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x9b9f
jmp 0x9bde
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x9a70
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0x9bc4
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
jmp 0x9bc6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9b7f
cmpq $0x0, -0x10(%rbp)
jne 0x9bec
cmpq $0x0, -0x18(%rbp)
je 0x9bf8
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movl $0x1, -0x4(%rbp)
jmp 0x9ce9
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x9150
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x9150
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x2a(%rbp)
je 0x9c4b
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x9c54
jmp 0x9cc0
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0xa030
cmpl $0x0, %eax
je 0x9c81
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x9a70
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x9ca3
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
jmp 0x9ca5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9c34
cmpq $0x0, -0x10(%rbp)
jne 0x9cce
cmpq $0x0, -0x18(%rbp)
je 0x9cd7
movl $0x0, -0x4(%rbp)
jmp 0x9ce9
movl $0x1, -0x4(%rbp)
jmp 0x9ce9
jmp 0x9ce2
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)