// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/src/server.c
// Function: createSharedObjects
void createSharedObjects(void) {
    int j;

    shared.crlf = createObject(OBJ_STRING,sdsnew("\r\n"));
    shared.ok = createObject(OBJ_STRING,sdsnew("+OK\r\n"));
    shared.err = createObject(OBJ_STRING,sdsnew("-ERR\r\n"));
    shared.emptybulk = createObject(OBJ_STRING,sdsnew("$0\r\n\r\n"));
    shared.czero = createObject(OBJ_STRING,sdsnew(":0\r\n"));
    shared.cone = createObject(OBJ_STRING,sdsnew(":1\r\n"));
    shared.cnegone = createObject(OBJ_STRING,sdsnew(":-1\r\n"));
    shared.nullbulk = createObject(OBJ_STRING,sdsnew("$-1\r\n"));
    shared.nullmultibulk = createObject(OBJ_STRING,sdsnew("*-1\r\n"));
    shared.emptymultibulk = createObject(OBJ_STRING,sdsnew("*0\r\n"));
    shared.pong = createObject(OBJ_STRING,sdsnew("+PONG\r\n"));
    shared.queued = createObject(OBJ_STRING,sdsnew("+QUEUED\r\n"));
    shared.emptyscan = createObject(OBJ_STRING,sdsnew("*2\r\n$1\r\n0\r\n*0\r\n"));
    shared.wrongtypeerr = createObject(OBJ_STRING,sdsnew(
        "-WRONGTYPE Operation against a key holding the wrong kind of value\r\n"));
    shared.nokeyerr = createObject(OBJ_STRING,sdsnew(
        "-ERR no such key\r\n"));
    shared.syntaxerr = createObject(OBJ_STRING,sdsnew(
        "-ERR syntax error\r\n"));
    shared.sameobjecterr = createObject(OBJ_STRING,sdsnew(
        "-ERR source and destination objects are the same\r\n"));
    shared.outofrangeerr = createObject(OBJ_STRING,sdsnew(
        "-ERR index out of range\r\n"));
    shared.noscripterr = createObject(OBJ_STRING,sdsnew(
        "-NOSCRIPT No matching script. Please use EVAL.\r\n"));
    shared.loadingerr = createObject(OBJ_STRING,sdsnew(
        "-LOADING Redis is loading the dataset in memory\r\n"));
    shared.slowscripterr = createObject(OBJ_STRING,sdsnew(
        "-BUSY Redis is busy running a script. You can only call SCRIPT KILL or SHUTDOWN NOSAVE.\r\n"));
    shared.masterdownerr = createObject(OBJ_STRING,sdsnew(
        "-MASTERDOWN Link with MASTER is down and slave-serve-stale-data is set to 'no'.\r\n"));
    shared.bgsaveerr = createObject(OBJ_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(OBJ_STRING,sdsnew(
        "-READONLY You can't write against a read only slave.\r\n"));
    shared.noautherr = createObject(OBJ_STRING,sdsnew(
        "-NOAUTH Authentication required.\r\n"));
    shared.oomerr = createObject(OBJ_STRING,sdsnew(
        "-OOM command not allowed when used memory > 'maxmemory'.\r\n"));
    shared.execaborterr = createObject(OBJ_STRING,sdsnew(
        "-EXECABORT Transaction discarded because of previous errors.\r\n"));
    shared.noreplicaserr = createObject(OBJ_STRING,sdsnew(
        "-NOREPLICAS Not enough good slaves to write.\r\n"));
    shared.busykeyerr = createObject(OBJ_STRING,sdsnew(
        "-BUSYKEY Target key name already exists.\r\n"));
    shared.space = createObject(OBJ_STRING,sdsnew(" "));
    shared.colon = createObject(OBJ_STRING,sdsnew(":"));
    shared.plus = createObject(OBJ_STRING,sdsnew("+"));

#ifdef AOF_NO_COW
    shared.crlf->shared = 1;
    shared.ok->shared = 1;
    shared.err->shared = 1;
    shared.emptybulk->shared = 1;
    shared.czero->shared = 1;
    shared.cone->shared = 1;
    shared.cnegone->shared = 1;
    shared.nullbulk->shared = 1;
    shared.nullmultibulk->shared = 1;
    shared.emptymultibulk->shared = 1;
    shared.pong->shared = 1;
    shared.queued->shared = 1;
    shared.emptyscan->shared = 1;
    shared.wrongtypeerr->shared = 1;
    shared.nokeyerr->shared = 1;
    shared.syntaxerr->shared = 1;
    shared.sameobjecterr->shared = 1;
    shared.outofrangeerr->shared = 1;
    shared.noscripterr->shared = 1;
    shared.loadingerr->shared = 1;
    shared.slowscripterr->shared = 1;
    shared.masterdownerr->shared = 1;
    shared.bgsaveerr->shared = 1;
    shared.roslaveerr->shared = 1;
    shared.noautherr->shared = 1;
    shared.oomerr->shared = 1;
    shared.execaborterr->shared = 1;
    shared.noreplicaserr->shared = 1;
    shared.busykeyerr->shared = 1;
    shared.space->shared = 1;
    shared.colon->shared = 1;
    shared.plus->shared = 1;
#endif

    for (j = 0; j < PROTO_SHARED_SELECT_CMDS; j++) {
        char dictid_str[64];
        int dictid_len;

        dictid_len = ll2string(dictid_str,sizeof(dictid_str),j);
        shared.select[j] = createObject(OBJ_STRING,
            sdscatprintf(sdsempty(),
                "*2\r\n$6\r\nSELECT\r\n$%d\r\n%s\r\n",
                dictid_len, dictid_str));
#ifdef AOF_NO_COW
        shared.select[j]->shared = 1;
#endif
    }
    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);

#ifdef AOF_NO_COW
    shared.messagebulk->shared = 1;
    shared.pmessagebulk->shared = 1;
    shared.subscribebulk->shared = 1;
    shared.unsubscribebulk->shared = 1;
    shared.psubscribebulk->shared = 1;
    shared.punsubscribebulk->shared = 1;
    shared.del->shared = 1;
    shared.rpop->shared = 1;
    shared.lpop->shared = 1;
    shared.lpush->shared = 1;
#endif

    for (j = 0; j < OBJ_SHARED_INTEGERS; j++) {
        shared.integers[j] = createObject(OBJ_STRING,(void*)(long)j);
        shared.integers[j]->encoding = OBJ_ENCODING_INT;
#ifdef AOF_NO_COW
        shared.integers[j]->shared = 1;
#endif
    }
    for (j = 0; j < OBJ_SHARED_BULKHDR_LEN; j++) {
        shared.mbulkhdr[j] = createObject(OBJ_STRING,
            sdscatprintf(sdsempty(),"*%d\r\n",j));
        shared.bulkhdr[j] = createObject(OBJ_STRING,
            sdscatprintf(sdsempty(),"$%d\r\n",j));
#ifdef AOF_NO_COW
        shared.bulkhdr[j]->shared = 1;
#endif
    }
    /* 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);

#ifdef AOF_NO_COW
    shared.minstring->shared = 1;
    shared.maxstring->shared = 1;
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq 0x92784(%rip), %rdi     # 0xc6dac
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c72(%rip)     # 0x1072b0
leaq 0x8b596(%rip), %rdi     # 0xbfbdb
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c5d(%rip)     # 0x1072b8
leaq 0x8b57f(%rip), %rdi     # 0xbfbe1
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c48(%rip)     # 0x1072c0
leaq 0x8b569(%rip), %rdi     # 0xbfbe8
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c33(%rip)     # 0x1072c8
leaq 0x8b553(%rip), %rdi     # 0xbfbef
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c1e(%rip)     # 0x1072d0
leaq 0x8b53b(%rip), %rdi     # 0xbfbf4
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c09(%rip)     # 0x1072d8
leaq 0x8b523(%rip), %rdi     # 0xbfbf9
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2bf4(%rip)     # 0x1072e0
leaq 0x8b50c(%rip), %rdi     # 0xbfbff
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2bf7(%rip)     # 0x107300
leaq 0x8b4f5(%rip), %rdi     # 0xbfc05
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2be2(%rip)     # 0x107308
leaq 0x8b4fb(%rip), %rdi     # 0xbfc28
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2bd5(%rip)     # 0x107318
leaq 0x8b4c1(%rip), %rdi     # 0xbfc0b
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b88(%rip)     # 0x1072e8
leaq 0x8b4ac(%rip), %rdi     # 0xbfc13
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b93(%rip)     # 0x107310
leaq 0x8b499(%rip), %rdi     # 0xbfc1d
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2c5e(%rip)     # 0x1073f8
leaq 0x8b48c(%rip), %rdi     # 0xbfc2d
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b69(%rip)     # 0x107320
leaq 0x8b4b4(%rip), %rdi     # 0xbfc72
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b54(%rip)     # 0x107328
leaq 0x8b4aa(%rip), %rdi     # 0xbfc85
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b3f(%rip)     # 0x107330
leaq 0x8b4a1(%rip), %rdi     # 0xbfc99
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b2a(%rip)     # 0x107338
leaq 0x8b4b7(%rip), %rdi     # 0xbfccc
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b15(%rip)     # 0x107340
leaq 0x8b4b4(%rip), %rdi     # 0xbfce6
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2b00(%rip)     # 0x107348
leaq 0x8b4c8(%rip), %rdi     # 0xbfd17
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2aeb(%rip)     # 0x107350
leaq 0x8b4dd(%rip), %rdi     # 0xbfd49
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2ad6(%rip)     # 0x107358
leaq 0x8b51a(%rip), %rdi     # 0xbfda3
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2ac9(%rip)     # 0x107368
leaq 0x8b54f(%rip), %rdi     # 0xbfdf5
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2aa4(%rip)     # 0x107360
leaq 0x8b5ff(%rip), %rdi     # 0xbfec2
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a97(%rip)     # 0x107370
leaq 0x8b619(%rip), %rdi     # 0xbfef9
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a8a(%rip)     # 0x107380
leaq 0x8b61f(%rip), %rdi     # 0xbff1c
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a85(%rip)     # 0x107398
leaq 0x8b63d(%rip), %rdi     # 0xbff57
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a48(%rip)     # 0x107378
leaq 0x8b65f(%rip), %rdi     # 0xbff96
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a3b(%rip)     # 0x107388
leaq 0x8b671(%rip), %rdi     # 0xbffc5
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2a26(%rip)     # 0x107390
leaq 0x932fc(%rip), %rdi     # 0xc7c6d
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2969(%rip)     # 0x1072f0
leaq 0x9585f(%rip), %rdi     # 0xca1ed
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd2954(%rip)     # 0x1072f8
leaq 0x8b645(%rip), %rdi     # 0xbfff0
callq 0x394c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0xd29df(%rip)     # 0x1073a0
movq %rsp, %rbx
leaq 0x8b627(%rip), %r14     # 0xbfff2
leaq 0xd28de(%rip), %r12     # 0x1072b0
xorl %r15d, %r15d
movl $0x40, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x43183
movl %eax, %ebp
callq 0x394a5
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x3a145
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0x160(%r12,%r15,8)
incq %r15
cmpq $0xa, %r15
jne 0x349d5
leaq 0x8b5ec(%rip), %rdi     # 0xc000c
movl $0xd, %esi
callq 0x43944
movq %rax, 0xd2977(%rip)     # 0x1073a8
leaq 0x8b5e2(%rip), %rdi     # 0xc001a
movl $0xe, %esi
callq 0x43944
movq %rax, 0xd2967(%rip)     # 0x1073b0
leaq 0x8b5d9(%rip), %rdi     # 0xc0029
movl $0xf, %esi
callq 0x43944
movq %rax, 0xd2957(%rip)     # 0x1073b8
leaq 0x8b5d1(%rip), %rdi     # 0xc0039
movl $0x12, %esi
callq 0x43944
movq %rax, 0xd2947(%rip)     # 0x1073c0
leaq 0x8b5cc(%rip), %rdi     # 0xc004c
movl $0x11, %esi
callq 0x43944
movq %rax, 0xd2937(%rip)     # 0x1073c8
leaq 0x8b5c6(%rip), %rdi     # 0xc005e
movl $0x13, %esi
callq 0x43944
movq %rax, 0xd2927(%rip)     # 0x1073d0
leaq 0x8b5c2(%rip), %rdi     # 0xc0072
movl $0x3, %esi
callq 0x43944
movq %rax, 0xd2917(%rip)     # 0x1073d8
leaq 0x8b5ae(%rip), %rdi     # 0xc0076
movl $0x4, %esi
callq 0x43944
movq %rax, 0xd2907(%rip)     # 0x1073e0
leaq 0x8b59b(%rip), %rdi     # 0xc007b
movl $0x4, %esi
callq 0x43944
movq %rax, 0xd28f7(%rip)     # 0x1073e8
leaq 0x8b588(%rip), %rdi     # 0xc0080
movl $0x5, %esi
callq 0x43944
movq %rax, 0xd28e7(%rip)     # 0x1073f0
xorl %ebx, %ebx
movl $0xffffff0f, %ebp       # imm = 0xFFFFFF0F
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43850
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 0x34b10
leaq 0x8b548(%rip), %rbx     # 0xc0086
leaq 0x8b547(%rip), %r14     # 0xc008c
xorl %r15d, %r15d
callq 0x394a5
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3a145
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0x13a30(%r12,%r15,8)
callq 0x394a5
movq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x3a145
xorl %edi, %edi
movq %rax, %rsi
callq 0x43850
movq %rax, 0x13b30(%r12,%r15,8)
incq %r15
cmpq $0x20, %r15
jne 0x34b48
leaq 0x8b4ec(%rip), %rdi     # 0xc0092
movl $0x9, %esi
callq 0x43944
movq %rax, 0xd2849(%rip)     # 0x107400
leaq 0x8b4de(%rip), %rdi     # 0xc009c
movl $0x9, %esi
callq 0x43944
movq %rax, 0xd2839(%rip)     # 0x107408
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq