LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: create_files
void create_files(int n){
	char filename[20] = "";
	FILE *fp = NULL;
	int i, count, j;

	for(i = 1; i <= n; ++i){
		srand(time(NULL)*(i+2));
		sprintf(filename, "file%d.txt", i);
		fp = fopen(filename, "w");
		count = rand() % TAM_MAX;
		count = count > 10 ? count : 10;
		for(j = 0; j < count-1; ++j){
			fprintf(fp, "%d\n", rand() % 1000);
		}
		fprintf(fp, "%d", rand() % 1000);
		fclose(fp);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movl $0x0, -0x30(%rbp)
testl %edi, %edi
jle 0x146f
movl %edi, %ebx
movl $0x1, %r14d
leaq 0xce4(%rip), %r15       # 0x2061
xorl %edi, %edi
callq 0x10c0
leal 0x2(%r14), %edi
imull %eax, %edi
callq 0x1090
leaq -0x40(%rbp), %r12
movq %r12, %rdi
leaq 0xcb6(%rip), %rsi       # 0x2054
movl %r14d, %edx
xorl %eax, %eax
callq 0x1120
movq %r12, %rdi
leaq 0xcad(%rip), %rsi       # 0x205f
callq 0x1110
movq %rax, %r13
callq 0x1160
movslq %eax, %r12
imulq $0x51eb851f, %r12, %rax # imm = 0x51EB851F
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
imull $0x64, %eax, %eax
subl %eax, %r12d
cmpl $0xb, %r12d
movl $0xa, %eax
cmovll %eax, %r12d
decl %r12d
callq 0x1160
movslq %eax, %rdx
imulq $0x10624dd3, %rdx, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %edx
movq %r13, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10a0
decl %r12d
jne 0x13ec
callq 0x1160
movslq %eax, %rdx
imulq $0x10624dd3, %rdx, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %edx
movq %r13, %rdi
leaq 0xc15(%rip), %rsi       # 0x2065
xorl %eax, %eax
callq 0x10a0
movq %r13, %rdi
callq 0x1060
leal 0x1(%r14), %eax
cmpl %ebx, %r14d
movl %eax, %r14d
jne 0x137d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: enqueue_job
void enqueue_job (const char *filename, int reverse)
{
	job* new_job = create_job(filename, reverse);
	/* Set the other fields of the job struct here... */
	/* Lock the mutex on the job queue before accessing it.*/
	pthread_mutex_lock (&job_queue_mutex);
	/* Place the new job at the head of the queue. */
	new_job->next = job_queue;
	job_queue = new_job;

	/* Post to the semaphore to indicate that another job is available.
	If threads are blocked, waiting on the semaphore, one will become
	unblocked so it can process the job. */
	sem_post (&job_queue_count);

	/* Unlock the job queue mutex. */
	pthread_mutex_unlock (&job_queue_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x18, %edi
callq 0x10e0
movq %rax, %r15
movq $0x0, (%rax)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
leaq 0x2c21(%rip), %rbx      # 0x40d0
movq %rbx, %rdi
callq 0x1150
movq 0x2c3a(%rip), %rax      # 0x40f8
movq %rax, (%r15)
movq %r15, 0x2c30(%rip)      # 0x40f8
leaq 0x2c31(%rip), %rdi      # 0x4100
callq 0x1080
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: create_job
job* create_job(const char *filename, int reverse){
	job *new_job = malloc(sizeof(job));

	new_job->next = NULL;
	new_job->filename = filename;
	new_job->reverse = reverse;

	return new_job;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl $0x18, %edi
callq 0x10e0
movq $0x0, (%rax)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: process_job
void process_job(job* next_job){
	FILE *fp = fopen(next_job->filename, "r");
	int c, count = 0, i;
	int *array = NULL;

	for (c = getc(fp); c != EOF; c = getc(fp)) 
        if (c == '\n') 
            count = count + 1; 

	array = (int *)malloc(sizeof(int) * count);

	rewind(fp);

	for(i = 0; i < count; ++i)
		fscanf(fp,"%d", &array[i]);

	merge_sort(array, 0, count-1);

	fclose(fp);

	fp = fopen(next_job->filename, "w");

	if(next_job->reverse){
		for(i = count-1; i >= 0; --i)
			fprintf(fp, "%d\n", array[i]);		
	}else{
		for(i = 0; i < count; ++i)
			fprintf(fp, "%d\n", array[i]);
	}

	free(array);
	fclose(fp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x40(%rbp)
movq 0x8(%rdi), %rdi
leaq 0xac6(%rip), %rsi       # 0x2068
callq 0x1110
movq %rax, %r15
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x1140
cmpl $-0x1, %eax
je 0x15cc
cmpl $0xa, %eax
jne 0x15b2
incq %rbx
incl %r14d
jmp 0x15b2
movl %r14d, -0x34(%rbp)
movl %ebx, %edi
shlq $0x2, %rdi
callq 0x10e0
movq %rax, -0x30(%rbp)
movq %r15, %rdi
callq 0x1070
testl %ebx, %ebx
je 0x1612
leaq 0xa73(%rip), %r12       # 0x2065
movq %rbx, %r14
movq -0x30(%rbp), %r13
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x1040
addq $0x4, %r13
decq %r14
jne 0x15f9
leal -0x1(%rbx), %edx
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq 0x16bd
movq %r15, %rdi
callq 0x1060
movq -0x40(%rbp), %r14
movq 0x8(%r14), %rdi
leaq 0xa28(%rip), %rsi       # 0x205f
callq 0x1110
movq %rax, %r15
cmpl $0x0, 0x10(%r14)
je 0x1675
testl %ebx, %ebx
je 0x169e
movl -0x34(%rbp), %r12d
incq %r12
leaq 0xa09(%rip), %r14       # 0x2061
movq -0x30(%rbp), %rax
movl -0x4(%rax,%r12,4), %edx
movq %r15, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x10a0
decq %r12
jg 0x1658
jmp 0x169e
testl %ebx, %ebx
je 0x169e
leaq 0x9e1(%rip), %r12       # 0x2061
movq -0x30(%rbp), %r13
movl (%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x10a0
addq $0x4, %r13
decq %rbx
jne 0x1684
movq -0x30(%rbp), %rdi
callq 0x1030
movq %r15, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O1/ramirezsebas[P]TP-LISTINGS/./src/capitulo_4/4.12/job-queue3.c
// Function: merge_sort
void merge_sort(int *a, int low, int high) 
{ 
    // calculating mid point of array 
    int mid = low + (high - low) / 2; 
    if (low < high) { 
  
        // calling first half 
        merge_sort(a, low, mid); 
  
        // calling second half 
        merge_sort(a, mid + 1, high); 
  
        // merging the two halves 
        merge(a, low, mid, high); 
    } 
}

// Assembly:
movl %edx, %eax
subl %esi, %eax
jle 0x1720
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
leal (%r14,%r13), %r12d
movl %r12d, %edx
callq 0x16bd
leal (%r14,%r13), %esi
incl %esi
movq %r15, %rdi
movl %ebx, %edx
callq 0x16bd
movq %r15, %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1721
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/util/getline.c
// Function: getline
ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
    size_t pos;
    int c;

    if (lineptr == NULL || stream == NULL || n == NULL) {
        errno = EINVAL;
        return -1;
    }

    c = getc(stream);
    if (c == EOF) {
        return -1;
    }

    if (*lineptr == NULL) {
        *lineptr = (char *) malloc(128);
        if (*lineptr == NULL) {
            return -1;
        }
        *n = 128;
    }

    pos = 0;
    while(c != EOF) {
        if (pos + 1 >= *n) {
            size_t new_size = *n + (*n >> 2);
            if (new_size < 128) {
                new_size = 128;
            }
            char *new_ptr = (char *) realloc(*lineptr, new_size);
            if (new_ptr == NULL) {
                return -1;
            }
            *n = new_size;
            *lineptr = new_ptr;
        }

        ((unsigned char *)(*lineptr))[pos ++] = c;
        if (c == '\n') {
            break;
        }
        c = getc(stream);
    }

    (*lineptr)[pos] = '\0';
    return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, -0x30(%rbp)
testq %rsi, %rsi
je 0x266f
movq %rdi, %r14
testq %rdi, %rdi
je 0x266f
movq %rdx, %r15
testq %rdx, %rdx
je 0x266f
movq %r15, %rdi
callq 0x20a0
cmpl $-0x1, %eax
je 0x267a
movl %eax, %r12d
cmpq $0x0, (%r14)
jne 0x25fa
movl $0x80, %edi
callq 0x2260
movq %rax, (%r14)
testq %rax, %rax
je 0x267a
movq -0x30(%rbp), %rax
movq $0x80, (%rax)
movl $0x1, %eax
movq %rax, %r13
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpq %rax, %r13
jb 0x2642
movq %rax, %rbx
shrq $0x2, %rbx
addq %rax, %rbx
cmpq $0x81, %rbx
movl $0x80, %eax
cmovbq %rax, %rbx
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x2360
testq %rax, %rax
je 0x267a
movq -0x30(%rbp), %rcx
movq %rbx, (%rcx)
movq %rax, (%r14)
movq (%r14), %rax
movb %r12b, -0x1(%rax,%r13)
cmpl $0xa, %r12d
je 0x2665
movq %r15, %rdi
callq 0x20a0
movl %eax, %r12d
leaq 0x1(%r13), %rax
cmpl $-0x1, %r12d
jne 0x25ff
movq (%r14), %rax
movb $0x0, (%rax,%r13)
jmp 0x2681
callq 0x2040
movl $0x16, (%rax)
movq $-0x1, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/util/debug.cpp
// Function: fog_debug_log(char const*, _IO_FILE*, char const*, int, char const*, char const*, ...)
void _fog_debug_log(const char* type, FILE* stream, const char* file,
                    int line, const char *func, const char* fmt, ...) {
    // TODO(ed): Log file with timestamps?
    va_list args;
    va_start(args, fmt);
#ifdef VIM_JUMP_TO
    fprintf(stream, "%s|%d| (%s) [%s]: ", file, line, func, type);
#else
    fprintf(stream, "%s @ %d (%s) [%s]:\n-- ", file, line, func, type);
#endif
    vfprintf(stream, fmt, args);
    va_end(args);
    fprintf(stream, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %r9, %r14
movq %rsi, %rbx
movq %rdi, %r9
testb %al, %al
je 0x26d9
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %r15
movq %rax, 0x10(%r15)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000030, %rax     # imm = 0x3000000030
movq %rax, (%r15)
leaq 0x1816c(%rip), %rsi     # 0x1a870
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22c0
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2270
movl $0xa, %edi
movq %rbx, %rsi
callq 0x2240
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: translate(Mat4, Vec3)
Mat4 translate(Mat4 m, Vec3 v) {
    m._03 += v.x;
    m._13 += v.y;
    m._23 += v.z;

    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movss 0x1c(%rbp), %xmm2
addss %xmm0, %xmm2
movss %xmm2, 0x1c(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
addss 0x2c(%rbp), %xmm0
movss %xmm0, 0x2c(%rbp)
addss 0x3c(%rbp), %xmm1
movss %xmm1, 0x3c(%rbp)
movaps 0x40(%rbp), %xmm0
movups %xmm0, 0x30(%rdi)
movaps 0x30(%rbp), %xmm0
movups %xmm0, 0x20(%rdi)
movaps 0x10(%rbp), %xmm0
movups %xmm0, (%rdi)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: scale(Mat4, Vec3)
Mat4 scale(Mat4 m, Vec3 v) {
    m._00 *= v.x;
    m._10 *= v.x;
    m._20 *= v.x;
    m._01 *= v.y;
    m._11 *= v.y;
    m._21 *= v.y;
    m._02 *= v.z;
    m._12 *= v.z;
    m._22 *= v.z;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss 0x10(%rbp), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x10(%rbp)
movss 0x20(%rbp), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x20(%rbp)
movss 0x30(%rbp), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x30(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss 0x14(%rbp), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x14(%rbp)
movss 0x24(%rbp), %xmm2
mulss %xmm0, %xmm2
movss %xmm2, 0x24(%rbp)
mulss 0x34(%rbp), %xmm0
movq %rdi, %rax
movss %xmm0, 0x34(%rbp)
movss 0x18(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x18(%rbp)
movss 0x28(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x28(%rbp)
mulss 0x38(%rbp), %xmm1
movss %xmm1, 0x38(%rbp)
movaps 0x40(%rbp), %xmm0
movups %xmm0, 0x30(%rdi)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x10(%rdi)
movaps 0x30(%rbp), %xmm0
movups %xmm0, 0x20(%rdi)
movaps 0x10(%rbp), %xmm0
movups %xmm0, (%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: scale(Mat4, float)
Mat4 scale(Mat4 m, real scalar) {
    m._00 *= scalar;
    m._10 *= scalar;
    m._20 *= scalar;
    m._01 *= scalar;
    m._11 *= scalar;
    m._21 *= scalar;
    m._02 *= scalar;
    m._12 *= scalar;
    m._22 *= scalar;

    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movss 0x10(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x10(%rbp)
movss 0x20(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x20(%rbp)
movss 0x30(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x30(%rbp)
movss 0x14(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x14(%rbp)
movss 0x24(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x24(%rbp)
movss 0x34(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x34(%rbp)
movss 0x18(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x18(%rbp)
movss 0x28(%rbp), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, 0x28(%rbp)
mulss 0x38(%rbp), %xmm0
movss %xmm0, 0x38(%rbp)
movaps 0x40(%rbp), %xmm0
movups %xmm0, 0x30(%rdi)
movaps 0x10(%rbp), %xmm0
movups %xmm0, (%rdi)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x10(%rdi)
movaps 0x30(%rbp), %xmm0
movups %xmm0, 0x20(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: create_skew_symmetric(Vec3)
Mat4 create_skew_symmetric(Vec3 v) {
    Mat4 m;
    m._00 = m._11 = m._22 = m._33 = 0.0f;
    m._10 = v.z;
    m._01 = -v.z;
    m._02 = v.y;
    m._20 = -v.y;
    m._13 = v.z;
    m._31 = -v.z;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
movl %ecx, 0x3c(%rdi)
movl %ecx, 0x28(%rdi)
movl %ecx, 0x14(%rdi)
movl %ecx, (%rdi)
movss %xmm1, 0x10(%rdi)
movaps 0x16912(%rip), %xmm2    # 0x1a030
movaps %xmm1, %xmm3
xorps %xmm2, %xmm3
movss %xmm3, 0x4(%rdi)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x8(%rdi)
xorps %xmm2, %xmm0
movss %xmm0, 0x20(%rdi)
movss %xmm1, 0x1c(%rdi)
movss %xmm3, 0x34(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: zero_transform(Mat4)
Mat4 zero_transform(Mat4 m) {
    m._03 = 0.0f;
    m._13 = 0.0f;
    m._23 = 0.0f;
    m._33 = 1.0f;
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
xorl %ecx, %ecx
movl %ecx, 0x1c(%rbp)
movl %ecx, 0x2c(%rbp)
movl %ecx, 0x3c(%rbp)
movl $0x3f800000, 0x4c(%rbp) # imm = 0x3F800000
movq 0x10(%rbp), %rcx
movq %rcx, (%rdi)
movl 0x18(%rbp), %ecx
movl %ecx, 0x8(%rdi)
movl 0x1c(%rbp), %ecx
movl %ecx, 0xc(%rdi)
movq 0x20(%rbp), %rcx
movq %rcx, 0x10(%rdi)
movl 0x28(%rbp), %ecx
movl %ecx, 0x18(%rdi)
movl 0x2c(%rbp), %ecx
movl %ecx, 0x1c(%rdi)
movq 0x30(%rbp), %rcx
movq %rcx, 0x20(%rdi)
movl 0x38(%rbp), %ecx
movl %ecx, 0x28(%rdi)
movl 0x3c(%rbp), %ecx
movl %ecx, 0x2c(%rdi)
movaps 0x40(%rbp), %xmm0
movups %xmm0, 0x30(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: create_perspective_projection(float, float, float, float)
Mat4 create_perspective_projection(real fov, real aspect_ratio, real near_clip,
                                   real far_clip) {
    real w = tan(fov / 2.0f);

    Mat4 m = {};
    m._00 = 1.0f / (aspect_ratio * w);
    m._11 = 1.0f / w;
    m._22 = -(far_clip + near_clip) / (far_clip - near_clip);
    m._32 = -1.0f;
    m._23 = -(2.0f * far_clip * near_clip) / (far_clip - near_clip);
    return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movss %xmm3, -0x14(%rbp)
movss %xmm2, -0x10(%rbp)
movss %xmm1, -0xc(%rbp)
movq %rdi, %rbx
mulss 0x16845(%rip), %xmm0    # 0x1a00c
callq 0x22d0
xorps %xmm1, %xmm1
movups %xmm1, (%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm1, 0x20(%rbx)
movups %xmm1, 0x30(%rbx)
movss -0xc(%rbp), %xmm3
mulss %xmm0, %xmm3
movss 0x16815(%rip), %xmm1    # 0x1a004
movaps %xmm1, %xmm2
divss %xmm3, %xmm2
movss %xmm2, (%rbx)
divss %xmm0, %xmm1
movss -0x10(%rbp), %xmm3
movaps %xmm3, %xmm0
movss -0x14(%rbp), %xmm2
addss %xmm2, %xmm0
xorps 0x1681a(%rip), %xmm0    # 0x1a030
movss %xmm1, 0x14(%rbx)
movaps %xmm2, %xmm1
subss %xmm3, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x28(%rbx)
movl $0xbf800000, 0x38(%rbx) # imm = 0xBF800000
mulss 0x167d6(%rip), %xmm2    # 0x1a010
mulss %xmm3, %xmm2
divss %xmm1, %xmm2
movss %xmm2, 0x2c(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_matrix.h
// Function: transpose(Mat4)
Mat4 transpose(Mat4 m) {
    Mat4 t = {};

    for (u8 i = 0; i < 4; i++)
        for (u8 j = 0; j < 4; j++) t._[i][j] = m._[j][i];

    return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
leaq 0x10(%rbp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %edx, %edx
movq %rdi, %rsi
xorl %edi, %edi
movss (%rcx,%rdi,4), %xmm0
movss %xmm0, (%rsi,%rdi)
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x3875
incq %rdx
addq $0x4, %rcx
addq $0x10, %rsi
cmpq $0x4, %rdx
jne 0x3873
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_math.h
// Function: std_progress_func_vec4(Vec4, float, Vec4, float, float)
Vec4 std_progress_func_vec4(Vec4 start_value, f32 start_slope, Vec4 end_value, f32 end_slope, f32 progress) {
    f32 p = -2 + start_slope + end_slope;
    f32 q = -(-3 + 2 * start_slope + end_slope);
    f32 y = p * pow(progress, 3) + q * pow(progress, 2) + start_slope*progress;
    return LERP(start_value, end_value, y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movss %xmm6, -0x8(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm3, -0x50(%rbp)
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, -0x30(%rbp)
movss 0x15b6d(%rip), %xmm0    # 0x1a010
movss %xmm2, -0xc(%rbp)
addss %xmm2, %xmm0
addss %xmm2, %xmm2
addss 0x15b5c(%rip), %xmm2    # 0x1a014
addss %xmm5, %xmm0
addss %xmm5, %xmm2
movss %xmm2, -0x4(%rbp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
cvtss2sd %xmm6, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd 0x15cbe(%rip), %xmm1    # 0x1a1a0
callq 0x2370
xorps %xmm1, %xmm1
cvtss2sd -0x4(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm2
mulsd -0x20(%rbp), %xmm0
subsd %xmm2, %xmm0
movss -0xc(%rbp), %xmm1
mulss -0x8(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
addsd %xmm0, %xmm1
xorps %xmm2, %xmm2
cvtsd2ss %xmm1, %xmm2
movss 0x15ade(%rip), %xmm0    # 0x1a004
subss %xmm2, %xmm0
movaps -0x30(%rbp), %xmm1
movaps %xmm1, %xmm3
mulss %xmm0, %xmm3
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm1
movaps %xmm1, %xmm8
movaps -0x40(%rbp), %xmm1
movaps %xmm1, %xmm4
mulss %xmm0, %xmm4
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm0, %xmm1
movaps %xmm1, %xmm6
movaps -0x50(%rbp), %xmm1
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
mulss %xmm2, %xmm1
movaps %xmm1, %xmm7
movaps -0x60(%rbp), %xmm5
movaps %xmm5, %xmm1
mulss %xmm2, %xmm1
shufps $0x55, %xmm5, %xmm5     # xmm5 = xmm5[1,1,1,1]
mulss %xmm2, %xmm5
addss %xmm3, %xmm0
addss %xmm8, %xmm7
unpcklps %xmm7, %xmm0            # xmm0 = xmm0[0],xmm7[0],xmm0[1],xmm7[1]
addss %xmm4, %xmm1
addss %xmm6, %xmm5
unpcklps %xmm5, %xmm1            # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1]
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/block_math.h
// Function: binomial(unsigned int, unsigned int)
u32 binomial(u32 n, u32 k) {
    u32 res = 1;

    // k and n-k have the same binomial coeff so only calculate the "shorter"
    if (k > n - k)
        k = n - k;

    for (u32 i = 0; i < k; i++) {
        res *= (n - i);
        res /= (i + 1);
    }
    return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %ecx
subl %esi, %ecx
cmpl %esi, %ecx
cmovael %esi, %ecx
testl %ecx, %ecx
je 0x45d1
negl %ecx
movl $0x1, %esi
movl $0x1, %eax
imull %edi, %eax
xorl %edx, %edx
divl %esi
leal (%rcx,%rsi), %edx
incl %edx
incl %esi
decl %edi
cmpl $0x1, %edx
jne 0x45ba
jmp 0x45d6
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_seed(unsigned int)
void random_seed(u32 seed) {
    // Generated random numbers from random.org.
    //
    // This makes it deterministic, which you might
    // not want.
    random_state.a = 398973565 ^ seed;
    random_state.b = 141307319 ^ seed;
    random_state.c =  15804145 ^ seed;
    random_state.d = 296129167 ^ seed;
    random_state.counter = 100;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
xorl $0x17c7da7d, %eax       # imm = 0x17C7DA7D
movl %eax, 0x1cc77(%rip)     # 0x21260
movl %edi, %eax
xorl $0x86c2db7, %eax        # imm = 0x86C2DB7
movl %eax, 0x1cc6e(%rip)     # 0x21264
movl %edi, %eax
xorl $0xf126f1, %eax         # imm = 0xF126F1
movl %eax, 0x1cc65(%rip)     # 0x21268
xorl $0x11a6928f, %edi       # imm = 0x11A6928F
movl %edi, 0x1cc5d(%rip)     # 0x2126c
movl $0x64, 0x1cc57(%rip)    # 0x21270
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: xorwow()
u32 xorwow() {
    // Algorithm "xorwow" from p. 5 of Marsaglia, "Xorshift RNGs"
    // Stolen straight from Wikipedia.
    u32 t = random_state.d;

    u32 s = random_state.a;
    random_state.d = random_state.c;
    random_state.c = random_state.b;
    random_state.b = s;

    t ^= t >> 2;
    t ^= t << 1;
    t ^= s ^ (s << 4);
    random_state.a = t;

    random_state.counter += 362437;
    return t + random_state.counter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x1cc47(%rip), %eax     # 0x2126c
movl 0x1cc35(%rip), %ecx     # 0x21260
movq 0x1cc32(%rip), %rdx     # 0x21264
movq %rdx, 0x1cc2f(%rip)     # 0x21268
movl %ecx, 0x1cc25(%rip)     # 0x21264
movl %eax, %edx
shrl $0x2, %edx
xorl %eax, %edx
movl %ecx, %eax
shll $0x4, %eax
xorl %ecx, %eax
xorl %edx, %eax
addl %edx, %edx
xorl %eax, %edx
movl %edx, 0x1cc07(%rip)     # 0x21260
movl 0x1cc11(%rip), %eax     # 0x21270
leal 0x587c5(%rax), %ecx
movl %ecx, 0x1cc05(%rip)     # 0x21270
addl %edx, %eax
addl $0x587c5, %eax          # imm = 0x587C5
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_unit_vec2()
Vec2 random_unit_vec2() {
    Vec2 out;
    while (true) {
        out = {random_real(-1, 1), random_real(-1, 1)};
        f32 sq = length_squared(out);
        if (sq > 1.0 || sq == 0.0)
            continue;
        return normalize(out);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movss 0x1586b(%rip), %xmm4    # 0x1a01c
movss 0x15867(%rip), %xmm5    # 0x1a020
xorps %xmm6, %xmm6
movss 0x15840(%rip), %xmm7    # 0x1a004
movss 0x15837(%rip), %xmm8    # 0x1a004
movl 0x1ca99(%rip), %ecx     # 0x2126c
movl 0x1ca87(%rip), %esi     # 0x21260
movl 0x1ca89(%rip), %edx     # 0x21268
movl 0x1ca7f(%rip), %edi     # 0x21264
movl %ecx, %eax
shrl $0x2, %eax
xorl %ecx, %eax
movl %esi, %ecx
shll $0x4, %ecx
xorl %esi, %ecx
xorl %eax, %ecx
addl %eax, %eax
xorl %ecx, %eax
movl 0x1ca71(%rip), %ecx     # 0x21270
leal (%rcx,%rax), %r8d
addl $0x587c5, %r8d          # imm = 0x587C5
xorps %xmm9, %xmm9
cvtsi2ss %r8, %xmm9
mulss %xmm4, %xmm9
addss %xmm9, %xmm9
addss %xmm5, %xmm9
movl %edi, 0x1ca44(%rip)     # 0x2126c
movl %esi, 0x1ca3a(%rip)     # 0x21268
movl %eax, 0x1ca30(%rip)     # 0x21264
movl %edx, %esi
shrl $0x2, %esi
xorl %edx, %esi
leal (%rsi,%rsi), %edx
xorl %esi, %edx
xorl %eax, %edx
shll $0x4, %eax
xorl %edx, %eax
movl %eax, 0x1ca13(%rip)     # 0x21260
addl %ecx, %eax
addl $0xb0f8a, %eax          # imm = 0xB0F8A
addl $0xb0f8a, %ecx          # imm = 0xB0F8A
xorps %xmm10, %xmm10
cvtsi2ss %rax, %xmm10
movl %ecx, 0x1ca07(%rip)     # 0x21270
mulss %xmm4, %xmm10
addss %xmm10, %xmm10
addss %xmm5, %xmm10
movaps %xmm10, %xmm2
mulss %xmm10, %xmm2
movaps %xmm9, %xmm1
mulss %xmm9, %xmm1
addss %xmm2, %xmm1
movaps %xmm1, %xmm2
cmpeqps %xmm6, %xmm2
movaps %xmm7, %xmm3
cmpltps %xmm1, %xmm3
orps %xmm2, %xmm3
movd %xmm3, %ebx
testb $0x1, %bl
jne 0x4910
ucomiss %xmm6, %xmm1
jb 0x48b6
xorps %xmm0, %xmm0
sqrtss %xmm1, %xmm0
jmp 0x48f6
movaps %xmm1, %xmm0
movaps %xmm9, -0x30(%rbp)
movaps %xmm10, -0x20(%rbp)
callq 0x23a0
movaps -0x20(%rbp), %xmm10
movaps -0x30(%rbp), %xmm9
movss 0x15729(%rip), %xmm8    # 0x1a004
movss 0x15721(%rip), %xmm7    # 0x1a004
xorps %xmm6, %xmm6
movss 0x15732(%rip), %xmm5    # 0x1a020
movss 0x15726(%rip), %xmm4    # 0x1a01c
movaps %xmm8, %xmm1
divss %xmm0, %xmm1
mulss %xmm1, %xmm9
mulss %xmm1, %xmm10
unpcklps %xmm10, %xmm9           # xmm9 = xmm9[0],xmm10[0],xmm9[1],xmm10[1]
movaps %xmm9, %xmm0
testb $0x1, %bl
jne 0x47cd
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/math/random.cpp
// Function: random_unit_vec3()
Vec3 random_unit_vec3() {
    Vec3 out;
    while (true) {
        out = {random_real(-1, 1), random_real(-1, 1), random_real(-1, 1)};
        f32 sq = length_squared(out);
        if (sq > 1.0 || sq == 0.0)
            continue;
        return normalize(out);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movss 0x156eb(%rip), %xmm5    # 0x1a01c
movss 0x156e7(%rip), %xmm6    # 0x1a020
xorps %xmm7, %xmm7
movss 0x156bf(%rip), %xmm8    # 0x1a004
movss 0x156b6(%rip), %xmm9    # 0x1a004
movl 0x1c918(%rip), %eax     # 0x2126c
movl 0x1c906(%rip), %edx     # 0x21260
movl 0x1c908(%rip), %edi     # 0x21268
movl 0x1c8fe(%rip), %ecx     # 0x21264
movl %eax, %esi
shrl $0x2, %esi
xorl %eax, %esi
movl %edx, %eax
shll $0x4, %eax
xorl %edx, %eax
xorl %esi, %eax
addl %esi, %esi
xorl %eax, %esi
movl 0x1c8f0(%rip), %eax     # 0x21270
leal (%rax,%rsi), %r8d
addl $0x587c5, %r8d          # imm = 0x587C5
xorps %xmm10, %xmm10
cvtsi2ss %r8, %xmm10
mulss %xmm5, %xmm10
movl %edi, %r8d
shrl $0x2, %r8d
xorl %edi, %r8d
leal (%r8,%r8), %edi
xorl %r8d, %edi
xorl %esi, %edi
movl %edx, 0x1c8ba(%rip)     # 0x2126c
movl %esi, 0x1c8b0(%rip)     # 0x21268
movl %esi, %edx
shll $0x4, %edx
xorl %edx, %edi
leal (%rax,%rdi), %edx
addl $0xb0f8a, %edx          # imm = 0xB0F8A
xorps %xmm11, %xmm11
cvtsi2ss %rdx, %xmm11
addss %xmm10, %xmm10
addss %xmm6, %xmm10
mulss %xmm5, %xmm11
addss %xmm11, %xmm11
addss %xmm6, %xmm11
movl %edi, 0x1c874(%rip)     # 0x21264
movl %ecx, %edx
shrl $0x2, %edx
xorl %ecx, %edx
leal (%rdx,%rdx), %ecx
xorl %edx, %ecx
xorl %edi, %ecx
shll $0x4, %edi
xorl %ecx, %edi
movl %edi, 0x1c857(%rip)     # 0x21260
leal (%rdi,%rax), %ecx
addl $0x10974f, %ecx         # imm = 0x10974F
xorps %xmm12, %xmm12
cvtsi2ss %rcx, %xmm12
addl $0x10974f, %eax         # imm = 0x10974F
movl %eax, 0x1c84a(%rip)     # 0x21270
mulss %xmm5, %xmm12
addss %xmm12, %xmm12
addss %xmm6, %xmm12
movaps %xmm11, %xmm2
mulss %xmm11, %xmm2
movaps %xmm10, %xmm3
mulss %xmm10, %xmm3
addss %xmm2, %xmm3
movaps %xmm12, %xmm2
mulss %xmm12, %xmm2
addss %xmm3, %xmm2
movaps %xmm2, %xmm3
cmpeqps %xmm7, %xmm3
movaps %xmm8, %xmm4
cmpltps %xmm2, %xmm4
orps %xmm3, %xmm4
movd %xmm4, %ebx
testb $0x1, %bl
jne 0x4aee
ucomiss %xmm7, %xmm2
jb 0x4a7e
sqrtss %xmm2, %xmm0
jmp 0x4acb
movaps %xmm2, %xmm0
movaps %xmm10, -0x30(%rbp)
movaps %xmm11, -0x20(%rbp)
movss %xmm12, -0xc(%rbp)
callq 0x23a0
movss -0xc(%rbp), %xmm12
movaps -0x20(%rbp), %xmm11
movaps -0x30(%rbp), %xmm10
movss 0x15555(%rip), %xmm9    # 0x1a004
movss 0x1554c(%rip), %xmm8    # 0x1a004
xorps %xmm7, %xmm7
movss 0x1555d(%rip), %xmm6    # 0x1a020
movss 0x15551(%rip), %xmm5    # 0x1a01c
movaps %xmm9, %xmm1
divss %xmm0, %xmm1
mulss %xmm1, %xmm10
mulss %xmm1, %xmm11
unpcklps %xmm11, %xmm10          # xmm10 = xmm10[0],xmm11[0],xmm10[1],xmm11[1]
mulss %xmm1, %xmm12
movaps %xmm10, %xmm0
movaps %xmm12, %xmm1
testb $0x1, %bl
jne 0x494e
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/asset/asset.h
// Function: Asset::asset_hash(char const*)
u64 asset_hash(const char *str) {
    // This number is pretty arbitrary, it's prime and that's nice.
    u64 hash = 5351;
    while (*str) {
        char c = (*str++);
        hash = hash * c + c;
    }
    return hash % 0x0FFFFFFF;
}

// Assembly:
movb (%rdi), %al
testb %al, %al
je 0x4b53
pushq %rbp
movq %rsp, %rbp
incq %rdi
movl $0x14e7, %ecx           # imm = 0x14E7
movsbq %al, %rax
incq %rcx
imulq %rax, %rcx
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0x4b10
movabsq $0x1000000101, %rdx     # imm = 0x1000000101
movq %rcx, %rax
mulq %rdx
movq %rcx, %rax
subq %rdx, %rax
shrq %rax
addq %rdx, %rax
shrq $0x1b, %rax
movq %rax, %rdx
shlq $0x1c, %rdx
subq %rdx, %rax
addq %rcx, %rax
popq %rbp
retq
movl $0x14e7, %eax           # imm = 0x14E7
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: get_asset_header(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*, Asset::Type)
Asset::Header get_asset_header(const std::string *path, Asset::Type type) {
    char *file_path = (char *) malloc(path->size() * sizeof(path[0]));
    const char *from = path->c_str();
    char *to = file_path;
    while (*from) *(to++) = *(from++);
    *(to++) = *(from++);
    // struct stat buffer;
    // if (stat(file_path, &buffer) == -1) return {};

    return {type,
            file_path,
            path->size() + 1,
            0,  // buffer.st_mtime,
            0,  //(u32) buffer.st_size,
            0,
            Asset::ASSET_ID_NO_ASSET};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movq %r12, %rdi
shlq $0x5, %rdi
callq 0x2260
movq (%r15), %rcx
movb (%rcx), %dl
movq %rax, %rsi
testb %dl, %dl
je 0x6c4e
incq %rcx
movq %rax, %rsi
movb %dl, (%rsi)
incq %rsi
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x6c40
movb $0x0, (%rsi)
movl %r14d, (%rbx)
movq %rax, 0x8(%rbx)
incq %r12
movq %r12, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x30(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: add_asset_to_file(AssetFile*, Asset::Header*, Asset::Data*)
void add_asset_to_file(AssetFile *file, Asset::Header *header, Asset::Data *asset) {
    assert(header);
    assert(asset);
    header->asset_id = file->asset_headers.size();

    file->header.number_of_assets++;
    file->header.size_of_strings += header->file_path_length;
    file->header.size_of_headers += sizeof(Asset::Header);
    file->header.size_of_data += header->asset_size;

    file->asset_headers.push_back(*header);
    file->assets.push_back(*asset);
    assert(file->asset_headers.size() == file->assets.size());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x6d7c
movq %rdx, %r14
testq %rdx, %rdx
je 0x6d9b
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x28(%rdi), %rsi
movq %rsi, %rax
subq 0x20(%rdi), %rax
shrq $0x3, %rax
imull $0xb6db6db7, %eax, %eax # imm = 0xB6DB6DB7
movl %eax, 0x34(%rdx)
incq (%rdi)
movq 0x10(%rdx), %rax
addq %rax, 0x10(%rdi)
addq $0x38, 0x8(%rdi)
movl 0x30(%rdx), %eax
addq %rax, 0x18(%rdi)
cmpq 0x30(%rdi), %rsi
je 0x6cff
movq 0x30(%rdx), %rax
movq %rax, 0x30(%rsi)
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x38, 0x28(%rbx)
jmp 0x6d08
leaq 0x20(%rbx), %rdi
callq 0x18894
movq 0x40(%rbx), %rsi
cmpq 0x48(%rbx), %rsi
je 0x6d32
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x30, 0x40(%rbx)
jmp 0x6d3e
leaq 0x38(%rbx), %rdi
movq %r14, %rdx
callq 0x18a22
movq 0x28(%rbx), %rax
movq 0x40(%rbx), %rcx
subq 0x20(%rbx), %rax
sarq $0x3, %rax
movabsq $0x6db6db6db6db6db7, %rdx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %rdx
subq 0x38(%rbx), %rcx
sarq $0x4, %rcx
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
cmpq %rax, %rdx
jne 0x6dba
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x14038(%rip), %rdi     # 0x1adbb
leaq 0x13b2a(%rip), %rsi     # 0x1a8b4
leaq 0x13b3e(%rip), %rcx     # 0x1a8cf
movl $0x57, %edx
callq 0x2120
leaq 0x13b71(%rip), %rdi     # 0x1a913
leaq 0x13b0b(%rip), %rsi     # 0x1a8b4
leaq 0x13b1f(%rip), %rcx     # 0x1a8cf
movl $0x58, %edx
callq 0x2120
leaq 0x13b58(%rip), %rdi     # 0x1a919
leaq 0x13aec(%rip), %rsi     # 0x1a8b4
leaq 0x13b00(%rip), %rcx     # 0x1a8cf
movl $0x62, %edx
callq 0x2120
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: load_texture(AssetFile*, Asset::Header*, unsigned char)
void load_texture(AssetFile *file, Asset::Header *header, b8 flip=true) {
    static u16 id = 0;
    int w, h, c;
    // NOTE(ed): Kinda a ugly hack, the sprite atlases aren't flipped, but the
    // normal sprites are.
    stbi_set_flip_vertically_on_load(flip);
    u8 *buffer = stbi_load(header->file_path, &w, &h, &c, 0);
    if (w > 512 || h > 512) {
        printf("\tCannot load %s, because it is too large.\n", header->file_path);
        return;
    }
    if (!buffer) {
        printf("\tFailed to load image %s", header->file_path);
        return;
    }
    Image image = {buffer, (u32) w, (u32) h, (u8) c, id++};
    header->asset_size = sizeof(Asset::Data) + w * h * c * sizeof(u8);
    Asset::Data asset = {image};

    add_asset_to_file(file, header, &asset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, 0x1a48c(%rip)     # 0x21280
movq 0x8(%rsi), %rdi
leaq -0x2c(%rbp), %r15
leaq -0x28(%rbp), %r12
leaq -0x24(%rbp), %rcx
movq %r15, %rsi
movq %r12, %rdx
xorl %r8d, %r8d
callq 0x4b7c
movl (%r15), %ecx
movl $0x201, %edx            # imm = 0x201
cmpl %edx, %ecx
setge %dil
movl (%r12), %esi
cmpl %edx, %esi
setge %dl
orb %dil, %dl
cmpb $0x1, %dl
jne 0x6e3e
movq 0x8(%rbx), %rsi
leaq 0x13b0f(%rip), %rdi     # 0x1a94b
jmp 0x6e96
testq %rax, %rax
je 0x6e8b
movl -0x24(%rbp), %edi
movzwl 0x1a47a(%rip), %r8d     # 0x212c8
movl %r8d, %edx
incl %edx
movw %dx, 0x1a46e(%rip)      # 0x212c8
movl %esi, %edx
imull %ecx, %edx
imull %edi, %edx
addl $0x30, %edx
movl %edx, 0x30(%rbx)
leaq -0x60(%rbp), %rdx
movq %rax, (%rdx)
movl %ecx, 0x8(%rdx)
movl %esi, 0xc(%rdx)
movb %dil, 0x10(%rdx)
movw %r8w, 0x12(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6c83
jmp 0x6e9d
movq 0x8(%rbx), %rsi
leaq 0x13ae0(%rip), %rdi     # 0x1a976
xorl %eax, %eax
callq 0x2050
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: load_shader(AssetFile*, Asset::Header*)
void load_shader(AssetFile *file, Asset::Header *header) {
    FILE *shader_file = fopen(header->file_path, "rb");
    fseek(shader_file, 0, SEEK_END);
    long size = ftell(shader_file) + 1;
    rewind(shader_file);

    header->asset_size = size;
    Asset::Data asset = {.shader_source = (char *) malloc(size)};
    fread(asset.shader_source, 1, size, shader_file);
    asset.shader_source[size - 1] = '\0';

    add_asset_to_file(file, header, &asset);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movq 0x8(%rsi), %rdi
leaq 0x133a2(%rip), %rsi     # 0x1a8a5
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x2200
movq %r15, %rdi
callq 0x2030
movq %rax, %r12
leaq 0x1(%rax), %r13
movq %r15, %rdi
callq 0x2070
movl %r13d, 0x30(%rbx)
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %r14
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, (%r14)
movq %r13, %rdi
callq 0x2260
movq %rax, (%r14)
movl $0x1, %esi
movq %rax, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x22f0
movq (%r14), %rax
movb $0x0, (%rax,%r12)
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6c83
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: process_asset(AssetFile*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
void process_asset(AssetFile *file, const std::string *path) {
    size_t pos = path->find_last_of(".");
    if (pos == std::string::npos) return;
    std::string file_ending = path->substr(pos);
    if (!valid_endings.count(file_ending)) return;
    Asset::Type type = valid_endings[file_ending];

    Asset::Header header = get_asset_header(path, type);
    switch (header.type) {
        case (Asset::Type::TEXTURE): load_texture(file, &header); break;
        case (Asset::Type::FONT):    load_font(file, &header);    break;
        case (Asset::Type::SOUND):   load_sound(file, &header);   break;
        case (Asset::Type::SHADER):  load_shader(file, &header);  break;
        case (Asset::Type::SPRITE):  load_sprite(file, &header);  break;
        default:
            printf("!!!! Unhandled asset, unkown type: %s, %d\n", path->c_str(),
                   (int) header.type);
            return;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x12fc2(%rip), %rsi     # 0x1ab36
movl $0x1, %ecx
movq %r14, %rdi
movq $-0x1, %rdx
callq 0x23c0
cmpq $-0x1, %rax
je 0x7c74
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x21f0
leaq 0x196de(%rip), %rdi     # 0x21290
movq %r15, %rsi
callq 0x1904c
testq %rax, %rax
je 0x7c5b
leaq 0x196c6(%rip), %rdi     # 0x21290
leaq -0x38(%rbp), %rsi
callq 0x19178
movl (%rax), %edx
leaq -0x70(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6c0a
movl (%r15), %edx
leal -0x1(%rdx), %eax
cmpl $0x4, %eax
ja 0x7c4a
leaq 0x125ca(%rip), %rcx     # 0x1a1c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x6dd9
jmp 0x7c5b
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x74e0
jmp 0x7c5b
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x758e
jmp 0x7c5b
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x797f
jmp 0x7c5b
leaq -0x70(%rbp), %rsi
movq %rbx, %rdi
callq 0x6f2d
jmp 0x7c5b
movq (%r14), %rsi
leaq 0x12ee4(%rip), %rdi     # 0x1ab38
xorl %eax, %eax
callq 0x2050
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7c74
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21d0
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7c83
jmp 0x7c83
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7c9f
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2380
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: copy_string(char*, unsigned int)
char *copy_string(char *str, u32 size) {
    char *ptr = str;
    char *out = (char *) malloc(size);
    char *copy = out;
    while (*ptr) *(copy++) = *(ptr++);
    *copy = '\0';
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %edi
callq 0x2260
movb (%rbx), %cl
movq %rax, %rdx
testb %cl, %cl
je 0x7cd4
incq %rbx
movq %rax, %rdx
movb %cl, (%rdx)
incq %rdx
movb (%rbx), %cl
incq %rbx
testb %cl, %cl
jne 0x7cc6
movb $0x0, (%rdx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: strip_file_ending(char*)
void strip_file_ending(char *str) {
    s32 last_dot = -1;
    char *ptr = str;
    for (s32 index = 0; ptr[index]; index++) {
        if (ptr[index] == '.')
            last_dot = index;
    }
    if (last_dot != -1)
        str[last_dot] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
cmpl $0x2e, %edx
je 0x7d3d
testl %edx, %edx
jne 0x7d3f
jmp 0x7d44
movl %ecx, %eax
incq %rcx
jmp 0x7d2e
cmpl $-0x1, %eax
je 0x7d4f
cltq
movb $0x0, (%rdi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: append(char*, char const*)
void append(char *str, const char *postfix) {
    while (*(str++)) /* NO-OP */;
    str--;
    while (*postfix)
        *(str++) = *(postfix++);
    *str = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rcx
incq %rdi
cmpb $0x0, (%rcx)
jne 0x7d55
movb (%rsi), %al
testb %al, %al
je 0x7d81
movq $-0x1, %rcx
movb %al, (%rdi,%rcx)
movb 0x2(%rsi,%rcx), %al
incq %rcx
testb %al, %al
jne 0x7d6d
addq %rcx, %rdi
movq %rdi, %rcx
movb $0x0, (%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/unix_assets.cpp
// Function: asset_name_from_file(char*, Asset::Type)
char *asset_name_from_file(char *path, Asset::Type type) {
    u32 start = (strncmp(path, "res/", 4) == 0) * 3;
    while (path[start] == '/')
        start++;
    path += start; // Strip leading "res\/*"
    const u32 len = strlen(path) + (type == Asset::Type::FONT) * 5 + 1;
    char *name = copy_string(path, len);
    strip_file_ending(name);
    replace_all(name, '/', '_');
    replace_all(name, '-', '_');
    make_uppercase(name);
    if (type == Asset::Type::FONT)
        append(name, "_FONT");
    return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0x12dc6(%rip), %rsi     # 0x1ab63
movl $0x4, %edx
callq 0x20f0
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal (%rcx,%rcx,2), %r12d
movl %r12d, %edi
movb (%r14,%rdi), %r15b
incl %r12d
cmpb $0x2f, %r15b
je 0x7db2
addq %r14, %rdi
callq 0x20e0
xorl %ecx, %ecx
cmpl $0x2, %ebx
sete %cl
leal (%rcx,%rcx,4), %ecx
leal (%rax,%rcx), %edi
incl %edi
callq 0x2260
movq %rax, %rcx
testb %r15b, %r15b
je 0x7e08
decl %r12d
movl %r12d, %ecx
leaq (%r14,%rcx), %rdx
incq %rdx
movq %rax, %rcx
movb %r15b, (%rcx)
incq %rcx
movb (%rdx), %r15b
incq %rdx
testb %r15b, %r15b
jne 0x7df7
movb $0x0, (%rcx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %edx, %edx
movzbl (%rax,%rdx), %esi
cmpl $0x2e, %esi
je 0x7e21
testl %esi, %esi
jne 0x7e23
jmp 0x7e28
movl %edx, %ecx
incq %rdx
jmp 0x7e12
cmpl $-0x1, %ecx
je 0x7e34
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movb (%rax), %dl
testb %dl, %dl
je 0x7e50
leaq 0x1(%rax), %rcx
cmpb $0x2f, %dl
jne 0x7e47
movb $0x5f, -0x1(%rcx)
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x7e3e
movb (%rax), %dl
testb %dl, %dl
je 0x7e6c
leaq 0x1(%rax), %rcx
cmpb $0x2d, %dl
jne 0x7e63
movb $0x5f, -0x1(%rcx)
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x7e5a
movb (%rax), %cl
testb %cl, %cl
je 0x7e90
movq %rax, %rdx
incq %rdx
leal -0x61(%rcx), %esi
cmpb $0x19, %sil
ja 0x7e87
addb $-0x20, %cl
movb %cl, -0x1(%rdx)
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x7e78
cmpl $0x2, %ebx
jne 0x7ec8
movq %rax, %rcx
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x7e98
movb $0x5f, %sil
movq $-0x1, %rdx
leaq 0x12cb6(%rip), %rdi     # 0x1ab68
movb %sil, (%rcx,%rdx)
movb 0x2(%rdx,%rdi), %sil
incq %rdx
cmpq $0x4, %rdx
jne 0x7eb2
movb $0x0, (%rcx,%rdx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ffoissey[P]minishell_42/srcs/ft_minishell.c
// Function: ft_prepare_cd
void		ft_prepare_cd(char **tab, t_list_ex **lst)
{
	char			*oldpwd;

	oldpwd = NULL;
	if (tab[1] && tab[2])
	{
		ft_dprintf(2, "cd: %s: string not in pwd\n", tab[1]);
		return ;
	}
	if (ft_lst_returnvalue(*lst, "PWD"))
		oldpwd = ft_strdup(ft_lst_returnvalue(*lst, "PWD"));
	else
	{
		if (!(oldpwd = getcwd(oldpwd, 0)))
		{
			ft_dprintf(2, "minishell: current dir not found\n");
			return ;
		}
		ft_lst_changevalue(lst, "PWD", oldpwd);
	}
	if (!ft_lst_returnvalue(*lst, "OLDPWD"))
		ft_lst_changevalue(lst, "OLDPWD", oldpwd);
	ft_cd(*lst, tab[1]);
	chdir(ft_lst_returnvalue(*lst, "PWD"));
	ft_lst_changevalue(lst, "OLDPWD", oldpwd);
	ft_strdel(&oldpwd);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $0x0, (%rsp)
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0x12b8
cmpq $0x0, 0x10(%r14)
je 0x12b8
leaq 0x5d5f(%rip), %rsi      # 0x7004
movl $0x2, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3af8
movq (%rbx), %rdi
leaq 0x5d82(%rip), %rsi      # 0x7044
callq 0x2417
testq %rax, %rax
je 0x12e9
movq (%rbx), %rdi
leaq 0x5d6e(%rip), %rsi      # 0x7044
callq 0x2417
movq %rax, %rdi
callq 0x2bb0
movq %rax, (%rsp)
jmp 0x1313
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x10b0
movq %rax, (%rsp)
testq %rax, %rax
je 0x1382
leaq 0x5d3c(%rip), %rsi      # 0x7044
movq %rbx, %rdi
movq %rax, %rdx
callq 0x2378
movq (%rbx), %rdi
leaq 0x5d24(%rip), %rsi      # 0x7041
callq 0x2417
testq %rax, %rax
jne 0x133a
movq (%rsp), %rdx
leaq 0x5d0f(%rip), %rsi      # 0x7041
movq %rbx, %rdi
callq 0x2378
movq (%rbx), %rdi
movq 0x8(%r14), %rsi
callq 0x2127
movq (%rbx), %rdi
leaq 0x5cf4(%rip), %rsi      # 0x7044
callq 0x2417
movq %rax, %rdi
callq 0x1080
movq %rsp, %r14
movq (%r14), %rdx
leaq 0x5cd7(%rip), %rsi      # 0x7041
movq %rbx, %rdi
callq 0x2378
movq %r14, %rdi
callq 0x2d88
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5c96(%rip), %rsi      # 0x701f
movl $0x2, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3af8
// File: /workspace/github_c_makefile_star2_O1/ffoissey[P]minishell_42/srcs/ft_tool_minishell.c
// Function: ft_ctrlc
void	ft_ctrlc(int c)
{
	(void)c;
	if (g_glob.pid)
	{
		kill(g_glob.pid, SIGINT);
		g_glob.ret = c;
	}
	else
	{
		ft_putchar('\n');
		ft_print_prompt();
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0xaa37(%rip), %r14      # 0xc0d8
movl (%r14), %edi
testl %edi, %edi
je 0x16be
movl $0x2, %esi
callq 0x1110
movl %ebx, 0x4(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xa, %edi
callq 0x31ac
movq 0x8(%r14), %rdx
movq 0x10(%r14), %rsi
leaq 0x59d1(%rip), %rdi      # 0x70a8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x37a9
// File: /workspace/github_c_makefile_star2_O1/ffoissey[P]minishell_42/srcs/ft_tool_minishell.c
// Function: ft_set_global
void	ft_set_global(t_list_ex *lst)
{
	struct passwd	*pw;

	ft_free_global();
	if (!ft_lst_returnvalue(lst, "USER"))
	{
		pw = getpwuid(geteuid());
		g_glob.user = ft_strdup(pw->pw_name);
	}
	else
		g_glob.user = ft_strdup(ft_lst_returnvalue(lst, "USER"));
	g_glob.cur_dir = ft_curdir();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa9c8(%rip), %r14      # 0xc0d8
movq 0x8(%r14), %rdi
callq 0x1030
movq 0x10(%r14), %rdi
callq 0x1030
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
leaq 0x5972(%rip), %rsi      # 0x70a3
movq %rbx, %rdi
callq 0x2417
testq %rax, %rax
je 0x1752
leaq 0x595e(%rip), %rsi      # 0x70a3
movq %rbx, %rdi
callq 0x2417
movq %rax, %rdi
jmp 0x1761
callq 0x10a0
movl %eax, %edi
callq 0x1070
movq (%rax), %rdi
callq 0x2bb0
movq %rax, 0x10(%r14)
callq 0x1e24
movq %rax, 0x8(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq