// File: /workspace/github_c_makefile_star2_O1/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 0x928b9(%rip), %rdi     # 0xc6d70
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2de3(%rip)     # 0x1072b0
leaq 0x8b6b7(%rip), %rdi     # 0xbfb8b
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2dce(%rip)     # 0x1072b8
leaq 0x8b6a0(%rip), %rdi     # 0xbfb91
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2db9(%rip)     # 0x1072c0
leaq 0x8b68a(%rip), %rdi     # 0xbfb98
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2da4(%rip)     # 0x1072c8
leaq 0x8b674(%rip), %rdi     # 0xbfb9f
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d8f(%rip)     # 0x1072d0
leaq 0x8b65c(%rip), %rdi     # 0xbfba4
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d7a(%rip)     # 0x1072d8
leaq 0x8b644(%rip), %rdi     # 0xbfba9
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d65(%rip)     # 0x1072e0
leaq 0x8b62d(%rip), %rdi     # 0xbfbaf
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d68(%rip)     # 0x107300
leaq 0x8b616(%rip), %rdi     # 0xbfbb5
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d53(%rip)     # 0x107308
leaq 0x8b61c(%rip), %rdi     # 0xbfbd8
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d46(%rip)     # 0x107318
leaq 0x8b5e2(%rip), %rdi     # 0xbfbbb
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2cf9(%rip)     # 0x1072e8
leaq 0x8b5cd(%rip), %rdi     # 0xbfbc3
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2d04(%rip)     # 0x107310
leaq 0x8b5ba(%rip), %rdi     # 0xbfbcd
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2dcf(%rip)     # 0x1073f8
leaq 0x8b5ad(%rip), %rdi     # 0xbfbdd
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2cda(%rip)     # 0x107320
leaq 0x8b5d5(%rip), %rdi     # 0xbfc22
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2cc5(%rip)     # 0x107328
leaq 0x8b5cb(%rip), %rdi     # 0xbfc35
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2cb0(%rip)     # 0x107330
leaq 0x8b5c2(%rip), %rdi     # 0xbfc49
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c9b(%rip)     # 0x107338
leaq 0x8b5d8(%rip), %rdi     # 0xbfc7c
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c86(%rip)     # 0x107340
leaq 0x8b5d5(%rip), %rdi     # 0xbfc96
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c71(%rip)     # 0x107348
leaq 0x8b5e9(%rip), %rdi     # 0xbfcc7
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c5c(%rip)     # 0x107350
leaq 0x8b5fe(%rip), %rdi     # 0xbfcf9
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c47(%rip)     # 0x107358
leaq 0x8b63b(%rip), %rdi     # 0xbfd53
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c3a(%rip)     # 0x107368
leaq 0x8b670(%rip), %rdi     # 0xbfda5
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c15(%rip)     # 0x107360
leaq 0x8b720(%rip), %rdi     # 0xbfe72
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2c08(%rip)     # 0x107370
leaq 0x8b73a(%rip), %rdi     # 0xbfea9
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2bfb(%rip)     # 0x107380
leaq 0x8b740(%rip), %rdi     # 0xbfecc
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2bf6(%rip)     # 0x107398
leaq 0x8b75e(%rip), %rdi     # 0xbff07
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2bb9(%rip)     # 0x107378
leaq 0x8b780(%rip), %rdi     # 0xbff46
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2bac(%rip)     # 0x107388
leaq 0x8b792(%rip), %rdi     # 0xbff75
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2b97(%rip)     # 0x107390
leaq 0x93431(%rip), %rdi     # 0xc7c31
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2ada(%rip)     # 0x1072f0
leaq 0x959b4(%rip), %rdi     # 0xca1d1
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2ac5(%rip)     # 0x1072f8
leaq 0x8b766(%rip), %rdi     # 0xbffa0
callq 0x39245
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0xd2b50(%rip)     # 0x1073a0
movq %rsp, %rbx
leaq 0x8b748(%rip), %r14     # 0xbffa2
leaq 0xd2a4f(%rip), %r12     # 0x1072b0
xorl %r15d, %r15d
movl $0x40, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x433e5
movl %eax, %ebp
callq 0x39222
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x39eb7
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0x160(%r12,%r15,8)
incq %r15
cmpq $0xa, %r15
jne 0x34864
leaq 0x8b70d(%rip), %rdi     # 0xbffbc
movl $0xd, %esi
callq 0x43ba8
movq %rax, 0xd2ae8(%rip)     # 0x1073a8
leaq 0x8b703(%rip), %rdi     # 0xbffca
movl $0xe, %esi
callq 0x43ba8
movq %rax, 0xd2ad8(%rip)     # 0x1073b0
leaq 0x8b6fa(%rip), %rdi     # 0xbffd9
movl $0xf, %esi
callq 0x43ba8
movq %rax, 0xd2ac8(%rip)     # 0x1073b8
leaq 0x8b6f2(%rip), %rdi     # 0xbffe9
movl $0x12, %esi
callq 0x43ba8
movq %rax, 0xd2ab8(%rip)     # 0x1073c0
leaq 0x8b6ed(%rip), %rdi     # 0xbfffc
movl $0x11, %esi
callq 0x43ba8
movq %rax, 0xd2aa8(%rip)     # 0x1073c8
leaq 0x8b6e7(%rip), %rdi     # 0xc000e
movl $0x13, %esi
callq 0x43ba8
movq %rax, 0xd2a98(%rip)     # 0x1073d0
leaq 0x8b6e3(%rip), %rdi     # 0xc0022
movl $0x3, %esi
callq 0x43ba8
movq %rax, 0xd2a88(%rip)     # 0x1073d8
leaq 0x8b6cf(%rip), %rdi     # 0xc0026
movl $0x4, %esi
callq 0x43ba8
movq %rax, 0xd2a78(%rip)     # 0x1073e0
leaq 0x8b6bc(%rip), %rdi     # 0xc002b
movl $0x4, %esi
callq 0x43ba8
movq %rax, 0xd2a68(%rip)     # 0x1073e8
leaq 0x8b6a9(%rip), %rdi     # 0xc0030
movl $0x5, %esi
callq 0x43ba8
movq %rax, 0xd2a58(%rip)     # 0x1073f0
xorl %ebx, %ebx
movl $0xffffff0f, %ebp       # imm = 0xFFFFFF0F
xorl %edi, %edi
movq %rbx, %rsi
callq 0x43ab4
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 0x3499f
leaq 0x8b669(%rip), %rbx     # 0xc0036
leaq 0x8b668(%rip), %r14     # 0xc003c
xorl %r15d, %r15d
callq 0x39222
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x39eb7
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0x13a30(%r12,%r15,8)
callq 0x39222
movq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x39eb7
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, 0x13b30(%r12,%r15,8)
incq %r15
cmpq $0x20, %r15
jne 0x349d7
leaq 0x8b60d(%rip), %rdi     # 0xc0042
movl $0x9, %esi
callq 0x43ba8
movq %rax, 0xd29ba(%rip)     # 0x107400
leaq 0x8b5ff(%rip), %rdi     # 0xc004c
movl $0x9, %esi
callq 0x43ba8
movq %rax, 0xd29aa(%rip)     # 0x107408
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq