// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x618a(%rip), %rdi      # 0x15600
xorl %eax, %eax
callq 0x8aae
leaq 0x6339(%rip), %rsi      # 0x157bd
movq %r14, %rdi
callq 0x6427
cmpl $0x1, %eax
je 0xf499
testl %eax, %eax
jne 0xf4a4
xorl %eax, %eax
jmp 0xf49b
movb $0x1, %al
leaq 0x2082e02(%rip), %rcx   # 0x20922a4
movb %al, (%rcx)
leaq 0x6195(%rip), %r15      # 0x15640
leaq 0x619d(%rip), %rsi      # 0x1564f
leaq 0x58b3(%rip), %rdx      # 0x14d6c
movq %r15, %rdi
xorl %eax, %eax
callq 0x8aae
leaq 0x2082dda(%rip), %rax   # 0x20922a4
leaq 0x618a(%rip), %r12      # 0x1565b
cmpb $0x0, (%rax)
leaq 0x619c(%rip), %rbx      # 0x15677
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6175(%rip), %rsi      # 0x1565e
movq %r15, %rdi
xorl %eax, %eax
callq 0x8aae
leaq 0x5f71(%rip), %rsi      # 0x1546b
movq %r14, %rdi
callq 0x6427
testl %eax, %eax
setne 0xcd95(%rip)            # 0x1c2a0
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6162(%rip), %rsi      # 0x1567b
movq %r15, %rdi
xorl %eax, %eax
callq 0x8aae
leaq 0x6168(%rip), %rsi      # 0x15692
movq %r14, %rdi
callq 0x62f1
leaq 0x6173(%rip), %rsi      # 0x156ac
movq %rax, %rdi
callq 0x3340
testl %eax, %eax
je 0xf575
leaq 0x6146(%rip), %rsi      # 0x15692
movq %r14, %rdi
callq 0x62f1
leaq 0x6150(%rip), %rsi      # 0x156ab
movq %rax, %rdi
callq 0x3340
testl %eax, %eax
jne 0xf59f
leaq 0x6267(%rip), %rdx      # 0x157d5
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xf581
leaq 0x625e(%rip), %rdx      # 0x157da
movl $0x1, %eax
leaq 0x208fe78(%rip), %rcx   # 0x209f400
movl %eax, (%rcx)
leaq 0x60af(%rip), %rdi      # 0x15640
leaq 0x6103(%rip), %rsi      # 0x1569b
xorl %eax, %eax
callq 0x8aae
leaq 0x6108(%rip), %rsi      # 0x156ae
movq %r14, %rdi
callq 0x6427
cmpl $0x3, %eax
ja 0xf61a
movl %eax, %eax
leaq 0x5fec(%rip), %rcx      # 0x155a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xbcb4(%rip), %rax      # 0x1b280
movq (%rax), %rcx
leaq 0x60de(%rip), %rsi      # 0x156b4
movl $0x36, %edi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x8e8b
callq 0x8d87
jmp 0xf61a
xorl %eax, %eax
movb %al, 0x20901bc(%rip)    # 0x209f7b0
movb %al, 0x20901b7(%rip)    # 0x209f7b1
jmp 0xf61a
movb $0x1, 0x20901ae(%rip)   # 0x209f7b1
movb $0x0, 0x20901a6(%rip)   # 0x209f7b0
jmp 0xf61a
movb $0x1, 0x209019d(%rip)   # 0x209f7b0
movb $0x0, 0x2090197(%rip)   # 0x209f7b1
cmpb $0x0, 0x209018f(%rip)   # 0x209f7b0
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6011(%rip), %r14      # 0x15640
leaq 0x60d3(%rip), %rsi      # 0x15709
movq %r14, %rdi
xorl %eax, %eax
callq 0x8aae
cmpb $0x0, 0x209016a(%rip)   # 0x209f7b1
cmovneq %r12, %rbx
leaq 0x60c0(%rip), %rsi      # 0x15712
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x8aae
leaq 0x4642(%rip), %rdi      # 0x13ca8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x8aae