LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/platform/input.cpp
// Function: Input::down(unsigned int, Input::Player)
b8 down(Name name, Player player) {
    BEGIN_BINDINGS_BLOCK {
        if (button.is_down()) return true;
    }
    END_BINDINGS_BLOCK
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x43878(%rip), %rax     # 0x4f2d8
cmpb $0x0, 0x40(%rax)
movl $0x0, %eax
jne 0xbb4b
movl %edi, %eax
movq %rax, -0x40(%rbp)
movb $0x1, %al
movq %rax, -0x38(%rbp)
xorl %ecx, %ecx
movl %esi, -0x2c(%rbp)
movl $0x1, %r13d
shll %cl, %r13d
btl %ecx, %esi
jae 0xbb23
movq %rcx, -0x48(%rbp)
shlq $0x20, %r13
movabsq $-0x10000000000, %rax   # imm = 0xFFFFFF0000000000
andq %rax, %r15
addq -0x40(%rbp), %r15
movl $0x4, %r12d
xorl %eax, %eax
movq %r15, %r14
movq %rax, %r15
movq %r14, %rbx
movabsq $-0xff00000001, %rax    # imm = 0xFFFFFF00FFFFFFFF
andq %rax, %rbx
leaq (%r15,%rbx), %r14
leaq 0x43804(%rip), %rdi     # 0x4f2d8
movq %r13, %rsi
movq %r14, %rdx
callq 0x2dcf6
andl $0x1, %edx
testl %eax, %eax
movl $0x7, %eax
cmovel %eax, %edx
cmpl $0x7, %edx
je 0xbaf5
testl %edx, %edx
jne 0xbb0c
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %r15, %rax
decq %r12
jne 0xbab6
movl $0x5, %edx
cmpl $0x5, %edx
movl $0x0, %eax
cmovel %eax, %edx
addq %rbx, %r15
movl -0x2c(%rbp), %esi
movq -0x48(%rbp), %rcx
jmp 0xbb28
movl $0x4, %edx
testb $0x3, %dl
jne 0xbb45
cmpl $0x3, %ecx
leal 0x1(%rcx), %eax
setb %cl
movq %rcx, -0x38(%rbp)
movl %eax, %ecx
cmpl $0x4, %eax
jne 0xba80
movq -0x38(%rbp), %rax
andb $0x1, %al
addq $0x28, %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/platform/input.cpp
// Function: Input::value(unsigned int, Input::Player)
f32 value(Name name, Player player) {
    u32 num_down = 0;
    f32 value = 0;
    BEGIN_BINDINGS_BLOCK {
        if (!button.is_down()) continue;
        num_down++;
        value += button.value * button.modifier;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x43766(%rip), %rax     # 0x4f2d8
xorps %xmm0, %xmm0
cmpb $0x0, 0x40(%rax)
jne 0xbc88
movl %edi, %eax
movq %rax, -0x40(%rbp)
xorl %ebx, %ebx
xorl %ecx, %ecx
movl %esi, -0x30(%rbp)
movl $0x1, %r8d
shll %cl, %r8d
btl %ecx, %esi
jae 0xbc66
movl %ecx, -0x34(%rbp)
shlq $0x20, %r8
movabsq $-0x10000000000, %rax   # imm = 0xFFFFFF0000000000
andq %rax, %rdx
addq -0x40(%rbp), %rdx
movl $0x4, %r15d
xorl %r13d, %r13d
movabsq $0x100000000, %r14      # imm = 0x100000000
movq %r8, -0x48(%rbp)
movss %xmm0, -0x2c(%rbp)
movq %rdx, %r12
movabsq $-0xff00000001, %rax    # imm = 0xFFFFFF00FFFFFFFF
andq %rax, %r12
leaq (%r12,%r13), %rdx
leaq 0x436eb(%rip), %rdi     # 0x4f2d8
movq %r8, %rsi
movq %rdx, -0x50(%rbp)
callq 0x2dcf6
testl %eax, %eax
setne %sil
movl %edx, %ecx
andb %sil, %cl
jne 0xbc0d
movss -0x2c(%rbp), %xmm0
jmp 0xbc2a
shrq $0x20, %rax
movd %eax, %xmm0
shrq $0x20, %rdx
movd %edx, %xmm1
mulss %xmm0, %xmm1
movss -0x2c(%rbp), %xmm0
addss %xmm1, %xmm0
movzbl %cl, %eax
addl %eax, %ebx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %rax, %r14
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r13
decq %r15
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %r8
jne 0xbbcd
subq %r14, %r12
movq %r12, %rdx
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %ecx
incl %ecx
cmpl $0x4, %ecx
jne 0xbb8c
testl %ebx, %ebx
je 0xbc85
movl %ebx, %eax
xorps %xmm1, %xmm1
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
jmp 0xbc88
xorps %xmm0, %xmm0
addq $0x28, %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/platform/input.cpp
// Function: Input::scale_screen_to_world(Vec2, unsigned int)
Vec2 scale_screen_to_world(Vec2 p, u32 camera_id = 0) {
    Renderer::Camera *camera = Renderer::fetch_camera(camera_id);
    const f32 inv_width = 1.0 / Renderer::get_window_width();
    const f32 scale_factor = 1.0 / camera->zoom;
    Vec2 opengl = V2( p.x * 2 * scale_factor * inv_width,
                     -p.y * 2 * scale_factor * inv_width);
    Vec2 world = opengl + V2(-scale_factor, scale_factor * camera->aspect_ratio);
    return world;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
movaps %xmm0, -0x20(%rbp)
xorl %ecx, %ecx
cmpl $0x2, %edi
setb %cl
leaq 0x2588e(%rip), %rdi     # 0x31543
leaq 0x258f6(%rip), %rdx     # 0x315b2
movl $0x52, %esi
callq 0x722f
movl %ebx, %eax
shlq $0x5, %rax
leaq 0x5f57d(%rip), %rcx     # 0x6b250
movss 0x24329(%rip), %xmm1    # 0x30004
movaps %xmm1, %xmm2
divss 0x5f5aa(%rip), %xmm2    # 0x6b290
divss 0x10(%rax,%rcx), %xmm1
movaps -0x20(%rbp), %xmm3
movaps %xmm3, %xmm0
addss %xmm3, %xmm0
mulss %xmm1, %xmm0
mulss %xmm2, %xmm0
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
addss %xmm3, %xmm3
mulss %xmm1, %xmm3
subss %xmm1, %xmm0
mulss 0x14(%rax,%rcx), %xmm1
mulss %xmm2, %xmm3
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/platform/input.cpp
// Function: Input::normalized_mouse_position()
Vec2 normalized_mouse_position() {
    const f32 inv_width = 1.0 / Renderer::get_window_width();
    Vec2 opengl = V2( mouse_position().x * 2 * inv_width,
                     -mouse_position().y * 2 * inv_width);
    Vec2 normalized = opengl + V2(-1, 1 * Renderer::get_window_aspect_ratio());
    return normalized;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x4349c(%rip), %rax     # 0x4f2d8
cvtsi2ssl 0x74(%rax), %xmm0
movss 0x241bb(%rip), %xmm1    # 0x30004
cvtsi2ssl 0x78(%rax), %xmm2
divss 0x5f43a(%rip), %xmm1    # 0x6b290
addss %xmm0, %xmm0
mulss %xmm1, %xmm0
addss %xmm2, %xmm2
mulss %xmm1, %xmm2
addss 0x243ba(%rip), %xmm0    # 0x30228
movss 0x5f422(%rip), %xmm1    # 0x6b298
subss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/platform/input.cpp
// Function: Input::world_mouse_move(unsigned int)
Vec2 world_mouse_move(u32 camera_id) {
    Vec2 p = mouse_move();
    Renderer::Camera *camera = Renderer::fetch_camera(camera_id);
    const f32 inv_width = 1.0 / Renderer::get_window_width();
    const f32 scale_factor = 1.0 / camera->zoom;
    Vec2 opengl = V2( p.x * 2 * scale_factor * inv_width,
            -p.y * 2 * scale_factor * inv_width);
    return opengl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq 0x4341b(%rip), %rax     # 0x4f2d8
cvtsi2ssl 0x7c(%rax), %xmm0
movaps %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
cvtsi2ssl 0x80(%rax), %xmm0
movaps %xmm0, -0x30(%rbp)
movl %edi, %ebx
xorl %ecx, %ecx
cmpl $0x2, %edi
setb %cl
leaq 0x2565d(%rip), %rdi     # 0x31543
leaq 0x256c5(%rip), %rdx     # 0x315b2
movl $0x52, %esi
callq 0x722f
movl %ebx, %eax
leaq 0x5f350(%rip), %rcx     # 0x6b250
movss 0x240fc(%rip), %xmm2    # 0x30004
movaps %xmm2, %xmm1
divss 0x5f37d(%rip), %xmm1    # 0x6b290
shlq $0x5, %rax
divss 0x10(%rax,%rcx), %xmm2
movaps -0x20(%rbp), %xmm0
addss %xmm0, %xmm0
mulss %xmm2, %xmm0
mulss %xmm1, %xmm0
movaps -0x30(%rbp), %xmm3
mulss 0x242df(%rip), %xmm3    # 0x30218
mulss %xmm2, %xmm3
mulss %xmm1, %xmm3
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/platform/input.cpp
// Function: Input::request_name(unsigned int)
Name request_name(u32 num) {
    ASSERT(global_mapping.next_name, "Invalid mapping name");
    ASSERT(global_mapping.num_total_bindings == 0, "Cannot add mappings as game is running");
    Name name = global_mapping.next_name;
    global_mapping.next_name += num;
    return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x432df(%rip), %r15     # 0x4f2d8
xorl %ecx, %ecx
cmpl $0x0, 0x90(%r15)
setne %cl
leaq 0x24eb2(%rip), %r14     # 0x30ebf
leaq 0x24fe7(%rip), %rdx     # 0x30ffb
movq %r14, %rdi
movl $0x120, %esi            # imm = 0x120
callq 0x722f
xorl %ecx, %ecx
cmpl $0x0, 0xc(%r15)
sete %cl
leaq 0x24ff8(%rip), %rdx     # 0x3102a
movq %r14, %rdi
movl $0x121, %esi            # imm = 0x121
callq 0x722f
movl 0x90(%r15), %eax
addl %eax, %ebx
movl %ebx, 0x90(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/platform/input.cpp
// Function: Input::init()
b8 init() {
    u32 number_of_bindings = global_mapping.next_name;
    global_mapping.num_bindings_per_controller = number_of_bindings * NUM_ALTERNATIVE_BINDINGS;
    global_mapping.num_total_bindings = (u32) Player::NUM * global_mapping.num_bindings_per_controller;

    global_mapping.arena = Util::request_arena();
    for (u32 i = 0; i < (u32) Player::NUM; i++)
        global_mapping.buttons[i] = global_mapping.arena->push<Mapping::VirtualButton>(global_mapping.num_bindings_per_controller);
    global_mapping.bindings = global_mapping.arena->push<Binding>(global_mapping.num_total_bindings);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x43270(%rip), %rbx     # 0x4f2d8
movl 0x90(%rbx), %eax
leal (,%rax,4), %ecx
movl %ecx, 0x8(%rbx)
shll $0x4, %eax
movl %eax, 0xc(%rbx)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xaf5a
movq %rax, (%rbx)
movq (%rbx), %rdi
movl 0x8(%rbx), %esi
callq 0x2dd8a
movq %rax, 0x20(%rbx,%r14,8)
incq %r14
cmpq $0x4, %r14
jne 0xc08b
movq (%rbx), %rdi
movl 0xc(%rbx), %esi
callq 0x2de8e
movq %rax, 0x18(%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/inc/glad/glad.c
// Function: gladLoadGL
int gladLoadGL(void) {
    int status = 0;

    if(open_gl()) {
        status = gladLoadGLLoader(&get_proc);
        close_gl();
    }

    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
leaq 0x24976(%rip), %r14     # 0x30a40
movslq (%rbx,%r14), %rdi
addq %r14, %rdi
movl $0x102, %esi            # imm = 0x102
callq 0x2410
movq %rax, 0x5f22e(%rip)     # 0x6b310
testq %rax, %rax
jne 0xc0f3
addq $0x4, %rbx
cmpq $0x4, %rbx
je 0xc0ca
jmp 0xc13a
leaq 0x26544(%rip), %rsi     # 0x3263e
movq %rax, %rdi
callq 0x2150
movq %rax, 0x5f20f(%rip)     # 0x6b318
testq %rax, %rax
je 0xc13a
leaq 0x10a48(%rip), %rdi     # 0x1cb5d
callq 0xc143
movl %eax, %ebx
movq 0x5f1ed(%rip), %rdi     # 0x6b310
testq %rdi, %rdi
je 0xc13c
callq 0x24c0
movq $0x0, 0x5f1d8(%rip) # 0x6b310
jmp 0xc13c
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/inc/glad/glad.c
// Function: get_proc(char const*)
static
void* get_proc(const char *namez) {
    void* result = NULL;
    if(libGL == NULL) return NULL;

#if !defined(__APPLE__) && !defined(__HAIKU__)
    if(gladGetProcAddressPtr != NULL) {
        result = gladGetProcAddressPtr(namez);
    }
#endif
    if(result == NULL) {
#if defined(_WIN32) || defined(__CYGWIN__)
        result = (void*)GetProcAddress((HMODULE) libGL, namez);
#else
        result = dlsym(libGL, namez);
#endif
    }

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq $0x0, 0x4e7a5(%rip)     # 0x6b310
je 0x1cb83
movq %rdi, %rbx
movq 0x4e7a1(%rip), %rax     # 0x6b318
testq %rax, %rax
je 0x1cb87
movq %rbx, %rdi
callq *%rax
jmp 0x1cb89
xorl %eax, %eax
jmp 0x1cb8e
xorl %eax, %eax
testq %rax, %rax
je 0x1cb95
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x4e774(%rip), %rdi     # 0x6b310
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2150
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::RenderQueue<Renderer::Impl::Vertex>::enable_attrib_pointer()
void RenderQueue<Vertex>::enable_attrib_pointer() {
    glEnableVertexAttribArray(0);
    glEnableVertexAttribArray(1);
    glEnableVertexAttribArray(2);
    glEnableVertexAttribArray(3);

    glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex),
                          (void *) offsetof(Vertex, position));
    glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex),
                          (void *) offsetof(Vertex, texture));
    glVertexAttribPointer(2, 1, GL_FLOAT, GL_FALSE, sizeof(Vertex),
                          (void *) offsetof(Vertex, sprite));
    glVertexAttribPointer(3, 4, GL_FLOAT, GL_FALSE, sizeof(Vertex),
                          (void *) offsetof(Vertex, color));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x44f4d(%rip), %rbx     # 0x64e48
xorl %edi, %edi
callq *(%rbx)
movl $0x1, %edi
callq *(%rbx)
movl $0x2, %edi
callq *(%rbx)
movl $0x3, %edi
callq *(%rbx)
leaq 0x45f3d(%rip), %rbx     # 0x65e58
xorl %edi, %edi
movl $0x2, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x24, %r8d
xorl %r9d, %r9d
callq *(%rbx)
movl $0x8, %r9d
movl $0x1, %edi
movl $0x2, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x24, %r8d
callq *(%rbx)
movl $0x10, %r9d
movl $0x2, %edi
movl $0x1, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x24, %r8d
callq *(%rbx)
movq (%rbx), %rax
movl $0x14, %r9d
movl $0x3, %edi
movl $0x4, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x24, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::RenderQueue<Renderer::Impl::SdfVertex>::enable_attrib_pointer()
void RenderQueue<SdfVertex>::enable_attrib_pointer() {
    glEnableVertexAttribArray(0);
    glEnableVertexAttribArray(1);
    glEnableVertexAttribArray(2);
    glEnableVertexAttribArray(3);
    glEnableVertexAttribArray(4);
    glEnableVertexAttribArray(5);
    glEnableVertexAttribArray(6);

    glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, position));
    glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, texture));
    glVertexAttribPointer(2, 1, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, sprite));
    glVertexAttribPointer(3, 4, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, color));
    glVertexAttribPointer(4, 1, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, low));
    glVertexAttribPointer(5, 1, GL_FLOAT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, high));
    glVertexAttribPointer(6, 1, GL_INT, GL_FALSE, sizeof(SdfVertex),
                          (void *) offsetof(SdfVertex, border));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x44ea1(%rip), %rbx     # 0x64e48
xorl %edi, %edi
callq *(%rbx)
movl $0x1, %edi
callq *(%rbx)
movl $0x2, %edi
callq *(%rbx)
movl $0x3, %edi
callq *(%rbx)
movl $0x4, %edi
callq *(%rbx)
movl $0x5, %edi
callq *(%rbx)
movl $0x6, %edi
callq *(%rbx)
leaq 0x45e7c(%rip), %rbx     # 0x65e58
xorl %edi, %edi
movl $0x2, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
xorl %r9d, %r9d
callq *(%rbx)
movl $0x8, %r9d
movl $0x1, %edi
movl $0x2, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
callq *(%rbx)
movl $0x10, %r9d
movl $0x2, %edi
movl $0x1, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
callq *(%rbx)
movl $0x14, %r9d
movl $0x3, %edi
movl $0x4, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
callq *(%rbx)
movl $0x24, %r9d
movl $0x4, %edi
movl $0x1, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
callq *(%rbx)
movl $0x28, %r9d
movl $0x5, %edi
movl $0x1, %esi
movl $0x1406, %edx           # imm = 0x1406
xorl %ecx, %ecx
movl $0x30, %r8d
callq *(%rbx)
movq (%rbx), %rax
movl $0x2c, %r9d
movl $0x6, %edi
movl $0x1, %esi
movl $0x1404, %edx           # imm = 0x1404
xorl %ecx, %ecx
movl $0x30, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::resize_window(int, int)
void resize_window(int width, int height) {
    recalculate_global_aspect_ratio(width, height);
    glViewport(0, 0, width, height);

    for (u32 cam = 0; cam < OPENGL_NUM_CAMERAS; cam++) {
        GLuint rbo = screen_rbos[cam];
        GLuint texture = screen_textures[cam];
        glBindTexture(GL_TEXTURE_2D, texture);
        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGB,
                GL_UNSIGNED_BYTE, NULL);

        glBindRenderbuffer(GL_RENDERBUFFER, rbo);
        glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8,
                width, height);
    }
    glBindRenderbuffer(GL_RENDERBUFFER, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %r14d
callq 0x20194
leaq 0x45d91(%rip), %rax     # 0x65e68
xorl %r12d, %r12d
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %ebx, %ecx
callq *(%rax)
leaq 0x456bc(%rip), %r13     # 0x657a8
leaq 0x4b119(%rip), %rax     # 0x6b20c
movl (%rax,%r12,4), %r15d
leaq 0x4b116(%rip), %rax     # 0x6b214
movl (%rax,%r12,4), %esi
movl $0xde1, %edi            # imm = 0xDE1
leaq 0x449a2(%rip), %rax     # 0x64ab0
callq *(%rax)
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1907, %edx           # imm = 0x1907
movl %r14d, %ecx
movl %ebx, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x1401                 # imm = 0x1401
pushq $0x1907                 # imm = 0x1907
leaq 0x458ec(%rip), %rax     # 0x65a28
callq *(%rax)
addq $0x20, %rsp
movl $0x8d41, %edi           # imm = 0x8D41
movl %r15d, %esi
leaq 0x44957(%rip), %rax     # 0x64aa8
callq *(%rax)
movl $0x8d41, %edi           # imm = 0x8D41
movl $0x88f0, %esi           # imm = 0x88F0
movl %r14d, %edx
movl %ebx, %ecx
callq *(%r13)
incq %r12
cmpq $0x1, %r12
je 0x200ec
leaq 0x4492e(%rip), %rax     # 0x64aa8
movq (%rax), %rax
movl $0x8d41, %edi           # imm = 0x8D41
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/camera.cpp
// Function: Renderer::recalculate_global_aspect_ratio(int, int)
void recalculate_global_aspect_ratio(int width, int height) {
    get_window()->width = width;
    get_window()->height = height;
    get_window()->aspect_ratio = (f32) height / (f32) width;

#if OPENGL_AUTO_APPLY_ASPECTRATIO_CHANGE
    for (u32 i = 0; i < OPENGL_NUM_CAMERAS; i++) {
        fetch_camera(i)->aspect_ratio = get_window()->aspect_ratio;
    }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
cvtsi2ss %edi, %xmm0
cvtsi2ss %esi, %xmm1
movss %xmm0, 0x4b0dd(%rip)    # 0x6b290
movss %xmm1, 0x4b0d9(%rip)    # 0x6b294
divss %xmm0, %xmm1
movss %xmm1, 0x4b0d1(%rip)    # 0x6b298
xorl %r15d, %r15d
leaq 0x4b07f(%rip), %r12     # 0x6b250
leaq 0x1136b(%rip), %rbx     # 0x31543
leaq 0x113d3(%rip), %r14     # 0x315b2
movss 0x4b0b1(%rip), %xmm0    # 0x6b298
movss %xmm0, -0x24(%rbp)
movq %rbx, %rdi
movl $0x52, %esi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x722f
movss -0x24(%rbp), %xmm0
movss %xmm0, 0x14(%r15,%r12)
addq $0x20, %r15
cmpq $0x20, %r15
je 0x201df
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::render_post_processing()
void render_post_processing() {
    post_process_shader_program.bind();

    // This needs to run every frame
    {
        for (u32 i = 0; i < OPENGL_NUM_CAMERAS; i++) {
            glBindTexture(GL_TEXTURE_2D, screen_textures[i]);
            glActiveTexture(GL_TEXTURE1 + i);
        }

        glUniform1iv(screen_texture_location, OPENGL_NUM_CAMERAS, &_fog_texture_indicies[0]);
        glUniform1i(num_screen_textures_location, _fog_num_active_cameras);
    }

    glBindVertexArray(screen_quad_vao);
    glDrawArrays(GL_TRIANGLES, 0, 6);
    glBindVertexArray(0);

    glBindTexture(GL_TEXTURE_2D, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x45686(%rip), %rax     # 0x65bc0
leaq 0x4aa93(%rip), %rcx     # 0x6afd4
movl (%rcx), %edi
callq *(%rax)
xorl %r14d, %r14d
leaq 0x44561(%rip), %rbx     # 0x64ab0
leaq 0x4acbe(%rip), %r15     # 0x6b214
leaq 0x444d3(%rip), %r12     # 0x64a30
movl (%r15,%r14,4), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq *(%rbx)
leal 0x84c1(%r14), %edi
callq *(%r12)
incq %r14
cmpq $0x1, %r14
je 0x2055d
leaq 0x4553d(%rip), %rax     # 0x65ac0
leaq 0x4ac9a(%rip), %rcx     # 0x6b224
movl (%rcx), %edi
leaq 0x4acb1(%rip), %rdx     # 0x6b244
movl $0x2, %esi
callq *(%rax)
leaq 0x45517(%rip), %rax     # 0x65ab8
leaq 0x4ac80(%rip), %rcx     # 0x6b228
movl (%rcx), %edi
leaq 0x3036b(%rip), %rcx     # 0x5091c
movl (%rcx), %esi
callq *(%rax)
leaq 0x444fc(%rip), %r14     # 0x64ab8
leaq 0x4ac59(%rip), %rax     # 0x6b21c
movl (%rax), %edi
callq *(%r14)
leaq 0x447f9(%rip), %rax     # 0x64dc8
movl $0x4, %edi
xorl %esi, %esi
movl $0x6, %edx
callq *(%rax)
xorl %edi, %edi
callq *(%r14)
movq (%rbx), %rax
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::push_sdf_quad(Vec2, Vec2, Vec2, Vec2, float, Vec4, float, float, unsigned char)
void push_sdf_quad(Vec2 min, Vec2 max, Vec2 min_uv, Vec2 max_uv,
                          f32 sprite, Vec4 color, f32 low, f32 high,
                          b8 border) {
    SdfVertex verticies[] = {
        {V2(min.x, min.y), V2(min_uv.x, max_uv.y), sprite, color, low, high,
         border},
        {V2(max.x, min.y), V2(max_uv.x, max_uv.y), sprite, color, low, high,
         border},
        {V2(max.x, max.y), V2(max_uv.x, min_uv.y), sprite, color, low, high,
         border},

        {V2(min.x, min.y), V2(min_uv.x, max_uv.y), sprite, color, low, high,
         border},
        {V2(max.x, max.y), V2(max_uv.x, min_uv.y), sprite, color, low, high,
         border},
        {V2(min.x, max.y), V2(min_uv.x, min_uv.y), sprite, color, low, high,
         border},
    };
    font_render_queue.push(LEN(verticies), verticies);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movaps %xmm0, %xmm8
shufps $0x1, %xmm1, %xmm8      # xmm8 = xmm8[1,0],xmm1[0,0]
shufps $0x42, %xmm3, %xmm8     # xmm8 = xmm8[2,0],xmm3[0,1]
movaps %xmm2, %xmm9
shufps $0x1, %xmm3, %xmm9      # xmm9 = xmm9[1,0],xmm3[0,0]
movaps %xmm3, %xmm10
shufps $0x1, %xmm2, %xmm10     # xmm10 = xmm10[1,0],xmm2[0,0]
movaps %xmm1, %xmm3
shufps $0x1, %xmm0, %xmm1      # xmm1 = xmm1[1,0],xmm0[0,0]
movaps %xmm0, %xmm11
shufps $0x24, %xmm10, %xmm11   # xmm11 = xmm11[0,1],xmm10[2,0]
movss 0x10(%rbp), %xmm0
leaq -0x120(%rbp), %rdx
movaps %xmm11, (%rdx)
movss %xmm4, 0x10(%rdx)
movlhps %xmm6, %xmm5            # xmm5 = xmm5[0],xmm6[0]
movups %xmm5, 0x14(%rdx)
movss %xmm7, 0x24(%rdx)
movss %xmm0, 0x28(%rdx)
movl %edi, 0x2c(%rdx)
movaps %xmm8, 0x30(%rdx)
movss %xmm4, 0x40(%rdx)
movups %xmm5, 0x44(%rdx)
movss %xmm7, 0x54(%rdx)
movss %xmm0, 0x58(%rdx)
movl %edi, 0x5c(%rdx)
shufps $0x24, %xmm9, %xmm3     # xmm3 = xmm3[0,1],xmm9[2,0]
movaps %xmm3, 0x60(%rdx)
movss %xmm4, 0x70(%rdx)
movups %xmm5, 0x74(%rdx)
movss %xmm7, 0x84(%rdx)
movss %xmm0, 0x88(%rdx)
movl %edi, 0x8c(%rdx)
movaps %xmm11, 0x90(%rdx)
movss %xmm4, 0xa0(%rdx)
movups %xmm5, 0xa4(%rdx)
movss %xmm7, 0xb4(%rdx)
movss %xmm0, 0xb8(%rdx)
movl %edi, 0xbc(%rdx)
movaps %xmm3, 0xc0(%rdx)
movss %xmm4, 0xd0(%rdx)
movups %xmm5, 0xd4(%rdx)
movss %xmm7, 0xe4(%rdx)
movss %xmm0, 0xe8(%rdx)
movl %edi, 0xec(%rdx)
shufps $0x42, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[0,1]
movaps %xmm1, 0xf0(%rdx)
movss %xmm4, 0x100(%rdx)
movups %xmm5, 0x104(%rdx)
movss %xmm7, 0x114(%rdx)
movss %xmm0, 0x118(%rdx)
movl %edi, 0x11c(%rdx)
leaq 0x4a74c(%rip), %rdi     # 0x6b1e0
movl $0x6, %esi
callq 0x2e190
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::push_quad(unsigned int, Vec2, Vec2, Vec2, Vec2, float, Vec4)
void push_quad(u32 layer, Vec2 min, Vec2 min_uv, Vec2 max, Vec2 max_uv,
                      f32 sprite, Vec4 color) {
    LAYER_CHECK(layer);
    Vertex verticies[] = {
        {V2(min.x, min.y), V2(min_uv.x, max_uv.y), sprite, color},
        {V2(max.x, min.y), V2(max_uv.x, max_uv.y), sprite, color},
        {V2(max.x, max.y), V2(max_uv.x, min_uv.y), sprite, color},

        {V2(min.x, min.y), V2(min_uv.x, max_uv.y), sprite, color},
        {V2(max.x, max.y), V2(max_uv.x, min_uv.y), sprite, color},
        {V2(min.x, max.y), V2(min_uv.x, min_uv.y), sprite, color},
    };
    sprite_render_queues[layer].push(LEN(verticies), verticies);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movaps %xmm6, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movss %xmm4, -0xc(%rbp)
movaps %xmm3, -0x40(%rbp)
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x20(%rbp)
movl %edi, %ebx
xorl %ecx, %ecx
cmpl $0x10, %edi
setb %cl
leaq 0x105a4(%rip), %rdi     # 0x31085
leaq 0x1061f(%rip), %rdx     # 0x31107
movl $0x1b6, %esi            # imm = 0x1B6
callq 0x722f
movaps -0x40(%rbp), %xmm8
movaps %xmm8, %xmm0
movaps -0x30(%rbp), %xmm2
shufps $0x1, %xmm2, %xmm0      # xmm0 = xmm0[1,0],xmm2[0,0]
movaps -0x20(%rbp), %xmm4
movaps %xmm4, %xmm1
shufps $0x24, %xmm0, %xmm1     # xmm1 = xmm1[0,1],xmm0[2,0]
leaq -0x150(%rbp), %rdx
movaps %xmm1, (%rdx)
movss -0xc(%rbp), %xmm7
movss %xmm7, 0x10(%rdx)
movaps -0x60(%rbp), %xmm3
unpcklpd -0x70(%rbp), %xmm3      # xmm3 = xmm3[0],mem[0]
movups %xmm3, 0x14(%rdx)
movaps %xmm4, %xmm0
movaps %xmm4, %xmm6
movaps -0x50(%rbp), %xmm5
shufps $0x1, %xmm5, %xmm0      # xmm0 = xmm0[1,0],xmm5[0,0]
shufps $0x42, %xmm8, %xmm0     # xmm0 = xmm0[2,0],xmm8[0,1]
movups %xmm0, 0x24(%rdx)
movss %xmm7, 0x34(%rdx)
movups %xmm3, 0x38(%rdx)
movaps %xmm2, %xmm0
movaps %xmm2, %xmm4
shufps $0x1, %xmm8, %xmm0      # xmm0 = xmm0[1,0],xmm8[0,0]
movaps %xmm5, %xmm2
shufps $0x24, %xmm0, %xmm2     # xmm2 = xmm2[0,1],xmm0[2,0]
movups %xmm2, 0x48(%rdx)
movss %xmm7, 0x58(%rdx)
movups %xmm3, 0x5c(%rdx)
movups %xmm1, 0x6c(%rdx)
movss %xmm7, 0x7c(%rdx)
movaps %xmm3, 0x80(%rdx)
movaps %xmm2, 0x90(%rdx)
movss %xmm7, 0xa0(%rdx)
movups %xmm3, 0xa4(%rdx)
movaps %xmm5, %xmm1
shufps $0x1, %xmm6, %xmm1      # xmm1 = xmm1[1,0],xmm6[0,0]
shufps $0x42, %xmm4, %xmm1     # xmm1 = xmm1[2,0],xmm4[0,1]
movups %xmm1, 0xb4(%rdx)
movss %xmm7, 0xc4(%rdx)
movups %xmm3, 0xc8(%rdx)
movl %ebx, %edi
shlq $0x5, %rdi
addq 0x2e41e(%rip), %rdi     # 0x4efe0
movl $0x6, %esi
callq 0x2e06a
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::push_triangle(unsigned int, Vec2, Vec2, Vec2, Vec2, Vec2, Vec2, Vec4, Vec4, Vec4, float)
void push_triangle(u32 layer, Vec2 p1, Vec2 p2, Vec2 p3,
                          Vec2 uv1, Vec2 uv2, Vec2 uv3,
                          Vec4 color1, Vec4 color2, Vec4 color3,
                          f32 sprite) {
    LAYER_CHECK(layer);
    Vertex verticies[] = {
        {p1, uv1, sprite, color1},
        {p2, uv2, sprite, color2},
        {p3, uv3, sprite, color3},
    };
    sprite_render_queues[layer].push(LEN(verticies), verticies);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xf8, %rsp
movaps %xmm7, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm5, -0x90(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm3, -0x30(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, -0x20(%rbp)
movl %edi, %ebx
xorl %ecx, %ecx
cmpl $0x10, %edi
setb %cl
leaq 0x10405(%rip), %rdi     # 0x31085
leaq 0x10480(%rip), %rdx     # 0x31107
movl $0x1cc, %esi            # imm = 0x1CC
callq 0x722f
movaps -0x20(%rbp), %xmm0
unpcklpd -0x30(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0]
leaq -0x100(%rbp), %rdx
movaps %xmm0, (%rdx)
movss 0x30(%rbp), %xmm0
movss %xmm0, 0x10(%rdx)
movaps -0x50(%rbp), %xmm1
unpcklpd -0x60(%rbp), %xmm1      # xmm1 = xmm1[0],mem[0]
movups %xmm1, 0x14(%rdx)
movaps -0x40(%rbp), %xmm1
unpcklpd -0x70(%rbp), %xmm1      # xmm1 = xmm1[0],mem[0]
movups %xmm1, 0x24(%rdx)
movss %xmm0, 0x34(%rdx)
movaps %xmm0, %xmm1
movaps 0x10(%rbp), %xmm0
movups %xmm0, 0x38(%rdx)
movaps -0x80(%rbp), %xmm0
unpcklpd -0x90(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0]
movups %xmm0, 0x48(%rdx)
movss %xmm1, 0x58(%rdx)
movaps 0x20(%rbp), %xmm0
movups %xmm0, 0x5c(%rdx)
movl %ebx, %edi
shlq $0x5, %rdi
addq 0x2e2de(%rip), %rdi     # 0x4efe0
movl $0x3, %esi
callq 0x2e06a
addq $0xf8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/opengl_renderer.cpp
// Function: Renderer::Impl::upload_texture(Image*, int)
FOG_EXPORT
u32 upload_texture(Image *image, s32 index) {
    ASSERT(0 <= index && index <= OPENGL_TEXTURE_DEPTH, "Invalid index.");
    ASSERT(0 < image->components && image->components < 5,
           "Invalid number of components");
    u32 data_format;
    switch (image->components) {
        case (1):
            data_format = GL_RED;
            break;
        case (2):
            data_format = GL_RG;
            break;
        case (3):
            data_format = GL_RGB;
            break;
        case (4):
            data_format = GL_RGBA;
            break;
        default:
            UNREACHABLE;
            return 0;
    }
#if FOG_VERBOSE // A verbose warning, usually just noise.
    CHECK(image->width == OPENGL_TEXTURE_WIDTH &&
              image->height == OPENGL_TEXTURE_HEIGHT,
          "Not using the entire texture 'slice'.");
#endif
    glBindTexture(GL_TEXTURE_2D_ARRAY, sprite_texture_array);
    glTexSubImage3D(GL_TEXTURE_2D_ARRAY, 0, 0, 0, index, image->width,
                    image->height, 1, data_format, GL_UNSIGNED_BYTE, image->data);
    return index;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
cmpl $0x101, %esi            # imm = 0x101
setb %cl
leaq 0x100f2(%rip), %r15     # 0x31085
leaq 0x101c4(%rip), %rdx     # 0x3115e
movq %r15, %rdi
movl $0x1f3, %esi            # imm = 0x1F3
callq 0x722f
movb 0x10(%r14), %al
decb %al
xorl %ecx, %ecx
cmpb $0x4, %al
setb %cl
leaq 0x101ce(%rip), %rdx     # 0x31189
movq %r15, %rdi
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x722f
movb 0x10(%r14), %al
decb %al
cmpb $0x4, %al
jae 0x21039
movzbl %al, %eax
leaq 0xf424(%rip), %rcx      # 0x30400
movl (%rcx,%rax,4), %r15d
leaq 0x43ac9(%rip), %rax     # 0x64ab0
leaq 0x4a212(%rip), %rcx     # 0x6b200
movl (%rcx), %esi
movl $0x8c1a, %edi           # imm = 0x8C1A
callq *(%rax)
leaq 0x44a8a(%rip), %rax     # 0x65a88
movl 0x8(%r14), %r9d
movl 0xc(%r14), %r10d
subq $0x8, %rsp
movl $0x8c1a, %edi           # imm = 0x8C1A
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebx, %r8d
pushq (%r14)
pushq $0x1401                 # imm = 0x1401
pushq %r15
pushq $0x1
pushq %r10
callq *(%rax)
addq $0x30, %rsp
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x2df90(%rip), %rax     # 0x4efd0
movq (%rax), %rsi
leaq 0xfb37(%rip), %rdi      # 0x30b81
leaq 0x10034(%rip), %rdx     # 0x31085
leaq 0x1017e(%rip), %r8      # 0x311d6
leaq 0xfb4f(%rip), %r9       # 0x30bae
movl $0x205, %ecx            # imm = 0x205
xorl %eax, %eax
callq 0x711f
callq 0x71d6
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2330
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/util/performance.cpp
// Function: Perf::_start_perf_clock(Perf::MarkerID, char const*)
void _start_perf_clock(MarkerID id, const char *name) {
    ASSERT(0 <= id && id < NUMBER_OF_MARKERS, "Invalid perf ID");
    volatile Clock *clock = clocks + id;
    clock->name = name;
    CHECK(!clock->active, "Starting allready started clock");
    clock->count++;
    if (!clock->active) {
        clock->active = true;
        clock->start = highp_now();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl %edi, %r14d
xorl %ecx, %ecx
cmpl $0xa, %edi
setb %cl
leaq 0xf64a(%rip), %rdi      # 0x316ee
leaq 0xf684(%rip), %rdx      # 0x3172f
movl $0x15, %esi
callq 0x722f
movslq %r14d, %rax
leaq (%rax,%rax,8), %rax
leaq 0x2e57d(%rip), %rcx     # 0x50640
leaq (%rcx,%rax,8), %r14
movq %rbx, (%r14)
cmpb $0x0, 0x8(%r14)
je 0x22103
movq 0x2cef8(%rip), %rax     # 0x4efd0
movq (%rax), %rsi
leaq 0xea91(%rip), %rdi      # 0x30b73
leaq 0xf605(%rip), %rdx      # 0x316ee
leaq 0xea8b(%rip), %r8       # 0x30b7b
leaq 0xf66b(%rip), %r9       # 0x31762
movl $0x18, %ecx
xorl %eax, %eax
callq 0x711f
incq 0x10(%r14)
cmpb $0x0, 0x8(%r14)
jne 0x2214b
movb $0x1, 0x8(%r14)
leaq -0x20(%rbp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2210
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
movq %rdx, 0x18(%r14)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/util/performance.cpp
// Function: Perf::_stop_perf_clock(Perf::MarkerID)
void _stop_perf_clock(MarkerID id) {
    ASSERT(0 <= id && id < NUMBER_OF_MARKERS, "Invalid perf ID");
    volatile Clock *clock = clocks + id;
    CHECK(clock->active, "Stopping allready stopped clock");
    if (!clock->active) return;
    clock->active = false;
    u64 now = highp_now();
    if (now < clock->start) {
        ERR("Performance clock error, invalid times for %s", clock->name);
        return;
    }
    clock->time += now - clock->start;

    if (clock->other_thread) {
        f64 time = clock->time / 1000.0f;
        clock->total_time += time;
        clock->last_time = time;
        clock->time = 0;
        clock->total_count += clock->count;
        clock->last_count = clock->count;
        clock->count = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edi, %ebx
xorl %ecx, %ecx
cmpl $0xa, %edi
setb %cl
leaq 0xf57e(%rip), %rdi      # 0x316ee
leaq 0xf5b8(%rip), %rdx      # 0x3172f
movl $0x21, %esi
callq 0x722f
movslq %ebx, %rax
leaq (%rax,%rax,8), %rax
leaq 0x2e4b1(%rip), %rcx     # 0x50640
leaq (%rcx,%rax,8), %r14
cmpb $0x0, 0x8(%r14)
jne 0x221cc
movq 0x2ce2f(%rip), %rax     # 0x4efd0
movq (%rax), %rsi
leaq 0xe9c8(%rip), %rdi      # 0x30b73
leaq 0xf53c(%rip), %rdx      # 0x316ee
leaq 0xe9c2(%rip), %r8       # 0x30b7b
leaq 0xf5d4(%rip), %r9       # 0x31794
movl $0x23, %ecx
xorl %eax, %eax
callq 0x711f
cmpb $0x0, 0x8(%r14)
je 0x222c7
movb $0x0, 0x8(%r14)
leaq -0x20(%rbp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2210
imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00
addq 0x8(%rbx), %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
cmpq 0x18(%r14), %rdx
jae 0x22251
movq 0x2cdb3(%rip), %rax     # 0x4efd0
movq (%rax), %rsi
movq (%r14), %rax
movq %rax, (%rsp)
leaq 0xea81(%rip), %rdi      # 0x30caf
leaq 0xf4b9(%rip), %rdx      # 0x316ee
leaq 0xf589(%rip), %r8       # 0x317c5
leaq 0xf593(%rip), %r9       # 0x317d6
movl $0x28, %ecx
xorl %eax, %eax
callq 0x711f
jmp 0x222c7
subq 0x18(%r14), %rdx
movq %rdx, %xmm0
punpckldq 0xe05e(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0xe066(%rip), %xmm0     # 0x302d0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd 0x20(%r14), %xmm1
movsd %xmm1, 0x20(%r14)
cmpb $0x0, 0x9(%r14)
je 0x222c7
movsd 0x20(%r14), %xmm0
divsd 0xe7e9(%rip), %xmm0     # 0x30a80
movsd 0x38(%r14), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x38(%r14)
movsd %xmm0, 0x28(%r14)
xorl %eax, %eax
movq %rax, 0x20(%r14)
movq 0x10(%r14), %rcx
addq %rcx, 0x40(%r14)
movq 0x10(%r14), %rcx
movq %rcx, 0x30(%r14)
movq %rax, 0x10(%r14)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::ParticleSystemInt::spawn(unsigned int)
void ParticleSystemInt::spawn(u32 num_particles) {
    ASSERT(particles, "Trying to use uninitalized/destroyed particle system");
    for (u32 i = 0; i < num_particles; i++) {
        if (head == tail) {
            if (!drop_oldest)
                return;
            head = (head + 1) % max_num_particles;
        }
        Particle new_particle = generate();
        particles[tail] = new_particle;
        tail = (tail + 1) % max_num_particles;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x88, %rsp
movl %esi, %ebx
movq %rdi, %r14
xorl %ecx, %ecx
cmpq $0x0, 0x118(%rdi)
setne %cl
leaq 0xf120(%rip), %rdi      # 0x31423
leaq 0xf141(%rip), %rdx      # 0x3144b
movl $0x76, %esi
callq 0x722f
testl %ebx, %ebx
je 0x2239d
leaq -0xa0(%rbp), %r15
movl 0x108(%r14), %eax
cmpl 0x10c(%r14), %eax
jne 0x2234f
cmpb $0x0, 0x12d(%r14)
je 0x2239d
incl %eax
xorl %edx, %edx
divl 0x110(%r14)
movl %edx, 0x108(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x2287a
movl 0x10c(%r14), %eax
movq %rax, %rcx
shlq $0x7, %rcx
leaq (%rcx,%rax,8), %rdi
addq 0x118(%r14), %rdi
movl $0x88, %edx
movq %r15, %rsi
callq 0x2090
movl 0x10c(%r14), %eax
incl %eax
xorl %edx, %edx
divl 0x110(%r14)
movl %edx, 0x10c(%r14)
decl %ebx
jne 0x22323
addq $0x88, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::ParticleSystemInt::update(float)
void ParticleSystemInt::update(f32 delta) {
    ASSERT(particles, "Trying to use uninitalized/destroyed particle system");
    u32 i = head;
    b8 move = true;
    do {
        particles[i].update(delta);
        if (move && !particles[i].alive) {
            u32 new_head = (head + 1) % max_num_particles;
            if (new_head != tail) {
                head = new_head;
            }
        } else {
            move = false;
        }
    } while ((i = (i + 1) % max_num_particles) != tail);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss %xmm0, -0x24(%rbp)
movq %rdi, %rbx
xorl %ecx, %ecx
cmpq $0x0, 0x118(%rdi)
setne %cl
leaq 0xf042(%rip), %rdi      # 0x31423
leaq 0xf063(%rip), %rdx      # 0x3144b
movl $0x84, %esi
callq 0x722f
movl 0x108(%rbx), %edx
movb $0x1, %r15b
movl %edx, %r14d
movq %r14, %rax
shlq $0x7, %rax
leaq (%rax,%r14,8), %r12
movq 0x118(%rbx), %rdi
addq %r12, %rdi
movss -0x24(%rbp), %xmm0
callq 0x22674
testb %r15b, %r15b
je 0x22431
movq 0x118(%rbx), %rax
cmpb $0x0, 0x9(%rax,%r12)
je 0x2244c
xorl %r15d, %r15d
incl %r14d
movl %r14d, %eax
xorl %edx, %edx
divl 0x110(%rbx)
cmpl 0x10c(%rbx), %edx
jne 0x223fb
jmp 0x2246f
movl 0x108(%rbx), %eax
incl %eax
xorl %edx, %edx
divl 0x110(%rbx)
movb $0x1, %r15b
cmpl 0x10c(%rbx), %edx
je 0x22434
movl %edx, 0x108(%rbx)
jmp 0x22434
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::ParticleSystemInt::draw()
void ParticleSystemInt::draw() {
    ASSERT(particles, "Trying to use uninitalized/destroyed particle system");
    u32 i = head;
    Vec2 p = relative ? position : V2(0, 0);
    do {
        i %= max_num_particles;
        if (num_sprites) {
            AssetID sprite = sprites[particles[i].sprite];
            particles[i].render(layer, p, sprite);
        } else {
            particles[i].render(layer, p, Asset::ASSET_ID_NO_ASSET);
        }
    } while ((i = (i + 1) % max_num_particles) != tail);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %ecx, %ecx
cmpq $0x0, 0x118(%rdi)
setne %cl
leaq 0xef7b(%rip), %rdi      # 0x31423
leaq 0xef9c(%rip), %rdx      # 0x3144b
movl $0x95, %esi
callq 0x722f
cmpb $0x0, 0x128(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
je 0x224d5
movsd 0x130(%rbx), %xmm0
movaps %xmm0, -0x20(%rbp)
movl 0x108(%rbx), %edx
movl %edx, %eax
xorl %edx, %edx
divl 0x110(%rbx)
movl %edx, %r14d
movq %r14, %rax
shlq $0x7, %rax
leaq (%rax,%r14,8), %rdi
addq 0x118(%rbx), %rdi
cmpl $0x0, (%rbx)
je 0x2250e
movswq 0x80(%rdi), %rax
movq 0x8(%rbx,%rax,8), %rdx
jmp 0x22513
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl 0x4(%rbx), %esi
movaps -0x20(%rbp), %xmm0
callq 0x22742
incl %r14d
movl %r14d, %eax
xorl %edx, %edx
divl 0x110(%rbx)
cmpl 0x10c(%rbx), %edx
jne 0x224db
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::ParticleSystemInt::clear()
void ParticleSystemInt::clear() {
    for (u32 i = 0; i < max_num_particles; i++) {
        particles[i].alive = false;
    }
    tail = 0;
    head = 1;
}

// Assembly:
movl 0x110(%rdi), %ecx
testq %rcx, %rcx
je 0x225b5
pushq %rbp
movq %rsp, %rbp
movq 0x118(%rdi), %rax
movq %rcx, %rdx
shlq $0x7, %rdx
leaq (%rdx,%rcx,8), %rcx
xorl %edx, %edx
movb $0x0, 0x9(%rax,%rdx)
addq $0x88, %rdx
cmpq %rdx, %rcx
jne 0x225a3
popq %rbp
movq $0x1, 0x108(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::ParticleSystemInt::add_sprite(unsigned long long)
void ParticleSystemInt::add_sprite(AssetID sprite){
    ASSERT(particles, "Trying to use uninitalized/destroyed particle system");
    ASSERT(Asset::is(sprite, Asset::Type::SPRITE), "Invalid sprite given to particle system.");
    ASSERT(num_sprites != MAX_NUM_SUB_SPRITES,
            "Too manu subsprites in particle system");
    sprites[num_sprites++] = sprite;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
cmpq $0x0, 0x118(%rdi)
setne %cl
leaq 0xee33(%rip), %rdi      # 0x31423
leaq 0xee54(%rip), %rdx      # 0x3144b
movl $0xac, %esi
callq 0x722f
leaq 0x48ca0(%rip), %rax     # 0x6b2a8
cmpq %rbx, (%rax)
jae 0x22611
xorl %eax, %eax
jmp 0x22620
movq 0x28(%rax), %rax
imulq $0x38, %rbx, %rcx
cmpl $0x3, (%rax,%rcx)
sete %al
movzbl %al, %ecx
leaq 0xedf9(%rip), %r15      # 0x31423
leaq 0xee5a(%rip), %rdx      # 0x3148b
movq %r15, %rdi
movl $0xad, %esi
callq 0x722f
xorl %ecx, %ecx
cmpl $0x20, (%r14)
setne %cl
leaq 0xee8e(%rip), %rdx      # 0x314dc
movq %r15, %rdi
movl $0xaf, %esi
callq 0x722f
movl (%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, (%r14)
movq %rbx, 0x8(%r14,%rax,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::Particle::update(float)
void Particle::update(f32 delta) {
    alive = alive && (keep_alive || progress < 1.0);
    if (!alive) return;
    progress += inv_alive_time * delta;
    velocity += acceleration * delta;
    position += velocity * delta;
    velocity *= pow(damping, delta);
    rotation += angular_velocity * delta;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x9(%rdi)
je 0x2268f
cmpb $0x0, 0x8(%rbx)
je 0x22698
movb $0x1, 0x9(%rbx)
jmp 0x226ad
movb $0x0, 0x9(%rbx)
jmp 0x2273b
movss 0xd964(%rip), %xmm1     # 0x30004
ucomiss (%rbx), %xmm1
seta 0x9(%rbx)
jbe 0x2273b
movss 0x4(%rbx), %xmm1
mulss %xmm0, %xmm1
addss (%rbx), %xmm1
movss %xmm1, (%rbx)
movss 0x24(%rbx), %xmm2
mulss %xmm0, %xmm2
movss 0x28(%rbx), %xmm3
mulss %xmm0, %xmm3
addss 0x1c(%rbx), %xmm2
movss %xmm2, 0x1c(%rbx)
addss 0x20(%rbx), %xmm3
movss %xmm3, 0x20(%rbx)
mulss %xmm0, %xmm2
mulss %xmm0, %xmm3
movaps %xmm0, %xmm1
movss %xmm0, -0xc(%rbp)
addss 0x14(%rbx), %xmm2
movss %xmm2, 0x14(%rbx)
addss 0x18(%rbx), %xmm3
movss %xmm3, 0x18(%rbx)
movss 0x2c(%rbx), %xmm0
callq 0x23f0
movss 0x1c(%rbx), %xmm1
mulss %xmm0, %xmm1
mulss 0x20(%rbx), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movlps %xmm1, 0x1c(%rbx)
movss -0xc(%rbp), %xmm0
mulss 0x10(%rbx), %xmm0
addss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/particle_system.cpp
// Function: Renderer::Particle::render(unsigned int, Vec2, unsigned long long)
void Particle::render(u32 layer, Vec2 origin, AssetID sprite) {
    if (!alive) return;
    f32 progress_mod;
    if (keep_alive) progress_mod = MOD(progress, 1.0);
    else progress_mod = MIN(progress, 1.0);
    Vec2 render_dim = dim * (*progress_func_size)(spawn_size, spawn_size_deriv, die_size, die_size_deriv, progress_mod);
    Vec4 color = (*progress_func_color)(spawn_color, spawn_color_deriv, die_color, die_color_deriv, progress_mod);
    if (sprite == Asset::ASSET_ID_NO_ASSET) {
        Renderer::push_sprite_rect(
                layer,
                -1,
                position + origin,
                render_dim,
                rotation,
                V2(0, 0), V2(0, 0),
                color);
    } else {
        Renderer::push_sprite(
                layer,
                sprite,
                position + origin,
                render_dim,
                rotation,
                color);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, 0x9(%rdi)
je 0x2278e
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movaps %xmm0, -0x40(%rbp)
cmpb $0x0, 0x8(%rdi)
movss (%rdi), %xmm4
je 0x22799
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0x2100
movsd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
xorps %xmm4, %xmm4
cvtsd2ss %xmm1, %xmm4
jmp 0x227a1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
minss 0xd863(%rip), %xmm4     # 0x30004
movq 0x40(%r15), %rax
movss 0x30(%r15), %xmm0
movss 0x34(%r15), %xmm1
movss 0x38(%r15), %xmm2
movss 0x3c(%r15), %xmm3
movss %xmm4, -0x1c(%rbp)
callq *(%rax)
movss 0x48(%r15), %xmm1
mulss %xmm0, %xmm1
mulss 0x4c(%r15), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, -0x30(%rbp)
movq 0x78(%r15), %rax
movsd 0x50(%r15), %xmm0
movsd 0x58(%r15), %xmm1
movss 0x60(%r15), %xmm2
movsd 0x64(%r15), %xmm3
movsd 0x6c(%r15), %xmm4
movss 0x74(%r15), %xmm5
movss -0x1c(%rbp), %xmm6
callq *(%rax)
movaps %xmm0, %xmm5
movaps %xmm1, %xmm6
movss 0x14(%r15), %xmm0
movaps -0x40(%rbp), %xmm1
addss %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
addss 0x18(%r15), %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0xc(%r15), %xmm2
cmpq %rax, %r14
jne 0x2285b
xorps %xmm3, %xmm3
xorps %xmm4, %xmm4
movl %ebx, %edi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movaps -0x30(%rbp), %xmm1
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21b85
movl %ebx, %edi
movq %r14, %rsi
movaps -0x30(%rbp), %xmm1
movaps %xmm5, %xmm3
movaps %xmm6, %xmm4
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x217fc
nop
// File: /workspace/github_c_makefile_star2_O1/FredTheDino[P]Fog/src/engine/renderer/camera.cpp
// Function: Renderer::turn_on_camera(unsigned int)
void turn_on_camera(u32 camera_id) {
    ASSERT(camera_id < OPENGL_NUM_CAMERAS, "Invalid camera id");
    u32 bit = (camera_id == 0) ? 1 : (1 << camera_id);
    if (bit & _fog_active_cameras) return;
    _fog_active_cameras |= 1 << camera_id;
    _fog_num_active_cameras++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %ecx, %ecx
cmpl $0x2, %edi
setb %cl
leaq 0xe593(%rip), %rdi      # 0x31543
leaq 0xe5ab(%rip), %rdx      # 0x31562
movl $0x10, %esi
callq 0x722f
movl $0x1, %eax
movl %ebx, %ecx
shll %cl, %eax
leaq 0x2d947(%rip), %rcx     # 0x50918
movl (%rcx), %edx
btl %ebx, %edx
jb 0x22fe5
orl %eax, %edx
movl %edx, (%rcx)
leaq 0x2d939(%rip), %rax     # 0x5091c
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq