// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x6c0ca(%rip), %rdi     # 0x8f6d3
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa41e1(%rip)     # 0xc7800
leaq 0x67220(%rip), %rdi     # 0x8a846
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa41cc(%rip)     # 0xc7808
leaq 0x67209(%rip), %rdi     # 0x8a84c
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa41b7(%rip)     # 0xc7810
leaq 0x671f3(%rip), %rdi     # 0x8a853
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa41a2(%rip)     # 0xc7818
leaq 0x671dd(%rip), %rdi     # 0x8a85a
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa418d(%rip)     # 0xc7820
leaq 0x671c5(%rip), %rdi     # 0x8a85f
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4178(%rip)     # 0xc7828
leaq 0x671ad(%rip), %rdi     # 0x8a864
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4163(%rip)     # 0xc7830
leaq 0x67196(%rip), %rdi     # 0x8a86a
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4166(%rip)     # 0xc7850
leaq 0x6717f(%rip), %rdi     # 0x8a870
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4151(%rip)     # 0xc7858
leaq 0x67185(%rip), %rdi     # 0x8a893
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4144(%rip)     # 0xc7868
leaq 0x6714b(%rip), %rdi     # 0x8a876
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa40f7(%rip)     # 0xc7838
leaq 0x67136(%rip), %rdi     # 0x8a87e
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4102(%rip)     # 0xc7860
leaq 0x67123(%rip), %rdi     # 0x8a888
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa41cd(%rip)     # 0xc7948
leaq 0x67116(%rip), %rdi     # 0x8a898
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa40d8(%rip)     # 0xc7870
leaq 0x6713e(%rip), %rdi     # 0x8a8dd
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa40c3(%rip)     # 0xc7878
leaq 0x67134(%rip), %rdi     # 0x8a8f0
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa40ae(%rip)     # 0xc7880
leaq 0x6712b(%rip), %rdi     # 0x8a904
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4099(%rip)     # 0xc7888
leaq 0x67141(%rip), %rdi     # 0x8a937
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4084(%rip)     # 0xc7890
leaq 0x6713e(%rip), %rdi     # 0x8a951
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa406f(%rip)     # 0xc7898
leaq 0x67152(%rip), %rdi     # 0x8a982
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa405a(%rip)     # 0xc78a0
leaq 0x67167(%rip), %rdi     # 0x8a9b4
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4045(%rip)     # 0xc78a8
leaq 0x671a4(%rip), %rdi     # 0x8aa0e
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4038(%rip)     # 0xc78b8
leaq 0x671d9(%rip), %rdi     # 0x8aa60
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4013(%rip)     # 0xc78b0
leaq 0x67289(%rip), %rdi     # 0x8ab2d
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa4006(%rip)     # 0xc78c0
leaq 0x672a3(%rip), %rdi     # 0x8ab64
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3ff9(%rip)     # 0xc78d0
leaq 0x672a9(%rip), %rdi     # 0x8ab87
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3ff4(%rip)     # 0xc78e8
leaq 0x672c7(%rip), %rdi     # 0x8abc2
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3fb7(%rip)     # 0xc78c8
leaq 0x672e9(%rip), %rdi     # 0x8ac01
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3faa(%rip)     # 0xc78d8
leaq 0x672fb(%rip), %rdi     # 0x8ac30
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3f95(%rip)     # 0xc78e0
leaq 0x6ca81(%rip), %rdi     # 0x903d3
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3ed8(%rip)     # 0xc7840
leaq 0x74a0f(%rip), %rdi     # 0x9837e
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3ec3(%rip)     # 0xc7848
leaq 0x672cf(%rip), %rdi     # 0x8ac5b
callq 0x271cd
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0xa3f4e(%rip)     # 0xc78f0
movq %rsp, %rbx
pushq $0x40
popq %r14
leaq 0x672ad(%rip), %r15     # 0x8ac5d
leaq 0xa3e49(%rip), %r13     # 0xc7800
xorl %r12d, %r12d
cmpq $0xa, %r12
je 0x239fe
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2e511
movl %eax, %ebp
callq 0x271bf
movq %rax, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2763d
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0x160(%r13,%r12,8)
incq %r12
jmp 0x239ba
leaq 0x67272(%rip), %rdi     # 0x8ac77
pushq $0xd
popq %rsi
callq 0x2ea81
movq %rax, 0xa3ee4(%rip)     # 0xc78f8
leaq 0x6726a(%rip), %rdi     # 0x8ac85
pushq $0xe
popq %rsi
callq 0x2ea81
movq %rax, 0xa3ed6(%rip)     # 0xc7900
leaq 0x67263(%rip), %rdi     # 0x8ac94
pushq $0xf
popq %rsi
callq 0x2ea81
movq %rax, 0xa3ec8(%rip)     # 0xc7908
leaq 0x6725d(%rip), %rdi     # 0x8aca4
pushq $0x12
popq %rsi
callq 0x2ea81
movq %rax, 0xa3eba(%rip)     # 0xc7910
leaq 0x6725a(%rip), %rdi     # 0x8acb7
pushq $0x11
popq %rsi
callq 0x2ea81
movq %rax, 0xa3eac(%rip)     # 0xc7918
leaq 0x67256(%rip), %rdi     # 0x8acc9
pushq $0x13
popq %rsi
callq 0x2ea81
movq %rax, 0xa3e9e(%rip)     # 0xc7920
leaq 0x67254(%rip), %rdi     # 0x8acdd
pushq $0x3
popq %rsi
callq 0x2ea81
movq %rax, 0xa3e90(%rip)     # 0xc7928
leaq 0x67242(%rip), %rdi     # 0x8ace1
pushq $0x4
popq %rbx
movq %rbx, %rsi
callq 0x2ea81
movq %rax, 0xa3e7f(%rip)     # 0xc7930
leaq 0x6722e(%rip), %rdi     # 0x8ace6
movq %rbx, %rsi
callq 0x2ea81
movq %rax, 0xa3e71(%rip)     # 0xc7938
leaq 0x6721d(%rip), %rdi     # 0x8aceb
pushq $0x5
popq %rsi
callq 0x2ea81
movq %rax, 0xa3e63(%rip)     # 0xc7940
xorl %ebx, %ebx
movl $0xffffff0f, %ebp       # imm = 0xFFFFFF0F
cmpq $0x2710, %rbx           # imm = 0x2710
je 0x23b0d
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2e9b4
movq %rax, 0x1b0(%r13,%rbx,8)
movl (%rax), %ecx
andl %ebp, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
incq %rbx
jmp 0x23ae4
leaq 0x671dd(%rip), %rbx     # 0x8acf1
leaq 0x671dc(%rip), %r14     # 0x8acf7
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0x23b77
callq 0x271bf
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2763d
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0x13a30(%r13,%r15,8)
callq 0x271bf
movq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2763d
xorl %edi, %edi
movq %rax, %rsi
callq 0x2e9b4
movq %rax, 0x13b30(%r13,%r15,8)
incq %r15
jmp 0x23b1e
leaq 0x6717f(%rip), %rdi     # 0x8acfd
pushq $0x9
popq %rbx
movq %rbx, %rsi
callq 0x2ea81
movq %rax, 0xa3dc0(%rip)     # 0xc7950
leaq 0x67170(%rip), %rdi     # 0x8ad07
movq %rbx, %rsi
callq 0x2ea81
movq %rax, 0xa3db2(%rip)     # 0xc7958
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq