// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiFind
int zuiFind(zsetopsrc *op, zsetopval *val, double *score) {
    if (op->subject == NULL)
        return 0;

    if (op->type == OBJ_SET) {
        if (op->encoding == OBJ_ENCODING_INTSET) {
            if (zuiLongLongFromValue(val) &&
                intsetFind(op->subject->ptr,val->ell))
            {
                *score = 1.0;
                return 1;
            } else {
                return 0;
            }
        } else if (op->encoding == OBJ_ENCODING_HT) {
            dict *ht = op->subject->ptr;
            zuiObjectFromValue(val);
            if (dictFind(ht,val->ele) != NULL) {
                *score = 1.0;
                return 1;
            } else {
                return 0;
            }
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        zuiObjectFromValue(val);

        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            if (zzlFind(op->subject->ptr,val->ele,score) != NULL) {
                /* Score is already set by zzlFind. */
                return 1;
            } else {
                return 0;
            }
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            zset *zs = op->subject->ptr;
            dictEntry *de;
            if ((de = dictFind(zs->dict,val->ele)) != NULL) {
                *score = *(double*)dictGetVal(de);
                return 1;
            } else {
                return 0;
            }
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x6352a
movl $0x0, -0x4(%rbp)
jmp 0x63717
movq -0x10(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x6361b
movq -0x10(%rbp), %rax
cmpl $0x6, 0xc(%rax)
jne 0x63598
movq -0x18(%rbp), %rdi
callq 0x631d0
cmpl $0x0, %eax
je 0x6358c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x7b900
movzbl %al, %eax
cmpl $0x0, %eax
je 0x6358c
movq -0x20(%rbp), %rax
movsd 0xd3eec(%rip), %xmm0    # 0x137468
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x63717
movl $0x0, -0x4(%rbp)
jmp 0x63717
movq -0x10(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x635f9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x63340
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x2dcb0
cmpq $0x0, %rax
je 0x635ed
movq -0x20(%rbp), %rax
movsd 0xd3e8b(%rip), %xmm0    # 0x137468
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x63717
movl $0x0, -0x4(%rbp)
jmp 0x63717
leaq 0xd9bfd(%rip), %rdi     # 0x13d1fd
leaq 0xda61b(%rip), %rsi     # 0x13dc22
movl $0x75a, %edx            # imm = 0x75A
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
cmpl $0x3, 0x8(%rax)
jne 0x636f5
movq -0x18(%rbp), %rdi
callq 0x63340
movq -0x10(%rbp), %rax
cmpl $0x5, 0xc(%rax)
jne 0x63676
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x60970
cmpq $0x0, %rax
je 0x6366a
movl $0x1, -0x4(%rbp)
jmp 0x63717
movl $0x0, -0x4(%rbp)
jmp 0x63717
movq -0x10(%rbp), %rax
cmpl $0x7, 0xc(%rax)
jne 0x636d3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x2dcb0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x636ca
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsd (%rax), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x63717
movl $0x0, -0x4(%rbp)
jmp 0x63717
leaq 0xd8010(%rip), %rdi     # 0x13b6ea
leaq 0xda541(%rip), %rsi     # 0x13dc22
movl $0x770, %edx            # imm = 0x770
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
leaq 0xda7d5(%rip), %rdi     # 0x13ded1
leaq 0xda51f(%rip), %rsi     # 0x13dc22
movl $0x773, %edx            # imm = 0x773
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq