// File: /workspace/github_c_makefile_star2_O1/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 0x36d83
leaq 0x61cbf(%rip), %rdx     # 0x9897c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0xf(%rsp), %rsi
movb $0x0, (%rsi)
jmp 0x36d74
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x36d4e
cmpl $0x5, %eax
jne 0x36d98
leaq 0x16(%rsp), %rsi
movb $0xd, (%rsi)
jmp 0x36d74
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x36d58
cmpl $0x6, %eax
jne 0x36dad
leaq 0x12(%rsp), %rsi
movb $0xb, (%rsi)
jmp 0x36d74
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x36d62
cmpl $0x5, %eax
jne 0x36dc2
leaq 0x14(%rsp), %rsi
movb $0xc, (%rsi)
jmp 0x36d74
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x4, %eax
je 0x36d6c
cmpl $0x5, %eax
jne 0x36dd7
leaq 0x10(%rsp), %rsi
movb $0xa, (%rsi)
jmp 0x36d74
leaq 0x17(%rsp), %rsi
movb $0x4, (%rsi)
jmp 0x36d74
leaq 0x13(%rsp), %rsi
movb $0x2, (%rsi)
jmp 0x36d74
leaq 0x15(%rsp), %rsi
movb $0x3, (%rsi)
jmp 0x36d74
leaq 0x11(%rsp), %rsi
movb $0x1, (%rsi)
movl $0x1, %edx
callq 0x35d7c
addq $0x18, %rsp
retq
leaq 0x60629(%rip), %rdi     # 0x973b3
leaq 0x61cab(%rip), %rsi     # 0x98a3c
movl $0x2bb, %edx            # imm = 0x2BB
jmp 0x36dea
leaq 0x61d14(%rip), %rdi     # 0x98ab3
leaq 0x61c96(%rip), %rsi     # 0x98a3c
movl $0x2b8, %edx            # imm = 0x2B8
jmp 0x36dea
leaq 0x61ce8(%rip), %rdi     # 0x98a9c
leaq 0x61c81(%rip), %rsi     # 0x98a3c
movl $0x2a8, %edx            # imm = 0x2A8
jmp 0x36dea
leaq 0x6058a(%rip), %rdi     # 0x97353
leaq 0x61c6c(%rip), %rsi     # 0x98a3c
movl $0x2b0, %edx            # imm = 0x2B0
jmp 0x36dea
leaq 0x61ca6(%rip), %rdi     # 0x98a84
leaq 0x61c57(%rip), %rsi     # 0x98a3c
movl $0x2a0, %edx            # imm = 0x2A0
callq 0x4d0e5
movl $0x1, %edi
callq 0x1f3b0