// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x7521c(%rip), %rdi     # 0x9970f
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62f7(%rip)     # 0xca800
leaq 0x70376(%rip), %rdi     # 0x94886
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62e2(%rip)     # 0xca808
leaq 0x7035f(%rip), %rdi     # 0x9488c
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62cd(%rip)     # 0xca810
leaq 0x70349(%rip), %rdi     # 0x94893
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62b8(%rip)     # 0xca818
leaq 0x70333(%rip), %rdi     # 0x9489a
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62a3(%rip)     # 0xca820
leaq 0x7031b(%rip), %rdi     # 0x9489f
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa628e(%rip)     # 0xca828
leaq 0x70303(%rip), %rdi     # 0x948a4
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6279(%rip)     # 0xca830
leaq 0x702ec(%rip), %rdi     # 0x948aa
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa627c(%rip)     # 0xca850
leaq 0x702d5(%rip), %rdi     # 0x948b0
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6267(%rip)     # 0xca858
leaq 0x702db(%rip), %rdi     # 0x948d3
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa625a(%rip)     # 0xca868
leaq 0x702a1(%rip), %rdi     # 0x948b6
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa620d(%rip)     # 0xca838
leaq 0x7028c(%rip), %rdi     # 0x948be
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6218(%rip)     # 0xca860
leaq 0x70279(%rip), %rdi     # 0x948c8
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa62e3(%rip)     # 0xca948
leaq 0x7026c(%rip), %rdi     # 0x948d8
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa61ee(%rip)     # 0xca870
leaq 0x70294(%rip), %rdi     # 0x9491d
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa61d9(%rip)     # 0xca878
leaq 0x7028a(%rip), %rdi     # 0x94930
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa61c4(%rip)     # 0xca880
leaq 0x70281(%rip), %rdi     # 0x94944
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa61af(%rip)     # 0xca888
leaq 0x70297(%rip), %rdi     # 0x94977
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa619a(%rip)     # 0xca890
leaq 0x70294(%rip), %rdi     # 0x94991
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6185(%rip)     # 0xca898
leaq 0x702a8(%rip), %rdi     # 0x949c2
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6170(%rip)     # 0xca8a0
leaq 0x702bd(%rip), %rdi     # 0x949f4
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa615b(%rip)     # 0xca8a8
leaq 0x702fa(%rip), %rdi     # 0x94a4e
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa614e(%rip)     # 0xca8b8
leaq 0x7032f(%rip), %rdi     # 0x94aa0
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6129(%rip)     # 0xca8b0
leaq 0x703df(%rip), %rdi     # 0x94b6d
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa611c(%rip)     # 0xca8c0
leaq 0x703f9(%rip), %rdi     # 0x94ba4
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa610f(%rip)     # 0xca8d0
leaq 0x703ff(%rip), %rdi     # 0x94bc7
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa610a(%rip)     # 0xca8e8
leaq 0x7041d(%rip), %rdi     # 0x94c02
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa60cd(%rip)     # 0xca8c8
leaq 0x7043f(%rip), %rdi     # 0x94c41
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa60c0(%rip)     # 0xca8d8
leaq 0x70451(%rip), %rdi     # 0x94c70
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa60ab(%rip)     # 0xca8e0
leaq 0x75bd3(%rip), %rdi     # 0x9a40f
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa5fee(%rip)     # 0xca840
leaq 0x7721e(%rip), %rdi     # 0x9ba77
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa5fd9(%rip)     # 0xca848
leaq 0x70425(%rip), %rdi     # 0x94c9b
callq 0x28486
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0xa6064(%rip)     # 0xca8f0
movq %rsp, %rbx
leaq 0x70407(%rip), %r14     # 0x94c9d
leaq 0xa5f63(%rip), %r12     # 0xca800
xorl %r15d, %r15d
movl $0x40, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x300c7
movl %eax, %ebp
callq 0x2845e
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x28a5e
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0x160(%r12,%r15,8)
incq %r15
cmpq $0xa, %r15
jne 0x248a0
leaq 0x703cc(%rip), %rdi     # 0x94cb7
movl $0xd, %esi
callq 0x3068f
movq %rax, 0xa5ffc(%rip)     # 0xca8f8
leaq 0x703c2(%rip), %rdi     # 0x94cc5
movl $0xe, %esi
callq 0x3068f
movq %rax, 0xa5fec(%rip)     # 0xca900
leaq 0x703b9(%rip), %rdi     # 0x94cd4
movl $0xf, %esi
callq 0x3068f
movq %rax, 0xa5fdc(%rip)     # 0xca908
leaq 0x703b1(%rip), %rdi     # 0x94ce4
movl $0x12, %esi
callq 0x3068f
movq %rax, 0xa5fcc(%rip)     # 0xca910
leaq 0x703ac(%rip), %rdi     # 0x94cf7
movl $0x11, %esi
callq 0x3068f
movq %rax, 0xa5fbc(%rip)     # 0xca918
leaq 0x703a6(%rip), %rdi     # 0x94d09
movl $0x13, %esi
callq 0x3068f
movq %rax, 0xa5fac(%rip)     # 0xca920
leaq 0x703a2(%rip), %rdi     # 0x94d1d
movl $0x3, %esi
callq 0x3068f
movq %rax, 0xa5f9c(%rip)     # 0xca928
leaq 0x7038e(%rip), %rdi     # 0x94d21
movl $0x4, %esi
callq 0x3068f
movq %rax, 0xa5f8c(%rip)     # 0xca930
leaq 0x7037b(%rip), %rdi     # 0x94d26
movl $0x4, %esi
callq 0x3068f
movq %rax, 0xa5f7c(%rip)     # 0xca938
leaq 0x70368(%rip), %rdi     # 0x94d2b
movl $0x5, %esi
callq 0x3068f
movq %rax, 0xa5f6c(%rip)     # 0xca940
xorl %ebx, %ebx
movl $0xffffff0f, %ebp       # imm = 0xFFFFFF0F
xorl %edi, %edi
movq %rbx, %rsi
callq 0x3059c
movq %rax, 0x1b0(%r12,%rbx,8)
movl (%rax), %ecx
andl %ebp, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
incq %rbx
cmpq $0x2710, %rbx           # imm = 0x2710
jne 0x249db
leaq 0x70328(%rip), %rbx     # 0x94d31
leaq 0x70327(%rip), %r14     # 0x94d37
xorl %r15d, %r15d
callq 0x2845e
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x28a5e
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0x13a30(%r12,%r15,8)
callq 0x2845e
movq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x28a5e
xorl %edi, %edi
movq %rax, %rsi
callq 0x3059c
movq %rax, 0x13b30(%r12,%r15,8)
incq %r15
cmpq $0x20, %r15
jne 0x24a13
leaq 0x702cc(%rip), %rdi     # 0x94d3d
movl $0x9, %esi
callq 0x3068f
movq %rax, 0xa5ece(%rip)     # 0xca950
leaq 0x702be(%rip), %rdi     # 0x94d47
movl $0x9, %esi
callq 0x3068f
movq %rax, 0xa5ebe(%rip)     # 0xca958
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq