LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: whichBranch
static AABBtree *whichBranch(AABBtree *tree, BoundingSphere *bs){
    float radius = bs->r;
    float ov = radius * radius * radius;
    float bv = (tree->max.x - tree->min.x) *
	(tree->max.y - tree->min.y) * (tree->max.z - tree->min.z);
    if (!tree->split ||
	(tree->extentsCorrect && (ov > bv/8) &&
	 (tree->nodes.size != tree->nodes.capacity)))
	return tree;
    int x = 0, y =0, z = 0;
    if (tree->split & SPLIT_X){
	if (bs->x + radius < tree->splitPoint.x)
	    x = 0;
	else if (bs->x - radius > tree->splitPoint.x)
	    x = 2;
	else x = 1;
    }
    if (tree->split & SPLIT_Y){
	if (bs->y + radius < tree->splitPoint.y)
	    y = 0;
	else if (bs->y - radius > tree->splitPoint.y)
	    y = 2;
	else y = 1;
    }
    if (tree->split & SPLIT_Z){
	if (bs->z + radius < tree->splitPoint.z)
	    z = 0;
	else if (bs->z - radius > tree->splitPoint.z)
	    z = 2;
	else z = 1;
    }
    int i = x + y*3 + z*9;
    if (tree->children[i])
	return tree->children[i];
    else
	return tree->children[i] = newTree(tree->pool, tree);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0xe8(%rdi), %eax
testw %ax, %ax
je 0x7e44
movss 0xc(%rsi), %xmm0
cmpb $0x1, 0x110(%rbx)
jne 0x7e24
movss 0x104(%rbx), %xmm1
movss 0x108(%rbx), %xmm2
subss 0xf8(%rbx), %xmm1
subss 0xfc(%rbx), %xmm2
mulss %xmm1, %xmm2
movss 0x10c(%rbx), %xmm1
subss 0x100(%rbx), %xmm1
mulss %xmm2, %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
mulss %xmm0, %xmm2
mulss 0x3299(%rip), %xmm1     # 0xb0a8
ucomiss %xmm1, %xmm2
jbe 0x7e24
movq 0x120(%rbx), %rcx
cmpq 0x128(%rbx), %rcx
jne 0x7e44
testb $0x1, %al
je 0x7e40
movss (%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xec(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x7e4c
xorl %ecx, %ecx
jmp 0x7e5b
movq %rbx, %r14
jmp 0x7f32
subss %xmm0, %xmm1
xorl %ecx, %ecx
ucomiss %xmm2, %xmm1
seta %cl
incq %rcx
testb $0x2, %al
je 0x7e78
movss 0x4(%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xf0(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x7e7d
xorl %r12d, %r12d
jmp 0x7e91
subss %xmm0, %xmm1
xorl %edx, %edx
ucomiss %xmm2, %xmm1
seta %dl
leaq (%rdx,%rdx,2), %r12
addq $0x3, %r12
testb $0x4, %al
je 0x7eae
movss 0x8(%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xf4(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x7eb2
xorl %eax, %eax
jmp 0x7ec6
subss %xmm0, %xmm1
xorl %eax, %eax
ucomiss %xmm2, %xmm1
seta %al
leaq (%rax,%rax,8), %rax
addq $0x9, %rax
addq %rcx, %r12
addq %rax, %r12
movq 0x8(%rbx,%r12,8), %r14
testq %r14, %r14
jne 0x7f32
movq 0xe0(%rbx), %r15
movq %r15, %rdi
callq 0x43a0
movq %rax, %r14
leaq 0x118(%rax), %rdi
leaq 0x138(%rax), %rsi
movl $0x2d, %edx
callq 0x4350
movq %rbx, (%r14)
movq %r15, 0xe0(%r14)
movl $0x0, 0xe8(%r14)
movb $0x0, 0x110(%r14)
leaq 0x8(%r14), %rdi
movl $0xd8, %edx
xorl %esi, %esi
callq 0x41a0
movq %r14, 0x8(%rbx,%r12,8)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: growExtents
static void growExtents(AABBtree *tree, BoundingSphere *bs){
    AABBtree *t = tree;
    do {
	t->max.x = fmax(t->max.x, bs->x + bs->r);
	t->max.y = fmax(t->max.y, bs->y + bs->r);
	t->max.z = fmax(t->max.z, bs->z + bs->r);
	t->min.x = fmin(t->min.x, bs->x - bs->r);
	t->min.y = fmin(t->min.y, bs->y - bs->r);
	t->min.z = fmin(t->min.z, bs->z - bs->r);
    } while ((t = t->parent));
   
}

// Assembly:
movss 0xc(%rsi), %xmm6
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
movaps %xmm0, %xmm2
addss %xmm6, %xmm2
movaps %xmm6, %xmm3
addss %xmm1, %xmm3
movss 0x8(%rsi), %xmm4
movaps %xmm6, %xmm5
addss %xmm4, %xmm5
subss %xmm6, %xmm0
subss %xmm6, %xmm1
subss %xmm6, %xmm4
movss 0x104(%rdi), %xmm6
movaps %xmm2, %xmm7
maxss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm2, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0x104(%rdi)
movss 0x108(%rdi), %xmm6
movaps %xmm3, %xmm7
maxss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm3, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0x108(%rdi)
movss 0x10c(%rdi), %xmm6
movaps %xmm5, %xmm7
maxss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm5, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0x10c(%rdi)
movss 0xf8(%rdi), %xmm6
movaps %xmm0, %xmm7
minss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm0, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0xf8(%rdi)
movss 0xfc(%rdi), %xmm6
movaps %xmm1, %xmm7
minss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm1, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0xfc(%rdi)
movss 0x100(%rdi), %xmm6
movaps %xmm4, %xmm7
minss %xmm6, %xmm7
cmpunordss %xmm6, %xmm6
movaps %xmm6, %xmm8
andps %xmm4, %xmm8
andnps %xmm7, %xmm6
orps %xmm8, %xmm6
movss %xmm6, 0x100(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x7f9a
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: shrinkExtents
static void shrinkExtents(AABBtree *tree, BoundingSphere *bs){
    AABBtree *t = tree;
    do {
	if (bs->x - bs->r <= t->min.x ||
	    bs->y - bs->r <= t->min.y ||
	    bs->z - bs->r <= t->min.z ||
	    bs->x + bs->r >= t->max.x ||
	    bs->y + bs->r >= t->max.y ||
	    bs->z + bs->r >= t->max.z)
	    t->extentsCorrect = false;
    } while ((t = t->parent));
}

// Assembly:
movss (%rsi), %xmm0
movss 0xc(%rsi), %xmm1
movaps %xmm0, %xmm2
subss %xmm1, %xmm2
addss %xmm1, %xmm0
movss 0xf8(%rdi), %xmm3
ucomiss %xmm2, %xmm3
jae 0x811f
movss 0x4(%rsi), %xmm3
movaps %xmm3, %xmm4
subss %xmm1, %xmm4
movss 0xfc(%rdi), %xmm5
ucomiss %xmm4, %xmm5
jae 0x811f
movss 0x8(%rsi), %xmm4
movaps %xmm4, %xmm5
subss %xmm1, %xmm5
movss 0x100(%rdi), %xmm6
ucomiss %xmm5, %xmm6
jae 0x811f
ucomiss 0x104(%rdi), %xmm0
jae 0x811f
addss %xmm1, %xmm3
ucomiss 0x108(%rdi), %xmm3
jae 0x811f
addss %xmm1, %xmm4
ucomiss 0x10c(%rdi), %xmm4
jb 0x8126
movb $0x0, 0x110(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x80bd
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: maybeKillTree
static void maybeKillTree(AABBtree *tree){
    int i;
    if (tree->parent && tree->nodes.size == 0){
	for (i = 0; i < 27; i++)
	    if (tree->children[i]) return;
#ifdef DEBUG
        printf("Killing tree ");
        printTree(tree);
        printf("\n");
#endif
	removeChild(tree->parent, tree);
	deleteTree(tree);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x8145
cmpq $0x0, 0x120(%rbx)
je 0x8147
popq %rbx
retq
movl $0x1, %eax
cmpq $0x0, (%rbx,%rax,8)
jne 0x8145
incq %rax
cmpq $0x1c, %rax
jne 0x814c
movb $0x1, %al
movl $0x1, %ecx
movq (%rdi,%rcx,8), %rdx
testq %rdx, %rdx
je 0x817d
cmpq %rbx, %rdx
je 0x8175
xorl %eax, %eax
jmp 0x817d
movq $0x0, (%rdi,%rcx,8)
incq %rcx
cmpq $0x1c, %rcx
jne 0x8163
testb $0x1, %al
je 0x8193
movw $0x0, 0xe8(%rdi)
callq 0x812f
leaq 0x118(%rbx), %rdi
callq 0x43e0
movq 0xe0(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x4400
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: treeMap
static void treeMap(AABBtree *tree, void (*func)(Node *)){
#ifdef DEBUG
    nTrees++;
#endif 
    int i;
    for (i = 0; i < tree->nodes.size; i++)
	func(tree->nodes.data[i]);
    for (i = 0; i < 27; i++){
	AABBtree *child = tree->children[i];
	if (child)
	    treeMap(child, func);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpq $0x0, 0x120(%rdi)
je 0x87cb
xorl %r15d, %r15d
movq 0x118(%r14), %rax
movq (%rax,%r15,8), %rdi
callq *%rbx
incq %r15
cmpq %r15, 0x120(%r14)
ja 0x87b2
movl $0x1, %r15d
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0x87e2
movq %rbx, %rsi
callq 0x879a
incq %r15
cmpq $0x1c, %r15
jne 0x87d1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: setSplitLocation
static void setSplitLocation(AABBtree *tree){
    float x = 0, y = 0, z= 0;
    int i;
    for (i = 0; i < tree->nodes.size; i++){
	BoundingSphere *bs =
	    ((Node *) tree->nodes.data[i])->boundingSphere;
	x += bs->x;
	y += bs->y;
	z += bs->z;
    }
    x /= i; y /= i; z /= i;
    Point p = {x, y, z};
    tree->splitPoint = p;
}

// Assembly:
movq 0x120(%rdi), %rax
testq %rax, %rax
je 0x8b6b
movq 0x118(%rdi), %rcx
xorps %xmm0, %xmm0
xorl %edx, %edx
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
movq (%rcx,%rdx,8), %rsi
movq (%rsi), %rsi
addss (%rsi), %xmm0
addss 0x4(%rsi), %xmm2
addss 0x8(%rsi), %xmm1
incq %rdx
cmpq %rdx, %rax
jne 0x8b48
cvtsi2ss %eax, %xmm3
jmp 0x8b77
xorps %xmm3, %xmm3
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
xorps %xmm0, %xmm0
divss %xmm3, %xmm0
divss %xmm3, %xmm2
divss %xmm3, %xmm1
movss %xmm0, 0xec(%rdi)
movss %xmm2, 0xf0(%rdi)
movss %xmm1, 0xf4(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsFurtherFromCamera
int hpsFurtherFromCamera(const HPScamera *camera, const float *a, const float *b){
    float m, n, mx, my, mz, nx, ny, nz;
    HPMpoint c = camera->position;
    mx = a[0] - c.x;
    my = a[1] - c.y;
    mz = a[2] - c.z;
    m =  mx*mx + my*my + mz*mz;
    nx = b[0] - c.x;
    ny = b[1] - c.y;
    nz = b[2] - c.z;
    n =  nx*nx + ny*ny + nz*nz;
    if (m > n) return -1;
    else if (m < n) return 1;
    return 0;
}

// Assembly:
movss 0xc(%rdi), %xmm1
movss 0x10(%rdi), %xmm2
movss 0x14(%rdi), %xmm3
movss (%rsi), %xmm4
movss 0x4(%rsi), %xmm5
subss %xmm1, %xmm4
subss %xmm2, %xmm5
movss 0x8(%rsi), %xmm0
subss %xmm3, %xmm0
mulss %xmm5, %xmm5
mulss %xmm4, %xmm4
addss %xmm5, %xmm4
mulss %xmm0, %xmm0
addss %xmm4, %xmm0
movss (%rdx), %xmm4
movss 0x4(%rdx), %xmm5
subss %xmm1, %xmm4
subss %xmm2, %xmm5
movss 0x8(%rdx), %xmm1
subss %xmm3, %xmm1
mulss %xmm5, %xmm5
mulss %xmm4, %xmm4
addss %xmm5, %xmm4
mulss %xmm1, %xmm1
addss %xmm4, %xmm1
xorl %ecx, %ecx
ucomiss %xmm0, %xmm1
seta %cl
ucomiss %xmm1, %xmm0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsBSCloserToCamera
int hpsBSCloserToCamera(const HPScamera *camera, const float *a, const float *b){
    float m, n;
    camera->sort((HPMpoint *) a, (HPMpoint *) b, &m, &n);
    float mr = m - a[3];
    float nr = n - b[3];
    if (mr < nr) return -1;
    else if (mr > nr) return 1;
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rax
leaq 0x4(%rsp), %r15
movq %rsp, %r12
movq %rsi, %rdi
movq %rdx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq *0x1e0(%rax)
movss (%r15), %xmm0
subss 0xc(%r14), %xmm0
movss (%r12), %xmm1
subss 0xc(%rbx), %xmm1
xorl %ecx, %ecx
ucomiss %xmm1, %xmm0
seta %cl
ucomiss %xmm0, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsBSFurtherFromCamera
int hpsBSFurtherFromCamera(const HPScamera *camera, const float *a, const float *b){
    float m, n, mx, my, mz, nx, ny, nz, mr, nr;
    HPMpoint c = camera->position;
    mr = a[3];
    nr = b[3];
    mx = a[0] - c.x - mr;
    my = a[1] - c.y - mr;
    mz = a[2] - c.z - mr;
    m =  mx*mx + my*my + mz*mz;
    nx = b[0] - c.x - nr;
    ny = b[1] - c.y - nr;
    nz = b[2] - c.z - nr;
    n =  nx*nx + ny*ny + nz*nz;
    if (m > n) return -1;
    else if (m < n) return 1;
    return 0;
}

// Assembly:
movss 0xc(%rdi), %xmm4
movss 0x10(%rdi), %xmm3
movss 0x14(%rdi), %xmm1
movss 0xc(%rsi), %xmm5
movss 0xc(%rdx), %xmm2
movss (%rsi), %xmm6
movss 0x4(%rsi), %xmm7
subss %xmm4, %xmm6
subss %xmm5, %xmm6
subss %xmm3, %xmm7
subss %xmm5, %xmm7
movss 0x8(%rsi), %xmm0
subss %xmm1, %xmm0
subss %xmm5, %xmm0
mulss %xmm7, %xmm7
mulss %xmm6, %xmm6
addss %xmm7, %xmm6
mulss %xmm0, %xmm0
addss %xmm6, %xmm0
movss (%rdx), %xmm5
movss 0x4(%rdx), %xmm6
subss %xmm4, %xmm5
subss %xmm2, %xmm5
subss %xmm3, %xmm6
subss %xmm2, %xmm6
movss 0x8(%rdx), %xmm3
subss %xmm1, %xmm3
subss %xmm2, %xmm3
mulss %xmm6, %xmm6
mulss %xmm5, %xmm5
addss %xmm6, %xmm5
mulss %xmm3, %xmm3
addss %xmm5, %xmm3
xorl %ecx, %ecx
ucomiss %xmm0, %xmm3
seta %cl
ucomiss %xmm3, %xmm0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: addToQueue
static void addToQueue(Node *node){
    HPSnode *n = (HPSnode *) node->data;
    if (n->pipeline){
        if (n->pipeline->isAlpha){
            hpsPush(&alphaQueue, n);
        } else {
            hpsPush(&renderQueue, n);
        }
    }
    if (n->extension){
        hpsVisibleExtensionNode(n);
    }
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rbx
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x9489
leaq 0x60dd(%rip), %rcx      # 0xf550
leaq 0x60b6(%rip), %rdi      # 0xf530
cmpb $0x0, (%rax)
cmovneq %rcx, %rdi
movq %rbx, %rsi
callq 0x4270
cmpq $0x0, 0x78(%rbx)
je 0x9499
movq %rbx, %rdi
popq %rbx
jmp 0x41e0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsMakeCamera
HPScamera *hpsMakeCamera(HPScameraType type, HPScameraStyle style, HPSscene *scene, float width, float height){
    HPScamera *camera = malloc(sizeof(struct camera));
    camera->n = HPS_DEFAULT_NEAR_PLANE;
    camera->f = HPS_DEFAULT_FAR_PLANE;
    camera->viewAngle = HPS_DEFAULT_VIEW_ANGLE;
    camera->position.x = 0.0;
    camera->position.y = 0.0;
    camera->position.z = 0.0;
    camera->up.x = 0.0;
    camera->up.y = 1.0;
    camera->up.z = 0.0;
    camera->object.x = 0.0;
    camera->object.y = 0.0;
    camera->object.z = 0.0;
    camera->rotation.x = 0;
    camera->rotation.y = 0;
    camera->rotation.z = 0;
    camera->rotation.w = 1;
    camera->vw = width; camera->vh = height;
    camera->vwRatio = 1.0; camera->vhRatio = 1.0;
    camera->vl = -1.0; camera->vr = 1.0;
    camera->vb = -1.0; camera->vt = 1.0;
    camera->vx = 0.0; camera->vy = 0.0;
    camera->viewportIsStatic = false;
    if (type == HPS_ORTHO)
        camera->update = &hpsOrthoCamera;
    else
        camera->update = &hpsPerspectiveCamera;
    camera->style = style;
    camera->scene = scene;
    hpsPush(&cameraList, (void *) camera);
    hpsPush(&activeCameras, (void *) camera);
    camera->update(camera);
    return camera;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movss %xmm1, 0x4(%rsp)
movss %xmm0, (%rsp)
movq %rdx, %r14
movl %esi, %ebp
movl %edi, %r15d
movl $0x1e8, %edi            # imm = 0x1E8
callq 0x4260
movq %rax, %rbx
movabsq $0x461c40003f800000, %rax # imm = 0x461C40003F800000
movq %rax, 0x30(%rbx)
movl $0x428c0000, 0x38(%rbx) # imm = 0x428C0000
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rbx)
movl $0x3f800000, 0x1c(%rbx) # imm = 0x3F800000
xorl %eax, %eax
movq %rax, 0x68(%rbx)
movabsq $0x3f80000000000000, %rcx # imm = 0x3F80000000000000
movq %rcx, 0x70(%rbx)
movups %xmm0, 0x20(%rbx)
movss (%rsp), %xmm0
movss %xmm0, 0x3c(%rbx)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x40(%rbx)
movaps 0x1c07(%rip), %xmm0     # 0xb120
movups %xmm0, 0x44(%rbx)
movabsq $0x3f800000bf800000, %rcx # imm = 0x3F800000BF800000
movq %rcx, 0x54(%rbx)
testl %r15d, %r15d
movq %rax, 0x5c(%rbx)
leaq 0x51(%rip), %rax        # 0x958a
leaq 0xe9(%rip), %rcx        # 0x9629
cmoveq %rax, %rcx
movb $0x0, 0x64(%rbx)
movq %rcx, 0x1d8(%rbx)
movl %ebp, 0x8(%rbx)
movq %r14, (%rbx)
leaq 0x5f94(%rip), %rdi      # 0xf4f0
movq %rbx, %rsi
callq 0x4270
leaq 0x5fa5(%rip), %rdi      # 0xf510
movq %rbx, %rsi
callq 0x4270
movq %rbx, %rdi
callq *0x1d8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsOrthoCamera
static void hpsOrthoCamera(HPScamera *camera){
    float width = camera->vw * camera->vwRatio;
    float height = camera->vh * camera->vhRatio;
    float r = width * (0.5 + camera->vx);
    float l = r - width;
    float t = height * (0.5 + camera->vy);
    float b = t - height;
    hpmOrthoViewport(l, r, b, t, camera->n, camera->f, 
                     camera->vl, camera->vr, camera->vb, camera->vt,
                     camera->projection);
}

// Assembly:
subq $0x18, %rsp
movss 0x3c(%rdi), %xmm2
mulss 0x44(%rdi), %xmm2
movss 0x40(%rdi), %xmm4
mulss 0x48(%rdi), %xmm4
cvtss2sd 0x5c(%rdi), %xmm0
cvtss2sd %xmm2, %xmm1
movsd 0x1a5d(%rip), %xmm3     # 0xb010
addsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movaps %xmm1, %xmm0
subss %xmm2, %xmm0
xorps %xmm2, %xmm2
cvtss2sd %xmm4, %xmm2
cvtss2sd 0x60(%rdi), %xmm5
addsd %xmm3, %xmm5
mulsd %xmm2, %xmm5
xorps %xmm3, %xmm3
cvtsd2ss %xmm5, %xmm3
movaps %xmm3, %xmm2
subss %xmm4, %xmm2
movss 0x30(%rdi), %xmm4
movss 0x34(%rdi), %xmm5
movss 0x4c(%rdi), %xmm6
movss 0x50(%rdi), %xmm7
movss 0x54(%rdi), %xmm8
movss 0x58(%rdi), %xmm9
addq $0xb8, %rdi
movss %xmm9, 0x8(%rsp)
movss %xmm8, (%rsp)
callq 0x40e0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsPerspectiveCamera
static void hpsPerspectiveCamera(HPScamera *camera){
    float width = camera->vw * camera->vwRatio;
    float height = camera->vh * camera->vhRatio;
    float scale = tan(hpmDegreesToRadians(camera->viewAngle * 0.5)) 
        * camera->n * 2.0;
    width = ((float) width / (float) height) * scale;
    height = scale;
    float r = width * (0.5 + camera->vx);
    float l = r - width;
    float t = height * (0.5 + camera->vy);
    float b = t - height;
    hpmFrustumViewport(l, r, b, t, camera->n, camera->f,
                       camera->vl, camera->vr, camera->vb, camera->vt,
                       camera->projection);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movss 0x3c(%rdi), %xmm2
mulss 0x44(%rdi), %xmm2
movss 0x40(%rdi), %xmm1
mulss 0x48(%rdi), %xmm1
movss 0x38(%rdi), %xmm0
divss %xmm1, %xmm2
movss %xmm2, 0x1c(%rsp)
mulss 0x19e0(%rip), %xmm0     # 0xb03c
callq 0x4230
cvtss2sd %xmm0, %xmm0
callq 0x42e0
movss 0x30(%rbx), %xmm4
movss 0x34(%rbx), %xmm5
xorps %xmm1, %xmm1
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm1
cvtsd2ss %xmm1, %xmm6
movss 0x1c(%rsp), %xmm1
mulss %xmm6, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movaps %xmm1, %xmm8
xorps %xmm1, %xmm1
cvtss2sd 0x5c(%rbx), %xmm1
movsd 0x1964(%rip), %xmm2     # 0xb010
addsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm1
movaps %xmm1, %xmm0
cvtss2sd %xmm6, %xmm3
cvtss2sd 0x60(%rbx), %xmm7
addsd %xmm2, %xmm7
mulsd %xmm3, %xmm7
xorps %xmm3, %xmm3
cvtsd2ss %xmm7, %xmm3
subss %xmm8, %xmm0
movaps %xmm3, %xmm2
subss %xmm6, %xmm2
movss 0x4c(%rbx), %xmm6
movss 0x50(%rbx), %xmm7
movss 0x54(%rbx), %xmm8
movss 0x58(%rbx), %xmm9
addq $0xb8, %rbx
movss %xmm9, 0x8(%rsp)
movss %xmm8, (%rsp)
movq %rbx, %rdi
callq 0x4390
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraViewportScreenPosition
void hpsSetCameraViewportScreenPosition(HPScamera *camera, float left, float right, float bottom, float top){
    if ((left < -1.0) || ( left > 1.0) ||
        (right < -1.0) || ( right > 1.0) ||
        (bottom < -1.0) || ( bottom > 1.0) ||
        (top < -1.0) ||( top > 1.0)){
        fprintf(stderr, "Camera viewport screen position values should be between -1.0 and 1.0.\n");
        return;
    }
    camera->vl = left; camera->vr = right;
    camera->vb = bottom; camera->vt = top;
    camera->update(camera);
}

// Assembly:
ucomiss 0x18d3(%rip), %xmm3     # 0xb030
ja 0x97b5
movss 0x18dd(%rip), %xmm4     # 0xb044
ucomiss %xmm3, %xmm4
ja 0x97b5
ucomiss 0x18bd(%rip), %xmm2     # 0xb030
ja 0x97b5
ucomiss %xmm2, %xmm4
ja 0x97b5
ucomiss 0x18af(%rip), %xmm1     # 0xb030
ja 0x97b5
movaps 0x19a6(%rip), %xmm5     # 0xb130
andps %xmm0, %xmm5
ucomiss 0x189c(%rip), %xmm5     # 0xb030
ja 0x97b5
ucomiss %xmm1, %xmm4
ja 0x97b5
movss %xmm0, 0x4c(%rdi)
movss %xmm1, 0x50(%rdi)
movss %xmm2, 0x54(%rdi)
movss %xmm3, 0x58(%rdi)
jmpq *0x1d8(%rdi)
pushq %rax
callq 0x4474
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsMoveCamera
void hpsMoveCamera(HPScamera *camera, float *vec){
    if (camera->style == HPS_ORBIT){
        fprintf(stderr, "Can't move an HPS_ORBIT camera\n");
        return;
    }
    camera->position.x += vec[0];
    camera->position.y += vec[1];
    camera->position.z += vec[2];
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
je 0x983a
movss (%rsi), %xmm0
addss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x4(%rsi), %xmm0
addss 0x10(%rdi), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rsi), %xmm0
addss 0x14(%rdi), %xmm0
movss %xmm0, 0x14(%rdi)
retq
pushq %rax
callq 0x4490
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraPosition
void hpsSetCameraPosition(HPScamera *camera, float *vec){
    if (camera->style == HPS_ORBIT){
        fprintf(stderr, "Can't move an HPS_ORBIT camera\n");
        return;
    }
    camera->position.x = vec[0];
    camera->position.y = vec[1];
    camera->position.z = vec[2];
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
je 0x9869
movss (%rsi), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x14(%rdi)
retq
pushq %rax
callq 0x44ac
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraUp
void hpsSetCameraUp(HPScamera *camera, float *up){
    if (camera->style != HPS_LOOK_AT){
        fprintf(stderr, "Can't set up on a non HPS_LOOK_AT camera\n");
        return;
    }
    camera->up.x = up[0];
    camera->up.y = up[1];
    camera->up.z = up[2];
}

// Assembly:
cmpl $0x1, 0x8(%rdi)
jne 0x98b8
movss (%rsi), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x20(%rdi)
retq
pushq %rax
callq 0x44e4
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsCameraLookAt
void hpsCameraLookAt(HPScamera *camera, float *p){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_LOOK_AT)) {
        fprintf(stderr, "Can't set object to look at for a non HPS_LOOK_AT or HPS_ORBIT camera\n");
        return;
    }
    camera->object.x = p[0];
    camera->object.y = p[1];
    camera->object.z = p[2];
}

// Assembly:
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x2, %eax
jae 0x98eb
movss (%rsi), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x2c(%rdi)
retq
pushq %rax
callq 0x4500
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraYaw
void hpsSetCameraYaw(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't yaw a non HPS_ORBIT or HPS_FIRST_PERSON camera\n");
        return;
    }
    camera->style = HPS_ORBIT;
    camera->rotation.x = angle;
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x992f
movl $0x2, 0x8(%rdi)
movss %xmm0, 0x68(%rdi)
retq
pushq %rax
callq 0x4538
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsPitchCamera
void hpsPitchCamera(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't pitch a non HPS_ORBIT or HPS_FIRST_PERSON camera\n");
        return;
    }
    camera->rotation.y += angle;
    camera->rotation.y = fmin(HALF_PI, fmax(-HALF_PI, camera->rotation.y));
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x9968
addss 0x6c(%rdi), %xmm0
cvtss2sd %xmm0, %xmm0
maxsd 0x17fa(%rip), %xmm0     # 0xb150
minsd 0x17fa(%rip), %xmm0     # 0xb158
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6c(%rdi)
retq
pushq %rax
callq 0x4554
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsZoomCamera
void hpsZoomCamera(HPScamera *camera, float distance){
    if (camera->style != HPS_ORBIT){
        fprintf(stderr, "Can't zoom a non HPS_ORBIT camera\n");
        return;
    }
    camera->rotation.w += distance;
    camera->rotation.w = (camera->rotation.w < FLT_MIN) ? FLT_MIN : camera->rotation.w;
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
jne 0x99c4
addss 0x74(%rdi), %xmm0
movss 0x17a6(%rip), %xmm1     # 0xb160
maxss %xmm0, %xmm1
movss %xmm1, 0x74(%rdi)
retq
pushq %rax
callq 0x458c
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsResizeCameras
void hpsResizeCameras(float width, float height){
    int i;
    for (i = 0; i < cameraList.size; i++){
	HPScamera *camera = (HPScamera *) cameraList.data[i];
        if (!camera->viewportIsStatic){
            camera->vw = width;
            camera->vh = height;
            camera->update(camera);
        }
    }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
cmpq $0x0, 0x5ab6(%rip)      # 0xf4f8
je 0x9a7f
xorl %ebx, %ebx
movq 0x5aa3(%rip), %rax      # 0xf4f0
movq (%rax,%rbx,8), %rdi
cmpb $0x0, 0x64(%rdi)
jne 0x9a73
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x3c(%rdi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x40(%rdi)
callq *0x1d8(%rdi)
incq %rbx
cmpq %rbx, 0x5a7b(%rip)      # 0xf4f8
ja 0x9a46
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsMoveCameraForward
void hpsMoveCameraForward(HPScamera *camera, float dist){
    if ((camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't move a non HPS_FIRST_PERSON camera forward\n");
        return;
    }
    float sinYaw = sin(camera->rotation.x);
    float cosYaw = cos(camera->rotation.x);
    camera->position.x += dist * sinYaw;
    camera->position.z -= dist * cosYaw;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x3, 0x8(%rdi)
jne 0x9af3
movq %rdi, %rbx
movss %xmm0, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rdi), %xmm0
callq 0x4210
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rbx), %xmm0
callq 0x4310
cvtsd2ss %xmm0, %xmm0
movss 0xc(%rsp), %xmm2
movss 0x8(%rsp), %xmm1
mulss %xmm2, %xmm1
addss 0xc(%rbx), %xmm1
movss %xmm1, 0xc(%rbx)
movss 0x14(%rbx), %xmm1
mulss %xmm2, %xmm0
subss %xmm0, %xmm1
movss %xmm1, 0x14(%rbx)
addq $0x10, %rsp
popq %rbx
retq
callq 0x45fc
jmp 0x9aed
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsStrafeCamera
void hpsStrafeCamera(HPScamera *camera, float dist){
    if ((camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't strafe a non HPS_FIRST_PERSON camera\n");
        return;
    }
    float sinYaw = sin(camera->rotation.x);
    float cosYaw = cos(camera->rotation.x);
    camera->position.x += dist * cosYaw;
    camera->position.z += dist * sinYaw;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpl $0x3, 0x8(%rdi)
jne 0x9b80
movq %rdi, %rbx
movss %xmm0, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rdi), %xmm0
callq 0x4210
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x68(%rbx), %xmm0
callq 0x4310
cvtsd2ss %xmm0, %xmm0
movss 0xc(%rsp), %xmm1
mulss %xmm1, %xmm0
addss 0xc(%rbx), %xmm0
movss %xmm0, 0xc(%rbx)
movss 0x8(%rsp), %xmm0
mulss %xmm1, %xmm0
addss 0x14(%rbx), %xmm0
movss %xmm0, 0x14(%rbx)
addq $0x10, %rsp
popq %rbx
retq
callq 0x4634
jmp 0x9b7a
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsInitCameras
void hpsInitCameras(){
    hpsInitVector(&cameraList, 16);
    hpsInitVector(&activeCameras, 16);
    hpsInitVector(&renderQueue, 4096);
    hpsInitVector(&alphaQueue, 1024);
}

// Assembly:
pushq %rax
leaq 0x58cb(%rip), %rdi      # 0xf4f0
movl $0x10, %esi
callq 0x4080
leaq 0x58da(%rip), %rdi      # 0xf510
movl $0x10, %esi
callq 0x4080
leaq 0x58e9(%rip), %rdi      # 0xf530
movl $0x1000, %esi           # imm = 0x1000
callq 0x4080
leaq 0x58f8(%rip), %rdi      # 0xf550
movl $0x400, %esi            # imm = 0x400
popq %rax
jmp 0x4080
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/camera.c
// Function: renderNode
static void renderNode(HPSnode *node, HPScamera *camera){
    hpmMultMat4(camera->viewProjection, node->transform, 
                camera->modelViewProjection);
#ifndef NO_INVERSE_TRANSPOSE
    hpmFastInverseTranspose(node->transform, currentInverseTransposeModel);
#endif
    node->pipeline->render(node->data);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x68(%rdi), %rsi
leaq 0x5630(%rip), %rdi      # 0xf3b8
leaq 0x5669(%rip), %rdx      # 0xf3f8
callq 0x4110
movq 0x68(%rbx), %rdi
leaq 0x5711(%rip), %rsi      # 0xf4b0
callq 0x4410
movq 0x70(%rbx), %rax
movq 0x88(%rbx), %rdi
popq %rbx
jmpq *0x10(%rax)
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsInit
void hpsInit(){
    hpsInitCameras();
    hpsInitVector(&activeScenes, 16);
    hpsInitVector(&freeScenes, 16);
    hpsPartitionInterface = hpsAABBpartitionInterface;
}

// Assembly:
pushq %rax
xorl %eax, %eax
callq 0x41b0
leaq 0x5791(%rip), %rdi      # 0xf570
movl $0x10, %esi
callq 0x4080
leaq 0x57a0(%rip), %rdi      # 0xf590
movl $0x10, %esi
callq 0x4080
movq 0x517f(%rip), %rax      # 0xef80
movq (%rax), %rax
movq 0x51ad(%rip), %rcx      # 0xefb8
movq %rax, (%rcx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsAddNode
HPSnode *hpsAddNode(HPSnode *parent, void *data,
                    HPSpipeline *pipeline,
                    void (*deleteFunc)(void *)){
    HPSscene *scene = hpsGetScene(parent);
    HPSnode *node = hpsAllocateFrom(scene->nodePool);
    node->transform = hpsAllocateFrom(scene->transformPool);
    node->partitionData.data = node;
    node->partitionData.boundingSphere = hpsAllocateFrom(scene->boundingSpherePool);
    hpmIdentityMat4(node->transform);
    initBoundingSphere(node->partitionData.boundingSphere);
    node->position.x = 0.0; node->position.y = 0.0; node->position.z = 0.0;
    node->rotation.x = 0.0; node->rotation.y = 0.0; node->rotation.z = 0.0; 
    node->rotation.w = 1.0;
    node->data = data;
    node->pipeline = pipeline;
    node->extension = NULL;
    node->parent = parent;
    node->delete = deleteFunc;
    node->needsUpdate = true;
    hpsInitVector(&node->children, 0);
    scene->partitionInterface->addNode(&node->partitionData, scene->partitionStruct);
    if ((HPSscene *) parent == scene)
        hpsPush(&scene->topLevelNodes, node);
    else
        hpsPush(&parent->children, node);
    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
callq 0x41d0
movq %rax, %r15
movq 0x38(%rax), %rdi
callq 0x43a0
movq %rax, %r14
movq 0x48(%r15), %rdi
callq 0x43a0
movq %rax, 0x68(%r14)
leaq 0x8(%r14), %r12
movq %r14, 0x18(%r14)
movq 0x40(%r15), %rdi
callq 0x43a0
movq %rax, 0x8(%r14)
movq 0x68(%r14), %rdi
callq 0x4250
movq 0x8(%r14), %rax
xorl %ecx, %ecx
movq %rcx, (%rax)
movabsq $0x3f80000000000000, %rdx # imm = 0x3F80000000000000
movq %rdx, 0x8(%rax)
movq %rcx, 0x58(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r14)
movl $0x3f800000, 0x60(%r14) # imm = 0x3F800000
movq %rbp, 0x88(%r14)
movq %r13, 0x70(%r14)
movq %rcx, 0x78(%r14)
movq %rbx, (%r14)
movq (%rsp), %rax
movq %rax, 0x80(%r14)
movb $0x1, 0x90(%r14)
leaq 0x28(%r14), %rdi
xorl %esi, %esi
callq 0x4080
movq 0x28(%r15), %rax
movq 0x30(%r15), %rsi
movq %r12, %rdi
callq *0x10(%rax)
leaq 0x28(%rbx), %rax
leaq 0x8(%r15), %rdi
cmpq %rbx, %r15
cmovneq %rax, %rdi
movq %r14, %rsi
callq 0x4270
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: deleteNode
static void deleteNode(HPSnode *node, HPSscene *scene){
    int i;
    scene->partitionInterface->removeNode(&node->partitionData);
    hpsDeleteFrom(node->partitionData.boundingSphere, scene->boundingSpherePool);
    hpsDeleteFrom(node->transform, scene->transformPool);
    for (i = 0; i < node->children.size; i++)
        deleteNode(node->children.data[i], scene);
    if ((HPSscene *) node->parent == scene)
        hpsRemove(&scene->topLevelNodes, node);
    else
        hpsRemove(&node->parent->children, node);
    freeNode(node, scene);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%rsi), %rax
addq $0x8, %rdi
callq *0x18(%rax)
movq 0x8(%rbx), %rdi
movq 0x40(%r14), %rsi
callq 0x4400
movq 0x68(%rbx), %rdi
movq 0x48(%r14), %rsi
callq 0x4400
cmpq $0x0, 0x30(%rbx)
je 0x9f6a
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x9f17
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0x9f51
movq (%rbx), %rax
leaq 0x28(%rax), %rdi
leaq 0x8(%r14), %rcx
cmpq %r14, %rax
cmoveq %rcx, %rdi
movq %rbx, %rsi
callq 0x4370
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa184
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsMoveNode
void hpsMoveNode(HPSnode *node, float *vec){
    node->position.x += vec[0];
    node->position.y += vec[1];
    node->position.z += vec[2];
    node->needsUpdate = true;
}

// Assembly:
movss (%rsi), %xmm0
addss 0x48(%rdi), %xmm0
movss %xmm0, 0x48(%rdi)
movss 0x4(%rsi), %xmm0
addss 0x4c(%rdi), %xmm0
movss %xmm0, 0x4c(%rdi)
movss 0x8(%rsi), %xmm0
addss 0x50(%rdi), %xmm0
movss %xmm0, 0x50(%rdi)
movb $0x1, 0x90(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsSetNodePosition
void hpsSetNodePosition(HPSnode *node, float *p){
    node->position.x = p[0];
    node->position.y = p[1];
    node->position.z = p[2];
    node->needsUpdate = true;
}

// Assembly:
movss (%rsi), %xmm0
movss %xmm0, 0x48(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x4c(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x50(%rdi)
movb $0x1, 0x90(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsMakeScene
HPSscene *hpsMakeScene(){
    HPSscene *scene = (freeScenes.size) ?
	hpsPop(&freeScenes) : malloc(sizeof(HPSscene));
    scene->partitionInterface = hpsPartitionInterface;
    scene->nodePool = hpsMakePool(sizeof(HPSnode), hpsNodePoolSize, "Node pool");
    scene->transformPool = hpsMakePool(sizeof(float) * 16, hpsNodePoolSize,
				       "Transform pool");
    scene->boundingSpherePool = hpsMakePool(sizeof(BoundingSphere),
					    hpsNodePoolSize,
					    "Bounding sphere pool");
    scene->partitionStruct = scene->partitionInterface->new();
    scene->null = NULL;
    hpsInitVector(&scene->topLevelNodes, 1024);
    hpsInitVector(&scene->extensions, 4);
    hpsPush(&activeScenes, (void *) scene);
    return scene;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x556d(%rip)      # 0xf598
je 0xa03b
leaq 0x555c(%rip), %rdi      # 0xf590
callq 0x42d0
jmp 0xa045
movl $0x78, %edi
callq 0x4260
movq %rax, %rbx
movq 0x4f69(%rip), %rax      # 0xefb8
movq (%rax), %rax
movq %rax, 0x28(%rbx)
movq 0x4f83(%rip), %r14      # 0xefe0
movl (%r14), %esi
leaq 0x13a9(%rip), %rdx      # 0xb410
movl $0x98, %edi
callq 0x40b0
movq %rax, 0x38(%rbx)
movl (%r14), %esi
leaq 0x139b(%rip), %rdx      # 0xb41a
movl $0x40, %edi
callq 0x40b0
movq %rax, 0x48(%rbx)
movl (%r14), %esi
leaq 0x1392(%rip), %rdx      # 0xb429
movl $0x10, %edi
callq 0x40b0
movq %rax, 0x40(%rbx)
movq 0x28(%rbx), %rcx
xorl %eax, %eax
callq *(%rcx)
movq %rax, 0x30(%rbx)
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x4080
leaq 0x58(%rbx), %rdi
movl $0x4, %esi
callq 0x4080
leaq 0x5495(%rip), %rdi      # 0xf570
movq %rbx, %rsi
callq 0x4270
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsDeleteScene
void hpsDeleteScene(HPSscene *scene){
    int i;
    for (i = 0; i < scene->topLevelNodes.size; i++)
        freeNode(scene->topLevelNodes.data[i], scene);
    scene->partitionInterface->delete(scene->partitionStruct);
    hpsDeleteExtensions(scene);
    hpsClearPool(scene->nodePool);
    hpsClearPool(scene->transformPool);
    hpsClearPool(scene->boundingSpherePool);
    hpsRemove(&activeScenes, (void *) scene);
    hpsPush(&freeScenes, (void *) scene);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0xa115
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0xa184
incq %r14
cmpq %r14, 0x10(%rbx)
ja 0xa0ff
movq 0x28(%rbx), %rax
movq 0x30(%rbx), %rdi
callq *0x8(%rax)
cmpq $0x0, 0x60(%rbx)
je 0xa144
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x28(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0xa12a
movq 0x38(%rbx), %rdi
callq 0x4160
movq 0x48(%rbx), %rdi
callq 0x4160
movq 0x40(%rbx), %rdi
callq 0x4160
leaq 0x540a(%rip), %rdi      # 0xf570
movq %rbx, %rsi
callq 0x4370
leaq 0x541b(%rip), %rdi      # 0xf590
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4270
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: freeNode
static void freeNode(HPSnode *node, HPSscene *scene){
    int i;
    if (node->delete) node->delete(node->data);
    if (node->children.capacity){
	HPSvector *v = &node->children;
	for (i = 0; i < v->size; i++)
	    freeNode(v->data[i], scene);
	hpsDeleteVector(v);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x80(%rdi), %rax
testq %rax, %rax
je 0xa1a1
movq 0x88(%rbx), %rdi
callq *%rax
cmpq $0x0, 0x38(%rbx)
je 0xa1d9
leaq 0x28(%rbx), %r14
cmpq $0x0, 0x30(%rbx)
je 0xa1cc
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0xa184
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0xa1b6
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x43e0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsDeleteExtensions
void hpsDeleteExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->delete(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0xa211
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x28(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0xa1f0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsAddPipeline
HPSpipeline *hpsAddPipeline(void (*preRender)(void *),
			    void (*render)(void *),
			    void (*postRender)(),
                            bool isAlpha){
    HPSpipeline *pipeline = malloc(sizeof(HPSpipeline));
    pipeline->isAlpha = isAlpha;
    pipeline->preRender = preRender;
    pipeline->render = render;
    pipeline->postRender = postRender;
    return pipeline;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl $0x20, %edi
callq 0x4260
movb %bl, (%rax)
movq %r12, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsSetNodeExtension
void hpsSetNodeExtension(HPSnode *node, HPSextension *extension){
    HPSscene *scene = hpsGetScene(node);
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if ((void*) extension == (void*) e){
            node->extension = &scene->extensions.data[i];
            return;
        }
    }
    fprintf(stderr, "Node's %p scene does not have extension %p activated\n", node, extension);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x41d0
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0xa30a
movq 0x58(%rax), %rax
xorl %edx, %edx
cmpq %rbx, (%rax)
je 0xa32f
addq $0x2, %rdx
addq $0x10, %rax
cmpq %rdx, %rcx
ja 0xa2f8
movq 0x4ce7(%rip), %rax      # 0xeff8
movq (%rax), %rdi
leaq 0x1123(%rip), %rsi      # 0xb43e
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4200
movq %rax, 0x78(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsActivateExtension
void hpsActivateExtension(HPSscene *scene, HPSextension *extension){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if (e == extension) return;
    }
    hpsPush(&scene->extensions, (void *) extension);
    hpsPush(&scene->extensions, NULL);
    extension->init(&scene->extensions.data[scene->extensions.size-1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x58(%rdi), %r14
movq 0x60(%rdi), %rax
testq %rax, %rax
je 0xa364
movq (%r14), %rcx
xorl %edx, %edx
cmpq %rsi, (%rcx,%rdx,8)
je 0xa393
addq $0x2, %rdx
cmpq %rdx, %rax
ja 0xa355
movq %r14, %rdi
movq %rsi, %r15
callq 0x4270
movq %r14, %rdi
xorl %esi, %esi
callq 0x4270
movq 0x58(%rbx), %rax
movq 0x60(%rbx), %rcx
leaq (%rax,%rcx,8), %rdi
addq $-0x8, %rdi
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
jmpq *(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsExtensionData
void *hpsExtensionData(HPSscene *scene, HPSextension *extension){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        if (e == extension) return scene->extensions.data[i+1];
    }
    return NULL;
}

// Assembly:
movq 0x60(%rdi), %rcx
testq %rcx, %rcx
je 0xa3c4
movq 0x58(%rdi), %rdx
xorl %edi, %edi
movq (%rdx,%rdi,8), %r8
cmpq %rsi, %r8
jne 0xa3b6
movq 0x8(%rdx,%rdi,8), %rax
cmpq %rsi, %r8
je 0xa3c6
addq $0x2, %rdi
cmpq %rdi, %rcx
ja 0xa3a8
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsPreRenderExtensions
void hpsPreRenderExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->preRender(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0xa3f9
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x8(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0xa3d8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: hpsPostRenderExtensions
void hpsPostRenderExtensions(HPSscene *scene){
    int i;
    for (i = 0; i < scene->extensions.size; i += 2){
        HPSextension *e = (HPSextension *) scene->extensions.data[i];
        e->postRender(scene->extensions.data[i+1]);
    }
}

// Assembly:
cmpq $0x0, 0x60(%rdi)
je 0xa42c
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0x58(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq 0x8(%rax,%r14,8), %rdi
callq *0x10(%rcx)
addq $0x2, %r14
cmpq %r14, 0x60(%rbx)
ja 0xa40b
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/scene.c
// Function: updateNode
static void updateNode(HPSnode *node, HPSscene *scene){
    int i;
    if (node->needsUpdate){
        if ((HPSscene *) node->parent == scene){
            hpmQuaternionRotation((float *) &node->rotation, node->transform);
            hpmTranslate((float *) &node->position, node->transform);
        } else {
            float trans[16];
            hpmQuaternionRotation((float *) &node->rotation, trans);
            hpmTranslate((float *) &node->position, trans);
            hpmMultMat4(trans, node->parent->transform, node->transform);
        }
        BoundingSphere *bs = node->partitionData.boundingSphere;
        bs->x = 0;
        bs->y = 0;
        bs->z = 0;
        hpmMat4VecMult(node->transform, (float*) bs);
        if (node->extension){
            hpsUpdateExtensionNode(node);
        }
	scene->partitionInterface->updateNode(&node->partitionData);
        for (i = 0; i < node->children.size; i++){
            HPSnode *child = node->children.data[i];
            child->needsUpdate = true;
            updateNode(child, scene);
        }
        node->needsUpdate = false;
    } else {
        for (i = 0; i < node->children.size; i++)
            updateNode(node->children.data[i], scene);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x0, 0x90(%rdi)
je 0xa4ab
cmpq %r14, (%rbx)
je 0xa4d7
leaq 0x54(%rbx), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x4050
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x4060
movq (%rbx), %rax
movq 0x68(%rbx), %rdx
movq 0x68(%rax), %rsi
movq %r15, %rdi
callq 0x4110
jmp 0xa4f1
cmpq $0x0, 0x30(%rbx)
je 0xa561
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0xa45e
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0xa4b9
jmp 0xa561
leaq 0x54(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0x4050
leaq 0x48(%rbx), %rdi
movq 0x68(%rbx), %rsi
callq 0x4060
leaq 0x8(%rbx), %r15
movq 0x8(%rbx), %rsi
movq $0x0, (%rsi)
movl $0x0, 0x8(%rsi)
movq 0x68(%rbx), %rdi
callq 0x41c0
movq 0x78(%rbx), %rax
testq %rax, %rax
je 0xa526
movq (%rax), %rcx
movq 0x8(%rax), %rdi
movq %rbx, %rsi
callq *0x20(%rcx)
movq 0x28(%r14), %rax
movq %r15, %rdi
callq *0x20(%rax)
cmpq $0x0, 0x30(%rbx)
je 0xa55a
xorl %r15d, %r15d
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rdi
movb $0x1, 0x90(%rdi)
movq %r14, %rsi
callq 0xa45e
incq %r15
cmpq %r15, 0x30(%rbx)
ja 0xa53a
movb $0x0, 0x90(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/AlexCharlton[P]Hyperscene/src/lighting.c
// Function: hpsInitLighting
void hpsInitLighting(void **data){
    if (!initialized){
        hpsInitVector(&lightQueue, 16);
        hpsCurrentLightPositions = malloc(sizeof(float) * hpsMaxLights * 3);
        hpsCurrentLightDirections = malloc(sizeof(float) * hpsMaxLights * 4);
        hpsCurrentLightColors = malloc(sizeof(float) * hpsMaxLights * 3);
        hpsCurrentLightIntensities = malloc(sizeof(float) * hpsMaxLights);
        hpsCurrentAmbientLight = malloc(sizeof(float) * 3);
        initialized = true;
    }
    SceneLighting *sLighting = malloc(sizeof(SceneLighting));
    sLighting->lightPool = hpsMakePool(sizeof(Light), hpsLightPoolSize, "Light pool");
    *data = sLighting;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, 0x503e(%rip)      # 0xf5bc
jne 0xa612
leaq 0x5035(%rip), %rdi      # 0xf5c0
movl $0x10, %esi
callq 0x4080
movq 0x49fc(%rip), %rax      # 0xef98
movl (%rax), %r14d
leaq (,%r14,4), %r15
leaq (%r15,%r15,2), %r12
movq %r12, %rdi
callq 0x4260
movq 0x49ae(%rip), %rcx      # 0xef68
movq %rax, (%rcx)
shlq $0x4, %r14
movq %r14, %rdi
callq 0x4260
movq 0x49a8(%rip), %rcx      # 0xef78
movq %rax, (%rcx)
movq %r12, %rdi
callq 0x4260
movq 0x49e6(%rip), %rcx      # 0xefc8
movq %rax, (%rcx)
movq %r15, %rdi
callq 0x4260
movq 0x49cc(%rip), %rcx      # 0xefc0
movq %rax, (%rcx)
movl $0xc, %edi
callq 0x4260
movq 0x4988(%rip), %rcx      # 0xef90
movq %rax, (%rcx)
movb $0x1, 0x4faa(%rip)      # 0xf5bc
movl $0x18, %edi
callq 0x4260
movq %rax, %r14
movq 0x49aa(%rip), %rax      # 0xefd0
movl (%rax), %esi
leaq 0xe45(%rip), %rdx       # 0xb474
movl $0x38, %edi
callq 0x40b0
movq %rax, 0x10(%r14)
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq