// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x8a8c6(%rip), %rdi     # 0xb7170
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd29f0(%rip)     # 0xff2b0
leaq 0x84204(%rip), %rdi     # 0xb0acb
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd29db(%rip)     # 0xff2b8
leaq 0x841ed(%rip), %rdi     # 0xb0ad1
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd29c6(%rip)     # 0xff2c0
leaq 0x841d7(%rip), %rdi     # 0xb0ad8
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd29b1(%rip)     # 0xff2c8
leaq 0x841c1(%rip), %rdi     # 0xb0adf
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd299c(%rip)     # 0xff2d0
leaq 0x841a9(%rip), %rdi     # 0xb0ae4
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2987(%rip)     # 0xff2d8
leaq 0x84191(%rip), %rdi     # 0xb0ae9
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2972(%rip)     # 0xff2e0
leaq 0x8417a(%rip), %rdi     # 0xb0aef
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2975(%rip)     # 0xff300
leaq 0x84163(%rip), %rdi     # 0xb0af5
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2960(%rip)     # 0xff308
leaq 0x84169(%rip), %rdi     # 0xb0b18
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2953(%rip)     # 0xff318
leaq 0x8412f(%rip), %rdi     # 0xb0afb
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2906(%rip)     # 0xff2e8
leaq 0x8411a(%rip), %rdi     # 0xb0b03
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2911(%rip)     # 0xff310
leaq 0x84107(%rip), %rdi     # 0xb0b0d
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd29dc(%rip)     # 0xff3f8
leaq 0x840fa(%rip), %rdi     # 0xb0b1d
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd28e7(%rip)     # 0xff320
leaq 0x84122(%rip), %rdi     # 0xb0b62
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd28d2(%rip)     # 0xff328
leaq 0x84118(%rip), %rdi     # 0xb0b75
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd28bd(%rip)     # 0xff330
leaq 0x8410f(%rip), %rdi     # 0xb0b89
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd28a8(%rip)     # 0xff338
leaq 0x84125(%rip), %rdi     # 0xb0bbc
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2893(%rip)     # 0xff340
leaq 0x84122(%rip), %rdi     # 0xb0bd6
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd287e(%rip)     # 0xff348
leaq 0x84136(%rip), %rdi     # 0xb0c07
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2869(%rip)     # 0xff350
leaq 0x8414b(%rip), %rdi     # 0xb0c39
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2854(%rip)     # 0xff358
leaq 0x84188(%rip), %rdi     # 0xb0c93
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2847(%rip)     # 0xff368
leaq 0x841bd(%rip), %rdi     # 0xb0ce5
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2822(%rip)     # 0xff360
leaq 0x8426d(%rip), %rdi     # 0xb0db2
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2815(%rip)     # 0xff370
leaq 0x84287(%rip), %rdi     # 0xb0de9
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2808(%rip)     # 0xff380
leaq 0x8428d(%rip), %rdi     # 0xb0e0c
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd2803(%rip)     # 0xff398
leaq 0x842ab(%rip), %rdi     # 0xb0e47
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd27c6(%rip)     # 0xff378
leaq 0x842cd(%rip), %rdi     # 0xb0e86
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd27b9(%rip)     # 0xff388
leaq 0x842df(%rip), %rdi     # 0xb0eb5
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd27a4(%rip)     # 0xff390
leaq 0x8b43e(%rip), %rdi     # 0xb8031
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd26e7(%rip)     # 0xff2f0
leaq 0x977e8(%rip), %rdi     # 0xc43f8
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd26d2(%rip)     # 0xff2f8
leaq 0x842b3(%rip), %rdi     # 0xb0ee0
callq 0x310f6
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0xd275d(%rip)     # 0xff3a0
movq %rsp, %rbx
pushq $0x40
popq %r14
leaq 0x84291(%rip), %r15     # 0xb0ee2
leaq 0xd2658(%rip), %r13     # 0xff2b0
xorl %r12d, %r12d
cmpq $0xa, %r12
je 0x2cc9f
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x3973a
movl %eax, %ebp
callq 0x310e8
movq %rax, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x319d4
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0x160(%r13,%r12,8)
incq %r12
jmp 0x2cc5b
leaq 0x84256(%rip), %rdi     # 0xb0efc
pushq $0xd
popq %rsi
callq 0x39dcd
movq %rax, 0xd26f3(%rip)     # 0xff3a8
leaq 0x8424e(%rip), %rdi     # 0xb0f0a
pushq $0xe
popq %rsi
callq 0x39dcd
movq %rax, 0xd26e5(%rip)     # 0xff3b0
leaq 0x84247(%rip), %rdi     # 0xb0f19
pushq $0xf
popq %rsi
callq 0x39dcd
movq %rax, 0xd26d7(%rip)     # 0xff3b8
leaq 0x84241(%rip), %rdi     # 0xb0f29
pushq $0x12
popq %rsi
callq 0x39dcd
movq %rax, 0xd26c9(%rip)     # 0xff3c0
leaq 0x8423e(%rip), %rdi     # 0xb0f3c
pushq $0x11
popq %rsi
callq 0x39dcd
movq %rax, 0xd26bb(%rip)     # 0xff3c8
leaq 0x8423a(%rip), %rdi     # 0xb0f4e
pushq $0x13
popq %rsi
callq 0x39dcd
movq %rax, 0xd26ad(%rip)     # 0xff3d0
leaq 0x84238(%rip), %rdi     # 0xb0f62
pushq $0x3
popq %rsi
callq 0x39dcd
movq %rax, 0xd269f(%rip)     # 0xff3d8
leaq 0x84226(%rip), %rdi     # 0xb0f66
pushq $0x4
popq %rbx
movq %rbx, %rsi
callq 0x39dcd
movq %rax, 0xd268e(%rip)     # 0xff3e0
leaq 0x84212(%rip), %rdi     # 0xb0f6b
movq %rbx, %rsi
callq 0x39dcd
movq %rax, 0xd2680(%rip)     # 0xff3e8
leaq 0x84201(%rip), %rdi     # 0xb0f70
pushq $0x5
popq %rsi
callq 0x39dcd
movq %rax, 0xd2672(%rip)     # 0xff3f0
xorl %ebx, %ebx
movl $0xffffff0f, %ebp       # imm = 0xFFFFFF0F
cmpq $0x2710, %rbx           # imm = 0x2710
je 0x2cdae
xorl %edi, %edi
movq %rbx, %rsi
callq 0x39cfc
movq %rax, 0x1b0(%r13,%rbx,8)
movl (%rax), %ecx
andl %ebp, %ecx
orl $0x10, %ecx
movl %ecx, (%rax)
incq %rbx
jmp 0x2cd85
leaq 0x841c1(%rip), %rbx     # 0xb0f76
leaq 0x841c0(%rip), %r14     # 0xb0f7c
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0x2ce18
callq 0x310e8
movq %rax, %rdi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x319d4
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0x13a30(%r13,%r15,8)
callq 0x310e8
movq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x319d4
xorl %edi, %edi
movq %rax, %rsi
callq 0x39cfc
movq %rax, 0x13b30(%r13,%r15,8)
incq %r15
jmp 0x2cdbf
leaq 0x84163(%rip), %rdi     # 0xb0f82
pushq $0x9
popq %rbx
movq %rbx, %rsi
callq 0x39dcd
movq %rax, 0xd25cf(%rip)     # 0xff400
leaq 0x84154(%rip), %rdi     # 0xb0f8c
movq %rbx, %rsi
callq 0x39dcd
movq %rax, 0xd25c1(%rip)     # 0xff408
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq