// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x44139
movq -0x20(%rbp), %rax
leaq 0x9eb55(%rip), %rcx     # 0xe2ab8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x43fa6
movq -0x10(%rbp), %rdi
movl $0xa, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x43fcd
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
leaq 0x9eb78(%rip), %rdi     # 0xe2b4c
leaq 0x9eb29(%rip), %rsi     # 0xe2b04
movl $0x2a0, %edx            # imm = 0x2A0
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
jne 0x44016
movq -0x10(%rbp), %rdi
movl $0xb, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x4403d
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
leaq 0x9eb20(%rip), %rdi     # 0xe2b64
leaq 0x9eab9(%rip), %rsi     # 0xe2b04
movl $0x2a8, %edx            # imm = 0x2A8
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x44086
movq -0x10(%rbp), %rdi
movl $0xc, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
jne 0x440ad
movq -0x10(%rbp), %rdi
movl $0x3, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
leaq 0x9d3e7(%rip), %rdi     # 0xe149b
leaq 0x9ea49(%rip), %rsi     # 0xe2b04
movl $0x2b0, %edx            # imm = 0x2B0
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x440f3
movq -0x10(%rbp), %rdi
movl $0xd, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x44117
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x42f00
movl %eax, -0x4(%rbp)
jmp 0x4415b
leaq 0x9ea5d(%rip), %rdi     # 0xe2b7b
leaq 0x9e9df(%rip), %rsi     # 0xe2b04
movl $0x2b8, %edx            # imm = 0x2B8
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
leaq 0x9d3bb(%rip), %rdi     # 0xe14fb
leaq 0x9e9bd(%rip), %rsi     # 0xe2b04
movl $0x2bb, %edx            # imm = 0x2BB
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)