// File: FreeSlave[P]vhlt/hlvis/vis.cpp
// Function: GetParamsFromEnt(entity_t*)
void            GetParamsFromEnt(entity_t* mapent)
{
    int iTmp;

    Log("\nCompile Settings detected from info_compile_parameters entity\n");

    // verbose(choices) : "Verbose compile messages" : 0 = [ 0 : "Off" 1 : "On" ]
    iTmp = IntForKey(mapent, "verbose");
    if (iTmp == 1)
    {
        g_verbose = true;
    }
    else if (iTmp == 0)
    {
        g_verbose = false;
    }
    Log("%30s [ %-9s ]\n", "Compile Option", "setting");
    Log("%30s [ %-9s ]\n", "Verbose Compile Messages", g_verbose ? "on" : "off");

    // estimate(choices) :"Estimate Compile Times?" : 0 = [ 0: "Yes" 1: "No" ]
    if (IntForKey(mapent, "estimate")) 
    {
        g_estimate = true;
    }
    else
    {
        g_estimate = false;
    }
    Log("%30s [ %-9s ]\n", "Estimate Compile Times", g_estimate ? "on" : "off");

	// priority(choices) : "Priority Level" : 0 = [	0 : "Normal" 1 : "High"	-1 : "Low" ]
	if (!strcmp(ValueForKey(mapent, "priority"), "1"))
    {
        g_threadpriority = eThreadPriorityHigh;
        Log("%30s [ %-9s ]\n", "Thread Priority", "high");
    }
    else if (!strcmp(ValueForKey(mapent, "priority"), "-1"))
    {
        g_threadpriority = eThreadPriorityLow;
        Log("%30s [ %-9s ]\n", "Thread Priority", "low");
    }

    /*
    hlvis(choices) : "HLVIS" : 2 = 
    [ 
        0 : "Off"
        1 : "Fast"
        2 : "Normal" 
        3 : "Full"
    ]
    */
    iTmp = IntForKey(mapent, "hlvis");
    if (iTmp == 0)
    {
        Fatal(assume_TOOL_CANCEL, 
            "%s flag was not checked in info_compile_parameters entity, execution of %s cancelled", g_Program, g_Program);
        CheckFatal();   
    }
    else if (iTmp == 1)
    {
        g_fastvis = true;
        g_fullvis = false;
    }
    else if (iTmp == 2)
    {
        g_fastvis = false;
        g_fullvis = false;
    }
    else if (iTmp == 3)
    {
        g_fullvis = true;
        g_fastvis = false;
    }
    Log("%30s [ %-9s ]\n", "Fast VIS", g_fastvis ? "on" : "off"); 
    Log("%30s [ %-9s ]\n", "Full VIS", g_fullvis ? "on" : "off" );

    ///////////////////
    Log("\n");
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0x73d4(%rip), %rdi      # 0x1c754
movb $0x0, %al
callq 0x9ed0
movq 0x10(%rsp), %rdi
leaq 0x757e(%rip), %rsi      # 0x1c911
callq 0x6d70
movl %eax, 0xc(%rsp)
cmpl $0x1, 0xc(%rsp)
jne 0x153af
leaq 0x2082eea(%rip), %rax   # 0x2098294
movb $0x1, (%rax)
jmp 0x153c2
cmpl $0x0, 0xc(%rsp)
jne 0x153c0
leaq 0x2082ed7(%rip), %rax   # 0x2098294
movb $0x0, (%rax)
jmp 0x153c2
leaq 0x73cb(%rip), %rdi      # 0x1c794
leaq 0x73d3(%rip), %rsi      # 0x1c7a3
leaq 0x6a15(%rip), %rdx      # 0x1bdec
movb $0x0, %al
callq 0x9ed0
leaq 0x2082eaf(%rip), %rax   # 0x2098294
movb (%rax), %cl
leaq 0x73dd(%rip), %rdx      # 0x1c7cb
leaq 0x73ba(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x7391(%rip), %rdi      # 0x1c794
leaq 0x73a8(%rip), %rsi      # 0x1c7b2
movb $0x0, %al
callq 0x9ed0
movq 0x10(%rsp), %rdi
leaq 0x71fa(%rip), %rsi      # 0x1c617
callq 0x6d70
cmpl $0x0, %eax
je 0x15430
movb $0x1, 0xce62(%rip)      # 0x22290
jmp 0x15437
movb $0x0, 0xce59(%rip)      # 0x22290
movb 0xce53(%rip), %cl       # 0x22290
leaq 0x7387(%rip), %rdx      # 0x1c7cb
leaq 0x7364(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x733b(%rip), %rdi      # 0x1c794
leaq 0x736f(%rip), %rsi      # 0x1c7cf
movb $0x0, %al
callq 0x9ed0
movq 0x10(%rsp), %rdi
leaq 0x7373(%rip), %rsi      # 0x1c7e6
callq 0x6b50
movq %rax, %rdi
leaq 0x737e(%rip), %rsi      # 0x1c800
callq 0x3330
cmpl $0x0, %eax
jne 0x154b7
leaq 0x208ff5d(%rip), %rax   # 0x20a53f0
movl $0x1, (%rax)
leaq 0x72f4(%rip), %rdi      # 0x1c794
leaq 0x7348(%rip), %rsi      # 0x1c7ef
leaq 0x7480(%rip), %rdx      # 0x1c92e
movb $0x0, %al
callq 0x9ed0
jmp 0x15507
movq 0x10(%rsp), %rdi
leaq 0x7323(%rip), %rsi      # 0x1c7e6
callq 0x6b50
movq %rax, %rdi
leaq 0x732d(%rip), %rsi      # 0x1c7ff
callq 0x3330
cmpl $0x0, %eax
jne 0x15505
leaq 0x208ff0d(%rip), %rax   # 0x20a53f0
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
leaq 0x72a4(%rip), %rdi      # 0x1c794
leaq 0x72f8(%rip), %rsi      # 0x1c7ef
leaq 0x742b(%rip), %rdx      # 0x1c929
movb $0x0, %al
callq 0x9ed0
jmp 0x15507
movq 0x10(%rsp), %rdi
leaq 0x72ef(%rip), %rsi      # 0x1c802
callq 0x6d70
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jne 0x15551
leaq 0xbd46(%rip), %rax      # 0x21270
movq (%rax), %rdx
leaq 0xbd3c(%rip), %rax      # 0x21270
movq (%rax), %rcx
movl $0x36, %edi
leaq 0x72c5(%rip), %rsi      # 0x1c808
movb $0x0, %al
callq 0xa4b0
callq 0xa360
jmp 0x1559a
cmpl $0x1, 0xc(%rsp)
jne 0x15568
movb $0x1, 0x2090251(%rip)   # 0x20a57b0
movb $0x0, 0x209024b(%rip)   # 0x20a57b1
jmp 0x15598
cmpl $0x2, 0xc(%rsp)
jne 0x1557f
movb $0x0, 0x209023a(%rip)   # 0x20a57b0
movb $0x0, 0x2090234(%rip)   # 0x20a57b1
jmp 0x15596
cmpl $0x3, 0xc(%rsp)
jne 0x15594
movb $0x1, 0x2090224(%rip)   # 0x20a57b1
movb $0x0, 0x209021c(%rip)   # 0x20a57b0
jmp 0x15596
jmp 0x15598
jmp 0x1559a
movb 0x2090210(%rip), %cl    # 0x20a57b0
leaq 0x7224(%rip), %rdx      # 0x1c7cb
leaq 0x7201(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x71d8(%rip), %rdi      # 0x1c794
leaq 0x729a(%rip), %rsi      # 0x1c85d
movb $0x0, %al
callq 0x9ed0
movb 0x20901e1(%rip), %cl    # 0x20a57b1
leaq 0x71f4(%rip), %rdx      # 0x1c7cb
leaq 0x71d1(%rip), %rax      # 0x1c7af
testb $0x1, %cl
cmovneq %rax, %rdx
leaq 0x71a8(%rip), %rdi      # 0x1c794
leaq 0x7273(%rip), %rsi      # 0x1c866
movb $0x0, %al
callq 0x9ed0
leaq 0x5727(%rip), %rdi      # 0x1ad28
movb $0x0, %al
callq 0x9ed0
addq $0x18, %rsp
retq
nopl (%rax)