LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: LogError(char const*)
void            LogError(const char* const message)
{
    if (g_log && CompileLog)
    {
        char            logfilename[_MAX_PATH];
        FILE*           ErrorLog = NULL;

        safe_snprintf(logfilename, _MAX_PATH, "%s.err", g_Mapname);
        ErrorLog = fopen(logfilename, "a");

        if (ErrorLog)
        {
            fprintf(ErrorLog, "%s: %s\n", g_Program, message);
            fflush(ErrorLog);
            fclose(ErrorLog);
            ErrorLog = NULL;
        }
        else
        {
#ifdef ZHLT_LANGFILE
            fprintf(stderr, Localize ("ERROR: Could not open error logfile %s"), logfilename);
#else
            fprintf(stderr, "ERROR: Could not open error logfile %s", logfilename);
#endif
            fflush(stderr);
#ifdef ZHLT_CONSOLE
			if (twice)
			{
#ifdef ZHLT_LANGFILE
				fprintf (conout, Localize ("ERROR: Could not open error logfile %s"), logfilename);
#else
				fprintf (conout, "ERROR: Could not open error logfile %s", logfilename);
#endif
				fflush (conout);
			}
#endif
        }
    }
}

// Assembly:
cmpb $0x1, 0x1e8cc(%rip)     # 0x27360
jne 0x8b1d
cmpq $0x0, 0x20b89fe(%rip)   # 0x20c14a0
je 0x8b1d
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rdi, %rbx
leaq 0x11f55(%rip), %rdx     # 0x1aa0d
leaq 0x1d8a1(%rip), %rcx     # 0x26360
movq %rsp, %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
xorl %eax, %eax
callq 0x78cb
leaq 0x137f5(%rip), %rsi     # 0x1c2cd
movq %r14, %rdi
callq 0x43a0
testq %rax, %rax
je 0x8b1e
movq %rax, %r14
movq 0x1d861(%rip), %rdx     # 0x26350
leaq 0x11f71(%rip), %rsi     # 0x1aa67
movq %rax, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x44a0
movq %r14, %rdi
callq 0x4390
movq %r14, %rdi
callq 0x4300
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movq 0x1d4ab(%rip), %r14     # 0x25fd0
movq (%r14), %rbx
leaq 0x11f40(%rip), %rdi     # 0x1aa6f
callq 0x8b86
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x44a0
movq (%r14), %rdi
callq 0x4390
cmpb $0x1, 0x20b4935(%rip)   # 0x20bd488
jne 0x8b13
movq 0x20b4934(%rip), %rbx   # 0x20bd490
leaq 0x11f0c(%rip), %rdi     # 0x1aa6f
callq 0x8b86
movq %rsp, %rdx
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x44a0
movq 0x20b4911(%rip), %rdi   # 0x20bd490
callq 0x4390
jmp 0x8b13
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Localize(char const*)
const char * Localize (const char *s)
{
	int i;
	for (i=0; i<g_lang_count; i++)
	{
		if (!strcmp (g_lang[i][0], s))
		{
			return g_lang[i][1];
		}
	}
	return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x20b4903(%rip), %r14d  # 0x20bd498
xorl %ecx, %ecx
testl %r14d, %r14d
cmovlel %ecx, %r14d
movq %rdi, %rbx
shlq $0x4, %r14
addq $0x10, %r14
leaq 0x20b48f0(%rip), %r15   # 0x20bd4a0
leaq 0x10(%rcx), %r12
cmpq %r12, %r14
je 0x8bd1
movq (%rcx,%r15), %rdi
movq %rbx, %rsi
callq 0x4480
movq %r12, %rcx
testl %eax, %eax
jne 0x8bb0
movq -0x8(%r12,%r15), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: CloseLog()
void CDECL      CloseLog()
{
    if (g_log && CompileLog)
    {
        LogEnd();
        fflush(CompileLog);
        fclose(CompileLog);
        CompileLog = NULL;
    }
}

// Assembly:
cmpb $0x1, 0x1e6b8(%rip)     # 0x27360
jne 0x8cde
cmpq $0x0, 0x20b87ee(%rip)   # 0x20c14a0
je 0x8cde
pushq %rax
callq 0x8cdf
movq 0x20b87df(%rip), %rdi   # 0x20c14a0
callq 0x4390
movq 0x20b87d3(%rip), %rdi   # 0x20c14a0
callq 0x4300
andq $0x0, 0x20b87c6(%rip)   # 0x20c14a0
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: WriteLog(char const*)
void            WriteLog(const char* const message)
{

#ifndef SYSTEM_WIN32
    if (CompileLog)
    {
        fprintf(CompileLog, "%s", message); //fprintf(CompileLog, message); //--vluzacn
        fflush(CompileLog);
    }
#else
    Safe_WriteLog(message);
#endif

    fprintf(stdout, "%s", message); //fprintf(stdout, message); //--vluzacn
    fflush(stdout);
#ifdef ZHLT_CONSOLE
	if (twice)
	{
		fprintf (conout, "%s", message);
		fflush (conout);
	}
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20b879e(%rip), %rsi   # 0x20c14a0
testq %rsi, %rsi
je 0x8d1b
movq %rbx, %rdi
callq 0x4380
movq 0x20b878a(%rip), %rdi   # 0x20c14a0
callq 0x4390
movq 0x1d27e(%rip), %r14     # 0x25fa0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4380
movq (%r14), %rdi
callq 0x4390
cmpb $0x1, 0x20b474c(%rip)   # 0x20bd488
jne 0x8d60
movq 0x20b474b(%rip), %rsi   # 0x20bd490
movq %rbx, %rdi
callq 0x4380
movq 0x20b473c(%rip), %rdi   # 0x20bd490
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4390
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Error(char const*, ...)
void CDECL FORMAT_PRINTF(1,2)      Error(const char* const error, ...)
{
    char            message[MAX_ERROR];
    char            message2[MAX_ERROR];
    va_list         argptr;
    
 /*#if defined( SYSTEM_WIN32 ) && !defined( __MINGW32__ ) && !defined( __BORLANDC__ )
    {
        char* wantint3 = getenv("WANTINT3");
		if (wantint3)
		{
			if (atoi(wantint3))
			{
				__asm
				{
					int 3;
				}
			}
		}
    }
#endif*/

    va_start(argptr, error);
#ifdef ZHLT_LANGFILE
    vsnprintf(message, MAX_ERROR, Localize (error), argptr);
#else
    vsnprintf(message, MAX_ERROR, error, argptr);
#endif
    va_end(argptr);

#ifdef ZHLT_LANGFILE
    safe_snprintf(message2, MAX_MESSAGE, "%s%s\n", Localize ("Error: "), message);
#else
    safe_snprintf(message2, MAX_MESSAGE, "Error: %s\n", message);
#endif
    WriteLog(message2);
    LogError(message2);

    fatal = 1;
    CheckFatal();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
leaq 0x20(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x8dd9
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rbx
movq %r10, 0x10(%rbx)
leaq 0x10f0(%rsp), %rax
movq %rax, 0x8(%rbx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rbx)
callq 0x8b86
leaq 0x8d0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4200
leaq 0x11c97(%rip), %rdi     # 0x1aab7
callq 0x8b86
leaq 0x11c9b(%rip), %rdx     # 0x1aac7
leaq 0xd0(%rsp), %rbx
movl $0x800, %esi            # imm = 0x800
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x78cb
movq %rbx, %rdi
callq 0x8cf4
movq %rbx, %rdi
callq 0x8a8d
movb $0x1, 0x20b8648(%rip)   # 0x20c14a8
callq 0x8d68
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Fatal(assume_msgs, char const*, ...)
void CDECL FORMAT_PRINTF(2,3)      Fatal(assume_msgs msgid, const char* const warning, ...)
{
    char            message[MAX_WARNING];
    char            message2[MAX_WARNING];

    va_list         argptr;

    va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
    vsnprintf(message, MAX_WARNING, Localize (warning), argptr);
#else
    vsnprintf(message, MAX_WARNING, warning, argptr);
#endif
    va_end(argptr);

#ifdef ZHLT_LANGFILE
    safe_snprintf(message2, MAX_MESSAGE, "%s%s\n", Localize ("Error: "), message);
#else
    safe_snprintf(message2, MAX_MESSAGE, "Error: %s\n", message);
#endif
    WriteLog(message2);
    LogError(message2);

    {
        char            message[MAX_MESSAGE];
        const MessageTable_t* msg = GetAssume(msgid);

#ifdef ZHLT_LANGFILE
        safe_snprintf(message, MAX_MESSAGE, "%s\n%s%s\n%s%s\n", Localize (msg->title), Localize ("Description: "), Localize (msg->text), Localize ("Howto Fix: "), Localize (msg->howto));
#else
        safe_snprintf(message, MAX_MESSAGE, "%s\nDescription: %s\nHowto Fix: %s\n", msg->title, msg->text, msg->howto);
#endif
        PrintOnce(message);
    }

    fatal = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18d0, %rsp           # imm = 0x18D0
movl %edi, %ebx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x8ed2
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %r14
movq %rdi, 0x10(%r14)
leaq 0x1900(%rsp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r14)
movq %rsi, %rdi
callq 0x8b86
leaq 0x10d0(%rsp), %r15
movl $0x800, %esi            # imm = 0x800
movq %r15, %rdi
movq %rax, %rdx
movq %r14, %rcx
callq 0x4200
leaq 0x11b9b(%rip), %rdi     # 0x1aab7
callq 0x8b86
leaq 0x11b9f(%rip), %rdx     # 0x1aac7
leaq 0x8d0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x78cb
movq %r14, %rdi
callq 0x8cf4
movq %r14, %rdi
callq 0x8a8d
movl %ebx, %edi
callq 0x9964
movq %rax, %r14
movq (%rax), %rdi
callq 0x8b86
movq %rax, %rbx
leaq 0x11b5c(%rip), %rdi     # 0x1aacd
callq 0x8b86
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0x8b86
movq %rax, %r12
leaq 0x11b4f(%rip), %rdi     # 0x1aadb
callq 0x8b86
movq %rax, %r13
movq 0x10(%r14), %rdi
callq 0x8b86
movq %rax, %r10
leaq 0x11b18(%rip), %rdx     # 0x1aabf
leaq 0xd0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rbx, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
pushq %r10
pushq %r13
callq 0x78cb
popq %rcx
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x8fef
movb $0x1, 0x20b84ca(%rip)   # 0x20c14a8
addq $0x18d0, %rsp           # imm = 0x18D0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: PrintOnce(char const*, ...)
void CDECL FORMAT_PRINTF(1,2)      PrintOnce(const char* const warning, ...)
{
    char            message[MAX_WARNING];
    char            message2[MAX_WARNING];
    va_list         argptr;
    static int      count = 0;

    if (count > 0) // make sure it only gets called once
    {
        return;
    }
    count++;

    va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
    vsnprintf(message, MAX_WARNING, Localize (warning), argptr);
#else
    vsnprintf(message, MAX_WARNING, warning, argptr);
#endif
    va_end(argptr);

#ifdef ZHLT_LANGFILE
    safe_snprintf(message2, MAX_MESSAGE, "%s%s\n", Localize ("Error: "), message);
#else
    safe_snprintf(message2, MAX_MESSAGE, "Error: %s\n", message);
#endif
    WriteLog(message2);
    LogError(message2);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x904d
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpb $0x0, 0x20b8458(%rip)   # 0x20c14ac
jne 0x90e6
movb $0x1, 0x20b844b(%rip)   # 0x20c14ac
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rbx
movq %rax, (%rbx)
leaq 0x10f0(%rsp), %rax
movq %rax, 0x8(%rbx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
callq 0x8b86
leaq 0x8d0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4200
leaq 0x11a0a(%rip), %rdi     # 0x1aab7
callq 0x8b86
leaq 0x11a0e(%rip), %rdx     # 0x1aac7
leaq 0xd0(%rsp), %rbx
movl $0x800, %esi            # imm = 0x800
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x78cb
movq %rbx, %rdi
callq 0x8cf4
movq %rbx, %rdi
callq 0x8a8d
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Warning(char const*, ...)
void CDECL FORMAT_PRINTF(1,2)      Warning(const char* const warning, ...)
{
    char            message[MAX_WARNING];
    char            message2[MAX_WARNING];

    va_list         argptr;

    va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
    vsnprintf(message, MAX_WARNING, Localize (warning), argptr);
#else
    vsnprintf(message, MAX_WARNING, warning, argptr);
#endif
    va_end(argptr);

#ifdef ZHLT_LANGFILE
    safe_snprintf(message2, MAX_MESSAGE, "%s%s\n", Localize ("Warning: "), message);
#else
    safe_snprintf(message2, MAX_MESSAGE, "Warning: %s\n", message);
#endif
    WriteLog(message2);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
leaq 0x20(%rsp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x914f
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rbx
movq %r10, 0x10(%rbx)
leaq 0x10f0(%rsp), %rax
movq %rax, 0x8(%rbx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rbx)
callq 0x8b86
leaq 0x8d0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4200
leaq 0x11951(%rip), %rdi     # 0x1aae7
callq 0x8b86
leaq 0x11925(%rip), %rdx     # 0x1aac7
leaq 0xd0(%rsp), %rbx
movl $0x800, %esi            # imm = 0x800
movq %rbx, %rdi
movq %rax, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x78cb
movq %rbx, %rdi
callq 0x8cf4
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Verbose(char const*, ...)
void CDECL FORMAT_PRINTF(1,2)      Verbose(const char* const warning, ...)
{
    if (g_verbose)
    {
        char            message[MAX_MESSAGE];

        va_list         argptr;

        va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
        vsnprintf(message, MAX_MESSAGE, Localize (warning), argptr);
#else
        vsnprintf(message, MAX_MESSAGE, warning, argptr);
#endif
        va_end(argptr);

        WriteLog(message);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x8d8, %rsp            # imm = 0x8D8
testb %al, %al
je 0x9217
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpb $0x1, 0x20b423d(%rip)   # 0x20bd474
jne 0x9286
leaq 0x20(%rsp), %rax
movq %rsp, %rbx
movq %rax, 0x10(%rbx)
leaq 0x8f0(%rsp), %rax
movq %rax, 0x8(%rbx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rbx)
callq 0x8b86
leaq 0xd0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4200
movq %r14, %rdi
callq 0x8cf4
addq $0x8d8, %rsp            # imm = 0x8D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: Developer(developer_level_t, char const*, ...)
void CDECL FORMAT_PRINTF(2,3)      Developer(developer_level_t level, const char* const warning, ...)
{
    if (level <= g_developer)
    {
        char            message[MAX_MESSAGE];

        va_list         argptr;

        va_start(argptr, warning);
#ifdef ZHLT_LANGFILE
        vsnprintf(message, MAX_MESSAGE, Localize (warning), argptr);
#else
        vsnprintf(message, MAX_MESSAGE, warning, argptr);
#endif
        va_end(argptr);

        WriteLog(message);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x8d8, %rsp            # imm = 0x8D8
testb %al, %al
je 0x92d6
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
cmpl %edi, 0x20b4180(%rip)   # 0x20bd470
jl 0x9342
leaq 0x20(%rsp), %rax
movq %rsp, %rbx
movq %rax, 0x10(%rbx)
leaq 0x8f0(%rsp), %rax
movq %rax, 0x8(%rbx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rbx)
movq %rsi, %rdi
callq 0x8b86
leaq 0xd0(%rsp), %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x4200
movq %r14, %rdi
callq 0x8cf4
addq $0x8d8, %rsp            # imm = 0x8D8
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: LogStart(int, char**)
void            LogStart(int argc, char** argv)
{
    Banner();
    Log("-----  BEGIN  %s -----\n", g_Program);
    LogArgs(argc, argv);
    DisplayDeveloperLevel();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %rbx
movl %edi, %r14d
callq 0x934d
movq 0x1cfb4(%rip), %rsi     # 0x26350
leaq 0x11843(%rip), %rdi     # 0x1abe6
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x89dc
leaq 0x11960(%rip), %rdi     # 0x1ad14
xorl %eax, %eax
callq 0x89dc
testl %r14d, %r14d
cmovlel %r15d, %r14d
leaq 0x11960(%rip), %r12     # 0x1ad29
leaq 0x11953(%rip), %r13     # 0x1ad23
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x93ff
movq (%rbx,%rbp,8), %r15
movq %r15, %rdi
pushq $0x20
popq %rsi
callq 0x4160
testq %rax, %rax
movq %r13, %rdi
cmoveq %r12, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x89dc
incq %rbp
jmp 0x93d2
leaq 0x11812(%rip), %rdi     # 0x1ac18
xorl %eax, %eax
callq 0x89dc
leaq 0x11919(%rip), %rsi     # 0x1ad2d
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x796d
movl 0x20b4049(%rip), %eax   # 0x20bd470
cmpl $0x6, %eax
jl 0x9446
leaq 0x11919(%rip), %rsi     # 0x1ad4c
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b402a(%rip), %eax   # 0x20bd470
cmpl $0x5, %eax
jl 0x9465
leaq 0x118fe(%rip), %rsi     # 0x1ad50
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b400b(%rip), %eax   # 0x20bd470
cmpl $0x4, %eax
jl 0x9484
leaq 0x118e5(%rip), %rsi     # 0x1ad56
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b3fec(%rip), %eax   # 0x20bd470
cmpl $0x3, %eax
jl 0x94a3
leaq 0x118cd(%rip), %rsi     # 0x1ad5d
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b3fcd(%rip), %eax   # 0x20bd470
cmpl $0x2, %eax
jl 0x94c2
leaq 0x118b7(%rip), %rsi     # 0x1ad66
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b3fae(%rip), %eax   # 0x20bd470
testl %eax, %eax
jle 0x94e0
leaq 0x12817(%rip), %rsi     # 0x1bce4
movq %rsp, %rdi
movl $0x800, %edx            # imm = 0x800
callq 0x7984
movl 0x20b3f90(%rip), %eax   # 0x20bd470
testl %eax, %eax
je 0x9505
leaq 0x150ae(%rip), %rsi     # 0x1e599
movq %rsp, %rbx
movl $0x800, %edx            # imm = 0x800
movq %rbx, %rdi
callq 0x7984
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dc
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: hlassume(bool, assume_msgs)
void            hlassume(bool exp, assume_msgs msgid)
{
    if (!exp)
    {
        char            message[MAX_MESSAGE];
        const MessageTable_t* msg = GetAssume(msgid);

#ifdef ZHLT_LANGFILE
        safe_snprintf(message, MAX_MESSAGE, "%s\n%s%s\n%s%s\n", Localize (msg->title), Localize ("Description: "), Localize (msg->text), Localize ("Howto Fix: "), Localize (msg->howto));
#else
        safe_snprintf(message, MAX_MESSAGE, "%s\nDescription: %s\nHowto Fix: %s\n", msg->title, msg->text, msg->howto);
#endif
        Error(message);
    }
}

// Assembly:
testl %edi, %edi
jne 0x95bc
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x800, %rsp            # imm = 0x800
movl %esi, %edi
callq 0x9964
movq %rax, %r14
movq (%rax), %rdi
callq 0x8b86
movq %rax, %rbx
leaq 0x11582(%rip), %rdi     # 0x1aacd
callq 0x8b86
movq %rax, %r15
movq 0x8(%r14), %rdi
callq 0x8b86
movq %rax, %r12
leaq 0x11575(%rip), %rdi     # 0x1aadb
callq 0x8b86
movq %rax, %r13
movq 0x10(%r14), %rdi
callq 0x8b86
movq %rax, %r10
leaq 0x1153e(%rip), %rdx     # 0x1aabf
movq %rsp, %r14
movl $0x800, %esi            # imm = 0x800
movq %r14, %rdi
movq %rbx, %rcx
movq %r15, %r8
movq %r12, %r9
xorl %eax, %eax
pushq %r10
pushq %r13
callq 0x78cb
popq %rcx
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x8d7b
addq $0x800, %rsp            # imm = 0x800
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: LogTimeElapsed(float)
void LogTimeElapsed(float elapsed_time)
{
    unsigned days = 0;
    unsigned hours = 0;
    unsigned minutes = 0;
    unsigned seconds = 0;

    seconds_to_hhmm(elapsed_time, days, hours, minutes, seconds);

    if (days)
    {
        Log("%.2f seconds elapsed [%ud %uh %um %us]\n", elapsed_time, days, hours, minutes, seconds);
    }
    else if (hours)
    {
        Log("%.2f seconds elapsed [%uh %um %us]\n", elapsed_time, hours, minutes, seconds);
    }
    else if (minutes)
    {
        Log("%.2f seconds elapsed [%um %us]\n", elapsed_time, minutes, seconds);
    }
    else
    {
        Log("%.2f seconds elapsed\n", elapsed_time);
    }
}

// Assembly:
cvttss2si %xmm0, %rsi
pushq $0x3c
popq %rcx
movl %esi, %eax
xorl %edx, %edx
divl %ecx
movl %edx, %r8d
xorl %edx, %edx
divl %ecx
movl %edx, %ecx
movl $0xe10, %edi            # imm = 0xE10
movl %esi, %eax
xorl %edx, %edx
divl %edi
pushq $0x18
popq %rdi
xorl %edx, %edx
divl %edi
movl %edx, %r9d
cmpl $0x15180, %esi          # imm = 0x15180
jae 0x9610
cvtss2sd %xmm0, %xmm0
testl %r9d, %r9d
je 0x9632
leaq 0x11641(%rip), %rdi     # 0x1ac42
movl %r9d, %esi
movl %ecx, %edx
movl %r8d, %ecx
movb $0x1, %al
jmp 0x89dc
movl $0x15180, %edi          # imm = 0x15180
movl %esi, %eax
xorl %edx, %edx
divl %edi
cvtss2sd %xmm0, %xmm0
leaq 0x115f4(%rip), %rdi     # 0x1ac1a
movl %eax, %esi
movl %r9d, %edx
movb $0x1, %al
jmp 0x89dc
testl %ecx, %ecx
je 0x9649
leaq 0x11629(%rip), %rdi     # 0x1ac66
movl %ecx, %esi
movl %r8d, %edx
movb $0x1, %al
jmp 0x89dc
leaq 0x11636(%rip), %rdi     # 0x1ac86
movb $0x1, %al
jmp 0x89dc
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: PrintConsole(char const*, ...)
void CDECL FORMAT_PRINTF(1,2) PrintConsole(const char* const warning, ...)
{
    char            message[MAX_MESSAGE];

    va_list         argptr;

    va_start(argptr, warning);
//ZHLT_LANGFILE: don't call function Localize here because of performance issue
    vsnprintf(message, MAX_MESSAGE, warning, argptr);
    va_end(argptr);

    if (useconsole)
	{
		fprintf (conout, "%s", message);
		fflush (conout);
	}
	else
	{
		fprintf (stdout, "%s", message);
	}
}

// Assembly:
subq $0x8d8, %rsp            # imm = 0x8D8
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x96c6
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsp, %rcx
movq %rdi, 0x10(%rcx)
leaq 0x8e0(%rsp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rcx)
leaq 0xd0(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
movq %r10, %rdx
callq 0x4200
cmpb $0x1, 0x20b3d87(%rip)   # 0x20bd489
jne 0x9726
movq 0x20b3d85(%rip), %rsi   # 0x20bd490
leaq 0xd0(%rsp), %rdi
callq 0x4380
movq 0x20b3d71(%rip), %rdi   # 0x20bd490
callq 0x4390
jmp 0x973d
movq 0x1c873(%rip), %rax     # 0x25fa0
movq (%rax), %rsi
leaq 0xd0(%rsp), %rdi
callq 0x4380
addq $0x8d8, %rsp            # imm = 0x8D8
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: loadlangfileline(char*, int, _IO_FILE*)
int loadlangfileline (char *line, int n, FILE *f)
{
	int i = 0, c = 0;
	bool special = false;
	while (1)
	{
		c = fgetc (f);
		if (c == '\r')
			continue;
		if (c == '\n' || c == EOF)
			break;
		if (c == '\\' && !special)
		{
			special = true;
		}
		else
		{
			if (special)
			{
				switch (c)
				{
				case 'n': c = '\n'; break;
				case 't': c = '\t'; break;
				case 'v': c = '\v'; break;
				case 'b': c = '\b'; break;
				case 'r': c = '\r'; break;
				case 'f': c = '\f'; break;
				case 'a': c = '\a'; break;
				case '\\': c = '\\'; break;
				case '?': c = '\?'; break;
				case '\'': c = '\''; break;
				case '"': c = '\"'; break;
				default: break;
				}
			}
			if (i < n - 1)
				line[i++] = c;
			else
			{
				Warning ("line too long in localization file");
				break;
			}
			special = false;
		}
	}
	line[i] = '\0';
	if (c == EOF)
		return 1;
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, (%rsp)
decl %ebp
xorl %r12d, %r12d
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x4530
cmpl $0xd, %eax
je 0x9760
movl %eax, %r15d
movl %r12d, %r13d
cmpl $-0x1, %eax
je 0x9810
cmpl $0xa, %r15d
je 0x9810
cmpl $0x5c, %r15d
jne 0x9795
testb $0x1, %bl
movb $0x1, %bl
je 0x9760
jmp 0x97d3
testb $0x1, %bl
je 0x97ed
leal -0x6e(%r15), %eax
cmpl $0x8, %eax
jbe 0x97bf
cmpl $0x5c, %r15d
je 0x97d3
cmpl $0x61, %r15d
je 0x97e7
cmpl $0x62, %r15d
je 0x97e3
cmpl $0x66, %r15d
jne 0x97ed
pushq $0xc
jmp 0x97e9
leaq 0x1118a(%rip), %rcx     # 0x1a950
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0xa
jmp 0x97e9
pushq $0x5c
jmp 0x97e9
pushq $0xb
jmp 0x97e9
pushq $0x9
jmp 0x97e9
pushq $0xd
jmp 0x97e9
pushq $0x8
jmp 0x97e9
pushq $0x7
popq %rax
movl %eax, %r15d
cmpl %ebp, %r12d
jge 0x9802
incl %r12d
movq (%rsp), %rax
movb %r15b, (%rax,%r13)
jmp 0x975e
leaq 0x11493(%rip), %rdi     # 0x1ac9c
xorl %eax, %eax
callq 0x90f1
movq (%rsp), %rax
movb $0x0, (%rax,%r13)
xorl %eax, %eax
cmpl $-0x1, %r15d
sete %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/log.cpp
// Function: LoadLangFile(char const*, char const*)
void LoadLangFile (const char *name, const char *programpath)
{
	char filepath[_MAX_PATH];
	char line1[MAXTOKEN];
	char line2[MAXTOKEN];
	FILE *f = NULL;
	if (!f)
	{
		strcpy (filepath, name);
		f = fopen (filepath, "r");
	}
	if (!f)
	{
		ExtractFilePath (programpath, filepath);
		strcat (filepath, name);
		f = fopen (filepath, "r");
	}
	if (!f)
	{
		Warning ("can not open file: '%s'", name);
		return;
	}
	while (1)
	{
		if (loadlangfileline (line1, MAXTOKEN, f) == 1)
			break;
		loadlangfileline (line2, MAXTOKEN, f);
		if (g_lang_count < g_lang_max)
		{
			g_lang[g_lang_count][0] = strdup (line1);
			g_lang[g_lang_count][1] = strdup (line2);
			g_lang_count++;
		}
		else
		{
			Warning ("too many lines in localization file");
			break;
		}
	}
	fclose (f);
	Log ("Localization file: '%s'\n", filepath);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3008, %rsp           # imm = 0x3008
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x42e0
leaq 0x1276b(%rip), %rsi     # 0x1bfc8
movq %rbx, %rdi
callq 0x43a0
testq %rax, %rax
jne 0x989b
movq %rsp, %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7756
movq %rbx, %rdi
movq %r14, %rsi
callq 0x45a0
leaq 0x1273e(%rip), %rsi     # 0x1bfc8
movq %rbx, %rdi
callq 0x43a0
testq %rax, %rax
je 0x994f
movq %rax, %rbx
leaq 0x2000(%rsp), %r14
leaq 0x1000(%rsp), %r15
leaq 0x20b3beb(%rip), %r12   # 0x20bd4a0
movq %r14, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdx
callq 0x9745
testl %eax, %eax
jne 0x9924
movq %r15, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %rbx, %rdx
callq 0x9745
movslq 0x20b3bb8(%rip), %r13   # 0x20bd498
cmpq $0x3ff, %r13            # imm = 0x3FF
jg 0x9916
movq %r14, %rdi
callq 0x45d0
movq %r13, %rbp
shlq $0x4, %rbp
movq %rax, (%rbp,%r12)
movq %r15, %rdi
callq 0x45d0
movq %rax, 0x8(%rbp,%r12)
leal 0x1(%r13), %eax
movl %eax, 0x20b3b84(%rip)   # 0x20bd498
jmp 0x98b5
leaq 0x113ba(%rip), %rdi     # 0x1acd7
xorl %eax, %eax
callq 0x90f1
movq %rbx, %rdi
callq 0x4300
leaq 0x113c8(%rip), %rdi     # 0x1acfb
movq %rsp, %rsi
xorl %eax, %eax
callq 0x89dc
addq $0x3008, %rsp           # imm = 0x3008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11369(%rip), %rdi     # 0x1acbf
movq %r14, %rsi
xorl %eax, %eax
callq 0x90f1
jmp 0x993d
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/scriplib.cpp
// Function: LoadScriptFile(char const*)
void            LoadScriptFile(const char* const filename)
{
    s_script = s_scriptstack;
    AddScriptToStack(filename);

    s_endofscript = false;
    s_tokenready = false;
}

// Assembly:
pushq %rax
leaq 0x20b8b48(%rip), %rax   # 0x20c24d0
movq %rax, 0x20b8b29(%rip)   # 0x20c24b8
callq 0x99a4
xorl %eax, %eax
movb %al, 0x20b8b28(%rip)    # 0x20c24c4
movb %al, 0x20b8b23(%rip)    # 0x20c24c5
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/scriplib.cpp
// Function: AddScriptToStack(char const*)
static void     AddScriptToStack(const char* const filename)
{
    int             size;

    s_script++;

    if (s_script == &s_scriptstack[MAX_INCLUDES])
        Error("s_script file exceeded MAX_INCLUDES");

	strcpy_s(s_script->filename, filename);

    size = LoadFile(s_script->filename, (char**)&s_script->buffer);

    Log("Entering %s\n", s_script->filename);

    s_script->line = 1;
    s_script->script_p = s_script->buffer;
    s_script->end_p = s_script->buffer + size;
}

// Assembly:
pushq %rbx
movl $0x1020, %eax           # imm = 0x1020
addq 0x20b8b07(%rip), %rax   # 0x20c24b8
movq %rdi, %rbx
movq %rax, 0x20b8afd(%rip)   # 0x20c24b8
leaq 0x20c0c0e(%rip), %rcx   # 0x20ca5d0
cmpq %rcx, %rax
jne 0x99dc
leaq 0x125ca(%rip), %rdi     # 0x1bf98
xorl %eax, %eax
callq 0x8d7b
movq 0x20b8adc(%rip), %rax   # 0x20c24b8
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42e0
movq 0x20b8aca(%rip), %rdi   # 0x20c24b8
leaq 0x1000(%rdi), %rsi
callq 0x8617
movl %eax, %ebx
movq 0x20b8ab5(%rip), %rsi   # 0x20c24b8
leaq 0x1263b(%rip), %rdi     # 0x1c045
xorl %eax, %eax
callq 0x89dc
movq 0x20b8aa0(%rip), %rax   # 0x20c24b8
movl $0x1, 0x1018(%rax)
movq 0x1000(%rax), %rcx
movq %rcx, 0x1008(%rax)
movslq %ebx, %rdx
addq %rcx, %rdx
movq %rdx, 0x1010(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/scriplib.cpp
// Function: EndOfScript(bool)
bool            EndOfScript(const bool crossline)
{
    if (!crossline)
        Error("Line %i is incomplete (did you place a \" inside an entity string?) \n", s_scriptline);

    if (!strcmp(s_script->filename, "memory buffer"))
    {
        s_endofscript = true;
        return false;
    }

    free(s_script->buffer);

    if (s_script == s_scriptstack + 1)
    {
        s_endofscript = true;
        return false;
    }

    s_script--;
    s_scriptline = s_script->line;

    Log("returning to %s\n", s_script->filename);

    return GetToken(crossline);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
jne 0x9ac9
movl 0x20b8a05(%rip), %esi   # 0x20c24c0
leaq 0x12508(%rip), %rdi     # 0x1bfca
xorl %eax, %eax
callq 0x8d7b
movq 0x20b89e8(%rip), %r14   # 0x20c24b8
leaq 0x124e5(%rip), %rsi     # 0x1bfbc
movq %r14, %rdi
callq 0x4480
testl %eax, %eax
je 0x9b36
movq 0x1000(%r14), %rdi
callq 0x43b0
movq 0x20b89c2(%rip), %rax   # 0x20c24b8
leaq 0x20b99f3(%rip), %rcx   # 0x20c34f0
cmpq %rcx, %rax
je 0x9b36
leaq -0x1020(%rax), %rsi
movq %rsi, 0x20b89a8(%rip)   # 0x20c24b8
movl -0x8(%rax), %eax
movl %eax, 0x20b89a7(%rip)   # 0x20c24c0
leaq 0x124ef(%rip), %rdi     # 0x1c00f
xorl %eax, %eax
callq 0x89dc
movzbl %bl, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9b47
movb $0x1, 0x20b8987(%rip)   # 0x20c24c4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/threads.cpp
// Function: ThreadSetDefault()
void            ThreadSetDefault()
{
    if (g_numthreads == -1)
    {
        g_numthreads = PlatformThreadDefault();
        if (g_numthreads == -1) {
            g_numthreads = 1;
        }
    }
}

// Assembly:
cmpl $-0x1, 0x1d0ee(%rip)    # 0x27364
je 0xa279
retq
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
xorps %xmm0, %xmm0
movq %rsp, %rdx
movaps %xmm0, 0x70(%rdx)
movaps %xmm0, 0x60(%rdx)
movaps %xmm0, 0x50(%rdx)
movaps %xmm0, 0x40(%rdx)
movaps %xmm0, 0x30(%rdx)
movaps %xmm0, 0x20(%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
xorl %r14d, %r14d
movl $0x80, %esi
xorl %edi, %edi
callq 0x4510
testl %eax, %eax
je 0xa2ed
pushq $0x54
popq %rdi
callq 0x4210
cmpq $0x1, %rax
sbbl %r14d, %r14d
orl %eax, %r14d
cmpl $-0x1, %r14d
pushq $0x1
popq %rax
cmovnel %r14d, %eax
movl %eax, 0x1d084(%rip)     # 0x27364
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rsp, %rbx
xorl %r15d, %r15d
movl $0x80, %edi
movq %rbx, %rsi
callq 0x40a0
cltq
cmpq %rax, %r15
jge 0xa2cf
cmpq $0x3ff, %r15            # imm = 0x3FF
ja 0xa324
movq %r15, %rax
shrq $0x6, %rax
movq (%rsp,%rax,8), %rax
btq %r15, %rax
jae 0xa324
incl %r14d
incq %r15
jmp 0xa2f3
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/threads.cpp
// Function: threads_InitCrit()
void            threads_InitCrit()
{
    pthread_mutexattr_t mattrib;

    if (!my_mutex)
    {
        my_mutex = (pthread_mutex_t*)Alloc(sizeof(*my_mutex));
        if (pthread_mutexattr_init(&mattrib) == -1)
        {
            Error("pthread_mutex_attr_init failed");
        }
        if (pthread_mutex_init(my_mutex, &mattrib) == -1)
        {
            Error("pthread_mutex_init failed");
        }
    }
}

// Assembly:
cmpq $0x0, 0x20c05f7(%rip)   # 0x20ca928
je 0xa334
retq
pushq %rax
pushq $0x28
popq %rdi
callq 0x4842
movq %rax, 0x20c05e4(%rip)   # 0x20ca928
leaq 0x4(%rsp), %rdi
callq 0x4070
cmpl $-0x1, %eax
jne 0xa361
leaq 0x11dde(%rip), %rdi     # 0x1c138
xorl %eax, %eax
callq 0x8d7b
movq 0x20c05c0(%rip), %rdi   # 0x20ca928
leaq 0x4(%rsp), %rsi
callq 0x44f0
cmpl $-0x1, %eax
jne 0xa385
leaq 0x11dd9(%rip), %rdi     # 0x1c157
xorl %eax, %eax
callq 0x8d7b
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getPlane(dplane_t&) const
void     Winding::getPlane(dplane_t& plane) const
{
    vec3_t          v1, v2;
    vec3_t          plane_normal;

    //hlassert(m_NumPoints >= 3);

    if (m_NumPoints >= 3)
    {
        VectorSubtract(m_Points[2], m_Points[1], v1);
        VectorSubtract(m_Points[0], m_Points[1], v2);

        CrossProduct(v2, v1, plane_normal);
        VectorNormalize(plane_normal);
        VectorCopy(plane_normal, plane.normal);               // change from vec_t
        plane.dist = DotProduct(m_Points[0], plane.normal);
    }
    else
    {
        VectorClear(plane.normal);
        plane.dist = 0.0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
cmpl $0x3, 0x8(%rdi)
jb 0xa4df
movq %rdi, %r14
movq 0x10(%rdi), %rax
movsd 0x18(%rax), %xmm2
movsd 0x38(%rax), %xmm3
movsd (%rax), %xmm0
subsd %xmm2, %xmm0
movupd 0x20(%rax), %xmm4
movsd 0x40(%rax), %xmm1
movhpd 0x30(%rax), %xmm1       # xmm1 = xmm1[0],mem[0]
subsd %xmm4, %xmm3
movupd 0x8(%rax), %xmm5
subpd %xmm4, %xmm5
shufpd $0x1, %xmm2, %xmm4      # xmm4 = xmm4[1],xmm2[0]
subpd %xmm4, %xmm1
movapd %xmm5, %xmm2
shufpd $0x1, %xmm0, %xmm2      # xmm2 = xmm2[1],xmm0[0]
mulsd %xmm3, %xmm0
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
mulpd %xmm2, %xmm3
movapd %xmm5, %xmm2
mulpd %xmm1, %xmm2
subpd %xmm3, %xmm2
movq %rsp, %r15
movapd %xmm2, (%r15)
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulsd %xmm5, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, 0x10(%r15)
movq %r15, %rdi
callq 0xc2e9
cvtpd2ps (%r15), %xmm0
movlpd %xmm0, (%rbx)
cvtsd2ss 0x10(%r15), %xmm1
movss %xmm1, 0x8(%rbx)
movq 0x10(%r14), %rax
cvtss2sd %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
cvtss2sd %xmm0, %xmm0
mulsd 0x8(%rax), %xmm0
mulsd (%rax), %xmm2
cvtss2sd %xmm1, %xmm1
mulsd 0x10(%rax), %xmm1
addsd %xmm0, %xmm2
addsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm0
jmp 0xa4ea
andl $0x0, 0x8(%rbx)
andq $0x0, (%rbx)
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getPlane(double (&) [3], double&) const
void            Winding::getPlane(vec3_t& normal, vec_t& dist) const
{
    vec3_t          v1, v2;

    //hlassert(m_NumPoints >= 3);

    if (m_NumPoints >= 3)
    {
        VectorSubtract(m_Points[1], m_Points[0], v1);
        VectorSubtract(m_Points[2], m_Points[0], v2);
        CrossProduct(v2, v1, normal);
        VectorNormalize(normal);
        dist = DotProduct(m_Points[0], normal);
    }
    else
    {
        VectorClear(normal);
        dist = 0.0;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
cmpl $0x3, 0x8(%rdi)
jb 0xa5ba
movq %rdi, %r15
movq 0x10(%rdi), %rax
movsd (%rax), %xmm1
movsd 0x20(%rax), %xmm2
movsd 0x30(%rax), %xmm0
subsd %xmm1, %xmm0
movupd 0x8(%rax), %xmm3
subsd %xmm3, %xmm2
movsd 0x28(%rax), %xmm4
movhpd 0x18(%rax), %xmm4       # xmm4 = xmm4[0],mem[0]
movupd 0x38(%rax), %xmm5
subpd %xmm3, %xmm5
shufpd $0x1, %xmm1, %xmm3      # xmm3 = xmm3[1],xmm1[0]
subpd %xmm3, %xmm4
movapd %xmm5, %xmm1
shufpd $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1],xmm0[0]
mulsd %xmm2, %xmm0
unpcklpd %xmm4, %xmm2            # xmm2 = xmm2[0],xmm4[0]
mulpd %xmm1, %xmm2
movapd %xmm5, %xmm1
mulpd %xmm4, %xmm1
subpd %xmm2, %xmm1
movupd %xmm1, (%r14)
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
mulsd %xmm5, %xmm4
subsd %xmm4, %xmm0
movsd %xmm0, 0x10(%r14)
movq %r14, %rdi
callq 0xc2e9
movq 0x10(%r15), %rax
movsd 0x8(%rax), %xmm0
mulsd 0x8(%r14), %xmm0
movsd (%rax), %xmm1
mulsd (%r14), %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%rax), %xmm0
mulsd 0x10(%r14), %xmm0
addsd %xmm1, %xmm0
jmp 0xa5cc
xorpd %xmm0, %xmm0
movupd %xmm0, (%r14)
andq $0x0, 0x10(%r14)
xorpd %xmm0, %xmm0
movsd %xmm0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getArea() const
vec_t           Winding::getArea() const
{
    unsigned int    i;
    vec3_t          d1, d2, cross;
    vec_t           total;

    //hlassert(m_NumPoints >= 3);

    total = 0.0;
    if (m_NumPoints >= 3)
    {
        for (i = 2; i < m_NumPoints; i++)
        {
            VectorSubtract(m_Points[i - 1], m_Points[0], d1);
            VectorSubtract(m_Points[i], m_Points[0], d2);
            CrossProduct(d1, d2, cross);
            total += 0.5 * VectorLength(cross);
        }
    }
    return total;
}

// Assembly:
movl 0x8(%rdi), %eax
xorpd %xmm0, %xmm0
cmpq $0x3, %rax
jb 0xa69f
movq 0x10(%rdi), %rcx
leaq 0x40(%rcx), %rdx
pushq $0x2
popq %rsi
movsd 0x11bf6(%rip), %xmm1    # 0x1c1f0
cmpq %rax, %rsi
jae 0xa69f
movsd -0x28(%rdx), %xmm2
movsd -0x20(%rdx), %xmm5
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm6
subsd %xmm4, %xmm2
subsd %xmm6, %xmm5
movsd -0x18(%rdx), %xmm3
movsd 0x10(%rcx), %xmm7
subsd %xmm7, %xmm3
movsd -0x10(%rdx), %xmm8
subsd %xmm4, %xmm8
movsd -0x8(%rdx), %xmm4
subsd %xmm6, %xmm4
movsd (%rdx), %xmm6
subsd %xmm7, %xmm6
movapd %xmm4, %xmm7
mulsd %xmm3, %xmm7
mulsd %xmm8, %xmm3
mulsd %xmm5, %xmm8
mulsd %xmm6, %xmm5
subsd %xmm7, %xmm5
mulsd %xmm2, %xmm6
subsd %xmm6, %xmm3
mulsd %xmm2, %xmm4
subsd %xmm8, %xmm4
mulsd %xmm3, %xmm3
mulsd %xmm5, %xmm5
addsd %xmm3, %xmm5
mulsd %xmm4, %xmm4
addsd %xmm5, %xmm4
sqrtsd %xmm4, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm0
incq %rsi
addq $0x18, %rdx
jmp 0xa5fa
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getBounds(double (&) [3], double (&) [3]) const
void            Winding::getBounds(vec3_t& mins, vec3_t& maxs) const
{
    BoundingBox     bounds;
    unsigned    x;

    for (x=0; x<m_NumPoints; x++)
    {
        bounds.add(m_Points[x]);
    }
    VectorCopy(bounds.m_Mins, mins);
    VectorCopy(bounds.m_Maxs, maxs);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x11b52(%rip), %xmm0    # 0x1c210
movq %rsp, %r12
movaps %xmm0, (%r12)
movaps 0x11b53(%rip), %xmm0    # 0x1c220
movaps %xmm0, 0x10(%r12)
movaps 0x11b56(%rip), %xmm0    # 0x1c230
movaps %xmm0, 0x20(%r12)
xorl %r13d, %r13d
xorl %ebp, %ebp
movl 0x8(%r15), %eax
cmpq %rax, %rbp
jae 0xa706
movq 0x10(%r15), %rsi
addq %r13, %rsi
movq %r12, %rdi
callq 0xc35e
incq %rbp
addq $0x18, %r13
jmp 0xa6e5
movaps (%rsp), %xmm0
movups %xmm0, (%r14)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%r14)
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getBounds(BoundingBox&) const
void            Winding::getBounds(BoundingBox& bounds) const
{
    bounds.reset();
    unsigned    x;

    for (x=0; x<m_NumPoints; x++)
    {
        bounds.add(m_Points[x]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movaps 0x11abf(%rip), %xmm0    # 0x1c210
movups %xmm0, (%rsi)
movaps 0x11ac5(%rip), %xmm0    # 0x1c220
movups %xmm0, 0x10(%rsi)
movaps 0x11aca(%rip), %xmm0    # 0x1c230
movups %xmm0, 0x20(%rsi)
xorl %r15d, %r15d
xorl %r12d, %r12d
movl 0x8(%r14), %eax
cmpq %rax, %r12
jae 0xa791
movq 0x10(%r14), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0xc35e
incq %r12
addq $0x18, %r15
jmp 0xa770
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::getCenter(double (&) [3]) const
void            Winding::getCenter(vec3_t& center) const
{
    unsigned int    i;
    vec_t           scale;

    if (m_NumPoints > 0)
    {
        VectorCopy(vec3_origin, center);
        for (i = 0; i < m_NumPoints; i++)
        {
            VectorAdd(m_Points[i], center, center);
        }

        scale = 1.0 / m_NumPoints;
        VectorScale(center, scale, center);
    }
    else
    {
        VectorClear(center);
    }
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0xa839
leaq 0x105c1(%rip), %rax     # 0x1ad70
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm0
movsd %xmm2, (%rsi)
movsd %xmm0, 0x8(%rsi)
movsd 0x10(%rax), %xmm1
movsd %xmm1, 0x10(%rsi)
xorl %eax, %eax
xorl %ecx, %ecx
movl 0x8(%rdi), %edx
cmpq %rdx, %rcx
jae 0xa80b
movq 0x10(%rdi), %rdx
addsd (%rdx,%rax), %xmm2
movsd %xmm2, (%rsi)
movq 0x10(%rdi), %rdx
addsd 0x8(%rdx,%rax), %xmm0
movsd %xmm0, 0x8(%rsi)
movq 0x10(%rdi), %rdx
addsd 0x10(%rdx,%rax), %xmm1
movsd %xmm1, 0x10(%rsi)
incq %rcx
addq $0x18, %rax
jmp 0xa7cf
movl %edx, %eax
cvtsi2sd %rax, %xmm3
movsd 0x1183e(%rip), %xmm4    # 0x1c058
divsd %xmm3, %xmm4
mulsd %xmm4, %xmm2
movsd %xmm2, (%rsi)
mulsd %xmm4, %xmm0
movsd %xmm0, 0x8(%rsi)
mulsd %xmm1, %xmm4
movsd %xmm4, 0x10(%rsi)
retq
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(double (*) [3], unsigned int)
Winding::Winding(vec3_t *points, UINT32 numpoints)
{
	hlassert(numpoints >= 3);
	m_NumPoints = numpoints;
	m_MaxPoints = (m_NumPoints + 3) & ~3;	// groups of 4

	m_Points = new vec3_t[m_MaxPoints];
	memcpy(m_Points, points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x1b182(%rip), %rax     # 0x25d70
movq %rax, (%rdi)
movl %edx, 0x8(%rdi)
leal 0x3(%rbx), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
imulq $0x18, %rax, %rdi
callq 0x4040
movq %rax, 0x10(%r15)
movl %ebx, %ecx
imulq $0x18, %rcx, %rdx
movq %rax, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4280
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::initFromPoints(double (*) [3], unsigned int)
void			Winding::initFromPoints(vec3_t *points, UINT32 numpoints)
{
	hlassert(numpoints >= 3);

	Reset();

	m_NumPoints = numpoints;
	m_MaxPoints = (m_NumPoints + 3) & ~3;	// groups of 4

	m_Points = new vec3_t[m_MaxPoints];
	memcpy(m_Points, points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0xac64
movl %ebx, 0x8(%r15)
leal 0x3(%rbx), %eax
andl $-0x4, %eax
movl %eax, 0x18(%r15)
imulq $0x18, %rax, %rdi
callq 0x4040
movq %rax, 0x10(%r15)
movl %ebx, %ecx
imulq $0x18, %rcx, %rdx
movq %rax, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4280
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Reset()
void			Winding::Reset(void)
{
	if(m_Points)
	{
		delete [] m_Points;
		m_Points = NULL;
	}

	m_NumPoints = m_MaxPoints = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xac7b
callq 0x4430
andq $0x0, 0x10(%rbx)
andl $0x0, 0x18(%rbx)
andl $0x0, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::operator=(Winding const&)
Winding&      Winding::operator=(const Winding& other)
{
    delete[] m_Points;
    m_NumPoints = other.m_NumPoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memcpy(m_Points, other.m_Points, sizeof(vec3_t) * m_NumPoints);
    return *this;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0xac9f
callq 0x4430
movl 0x8(%r14), %r15d
movl %r15d, 0x8(%rbx)
leal 0x3(%r15), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rbx)
imulq $0x18, %rax, %rdi
callq 0x4040
movq %rax, 0x10(%rbx)
movq 0x10(%r14), %rsi
imulq $0x18, %r15, %rdx
movq %rax, %rdi
callq 0x4280
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(unsigned int)
Winding::Winding(UINT32 numpoints)
{
    hlassert(numpoints >= 3);
    m_NumPoints = numpoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memset(m_Points, 0, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x1b088(%rip), %rax     # 0x25d70
movq %rax, (%rdi)
movl %esi, 0x8(%rdi)
leal 0x3(%rbx), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
imulq $0x18, %rax, %rdi
callq 0x4040
movq %rax, 0x10(%r14)
movl %ebx, %ecx
imulq $0x18, %rcx, %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x41e0
nop
// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/common/winding.cpp
// Function: Winding::Winding(Winding const&)
Winding::Winding(const Winding& other)
{
    m_NumPoints = other.m_NumPoints;
    m_MaxPoints = (m_NumPoints + 3) & ~3;   // groups of 4

    m_Points = new vec3_t[m_MaxPoints];
    memcpy(m_Points, other.m_Points, sizeof(vec3_t) * m_NumPoints);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1b042(%rip), %rax     # 0x25d70
movq %rax, (%rdi)
movl 0x8(%rsi), %r15d
movl %r15d, 0x8(%rdi)
leal 0x3(%r15), %eax
andl $-0x4, %eax
movl %eax, 0x18(%rdi)
imulq $0x18, %rax, %rdi
callq 0x4040
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
imulq $0x18, %r15, %rdx
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4280
nop