// File: /workspace/github_cpp_makefile_star2_O2/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 0x646e(%rip), %rdi      # 0x134fc
xorl %eax, %eax
callq 0x75c0
leaq 0x661a(%rip), %rsi      # 0x136b6
movq %r14, %rdi
callq 0x588d
cmpl $0x1, %eax
je 0xd0b1
testl %eax, %eax
jne 0xd0bc
xorl %eax, %eax
jmp 0xd0b3
movb $0x1, %al
leaq 0x20831ea(%rip), %rcx   # 0x20902a4
movb %al, (%rcx)
leaq 0x6479(%rip), %r15      # 0x1353c
leaq 0x6481(%rip), %rsi      # 0x1354b
leaq 0x5bfb(%rip), %rdx      # 0x12ccc
movq %r15, %rdi
xorl %eax, %eax
callq 0x75c0
leaq 0x20831c2(%rip), %rax   # 0x20902a4
leaq 0x646e(%rip), %r12      # 0x13557
cmpb $0x0, (%rax)
leaq 0x6480(%rip), %rbx      # 0x13573
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6459(%rip), %rsi      # 0x1355a
movq %r15, %rdi
xorl %eax, %eax
callq 0x75c0
leaq 0x62a1(%rip), %rsi      # 0x133b3
movq %r14, %rdi
callq 0x588d
testl %eax, %eax
setne 0xd17d(%rip)            # 0x1a2a0
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6446(%rip), %rsi      # 0x13577
movq %r15, %rdi
xorl %eax, %eax
callq 0x75c0
leaq 0x644c(%rip), %rsi      # 0x1358e
movq %r14, %rdi
callq 0x5759
cmpb $0x31, (%rax)
jne 0xd155
cmpb $0x0, 0x1(%rax)
je 0xd180
leaq 0x6432(%rip), %rsi      # 0x1358e
movq %r14, %rdi
callq 0x5759
cmpb $0x2d, (%rax)
jne 0xd1a8
cmpb $0x31, 0x1(%rax)
jne 0xd1a8
cmpb $0x0, 0x2(%rax)
jne 0xd1a8
leaq 0x6552(%rip), %rdx      # 0x136ce
pushq $-0x1
jmp 0xd189
leaq 0x654c(%rip), %rdx      # 0x136d3
pushq $0x1
popq %rax
leaq 0x209026f(%rip), %rcx   # 0x209d400
movl %eax, (%rcx)
leaq 0x63a2(%rip), %rdi      # 0x1353c
leaq 0x63f6(%rip), %rsi      # 0x13597
xorl %eax, %eax
callq 0x75c0
leaq 0x63f8(%rip), %rsi      # 0x135a7
movq %r14, %rdi
callq 0x588d
cmpl $0x3, %eax
ja 0xd221
movl %eax, %eax
leaq 0x6323(%rip), %rcx      # 0x134e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xc0ab(%rip), %rax      # 0x19280
movq (%rax), %rcx
leaq 0x63ce(%rip), %rsi      # 0x135ad
pushq $0x36
popq %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x7a54
callq 0x794c
jmp 0xd221
xorl %eax, %eax
movb %al, 0x20905b5(%rip)    # 0x209d7b0
movb %al, 0x20905b0(%rip)    # 0x209d7b1
jmp 0xd221
movb $0x1, 0x20905a7(%rip)   # 0x209d7b1
movb $0x0, 0x209059f(%rip)   # 0x209d7b0
jmp 0xd221
movb $0x1, 0x2090596(%rip)   # 0x209d7b0
movb $0x0, 0x2090590(%rip)   # 0x209d7b1
cmpb $0x0, 0x2090588(%rip)   # 0x209d7b0
movq %rbx, %rdx
cmovneq %r12, %rdx
leaq 0x6306(%rip), %r14      # 0x1353c
leaq 0x63c5(%rip), %rsi      # 0x13602
movq %r14, %rdi
xorl %eax, %eax
callq 0x75c0
cmpb $0x0, 0x2090563(%rip)   # 0x209d7b1
cmovneq %r12, %rbx
leaq 0x63b2(%rip), %rsi      # 0x1360b
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x75c0
leaq 0x499b(%rip), %rdi      # 0x11c08
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x75c0