// File: /workspace/github_c_makefile_star2_O3/nilyang[P]redis-tdd-annotation/src/rdb.c
// Function: rdbSaveObjectType
int rdbSaveObjectType(rio *rdb, robj *o) {

    switch (o->type) {

    case REDIS_STRING:
        return rdbSaveType(rdb,REDIS_RDB_TYPE_STRING);

    case REDIS_LIST:
        if (o->encoding == REDIS_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_LIST_ZIPLIST);
        else if (o->encoding == REDIS_ENCODING_LINKEDLIST)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_LIST);
        else
            redisPanic("Unknown list encoding");

    case REDIS_SET:
        if (o->encoding == REDIS_ENCODING_INTSET)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_SET_INTSET);
        else if (o->encoding == REDIS_ENCODING_HT)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_SET);
        else
            redisPanic("Unknown set encoding");

    case REDIS_ZSET:
        if (o->encoding == REDIS_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_ZSET_ZIPLIST);
        else if (o->encoding == REDIS_ENCODING_SKIPLIST)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_ZSET);
        else
            redisPanic("Unknown sorted set encoding");

    case REDIS_HASH:
        if (o->encoding == REDIS_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_HASH_ZIPLIST);
        else if (o->encoding == REDIS_ENCODING_HT)
            return rdbSaveType(rdb,REDIS_RDB_TYPE_HASH);
        else
            redisPanic("Unknown hash encoding");

    default:
        redisPanic("Unknown object type");
    }

    return -1; /* avoid warning */
}

// Assembly:
subq $0x18, %rsp
movl (%rsi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x36fbf
leaq 0x61af3(%rip), %rdx     # 0x989ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
jmp 0x36fb0
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x36f8a
cmpl $0x5, %eax
jne 0x36fd4
leaq 0x16(%rsp), %rsi
movb $0xd, (%rsi)
jmp 0x36fb0
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x36f94
cmpl $0x6, %eax
jne 0x36fe9
leaq 0x12(%rsp), %rsi
movb $0xb, (%rsi)
jmp 0x36fb0
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x36f9e
cmpl $0x5, %eax
jne 0x36ffe
leaq 0x14(%rsp), %rsi
movb $0xc, (%rsi)
jmp 0x36fb0
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x4, %eax
je 0x36fa8
cmpl $0x5, %eax
jne 0x37013
leaq 0x10(%rsp), %rsi
movb $0xa, (%rsi)
jmp 0x36fb0
leaq 0x17(%rsp), %rsi
movb $0x4, (%rsi)
jmp 0x36fb0
leaq 0x13(%rsp), %rsi
movb $0x2, (%rsi)
jmp 0x36fb0
leaq 0x15(%rsp), %rsi
movb $0x3, (%rsi)
jmp 0x36fb0
leaq 0x11(%rsp), %rsi
movb $0x1, (%rsi)
movl $0x1, %edx
callq 0x361b8
addq $0x18, %rsp
retq
leaq 0x6044d(%rip), %rdi     # 0x97413
leaq 0x61acb(%rip), %rsi     # 0x98a98
movl $0x2bb, %edx            # imm = 0x2BB
jmp 0x37026
leaq 0x61b34(%rip), %rdi     # 0x98b0f
leaq 0x61ab6(%rip), %rsi     # 0x98a98
movl $0x2b8, %edx            # imm = 0x2B8
jmp 0x37026
leaq 0x61b08(%rip), %rdi     # 0x98af8
leaq 0x61aa1(%rip), %rsi     # 0x98a98
movl $0x2a8, %edx            # imm = 0x2A8
jmp 0x37026
leaq 0x603ae(%rip), %rdi     # 0x973b3
leaq 0x61a8c(%rip), %rsi     # 0x98a98
movl $0x2b0, %edx            # imm = 0x2B0
jmp 0x37026
leaq 0x61ac6(%rip), %rdi     # 0x98ae0
leaq 0x61a77(%rip), %rsi     # 0x98a98
movl $0x2a0, %edx            # imm = 0x2A0
callq 0x4cae0
movl $0x1, %edi
callq 0x1f3b0