// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0xcff71(%rip), %rdi     # 0x101918
movl $0x28, %esi
callq 0x40256
xorps %xmm0, %xmm0
movups %xmm0, 0xcfef5(%rip)    # 0x1018b0
movl $0xa, %ebp
movl %ebp, 0xcff02(%rip)     # 0x1018c8
movb $0x0, 0xcff73(%rip)     # 0x101940
movl $0x40, 0xcff39(%rip)    # 0x101910
movabsq $0x1ff000018eb, %rax    # imm = 0x1FF000018EB
movq %rax, 0xcff60(%rip)     # 0x101948
xorl %r14d, %r14d
movl %r14d, 0xcffde(%rip)    # 0x1019d0
movq %r14, 0xcffdf(%rip)     # 0x1019d8
movl %r14d, 0xcffe0(%rip)    # 0x1019e0
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0xd0013(%rip)     # 0x101a24
movl $0x1, %ebx
movq %rbx, 0xd01a3(%rip)     # 0x101bc0
movl $0x10, 0xd0491(%rip)    # 0x101eb8
movdqa 0x8aae1(%rip), %xmm0    # 0xbc510
movdqu %xmm0, 0xd0469(%rip)    # 0x101ea0
movq $0x40000000, 0xd046e(%rip) # imm = 0x40000000
movq %r14, 0xd0597(%rip)     # 0x101fe0
leaq 0x8f065(%rip), %rdi     # 0xc0ab5
callq 0x3844d
movq %rax, 0xd05ec(%rip)     # 0x102048
movl %r14d, 0xd05ed(%rip)    # 0x102050
leaq 0x8b65e(%rip), %rdi     # 0xbd0c8
callq 0x3844d
movq %rax, 0xd05e2(%rip)     # 0x102058
movl $0x80, 0xd05e0(%rip)    # 0x102060
movl %r14d, 0xd043d(%rip)    # 0x101ec4
movq %r14, 0xd042e(%rip)     # 0x101ebc
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xd0471(%rip)     # 0x101f10
movabsq $0x6400000000, %rax     # imm = 0x6400000000
movq %rax, 0xd0470(%rip)     # 0x101f20
movq $0x4000000, 0xd046d(%rip) # imm = 0x4000000
movq %r14, 0xd046e(%rip)     # 0x101f30
movl %r14d, 0xd0477(%rip)    # 0x101f40
xorl %edi, %edi
callq 0x26cd0
movq %rax, 0xd0491(%rip)     # 0x101f68
pcmpeqd %xmm0, %xmm0
movdqu %xmm0, 0xd048d(%rip)    # 0x101f70
movl %r14d, 0xd0496(%rip)    # 0x101f80
movq %r14, 0xd0497(%rip)     # 0x101f88
movq $-0x1, %r12
movq %r12, 0xd0459(%rip)     # 0x101f58
movq %r14, 0xd045a(%rip)     # 0x101f60
movl $0x1, %r15d
movl %r15d, 0xd047d(%rip)    # 0x101f90
movl %r15d, 0xd0482(%rip)    # 0x101f9c
movq %r14, 0xcfde7(%rip)     # 0x101908
leaq 0x8b5a6(%rip), %rdi     # 0xbd0ce
callq 0x3844d
movq %rax, 0xd04bc(%rip)     # 0x101ff0
leaq 0x8b59c(%rip), %rdi     # 0xbd0d7
callq 0x3844d
movq %rax, 0xd03d1(%rip)     # 0x101f18
movq %r14, 0xcfdb2(%rip)     # 0x101900
movabsq $0x100000001, %r13      # imm = 0x100000001
movq %r13, 0xd0499(%rip)     # 0x101ff8
movl %r15d, 0xd04c6(%rip)    # 0x10202c
movl %r15d, 0xcfd8b(%rip)    # 0x1018f8
movl %r14d, 0xd06cc(%rip)    # 0x102240
movl $0x2710, 0xd062e(%rip)  # imm = 0x2710
movl %r14d, 0xd063b(%rip)    # 0x1021c0
movq %r14, 0xd0624(%rip)     # 0x1021b0
movabsq $0x500000005, %rax      # imm = 0x500000005
movq %rax, 0xd061b(%rip)     # 0x1021b8
movl $0x200, %eax            # imm = 0x200
movq %rax, 0xd063f(%rip)     # 0x1021e8
movl $0x40, %ecx
movq %rcx, 0xd063b(%rip)     # 0x1021f0
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movq %rdx, 0xd0657(%rip)     # 0x102218
movq %rax, 0xd0630(%rip)     # 0x1021f8
movl $0x80, %eax
movq %rax, 0xd062c(%rip)     # 0x102200
movq %rcx, 0xd062d(%rip)     # 0x102208
movq $0xbb8, 0xd062a(%rip) # imm = 0xBB8
movl %r14d, 0xcfd07(%rip)    # 0x1018f4
movl %ebp, 0xd047d(%rip)     # 0x102070
movl $0x3c, 0xd04df(%rip)    # 0x1020dc
movabsq $0xa00000000, %rax      # imm = 0xA00000000
movq %rax, 0xd04a2(%rip)     # 0x1020b0
movl %r14d, 0xd062f(%rip)    # 0x102244
movq $0x3a98, 0xd0628(%rip) # imm = 0x3A98
movabsq $0xa00000001, %rax      # imm = 0xA00000001
movq %rax, 0xd062f(%rip)     # 0x102260
movl %r15d, 0xd0630(%rip)    # 0x102268
leaq 0x8b4a7(%rip), %rdi     # 0xbd0e6
callq 0x3844d
movq %rax, 0xd0605(%rip)     # 0x102250
leaq 0xcf33e(%rip), %rdi     # 0x100f90
xorl %esi, %esi
callq 0x2e68c
movq %rax, 0xcff50(%rip)     # 0x101bb0
movq %rbx, 0xcff51(%rip)     # 0x101bb8
movq $0x200000, 0xcff6e(%rip) # imm = 0x200000
movq $0x1388, 0xd0613(%rip) # imm = 0x1388
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26300
imulq $0xf4240, (%rbx), %rax  # imm = 0xF4240
addq 0x8(%rbx), %rax
movabsq $0x431bde82d7b634db, %rcx # imm = 0x431BDE82D7B634DB
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x12, %rdx
addl %eax, %edx
andl $0xffffff, %edx         # imm = 0xFFFFFF
movzbl 0xcfc35(%rip), %eax     # 0x1018f3
shll $0x18, %eax
orl %edx, %eax
movl %eax, 0xcfc27(%rip)     # 0x1018f0
callq 0x56e98
movl $0xe10, %edi            # imm = 0xE10
movl $0x1, %esi
callq 0x56e42
movl $0x12c, %edi            # imm = 0x12C
movl $0x64, %esi
callq 0x56e42
movl $0x3c, %edi
movl $0x2710, %esi           # imm = 0x2710
callq 0x56e42
pxor %xmm0, %xmm0
movdqu %xmm0, 0xd03c1(%rip)    # 0x1020c8
movl $0x18eb, 0xd03c7(%rip)  # imm = 0x18EB
movdqu %xmm0, 0xd03c7(%rip)    # 0x1020e0
movq %r12, 0xd0460(%rip)     # 0x102180
movq $0x5, 0xd03c5(%rip) # 0x1020f0
movq %r13, 0xd03f6(%rip)     # 0x102128
movq %r14, 0xd03f7(%rip)     # 0x102130
movl %r14d, 0xd03f8(%rip)    # 0x102138
movabsq $0x500000000, %rax      # imm = 0x500000000
movq %rax, 0xd036b(%rip)     # 0x1020bc
movq $0x64, 0xd03e0(%rip) # 0x10213c
movq %r14, 0xd03e5(%rip)     # 0x102148
movq %r14, 0xd02fe(%rip)     # 0x102068
movq %r14, 0xd0307(%rip)     # 0x102078
movq $0x100000, 0xd0304(%rip) # imm = 0x100000
movdqu %xmm0, 0xd0304(%rip)    # 0x102088
movq %r14, 0xd030d(%rip)     # 0x102098
movq $0xe10, 0xd030a(%rip) # imm = 0xE10
xorl %edi, %edi
callq 0x26cd0
movq %rax, 0xd0304(%rip)     # 0x1020a8
leaq 0xd011d(%rip), %rdi     # 0x101ec8
leaq 0xcf43e(%rip), %rsi     # 0x1011f0
movl $0x9, %ecx
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0xe417f(%rip)     # 0x115f40
movabsq $0x7ff0000000000000, %rax # imm = 0x7FF0000000000000
movq %rax, 0xe4176(%rip)     # 0x115f48
movabsq $-0x10000000000000, %rax # imm = 0xFFF0000000000000
movq %rax, 0xe416d(%rip)     # 0x115f50
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, 0xe4164(%rip)     # 0x115f58
leaq 0xcf0a5(%rip), %rbx     # 0x100ea0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e68c
movq %rax, 0xcfacc(%rip)     # 0x1018d8
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2e68c
movq %rax, 0xcfac3(%rip)     # 0x1018e0
callq 0x31f24
leaq 0x8c6ff(%rip), %rdi     # 0xbe528
callq 0x32094
movq %rax, 0xcfdb3(%rip)     # 0x101be8
leaq 0x8aa0f(%rip), %rdi     # 0xbc84b
callq 0x32094
movq %rax, 0xcfda8(%rip)     # 0x101bf0
leaq 0x8a793(%rip), %rdi     # 0xbc5e2
callq 0x32094
movq %rax, 0xcfd9d(%rip)     # 0x101bf8
leaq 0x8a78b(%rip), %rdi     # 0xbc5ed
callq 0x32094
movq %rax, 0xcfd92(%rip)     # 0x101c00
leaq 0x8a760(%rip), %rdi     # 0xbc5d5
callq 0x32094
movq %rax, 0xcfd87(%rip)     # 0x101c08
leaq 0x8a792(%rip), %rdi     # 0xbc61a
callq 0x32094
movq %rax, 0xcfd7c(%rip)     # 0x101c10
leaq 0x8a9b9(%rip), %rdi     # 0xbc854
callq 0x32094
movq %rax, 0xcfd71(%rip)     # 0x101c18
leaq 0x9d45d(%rip), %rdi     # 0xcf30b
callq 0x32094
movq %rax, 0xcfd66(%rip)     # 0x101c20
leaq 0x8a93f(%rip), %rdi     # 0xbc800
callq 0x32094
movq %rax, 0xcfd5b(%rip)     # 0x101c28
movq $0x2710, 0xcfdd8(%rip) # imm = 0x2710
movl $0x80, %eax
movq %rax, 0xcfdd4(%rip)     # 0x101cb8
movq %r14, 0xd03d5(%rip)     # 0x1022c0
leaq 0x8b1ff(%rip), %rax     # 0xbd0f1
movq %rax, 0xd03d7(%rip)     # 0x1022d0
leaq 0x8b207(%rip), %rax     # 0xbd107
movq %rax, 0xd03d1(%rip)     # 0x1022d8
movq %r14, 0xd03d2(%rip)     # 0x1022e0
movl %r14d, 0xd03d3(%rip)    # 0x1022e8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq