LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: stristr(char const*, char const*)
const char*     stristr(const char* const string, const char* const substring)
{
    char*           string_copy;
    char*           substring_copy;
    const char*     match;

    string_copy = _strdup(string);
    _strlwr(string_copy);

    substring_copy = _strdup(substring);
    _strlwr(substring_copy);

    match = strstr(string_copy, substring_copy);
    if (match)
    {
        match = (string + (match - string_copy));
    }

    free(string_copy);
    free(substring_copy);
    return match;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0x46b0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x94b0
movq 0x18(%rsp), %rdi
callq 0x46b0
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x94b0
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x4110
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
je 0x9592
movq 0x20(%rsp), %rax
movq (%rsp), %rcx
movq 0x10(%rsp), %rdx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
callq 0x4470
movq 0x8(%rsp), %rdi
callq 0x4470
movq (%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: FlipSlashes(char*)
char* FlipSlashes(char* string)
{
	char* ptr = string;
	if(SYSTEM_SLASH_CHAR == '\\')
	{
		while(ptr = strchr(ptr,'/'))
		{ *ptr = SYSTEM_SLASH_CHAR; }
	}
	else
	{
		while(ptr = strchr(ptr,'\\'))
		{ *ptr = SYSTEM_SLASH_CHAR; }
	}
	return string;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x5c, %esi
callq 0x4170
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x95e7
movq 0x8(%rsp), %rax
movb $0x2f, (%rax)
jmp 0x95c3
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: StripFilename(char*)
void StripFilename(char* path)
{
	int extension_pos, directory_pos;
	getFilePositions(path,&extension_pos,&directory_pos);
	if(directory_pos == -1)
	{ path[0] = 0; }
	else
	{ path[directory_pos] = 0; }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0xc(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x9c00
cmpl $-0x1, 0x8(%rsp)
jne 0x966e
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
jmp 0x967c
movq 0x10(%rsp), %rax
movslq 0x8(%rsp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: ExtractFilePath(char const*, char*)
void ExtractFilePath(const char* const path, char* dest)
{
	int extension_pos, directory_pos;
	getFilePositions(path,&extension_pos,&directory_pos);
	if(directory_pos != -1)
	{
	    memcpy(dest,path,directory_pos+1); //include directory slash
	    dest[directory_pos+1] = 0;
	}
	else
	{ dest[0] = 0; }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x4(%rsp), %rsi
movq %rsp, %rdx
callq 0x9c00
cmpl $-0x1, (%rsp)
je 0x9722
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl (%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x4310
movq 0x8(%rsp), %rax
movl (%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
jmp 0x972a
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
addq $0x18, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: ExtractFile(char const*, char*)
void ExtractFile(const char* const path, char* dest)
{
	int extension_pos, directory_pos;
	getFilePositions(path,&extension_pos,&directory_pos);

	int length = strlen(path);

#ifdef ZHLT_FILE_FUNCTIONS_FIX
	length -= directory_pos + 1;
#else
	if(directory_pos == -1)	{ directory_pos = 0; }
	else { length -= directory_pos + 1; }
#endif

    memcpy(dest,path+directory_pos+1,length); //exclude directory slash
    dest[length] = 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x9c00
movq 0x20(%rsp), %rdi
callq 0x41c0
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %ecx
addl $0x1, %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movslq 0x10(%rsp), %rax
addq %rax, %rsi
addq $0x1, %rsi
movslq 0xc(%rsp), %rdx
callq 0x4310
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: ExtractFileBase(char const*, char*)
void ExtractFileBase(const char* const path, char* dest)
{
	int extension_pos, directory_pos;
	getFilePositions(path,&extension_pos,&directory_pos);
	int length = extension_pos == -1 ? strlen(path) : extension_pos;

#ifdef ZHLT_FILE_FUNCTIONS_FIX
	length -= directory_pos + 1;
#else
	if(directory_pos == -1)	{ directory_pos = 0; }
	else { length -= directory_pos + 1; }
#endif

    memcpy(dest,path+directory_pos+1,length); //exclude directory slash
    dest[length] = 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x9c00
cmpl $-0x1, 0x14(%rsp)
jne 0x97e9
movq 0x20(%rsp), %rdi
callq 0x41c0
movq %rax, (%rsp)
jmp 0x97f2
movslq 0x14(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %ecx
addl $0x1, %ecx
movl 0xc(%rsp), %eax
subl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movslq 0x10(%rsp), %rax
addq %rax, %rsi
addq $0x1, %rsi
movslq 0xc(%rsp), %rdx
callq 0x4310
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x28, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: ExtractFileExtension(char const*, char*)
void ExtractFileExtension(const char* const path, char* dest)
{
	int extension_pos, directory_pos;
	getFilePositions(path,&extension_pos,&directory_pos);
	if(extension_pos != -1)
	{
		int length = strlen(path) - extension_pos;
	    memcpy(dest,path+extension_pos,length); //include extension '.'
	    dest[length] = 0;
	}
	else
	{ dest[0] = 0; }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x9c00
cmpl $-0x1, 0x14(%rsp)
je 0x98ab
movq 0x20(%rsp), %rdi
callq 0x41c0
movslq 0x14(%rsp), %rcx
subq %rcx, %rax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
movslq 0x14(%rsp), %rax
addq %rax, %rsi
movslq 0xc(%rsp), %rdx
callq 0x4310
movq 0x18(%rsp), %rax
movslq 0xc(%rsp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x98b3
movq 0x18(%rsp), %rax
movb $0x0, (%rax)
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: BigLong(int)
int             BigLong(const int l)
{
    byte            b1, b2, b3, b4;

    b1 = (byte) (l & 255);
    b2 = (byte) ((l >> 8) & 255);
    b3 = (byte) ((l >> 16) & 255);
    b4 = (byte) ((l >> 24) & 255);

    return ((int)b1 << 24) + ((int)b2 << 16) + ((int)b3 << 8) + b4;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl -0x4(%rsp), %eax
andl $0xff, %eax
movb %al, -0x5(%rsp)
movl -0x4(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x6(%rsp)
movl -0x4(%rsp), %eax
sarl $0x10, %eax
andl $0xff, %eax
movb %al, -0x7(%rsp)
movl -0x4(%rsp), %eax
sarl $0x18, %eax
andl $0xff, %eax
movb %al, -0x8(%rsp)
movzbl -0x5(%rsp), %eax
shll $0x18, %eax
movzbl -0x6(%rsp), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movzbl -0x7(%rsp), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movzbl -0x8(%rsp), %ecx
addl %ecx, %eax
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: safe_snprintf(char*, unsigned long, char const*, ...)
bool CDECL FORMAT_PRINTF(3,4)      safe_snprintf(char* const dest, const size_t count, const char* const args, ...)
{
    size_t          amt;
    va_list         argptr;

    hlassert(count > 0);

    va_start(argptr, args);
    amt = vsnprintf(dest, count, args, argptr);
    va_end(argptr);

    // truncated (bad!, snprintf doesn't null terminate the string when this happens)
    if (amt == count)
    {
        dest[count - 1] = 0;
        return false;
    }

    return true;
}

// Assembly:
subq $0xf8, %rsp
testb %al, %al
je 0x9a1c
movaps %xmm0, 0x30(%rsp)
movaps %xmm1, 0x40(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm3, 0x60(%rsp)
movaps %xmm4, 0x70(%rsp)
movaps %xmm5, 0x80(%rsp)
movaps %xmm6, 0x90(%rsp)
movaps %xmm7, 0xa0(%rsp)
movq %r9, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdi, 0xe8(%rsp)
movq %rsi, 0xe0(%rsp)
movq %rdx, 0xd8(%rsp)
leaq 0xb0(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x10(%rax)
leaq 0x100(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
movq 0xe8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0xd8(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x4250
cltq
movq %rax, 0xd0(%rsp)
leaq 0xb0(%rsp), %rax
movq 0xd0(%rsp), %rax
cmpq 0xe0(%rsp), %rax
jne 0x9ad6
movq 0xe8(%rsp), %rax
movq 0xe0(%rsp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movb $0x0, 0xf7(%rsp)
jmp 0x9ade
movb $0x1, 0xf7(%rsp)
movb 0xf7(%rsp), %al
addq $0xf8, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: safe_strncat(char*, char const*, unsigned long)
bool            safe_strncat(char* const dest, const char* const src, const size_t count)
{
    if (count)
    {
        strncat(dest, src, count);

        dest[count - 1] = 0;                               // Ensure it is null terminated
        return true;
    }
    else
    {
        Warning("safe_strncat passed empty count");
        return false;
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x9b78
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
callq 0x4280
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movb $0x1, 0x27(%rsp)
jmp 0x9b8b
leaq 0x20cc9(%rip), %rdi     # 0x2a848
movb $0x0, %al
callq 0xbef0
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: TerminatedString(char const*, int)
bool            TerminatedString(const char* buffer, const int size)
{
    int             x;

    for (x = 0; x < size; x++, buffer++)
    {
        if ((*buffer) == 0)
        {
            return true;
        }
    }
    return false;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movl $0x0, -0x18(%rsp)
movl -0x18(%rsp), %eax
cmpl -0x14(%rsp), %eax
jge 0x9bec
movq -0x10(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x9bcf
movb $0x1, -0x1(%rsp)
jmp 0x9bf1
jmp 0x9bd1
movl -0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rsp)
jmp 0x9bb1
movb $0x0, -0x1(%rsp)
movb -0x1(%rsp), %al
andb $0x1, %al
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlib.cpp
// Function: getFilePositions(char const*, int*, int*)
inline void getFilePositions(const char* path, int* extension_position, int* directory_position)
{
	const char* ptr = strrchr(path,'.');
	if(ptr == 0)
	{ *extension_position = -1; }
	else
	{ *extension_position = ptr - path; }

	ptr = qmax(strrchr(path,'/'),strrchr(path,'\\'));
	if(ptr == 0)
	{ *directory_position = -1; }
	else
	{ 
		*directory_position = ptr - path;
		if(*directory_position > *extension_position)
		{ *extension_position = -1; }
		
		//cover the case where we were passed a directory - get 2nd-to-last slash
		if(*directory_position == (int)strlen(path) - 1)
		{
			do
			{
				--(*directory_position);
			}
			while(*directory_position > -1 && path[*directory_position] != '/' && path[*directory_position] != '\\');
		}
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x30(%rsp), %rdi
movl $0x2e, %esi
callq 0x4430
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x9c3c
movq 0x28(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x9c52
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x30(%rsp), %rdi
movl $0x2f, %esi
callq 0x4430
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %rdi
movl $0x5c, %esi
callq 0x4430
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jbe 0x9c98
movq 0x30(%rsp), %rdi
movl $0x2f, %esi
callq 0x4430
movq %rax, 0x8(%rsp)
jmp 0x9cac
movq 0x30(%rsp), %rdi
movl $0x5c, %esi
callq 0x4430
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x9cce
movq 0x20(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x9d83
movq 0x18(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movl (%rax), %eax
movq 0x28(%rsp), %rcx
cmpl (%rcx), %eax
jle 0x9cff
movq 0x28(%rsp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq 0x20(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdi
callq 0x41c0
movq %rax, %rcx
movl 0x4(%rsp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x9d81
jmp 0x9d24
movq 0x20(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq 0x20(%rsp), %rcx
xorl %eax, %eax
cmpl $-0x1, (%rcx)
movb %al, 0x3(%rsp)
jle 0x9d77
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x2f, %ecx
movb %al, 0x3(%rsp)
je 0x9d77
movq 0x30(%rsp), %rax
movq 0x20(%rsp), %rcx
movslq (%rcx), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x5c, %eax
setne %al
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
testb $0x1, %al
jne 0x9d24
jmp 0x9d81
jmp 0x9d83
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: plen(char const*)
int plen (const char *p)
{
	int l;
	for (l = 0; ; l++)
	{
		if (p[l] == '\0')
			return -1;
		if (p[l] == sepchr)
			return l;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
jne 0x9dba
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x9de6
movq -0x10(%rsp), %rax
movslq -0x14(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0xa, %eax
jne 0x9dd7
movl -0x14(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x9de6
jmp 0x9dd9
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x9d9d
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: findparams(char*, char*)
char * findparams (char *cmdlineparams, char *params)
{
	char *c1, *c, *p;
	for (c1 = cmdlineparams; pvalid (c1); c1 = pnext (c1))
	{
		for (c = c1, p = params; pvalid (p); c = pnext (c), p = pnext (p))
			if (!pvalid (c) || !pmatch (c, p))
				break;
		if (!pvalid (p))
			return c1;
	}
	return NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa07b
jmp 0xa116
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa09f
jmp 0xa0e6
movq 0x10(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa0af
jmp 0xa0c2
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x9e10
testb $0x1, %al
jne 0xa0c4
jmp 0xa0e6
jmp 0xa0c6
movq 0x10(%rsp), %rdi
callq 0xa010
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rdi
callq 0xa010
movq %rax, 0x8(%rsp)
jmp 0xa08f
movq 0x8(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa100
movq 0x18(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0xa11f
jmp 0xa102
movq 0x18(%rsp), %rdi
callq 0xa010
movq %rax, 0x18(%rsp)
jmp 0xa068
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: delparams(char*, char*)
void delparams (char *cmdline, char *params)
{
	char *c, *p;
	if (!pvalid (params)) //avoid infinite loop
		return;
	while (cmdline = findparams (cmdline, params), cmdline != NULL)
	{
		for (c = cmdline, p = params; pvalid (p); c = pnext (c), p = pnext (p))
			;
		memmove (cmdline, c, strlen (c) + 1);
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa1b1
jmp 0xa24e
jmp 0xa1b3
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xa050
movq %rax, 0x30(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0xa24e
movq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa1f3
jmp 0xa215
jmp 0xa1f5
movq 0x20(%rsp), %rdi
callq 0xa010
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdi
callq 0xa010
movq %rax, 0x18(%rsp)
jmp 0xa1e3
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0x41c0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x4600
jmp 0xa1b3
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: nextword(char const*, char*, unsigned int)
const char * nextword (const char *s, char *token, unsigned int n)
{
	unsigned int i;
	const char *c;
	bool quote, comment, content;
	for (c=s, i=0, quote=false, comment=false, content=false; c[0] != '\0'; c++)
	{
		if (c[0]=='\"')
			quote = !quote;
		if (c[0]=='\n')
			quote = false;
		if (c[0]=='\n')
			comment = false;
		if (!quote && c[0]=='/' && c[1]=='/')
			comment = true;
		if (!comment && !(c[0]=='\n' || isspace (c[0])))
			content = true;
		if (!quote && !comment && content && (c[0]=='\n' || isspace (c[0])))
			break;
		if (content && c[0]!='\"')
			if (i<n-1)
				token[i++] = c[0];
			else
				error = true;
	}
	token[i] = '\0';
	return content? c: NULL;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movb $0x0, 0x17(%rsp)
movb $0x0, 0x16(%rsp)
movb $0x0, 0x15(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xa67a
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0xa56d
movb 0x17(%rsp), %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0xa57f
movb $0x0, 0x17(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0xa591
movb $0x0, 0x16(%rsp)
testb $0x1, 0x17(%rsp)
jne 0xa5b8
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xa5b8
movq 0x18(%rsp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2f, %eax
jne 0xa5b8
movb $0x1, 0x16(%rsp)
testb $0x1, 0x16(%rsp)
jne 0xa5e3
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0xa5e3
movq 0x18(%rsp), %rax
movsbl (%rax), %edi
callq 0x4080
cmpl $0x0, %eax
jne 0xa5e3
movb $0x1, 0x15(%rsp)
testb $0x1, 0x17(%rsp)
jne 0xa619
testb $0x1, 0x16(%rsp)
jne 0xa619
testb $0x1, 0x15(%rsp)
je 0xa619
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
je 0xa617
movq 0x18(%rsp), %rax
movsbl (%rax), %edi
callq 0x4080
cmpl $0x0, %eax
je 0xa619
jmp 0xa67a
testb $0x1, 0x15(%rsp)
je 0xa665
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0xa665
movl 0x20(%rsp), %eax
movl 0x24(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0xa65c
movq 0x18(%rsp), %rax
movb (%rax), %dl
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x20(%rsp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0xa663
movb $0x1, 0x20c2e55(%rip)   # 0x20cd4b8
jmp 0xa665
jmp 0xa667
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0xa543
movq 0x28(%rsp), %rax
movl 0x20(%rsp), %ecx
movb $0x0, (%rax,%rcx)
testb $0x1, 0x15(%rsp)
je 0xa69a
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0xa6a3
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0xa6a3
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: parsearg(int, char**, char*, unsigned int)
void parsearg (int argc, char ** argv, char *cmdline, unsigned int n)
{
	int i;
	strcpy (cmdline, "");
	strcat (cmdline, "<");
	strcat (cmdline, g_Program);
	strcat (cmdline, ">");
	strcat (cmdline, SEPSTR);
	for (i=1; i<argc; ++i)
	{
		if (strlen (cmdline) + strlen (argv[i]) + strlen (SEPSTR) + 1 <= n)
		{
			strcat (cmdline, argv[i]);
			strcat (cmdline, SEPSTR);
		}
		else
			error = true;
	}
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x24(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x21667(%rip), %rsi     # 0x2bd39
callq 0x4380
movq 0x10(%rsp), %rdi
leaq 0x201b6(%rip), %rsi     # 0x2a899
callq 0x4670
movq 0x10(%rsp), %rdi
leaq 0x2bcdc(%rip), %rax     # 0x363d0
movq (%rax), %rsi
callq 0x4670
movq 0x10(%rsp), %rdi
leaq 0x20193(%rip), %rsi     # 0x2a89b
callq 0x4670
movq 0x10(%rsp), %rdi
leaq 0x2161f(%rip), %rsi     # 0x2bd38
callq 0x4670
movl $0x1, 0x8(%rsp)
movl 0x8(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0xa7b4
movq 0x10(%rsp), %rdi
callq 0x41c0
movq %rax, (%rsp)
movq 0x18(%rsp), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x41c0
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
addq $0x1, %rax
addq $0x1, %rax
movl 0xc(%rsp), %ecx
cmpq %rcx, %rax
ja 0xa79b
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4670
movq 0x10(%rsp), %rdi
leaq 0x215a4(%rip), %rsi     # 0x2bd38
callq 0x4670
jmp 0xa7a2
movb $0x1, 0x20c2d16(%rip)   # 0x20cd4b8
jmp 0xa7a4
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0xa726
addq $0x28, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/cmdlinecfg.cpp
// Function: unparsearg(int&, char**&, char*)
void unparsearg (int &argc, char **&argv, char *cmdline)
{
	char *c;
	int i, j;
	i = 0;
	for (c = cmdline; pvalid (c); c = pnext (c))
		i++;
	argc = i;
	argv = (char **)malloc (argc * sizeof (char *));
	if (!argv)
	{
		error = true;
		return;
	}
	for (c = cmdline, i = 0; pvalid (c); c = pnext (c), i++)
	{
		argv[i] = (char *)malloc (plen (c) + 1);
		if (!argv[i])
		{
			error = true;
			return;
		}
		for (j = 0; j < plen (c); j++)
			argv[i][j] = c[j];
		argv[i][j] = '\0';
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa7f5
jmp 0xa811
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
callq 0xa010
movq %rax, 0x18(%rsp)
jmp 0xa7e5
movl 0x14(%rsp), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x30(%rsp), %rax
movslq (%rax), %rdi
shlq $0x3, %rdi
callq 0x4500
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
cmpq $0x0, (%rax)
jne 0xa84f
movb $0x1, 0x20c2c6e(%rip)   # 0x20cd4b8
jmp 0xa94d
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movq 0x18(%rsp), %rdi
callq 0x9df0
testb $0x1, %al
jne 0xa874
jmp 0xa94d
movq 0x18(%rsp), %rdi
callq 0x9d90
addl $0x1, %eax
movslq %eax, %rdi
callq 0x4500
movq %rax, %rdx
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0xa8bd
movb $0x1, 0x20c2c00(%rip)   # 0x20cd4b8
jmp 0xa94d
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rdi
callq 0x9d90
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jge 0xa914
movq 0x18(%rsp), %rax
movslq 0x10(%rsp), %rcx
movb (%rax,%rcx), %dl
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x10(%rsp), %rcx
movb %dl, (%rax,%rcx)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0xa8c5
movq 0x28(%rsp), %rax
movq (%rax), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x10(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rdi
callq 0xa010
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xa861
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: getfiletime(char const*)
time_t          getfiletime(const char* const filename)
{
    time_t          filetime = 0;
    struct stat     filestat;

    if (stat(filename, &filestat) == 0)
        filetime = qmax(filestat.st_mtime, filestat.st_ctime);

    return filetime;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4360
cmpl $0x0, %eax
jne 0xadbe
movq 0x60(%rsp), %rax
cmpq 0x70(%rsp), %rax
jle 0xada9
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
jmp 0xadb2
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
addq $0xa8, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: getfilesize(char const*)
long            getfilesize(const char* const filename)
{
    long            size = 0;
    struct stat     filestat;

    if (stat(filename, &filestat) == 0)
        size = filestat.st_size;

    return size;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq $0x0, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4360
cmpl $0x0, %eax
jne 0xae0f
movq 0x38(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x98(%rsp), %rax
addq $0xa8, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: getfiledata(char const*, char*, int)
long            getfiledata(const char* const filename, char* buffer, const int buffersize)
{
    long            size = 0;
    int             handle;
    time_t            start, end;

    time(&start);

    if ((handle = _open(filename, O_RDONLY)) != -1)
    {
        int             bytesread;

        Log("%-20s Restoring [%-13s - ", "BuildVisMatrix:", filename);
        while ((bytesread = _read(handle, buffer, qmin(32 * 1024, buffersize - size))) > 0)
        {
            size += bytesread;
            buffer += bytesread;
        }
        _close(handle);
        time(&end);
        Log("%10.3fMB] (%d)\n", size / (1024.0 * 1024.0), (int)(end - start));
    }

    if (buffersize != size)
    {
        Warning("Invalid file [%s] found.  File will be rebuilt!\n", filename);
        _unlink(filename);
    }

    return size;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq $0x0, 0x38(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x4370
movq 0x50(%rsp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x42c0
movl %eax, 0x34(%rsp)
cmpl $-0x1, %eax
je 0xaf39
movq 0x50(%rsp), %rdx
leaq 0x20a3c(%rip), %rdi     # 0x2b8a8
leaq 0x20a4f(%rip), %rsi     # 0x2b8c2
movb $0x0, %al
callq 0xb5d0
movl 0x34(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movslq 0x44(%rsp), %rcx
subq 0x38(%rsp), %rcx
movl $0x8000, %eax           # imm = 0x8000
cmpq %rcx, %rax
jge 0xaeab
movl $0x8000, %eax           # imm = 0x8000
movq %rax, (%rsp)
jmp 0xaeb9
movslq 0x44(%rsp), %rax
subq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rsi
movl 0xc(%rsp), %edi
movq (%rsp), %rdx
callq 0x4560
movl %eax, 0x1c(%rsp)
cmpl $0x0, %eax
jle 0xaef9
movslq 0x1c(%rsp), %rax
addq 0x38(%rsp), %rax
movq %rax, 0x38(%rsp)
movl 0x1c(%rsp), %ecx
movq 0x48(%rsp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x48(%rsp)
jmp 0xae7a
movl 0x34(%rsp), %edi
callq 0x4740
leaq 0x20(%rsp), %rdi
callq 0x4370
cvtsi2sdq 0x38(%rsp), %xmm0
movsd 0x20985(%rip), %xmm1    # 0x2b8a0
divsd %xmm1, %xmm0
movq 0x20(%rsp), %rax
subq 0x28(%rsp), %rax
movl %eax, %esi
leaq 0x209a0(%rip), %rdi     # 0x2b8d2
movb $0x1, %al
callq 0xb5d0
movslq 0x44(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0xaf62
movq 0x50(%rsp), %rsi
leaq 0x20991(%rip), %rdi     # 0x2b8e2
movb $0x0, %al
callq 0xbef0
movq 0x50(%rsp), %rdi
callq 0x41e0
movq 0x38(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: q_filelength(_IO_FILE*)
int             q_filelength(FILE* f)
{
    int             pos;
    int             end;

    pos = ftell(f);
    fseek(f, 0, SEEK_END);
    end = ftell(f);
    fseek(f, pos, SEEK_SET);

    return end;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x4030
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x4440
movq 0x10(%rsp), %rdi
callq 0x4030
movl %eax, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movslq 0xc(%rsp), %rsi
xorl %edx, %edx
callq 0x4440
movl 0x8(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: q_exists(char const*)
bool            q_exists(const char* const filename)
{
    FILE*           f;

    f = fopen(filename, "rb");

    if (!f)
    {
        IfDebug(Developer(DEVELOPER_LEVEL_SPAM, "Checking for existance of file %s (failed)\n", filename));
        return false;
    }
    else
    {
        fclose(f);
        IfDebug(Developer(DEVELOPER_LEVEL_SPAM, "Checking for existance of file %s (success)\n", filename));
        return true;
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x2092e(%rip), %rsi     # 0x2b913
callq 0x4460
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
jne 0xaffc
movb $0x0, 0x17(%rsp)
jmp 0xb00a
movq (%rsp), %rdi
callq 0x43a0
movb $0x1, 0x17(%rsp)
movb 0x17(%rsp), %al
andb $0x1, %al
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: SafeOpenWrite(char const*)
FILE*           SafeOpenWrite(const char* const filename)
{
    FILE*           f;

    f = fopen(filename, "wb");

    if (!f)
        Error("Error opening %s: %s", filename, strerror(errno));

    return f;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x208e1(%rip), %rsi     # 0x2b916
callq 0x4460
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xb071
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
callq 0x4060
movl (%rax), %edi
callq 0x4150
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x1f089(%rip), %rdi     # 0x2a0f3
movb $0x0, %al
callq 0xba80
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: SafeOpenRead(char const*)
FILE*           SafeOpenRead(const char* const filename)
{
    FILE*           f;

    f = fopen(filename, "rb");

    if (!f)
        Error("Error opening %s: %s", filename, strerror(errno));

    return f;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x2087e(%rip), %rsi     # 0x2b913
callq 0x4460
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0xb0d1
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
callq 0x4060
movl (%rax), %edi
callq 0x4150
movq (%rsp), %rsi
movq %rax, %rdx
leaq 0x1f029(%rip), %rdi     # 0x2a0f3
movb $0x0, %al
callq 0xba80
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: FreeSlave[P]vhlt/common/filelib.cpp
// Function: LoadFile(char const*, char**)
int             LoadFile(const char* const filename, char** bufferptr)
{
    FILE*           f;
    int             length;
    char*           buffer;

    f = SafeOpenRead(filename);
    length = q_filelength(f);
    buffer = (char*)Alloc(length + 1);
    SafeRead(f, buffer, length);
    fclose(f);

    *bufferptr = buffer;
    return length;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
callq 0xb080
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0xaf70
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x4aa0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
movl 0xc(%rsp), %edx
callq 0xb0e0
movq 0x10(%rsp), %rdi
callq 0x43a0
movq (%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movl 0xc(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: FreeSlave[P]vhlt/common/log.cpp
// Function: CheckForErrorLog()
void            CheckForErrorLog()
{
    if (g_log)
    {
        char            logfilename[_MAX_PATH];

        safe_snprintf(logfilename, _MAX_PATH, "%s.err", g_Mapname);
        if (q_exists(logfilename))
        {
            Log(">> There was a problem compiling the map.\n"
                ">> Check the file %s.log for the cause.\n",
                 g_Mapname);
            exit(1);
        }
    }
}

// Assembly:
subq $0x1008, %rsp           # imm = 0x1008
testb $0x1, 0x2be72(%rip)     # 0x373e0
je 0xb5bc
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
leaq 0x205ae(%rip), %rdx     # 0x2bb2d
leaq 0x2ae5a(%rip), %rcx     # 0x363e0
movb $0x0, %al
callq 0x99e0
movq %rsp, %rdi
callq 0xafd0
testb $0x1, %al
jne 0xb59b
jmp 0xb5ba
leaq 0x20592(%rip), %rdi     # 0x2bb34
leaq 0x2ae37(%rip), %rsi     # 0x363e0
movb $0x0, %al
callq 0xb5d0
movl $0x1, %edi
callq 0x4480
jmp 0xb5bc
addq $0x1008, %rsp           # imm = 0x1008
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x1028, %rsp           # imm = 0x1028
movq %rdi, 0x1020(%rsp)
testb $0x1, 0x2bd1a(%rip)     # 0x373e0
je 0xb7e7
cmpq $0x0, 0x20c5e1c(%rip)   # 0x20d14f0
je 0xb7e7
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1000, %esi           # imm = 0x1000
leaq 0x20439(%rip), %rdx     # 0x2bb2d
leaq 0x2ace5(%rip), %rcx     # 0x363e0
movb $0x0, %al
callq 0x99e0
leaq 0x20(%rsp), %rdi
leaq 0x21dff(%rip), %rsi     # 0x2d50d
callq 0x4460
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
je 0xb764
movq 0x18(%rsp), %rdi
movq 0x2aca4(%rip), %rdx     # 0x363d0
movq 0x1020(%rsp), %rcx
leaq 0x2044c(%rip), %rsi     # 0x2bb87
movb $0x0, %al
callq 0x4550
movq 0x18(%rsp), %rdi
callq 0x4450
movq 0x18(%rsp), %rdi
callq 0x43a0
movq $0x0, 0x18(%rsp)
jmp 0xb7e5
movq 0x2a86d(%rip), %rax     # 0x35fd8
movq (%rax), %rax
movq %rax, 0x10(%rsp)
leaq 0x20415(%rip), %rdi     # 0x2bb8f
callq 0xb7f0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
leaq 0x20(%rsp), %rdx
movb $0x0, %al
callq 0x4550
movq 0x2a83e(%rip), %rax     # 0x35fd8
movq (%rax), %rdi
callq 0x4450
testb $0x1, 0x20c1d2f(%rip)   # 0x20cd4d8
je 0xb7e3
movq 0x20c1d2e(%rip), %rax   # 0x20cd4e0
movq %rax, 0x8(%rsp)
leaq 0x203d1(%rip), %rdi     # 0x2bb8f
callq 0xb7f0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
leaq 0x20(%rsp), %rdx
movb $0x0, %al
callq 0x4550
movq 0x20c1d02(%rip), %rdi   # 0x20cd4e0
callq 0x4450
jmp 0xb7e5
jmp 0xb7e7
addq $0x1028, %rsp           # imm = 0x1028
retq
nop
// File: 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:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x20c1cdd(%rip), %eax   # 0x20cd4e8
jge 0xb85f
movslq 0x4(%rsp), %rcx
leaq 0x20c1cd7(%rip), %rax   # 0x20cd4f0
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x4530
cmpl $0x0, %eax
jne 0xb850
movslq 0x4(%rsp), %rcx
leaq 0x20c1cb2(%rip), %rax   # 0x20cd4f0
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
jmp 0xb869
jmp 0xb852
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xb801
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: FreeSlave[P]vhlt/common/log.cpp
// Function: CloseLog()
void CDECL      CloseLog()
{
    if (g_log && CompileLog)
    {
        LogEnd();
        fflush(CompileLog);
        fclose(CompileLog);
        CompileLog = NULL;
    }
}

// Assembly:
pushq %rax
testb $0x1, 0x2ba68(%rip)     # 0x373e0
je 0xb9ac
cmpq $0x0, 0x20c5b6e(%rip)   # 0x20d14f0
je 0xb9ac
callq 0xb9b0
movq 0x20c5b60(%rip), %rdi   # 0x20d14f0
callq 0x4450
movq 0x20c5b54(%rip), %rdi   # 0x20d14f0
callq 0x43a0
movq $0x0, 0x20c5b44(%rip) # 0x20d14f0
popq %rax
retq
nop
// File: 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 %rax
movq %rdi, (%rsp)
cmpq $0x0, 0x20c5b13(%rip)   # 0x20d14f0
je 0xba04
movq 0x20c5b0a(%rip), %rdi   # 0x20d14f0
movq (%rsp), %rdx
leaq 0x1e714(%rip), %rsi     # 0x2a105
movb $0x0, %al
callq 0x4550
movq 0x20c5af1(%rip), %rdi   # 0x20d14f0
callq 0x4450
movq 0x2a5b5(%rip), %rax     # 0x35fc0
movq (%rax), %rdi
movq (%rsp), %rdx
leaq 0x1e6ec(%rip), %rsi     # 0x2a105
movb $0x0, %al
callq 0x4550
movq 0x2a599(%rip), %rax     # 0x35fc0
movq (%rax), %rdi
callq 0x4450
testb $0x1, 0x20c1aa2(%rip)   # 0x20cd4d8
je 0xba5d
movq 0x20c1aa1(%rip), %rdi   # 0x20cd4e0
movq (%rsp), %rdx
leaq 0x1e6bb(%rip), %rsi     # 0x2a105
movb $0x0, %al
callq 0x4550
movq 0x20c1a88(%rip), %rdi   # 0x20cd4e0
callq 0x4450
popq %rax
retq
nop
// File: 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:
subq $0x10f8, %rsp           # imm = 0x10F8
testb %al, %al
je 0xbac2
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 %r9, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x10f0(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x1100(%rsp), %rax
movq %rax, 0xd8(%rsp)
movl $0x30, 0xd4(%rsp)
movl $0x8, 0xd0(%rsp)
movq 0x10f0(%rsp), %rdi
callq 0xb7f0
movq %rax, %rdx
leaq 0x8f0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x800, %esi            # imm = 0x800
movq %rsi, 0x8(%rsp)
leaq 0xd0(%rsp), %rcx
callq 0x4250
leaq 0x20086(%rip), %rdi     # 0x2bbd7
callq 0xb7f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r8
movq %rax, %rcx
leaq 0x2007d(%rip), %rdx     # 0x2bbe7
xorl %eax, %eax
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x99e0
movq 0x18(%rsp), %rdi
callq 0xb9d0
movq 0x18(%rsp), %rdi
callq 0xb6b0
movb $0x1, 0x20c595f(%rip)   # 0x20d14f8
callq 0xba60
addq $0x10f8, %rsp           # imm = 0x10F8
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x10e8, %rsp           # imm = 0x10E8
testb %al, %al
je 0xbdef
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, 0x10e0(%rsp)
cmpl $0x0, 0x20c56e5(%rip)   # 0x20d14fc
jle 0xbe1e
jmp 0xbee7
movl 0x20c56d8(%rip), %eax   # 0x20d14fc
addl $0x1, %eax
movl %eax, 0x20c56cf(%rip)   # 0x20d14fc
leaq 0xc0(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10f0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq 0x8e0(%rsp), %rax
movq %rax, (%rsp)
movq 0x10e0(%rsp), %rdi
callq 0xb7f0
movq (%rsp), %rdi
movq %rax, %rdx
leaq 0xc0(%rsp), %rcx
movl $0x800, %esi            # imm = 0x800
callq 0x4250
leaq 0xc0(%rsp), %rax
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x1fd32(%rip), %rdi     # 0x2bbd7
callq 0xb7f0
movq 0x8(%rsp), %rdi
movq %rax, %rcx
leaq 0x8e0(%rsp), %r8
movl $0x800, %esi            # imm = 0x800
leaq 0x1fd21(%rip), %rdx     # 0x2bbe7
movb $0x0, %al
callq 0x99e0
leaq 0xe0(%rsp), %rdi
callq 0xb9d0
leaq 0xe0(%rsp), %rdi
callq 0xb6b0
addq $0x10e8, %rsp           # imm = 0x10E8
retq
nop
// File: 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:
subq $0x10f8, %rsp           # imm = 0x10F8
testb %al, %al
je 0xbf32
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 %r9, 0x48(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdi, 0x10f0(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x1100(%rsp), %rax
movq %rax, 0xd8(%rsp)
movl $0x30, 0xd4(%rsp)
movl $0x8, 0xd0(%rsp)
movq 0x10f0(%rsp), %rdi
callq 0xb7f0
movq %rax, %rdx
leaq 0x8f0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movl $0x800, %esi            # imm = 0x800
movq %rsi, 0x8(%rsp)
leaq 0xd0(%rsp), %rcx
callq 0x4250
leaq 0x1fc46(%rip), %rdi     # 0x2bc07
callq 0xb7f0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %r8
movq %rax, %rcx
leaq 0x1fc0d(%rip), %rdx     # 0x2bbe7
xorl %eax, %eax
leaq 0xf0(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x99e0
movq 0x18(%rsp), %rdi
callq 0xb9d0
addq $0x10f8, %rsp           # imm = 0x10F8
retq
// File: 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:
subq $0x8e8, %rsp            # imm = 0x8E8
testb %al, %al
je 0xc03f
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdi, 0x8e0(%rsp)
testb $0x1, 0x20c145d(%rip)   # 0x20cd4c4
je 0xc0dc
leaq 0xc0(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x8f0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8e0(%rsp), %rdi
callq 0xb7f0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0xc0(%rsp), %rcx
movl $0x800, %esi            # imm = 0x800
callq 0x4250
leaq 0xc0(%rsp), %rax
leaq 0xe0(%rsp), %rdi
callq 0xb9d0
addq $0x8e8, %rsp            # imm = 0x8E8
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x8f8, %rsp            # imm = 0x8F8
testb %al, %al
je 0xc12f
movaps %xmm0, 0x40(%rsp)
movaps %xmm1, 0x50(%rsp)
movaps %xmm2, 0x60(%rsp)
movaps %xmm3, 0x70(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm5, 0x90(%rsp)
movaps %xmm6, 0xa0(%rsp)
movaps %xmm7, 0xb0(%rsp)
movq %r9, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %edi, 0x8f4(%rsp)
movq %rsi, 0x8e8(%rsp)
movl 0x8f4(%rsp), %eax
cmpl 0x20c1361(%rip), %eax   # 0x20cd4c0
jg 0xc1d4
leaq 0xc0(%rsp), %rax
leaq 0x10(%rsp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x900(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8e8(%rsp), %rdi
callq 0xb7f0
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0xc0(%rsp), %rcx
movl $0x800, %esi            # imm = 0x800
callq 0x4250
leaq 0xc0(%rsp), %rax
leaq 0xe0(%rsp), %rdi
callq 0xb9d0
addq $0x8f8, %rsp            # imm = 0x8F8
retq
nopl (%rax)
// File: 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:
subq $0x18, %rsp
movl %edi, 0x14(%rsp)
movq %rsi, 0x8(%rsp)
callq 0xc1e0
movq 0x2a1a7(%rip), %rsi     # 0x363d0
leaq 0x1fad6(%rip), %rdi     # 0x2bd06
movb $0x0, %al
callq 0xb5d0
movl 0x14(%rsp), %edi
movq 0x8(%rsp), %rsi
callq 0xc250
callq 0xc300
addq $0x18, %rsp
retq
nop