// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/redis.c
// Function: createSharedObjects
void createSharedObjects(void) {
    int j;

    // 常用回复
    shared.crlf = createObject(REDIS_STRING,sdsnew("\r\n"));
    shared.ok = createObject(REDIS_STRING,sdsnew("+OK\r\n"));
    shared.err = createObject(REDIS_STRING,sdsnew("-ERR\r\n"));
    shared.emptybulk = createObject(REDIS_STRING,sdsnew("$0\r\n\r\n"));
    shared.czero = createObject(REDIS_STRING,sdsnew(":0\r\n"));
    shared.cone = createObject(REDIS_STRING,sdsnew(":1\r\n"));
    shared.cnegone = createObject(REDIS_STRING,sdsnew(":-1\r\n"));
    shared.nullbulk = createObject(REDIS_STRING,sdsnew("$-1\r\n"));
    shared.nullmultibulk = createObject(REDIS_STRING,sdsnew("*-1\r\n"));
    shared.emptymultibulk = createObject(REDIS_STRING,sdsnew("*0\r\n"));
    shared.pong = createObject(REDIS_STRING,sdsnew("+PONG\r\n"));
    shared.queued = createObject(REDIS_STRING,sdsnew("+QUEUED\r\n"));
    shared.emptyscan = createObject(REDIS_STRING,sdsnew("*2\r\n$1\r\n0\r\n*0\r\n"));
    // 常用错误回复
    shared.wrongtypeerr = createObject(REDIS_STRING,sdsnew(
        "-WRONGTYPE Operation against a key holding the wrong kind of value\r\n"));
    shared.nokeyerr = createObject(REDIS_STRING,sdsnew(
        "-ERR no such key\r\n"));
    shared.syntaxerr = createObject(REDIS_STRING,sdsnew(
        "-ERR syntax error\r\n"));
    shared.sameobjecterr = createObject(REDIS_STRING,sdsnew(
        "-ERR source and destination objects are the same\r\n"));
    shared.outofrangeerr = createObject(REDIS_STRING,sdsnew(
        "-ERR index out of range\r\n"));
    shared.noscripterr = createObject(REDIS_STRING,sdsnew(
        "-NOSCRIPT No matching script. Please use EVAL.\r\n"));
    shared.loadingerr = createObject(REDIS_STRING,sdsnew(
        "-LOADING Redis is loading the dataset in memory\r\n"));
    shared.slowscripterr = createObject(REDIS_STRING,sdsnew(
        "-BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.\r\n"));
    shared.masterdownerr = createObject(REDIS_STRING,sdsnew(
        "-MASTERDOWN Link with MASTER is down and slave-serve-stale-data is set to 'no'.\r\n"));
    shared.bgsaveerr = createObject(REDIS_STRING,sdsnew(
        "-MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.\r\n"));
    shared.roslaveerr = createObject(REDIS_STRING,sdsnew(
        "-READONLY You can't write against a read only slave.\r\n"));
    shared.noautherr = createObject(REDIS_STRING,sdsnew(
        "-NOAUTH Authentication required.\r\n"));
    shared.oomerr = createObject(REDIS_STRING,sdsnew(
        "-OOM command not allowed when used memory > 'maxmemory'.\r\n"));
    shared.execaborterr = createObject(REDIS_STRING,sdsnew(
        "-EXECABORT Transaction discarded because of previous errors.\r\n"));
    shared.noreplicaserr = createObject(REDIS_STRING,sdsnew(
        "-NOREPLICAS Not enough good slaves to write.\r\n"));
    shared.busykeyerr = createObject(REDIS_STRING,sdsnew(
        "-BUSYKEY Target key name already exists.\r\n"));

    // 常用字符
    shared.space = createObject(REDIS_STRING,sdsnew(" "));
    shared.colon = createObject(REDIS_STRING,sdsnew(":"));
    shared.plus = createObject(REDIS_STRING,sdsnew("+"));

    // 常用 SELECT 命令
    for (j = 0; j < REDIS_SHARED_SELECT_CMDS; j++) {
        char dictid_str[64];
        int dictid_len;

        dictid_len = ll2string(dictid_str,sizeof(dictid_str),j);
        shared.select[j] = createObject(REDIS_STRING,
            sdscatprintf(sdsempty(),
                "*2\r\n$6\r\nSELECT\r\n$%d\r\n%s\r\n",
                dictid_len, dictid_str));
    }

    // 发布与订阅的有关回复
    shared.messagebulk = createStringObject("$7\r\nmessage\r\n",13);
    shared.pmessagebulk = createStringObject("$8\r\npmessage\r\n",14);
    shared.subscribebulk = createStringObject("$9\r\nsubscribe\r\n",15);
    shared.unsubscribebulk = createStringObject("$11\r\nunsubscribe\r\n",18);
    shared.psubscribebulk = createStringObject("$10\r\npsubscribe\r\n",17);
    shared.punsubscribebulk = createStringObject("$12\r\npunsubscribe\r\n",19);

    // 常用命令
    shared.del = createStringObject("DEL",3);
    shared.rpop = createStringObject("RPOP",4);
    shared.lpop = createStringObject("LPOP",4);
    shared.lpush = createStringObject("LPUSH",5);

    // 常用整数
    for (j = 0; j < REDIS_SHARED_INTEGERS; j++) {
        shared.integers[j] = createObject(REDIS_STRING,(void*)(long)j);
        shared.integers[j]->encoding = REDIS_ENCODING_INT;
    }

    // 常用长度 bulk 或者 multi bulk 回复
    for (j = 0; j < REDIS_SHARED_BULKHDR_LEN; j++) {
        shared.mbulkhdr[j] = createObject(REDIS_STRING,
            sdscatprintf(sdsempty(),"*%d\r\n",j));
        shared.bulkhdr[j] = createObject(REDIS_STRING,
            sdscatprintf(sdsempty(),"$%d\r\n",j));
    }
    /* The following two shared objects, minstring and maxstrings, are not
     * actually used for their value but as a special object meaning
     * respectively the minimum possible string and the maximum possible
     * string in string comparisons for the ZRANGEBYLEX command. */
    shared.minstring = createStringObject("minstring",9);
    shared.maxstring = createStringObject("maxstring",9);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0xbcdff(%rip), %rdi     # 0xe37de
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed75b(%rip)     # 0x114150
leaq 0xb7eb2(%rip), %rdi     # 0xde8ae
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed746(%rip)     # 0x114158
leaq 0xb7e9b(%rip), %rdi     # 0xde8b4
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed731(%rip)     # 0x114160
leaq 0xb7e85(%rip), %rdi     # 0xde8bb
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed71c(%rip)     # 0x114168
leaq 0xb7e6f(%rip), %rdi     # 0xde8c2
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed707(%rip)     # 0x114170
leaq 0xb7e57(%rip), %rdi     # 0xde8c7
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed6f2(%rip)     # 0x114178
leaq 0xb7e3f(%rip), %rdi     # 0xde8cc
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed6dd(%rip)     # 0x114180
leaq 0xb7e28(%rip), %rdi     # 0xde8d2
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed6e0(%rip)     # 0x1141a0
leaq 0xb7e11(%rip), %rdi     # 0xde8d8
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed6cb(%rip)     # 0x1141a8
leaq 0xb7e17(%rip), %rdi     # 0xde8fb
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed6be(%rip)     # 0x1141b8
leaq 0xb7ddd(%rip), %rdi     # 0xde8de
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed671(%rip)     # 0x114188
leaq 0xb7dc8(%rip), %rdi     # 0xde8e6
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed67c(%rip)     # 0x1141b0
leaq 0xb7db5(%rip), %rdi     # 0xde8f0
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed747(%rip)     # 0x114298
leaq 0xb7da8(%rip), %rdi     # 0xde900
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed652(%rip)     # 0x1141c0
leaq 0xb7dd0(%rip), %rdi     # 0xde945
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed63d(%rip)     # 0x1141c8
leaq 0xb7dc6(%rip), %rdi     # 0xde958
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed628(%rip)     # 0x1141d0
leaq 0xb7dbd(%rip), %rdi     # 0xde96c
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed613(%rip)     # 0x1141d8
leaq 0xb7dd3(%rip), %rdi     # 0xde99f
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed5fe(%rip)     # 0x1141e0
leaq 0xb7dd0(%rip), %rdi     # 0xde9b9
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed5e9(%rip)     # 0x1141e8
leaq 0xb7de4(%rip), %rdi     # 0xde9ea
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed5d4(%rip)     # 0x1141f0
leaq 0xb7df9(%rip), %rdi     # 0xdea1c
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed5bf(%rip)     # 0x1141f8
leaq 0xb7e36(%rip), %rdi     # 0xdea76
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed5b2(%rip)     # 0x114208
leaq 0xb7e6b(%rip), %rdi     # 0xdeac8
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed58d(%rip)     # 0x114200
leaq 0xb7f1b(%rip), %rdi     # 0xdeb95
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed580(%rip)     # 0x114210
leaq 0xb7f35(%rip), %rdi     # 0xdebcc
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed573(%rip)     # 0x114220
leaq 0xb7f3b(%rip), %rdi     # 0xdebef
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed56e(%rip)     # 0x114238
leaq 0xb7f59(%rip), %rdi     # 0xdec2a
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed531(%rip)     # 0x114218
leaq 0xb7f7b(%rip), %rdi     # 0xdec69
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed524(%rip)     # 0x114228
leaq 0xb7f8d(%rip), %rdi     # 0xdec98
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed50f(%rip)     # 0x114230
leaq 0xbd7b6(%rip), %rdi     # 0xe44de
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed452(%rip)     # 0x114190
leaq 0xc5941(%rip), %rdi     # 0xec686
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed43d(%rip)     # 0x114198
leaq 0xb7f61(%rip), %rdi     # 0xdecc3
callq 0x2c0e0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, 0xed4c8(%rip)     # 0x114240
movl $0x0, -0x4(%rbp)
cmpl $0xa, -0x4(%rbp)
jge 0x26de2
leaq -0x50(%rbp), %rdi
movslq -0x4(%rbp), %rdx
movl $0x40, %esi
callq 0x39660
movl %eax, -0x54(%rbp)
callq 0x2c0c0
movq %rax, %rdi
movl -0x54(%rbp), %edx
leaq -0x50(%rbp), %rcx
leaq 0xb7f15(%rip), %rsi     # 0xdecc5
movb $0x0, %al
callq 0x2cad0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0xed381(%rip), %rax     # 0x114150
movq %rdx, 0x160(%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x26d7f
leaq 0xb7ef6(%rip), %rdi     # 0xdecdf
movl $0xd, %esi
callq 0x3a2e0
movq %rax, 0xed44e(%rip)     # 0x114248
leaq 0xb7eec(%rip), %rdi     # 0xdeced
movl $0xe, %esi
callq 0x3a2e0
movq %rax, 0xed43e(%rip)     # 0x114250
leaq 0xb7ee3(%rip), %rdi     # 0xdecfc
movl $0xf, %esi
callq 0x3a2e0
movq %rax, 0xed42e(%rip)     # 0x114258
leaq 0xb7edb(%rip), %rdi     # 0xded0c
movl $0x12, %esi
callq 0x3a2e0
movq %rax, 0xed41e(%rip)     # 0x114260
leaq 0xb7ed6(%rip), %rdi     # 0xded1f
movl $0x11, %esi
callq 0x3a2e0
movq %rax, 0xed40e(%rip)     # 0x114268
leaq 0xb7ed0(%rip), %rdi     # 0xded31
movl $0x13, %esi
callq 0x3a2e0
movq %rax, 0xed3fe(%rip)     # 0x114270
leaq 0xb7ecc(%rip), %rdi     # 0xded45
movl $0x3, %esi
callq 0x3a2e0
movq %rax, 0xed3ee(%rip)     # 0x114278
leaq 0xb7eb8(%rip), %rdi     # 0xded49
movl $0x4, %esi
callq 0x3a2e0
movq %rax, 0xed3de(%rip)     # 0x114280
leaq 0xb7ea5(%rip), %rdi     # 0xded4e
movl $0x4, %esi
callq 0x3a2e0
movq %rax, 0xed3ce(%rip)     # 0x114288
leaq 0xb7e92(%rip), %rdi     # 0xded53
movl $0x5, %esi
callq 0x3a2e0
movq %rax, 0xed3be(%rip)     # 0x114290
movl $0x0, -0x4(%rbp)
cmpl $0x2710, -0x4(%rbp)     # imm = 0x2710
jge 0x26f2e
movslq -0x4(%rbp), %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0xed255(%rip), %rax     # 0x114150
movq %rdx, 0x1b0(%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0xed242(%rip), %rax     # 0x114150
movq 0x1b0(%rax,%rcx,8), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x10, %ecx
movl %ecx, (%rax)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x26ed9
movl $0x0, -0x4(%rbp)
cmpl $0x20, -0x4(%rbp)
jge 0x26fbf
callq 0x2c0c0
movq %rax, %rdi
movl -0x4(%rbp), %edx
leaq 0xb7e08(%rip), %rsi     # 0xded59
movb $0x0, %al
callq 0x2cad0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0xed1e0(%rip), %rax     # 0x114150
movq %rdx, 0x13a30(%rax,%rcx,8)
callq 0x2c0c0
movq %rax, %rdi
movl -0x4(%rbp), %edx
leaq 0xb7dd5(%rip), %rsi     # 0xded5f
movb $0x0, %al
callq 0x2cad0
movq %rax, %rsi
xorl %edi, %edi
callq 0x3a0d0
movq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0xed1a7(%rip), %rax     # 0x114150
movq %rdx, 0x13b30(%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x26f35
leaq 0xb7d9f(%rip), %rdi     # 0xded65
movl $0x9, %esi
callq 0x3a2e0
movq %rax, 0xed2c9(%rip)     # 0x1142a0
leaq 0xb7d91(%rip), %rdi     # 0xded6f
movl $0x9, %esi
callq 0x3a2e0
movq %rax, 0xed2b9(%rip)     # 0x1142a8
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)