// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hashTypeConvertZiplist
void hashTypeConvertZiplist(robj *o, int enc) {
    serverAssert(o->encoding == OBJ_ENCODING_ZIPLIST);

    if (enc == OBJ_ENCODING_ZIPLIST) {
        /* Nothing to do... */

    } else if (enc == OBJ_ENCODING_HT) {
        hashTypeIterator *hi;
        dict *dict;
        int ret;

        hi = hashTypeInitIterator(o);
        dict = dictCreate(&hashDictType, NULL);

        while (hashTypeNext(hi) != C_ERR) {
            robj *field, *value;

            field = hashTypeCurrentObject(hi, OBJ_HASH_KEY);
            field = tryObjectEncoding(field);
            value = hashTypeCurrentObject(hi, OBJ_HASH_VALUE);
            value = tryObjectEncoding(value);
            ret = dictAdd(dict, field, value);
            if (ret != DICT_OK) {
                serverLogHexDump(LL_WARNING,"ziplist with dup elements dump",
                    o->ptr,ziplistBlobLen(o->ptr));
                serverAssert(ret == DICT_OK);
            }
        }

        hashTypeReleaseIterator(hi);
        zfree(o->ptr);

        o->encoding = OBJ_ENCODING_HT;
        o->ptr = dict;

    } else {
        serverPanic("Unknown hash encoding");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x67382
jmp 0x673a4
leaq 0xd6ccf(%rip), %rdi     # 0x13e058
leaq 0xd6cec(%rip), %rsi     # 0x13e07c
movl $0x1b1, %edx            # imm = 0x1B1
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
cmpl $0x5, -0xc(%rbp)
jne 0x673af
jmp 0x674ff
cmpl $0x2, -0xc(%rbp)
jne 0x674db
movq -0x8(%rbp), %rdi
callq 0x66e10
movq %rax, -0x18(%rbp)
leaq 0x10fb03(%rip), %rdi    # 0x176ed0
xorl %eax, %eax
movl %eax, %esi
callq 0x2d330
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x66f00
cmpl $-0x1, %eax
je 0x674a6
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x67200
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x491b0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl $0x2, %esi
callq 0x67200
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x491b0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x2d8c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x674a1
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x41a50
movq -0x40(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0xd6c97(%rip), %rsi     # 0x13e107
callq 0x79750
cmpl $0x0, -0x24(%rbp)
jne 0x6747d
jmp 0x6749f
leaq 0xd6ca2(%rip), %rdi     # 0x13e126
leaq 0xd6bf1(%rip), %rsi     # 0x13e07c
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
jmp 0x674a1
jmp 0x673da
movq -0x18(%rbp), %rdi
callq 0x66ec0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3afa0
movq -0x8(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x20, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x674fd
leaq 0xd5d32(%rip), %rdi     # 0x13d214
leaq 0xd6b93(%rip), %rsi     # 0x13e07c
movl $0x1d4, %edx            # imm = 0x1D4
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x674ff
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)