// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: Settings()
static void     Settings()
{
    char*           tmp;

    if (!g_info)
    {
        return; 
    }

    Log("\n-= Current %s Settings =-\n", g_Program);
    Log("Name               |  Setting  |  Default\n" "-------------------|-----------|-------------------------\n");

    // ZHLT Common Settings
    if (DEFAULT_NUMTHREADS == -1)
    {
        Log("threads             [ %7d ] [  Varies ]\n", g_numthreads);
    }
    else
    {
        Log("threads             [ %7d ] [ %7d ]\n", g_numthreads, DEFAULT_NUMTHREADS);
    }

    Log("verbose             [ %7s ] [ %7s ]\n", g_verbose ? "on" : "off", DEFAULT_VERBOSE ? "on" : "off");
    Log("log                 [ %7s ] [ %7s ]\n", g_log ? "on" : "off", DEFAULT_LOG ? "on" : "off");
    Log("developer           [ %7d ] [ %7d ]\n", g_developer, DEFAULT_DEVELOPER);
    Log("chart               [ %7s ] [ %7s ]\n", g_chart ? "on" : "off", DEFAULT_CHART ? "on" : "off");
    Log("estimate            [ %7s ] [ %7s ]\n", g_estimate ? "on" : "off", DEFAULT_ESTIMATE ? "on" : "off");
    Log("max texture memory  [ %7d ] [ %7d ]\n", g_max_map_miptex, DEFAULT_MAX_MAP_MIPTEX);

#ifdef HLVIS_MAXDIST // AJM: MVD
    Log("max vis distance    [ %7d ] [ %7d ]\n", g_maxdistance, DEFAULT_MAXDISTANCE_RANGE);
	//Log("max dist only       [ %7s ] [ %7s ]\n", g_postcompile ? "on" : "off", DEFAULT_POST_COMPILE ? "on" : "off");
#endif

    switch (g_threadpriority)
    {
    case eThreadPriorityNormal:
    default:
        tmp = "Normal";
        break;
    case eThreadPriorityLow:
        tmp = "Low";
        break;
    case eThreadPriorityHigh:
        tmp = "High";
        break;
    }
    Log("priority            [ %7s ] [ %7s ]\n", tmp, "Normal");
    Log("\n");

    // HLVIS Specific Settings
    Log("fast vis            [ %7s ] [ %7s ]\n", g_fastvis ? "on" : "off", DEFAULT_FASTVIS ? "on" : "off");
    Log("full vis            [ %7s ] [ %7s ]\n", g_fullvis ? "on" : "off", DEFAULT_FULLVIS ? "on" : "off");

#ifdef ZHLT_NETVIS
    if (g_vismode == VIS_MODE_SERVER)
    {
        Log("netvis mode         [  Server ]\n");
    }
    else if (g_vismode == VIS_MODE_CLIENT)
    {
        Log("netvis mode         [  Client, connected to %s ]\n", g_server_addr);
    }
    Log("netvis port         [ %7d ] [ %7d ]\n", g_port, DEFAULT_NETVIS_PORT);
    Log("netvis display rate [ %7d ] [ %7d ]\n", g_rate, DEFAULT_NETVIS_RATE);
#endif

    Log("\n\n");
}

