LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/main.c
// Function: terminateWindow
void
terminateWindow()
{
	glXMakeCurrent(dpy, None, None);
	glXDestroyContext(dpy, glContext);
	XDestroyWindow(dpy, window);
	XCloseDisplay(dpy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8d83(%rip), %rdi      # 0xb5a0
xorl %esi, %esi
xorl %edx, %edx
callq 0x2040
movq 0x8d73(%rip), %rdi      # 0xb5a0
movq 0x8da4(%rip), %rsi      # 0xb5d8
callq 0x2140
movq 0x8d60(%rip), %rdi      # 0xb5a0
movq 0x8d89(%rip), %rsi      # 0xb5d0
callq 0x21b0
movq 0x8d4d(%rip), %rdi      # 0xb5a0
popq %rbp
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/main.c
// Function: main
int
main(int argc, char *argv[])
{
	initWindow();
	startClock();
	initRenderingSystem();

	createWorld(32, 4, 32);

	running = 1;

	while(running) {
		double startProcess, endProcess;
		startProcess = getCurrentTimeNano();
		
		processCamera(1.0/60.0, 5.0/60.0);
		
		setCamera(cameraEye, cameraNormal, cameraLook);
		render(cameraPosition[0], cameraPosition[1], cameraPosition[2]);
		
		updateWindow();

		endProcess = getCurrentTimeNano();
		sleepNanosec((1.0 / FRAMES_PER_SEC) - (endProcess - startProcess));
	}
	terminateWindow();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
callq 0x23bc
xorl %eax, %eax
callq 0x4c28
xorl %eax, %eax
callq 0x4e90
pushq $0x4
popq %rsi
pushq $0x20
popq %rdi
movl %edi, %edx
callq 0x67da
movb $0x1, 0x89ba(%rip)      # 0xb5e0
leaq 0x8a1b(%rip), %rbx      # 0xb648
leaq 0x85c8(%rip), %r14      # 0xb1fc
leaq 0x8a19(%rip), %r15      # 0xb654
xorl %eax, %eax
callq 0x4c57
movsd %xmm0, -0x20(%rbp)
movss 0x43d5(%rip), %xmm0     # 0x7024
movss 0x43d1(%rip), %xmm1     # 0x7028
callq 0x2859
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5b12
movss 0x857e(%rip), %xmm0     # 0xb1f0
movss 0x857a(%rip), %xmm1     # 0xb1f4
movss 0x8576(%rip), %xmm2     # 0xb1f8
callq 0x5939
callq 0x267a
xorl %eax, %eax
callq 0x4c57
movsd -0x20(%rbp), %xmm1
subsd %xmm0, %xmm1
addsd 0x436c(%rip), %xmm1     # 0x7010
movapd %xmm1, %xmm0
callq 0x4ca0
cmpb $0x0, 0x892c(%rip)      # 0xb5e0
jne 0x2c3b
callq 0x2812
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/glutil.c
// Function: loadShader
unsigned int
loadShader(const char *path, unsigned int type)
{
	char *fileData;
	int   size;

	FILE *fp = fopen(path, "r");
	if(!fp) {
		printf("Could not open the shader %s\n", path);
		return -1;
	}
	fseek(fp, 0, SEEK_END);
	size = ftell(fp);
	fseek(fp, 0, SEEK_SET);
	fileData = malloc(size);
	fread(fileData, 1, size, fp);
	fclose(fp);

	unsigned int shader = glCreateShader(type);
	glShaderSource(shader, 1, (const char* const*)&fileData, &size);
	glCompileShader(shader);
	
	int cmp;
	glGetShaderiv(shader, GL_COMPILE_STATUS, &cmp);
	if(!cmp) 
	{
		glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &cmp);
		char* data = malloc(cmp);
		glGetShaderInfoLog(shader, cmp, &cmp, data);
		printf("Shader compilation failure! Shader path: %s\nLog: %s\n", path, data);
		free(data);
	}
	
	free(fileData);
	return shader;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x45d0(%rip), %rsi      # 0x72b6
callq 0x2120
testq %rax, %rax
je 0x2dfb
movq %rax, %r15
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x20b0
movq %r15, %rdi
callq 0x2070
movq %rax, %r13
leaq -0x30(%rbp), %rax
movl %r13d, (%rax)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x20b0
movslq %r13d, %r13
movq %r13, %rdi
callq 0x2110
leaq -0x38(%rbp), %r12
movq %rax, (%r12)
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x2230
movq %r15, %rdi
callq 0x2260
leaq 0x8afb(%rip), %rax      # 0xb850
movl %r14d, %edi
callq *(%rax)
movl %eax, %r14d
leaq 0x906c(%rip), %rax      # 0xbdd0
pushq $0x1
popq %rsi
movl %r14d, %edi
movq %r12, %rdx
leaq -0x30(%rbp), %rcx
callq *(%rax)
leaq 0x8a66(%rip), %rax      # 0xb7e0
movl %r14d, %edi
callq *(%rax)
leaq 0x8dba(%rip), %r12      # 0xbb40
leaq -0x2c(%rbp), %r15
movl %r14d, %edi
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r12)
cmpl $0x0, (%r15)
jne 0x2df0
movl %r14d, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r15, %rdx
callq *(%r12)
movl (%r15), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x2110
movq %rax, %r13
leaq 0x8d6a(%rip), %rax      # 0xbb30
movl %r14d, %edi
movl %r12d, %esi
movq %r15, %rdx
movq %r13, %rcx
callq *(%rax)
leaq 0x43b0(%rip), %rdi      # 0x718b
movq %rbx, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2060
movq %r13, %rdi
callq 0x2190
movq -0x38(%rbp), %rdi
callq 0x2190
jmp 0x2e10
leaq 0x436b(%rip), %rdi      # 0x716d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2060
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/glutil.c
// Function: createProgram
unsigned int
createProgram(unsigned int shaders[])
{
	unsigned int* shaderPtr = shaders;
	unsigned int program = glCreateProgram();

	while(*shaderPtr) {
		glAttachShader(program, *shaderPtr);
		shaderPtr++;
	}

	glLinkProgram(program);
	shaderPtr = shaders;

	while(*shaderPtr) {
		glDetachShader(program, *shaderPtr);
		shaderPtr++;
	}

	return program;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8a11(%rip), %rax      # 0xb848
callq *(%rax)
movl %eax, %r14d
leaq 0x885d(%rip), %r15      # 0xb6a0
movq %rbx, %r12
movl (%r12), %esi
testl %esi, %esi
je 0x2e5a
movl %r14d, %edi
callq *(%r15)
addq $0x4, %r12
jmp 0x2e46
leaq 0x8e0f(%rip), %rax      # 0xbc70
movl %r14d, %edi
callq *(%rax)
leaq 0x8a5b(%rip), %r15      # 0xb8c8
movl (%rbx), %esi
testl %esi, %esi
je 0x2e7f
movl %r14d, %edi
callq *(%r15)
addq $0x4, %rbx
jmp 0x2e6d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/glutil.c
// Function: loadTextureFarbfeld
unsigned int
loadTextureFarbfeld(const char *path)
{
	unsigned int w, h;
	unsigned short *imageData = getFarbfeldImageData(path, &w, &h);
	if((intptr_t)imageData < 0) {
		return -2;
	}

	unsigned int texture;
	glGenTextures(1, &texture); 
	glBindTexture(GL_TEXTURE_2D, texture);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, w, h, 0, GL_RGBA, GL_UNSIGNED_SHORT, imageData);
	glBindTexture(GL_TEXTURE_2D, 0);
	
	free(imageData);
	return texture;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq -0x28(%rbp), %rsi
leaq -0x24(%rbp), %rdx
callq 0x4d84
testq %rax, %rax
jns 0x2eb4
pushq $-0x2
popq %rax
jmp 0x2f50
movq %rax, %rbx
leaq 0x8b2a(%rip), %rax      # 0xb9e8
pushq $0x1
popq %rdi
leaq -0x2c(%rbp), %r14
movq %r14, %rsi
callq *(%rax)
leaq 0x8837(%rip), %r15      # 0xb708
movl (%r14), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *(%r15)
leaq 0x8fb5(%rip), %r12      # 0xbe98
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2600, %edx           # imm = 0x2600
callq *(%r12)
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2600, %edx           # imm = 0x2600
callq *(%r12)
leaq 0x8f48(%rip), %rax      # 0xbe58
movl -0x28(%rbp), %ecx
movl -0x24(%rbp), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x8058, %edx           # imm = 0x8058
xorl %r9d, %r9d
pushq %rbx
pushq $0x1403                 # imm = 0x1403
pushq $0x1908                 # imm = 0x1908
callq *(%rax)
addq $0x20, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
callq *(%r15)
movq %rbx, %rdi
callq 0x2190
movl (%r14), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/util.c
// Function: sleepNanosec
void
sleepNanosec(double time)
{
	struct timespec sleepTime;
	struct timespec sleptTime;

	sleepTime.tv_sec  = (unsigned long long)floor(time);
	sleepTime.tv_nsec = (time - sleepTime.tv_sec) * 1000000000.0;

	nanosleep(&sleepTime, &sleptTime);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd %xmm0, -0x8(%rbp)
callq 0x2270
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3efa(%rip), %xmm0     # 0x8bc0
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
cvtsi2sd %rdx, %xmm0
leaq -0x28(%rbp), %rdi
movsd -0x8(%rbp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x3ecd(%rip), %xmm1     # 0x8bb8
movq %rdx, (%rdi)
cvttsd2si %xmm1, %rax
movq %rax, 0x8(%rdi)
leaq -0x18(%rbp), %rsi
callq 0x2240
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/util.c
// Function: getFarbfeldImageData
unsigned short *
getFarbfeldImageData(const char *path, unsigned int *wi, unsigned int *hi)
{
	char header[9];
	unsigned int w, h;
	unsigned short *imageData;
	
	FILE *fp = fopen(path, "r");
	if(!fp) {
		printf("Could not open the image: %s\n", path);
		return (unsigned short*)-1;
	}

	fread(header, 8, 1, fp);

	fread(&w, sizeof(w), 1, fp);
	fread(&h, sizeof(h), 1, fp);

	w = bigEndianToHost32(w);
	h = bigEndianToHost32(h);

	imageData = malloc(4 * w * h * sizeof(short));
	fread(imageData, 1, sizeof(short) * w * h * 4, fp);
	
	for(unsigned int i = 0; i < w * h * 4; i++) {
		imageData[i] = bigEndianToHost16(imageData[i]);
	}
	*wi = w;
	*hi = h;
	fclose(fp);
	return imageData;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq 0x2511(%rip), %rsi      # 0x72b6
callq 0x2120
testq %rax, %rax
je 0x4e68
movq %rax, %r15
movq %r14, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
leaq -0x49(%rbp), %rdi
pushq $0x8
popq %rsi
pushq $0x1
popq %r12
movq %r12, %rdx
movq %rax, %rcx
callq 0x2230
leaq -0x40(%rbp), %r13
pushq $0x4
popq %rbx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x2230
leaq -0x3c(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x2230
movl (%r13), %r12d
bswapl %r12d
movl (%r14), %r14d
bswapl %r14d
movl %r12d, %ebx
imull %r14d, %ebx
shll $0x2, %ebx
leaq (%rbx,%rbx), %rdi
callq 0x2110
movq %rax, %r13
movq %r14, %rdx
imulq %r12, %rdx
shlq $0x3, %rdx
movq %rax, %rdi
pushq $0x1
popq %rsi
movq %r15, %rcx
callq 0x2230
xorl %eax, %eax
cmpq %rax, %rbx
je 0x4e50
rolw $0x8, (%r13,%rax,2)
incq %rax
jmp 0x4e3f
movq -0x30(%rbp), %rax
movl %r12d, (%rax)
movq -0x38(%rbp), %rax
movl %r14d, (%rax)
movq %r15, %rdi
callq 0x2260
jmp 0x4e7d
leaq 0x3d76(%rip), %rdi      # 0x8be5
movq %r12, %rsi
xorl %eax, %eax
callq 0x2060
pushq $-0x1
popq %r13
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/./linmath.h
// Function: mat4x4_identity
LINMATH_H_FUNC void mat4x4_identity(mat4x4 M)
{
	int i, j;
	for(i=0; i<4; ++i)
		for(j=0; j<4; ++j)
			M[i][j] = i==j ? 1.f : 0.f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movss 0x1e20(%rip), %xmm0     # 0x7018
cmpq $0x4, %rax
je 0x5224
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0x521b
movaps %xmm0, %xmm1
cmpq %rcx, %rax
je 0x5211
xorps %xmm1, %xmm1
movss %xmm1, (%rdi,%rcx,4)
incq %rcx
jmp 0x5200
incq %rax
addq $0x10, %rdi
jmp 0x51f8
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/rendering.c
// Function: resizeRenderingSystem
void
resizeRenderingSystem(int w, int h)
{
	printf("Resizing to %dx%d (aspect: %f\n", w, h, (float)w/h);
	mat4x4_perspective(projectionMatrix, TO_RADIANS(70.0), (float)w/h, 0.01, 1000.0);
	glUseProgram(cubeRenderingShader);
	glUniformMatrix4fv(cubeUniformProjectionLocation, 1, GL_FALSE, &projectionMatrix[0][0]);
	glUseProgram(0);

	glViewport(0, 0, w, h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edi, %ebx
cvtsi2ss %edi, %xmm1
movl %esi, %r14d
cvtsi2ss %esi, %xmm0
divss %xmm0, %xmm1
movss %xmm1, -0x24(%rbp)
cvtss2sd %xmm1, %xmm0
leaq 0x3d6b(%rip), %rdi      # 0x8fc1
movl %ebx, %esi
movl %r14d, %edx
movb $0x1, %al
callq 0x2060
movss 0x39d6(%rip), %xmm0     # 0x8c40
divss -0x24(%rbp), %xmm0
movss %xmm0, 0x7029(%rip)     # 0xc2a0
leaq 0x7022(%rip), %r15      # 0xc2a0
xorps %xmm0, %xmm0
movups %xmm0, 0x701c(%rip)     # 0xc2a4
movl $0x3fb6cd8e, 0x7022(%rip) # imm = 0x3FB6CD8E
movups %xmm0, 0x701f(%rip)     # 0xc2b8
movsd 0x397f(%rip), %xmm0     # 0x8c20
movups %xmm0, 0x7020(%rip)     # 0xc2c8
movl $0xbca3d776, %eax       # imm = 0xBCA3D776
movq %rax, 0x7024(%rip)      # 0xc2d8
leaq 0x6d25(%rip), %r12      # 0xbfe0
movl 0x6fbf(%rip), %edi      # 0xc280
callq *(%r12)
leaq 0x6cf4(%rip), %rax      # 0xbfc0
movl 0x6fba(%rip), %edi      # 0xc28c
pushq $0x1
popq %rsi
xorl %edx, %edx
movq %r15, %rcx
callq *(%rax)
xorl %edi, %edi
callq *(%r12)
leaq 0x6f4f(%rip), %rax      # 0xc238
movq (%rax), %rax
xorl %edi, %edi
xorl %esi, %esi
movl %ebx, %edx
movl %r14d, %ecx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/rendering.c
// Function: generateChunkModelAroundPos
void 
generateChunkModelAroundPos(int x, int y, int z, unsigned int distance)
{
	int chunks = distance;
	x = x / WORLD_CHUNK_SIZE;
	y = y / WORLD_CHUNK_SIZE;
	z = z / WORLD_CHUNK_SIZE;

	for(int xc = x - chunks; xc < x + chunks; xc++) {
		for(int yc = y - chunks; yc < y + chunks; yc++) {
			for(int zc = z - chunks; zc < z + chunks; zc++) {
				const WorldChunk* chunk = getWorldChunk(xc, yc, zc);
				if(chunk == NULL) 
					continue;
				generateChunkModel(xc, yc, zc);
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r8d
movl %edi, %eax
pushq $0x10
popq %rdi
cltd
idivl %edi
movl %eax, %r9d
movl %esi, %eax
cltd
idivl %edi
movl %eax, %esi
movl %r8d, %eax
cltd
idivl %edi
movl %eax, %r15d
movl %r9d, %r12d
subl %ecx, %r12d
addl %ecx, %r9d
movl %r9d, -0x30(%rbp)
movl %esi, %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
addl %ecx, %esi
movl %esi, -0x34(%rbp)
movl %r15d, %r14d
subl %ecx, %r14d
addl %ecx, %r15d
movl -0x2c(%rbp), %r13d
cmpl -0x30(%rbp), %r12d
jge 0x592a
movl %r14d, %ebx
cmpl -0x34(%rbp), %r13d
jge 0x5925
cmpl %r15d, %ebx
jge 0x5920
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0x69ec
testq %rax, %rax
je 0x591c
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0x5303
incl %ebx
jmp 0x58f8
incl %r13d
jmp 0x58ef
incl %r12d
jmp 0x58e5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/rendering.c
// Function: isChunkInsideRenderBoundry
unsigned char 
isChunkInsideRenderBoundry(ChunkBufferData* bData, int x, int y, int z, int bDistance)
{
	x = x / WORLD_CHUNK_SIZE;
	y = y / WORLD_CHUNK_SIZE;
	z = z / WORLD_CHUNK_SIZE;

	int xd = abs((int)bData->xOffset - x);
	int yd = abs((int)bData->yOffset - y);
	int zd = abs((int)bData->zOffset - z);
	
	return xd < bDistance && yd < bDistance && zd < bDistance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %ecx, %r9d
movl %edx, %ecx
movl %esi, %eax
movl $0xfffffff0, %r10d      # imm = 0xFFFFFFF0
cltd
idivl %r10d
movl %eax, %esi
movl %r9d, %eax
cltd
idivl %r10d
addl 0xc(%rdi), %esi
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
addl 0x14(%rdi), %eax
movl %eax, %esi
negl %esi
cmovsl %eax, %esi
cmpl %r8d, %edx
jge 0x5b0e
movl %ecx, %eax
cltd
idivl %r10d
addl 0x10(%rdi), %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl %r8d, %ecx
jae 0x5b0e
cmpl %r8d, %esi
setb %al
jmp 0x5b10
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/./stb_perlin.h
// Function: stb_perlin_ridge_noise3
float stb_perlin_ridge_noise3(float x, float y, float z, float lacunarity, float gain, float offset, int octaves)
{
   int i;
   float frequency = 1.0f;
   float prev = 1.0f;
   float amplitude = 0.5f;
   float sum = 0.0f;

   for (i = 0; i < octaves; i++) {
      float r = stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i);
      r = offset - (float) fabs(r);
      r = r*r;
      sum += r*amplitude*prev;
      prev = r;
      frequency *= lacunarity;
      amplitude *= gain;
   }
   return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edi, %ebx
movss %xmm5, -0x30(%rbp)
movss %xmm4, -0x2c(%rbp)
movss %xmm3, -0x28(%rbp)
movss %xmm2, -0x24(%rbp)
movss %xmm1, -0x20(%rbp)
movss %xmm0, -0x1c(%rbp)
xorl %r14d, %r14d
testl %edi, %edi
cmovlel %r14d, %ebx
xorps %xmm0, %xmm0
movss 0x2e45(%rip), %xmm3     # 0x8ff0
movss 0xe65(%rip), %xmm2      # 0x7018
movaps %xmm2, %xmm1
cmpl %r14d, %ebx
je 0x624b
movss %xmm0, -0x14(%rbp)
movaps %xmm2, %xmm0
mulss -0x1c(%rbp), %xmm0
movss %xmm1, -0x34(%rbp)
movaps %xmm2, %xmm1
mulss -0x20(%rbp), %xmm1
movss %xmm2, -0x18(%rbp)
movss -0x18(%rbp), %xmm2
mulss -0x24(%rbp), %xmm2
movzbl %r14b, %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movss %xmm3, -0x38(%rbp)
callq 0x5dd8
movss -0x38(%rbp), %xmm3
andps 0x2df8(%rip), %xmm0     # 0x9000
movss -0x30(%rbp), %xmm1
subss %xmm0, %xmm1
mulss %xmm1, %xmm1
movaps %xmm3, %xmm0
mulss %xmm1, %xmm0
mulss -0x34(%rbp), %xmm0
movss -0x14(%rbp), %xmm2
addss %xmm0, %xmm2
movss %xmm2, -0x14(%rbp)
movss -0x18(%rbp), %xmm2
movss -0x14(%rbp), %xmm0
mulss -0x28(%rbp), %xmm2
mulss -0x2c(%rbp), %xmm3
incl %r14d
jmp 0x61b6
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/./stb_perlin.h
// Function: stb_perlin_fbm_noise3
float stb_perlin_fbm_noise3(float x, float y, float z, float lacunarity, float gain, int octaves)
{
   int i;
   float frequency = 1.0f;
   float amplitude = 1.0f;
   float sum = 0.0f;
   
   for (i = 0; i < octaves; i++) {
      sum += stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i)*amplitude;
      frequency *= lacunarity;
      amplitude *= gain;
   }
   return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
movss %xmm4, -0x2c(%rbp)
movss %xmm3, -0x28(%rbp)
movss %xmm2, -0x24(%rbp)
movss %xmm1, -0x20(%rbp)
xorl %r14d, %r14d
testl %edi, %edi
cmovlel %r14d, %ebx
movss %xmm0, -0x1c(%rbp)
xorps %xmm0, %xmm0
movss 0xd8a(%rip), %xmm1      # 0x7018
movaps %xmm1, %xmm2
cmpl %r14d, %ebx
je 0x6300
movss %xmm0, -0x18(%rbp)
movaps %xmm1, %xmm0
mulss -0x1c(%rbp), %xmm0
movss %xmm1, -0x14(%rbp)
movss -0x14(%rbp), %xmm1
mulss -0x20(%rbp), %xmm1
movss %xmm2, -0x30(%rbp)
movss -0x14(%rbp), %xmm2
mulss -0x24(%rbp), %xmm2
movzbl %r14b, %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5dd8
movss -0x30(%rbp), %xmm2
mulss %xmm2, %xmm0
movss -0x18(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x18(%rbp)
movss -0x14(%rbp), %xmm1
movss -0x18(%rbp), %xmm0
mulss -0x28(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm2
incl %r14d
jmp 0x6291
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/./stb_perlin.h
// Function: stb_perlin_turbulence_noise3
float stb_perlin_turbulence_noise3(float x, float y, float z, float lacunarity, float gain, int octaves)
{
   int i;
   float frequency = 1.0f;
   float amplitude = 1.0f;
   float sum = 0.0f;
   
   for (i = 0; i < octaves; i++) {
      float r = stb_perlin_noise3_internal(x*frequency,y*frequency,z*frequency,0,0,0,(unsigned char)i)*amplitude;
      sum += (float) fabs(r);
      frequency *= lacunarity;
      amplitude *= gain;
   }
   return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
movss %xmm4, -0x2c(%rbp)
movss %xmm3, -0x28(%rbp)
movss %xmm2, -0x24(%rbp)
movss %xmm1, -0x20(%rbp)
movss %xmm0, -0x1c(%rbp)
xorl %r14d, %r14d
testl %edi, %edi
cmovlel %r14d, %ebx
xorps %xmm0, %xmm0
movss 0xcd5(%rip), %xmm1      # 0x7018
movaps %xmm1, %xmm2
cmpl %r14d, %ebx
je 0x63bc
movss %xmm0, -0x18(%rbp)
movaps %xmm1, %xmm0
mulss -0x1c(%rbp), %xmm0
movss %xmm1, -0x14(%rbp)
movss -0x14(%rbp), %xmm1
mulss -0x20(%rbp), %xmm1
movss %xmm2, -0x30(%rbp)
movss -0x14(%rbp), %xmm2
mulss -0x24(%rbp), %xmm2
movzbl %r14b, %ecx
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5dd8
movss -0x30(%rbp), %xmm2
mulss %xmm2, %xmm0
andps 0x2c6b(%rip), %xmm0     # 0x9000
movss -0x18(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x18(%rbp)
movss -0x14(%rbp), %xmm1
movss -0x18(%rbp), %xmm0
mulss -0x28(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm2
incl %r14d
jmp 0x6346
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/world.c
// Function: createWorld
void
createWorld(unsigned int w, unsigned int h, unsigned int d)
{
	world.width  = w;
	world.height = h;
	world.depth  = d;
	world.seed    = getTimeNanoseconds();
	
	world.cachedChunks = malloc(sizeof(WorldChunk) * w * h * d);
	
	for(unsigned int i = 0; i < w * h * d; i++) {
		unsigned int x = i % w;
		unsigned int y = (i / w) % h;
		unsigned int z = i / (w * h);

		world.cachedChunks[i].xOffset = x;
		world.cachedChunks[i].yOffset = y;
		world.cachedChunks[i].zOffset = z;
		
		generateChunk(&world.cachedChunks[i], x, y, z, world.seed);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r12d
movl %esi, %r14d
movl %edi, %r15d
movl %edi, 0x7789(%rip)      # 0xdf80
movl %esi, 0x7787(%rip)      # 0xdf84
movl %edx, 0x7785(%rip)      # 0xdf88
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x4d06
movq %rax, 0x777c(%rip)      # 0xdf90
movl %r15d, %eax
movl %r14d, %ecx
imulq %rax, %rcx
movl %r12d, %eax
imulq %rcx, %rax
imulq $0x4010, %rax, %rdi     # imm = 0x4010
callq 0x2110
movq %rax, 0x7760(%rip)      # 0xdf98
movl %r14d, -0x2c(%rbp)
movl %r15d, %ebx
imull %r15d, %r14d
imull %r14d, %r12d
movq %r12, %r15
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x689f
movl %r12d, %eax
xorl %edx, %edx
divl %ebx
movl %edx, %esi
xorl %edx, %edx
divl -0x2c(%rbp)
movl %edx, %ecx
movl %r12d, %eax
xorl %edx, %edx
divl %r14d
movq 0x7727(%rip), %rdx      # 0xdf98
leaq (%rdx,%r13), %rdi
movl %esi, (%rdx,%r13)
movl %ecx, 0x4(%rdx,%r13)
movl %eax, 0x8(%rdx,%r13)
movl 0x7706(%rip), %r8d      # 0xdf90
movl %ecx, %edx
movl %eax, %ecx
callq 0x68ae
incq %r12
addq $0x4010, %r13           # imm = 0x4010
jmp 0x684d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/world.c
// Function: generateChunk
void
generateChunk(WorldChunk *chunk, unsigned int xc, unsigned int yc, unsigned int zc, unsigned int seed)
{
	for(int i = 0; i < WORLD_CHUNK_NBLOCKS; i++) {
		int xb = (i % WORLD_CHUNK_SIZE);
		int yb = (i / WORLD_CHUNK_SIZE) % WORLD_CHUNK_SIZE;
		int zb = (i / (WORLD_CHUNK_SIZE * WORLD_CHUNK_SIZE));

		float height = stb_perlin_noise3_seed((float)(xb + xc * WORLD_CHUNK_SIZE) / WORLD_CHUNK_SIZE, 
				0, 
				(float)(zb + zc * WORLD_CHUNK_SIZE) / WORLD_CHUNK_SIZE,
				0, 0, 0, seed) * 4.0 + 16;

		int heightInt = floor(height * height) / 16;

		if(yb + yc * WORLD_CHUNK_SIZE == heightInt) 
			chunk->blocks[xb][yb][zb] = 1;
		else if(yb + yc * WORLD_CHUNK_SIZE > heightInt - 4 && yb + yc * WORLD_CHUNK_SIZE < heightInt)
			chunk->blocks[xb][yb][zb] = 2;
		else if(yb + yc * WORLD_CHUNK_SIZE <= heightInt - 4)
			chunk->blocks[xb][yb][zb] = 3;
		else
			chunk->blocks[xb][yb][zb] = 0;

		if (yb + yc * WORLD_CHUNK_SIZE <= heightInt) {
			chunk->numBlocks++;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
shll $0x4, %esi
movl %esi, -0x2c(%rbp)
shll $0x4, %ecx
movl %ecx, -0x34(%rbp)
shll $0x4, %edx
movl %edx, -0x30(%rbp)
movq %rdi, -0x48(%rbp)
leaq 0xc(%rdi), %rax
movq %rax, -0x40(%rbp)
xorl %r15d, %r15d
movzbl %r8b, %r13d
cmpl $0x1000, %r15d          # imm = 0x1000
je 0x69dd
movl %r15d, %r14d
andl $0xf, %r14d
movl %r15d, %ebx
shrl $0x4, %ebx
andl $0xf, %ebx
movl %r15d, %r12d
movl %r14d, %eax
orl -0x2c(%rbp), %eax
cvtsi2ss %rax, %xmm0
shrl $0x8, %r12d
movss 0x26d9(%rip), %xmm1     # 0x8ff4
mulss %xmm1, %xmm0
movl %r12d, %eax
orl -0x34(%rbp), %eax
cvtsi2ss %rax, %xmm2
mulss %xmm1, %xmm2
xorps %xmm1, %xmm1
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
movl %r13d, %ecx
callq 0x5dd8
cvtss2sd %xmm0, %xmm0
mulsd 0x26c5(%rip), %xmm0     # 0x9010
addsd 0x26c5(%rip), %xmm0     # 0x9018
cvtsd2ss %xmm0, %xmm0
mulss %xmm0, %xmm0
callq 0x21e0
cvtss2sd %xmm0, %xmm0
mulsd 0x26b4(%rip), %xmm0     # 0x9020
cvttsd2si %xmm0, %eax
movl %ebx, %ecx
orl -0x30(%rbp), %ecx
movl %r12d, %edx
cmpl %eax, %ecx
jne 0x6993
shll $0xa, %r14d
addq -0x40(%rbp), %r14
shll $0x6, %ebx
addq %r14, %rbx
movl $0x1, (%rbx,%rdx,4)
jmp 0x69c7
leal -0x4(%rax), %esi
shll $0xa, %r14d
addq -0x40(%rbp), %r14
shll $0x6, %ebx
addq %r14, %rbx
leaq (%rbx,%rdx,4), %rdx
cmpl %eax, %ecx
jae 0x69b8
cmpl %esi, %ecx
jbe 0x69b8
movl $0x2, (%rdx)
jmp 0x69c7
cmpl %esi, %ecx
jbe 0x69c1
andl $0x0, (%rdx)
jmp 0x69c7
movl $0x3, (%rdx)
cmpl %eax, %ecx
ja 0x69d5
movq -0x48(%rbp), %rax
incl 0x400c(%rax)
incl %r15d
jmp 0x68e4
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/world.c
// Function: getWorldBlock
unsigned int
getWorldBlock(int xB, int yB, int zB)
{
	const WorldChunk* chunk = getWorldChunk(xB / WORLD_CHUNK_SIZE, yB / WORLD_CHUNK_SIZE, zB / WORLD_CHUNK_SIZE);
	if(chunk == NULL)
		return 0;
	return chunk->blocks[xB % WORLD_CHUNK_SIZE][yB % WORLD_CHUNK_SIZE][zB % WORLD_CHUNK_SIZE];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ecx
movl %edi, %eax
pushq $0x10
popq %r8
cltd
idivl %r8d
movl %edx, %ebx
movl %eax, %edi
movl %esi, %eax
cltd
idivl %r8d
movl %edx, %r14d
movl %eax, %esi
movl %ecx, %eax
cltd
idivl %r8d
movl %edx, %r15d
movl %eax, %edx
callq 0x69ec
testq %rax, %rax
je 0x6a9d
movslq %ebx, %rcx
shlq $0xa, %rcx
movslq %r14d, %rdx
movslq %r15d, %rsi
shlq $0x6, %rdx
addq %rcx, %rdx
addq %rdx, %rax
movl 0xc(%rax,%rsi,4), %eax
jmp 0x6a9f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/aabb.c
// Function: checkCollision
AABBCollisionBit
checkCollision(const AABBCollisor *a, const AABBCollisor *b)
{
	AABBCollisionBit xState = a->x + a->w >= b->x && b->x + b->w >= a->x;
	AABBCollisionBit yState = a->y + a->h >= b->y && b->y + b->h >= a->y;
	AABBCollisionBit zState = a->z + a->d >= b->z && b->z + b->d >= a->z;

	return xState && yState && zState;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm0
movss 0xc(%rdi), %xmm2
addss %xmm0, %xmm2
movss (%rsi), %xmm1
ucomiss %xmm1, %xmm2
jae 0x6aca
xorl %ecx, %ecx
jmp 0x6ad5
addss 0xc(%rsi), %xmm1
ucomiss %xmm0, %xmm1
setae %cl
movss 0x4(%rdi), %xmm0
movss 0x10(%rdi), %xmm2
addss %xmm0, %xmm2
movss 0x4(%rsi), %xmm1
ucomiss %xmm1, %xmm2
jae 0x6af1
xorl %edx, %edx
jmp 0x6afc
addss 0x10(%rsi), %xmm1
ucomiss %xmm0, %xmm1
setae %dl
movss 0x8(%rdi), %xmm0
movss 0x14(%rdi), %xmm2
addss %xmm0, %xmm2
movss 0x8(%rsi), %xmm1
xorl %eax, %eax
ucomiss %xmm1, %xmm2
movl $0x0, %edi
jb 0x6b27
addss 0x14(%rsi), %xmm1
ucomiss %xmm0, %xmm1
setae %dil
movzbl %dil, %esi
testb %dl, %cl
cmovnel %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/aabb.c
// Function: checkCollisionWorld
AABBCollisionBit
checkCollisionWorld(const AABBCollisor* a)
{
	int xInt = (int)a->x;
	int yInt = (int)a->y;
	int zInt = (int)a->z;
	
	int wInt = (int)a->w;
	int hInt = (int)a->h;
	int dInt = (int)a->d;

	union {
		struct {
			unsigned int topLeftBackBlock;   
			unsigned int topRightBackBlock;
			unsigned int topLeftFrontBlock;    
			unsigned int topRightFrontBlock;   
			unsigned int bottomLeftBackBlock;  
			unsigned int bottomRightBackBlock; 
			unsigned int bottomLeftFrontBlock;
			unsigned int bottomRightFrontBlock;
		};
		unsigned int data[8];
	} blocks;

	blocks.topLeftBackBlock      = getWorldBlock(xInt, yInt + hInt, zInt);
	blocks.topRightBackBlock     = getWorldBlock(xInt + wInt, yInt + hInt, zInt);
	blocks.topLeftFrontBlock     = getWorldBlock(xInt, yInt + hInt, zInt + dInt);
	blocks.topRightFrontBlock    = getWorldBlock(xInt + wInt, yInt + hInt, zInt + dInt);
	blocks.bottomLeftBackBlock   = getWorldBlock(xInt, yInt, zInt);
	blocks.bottomRightBackBlock  = getWorldBlock(xInt + wInt, yInt, zInt);
	blocks.bottomLeftFrontBlock  = getWorldBlock(xInt, yInt, zInt + dInt);
	blocks.bottomRightFrontBlock = getWorldBlock(xInt + wInt, yInt, zInt + dInt);

	for(unsigned int i = 0; i < 8; i++) {
		if(blocks.data[i] != 0)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cvttss2si (%rdi), %r12d
cvttss2si 0x4(%rdi), %eax
movl %eax, -0x2c(%rbp)
cvttss2si 0x8(%rdi), %r13d
cvttss2si 0xc(%rdi), %r14d
cvttss2si 0x10(%rdi), %ebx
cvttss2si 0x14(%rdi), %r15d
addl %eax, %ebx
movl %r12d, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0x6a46
movl %eax, -0x4c(%rbp)
addl %r12d, %r14d
movl %r14d, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0x6a46
movl %eax, -0x48(%rbp)
addl %r13d, %r15d
movl %r12d, %edi
movl %ebx, %esi
movl %r15d, %edx
callq 0x6a46
movl %eax, -0x44(%rbp)
movl %r14d, %edi
movl %ebx, %esi
movl %r15d, %edx
callq 0x6a46
movl %eax, -0x40(%rbp)
movl %r12d, %edi
movl -0x2c(%rbp), %ebx
movl %ebx, %esi
movl %r13d, %edx
callq 0x6a46
movl %eax, -0x3c(%rbp)
movl %r14d, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0x6a46
movl %eax, -0x38(%rbp)
movl %r12d, %edi
movl %ebx, %esi
movl %r15d, %edx
callq 0x6a46
movl %eax, -0x34(%rbp)
movl %r14d, %edi
movl %ebx, %esi
movl %r15d, %edx
callq 0x6a46
movl %eax, -0x30(%rbp)
xorl %ecx, %ecx
movq %rcx, %rax
cmpq $0x8, %rcx
je 0x6c08
leaq 0x1(%rax), %rcx
cmpl $0x0, -0x4c(%rbp,%rax,4)
je 0x6bf4
cmpq $0x8, %rax
setb %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.4/primes.c
// Function: compute_prime
void* compute_prime (void* arg)
{
	int candidate = 2;
	int n = *((int*) arg);
	while (1) {
		int factor;
		int is_prime = 1;
		/* Test primality by successive division. */
		for (factor = 2; factor < candidate; ++factor)
			if (candidate % factor == 0) {
				is_prime = 0;
				break;
			}
			/* Is this the prime number we’re looking for? */
		if (is_prime) {
			if (--n == 0) //retornar el numero primo deseado como el return del thread
				return (void*) candidate;
		}
		++candidate;
	}
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %esi
movl $0x2, %edi
xorl %r8d, %r8d
movl %edi, %ecx
movl %edi, %r9d
leal (%r8,%r9), %eax
cmpl $0x2, %eax
je 0x1188
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
incl %r9d
testl %edx, %edx
jne 0x116f
jmp 0x118c
decl %esi
je 0x1193
incl %ecx
decl %r8d
jmp 0x116c
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.4/primes.c
// Function: main
int main ()
{
	pthread_t thread;
	int which_prime = 100, n = 30, i;
	int prime;
	/* Start the computing thread, up to the 5,000th prime number. */
	pthread_create (&thread, NULL, &compute_prime, &which_prime);
	/* Do some other work here... */
  //Hacer otro trabajo mientras el otro hilo realiza el suyo
  //Por ejemplo calcular el fibonacci de un numero
	int fibonacci[n + 1];
  //Definicion de los caso base
	fibonacci[1] = 1;
	fibonacci[2] = 1;
  //calculo del enesimo fibonacci en este caso 100
	for(i = 3; i <= n; ++i){
		fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2];
	}

	printf("Fibonacci de %d es : %d\n", n, fibonacci[n]);

	/* Wait for the prime number thread to complete, and get the result.*/
	pthread_join (thread, (void*) &prime);
	/* Print the largest prime it computed. */
	printf("El %dth numero primo es %d.\n", which_prime, prime);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
leaq -0x14(%rbp), %rcx
movl $0x64, (%rcx)
leaq -0x5a(%rip), %rdx       # 0x115c
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x1040
movq %rsp, %r14
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, -0x9c(%rbp)
pushq $0x3
popq %rax
cmpq $0x1f, %rax
je 0x11f8
movl -0xa8(%rbp,%rax,4), %ecx
addl -0xa4(%rbp,%rax,4), %ecx
movl %ecx, -0xa0(%rbp,%rax,4)
incq %rax
jmp 0x11d8
movl -0x28(%rbp), %edx
leaq 0xe02(%rip), %rdi       # 0x2004
pushq $0x1e
popq %rsi
xorl %eax, %eax
callq 0x1030
movq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rbx
movq %rbx, %rsi
callq 0x1050
movl -0x14(%rbp), %esi
movl (%rbx), %edx
leaq 0xdf5(%rip), %rdi       # 0x201d
xorl %eax, %eax
callq 0x1030
movq %r14, %rsp
xorl %eax, %eax
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/aes128n8t8silcv2/ref/silc.c
// Function: ae_init
int ae_init(ae_cxt* cxt, const byte* userkey, int keylen)
{
	if(keylen != CRYPTO_KEYBYTES){
		return KEY_ERROR;
	}
	cxt->userkey = (byte*)userkey;
	cxt->pt_ekey = &(cxt->ekey);
	AES_set_encrypt_key(userkey, keylen*8, cxt->pt_ekey); /* set the encryption key */
	cxt->klen = keylen;

	return SUCCESS;
}

// Assembly:
cmpl $0x10, %edx
jne 0x31d2
pushq %rbx
movq %rdi, %rbx
movq %rsi, 0x120(%rdi)
leaq 0x20(%rdi), %rdx
movq %rdx, 0x118(%rdi)
movq %rsi, %rdi
movl $0x80, %esi
callq 0x1090
movl $0x10, 0x128(%rbx)
xorl %eax, %eax
popq %rbx
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/test_src/sljitMain.c
// Function: devel
void devel(void)
{
	executable_code code;
	struct sljit_compiler *compiler;
	long buf[4] = {5, 12, 0, 0};

	if ((compiler = sljit_create_compiler()) == NULL)
		errx(-1, "out of memory");

#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
	sljit_compiler_verbose(compiler, stdout);
#endif
	sljit_emit_enter(compiler, 0, 1, 4, 5, 4, 0, 2 * sizeof(long));

	sljit_emit_return(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0);

	code.code = sljit_generate_code(compiler);
	sljit_free_compiler(compiler);

	printf("Code at: %p\n", (void*)SLJIT_FUNC_OFFSET(code.code));

	printf("Function returned with %ld\n", (long)code.func((long*)buf));
	printf("buf[0] = %ld\n", (long)buf[0]);
	printf("buf[1] = %ld\n", (long)buf[1]);
	printf("buf[2] = %ld\n", (long)buf[2]);
	printf("buf[3] = %ld\n", (long)buf[3]);
	sljit_free_code(code.code);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movaps 0x1bdc6(%rip), %xmm0    # 0x1e020
movaps %xmm0, 0x20(%rsp)
movaps 0x1bdaa(%rip), %xmm0    # 0x1e010
movaps %xmm0, 0x10(%rsp)
callq 0x12b4c
testq %rax, %rax
je 0x2358
movq %rax, %r14
movq 0x27d5d(%rip), %rax     # 0x29fe0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x12d22
movl $0x10, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x1
popq %rbx
pushq $0x5
popq %r8
pushq $0x4
popq %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebx, %edx
movl %ecx, %r9d
callq 0x131c5
pushq $0x20
popq %rsi
movq %r14, %rdi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x137a2
movq %r14, %rdi
callq 0x12d2f
movq %rax, %rbx
movq %r14, %rdi
callq 0x12c23
leaq 0x1bd62(%rip), %rdi     # 0x1e03e
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2080
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq *%rbx
leaq 0x1bd54(%rip), %rdi     # 0x1e04b
movq %rax, %rsi
xorl %eax, %eax
callq 0x2080
movq (%r14), %rsi
leaq 0x1bd5c(%rip), %rdi     # 0x1e067
xorl %eax, %eax
callq 0x2080
movq 0x8(%r14), %rsi
leaq 0x1bd58(%rip), %rdi     # 0x1e075
xorl %eax, %eax
callq 0x2080
movq 0x10(%r14), %rsi
leaq 0x1bd54(%rip), %rdi     # 0x1e083
xorl %eax, %eax
callq 0x2080
movq 0x18(%r14), %rsi
leaq 0x1bd50(%rip), %rdi     # 0x1e091
xorl %eax, %eax
callq 0x2080
movq %rbx, %rdi
callq 0x12c65
addq $0x38, %rsp
popq %rbx
popq %r14
retq
leaq 0x1bcd1(%rip), %rsi     # 0x1e030
pushq $-0x1
popq %rdi
xorl %eax, %eax
callq 0x2070
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/test_src/sljitTest.c
// Function: cond_set
static void cond_set(struct sljit_compiler *compiler, int dst, long dstw, int type)
{
	/* Testing both sljit_emit_op_flags and sljit_emit_jump. */
	struct sljit_jump* jump;
	struct sljit_label* label;

	sljit_emit_op_flags(compiler, SLJIT_MOV, dst, dstw, SLJIT_UNUSED, 0, type);
	jump = sljit_emit_jump(compiler, type);
	sljit_emit_op2(compiler, SLJIT_ADD | SLJIT_KEEP_FLAGS, dst, dstw, dst, dstw, SLJIT_IMM, 2);
	label = sljit_emit_label(compiler);
	sljit_set_label(jump, label);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
subq $0x8, %rsp
pushq $0x20
popq %rsi
movl %ebp, %edx
movq %r15, %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %r14
callq 0x1b14f
popq %rcx
popq %rdx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1ab24
movq %rax, %r14
movq %rbx, %rdi
movl $0x4060, %esi           # imm = 0x4060
movl %ebp, %edx
movq %r15, %rcx
movl %ebp, %r8d
movq %r15, %r9
pushq $0x2
pushq $0x40
callq 0x16183
popq %rcx
popq %rdx
movq %rbx, %rdi
callq 0x1aa73
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12c6a
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/test_src/sljitTest.c
// Function: cmp_test
static int cmp_test(struct sljit_compiler *compiler, int type, int src1, long src1w, int src2, long src2w)
{
	/* 2 = true, 1 = false */
	struct sljit_jump* jump;
	struct sljit_label* label;

	if (sljit_emit_op1(compiler, SLJIT_MOVU_UB, SLJIT_MEM1(SLJIT_S0), 1, SLJIT_IMM, 2))
		return compiler->error;
	jump = sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
	if (!jump)
		return compiler->error;
	if (sljit_emit_op1(compiler, SLJIT_MOV_UB, SLJIT_MEM1(SLJIT_S0), 0, SLJIT_IMM, 1))
		return compiler->error;
	label = sljit_emit_label(compiler);
	if (!label)
		return compiler->error;
	sljit_set_label(jump, label);
	return SLJIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movl %r8d, %ebp
movq %rcx, %r15
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
pushq $0x29
popq %rsi
pushq $0x1
popq %rcx
pushq $0x40
popq %r8
pushq $0x2
popq %r9
movl $0x8c, %edx
callq 0x14ea5
testl %eax, %eax
je 0x126a5
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movq %r15, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x1c08a
testq %rax, %rax
je 0x12696
movq %rax, %r14
pushq $0x21
popq %rsi
pushq $0x40
popq %r8
pushq $0x1
popq %r9
movq %rbx, %rdi
movl $0x8c, %edx
xorl %ecx, %ecx
callq 0x14ea5
testl %eax, %eax
jne 0x12696
movq %rbx, %rdi
callq 0x1aa73
testq %rax, %rax
je 0x12696
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x12c6a
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitExecAllocator.c
// Function: sljit_remove_free_block
static __inline void sljit_remove_free_block(struct free_block *free_block)
{
	if (free_block->next)
		free_block->next->prev = free_block->prev;

	if (free_block->prev)
		free_block->prev->next = free_block->next;
	else {
		SLJIT_ASSERT(free_blocks == free_block);
		free_blocks = free_block->next;
	}
}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
testq %rax, %rax
je 0x1298f
movq %rcx, 0x18(%rax)
testq %rcx, %rcx
je 0x1299a
addq $0x10, %rcx
jmp 0x129aa
cmpq %rdi, 0x1777f(%rip)     # 0x2a120
jne 0x129ae
leaq 0x17776(%rip), %rcx     # 0x2a120
movq %rax, (%rcx)
retq
pushq %rax
leaq 0xe87c(%rip), %rdi      # 0x21232
movl $0xaa, %esi
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitExecAllocator.c
// Function: sljit_insert_free_block
static __inline void sljit_insert_free_block(struct free_block *free_block, unsigned long size)
{
	free_block->header.size = 0;
	free_block->size = size;

	free_block->next = free_blocks;
	free_block->prev = NULL;
	if (free_blocks)
		free_blocks->prev = free_block;
	free_blocks = free_block;
}

// Assembly:
andq $0x0, (%rdi)
movq %rsi, 0x20(%rdi)
movq 0x1773e(%rip), %rax     # 0x2a120
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
testq %rax, %rax
je 0x129f4
movq %rdi, 0x18(%rax)
movq %rdi, 0x17725(%rip)     # 0x2a120
retq
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitExecAllocator.c
// Function: sljit_free_exec
void sljit_free_exec(void* ptr)
{
	struct block_header *header;
	struct free_block* free_block;

	allocator_grab_lock();
	header = AS_BLOCK_HEADER(ptr, -(long)sizeof(struct block_header));
	allocated_size -= header->size;

	/* Connecting free blocks together if possible. */

	/* If header->prev_size == 0, free_block will equal to header.
	   In this case, free_block->header.size will be > 0. */
	free_block = AS_FREE_BLOCK(header, -(long)header->prev_size);
	if (!free_block->header.size) {
		free_block->size += header->size;
		header = AS_BLOCK_HEADER(free_block, free_block->size);
		header->prev_size = free_block->size;
	}
	else {
		free_block = (struct free_block*)header;
		sljit_insert_free_block(free_block, header->size);
	}

	header = AS_BLOCK_HEADER(free_block, free_block->size);
	if (!header->size) {
		free_block->size += ((struct free_block*)header)->size;
		sljit_remove_free_block((struct free_block*)header);
		header = AS_BLOCK_HEADER(free_block, free_block->size);
		header->prev_size = free_block->size;
	}

	/* The whole chunk is free. */
	if (!free_block->header.prev_size && header->size == 1) {
		/* If this block is freed, we still have (allocated_size / 2) free space. */
		if (total_size - free_block->size > (allocated_size * 3 / 2)) {
			total_size -= free_block->size;
			sljit_remove_free_block(free_block);
			free_chunk(free_block, free_block->size + sizeof(struct block_header));
		}
	}

	allocator_release_lock();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x12972
leaq -0x10(%r14), %rbx
movq -0x10(%r14), %rsi
subq %rsi, 0x17711(%rip)     # 0x2a128
movq -0x8(%r14), %rax
movq %rax, %rcx
negq %rcx
cmpq $0x0, -0x10(%r14,%rcx)
je 0x12a37
movq %rbx, %rdi
callq 0x129d3
movq 0x10(%r14), %rsi
jmp 0x12a47
subq %rax, %rbx
addq 0x20(%rbx), %rsi
movq %rsi, 0x20(%rbx)
movq %rsi, 0x8(%rbx,%rsi)
leaq (%rbx,%rsi), %rdi
cmpq $0x0, (%rbx,%rsi)
jne 0x12a6d
addq 0x20(%rbx,%rsi), %rsi
movq %rsi, 0x20(%rbx)
callq 0x1297e
movq 0x20(%rbx), %rsi
leaq (%rbx,%rsi), %rdi
movq %rsi, 0x8(%rbx,%rsi)
cmpq $0x0, 0x8(%rbx)
jne 0x12ab3
cmpq $0x1, (%rdi)
jne 0x12ab3
movq 0x176af(%rip), %rax     # 0x2a130
subq %rsi, %rax
imulq $0x3, 0x1769c(%rip), %rcx # 0x2a128
shrq %rcx
cmpq %rcx, %rax
jbe 0x12ab3
movq %rax, 0x17695(%rip)     # 0x2a130
movq %rbx, %rdi
callq 0x1297e
movq 0x20(%rbx), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x20f0
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x129c7
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitExecAllocator.c
// Function: sljit_free_unused_memory_exec
void sljit_free_unused_memory_exec(void)
{
	struct free_block* free_block;
	struct free_block* next_free_block;

	allocator_grab_lock();

	free_block = free_blocks;
	while (free_block) {
		next_free_block = free_block->next;
		if (!free_block->header.prev_size && 
				AS_BLOCK_HEADER(free_block, free_block->size)->size == 1) {
			total_size -= free_block->size;
			sljit_remove_free_block(free_block);
			free_chunk(free_block, free_block->size + sizeof(struct block_header));
		}
		free_block = next_free_block;
	}

	SLJIT_ASSERT((total_size && free_blocks) || (!total_size && !free_blocks));
	allocator_release_lock();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x12972
movq 0x17651(%rip), %r14     # 0x2a120
testq %r14, %r14
je 0x12b0e
movq %r14, %rbx
movq 0x10(%r14), %r14
cmpq $0x0, 0x8(%rbx)
jne 0x12acf
movq 0x20(%rbx), %rax
cmpq $0x1, (%rbx,%rax)
jne 0x12acf
subq %rax, 0x1763c(%rip)     # 0x2a130
movq %rbx, %rdi
callq 0x1297e
movq 0x20(%rbx), %rsi
addq $0x10, %rsi
movq %rbx, %rdi
callq 0x20f0
jmp 0x12acf
cmpq $0x0, 0x1761a(%rip)     # 0x2a130
setne %al
cmpq $0x0, 0x175ff(%rip)     # 0x2a120
setne %cl
cmpb %cl, %al
jne 0x12b34
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x129c7
leaq 0xe6f7(%rip), %rdi      # 0x21232
movl $0x136, %esi            # imm = 0x136
xorl %eax, %eax
callq 0x2080
callq 0x2040
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_free_compiler
void sljit_free_compiler(struct sljit_compiler *compiler)
{
	struct sljit_memory_fragment *buf;
	struct sljit_memory_fragment *curr;

	buf = compiler->buf;
	while (buf != NULL) {
		curr = buf;
		buf = buf->next;
		free(curr);
	}

	buf = compiler->abuf;
	while (buf != NULL) {
		curr = buf;
		buf = buf->next;
		free(curr);
	}

#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
	free(compiler->cpool);
#endif
	free(compiler);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x12c40
movq (%rdi), %r14
callq 0x2030
movq %r14, %rdi
jmp 0x12c2e
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x12c56
movq (%rdi), %r14
callq 0x2030
movq %r14, %rdi
jmp 0x12c44
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_set_label
void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label)
{
	if (!!jump && !!label) {
		jump->flags &= ~JUMP_ADDR;
		jump->flags |= JUMP_LABEL;
		jump->u.label = label;
	}
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x12c8d
movq 0x10(%rdi), %rax
andq $-0x4, %rax
incq %rax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: sljit_set_target
void sljit_set_target(struct sljit_jump *jump, unsigned long target)
{
	if (!!jump) {
		jump->flags &= ~JUMP_LABEL;
		jump->flags |= JUMP_ADDR;
		jump->u.target = target;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x12ca7
movq 0x10(%rdi), %rax
andq $-0x4, %rax
orq $0x2, %rax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/mmcco[P]sljit/sljit_src/sljitLir.c
// Function: ensure_abuf
static void* ensure_abuf(struct sljit_compiler *compiler, unsigned long size)
{
	u_char *ret;
	struct sljit_memory_fragment *new_frag;

	SLJIT_ASSERT(size <= 256);
	if (compiler->abuf->used_size + size <= (ABUF_SIZE - (unsigned long)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
		ret = compiler->abuf->memory + compiler->abuf->used_size;
		compiler->abuf->used_size += size;
		return ret;
	}
	new_frag = malloc(ABUF_SIZE);
	PTR_FAIL_IF_NULL(new_frag);
	new_frag->next = compiler->abuf;
	compiler->abuf = new_frag;
	new_frag->used_size = size;
	return new_frag->memory;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x40(%rdi), %r15
movq 0x8(%r15), %rax
leaq (%rax,%rsi), %rcx
cmpq $0xff0, %rcx            # imm = 0xFF0
ja 0x12ced
addq %r15, %rax
addq $0x10, %rax
movq %rcx, 0x8(%r15)
jmp 0x12d1c
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1000, %edi           # imm = 0x1000
callq 0x20e0
testq %rax, %rax
je 0x12d13
movq %r15, (%rax)
movq %rax, 0x40(%r14)
movq %rbx, 0x8(%rax)
addq $0x10, %rax
jmp 0x12d1c
movl $0x2, (%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq