// File: /workspace/github_c_makefile_star2_O0/bloomsource[P]dns_update/cjson.c
// Function: cJSON_Compare
cJSON_bool cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive)
{
    if ((a == NULL) || (b == NULL) || ((a->type & 0xFF) != (b->type & 0xFF)) || cJSON_IsInvalid(a))
    {
        return false;
    }

    /* check if type is valid */
    switch (a->type & 0xFF)
    {
        case cJSON_False:
        case cJSON_True:
        case cJSON_NULL:
        case cJSON_Number:
        case cJSON_String:
        case cJSON_Raw:
        case cJSON_Array:
        case cJSON_Object:
            break;

        default:
            return false;
    }

    /* identical objects are equal */
    if (a == b)
    {
        return true;
    }

    switch (a->type & 0xFF)
    {
        /* in these cases and equal type is enough */
        case cJSON_False:
        case cJSON_True:
        case cJSON_NULL:
            return true;

        case cJSON_Number:
            if (a->valuedouble == b->valuedouble)
            {
                return true;
            }
            return false;

        case cJSON_String:
        case cJSON_Raw:
            if ((a->valuestring == NULL) || (b->valuestring == NULL))
            {
                return false;
            }
            if (strcmp(a->valuestring, b->valuestring) == 0)
            {
                return true;
            }

            return false;

        case cJSON_Array:
        {
            cJSON *a_element = NULL;
            cJSON *b_element = NULL;
            for (a_element = a->child, b_element = b->child;
                    (a_element != NULL) && (b_element != NULL);
                    a_element = a_element->next, b_element = b_element->next)
            {
                if (!cJSON_Compare(a_element, b_element, case_sensitive))
                {
                    return false;
                }
            }

            return true;
        }

        case cJSON_Object:
        {
            cJSON *a_element = NULL;
            cJSON_ArrayForEach(a_element, a)
            {
                /* TODO This has O(n^2) runtime, which is horrible! */
                cJSON *b_element = get_object_item(b, a_element->string, case_sensitive);
                if (b_element == NULL)
                {
                    return false;
                }

                if (!cJSON_Compare(a_element, b_element, case_sensitive))
                {
                    return false;
                }
            }

            return true;
        }

        default:
            return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x763c
cmpq $0x0, -0x18(%rbp)
je 0x763c
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
jne 0x763c
movq -0x10(%rbp), %rdi
callq 0x7370
cmpl $0x0, %eax
je 0x7648
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x44(%rbp)
decl %eax
subl $0x2, %eax
jb 0x769a
jmp 0x765c
movl -0x44(%rbp), %eax
subl $0x4, %eax
je 0x769a
jmp 0x7666
movl -0x44(%rbp), %eax
subl $0x8, %eax
je 0x769a
jmp 0x7670
movl -0x44(%rbp), %eax
subl $0x10, %eax
je 0x769a
jmp 0x767a
movl -0x44(%rbp), %eax
subl $0x20, %eax
je 0x769a
jmp 0x7684
movl -0x44(%rbp), %eax
subl $0x40, %eax
je 0x769a
jmp 0x768e
movl -0x44(%rbp), %eax
subl $0x80, %eax
jne 0x769c
jmp 0x769a
jmp 0x76a8
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x76be
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
movzbl 0x18(%rax), %eax
movl %eax, -0x48(%rbp)
decl %eax
subl $0x2, %eax
jb 0x771b
jmp 0x76d2
movl -0x48(%rbp), %eax
subl $0x4, %eax
je 0x771b
jmp 0x76dc
movl -0x48(%rbp), %eax
subl $0x8, %eax
je 0x7727
jmp 0x76e6
movl -0x48(%rbp), %eax
subl $0x10, %eax
je 0x7755
jmp 0x76f0
movl -0x48(%rbp), %eax
subl $0x20, %eax
je 0x77a9
jmp 0x76fe
movl -0x48(%rbp), %eax
subl $0x40, %eax
je 0x7838
jmp 0x770c
movl -0x48(%rbp), %eax
subl $0x80, %eax
je 0x7755
jmp 0x78ca
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm0
movq -0x18(%rbp), %rax
ucomisd 0x30(%rax), %xmm0
jne 0x7749
jp 0x7749
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x776b
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x7777
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x2180
cmpl $0x0, %eax
jne 0x779d
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x49(%rbp)
je 0x77e8
cmpq $0x0, -0x30(%rbp)
setne %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x77f1
jmp 0x782c
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x75f0
cmpl $0x0, %eax
jne 0x7812
movl $0x0, -0x4(%rbp)
jmp 0x78d1
jmp 0x7814
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x77d1
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x7855
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
jmp 0x785d
xorl %eax, %eax
movq %rax, -0x58(%rbp)
jmp 0x785d
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x78c1
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x5f30
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x7894
movl $0x0, -0x4(%rbp)
jmp 0x78d1
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x75f0
cmpl $0x0, %eax
jne 0x78b2
movl $0x0, -0x4(%rbp)
jmp 0x78d1
jmp 0x78b4
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x7865
movl $0x1, -0x4(%rbp)
jmp 0x78d1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)