// Assembly:
subq $0x28, %rsp
testb $0x1, 0xbe76(%rip)      # 0x22291
jne 0x16422
jmp 0x1665f
leaq 0xae47(%rip), %rax      # 0x21270
movq (%rax), %rsi
leaq 0x6b75(%rip), %rdi      # 0x1cfa8
xorl %eax, %eax
movl %eax, 0x14(%rsp)
movb %al, 0x1b(%rsp)
callq 0x9ed0
movb 0x1b(%rsp), %al
leaq 0x6b77(%rip), %rdi      # 0x1cfc4
callq 0x9ed0
movb 0x1b(%rsp), %al
leaq 0xbe27(%rip), %rcx      # 0x22284
movl (%rcx), %esi
leaq 0x6bc3(%rip), %rdi      # 0x1d029
callq 0x9ed0
movb 0x1b(%rsp), %al
leaq 0x2081e1e(%rip), %rcx   # 0x2098294
movb (%rcx), %sil
leaq 0x632f(%rip), %rcx      # 0x1c7af
movq %rcx, 0x8(%rsp)
leaq 0x633f(%rip), %rdx      # 0x1c7cb
movq %rdx, (%rsp)
testb $0x1, %sil
movq %rdx, %rsi
cmovneq %rcx, %rsi
leaq 0x6bb0(%rip), %rdi      # 0x1d052
callq 0x9ed0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movb 0x1b(%rsp), %al
leaq 0xbdc5(%rip), %rcx      # 0x22280
movb (%rcx), %cl
testb $0x1, %cl
cmovneq %rdx, %rsi
leaq 0x6bac(%rip), %rdi      # 0x1d077
callq 0x9ed0
movl 0x14(%rsp), %edx
movb 0x1b(%rsp), %al
leaq 0x2081db1(%rip), %rcx   # 0x2098290
movl (%rcx), %esi
leaq 0x6bb4(%rip), %rdi      # 0x1d09c
callq 0x9ed0
movq (%rsp), %rdx
movq 0x8(%rsp), %rcx
movb 0x1b(%rsp), %al
movb 0x208f2b1(%rip), %sil   # 0x20a57b2
testb $0x1, %sil
movq %rdx, %rsi
cmovneq %rcx, %rsi
leaq 0x6bae(%rip), %rdi      # 0x1d0c1
callq 0x9ed0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movb 0x1b(%rsp), %al
movb 0xbd65(%rip), %cl       # 0x22290
testb $0x1, %cl
cmovneq %rdx, %rsi
leaq 0x6bad(%rip), %rdi      # 0x1d0e6
callq 0x9ed0
movb 0x1b(%rsp), %al
leaq 0xad17(%rip), %rcx      # 0x21260
movl (%rcx), %esi
leaq 0x6bb9(%rip), %rdi      # 0x1d10b
movl $0x2000000, %edx        # imm = 0x2000000
callq 0x9ed0
movl 0x14(%rsp), %edx
movb 0x1b(%rsp), %al
movl 0x208f24a(%rip), %esi   # 0x20a57b4
leaq 0x6bbf(%rip), %rdi      # 0x1d130
callq 0x9ed0
leaq 0x208ee73(%rip), %rax   # 0x20a53f0
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
subl $-0x1, %eax
je 0x165af
jmp 0x1658a
movl 0x1c(%rsp), %eax
testl %eax, %eax
je 0x1659f
jmp 0x16594
movl 0x1c(%rsp), %eax
subl $0x1, %eax
je 0x165bd
jmp 0x165a1
jmp 0x165a1
leaq 0x6bad(%rip), %rax      # 0x1d155
movq %rax, 0x20(%rsp)
jmp 0x165c9
leaq 0x6ba6(%rip), %rax      # 0x1d15c
movq %rax, 0x20(%rsp)
jmp 0x165c9
leaq 0x6b9c(%rip), %rax      # 0x1d160
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
leaq 0x6b90(%rip), %rdi      # 0x1d165
leaq 0x6b79(%rip), %rdx      # 0x1d155
movb $0x0, %al
callq 0x9ed0
leaq 0x473e(%rip), %rdi      # 0x1ad28
movb $0x0, %al
callq 0x9ed0
movb 0x208f1b9(%rip), %cl    # 0x20a57b0
leaq 0x61cd(%rip), %rsi      # 0x1c7cb
leaq 0x61aa(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0x6b77(%rip), %rdi      # 0x1d18a
leaq 0x61b1(%rip), %rdx      # 0x1c7cb
movb $0x0, %al
callq 0x9ed0
movb 0x208f18a(%rip), %cl    # 0x20a57b1
leaq 0x619d(%rip), %rsi      # 0x1c7cb
leaq 0x617a(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rsi
leaq 0x6b6c(%rip), %rdi      # 0x1d1af
leaq 0x6181(%rip), %rdx      # 0x1c7cb
movb $0x0, %al
callq 0x9ed0
leaq 0x46cf(%rip), %rdi      # 0x1ad27
movb $0x0, %al
callq 0x9ed0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)