// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: initServerConfig
void initServerConfig(void) {
    int j;

    getRandomHexChars(server.runid,CONFIG_RUN_ID_SIZE);
    server.configfile = NULL;
    server.executable = NULL;
    server.hz = CONFIG_DEFAULT_HZ;
    server.runid[CONFIG_RUN_ID_SIZE] = '\0';
    server.arch_bits = (sizeof(long) == 8) ? 64 : 32;
    server.port = CONFIG_DEFAULT_SERVER_PORT;
    server.tcp_backlog = CONFIG_DEFAULT_TCP_BACKLOG;
    server.bindaddr_count = 0;
    server.unixsocket = NULL;
    server.unixsocketperm = CONFIG_DEFAULT_UNIX_SOCKET_PERM;
    server.ipfd_count = 0;
    server.sofd = -1;
    server.protected_mode = CONFIG_DEFAULT_PROTECTED_MODE;
    server.dbnum = CONFIG_DEFAULT_DBNUM;
    server.verbosity = CONFIG_DEFAULT_VERBOSITY;
    server.maxidletime = CONFIG_DEFAULT_CLIENT_TIMEOUT;
    server.tcpkeepalive = CONFIG_DEFAULT_TCP_KEEPALIVE;
    server.active_expire_enabled = 1;
    server.client_max_querybuf_len = PROTO_MAX_QUERYBUF_LEN;
    server.saveparams = NULL;
    server.loading = 0;
    server.logfile = zstrdup(CONFIG_DEFAULT_LOGFILE);
    server.syslog_enabled = CONFIG_DEFAULT_SYSLOG_ENABLED;
    server.syslog_ident = zstrdup(CONFIG_DEFAULT_SYSLOG_IDENT);
    server.syslog_facility = LOG_LOCAL0;
    server.daemonize = CONFIG_DEFAULT_DAEMONIZE;
    server.supervised = 0;
    server.supervised_mode = SUPERVISED_NONE;
    server.aof_state = AOF_OFF;
    server.aof_fsync = CONFIG_DEFAULT_AOF_FSYNC;
    server.aof_no_fsync_on_rewrite = CONFIG_DEFAULT_AOF_NO_FSYNC_ON_REWRITE;
    server.aof_rewrite_perc = AOF_REWRITE_PERC;
    server.aof_rewrite_min_size = AOF_REWRITE_MIN_SIZE;
    server.aof_rewrite_base_size = 0;
    server.aof_rewrite_scheduled = 0;
    server.aof_last_fsync = time(NULL);
    server.aof_rewrite_time_last = -1;
    server.aof_rewrite_time_start = -1;
    server.aof_lastbgrewrite_status = C_OK;
    server.aof_delayed_fsync = 0;
    server.aof_fd = -1;
    server.aof_selected_db = -1; /* Make sure the first time will not match */
    server.aof_flush_postponed_start = 0;
    server.aof_rewrite_incremental_fsync = CONFIG_DEFAULT_AOF_REWRITE_INCREMENTAL_FSYNC;
    server.aof_load_truncated = CONFIG_DEFAULT_AOF_LOAD_TRUNCATED;
    server.pidfile = NULL;
    server.rdb_filename = zstrdup(CONFIG_DEFAULT_RDB_FILENAME);
    server.aof_filename = zstrdup(CONFIG_DEFAULT_AOF_FILENAME);
    server.requirepass = NULL;
    server.rdb_compression = CONFIG_DEFAULT_RDB_COMPRESSION;
    server.rdb_checksum = CONFIG_DEFAULT_RDB_CHECKSUM;
    server.stop_writes_on_bgsave_err = CONFIG_DEFAULT_STOP_WRITES_ON_BGSAVE_ERROR;
    server.activerehashing = CONFIG_DEFAULT_ACTIVE_REHASHING;
    server.notify_keyspace_events = 0;
    server.maxclients = CONFIG_DEFAULT_MAX_CLIENTS;
    server.bpop_blocked_clients = 0;
    server.maxmemory = CONFIG_DEFAULT_MAXMEMORY;
    server.maxmemory_policy = CONFIG_DEFAULT_MAXMEMORY_POLICY;
    server.maxmemory_samples = CONFIG_DEFAULT_MAXMEMORY_SAMPLES;
    server.hash_max_ziplist_entries = OBJ_HASH_MAX_ZIPLIST_ENTRIES;
    server.hash_max_ziplist_value = OBJ_HASH_MAX_ZIPLIST_VALUE;
    server.list_max_ziplist_size = OBJ_LIST_MAX_ZIPLIST_SIZE;
    server.list_compress_depth = OBJ_LIST_COMPRESS_DEPTH;
    server.set_max_intset_entries = OBJ_SET_MAX_INTSET_ENTRIES;
    server.zset_max_ziplist_entries = OBJ_ZSET_MAX_ZIPLIST_ENTRIES;
    server.zset_max_ziplist_value = OBJ_ZSET_MAX_ZIPLIST_VALUE;
    server.hll_sparse_max_bytes = CONFIG_DEFAULT_HLL_SPARSE_MAX_BYTES;
    server.shutdown_asap = 0;
    server.repl_ping_slave_period = CONFIG_DEFAULT_REPL_PING_SLAVE_PERIOD;
    server.repl_timeout = CONFIG_DEFAULT_REPL_TIMEOUT;
    server.repl_min_slaves_to_write = CONFIG_DEFAULT_MIN_SLAVES_TO_WRITE;
    server.repl_min_slaves_max_lag = CONFIG_DEFAULT_MIN_SLAVES_MAX_LAG;
    server.cluster_enabled = 0;
    server.cluster_node_timeout = CLUSTER_DEFAULT_NODE_TIMEOUT;
    server.cluster_migration_barrier = CLUSTER_DEFAULT_MIGRATION_BARRIER;
    server.cluster_slave_validity_factor = CLUSTER_DEFAULT_SLAVE_VALIDITY;
    server.cluster_require_full_coverage = CLUSTER_DEFAULT_REQUIRE_FULL_COVERAGE;
    server.cluster_configfile = zstrdup(CONFIG_DEFAULT_CLUSTER_CONFIG_FILE);
    server.migrate_cached_sockets = dictCreate(&migrateCacheDictType,NULL);
    server.next_client_id = 1; /* Client IDs, start from 1 .*/
    server.loading_process_events_interval_bytes = (1024*1024*2);
    server.lua_time_limit = LUA_SCRIPT_TIME_LIMIT;

    server.lruclock = getLRUClock();
    resetServerSaveParams();

    appendServerSaveParams(60*60,1);  /* save after 1 hour and 1 change */
    appendServerSaveParams(300,100);  /* save after 5 minutes and 100 changes */
    appendServerSaveParams(60,10000); /* save after 1 minute and 10000 changes */
    /* Replication related */
    server.masterauth = NULL;
    server.masterhost = NULL;
    server.masterport = 6379;
    server.master = NULL;
    server.cached_master = NULL;
    server.repl_master_initial_offset = -1;
    server.repl_state = REPL_STATE_NONE;
    server.repl_syncio_timeout = CONFIG_REPL_SYNCIO_TIMEOUT;
    server.repl_serve_stale_data = CONFIG_DEFAULT_SLAVE_SERVE_STALE_DATA;
    server.repl_slave_ro = CONFIG_DEFAULT_SLAVE_READ_ONLY;
    server.repl_down_since = 0; /* Never connected, repl is down since EVER. */
    server.repl_disable_tcp_nodelay = CONFIG_DEFAULT_REPL_DISABLE_TCP_NODELAY;
    server.repl_diskless_sync = CONFIG_DEFAULT_REPL_DISKLESS_SYNC;
    server.repl_diskless_sync_delay = CONFIG_DEFAULT_REPL_DISKLESS_SYNC_DELAY;
    server.slave_priority = CONFIG_DEFAULT_SLAVE_PRIORITY;
    server.slave_announce_ip = CONFIG_DEFAULT_SLAVE_ANNOUNCE_IP;
    server.slave_announce_port = CONFIG_DEFAULT_SLAVE_ANNOUNCE_PORT;
    server.master_repl_offset = 0;

    /* Replication partial resync backlog */
    server.repl_backlog = NULL;
    server.repl_backlog_size = CONFIG_DEFAULT_REPL_BACKLOG_SIZE;
    server.repl_backlog_histlen = 0;
    server.repl_backlog_idx = 0;
    server.repl_backlog_off = 0;
    server.repl_backlog_time_limit = CONFIG_DEFAULT_REPL_BACKLOG_TIME_LIMIT;
    server.repl_no_slaves_since = time(NULL);

    /* Client output buffer limits */
    for (j = 0; j < CLIENT_TYPE_OBUF_COUNT; j++)
        server.client_obuf_limits[j] = clientBufferLimitsDefaults[j];

    /* Double constants initialization */
    R_Zero = 0.0;
    R_PosInf = 1.0/R_Zero;
    R_NegInf = -1.0/R_Zero;
    R_Nan = R_Zero/R_Zero;

    /* Command table -- we initiialize it here as it is part of the
     * initial configuration, since command names may be changed via
     * redis.conf using the rename-command directive. */
    server.commands = dictCreate(&commandTableDictType,NULL);
    server.orig_commands = dictCreate(&commandTableDictType,NULL);
    populateCommandTable();
    server.delCommand = lookupCommandByCString("del");
    server.multiCommand = lookupCommandByCString("multi");
    server.lpushCommand = lookupCommandByCString("lpush");
    server.lpopCommand = lookupCommandByCString("lpop");
    server.rpopCommand = lookupCommandByCString("rpop");
    server.sremCommand = lookupCommandByCString("srem");
    server.execCommand = lookupCommandByCString("exec");
    server.expireCommand = lookupCommandByCString("expire");
    server.pexpireCommand = lookupCommandByCString("pexpire");

    /* Slow log */
    server.slowlog_log_slower_than = CONFIG_DEFAULT_SLOWLOG_LOG_SLOWER_THAN;
    server.slowlog_max_len = CONFIG_DEFAULT_SLOWLOG_MAX_LEN;

    /* Latency monitor */
    server.latency_monitor_threshold = CONFIG_DEFAULT_LATENCY_MONITOR_THRESHOLD;

    /* Debugging */
    server.assert_failed = "<no assertion failed>";
    server.assert_file = "<no file>";
    server.assert_line = 0;
    server.bug_report_start = 0;
    server.watchdog_period = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xccab1(%rip), %rdi     # 0xf9918
pushq $0x28
popq %rsi
callq 0x39a57
xorps %xmm0, %xmm0
movups %xmm0, 0xcca37(%rip)    # 0xf98b0
pushq $0xa
popq %rbp
movl %ebp, 0xcca46(%rip)     # 0xf98c8
movb $0x0, 0xccab7(%rip)     # 0xf9940
movl $0x40, 0xcca7d(%rip)    # 0xf9910
movabsq $0x1ff000018eb, %rax    # imm = 0x1FF000018EB
movq %rax, 0xccaa4(%rip)     # 0xf9948
andl $0x0, 0xccb25(%rip)     # 0xf99d0
andq $0x0, 0xccb25(%rip)     # 0xf99d8
andl $0x0, 0xccb26(%rip)     # 0xf99e0
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0xccb59(%rip)     # 0xf9a24
pushq $0x1
popq %r15
movq %r15, 0xcccea(%rip)     # 0xf9bc0
movl $0x10, 0xccfd8(%rip)    # 0xf9eb8
movdqa 0x814f8(%rip), %xmm0    # 0xae3e0
movdqu %xmm0, 0xccfb0(%rip)    # 0xf9ea0
movq $0x40000000, 0xccfb5(%rip) # imm = 0x40000000
andq $0x0, 0xcd0dd(%rip)     # 0xf9fe0
leaq 0x854fb(%rip), %rdi     # 0xb2405
callq 0x32933
movq %rax, 0xcd132(%rip)     # 0xfa048
andl $0x0, 0xcd133(%rip)     # 0xfa050
leaq 0x82094(%rip), %rdi     # 0xaefb8
callq 0x32933
movq %rax, 0xcd128(%rip)     # 0xfa058
movl $0x80, 0xcd126(%rip)    # 0xfa060
andl $0x0, 0xccf83(%rip)     # 0xf9ec4
andq $0x0, 0xccf73(%rip)     # 0xf9ebc
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xccfb6(%rip)     # 0xf9f10
movabsq $0x6400000000, %rax     # imm = 0x6400000000
movq %rax, 0xccfb5(%rip)     # 0xf9f20
movq $0x4000000, 0xccfb2(%rip) # imm = 0x4000000
andq $0x0, 0xccfb2(%rip)     # 0xf9f30
andl $0x0, 0xccfbb(%rip)     # 0xf9f40
xorl %r14d, %r14d
xorl %edi, %edi
callq 0x26cd0
movq %rax, 0xccfd2(%rip)     # 0xf9f68
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0xccfce(%rip)    # 0xf9f70
andl $0x0, 0xccfd7(%rip)     # 0xf9f80
andq $0x0, 0xccfd7(%rip)     # 0xf9f88
orq $-0x1, 0xccf9f(%rip)    # 0xf9f58
andq $0x0, 0xccf9f(%rip)     # 0xf9f60
pushq $0x1
popq %rbx
movl %ebx, 0xccfc6(%rip)     # 0xf9f90
movl %ebx, 0xccfcc(%rip)     # 0xf9f9c
andq $0x0, 0xcc930(%rip)     # 0xf9908
leaq 0x81fdf(%rip), %rdi     # 0xaefbe
callq 0x32933
movq %rax, 0xcd005(%rip)     # 0xf9ff0
leaq 0x81fd5(%rip), %rdi     # 0xaefc7
callq 0x32933
movq %rax, 0xccf1a(%rip)     # 0xf9f18
andq $0x0, 0xcc8fa(%rip)     # 0xf9900
movabsq $0x100000001, %r12      # imm = 0x100000001
movq %r12, 0xccfe1(%rip)     # 0xf9ff8
movl %ebx, 0xcd00f(%rip)     # 0xfa02c
movl %ebx, 0xcc8d5(%rip)     # 0xf98f8
andl $0x0, 0xcd216(%rip)     # 0xfa240
movl $0x2710, 0xcd178(%rip)  # imm = 0x2710
andl $0x0, 0xcd185(%rip)     # 0xfa1c0
andq $0x0, 0xcd16d(%rip)     # 0xfa1b0
movabsq $0x500000005, %rax      # imm = 0x500000005
movq %rax, 0xcd164(%rip)     # 0xfa1b8
movl $0x200, %eax            # imm = 0x200
movq %rax, 0xcd188(%rip)     # 0xfa1e8
pushq $0x40
popq %rcx
movq %rcx, 0xcd186(%rip)     # 0xfa1f0
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq %rdx, 0xcd1a2(%rip)     # 0xfa218
movq %rax, 0xcd17b(%rip)     # 0xfa1f8
movq $0x80, 0xcd178(%rip) # 0xfa200
movq %rcx, 0xcd179(%rip)     # 0xfa208
movq $0xbb8, 0xcd176(%rip) # imm = 0xBB8
andl $0x0, 0xcc853(%rip)     # 0xf98f4
movl %ebp, 0xccfc9(%rip)     # 0xfa070
movl $0x3c, 0xcd02b(%rip)    # 0xfa0dc
movabsq $0xa00000000, %rax      # imm = 0xA00000000
movq %rax, 0xccfee(%rip)     # 0xfa0b0
andl $0x0, 0xcd17b(%rip)     # 0xfa244
movq $0x3a98, 0xcd174(%rip) # imm = 0x3A98
movabsq $0xa00000001, %rax      # imm = 0xA00000001
movq %rax, 0xcd17b(%rip)     # 0xfa260
movl %ebx, 0xcd17d(%rip)     # 0xfa268
leaq 0x81ee4(%rip), %rdi     # 0xaefd6
callq 0x32933
movq %rax, 0xcd152(%rip)     # 0xfa250
leaq 0xcbe8b(%rip), %rdi     # 0xf8f90
xorl %esi, %esi
callq 0x2a155
movq %rax, 0xcca9d(%rip)     # 0xf9bb0
movq %r15, 0xcca9e(%rip)     # 0xf9bb8
movq $0x200000, 0xccabb(%rip) # imm = 0x200000
movq $0x1388, 0xcd160(%rip) # imm = 0x1388
callq 0x2be6d
movzbl 0xcc7b7(%rip), %ecx     # 0xf98f3
shll $0x18, %ecx
orl %eax, %ecx
movl %ecx, 0xcc7a9(%rip)     # 0xf98f0
callq 0x4de32
movl $0xe10, %edi            # imm = 0xE10
movl %ebx, %esi
callq 0x4dddc
pushq $0x64
popq %rsi
movl $0x12c, %edi            # imm = 0x12C
callq 0x4dddc
pushq $0x3c
popq %rdi
movl $0x2710, %esi           # imm = 0x2710
callq 0x4dddc
pxor %xmm0, %xmm0
movdqu %xmm0, 0xccf4a(%rip)    # 0xfa0c8
movl $0x18eb, 0xccf50(%rip)  # imm = 0x18EB
movdqu %xmm0, 0xccf50(%rip)    # 0xfa0e0
orq $-0x1, 0xccfe8(%rip)    # 0xfa180
movq $0x5, 0xccf4d(%rip) # 0xfa0f0
movq %r12, 0xccf7e(%rip)     # 0xfa128
andq $0x0, 0xccf7e(%rip)     # 0xfa130
andl $0x0, 0xccf7f(%rip)     # 0xfa138
movabsq $0x500000000, %rax      # imm = 0x500000000
movq %rax, 0xccef2(%rip)     # 0xfa0bc
movq $0x64, 0xccf67(%rip) # 0xfa13c
andq $0x0, 0xccf6b(%rip)     # 0xfa148
andq $0x0, 0xcce83(%rip)     # 0xfa068
andq $0x0, 0xcce8b(%rip)     # 0xfa078
movq $0x100000, 0xcce88(%rip) # imm = 0x100000
movdqu %xmm0, 0xcce88(%rip)    # 0xfa088
andq $0x0, 0xcce90(%rip)     # 0xfa098
movq $0xe10, 0xcce8d(%rip) # imm = 0xE10
xorl %edi, %edi
callq 0x26cd0
movq %rax, 0xcce87(%rip)     # 0xfa0a8
leaq 0xcc680(%rip), %rax     # 0xf98a8
leaq 0xcbfc1(%rip), %rcx     # 0xf91f0
cmpq $0x48, %r14
je 0x2d258
movq 0x10(%rcx,%r14), %rdx
movq %rdx, 0x630(%r14,%rax)
movdqu (%rcx,%r14), %xmm0
movdqu %xmm0, 0x620(%r14,%rax)
addq $0x18, %r14
jmp 0x2d22f
andq $0x0, 0xe0ce0(%rip)     # 0x10df40
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, 0xe0cd7(%rip)     # 0x10df48
movabsq $-0x10000000000000, %rax # imm = 0xFFF0000000000000
movq %rax, 0xe0cce(%rip)     # 0x10df50
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0xe0cc5(%rip)     # 0x10df58
leaq 0xcbc06(%rip), %rbx     # 0xf8ea0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2a155
movq %rax, 0xcc62d(%rip)     # 0xf98d8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2a155
movq %rax, 0xcc624(%rip)     # 0xf98e0
callq 0x2d3be
leaq 0x83150(%rip), %rdi     # 0xb0418
callq 0x2d544
movq %rax, 0xcc914(%rip)     # 0xf9be8
leaq 0x81460(%rip), %rdi     # 0xae73b
callq 0x2d544
movq %rax, 0xcc909(%rip)     # 0xf9bf0
leaq 0x811e4(%rip), %rdi     # 0xae4d2
callq 0x2d544
movq %rax, 0xcc8fe(%rip)     # 0xf9bf8
leaq 0x811dc(%rip), %rdi     # 0xae4dd
callq 0x2d544
movq %rax, 0xcc8f3(%rip)     # 0xf9c00
leaq 0x811b1(%rip), %rdi     # 0xae4c5
callq 0x2d544
movq %rax, 0xcc8e8(%rip)     # 0xf9c08
leaq 0x811e3(%rip), %rdi     # 0xae50a
callq 0x2d544
movq %rax, 0xcc8dd(%rip)     # 0xf9c10
leaq 0x8140a(%rip), %rdi     # 0xae744
callq 0x2d544
movq %rax, 0xcc8d2(%rip)     # 0xf9c18
leaq 0x92b86(%rip), %rdi     # 0xbfed3
callq 0x2d544
movq %rax, 0xcc8c7(%rip)     # 0xf9c20
leaq 0x81390(%rip), %rdi     # 0xae6f0
callq 0x2d544
movq %rax, 0xcc8bc(%rip)     # 0xf9c28
movq $0x2710, 0xcc939(%rip) # imm = 0x2710
movq $0x80, 0xcc936(%rip) # 0xf9cb8
andq $0x0, 0xccf36(%rip)     # 0xfa2c0
leaq 0x81c50(%rip), %rax     # 0xaefe1
movq %rax, 0xccf38(%rip)     # 0xfa2d0
leaq 0x81c58(%rip), %rax     # 0xaeff7
movq %rax, 0xccf32(%rip)     # 0xfa2d8
andq $0x0, 0xccf32(%rip)     # 0xfa2e0
andl $0x0, 0xccf33(%rip)     # 0xfa2e8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq