// File: /workspace/github_c_makefile_star2_O0/lengjingzju[P]json/json.c
// Function: json_search_object_item
json_object *json_search_object_item(json_items_t *items, json_string_t *jkey, uint32_t hash)
{
    int left = 0, right = 0, middle = 0, i = 0, count = 0;
    json_object *json = NULL;
    if (!hash)
        hash = json_string_hash_code(jkey);

    count = items->count;
    if (!count)
        return NULL;

    right = count - 1;
    while (left <= right) {
        middle = (left + right) >> 1;
        if (hash == items->items[middle].hash) {
            if (!items->conflicted)
                return items->items[middle].json;

            if (jkey->len) {
                for (i = middle; i < count; ++i) {
                    if (hash != items->items[i].hash)
                        break;
                    json = items->items[i].json;
                    if (jkey->len == json->jkey.len && memcmp(jkey->str, json->key_member, jkey->len) == 0)
                        return json;
                }
                for (i = middle - 1; i >= 0; --i) {
                    if (hash != items->items[i].hash)
                        break;
                    json = items->items[i].json;
                    if (jkey->len == json->jkey.len && memcmp(jkey->str, json->key_member, jkey->len) == 0)
                        return json;
                }
            } else {
                for (i = middle; i < count; ++i) {
                    if (hash != items->items[i].hash)
                        break;
                    json = items->items[i].json;
                    if (!json->jkey.len)
                        return json;
                }
                for (i = middle - 1; i >= 0; --i) {
                    if (hash != items->items[i].hash)
                        break;
                    json = items->items[i].json;
                    if (!json->jkey.len)
                        return json;
                }
            }
            return NULL;
        }

        if (hash > items->items[middle].hash)
            left = middle + 1;
        else
            right = middle - 1;
    }

    return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %edx, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x3ae7
movq 0x20(%rsp), %rdi
callq 0x2130
movl %eax, 0x1c(%rsp)
movq 0x28(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x3b08
movq $0x0, 0x30(%rsp)
jmp 0x3e41
movl 0x8(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x14(%rsp), %eax
jg 0x3e38
movl 0x18(%rsp), %eax
addl 0x14(%rsp), %eax
sarl %eax
movl %eax, 0x10(%rsp)
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x10(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jne 0x3dfe
movq 0x28(%rsp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x3b82
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x10(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e41
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
cmpl $0x0, %eax
je 0x3d00
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x3c48
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0xc(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x3bca
jmp 0x3c48
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movq (%rsp), %rcx
movl 0x8(%rcx), %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
jne 0x3c36
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2160
cmpl $0x0, %eax
jne 0x3c36
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e41
jmp 0x3c38
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3b9d
movl 0x10(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x3cfb
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0xc(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x3c7d
jmp 0x3cfb
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movq (%rsp), %rcx
movl 0x8(%rcx), %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
jne 0x3ce9
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x20(%rsp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movl %eax, %eax
movl %eax, %edx
callq 0x2160
cmpl $0x0, %eax
jne 0x3ce9
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e41
jmp 0x3ceb
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3c53
jmp 0x3df3
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x8(%rsp), %eax
jge 0x3d7a
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0xc(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x3d31
jmp 0x3d7a
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x8, %eax
cmpl $0x0, %eax
jne 0x3d6b
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e41
jmp 0x3d6d
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3d08
movl 0x10(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x3df1
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0xc(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
je 0x3dab
jmp 0x3df1
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl 0x8(%rax), %eax
shrl $0x8, %eax
cmpl $0x0, %eax
jne 0x3de2
movq (%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x3e41
jmp 0x3de4
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x3d85
jmp 0x3df3
movq $0x0, 0x30(%rsp)
jmp 0x3e41
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq 0x10(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
cmpl (%rcx), %eax
jbe 0x3e28
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x3e33
movl 0x10(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3b13
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax,%rax)