LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/inflex[P]ripMIME/ripOLE/ripole.c
// Function: ROLE_validate
int ROLE_validate(struct ripOLE_object *role )
{
	int result = 0;

	if (role->inputfile == NULL) {
		fprintf(stderr,"ripOLE requires an input file to decode\n");
		return -1;
	}

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x699f
movq 0x566b(%rip), %rax      # 0xbff0
movq (%rax), %rdi
leaq 0x2684(%rip), %rsi      # 0x9013
movb $0x0, %al
callq 0x10e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x69a5
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/rra/wav2rra.c
// Function: main
int
main(int argc,char **argv)
    {
    int argIndex = 1;

    argIndex = processOptions(argc,argv);

    if (argc-argIndex == 1)
        {
        filter(OpenFile(argv[argIndex],"r"),stdout);
        }
    else if (argc-argIndex >= 2 && strstr(argv[argIndex+1],".wav") != 0)
        {
        batch(argc-argIndex,argv+argIndex);
        }
    else if (argc-argIndex == 2)
        {
        filter(OpenFile(argv[argIndex],"r"),OpenFile(argv[argIndex+1],"w"));
        }
    else
        {
        printf("usage: wav2rra <input wav file> [<output rra file>]\n");
        printf("       wav2rra <input wav file1> <input wav file2> ...\n");
        exit(-1);
        }

    return 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x14a0
movl %eax, -0x14(%rbp)
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x1, %eax
jne 0x13c6
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x5494(%rip), %rsi      # 0x683e
callq 0x1af0
movq %rax, %rdi
movq 0x7c1f(%rip), %rax      # 0x8fd8
movq (%rax), %rsi
callq 0x1630
jmp 0x148c
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x2, %eax
jl 0x1410
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x4c78(%rip), %rsi      # 0x6061
callq 0x1240
cmpq $0x0, %rax
je 0x1410
movl -0x8(%rbp), %edi
subl -0x14(%rbp), %edi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1810
jmp 0x148a
movl -0x8(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x2, %eax
jne 0x1462
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x5410(%rip), %rsi      # 0x683e
callq 0x1af0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x4c17(%rip), %rsi      # 0x6066
callq 0x1af0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
callq 0x1630
jmp 0x1488
leaq 0x4bff(%rip), %rdi      # 0x6068
movb $0x0, %al
callq 0x10a0
leaq 0x4c26(%rip), %rdi      # 0x609d
movb $0x0, %al
callq 0x10a0
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x1200
jmp 0x148a
jmp 0x148c
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/pipde[P]deos-songlib/utils/rra/wav2rra.c
// Function: batch
static void
batch(int argc,char **argv)
    {
    int i;
    char buffer[512];
    char *base;
    char *suffix = ".rra";
    FILE *in,*out;

    for (i = 0; i < argc; ++i)
        {
        fprintf(stderr,"converting %s to RRA\n",argv[i]);
        in = OpenFile(argv[i],"r");
        base = strtok(argv[i],".");
        if (strlen(base) > sizeof(buffer) - (strlen(suffix) + 2))
            Fatal("file name too long\n");
        sprintf(buffer,"%s%s",base,suffix);
        out = OpenFile(buffer,"w");
        filter(in,out);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x48e8(%rip), %rax      # 0x6111
movq %rax, -0x230(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x194b
movq 0x77ae(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x48b6(%rip), %rsi      # 0x6116
movb $0x0, %al
callq 0x1120
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x4fc4(%rip), %rsi      # 0x683e
callq 0x1af0
movq %rax, -0x238(%rbp)
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x4893(%rip), %rsi      # 0x612c
callq 0x11b0
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rdi
callq 0x1090
movq %rax, -0x248(%rbp)
movq -0x230(%rbp), %rdi
callq 0x1090
movq %rax, %rdx
movq -0x248(%rbp), %rax
addq $0x2, %rdx
movl $0x200, %ecx            # imm = 0x200
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x18ed
leaq 0x4848(%rip), %rdi      # 0x612e
movb $0x0, %al
callq 0x19a0
leaq -0x220(%rbp), %rdi
movq -0x228(%rbp), %rdx
movq -0x230(%rbp), %rcx
leaq 0x4839(%rip), %rsi      # 0x6142
movb $0x0, %al
callq 0x11f0
leaq -0x220(%rbp), %rdi
leaq 0x4748(%rip), %rsi      # 0x6066
callq 0x1af0
movq %rax, -0x240(%rbp)
movq -0x238(%rbp), %rdi
movq -0x240(%rbp), %rsi
callq 0x1630
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1837
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gl/gl_3.c
// Function: ogl_LoadFunctions
int ogl_LoadFunctions()
{
	int numFailed = 0;
	ClearExtensionVars();
	
	_ptrc_glGetIntegerv = (void (CODEGEN_FUNCPTR *)(GLenum, GLint *))IntGetProcAddress("glGetIntegerv");
	if(!_ptrc_glGetIntegerv) return ogl_LOAD_FAILED;
	_ptrc_glGetStringi = (const GLubyte * (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi");
	if(!_ptrc_glGetStringi) return ogl_LOAD_FAILED;
	
	ProcExtsFromExtList();
	numFailed = Load_Version_3_3();
	
	if(numFailed == 0)
		return ogl_LOAD_SUCCEEDED;
	else
		return ogl_LOAD_SUCCEEDED + numFailed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x8(%rbp)
callq 0x1380
leaq 0x6cf9(%rip), %rdi      # 0x8004
callq 0x1130
movq %rax, 0xaf19(%rip)      # 0xc230
cmpq $0x0, 0xaf11(%rip)      # 0xc230
jne 0x132a
movl $0x0, -0x4(%rbp)
jmp 0x1375
leaq 0x6ce1(%rip), %rdi      # 0x8012
callq 0x1130
movq %rax, 0xb5bb(%rip)      # 0xc8f8
cmpq $0x0, 0xb5b3(%rip)      # 0xc8f8
jne 0x1350
movl $0x0, -0x4(%rbp)
jmp 0x1375
callq 0x1390
callq 0x13f0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x136c
movl $0x1, -0x4(%rbp)
jmp 0x1375
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gl/gl_3.c
// Function: ProcExtsFromExtList
static void ProcExtsFromExtList(void)
{
	GLint iLoop;
	GLint iNumExtensions = 0;
	_ptrc_glGetIntegerv(GL_NUM_EXTENSIONS, &iNumExtensions);

	for(iLoop = 0; iLoop < iNumExtensions; iLoop++)
	{
		const char *strExtensionName = (const char *)_ptrc_glGetStringi(GL_EXTENSIONS, iLoop);
		LoadExtByName(strExtensionName);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x8(%rbp)
movl $0x821d, %edi           # imm = 0x821D
leaq -0x8(%rbp), %rsi
callq *0xae82(%rip)           # 0xc230
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x13e6
movq 0xb534(%rip), %rax      # 0xc8f8
movl -0x4(%rbp), %esi
movl $0x1f03, %edi           # imm = 0x1F03
callq *%rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x47b0
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x13b5
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gl/gl_3.c
// Function: ogl_IsVersionGEQ
int ogl_IsVersionGEQ(int majorVersion, int minorVersion)
{
	if(g_major_version == 0)
		GetGLVersion();
	
	if(majorVersion < g_major_version) return 1;
	if(majorVersion > g_major_version) return 0;
	if(minorVersion <= g_minor_version) return 1;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, 0x84eb(%rip)      # 0xcc40
jne 0x475c
callq 0x46f0
movl -0x8(%rbp), %eax
cmpl 0x84db(%rip), %eax      # 0xcc40
jge 0x4770
movl $0x1, -0x4(%rbp)
jmp 0x479f
movl -0x8(%rbp), %eax
cmpl 0x84c7(%rip), %eax      # 0xcc40
jle 0x4784
movl $0x0, -0x4(%rbp)
jmp 0x479f
movl -0xc(%rbp), %eax
cmpl 0x84b7(%rip), %eax      # 0xcc44
jg 0x4798
movl $0x1, -0x4(%rbp)
jmp 0x479f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gl/gl_3.c
// Function: LoadExtByName
static void LoadExtByName(const char *extensionName)
{
	ogl_StrToExtMap *entry = NULL;
	entry = FindExtEntry(extensionName);
	if(entry)
	{
		if(entry->LoadExtension)
		{
			int numFailed = entry->LoadExtension();
			if(numFailed == 0)
			{
				*(entry->extensionVariable) = ogl_LOAD_SUCCEEDED;
			}
			else
			{
				*(entry->extensionVariable) = ogl_LOAD_SUCCEEDED + numFailed;
			}
		}
		else
		{
			*(entry->extensionVariable) = ogl_LOAD_SUCCEEDED;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4830
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x4825
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4815
movq -0x10(%rbp), %rax
callq *0x10(%rax)
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x4803
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x1, (%rax)
jmp 0x4813
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl %ecx, (%rax)
jmp 0x4823
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x1, (%rax)
jmp 0x4825
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gl/gl_3.c
// Function: FindExtEntry
static ogl_StrToExtMap *FindExtEntry(const char *extensionName)
{
	int loop;
	ogl_StrToExtMap *currLoc = ExtensionMap;
	for(loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
	{
		if(strcmp(extensionName, currLoc->extensionName) == 0)
			return currLoc;
	}
	
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x78cd(%rip), %rax      # 0xc110
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x83f1(%rip), %eax      # 0xcc48
jge 0x4891
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x1180
cmpl $0x0, %eax
jne 0x4878
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4899
jmp 0x487a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x20(%rbp)
jmp 0x484e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: createShader
void createShader(ShaderPrg *prg, const char *vs, const char *fs){
	char *vsData = readFile(vs);
	char *fsData = readFile(fs);

	prg->vs = compileShader(vsData, GL_VERTEX_SHADER);
	prg->fs = compileShader(fsData, GL_FRAGMENT_SHADER);

	linkPrg(prg);

	free(vsData);
	free(fsData);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4930
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4930
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl $0x8b31, %esi           # imm = 0x8B31
callq 0x49e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x28(%rbp), %rdi
movl $0x8b30, %esi           # imm = 0x8B30
callq 0x49e0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x4a80
movq -0x20(%rbp), %rdi
callq 0x1160
movq -0x28(%rbp), %rdi
callq 0x1160
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: readFile
static char *readFile(const char *filename){
	FILE *fp = fopen(filename, "r");
	if(fp == NULL){
		printf("Could not open file: %s\n", filename);
		return NULL;
	}

	// Get size of file
	fseek(fp, 0, SEEK_END);
	int fileSize = ftell(fp);
	fseek(fp, 0, SEEK_SET);

	char *data = malloc(fileSize);
	fread(data, 1, fileSize, fp);
	fclose(fp);
	return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x36ea(%rip), %rsi      # 0x8031
callq 0x1150
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4973
movq -0x10(%rbp), %rsi
leaq 0x4ed7(%rip), %rdi      # 0x9839
movb $0x0, %al
callq 0x1040
movq $0x0, -0x8(%rbp)
jmp 0x49d4
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1140
movq -0x18(%rbp), %rdi
callq 0x1030
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x1140
movslq -0x1c(%rbp), %rdi
callq 0x1170
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x1c(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x11c0
movq -0x18(%rbp), %rdi
callq 0x1110
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: compileShader
GLuint compileShader(const char *shader, GLenum type){
	GLuint s = glCreateShader(type);
	glShaderSource(s, 1, &shader, NULL);
	glCompileShader(s);

	// Check if shader compiled okay
	GLint okay = GL_FALSE;
	glGetShaderiv(s, GL_COMPILE_STATUS, &okay);
	if(okay == GL_FALSE){
		printf("Error compiling shader\n");
		printErrLog(s);
		return 0;
	}

	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x7ae2(%rip), %rax      # 0xc4d8
movq (%rax), %rax
movl -0x14(%rbp), %edi
callq *%rax
movl %eax, -0x18(%rbp)
leaq 0x7ba0(%rip), %rax      # 0xc5a8
movq (%rax), %rax
movl -0x18(%rbp), %edi
movl $0x1, %esi
leaq -0x10(%rbp), %rdx
xorl %ecx, %ecx
callq *%rax
leaq 0x7aa6(%rip), %rax      # 0xc4c8
movq (%rax), %rax
movl -0x18(%rbp), %edi
callq *%rax
movl $0x0, -0x1c(%rbp)
leaq 0x7b18(%rip), %rax      # 0xc550
movq (%rax), %rax
movl -0x18(%rbp), %edi
movl $0x8b81, %esi           # imm = 0x8B81
leaq -0x1c(%rbp), %rdx
callq *%rax
cmpl $0x0, -0x1c(%rbp)
jne 0x4a6e
leaq 0x4d73(%rip), %rdi      # 0x97c9
movb $0x0, %al
callq 0x1040
movl -0x18(%rbp), %edi
callq 0x4b50
movl $0x0, -0x4(%rbp)
jmp 0x4a74
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: linkPrg
void linkPrg(ShaderPrg *prg){
	prg->prgID = glCreateProgram();
	glAttachShader(prg->prgID, prg->vs);
	glAttachShader(prg->prgID, prg->fs);
	glLinkProgram(prg->prgID);

	// Check if program linked okay
	GLint okay = GL_FALSE;
	glGetProgramiv(prg->prgID, GL_LINK_STATUS, &okay);
	if(okay == GL_FALSE){
		printf("Error linking program\n");
		printErrLog(prg->prgID);
		glDeleteProgram(prg->prgID);
		prg->prgID = 0;
		return;
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x7a3d(%rip), %rax      # 0xc4d0
callq *(%rax)
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
leaq 0x7a0c(%rip), %rax      # 0xc4b0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %esi
callq *%rax
leaq 0x79f3(%rip), %rax      # 0xc4b0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
movq -0x8(%rbp), %rcx
movl 0x8(%rcx), %esi
callq *%rax
leaq 0x7aca(%rip), %rax      # 0xc5a0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
callq *%rax
movl $0x0, -0xc(%rbp)
leaq 0x7a49(%rip), %rax      # 0xc538
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
movl $0x8b82, %esi           # imm = 0x8B82
leaq -0xc(%rbp), %rdx
callq *%rax
cmpl $0x0, -0xc(%rbp)
jne 0x4b40
leaq 0x4cd1(%rip), %rdi      # 0x97e1
movb $0x0, %al
callq 0x1040
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x4b50
leaq 0x79b7(%rip), %rax      # 0xc4e0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movl (%rcx), %edi
callq *%rax
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
jmp 0x4b42
jmp 0x4b42
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: printErrLog
static void printErrLog(GLuint obj){
	GLint logLen = 0;
	bool isShader;
	if(glIsShader(obj)){
		isShader = true;
		glGetShaderiv(obj, GL_INFO_LOG_LENGTH, &logLen);
	} else if (glIsProgram(obj)){
		isShader = false;
		glGetProgramiv(obj, GL_INFO_LOG_LENGTH, &logLen);
	} else {
		printf("Object is neither shader or program");
		return;
	}

	char *log = malloc(logLen);
	if(isShader){
		glGetShaderInfoLog(obj, logLen, NULL, log);
	} else {
		glGetProgramInfoLog(obj, logLen, NULL, log);
	}

	printf("%s", log);
	free(log);
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
leaq 0x7a2f(%rip), %rax      # 0xc598
movq (%rax), %rax
movl -0x4(%rbp), %edi
callq *%rax
cmpb $0x0, %al
je 0x4b93
movb $0x1, -0x9(%rbp)
leaq 0x79d0(%rip), %rax      # 0xc550
movq (%rax), %rax
movl -0x4(%rbp), %edi
movl $0x8b84, %esi           # imm = 0x8B84
leaq -0x8(%rbp), %rdx
callq *%rax
jmp 0x4bd6
leaq 0x79f6(%rip), %rax      # 0xc590
movq (%rax), %rax
movl -0x4(%rbp), %edi
callq *%rax
cmpb $0x0, %al
je 0x4bc4
movb $0x0, -0x9(%rbp)
leaq 0x7987(%rip), %rax      # 0xc538
movq (%rax), %rax
movl -0x4(%rbp), %edi
movl $0x8b84, %esi           # imm = 0x8B84
leaq -0x8(%rbp), %rdx
callq *%rax
jmp 0x4bd4
leaq 0x4c87(%rip), %rdi      # 0x9852
movb $0x0, %al
callq 0x1040
jmp 0x4c36
jmp 0x4bd6
movslq -0x8(%rbp), %rdi
callq 0x1170
movq %rax, -0x18(%rbp)
testb $0x1, -0x9(%rbp)
je 0x4c03
leaq 0x7950(%rip), %rax      # 0xc540
movq (%rax), %rax
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq *%rax
jmp 0x4c1b
leaq 0x7926(%rip), %rax      # 0xc530
movq (%rax), %rax
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
movq -0x18(%rbp), %rcx
xorl %edx, %edx
callq *%rax
movq -0x18(%rbp), %rsi
leaq 0x4c50(%rip), %rdi      # 0x9876
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x1160
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: getAttribLoc
GLint getAttribLoc(ShaderPrg *prg, const char *name){
	GLint attrib = glGetAttribLocation(prg->prgID, name);
	if(attrib == -1){
		printf("Could not find vertex attribute: %s\n", name);
		return -1;
	}
	
	return attrib;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x78d1(%rip), %rax      # 0xc528
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %edi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x4c8a
movq -0x18(%rbp), %rsi
leaq 0x4b7e(%rip), %rdi      # 0x97f8
movb $0x0, %al
callq 0x1040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4c90
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/gutils.c
// Function: getUniformLoc
GLint getUniformLoc(ShaderPrg *prg, const char *name){
	GLint uniform = glGetUniformLocation(prg->prgID, name);
	if(uniform == -1){
		printf("Could not find uniform: %s\n", name);
		return -1;
	}

	return uniform;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x78a1(%rip), %rax      # 0xc558
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %edi
movq -0x18(%rbp), %rsi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $-0x1, -0x1c(%rbp)
jne 0x4cea
movq -0x18(%rbp), %rsi
leaq 0x4b43(%rip), %rdi      # 0x981d
movb $0x0, %al
callq 0x1040
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4cf0
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: identity
void identity(mat4 *mat){
	float *m = &mat->m[0];
	m[0] = 1;m[4] = 0;m[8] = 0;m[12]= 0;
	m[1] = 0;m[5] = 1;m[9] = 0;m[13]= 0;
	m[2] = 0;m[6] = 0;m[10]= 1;m[14]= 0;
	m[3] = 0;m[7] = 0;m[11]= 0;m[15]= 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movss 0x4b30(%rip), %xmm0     # 0x987c
movss %xmm0, (%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x10(%rbp), %rax
movss 0x4af0(%rip), %xmm0     # 0x987c
movss %xmm0, 0x14(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x10(%rbp), %rax
movss 0x4aaf(%rip), %xmm0     # 0x987c
movss %xmm0, 0x28(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movq -0x10(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movss 0x4a6e(%rip), %xmm0     # 0x987c
movss %xmm0, 0x3c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: mulMat
void mulMat(mat4 *dst, mat4 *a, mat4 *b){
	mat4 aa = *a;
	mat4 bb = *b;
	float *dm = &dst->m[0];
	float *am = &aa.m[0];
	float *bm = &bb.m[0];

	for(int j=0; j<4; j++){
		for(int i=0; i<4; i++){
			int index = j*4 + i;
			dm[index] = am[0*4 + i]*bm[j*4 + 0] + am[1*4 + i]*bm[j*4 + 1]
			+ am[2*4 + i]*bm[j*4 + 2] + am[3*4 + i]*bm[j*4 + 3]; 
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x58(%rbp), %rdi
movl $0x40, %edx
callq 0x10d0
movq -0x18(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movl $0x40, %edx
callq 0x10d0
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0xb4(%rbp)
cmpl $0x4, -0xb4(%rbp)
jge 0x4fe6
movl $0x0, -0xb8(%rbp)
cmpl $0x4, -0xb8(%rbp)
jge 0x4fd0
movl -0xb4(%rbp), %eax
shll $0x2, %eax
addl -0xb8(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0xa8(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0xb0(%rbp), %rax
movl -0xb4(%rbp), %ecx
shll $0x2, %ecx
addl $0x0, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
movq -0xa8(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl $0x4, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
movq -0xb0(%rbp), %rax
movl -0xb4(%rbp), %ecx
shll $0x2, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
mulss (%rax,%rcx,4), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0xa8(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm1
movq -0xb0(%rbp), %rax
movl -0xb4(%rbp), %ecx
shll $0x2, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movq -0xa8(%rbp), %rax
movl -0xb8(%rbp), %ecx
addl $0xc, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm0
movq -0xb0(%rbp), %rax
movl -0xb4(%rbp), %ecx
shll $0x2, %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movss (%rax,%rcx,4), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0xa0(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x4ea3
jmp 0x4fd2
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x4e8c
addq $0xc0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: frustrum
void frustrum(mat4 *mat, float left, float right, float bottom, float top, float near, float far){
	mat4 r;
	float *m = &r.m[0];
	float n2 = 2.0*near;
	float rml = right - left;
	float fmn = far - near;
	float tmb = top - bottom;

	m[0] = n2/rml;
	m[1] = 0;
	m[2] = 0;
	m[3] = 0;

	m[4] = 0;
	m[5] = n2/tmb;
	m[6] = 0;
	m[7] = 0;
	
	m[8] = (right + left)/rml;
	m[9] = (top + bottom)/tmb;
	m[10]= -(far + near)/fmn;
	m[11]= -1;

	m[12]= 0;
	m[13]= 0;
	m[14]= -n2/fmn;
	m[15]= 0;

	mulMat(mat, mat, &r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movss %xmm3, -0x18(%rbp)
movss %xmm4, -0x1c(%rbp)
movss %xmm5, -0x20(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movss -0x1c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x4852(%rip), %xmm0     # 0x9888
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x10(%rbp), %xmm0
subss -0xc(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x20(%rbp), %xmm0
subss -0x1c(%rbp), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x18(%rbp), %xmm0
subss -0x14(%rbp), %xmm0
movss %xmm0, -0x78(%rbp)
movss -0x6c(%rbp), %xmm0
divss -0x70(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, (%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movss -0x6c(%rbp), %xmm0
divss -0x78(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0x14(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movss -0x10(%rbp), %xmm0
addss -0xc(%rbp), %xmm0
divss -0x70(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0x20(%rax)
movss -0x18(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
divss -0x78(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0x24(%rax)
movss -0x20(%rbp), %xmm0
addss -0x1c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
divss -0x74(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0x28(%rax)
movq -0x68(%rbp), %rax
movss 0x4742(%rip), %xmm0     # 0x9880
movss %xmm0, 0x2c(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movss -0x6c(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
divss -0x74(%rbp), %xmm0
movq -0x68(%rbp), %rax
movss %xmm0, 0x38(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x4e20
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: perspective
void perspective(mat4 *mat, float fovy, float aspect, float near, float far){
	mat4 r;
	float *m = &r.m[0];
	float range = tanf(fovy)*near;
	float sx = (2.0f*near)/(range*aspect + range*aspect);
	float sy = near/range;
	float sz = -(far + near)/(far - near);
	float pz = -(2.0f*far*near)/(far - near);

	m[0] = sx;
	m[1] = 0;
	m[2] = 0;
	m[3] = 0;

	m[4] = 0;
	m[5] = sy;
	m[6] = 0;
	m[7] = 0;

	m[8] = 0;
	m[9] = 0;
	m[10]= sz;
	m[11]= -1;

	m[12]= 0;
	m[13]= 0;
	m[14]= pz;
	m[15]= 0;

	mulMat(mat, mat, &r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
movss %xmm3, -0x18(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movss -0xc(%rbp), %xmm0
callq 0x11b0
mulss -0x14(%rbp), %xmm0
movss %xmm0, -0x64(%rbp)
movss 0x468d(%rip), %xmm0     # 0x9884
mulss -0x14(%rbp), %xmm0
movss -0x64(%rbp), %xmm1
movss -0x10(%rbp), %xmm3
movss -0x64(%rbp), %xmm2
mulss -0x10(%rbp), %xmm2
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x14(%rbp), %xmm0
divss -0x64(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x18(%rbp), %xmm0
addss -0x14(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss -0x18(%rbp), %xmm1
subss -0x14(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movss 0x4622(%rip), %xmm0     # 0x9884
mulss -0x18(%rbp), %xmm0
mulss -0x14(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss -0x18(%rbp), %xmm1
subss -0x14(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x68(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, (%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movss -0x6c(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x14(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
movss -0x70(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x28(%rax)
movq -0x60(%rbp), %rax
movss 0x455f(%rip), %xmm0     # 0x9880
movss %xmm0, 0x2c(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movss -0x74(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x38(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x4e20
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: translate
void translate(mat4 *mat, float x, float y, float z){
	mat4 r;
	float *m = &r.m[0];
	m[0] = 1;m[4] = 0;m[8] = 0;m[12]= x;
	m[1] = 0;m[5] = 1;m[9] = 0;m[13]= y;
	m[2] = 0;m[6] = 0;m[10]= 1;m[14]= z;
	m[3] = 0;m[7] = 0;m[11]= 0;m[15]= 1;


	mulMat(mat, mat, &r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movss %xmm1, -0x10(%rbp)
movss %xmm2, -0x14(%rbp)
leaq -0x54(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movss 0x44cd(%rip), %xmm0     # 0x987c
movss %xmm0, (%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x20(%rax)
movss -0xc(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x30(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x60(%rbp), %rax
movss 0x448b(%rip), %xmm0     # 0x987c
movss %xmm0, 0x14(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
movss -0x10(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x34(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x60(%rbp), %rax
movss 0x4448(%rip), %xmm0     # 0x987c
movss %xmm0, 0x28(%rax)
movss -0x14(%rbp), %xmm0
movq -0x60(%rbp), %rax
movss %xmm0, 0x38(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movq -0x60(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x60(%rbp), %rax
movss 0x4405(%rip), %xmm0     # 0x987c
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x54(%rbp), %rdx
callq 0x4e20
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: rotateY
void rotateY(mat4 *mat, float angle){
	mat4 r;
	float *m = &r.m[0];
	m[0] = cosf(angle);
	m[1] = 0;
	m[2] = -sinf(angle);
	m[3] = 0;

	m[4] = 0;
	m[5] = 1;
	m[6] = 0;
	m[7] = 0;

	m[8] = sinf(angle);
	m[9] = 0;
	m[10]= cosf(angle);
	m[11]= 0;

	m[12]= 0;
	m[13]= 0;
	m[14]= 0;
	m[15]= 1;

	mulMat(mat, mat, &r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
leaq -0x4c(%rbp), %rax
movq %rax, -0x58(%rbp)
movss -0xc(%rbp), %xmm0
callq 0x10a0
movq -0x58(%rbp), %rax
movss %xmm0, (%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movss -0xc(%rbp), %xmm0
callq 0x10e0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x58(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rax)
movq -0x58(%rbp), %rax
movss 0x4361(%rip), %xmm0     # 0x987c
movss %xmm0, 0x14(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x18(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movss -0xc(%rbp), %xmm0
callq 0x10e0
movq -0x58(%rbp), %rax
movss %xmm0, 0x20(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x24(%rax)
movss -0xc(%rbp), %xmm0
callq 0x10a0
movq -0x58(%rbp), %rax
movss %xmm0, 0x28(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x30(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rax)
movq -0x58(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x38(%rax)
movq -0x58(%rbp), %rax
movss 0x42d6(%rip), %xmm0     # 0x987c
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
callq 0x4e20
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/mat.c
// Function: lookAt
void lookAt(mat4 *mat, vec3Float *pos, vec3Float *fwd, vec3Float *right, vec3Float *up){
	mat4 r;
	float *m = &r.m[0];

	m[0] = right->x;
	m[1] = up->x;
	m[2] = -fwd->x;
	m[3] = 0;

	m[4] = right->y;
	m[5] = up->y;
	m[6] = -fwd->y;
	m[7] = 0;	

	m[8] = right->z;
	m[9] = up->z;
	m[10]= -fwd->z;
	m[11]= 0;

	m[12]= -pos->x;
	m[13]= -pos->y;
	m[14]= -pos->z;
	m[15]= 1;

	mulMat(mat, mat, &r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, (%rax)
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x4(%rax)
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x8(%rax)
movq -0x70(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0xc(%rax)
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x10(%rax)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x14(%rax)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x18(%rax)
movq -0x70(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x1c(%rax)
movq -0x20(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x20(%rax)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x24(%rax)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x28(%rax)
movq -0x70(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x30(%rax)
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x34(%rax)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movq -0x70(%rbp), %rax
movss %xmm0, 0x38(%rax)
movq -0x70(%rbp), %rax
movss 0x4137(%rip), %xmm0     # 0x987c
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x4e20
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/pak.c
// Function: readFile
void *readFile(PakFile *pf, const char *filename, int *size){
	for(int i=0; i<pf->numFiles; i++){
		if(strcmp(filename, pf->files[i].filename) == 0){
			// If size pointer isn't NULL set file size
			if(size != NULL){
				*size = pf->files[i].size;
			}
			return pf->files[i].data;
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x5a75
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x1180
cmpl $0x0, %eax
jne 0x5a68
cmpq $0x0, -0x20(%rbp)
je 0x5a4c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x5a7d
jmp 0x5a6a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x59fb
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/pak.c
// Function: freePak
void freePak(PakFile *pf){
	for(int i=0; i<pf->numFiles; i++){
		free(pf->files[i].filename);
		free(pf->files[i].data);
	}
	
	free(pf->files);
	free(pf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x5aef
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x1160
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x1160
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5aa3
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1160
movq -0x8(%rbp), %rdi
callq 0x1160
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/palette.c
// Function: readPalette
Palette *readPalette(void *paletteData){
	Palette *plt = malloc(sizeof(Palette));
	// Copy palette structure from filedata
	memcpy(&plt->colours[0], paletteData, sizeof(Palette));
	return plt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x300, %edi            # imm = 0x300
callq 0x1170
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x300, %edx            # imm = 0x300
callq 0x10d0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/quad.c
// Function: initQuad
void initQuad(){
	glGenBuffers(2, bufferIds);
	glBindBuffer(GL_ARRAY_BUFFER, bufferIds[0]);
	glBufferData(GL_ARRAY_BUFFER, sizeof(verts), &verts[0], GL_STATIC_DRAW);
	
	glBindBuffer(GL_ARRAY_BUFFER, bufferIds[1]);
	glBufferData(GL_ARRAY_BUFFER, sizeof(texCoords), &texCoords[0], GL_STATIC_DRAW);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x2, %edi
leaq 0x707c(%rip), %rsi      # 0xcc4c
leaq 0x6879(%rip), %rax      # 0xc450
callq *(%rax)
leaq 0x6840(%rip), %rax      # 0xc420
movq (%rax), %rax
movl 0x7063(%rip), %esi      # 0xcc4c
movl $0x8892, %edi           # imm = 0x8892
callq *%rax
movl $0x8892, %edi           # imm = 0x8892
movl $0x30, %esi
leaq 0x652f(%rip), %rdx      # 0xc130
movl $0x88e4, %ecx           # imm = 0x88E4
leaq 0x681b(%rip), %rax      # 0xc428
callq *(%rax)
leaq 0x680a(%rip), %rax      # 0xc420
movq (%rax), %rax
movl 0x7031(%rip), %esi      # 0xcc50
movl $0x8892, %edi           # imm = 0x8892
callq *%rax
movl $0x8892, %edi           # imm = 0x8892
movl $0x20, %esi
leaq 0x6529(%rip), %rdx      # 0xc160
movl $0x88e4, %ecx           # imm = 0x88E4
leaq 0x67e5(%rip), %rax      # 0xc428
callq *(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/quad.c
// Function: drawQuad
void drawQuad(ShaderPrg *prg){
	GLint pos = getAttribLoc(prg, "position");
	GLint tex = getAttribLoc(prg, "texCoord");
	glEnableVertexAttribArray(pos);
	glBindBuffer(GL_ARRAY_BUFFER, bufferIds[0]);
	glVertexAttribPointer(
			pos,
			3,
			GL_FLOAT,
			GL_FALSE,
			0,
			NULL);

	glEnableVertexAttribArray(tex);
	glBindBuffer(GL_ARRAY_BUFFER, bufferIds[1]);
	glVertexAttribPointer(
			tex,
			2,
			GL_FLOAT,
			GL_FALSE,
			0,
			NULL);

	glDrawArrays(GL_TRIANGLE_FAN, 0, 4);

	glDisableVertexAttribArray(pos);
	glDisableVertexAttribArray(tex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3c42(%rip), %rsi      # 0x98a9
callq 0x4c40
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x3c38(%rip), %rsi      # 0x98b2
callq 0x4c40
movl %eax, -0x10(%rbp)
leaq 0x687f(%rip), %rax      # 0xc508
movq (%rax), %rax
movl -0xc(%rbp), %edi
callq *%rax
leaq 0x6788(%rip), %rax      # 0xc420
movq (%rax), %rax
movl 0x6fab(%rip), %esi      # 0xcc4c
movl $0x8892, %edi           # imm = 0x8892
callq *%rax
leaq 0x6ae1(%rip), %rax      # 0xc790
movq (%rax), %rax
movl -0xc(%rbp), %edi
movl $0x3, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %r8d, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
movl %r8d, %ecx
callq *%rax
leaq 0x6835(%rip), %rax      # 0xc508
movq (%rax), %rax
movl -0x10(%rbp), %edi
callq *%rax
leaq 0x673e(%rip), %rax      # 0xc420
movq (%rax), %rax
movl 0x6f65(%rip), %esi      # 0xcc50
movl $0x8892, %edi           # imm = 0x8892
callq *%rax
leaq 0x6a97(%rip), %rax      # 0xc790
movq (%rax), %rax
movl -0x10(%rbp), %edi
movl $0x2, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %r8d, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
movl %r8d, %ecx
callq *%rax
movl $0x6, %edi
xorl %esi, %esi
movl $0x4, %edx
leaq 0x6617(%rip), %rax      # 0xc340
callq *(%rax)
leaq 0x67c6(%rip), %rax      # 0xc4f8
movq (%rax), %rax
movl -0xc(%rbp), %edi
callq *%rax
leaq 0x67b7(%rip), %rax      # 0xc4f8
movq (%rax), %rax
movl -0x10(%rbp), %edi
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/texture.c
// Function: writePPM
void writePPM(Texture *tex, const char *filename){
	FILE *fp = fopen(filename, "wb");
	if(fp == NULL){
		printf("Could not create file: %s\n", filename);
		return;
	}

	fprintf(fp, "P6 %d %d 255\n", tex->width, tex->height);
	fwrite(tex->data, sizeof(colour3UByte), tex->width*tex->height, fp);
	fclose(fp);
	
	return;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x3920(%rip), %rsi      # 0x98bb
callq 0x1150
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5fbf
movq -0x10(%rbp), %rsi
leaq 0x3908(%rip), %rdi      # 0x98be
movb $0x0, %al
callq 0x1040
jmp 0x6010
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
leaq 0x3901(%rip), %rsi      # 0x98d9
movb $0x0, %al
callq 0x11a0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
imull 0x10(%rcx), %eax
movslq %eax, %rdx
movq -0x18(%rbp), %rcx
movl $0x3, %esi
callq 0x11e0
movq -0x18(%rbp), %rdi
callq 0x1110
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/vec.c
// Function: vec3Normalize
void vec3Normalize(vec3Float *v){
	float len = vec3Len(v);
	v->x /= len;
	v->y /= len;
	v->z /= len;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x6160
movss %xmm0, -0xc(%rbp)
movss -0xc(%rbp), %xmm1
movq -0x8(%rbp), %rax
movss (%rax), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax)
movss -0xc(%rbp), %xmm1
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm0
divss %xmm1, %xmm0
movss %xmm0, 0x4(%rax)
movss -0xc(%rbp), %xmm1
movq -0x8(%rbp), %rax
movss 0x8(%rax), %xmm0
divss %xmm1, %xmm0
movss %xmm0, 0x8(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/vec.c
// Function: vec3Cross
void vec3Cross(vec3Float *dst, vec3Float *a, vec3Float *b){
	vec3Float aa = *a;
	vec3Float bb = *b;

	dst->x = aa.y*bb.z - aa.z*bb.y;
	dst->y = aa.z*bb.x - aa.x*bb.z;
	dst->z = aa.x*bb.y - aa.y*bb.x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x24(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x28(%rbp)
movss -0x20(%rbp), %xmm0
movss -0x28(%rbp), %xmm2
movss -0x1c(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, (%rax)
movss -0x1c(%rbp), %xmm0
movss -0x30(%rbp), %xmm2
movss -0x24(%rbp), %xmm1
mulss -0x28(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0x24(%rbp), %xmm0
movss -0x2c(%rbp), %xmm2
movss -0x20(%rbp), %xmm1
mulss -0x30(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq -0x8(%rbp), %rax
movss %xmm0, 0x8(%rax)
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/Hazematman[P]BSP-Renderer/bsp.c
// Function: readBsp
Bsp *readBsp(void *bspData, Palette *plt){
	BspHeader header;
	
	memcpy(&header, bspData, sizeof(BspHeader));
	if(header.version != BSP_VERSION){
		printf("Invalid BSP version expected %d found %d\n",
				BSP_VERSION, header.version);
		return NULL;
	}

	Bsp *bsp = malloc(sizeof(Bsp));
	// Start by loading texture data from BSP
	loadBspTextures(bsp, bspData + header.miptex.offset, plt);

	// Next we load the vertex data, plane data, and texture mapping data
	loadBspVerts(bsp, bspData + header.vertices.offset, header.vertices.size);
	loadBspPlanes(bsp, bspData + header.planes.offset, header.planes.size);
	loadBspTexInfo(bsp, bspData + header.texinfo.offset, header.texinfo.size);

	// Next we can load the rest of geometry from the BSP
	loadBspGeometry(bsp, bspData+header.faces.offset, header.faces.size,
			bspData+header.edges.offset, header.edges.size,
			bspData+header.ledges.offset, header.ledges.size);

	// Create vao for face data
	glGenVertexArrays(1, &bsp->vaoId);
	glBindVertexArray(bsp->vaoId);
	glEnableVertexAttribArray(0);
	glEnableVertexAttribArray(1);
	return bsp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x94(%rbp), %rdi
movl $0x7c, %edx
callq 0x10d0
cmpl $0x1d, -0x94(%rbp)
je 0x6487
movl -0x94(%rbp), %edx
leaq 0x347e(%rip), %rdi      # 0x98ec
movl $0x1d, %esi
movb $0x0, %al
callq 0x1040
movq $0x0, -0x8(%rbp)
jmp 0x6592
movl $0x38, %edi
callq 0x1170
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x80(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x65a0
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x78(%rbp), %rax
addq %rax, %rsi
movl -0x74(%rbp), %edx
callq 0x6670
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x88(%rbp), %rax
addq %rax, %rsi
movl -0x84(%rbp), %edx
callq 0x66c0
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x60(%rbp), %rax
addq %rax, %rsi
movl -0x5c(%rbp), %edx
callq 0x6710
movq -0xa0(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x58(%rbp), %rax
addq %rax, %rsi
movl -0x54(%rbp), %edx
movq -0x10(%rbp), %rcx
movslq -0x30(%rbp), %rax
addq %rax, %rcx
movl -0x2c(%rbp), %r8d
movq -0x10(%rbp), %r9
movslq -0x28(%rbp), %rax
addq %rax, %r9
movl -0x24(%rbp), %eax
movl %eax, (%rsp)
callq 0x6760
leaq 0x6378(%rip), %rax      # 0xc8c0
movq (%rax), %rax
movq -0xa0(%rbp), %rsi
movl $0x1, %edi
callq *%rax
leaq 0x62a0(%rip), %rax      # 0xc800
movq (%rax), %rax
movq -0xa0(%rbp), %rcx
movl (%rcx), %edi
callq *%rax
xorl %edi, %edi
leaq 0x5f91(%rip), %rax      # 0xc508
callq *(%rax)
movl $0x1, %edi
leaq 0x5f83(%rip), %rax      # 0xc508
callq *(%rax)
movq -0xa0(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nop