// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_zset.c
// Function: zuiInitIterator
void zuiInitIterator(zsetopsrc *op) {
    if (op->subject == NULL)
        return;

    if (op->type == OBJ_SET) {
        iterset *it = &op->iter.set;
        if (op->encoding == OBJ_ENCODING_INTSET) {
            it->is.is = op->subject->ptr;
            it->is.ii = 0;
        } else if (op->encoding == OBJ_ENCODING_HT) {
            it->ht.dict = op->subject->ptr;
            it->ht.di = dictGetIterator(op->subject->ptr);
            it->ht.de = dictNext(it->ht.di);
        } else {
            serverPanic("Unknown set encoding");
        }
    } else if (op->type == OBJ_ZSET) {
        iterzset *it = &op->iter.zset;
        if (op->encoding == OBJ_ENCODING_ZIPLIST) {
            it->zl.zl = op->subject->ptr;
            it->zl.eptr = ziplistIndex(it->zl.zl,0);
            if (it->zl.eptr != NULL) {
                it->zl.sptr = ziplistNext(it->zl.zl,it->zl.eptr);
                serverAssert(it->zl.sptr != NULL);
            }
        } else if (op->encoding == OBJ_ENCODING_SKIPLIST) {
            it->sl.zs = op->subject->ptr;
            it->sl.node = it->sl.zs->zsl->header->level[0].forward;
        } else {
            serverPanic("Unknown sorted set encoding");
        }
    } else {
        serverPanic("Unsupported type");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x62aab
jmp 0x62c9a
movq -0x8(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x62b68
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x6, 0xc(%rax)
jne 0x62aee
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x62b63
movq -0x8(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x62b3f
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x2e400
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2e4a0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x62b61
leaq 0xda6b7(%rip), %rdi     # 0x13d1fd
leaq 0xdb0d5(%rip), %rsi     # 0x13dc22
movl $0x67c, %edx            # imm = 0x67C
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x62b63
jmp 0x62c9a
movq -0x8(%rbp), %rax
cmpl $0x3, 0x8(%rax)
jne 0x62c76
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x5, 0xc(%rax)
jne 0x62c18
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x41120
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x62c16
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x412e0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x62bf2
jmp 0x62c14
leaq 0xdb2c4(%rip), %rdi     # 0x13debd
leaq 0xdb022(%rip), %rsi     # 0x13dc22
movl $0x685, %edx            # imm = 0x685
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
jmp 0x62c16
jmp 0x62c74
movq -0x8(%rbp), %rax
cmpl $0x7, 0xc(%rax)
jne 0x62c50
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x62c72
leaq 0xd8a93(%rip), %rdi     # 0x13b6ea
leaq 0xdafc4(%rip), %rsi     # 0x13dc22
movl $0x68b, %edx            # imm = 0x68B
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x62c74
jmp 0x62c98
leaq 0xdb254(%rip), %rdi     # 0x13ded1
leaq 0xdaf9e(%rip), %rsi     # 0x13dc22
movl $0x68e, %edx            # imm = 0x68E
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x62c9a
addq $0x20, %rsp
popq %rbp
retq