LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/hypermath/src/hypermath.c
// Function: hpmFrustumViewport
void hpmFrustumViewport(float left, float right, float bottom, float top,
                        float near, float far,
                        float vLeft, float vRight, float vBottom, float vTop,
                        float *mat){
    HPMmat4 *m = (HPMmat4 *) mat;
    initMat4(m);
    m->_11 = near * (vRight - vLeft) / (right - left);
    m->_13 = (vRight*left - right*vLeft) / (right - left);
    m->_22 = near * (vTop - vBottom) / (top - bottom);
    m->_23 = (vTop*bottom - top*vBottom) / (top - bottom);
    m->_33 = -(far + near) / (far - near);
    m->_34 = - (2.0 * far * near) / (far - near);
    m->_43 = -1.0;
}

// Assembly:
movss 0x8(%rsp), %xmm9
movss 0x10(%rsp), %xmm8
xorps %xmm10, %xmm10
movups %xmm10, 0x14(%rdi)
movups %xmm10, 0x24(%rdi)
movups %xmm10, 0x30(%rdi)
movups %xmm10, 0x4(%rdi)
movaps %xmm7, %xmm10
subss %xmm6, %xmm10
mulss %xmm4, %xmm10
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
unpcklps %xmm9, %xmm6            # xmm6 = xmm6[0],xmm9[0],xmm6[1],xmm9[1]
mulps %xmm1, %xmm6
subps %xmm0, %xmm1
divss %xmm1, %xmm10
movss %xmm10, (%rdi)
unpcklps %xmm8, %xmm7            # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
subss %xmm9, %xmm8
mulss %xmm4, %xmm8
mulps %xmm0, %xmm7
subps %xmm6, %xmm7
divps %xmm1, %xmm7
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
divss %xmm1, %xmm8
movss %xmm8, 0x14(%rdi)
movlps %xmm7, 0x20(%rdi)
movaps %xmm4, %xmm0
addss %xmm5, %xmm0
xorps 0x378a(%rip), %xmm0     # 0xa040
cvtss2sd %xmm5, %xmm1
subss %xmm4, %xmm5
divss %xmm5, %xmm0
movss %xmm0, 0x28(%rdi)
mulsd 0x3759(%rip), %xmm1     # 0xa028
cvtss2sd %xmm4, %xmm0
mulsd %xmm0, %xmm1
cvtss2sd %xmm5, %xmm0
divsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
movss %xmm0, 0x38(%rdi)
movl $0xbf800000, 0x2c(%rdi) # imm = 0xBF800000
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/hypermath/src/hypermath.c
// Function: hpmPerspective
void hpmPerspective(int width, int height, float near, float far, float angle,
		    float *mat){
    float scale = tan(hpmDegreesToRadians(angle * 0.5)) * near;
    float r = ((float) width / (float) height) * scale;
    float l = -r;
    float t = scale;
    float b = -t;
    hpmFrustum(l, r, b, t, near, far, mat);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x8(%rsp)
mulss 0x3705(%rip), %xmm2     # 0xa038
movl %esi, %ebp
cvtss2sd %xmm2, %xmm0
mulsd 0x36bf(%rip), %xmm0     # 0xa000
movl %edi, %r14d
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x4360
movss 0x8(%rsp), %xmm4
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm3
cvtsi2ss %r14d, %xmm1
cvtsi2ss %ebp, %xmm0
divss %xmm0, %xmm1
mulss %xmm3, %xmm1
movaps 0x36c5(%rip), %xmm2     # 0xa040
movaps %xmm1, %xmm0
xorps %xmm2, %xmm0
xorps %xmm3, %xmm2
movss 0xc(%rsp), %xmm5
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4370
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/hypermath/src/hypermath.c
// Function: hpmCameraInverse
void hpmCameraInverse(const float *camera, float *inverse){
    HPMmat4 *cam = (HPMmat4 *) camera;
    HPMmat4 *inv = (HPMmat4 *) inverse;
    // Rotation component
    inv->_11 = cam->_11;
    inv->_12 = cam->_21;
    inv->_13 = cam->_31;

    inv->_21 = cam->_12;
    inv->_22 = cam->_22;
    inv->_23 = cam->_32;

    inv->_31 = cam->_13;
    inv->_32 = cam->_23;
    inv->_33 = cam->_33;
    // Translation component
    inv->_14 = -(cam->_11*cam->_14 + cam->_21*cam->_24 + cam->_31*cam->_34);
    inv->_24 = -(cam->_12*cam->_14 + cam->_22*cam->_24 + cam->_32*cam->_34);
    inv->_34 = -(cam->_13*cam->_14 + cam->_23*cam->_24 + cam->_33*cam->_34);
    // Last row
    inv->_41 = 0;
    inv->_42 = 0;
    inv->_43 = 0;
    inv->_44 = 1;
}

// Assembly:
movss (%rdi), %xmm5
movss %xmm5, (%rsi)
movss 0x4(%rdi), %xmm0
movss %xmm0, 0x10(%rsi)
movss 0x8(%rdi), %xmm0
movss %xmm0, 0x20(%rsi)
movss 0x10(%rdi), %xmm3
movss %xmm3, 0x4(%rsi)
movss 0x14(%rdi), %xmm6
movss %xmm6, 0x14(%rsi)
movss 0x18(%rdi), %xmm0
movss %xmm0, 0x24(%rsi)
movss 0x20(%rdi), %xmm0
movss %xmm0, 0x8(%rsi)
movss 0x24(%rdi), %xmm1
movss %xmm1, 0x18(%rsi)
movss 0x28(%rdi), %xmm2
movss %xmm2, 0x28(%rsi)
movss 0x34(%rdi), %xmm7
movss 0x38(%rdi), %xmm4
movss 0x4(%rdi), %xmm8
mulss 0x30(%rdi), %xmm5
mulss %xmm7, %xmm8
addss %xmm8, %xmm5
movss 0x8(%rdi), %xmm8
mulss %xmm4, %xmm8
addss %xmm5, %xmm8
movaps 0x3455(%rip), %xmm5     # 0xa040
xorps %xmm5, %xmm8
movss %xmm8, 0x30(%rsi)
movss 0x30(%rdi), %xmm8
mulss %xmm6, %xmm7
mulss %xmm8, %xmm3
addss %xmm7, %xmm3
mulss %xmm4, %xmm2
mulss 0x18(%rdi), %xmm4
addss %xmm3, %xmm4
xorps %xmm5, %xmm4
movss %xmm4, 0x34(%rsi)
mulss 0x34(%rdi), %xmm1
mulss %xmm8, %xmm0
addss %xmm1, %xmm0
addss %xmm2, %xmm0
xorps %xmm5, %xmm0
movss %xmm0, 0x38(%rsi)
andl $0x0, 0xc(%rsi)
andl $0x0, 0x1c(%rsi)
andl $0x0, 0x2c(%rsi)
movl $0x3f800000, 0x3c(%rsi) # imm = 0x3F800000
retq
nop
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/vector.c
// Function: hpsInitVector
void hpsInitVector(HPSvector *vector, size_t initialCapacity){
    if (initialCapacity > 0){
	vector->data = malloc(initialCapacity * sizeof(void *));
    } else {
	vector->data = NULL;
    }
    vector->capacity = initialCapacity;
    vector->isStatic = false;
    vector->size = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
je 0x6c6a
leaq (,%r14,8), %rdi
callq 0x42c0
jmp 0x6c6c
xorl %eax, %eax
movq %rax, (%rbx)
movq %r14, 0x10(%rbx)
movb $0x0, 0x18(%rbx)
andq $0x0, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/vector.c
// Function: hpsInitStaticVector
void hpsInitStaticVector(HPSvector *vector, void *data, size_t capacity){
    vector->data = data;
    vector->capacity = capacity;
    vector->isStatic = true;
    vector->size = 0;
}

// Assembly:
movq %rsi, (%rdi)
movq %rdx, 0x10(%rdi)
movb $0x1, 0x18(%rdi)
andq $0x0, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/vector.c
// Function: hpsPush
void hpsPush(HPSvector *vector, void *value){
    if (vector->size == vector->capacity){
	if (vector->isStatic){
	    void * new = malloc(2 * vector->capacity * sizeof(void *));
	    memcpy(new, vector->data,
		   sizeof(void*) * vector->capacity);
	    vector->data = new;
	    vector->capacity *= 2;
	    vector->isStatic = false;
	} else if (vector->capacity != 0){
	    vector->data = realloc(vector->data,
				   2 * vector->capacity * sizeof(void *));
	    vector->capacity *= 2;
	} else {
	    vector->data = malloc(DEFAULT_VECTOR_SIZE * sizeof(void *));
	    vector->capacity = DEFAULT_VECTOR_SIZE;
	}

    }
    vector->data[vector->size++] = value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %r15
cmpq 0x10(%rdi), %r15
jne 0x6d1f
cmpb $0x1, 0x18(%r14)
jne 0x6d24
movq %r15, %rdi
shlq $0x4, %rdi
callq 0x42c0
movq %rax, %r12
movq (%r14), %rsi
leaq (,%r15,8), %rdx
movq %rax, %rdi
callq 0x4270
movq %r12, (%r14)
leaq (%r15,%r15), %rax
movq %rax, 0x10(%r14)
movb $0x0, 0x18(%r14)
jmp 0x6d61
movq (%r14), %r12
jmp 0x6d61
testq %r15, %r15
je 0x6d48
movq (%r14), %rdi
shlq $0x4, %r15
movq %r15, %rsi
callq 0x4380
movq %rax, %r12
movq %rax, (%r14)
shlq 0x10(%r14)
movq 0x8(%r14), %r15
jmp 0x6d61
pushq $0x20
popq %rdi
callq 0x42c0
movq %rax, %r12
movq %rax, (%r14)
movq $0x4, 0x10(%r14)
xorl %r15d, %r15d
leaq 0x1(%r15), %rax
movq %rax, 0x8(%r14)
movq %rbx, (%r12,%r15,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/vector.c
// Function: hpsRemove
bool hpsRemove(HPSvector *vector, void *el){
    int i;
    for (i = 0; i < vector->size; i++){
	if (vector->data[i] == el){
	    hpsRemoveNth(vector, i);
	    return true;
	}
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
xorl %eax, %eax
movq %rax, %r14
cmpq %rax, %rbx
je 0x6de4
movq (%rdi), %rcx
leaq 0x1(%r14), %rax
cmpq %rsi, (%rcx,%r14,8)
jne 0x6dc4
decq %rax
movq %rax, %rsi
callq 0x40a0
cmpq %r14, %rbx
seta %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/vector.c
// Function: hpsRemoveNth
bool hpsRemoveNth(HPSvector *vector, size_t index){
    if (vector->size == 0 || index >= vector->size) return false;
    if (index <= (vector->size - 1))
	memmove(&vector->data[index], &vector->data[index + 1],
                sizeof(void*) * (vector->size - index - 1));
    --vector->size;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x8(%rdi), %r15
cmpq %rsi, %r15
jbe 0x6e2b
movq %rdi, %r14
movq (%rdi), %rax
leaq (%rax,%rbx,8), %rdi
leaq (%rax,%rbx,8), %rsi
addq $0x8, %rsi
movq %rbx, %rdx
notq %rdx
addq %r15, %rdx
shlq $0x3, %rdx
callq 0x4390
decq 0x8(%r14)
cmpq %rbx, %r15
seta %al
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/pools.c
// Function: hpsInitPool
void hpsInitPool(HPSpool pool, void *data, size_t blockSize, size_t nBlocks, char name[32]){
    int i;
    char *poolStart = (char *) data;
    struct pool *p = (struct pool*) pool;
    p->blockSize = blockSize;
    p->nBlocks = nBlocks;
    p->nextPool = NULL;
    p->freeBlock = (void**) data;
    strcpy(p->name, name);
    for(i = 0; i < nBlocks - 1; i++){
	void **next = (void **) &poolStart[i * blockSize];
	*next = &poolStart[(i+1) * blockSize];
    }
    void **last = (void **) &poolStart[(nBlocks - 1) * blockSize];
    *last = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movl %r14d, (%rdi)
movl %ebx, 0x4(%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %r15
movq %rsi, 0x8(%rdi)
addq $0x18, %rdi
movq %r8, %rsi
callq 0x4070
decq %rbx
movq %r15, %rax
movq %rbx, %rcx
subq $0x1, %rcx
jb 0x6e7c
leaq (%rax,%r14), %rdx
movq %rdx, (%rax)
movq %rdx, %rax
jmp 0x6e6a
imulq %r14, %rbx
andq $0x0, (%r15,%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/pools.c
// Function: hpsMakePool
HPSpool hpsMakePool(size_t blockSize, size_t nBlocks, char name[32]){
    size_t size = (blockSize < sizeof(void *)) ? sizeof(void *) : blockSize;
    char *pool = (char *) malloc(size * nBlocks + sizeof(struct pool));
    char *poolStart = &pool[sizeof(struct pool)];
    hpsInitPool((struct pool*) pool, poolStart, size, nBlocks, name);
    return (void *) pool;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
cmpq $0x9, %rdi
pushq $0x8
popq %r14
cmovaeq %rdi, %r14
movq %rsi, %r15
movq %r14, %rdi
imulq %rsi, %rdi
addq $0x38, %rdi
callq 0x42c0
movq %rax, %r12
leaq 0x38(%rax), %rsi
movq %rax, %rdi
movq %r14, %rdx
movq %r15, %rcx
movq %rbx, %r8
callq 0x43e0
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/pools.c
// Function: hpsDeletePool
void hpsDeletePool(HPSpool pool){
    struct pool *data = (struct pool*) pool;
    if (data->nextPool)
	hpsDeletePool(data->nextPool);
    free(pool);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6eee
callq 0x4300
movq %rbx, %rdi
popq %rbx
jmp 0x4030
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/pools.c
// Function: hpsClearPool
void hpsClearPool(HPSpool pool){
    int i;
    struct pool *data = (struct pool*) pool;
    if (data->nextPool)
	hpsClearPool(data->nextPool);
    char *poolStart = &((char *) pool)[sizeof(struct pool)];
    const unsigned int size = data->blockSize;
    const unsigned int nBlocks = data->nBlocks;
    data->freeBlock = (void**) poolStart;
    for(i = 0; i < nBlocks - 1; i++){
	void **next = (void **) &poolStart[i * size];
	*next = &poolStart[(i+1) * size];
    }
    void **last = (void **) &poolStart[(nBlocks - 1) * size];
    *last = NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x6f09
callq 0x4190
leaq 0x38(%rbx), %rax
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq %rax, 0x8(%rbx)
decl %ecx
xorl %esi, %esi
movq %rcx, %rdi
subq $0x1, %rdi
jb 0x6f32
movl %esi, %r8d
addl %edx, %esi
leaq (%rax,%rsi), %r9
movq %r9, (%rax,%r8)
jmp 0x6f1d
imull %edx, %ecx
andq $0x0, (%rax,%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/pools.c
// Function: hpsAllocateFrom
void *hpsAllocateFrom(HPSpool pool){
#ifdef DEBUG
      if (!pool){
      fprintf(stderr, "Fatal: trying to allocate to a pool that doesn't exist!\n");
      exit(EXIT_FAILURE);
      }
#endif
    struct pool *data = (struct pool*) pool;
    void **block = data->freeBlock;
    if (!block){
	growPool(pool);
	block = data->freeBlock;
    }
    data->freeBlock = *block;
    return block;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
jne 0x6f78
movq %rbx, %rax
movq %rax, %r14
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x6f4f
movl (%rbx), %edi
movl 0x4(%rbx), %esi
leaq 0x313f(%rip), %rdx      # 0xa0a6
callq 0x40b0
movq %rax, 0x10(%r14)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
movq (%rax), %rcx
movq %rcx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: hpsAABBupdateNode
void hpsAABBupdateNode(Node *node){
    AABBtree *tree = (AABBtree *) node->area;
    AABBtree *t = tree;
    while (t->parent && !contains(t, node->boundingSphere)){
	t = t->parent;
    }
    t = hpsAABBfindNode(node, t);
    if (t != tree){
	hpsAABBremoveNode(node);
	addNode(node, t);
        growExtents(t, node->boundingSphere);
    } else {
	growExtents(t, node->boundingSphere);
	shrinkExtents(t, node->boundingSphere);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movq %r15, %rax
movq %rax, %rsi
movq (%rax), %rax
testq %rax, %rax
je 0x70be
movq (%rbx), %rcx
movss (%rcx), %xmm1
movss 0xc(%rcx), %xmm0
movaps %xmm1, %xmm2
subss %xmm0, %xmm2
ucomiss 0xf8(%rsi), %xmm2
jb 0x7036
movss 0x4(%rcx), %xmm2
movaps %xmm2, %xmm3
subss %xmm0, %xmm3
ucomiss 0xfc(%rsi), %xmm3
jb 0x7036
movss 0x8(%rcx), %xmm3
movaps %xmm3, %xmm4
subss %xmm0, %xmm4
ucomiss 0x100(%rsi), %xmm4
jb 0x7036
addss %xmm0, %xmm1
movss 0x104(%rsi), %xmm4
ucomiss %xmm1, %xmm4
jb 0x7036
addss %xmm0, %xmm2
movss 0x108(%rsi), %xmm1
ucomiss %xmm2, %xmm1
jb 0x7036
addss %xmm3, %xmm0
movss 0x10c(%rsi), %xmm1
ucomiss %xmm0, %xmm1
jb 0x7036
movq %rbx, %rdi
callq 0x43f0
movq %rax, %r14
cmpq %r15, %rax
je 0x70f1
movq %rbx, %rdi
callq 0x4140
movq %rbx, %rdi
movq %r14, %rsi
callq 0x43a0
movq (%rbx), %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x7332
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x7332
movq (%rbx), %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x740a
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: newTree
static AABBtree *newTree(HPSpool pool, AABBtree *parent){
    AABBtree *tree = hpsAllocateFrom(pool);
    hpsInitStaticVector(&tree->nodes, tree->nodesData, TREE_NODES);
    tree->parent = parent;
    tree->pool = pool;
    tree->split = 0;
    tree->lastChecked = 0;
    tree->extentsCorrect = false;
    memset(tree->children, 0, 27 * sizeof(void *));
    return tree;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4480
movq %rax, %r15
leaq 0x118(%rax), %rdi
leaq 0x138(%rax), %rsi
pushq $0x2d
popq %rdx
callq 0x4410
movq %rbx, (%r15)
movq %r14, 0xe0(%r15)
andl $0x0, 0xe8(%r15)
movb $0x0, 0x110(%r15)
leaq 0x8(%r15), %rdi
movl $0xd8, %edx
xorl %esi, %esi
callq 0x41d0
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: hpsAABBfindNode
AABBtree *hpsAABBfindNode(Node *node, AABBtree *tree){
    AABBtree *t = tree;
    AABBtree *u = NULL;
    while (u != t){
	u = t;
	t = whichBranch(t, node->boundingSphere);
    }
    return t;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq %r14, %rcx
movq %rax, %r14
cmpq %rax, %rcx
je 0x71b8
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x71c3
jmp 0x71a0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0xe8(%rdi), %eax
testw %ax, %ax
je 0x725f
movss 0xc(%rsi), %xmm0
cmpb $0x1, 0x110(%rbx)
jne 0x723f
movss 0x104(%rbx), %xmm1
subss 0xf8(%rbx), %xmm1
movsd 0x108(%rbx), %xmm2
movsd 0xfc(%rbx), %xmm3
subps %xmm3, %xmm2
mulss %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm2     # xmm2 = xmm2[1,1,1,1]
mulss %xmm1, %xmm2
movaps %xmm0, %xmm1
mulss %xmm0, %xmm1
mulss %xmm0, %xmm1
mulss 0x2e7e(%rip), %xmm2     # 0xa0a8
ucomiss %xmm2, %xmm1
jbe 0x723f
movq 0x120(%rbx), %rcx
cmpq 0x128(%rbx), %rcx
jne 0x725f
testb $0x1, %al
je 0x725b
movss (%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xec(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x7267
xorl %ecx, %ecx
jmp 0x7276
movq %rbx, %rax
jmp 0x7305
subss %xmm0, %xmm1
xorl %ecx, %ecx
ucomiss %xmm2, %xmm1
seta %cl
incq %rcx
testb $0x2, %al
je 0x7293
movss 0x4(%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xf0(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x7298
xorl %r14d, %r14d
jmp 0x72ac
subss %xmm0, %xmm1
xorl %edx, %edx
ucomiss %xmm2, %xmm1
seta %dl
leaq (%rdx,%rdx,2), %r14
addq $0x3, %r14
testb $0x4, %al
je 0x72c9
movss 0x8(%rsi), %xmm1
movaps %xmm0, %xmm3
addss %xmm1, %xmm3
movss 0xf4(%rbx), %xmm2
ucomiss %xmm3, %xmm2
jbe 0x72cd
xorl %eax, %eax
jmp 0x72e1
subss %xmm0, %xmm1
xorl %eax, %eax
ucomiss %xmm2, %xmm1
seta %al
leaq (%rax,%rax,8), %rax
addq $0x9, %rax
addq %rcx, %r14
addq %rax, %r14
movq 0x8(%rbx,%r14,8), %rax
testq %rax, %rax
jne 0x7305
movq 0xe0(%rbx), %rdi
movq %rbx, %rsi
callq 0x7137
movq %rax, 0x8(%rbx,%r14,8)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movss 0xc(%rsi), %xmm0
movsd (%rsi), %xmm1
movss 0x8(%rsi), %xmm2
movaps %xmm0, %xmm3
addss %xmm2, %xmm3
movaps %xmm3, 0x20(%rsp)
subss %xmm0, %xmm2
movss %xmm2, 0xc(%rsp)
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
movaps %xmm1, %xmm2
addps %xmm0, %xmm2
movaps %xmm2, 0x10(%rsp)
subps %xmm0, %xmm1
movaps %xmm1, 0x30(%rsp)
movsd 0x104(%rbx), %xmm0
movaps 0x10(%rsp), %xmm2
movaps %xmm2, %xmm1
maxps %xmm0, %xmm1
cmpunordps %xmm0, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
movlps %xmm0, 0x104(%rbx)
movss 0x10c(%rbx), %xmm0
movaps 0x20(%rsp), %xmm1
callq 0x4250
movss %xmm0, 0x10c(%rbx)
movsd 0xf8(%rbx), %xmm0
movaps 0x30(%rsp), %xmm2
movaps %xmm2, %xmm1
minps %xmm0, %xmm1
cmpunordps %xmm0, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
movlps %xmm0, 0xf8(%rbx)
movss 0x100(%rbx), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x41e0
movss %xmm0, 0x100(%rbx)
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0x7375
addq $0x40, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7480
movss 0x4(%rsi), %xmm3
movaps %xmm3, %xmm4
subss %xmm1, %xmm4
movss 0xfc(%rdi), %xmm5
ucomiss %xmm4, %xmm5
jae 0x7480
movss 0x8(%rsi), %xmm4
movaps %xmm4, %xmm5
subss %xmm1, %xmm5
movss 0x100(%rdi), %xmm6
ucomiss %xmm5, %xmm6
jae 0x7480
ucomiss 0x104(%rdi), %xmm0
jae 0x7480
addss %xmm1, %xmm3
ucomiss 0x108(%rdi), %xmm3
jae 0x7480
addss %xmm1, %xmm4
ucomiss 0x10c(%rdi), %xmm4
jb 0x7487
movb $0x0, 0x110(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x741e
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x74ba
cmpq $0x0, 0x120(%rbx)
jne 0x74ba
pushq $0x1
popq %rax
cmpq $0x1c, %rax
je 0x74bc
cmpq $0x0, (%rbx,%rax,8)
leaq 0x1(%rax), %rax
je 0x74a9
popq %rbx
retq
movb $0x1, %al
pushq $0x1
popq %rcx
cmpq $0x1c, %rcx
je 0x74e3
movq (%rdi,%rcx,8), %rdx
testq %rdx, %rdx
je 0x74de
cmpq %rbx, %rdx
je 0x74d9
xorl %eax, %eax
jmp 0x74de
andq $0x0, (%rdi,%rcx,8)
incq %rcx
jmp 0x74c1
testb $0x1, %al
je 0x74ef
andw $0x0, 0xe8(%rdi)
callq 0x7490
leaq 0x118(%rbx), %rdi
callq 0x44c0
movq 0xe0(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x44e0
// File: /workspace/github_c_makefile_star2_O2/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
xorl %r15d, %r15d
cmpq %r15, 0x120(%r14)
jbe 0x79b2
movq 0x118(%r14), %rax
movq (%rax,%r15,8), %rdi
callq *%rbx
incq %r15
jmp 0x7997
pushq $0x1
popq %r15
cmpq $0x1c, %r15
je 0x79d2
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0x79cd
movq %rbx, %rsi
callq 0x7989
incq %r15
jmp 0x79b6
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: setPNvectors
static void setPNvectors(Plane *plane, Point *p, Point *n, Point *min, Point *max){
    if (plane->a < 0.0) { p->x = min->x; n->x = max->x; }
    else                { p->x = max->x; n->x = min->x; }
    if (plane->b < 0.0) { p->y = min->y; n->y = max->y; }
    else                { p->y = max->y; n->y = min->y; }
    if (plane->c < 0.0) { p->z = min->z; n->z = max->z; }
    else                { p->z = max->z; n->z = min->z; }
}

// Assembly:
xorps %xmm0, %xmm0
ucomiss (%rdi), %xmm0
movq %r8, %rax
cmovaq %rcx, %rax
movq %rcx, %r9
cmovaq %r8, %r9
movss (%rax), %xmm1
movss %xmm1, (%rsi)
movss (%r9), %xmm1
movss %xmm1, (%rdx)
ucomiss 0x4(%rdi), %xmm0
movq %r8, %rax
cmovaq %rcx, %rax
movq %rcx, %r9
cmovaq %r8, %r9
movss 0x4(%rax), %xmm1
movss %xmm1, 0x4(%rsi)
movss 0x4(%r9), %xmm1
movss %xmm1, 0x4(%rdx)
ucomiss 0x8(%rdi), %xmm0
movq %r8, %rax
cmovaq %rcx, %rax
cmovaq %r8, %rcx
movss 0x8(%rax), %xmm0
movss %xmm0, 0x8(%rsi)
movss 0x8(%rcx), %xmm0
movss %xmm0, 0x8(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/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
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x7ca3
movq 0x118(%rdi), %rdx
movq (%rdx,%rcx,8), %rdx
movq (%rdx), %rdx
movsd (%rdx), %xmm2
addps %xmm2, %xmm1
addss 0x8(%rdx), %xmm0
incq %rcx
jmp 0x7c7f
cvtsi2ss %eax, %xmm2
divss %xmm2, %xmm0
unpcklps %xmm2, %xmm2            # xmm2 = xmm2[0,0,1,1]
divps %xmm2, %xmm1
movlps %xmm1, 0xec(%rdi)
movss %xmm0, 0xf4(%rdi)
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/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 (%rdx), %xmm1
movss 0x4(%rdx), %xmm2
movss 0x8(%rdx), %xmm3
movss (%rsi), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x4(%rsi), %xmm4
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movss 0x8(%rsi), %xmm1
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movss 0xc(%rdi), %xmm2
movss 0x10(%rdi), %xmm3
movss 0x14(%rdi), %xmm5
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
subps %xmm2, %xmm0
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
subps %xmm3, %xmm4
shufps $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
subps %xmm5, %xmm1
mulps %xmm4, %xmm4
mulps %xmm0, %xmm0
addps %xmm4, %xmm0
mulps %xmm1, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
xorl %ecx, %ecx
ucomiss %xmm1, %xmm0
seta %cl
ucomiss %xmm0, %xmm1
pushq $-0x1
popq %rax
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq $-0x1
popq %rax
cmovbel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 (%rdx), %xmm1
movss 0x4(%rdx), %xmm3
movss 0x8(%rdx), %xmm4
movss 0xc(%rdx), %xmm5
movss (%rsi), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x4(%rsi), %xmm2
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movss 0x8(%rsi), %xmm1
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movss 0xc(%rsi), %xmm3
unpcklps %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1]
movss 0xc(%rdi), %xmm4
movss 0x10(%rdi), %xmm5
movss 0x14(%rdi), %xmm6
shufps $0x0, %xmm4, %xmm4      # xmm4 = xmm4[0,0,0,0]
subps %xmm4, %xmm0
subps %xmm3, %xmm0
shufps $0x0, %xmm5, %xmm5      # xmm5 = xmm5[0,0,0,0]
subps %xmm5, %xmm2
subps %xmm3, %xmm2
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
subps %xmm6, %xmm1
subps %xmm3, %xmm1
mulps %xmm2, %xmm2
mulps %xmm0, %xmm0
addps %xmm2, %xmm0
mulps %xmm1, %xmm1
addps %xmm0, %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
xorl %ecx, %ecx
ucomiss %xmm1, %xmm0
seta %cl
ucomiss %xmm0, %xmm1
pushq $-0x1
popq %rax
cmovbel %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x8467
leaq 0x616f(%rip), %rcx      # 0xe5c0
leaq 0x6148(%rip), %rdi      # 0xe5a0
cmpb $0x0, (%rax)
cmovneq %rcx, %rdi
movq %rbx, %rsi
callq 0x42e0
cmpq $0x0, 0x78(%rbx)
je 0x8477
movq %rbx, %rdi
popq %rbx
jmp 0x4220
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x42c0
movq %rax, %rbx
movsd 0x1c98(%rip), %xmm0     # 0xa140
movsd %xmm0, 0x30(%rax)
movl $0x428c0000, 0x38(%rax) # imm = 0x428C0000
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movl $0x3f800000, 0x1c(%rax) # imm = 0x3F800000
movups %xmm0, 0x20(%rax)
movaps 0x1b93(%rip), %xmm0     # 0xa060
movups %xmm0, 0x68(%rax)
movss (%rsp), %xmm0
movss %xmm0, 0x3c(%rax)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x40(%rax)
movaps 0x1c63(%rip), %xmm0     # 0xa150
movups %xmm0, 0x44(%rax)
movsd 0x1c67(%rip), %xmm0     # 0xa160
movsd %xmm0, 0x54(%rax)
andq $0x0, 0x5c(%rax)
testl %r15d, %r15d
leaq 0x51(%rip), %rax        # 0x855e
leaq 0xe0(%rip), %rcx        # 0x85f4
cmoveq %rax, %rcx
movb $0x0, 0x64(%rbx)
movq %rcx, 0x1d8(%rbx)
movl %ebp, 0x8(%rbx)
movq %r14, (%rbx)
leaq 0x6030(%rip), %rdi      # 0xe560
movq %rbx, %rsi
callq 0x42e0
leaq 0x6041(%rip), %rdi      # 0xe580
movq %rbx, %rsi
callq 0x42e0
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_O2/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 0x1a89(%rip), %xmm3     # 0xa010
addsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm1
movaps %xmm1, %xmm0
subss %xmm2, %xmm0
cvtss2sd %xmm4, %xmm2
cvtss2sd 0x60(%rdi), %xmm5
addsd %xmm3, %xmm5
mulsd %xmm2, %xmm5
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 0x40f0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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
movsd 0x3c(%rdi), %xmm0
movsd 0x44(%rdi), %xmm1
mulps %xmm0, %xmm1
movaps %xmm1, 0x10(%rsp)
movss 0x38(%rdi), %xmm0
mulss 0x1a1d(%rip), %xmm0     # 0xa038
callq 0x4280
cvtss2sd %xmm0, %xmm0
callq 0x4360
movss 0x30(%rbx), %xmm4
movss 0x34(%rbx), %xmm5
cvtss2sd %xmm4, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm1, %xmm1
cvtsd2ss %xmm1, %xmm6
movaps 0x10(%rsp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
divss %xmm0, %xmm1
mulss %xmm6, %xmm1
cvtss2sd %xmm1, %xmm0
movaps %xmm1, %xmm8
cvtss2sd 0x5c(%rbx), %xmm1
movsd 0x19a4(%rip), %xmm2     # 0xa010
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
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 0x4470
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1916(%rip), %xmm3     # 0xa030
ja 0x8772
movss 0x1918(%rip), %xmm4     # 0xa03c
ucomiss %xmm3, %xmm4
ja 0x8772
ucomiss 0x1900(%rip), %xmm2     # 0xa030
ja 0x8772
ucomiss %xmm2, %xmm4
ja 0x8772
ucomiss 0x18f2(%rip), %xmm1     # 0xa030
ja 0x8772
movaps 0x1a29(%rip), %xmm5     # 0xa170
andps %xmm0, %xmm5
ucomiss 0x18df(%rip), %xmm5     # 0xa030
ja 0x8772
ucomiss %xmm1, %xmm4
ja 0x8772
movss %xmm0, 0x4c(%rdi)
movss %xmm1, 0x50(%rdi)
movss %xmm2, 0x54(%rdi)
movss %xmm3, 0x58(%rdi)
jmpq *0x1d8(%rdi)
movq 0x587f(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1a45(%rip), %rdi      # 0xa1c8
pushq $0x47
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x8801
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
movq 0x57f0(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x19fe(%rip), %rdi      # 0xa210
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x8841
movss (%rsi), %xmm0
movss %xmm0, 0xc(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x10(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x14(%rdi)
retq
movq 0x57b0(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x19be(%rip), %rdi      # 0xa210
pushq $0x1f
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsCameraRotation
float *hpsCameraRotation(HPScamera *camera){
    if (camera->style != HPS_POSITION){
        fprintf(stderr, "Can't rotation a non HPS_POSITION camera\n");
        return NULL;
    }
    return (float *) &camera->rotation;
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
jne 0x8870
movq %rdi, %rax
addq $0x68, %rax
retq
pushq %rax
movq 0x5780(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x19ae(%rip), %rdi      # 0xa230
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x44a0
xorl %eax, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x88b8
movss (%rsi), %xmm0
movss %xmm0, 0x18(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x1c(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x20(%rdi)
retq
movq 0x5739(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1991(%rip), %rdi      # 0xa25a
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x88fc
movss (%rsi), %xmm0
movss %xmm0, 0x24(%rdi)
movss 0x4(%rsi), %xmm0
movss %xmm0, 0x28(%rdi)
movss 0x8(%rsi), %xmm0
movss %xmm0, 0x2c(%rdi)
retq
movq 0x56f5(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1977(%rip), %rdi      # 0xa284
pushq $0x46
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsYawCamera
void hpsYawCamera(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->rotation.x += angle;
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x892e
addss 0x68(%rdi), %xmm0
movss %xmm0, 0x68(%rdi)
retq
movq 0x56c3(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x198c(%rip), %rdi      # 0xa2cb
pushq $0x35
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x8962
movl $0x2, 0x8(%rdi)
movss %xmm0, 0x68(%rdi)
retq
movq 0x568f(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1958(%rip), %rdi      # 0xa2cb
pushq $0x35
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x89ac
addss 0x6c(%rdi), %xmm0
cvtss2sd %xmm0, %xmm0
maxsd 0x17f6(%rip), %xmm0     # 0xa190
minsd 0x17f6(%rip), %xmm0     # 0xa198
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6c(%rdi)
retq
movq 0x5645(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x1944(%rip), %rdi      # 0xa301
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraPitch
void hpsSetCameraPitch(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 = fmin(HALF_PI, fmax(-HALF_PI, angle));
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x89f1
cvtss2sd %xmm0, %xmm0
maxsd 0x17b1(%rip), %xmm0     # 0xa190
minsd 0x17b1(%rip), %xmm0     # 0xa198
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x6c(%rdi)
retq
movq 0x5600(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x18ff(%rip), %rdi      # 0xa301
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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 0x8a2a
addss 0x74(%rdi), %xmm0
movss 0x1780(%rip), %xmm1     # 0xa1a0
maxss %xmm0, %xmm1
movss %xmm1, 0x74(%rdi)
retq
movq 0x55c7(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x18fe(%rip), %rdi      # 0xa339
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraZoom
void hpsSetCameraZoom(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 < 0.0) ? 0.0 : distance;
}

// Assembly:
cmpl $0x2, 0x8(%rdi)
jne 0x8a59
xorps %xmm1, %xmm1
maxss %xmm0, %xmm1
movss %xmm1, 0x74(%rdi)
retq
movq 0x5598(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x18cf(%rip), %rdi      # 0xa339
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsRollCamera
void hpsRollCamera(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_FIRST_PERSON)) {
        fprintf(stderr, "Can't roll a non HPS_ORBIT or HPS_FIRST_PERSON camera\n");
        return;
    }
    camera->rotation.z += angle;
}

// Assembly:
movl 0x8(%rdi), %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x8a8b
addss 0x70(%rdi), %xmm0
movss %xmm0, 0x70(%rdi)
retq
movq 0x5566(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x18c0(%rip), %rdi      # 0xa35c
pushq $0x36
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsSetCameraRoll
void hpsSetCameraRoll(HPScamera *camera, float angle){
    if ((camera->style != HPS_ORBIT) && (camera->style != HPS_LOOK_AT)) {
        fprintf(stderr, "Can't roll a non HPS_ORBIT or HPS_LOOK_AT camera\n");
        return;
    }
    camera->rotation.z = angle;
}

// Assembly:
movl 0x8(%rdi), %eax
decl %eax
cmpl $0x2, %eax
jae 0x8ab7
movss %xmm0, 0x70(%rdi)
retq
movq 0x553a(%rip), %rax      # 0xdff8
movq (%rax), %rcx
leaq 0x18cb(%rip), %rdi      # 0xa393
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
jmp 0x44a0
// File: /workspace/github_c_makefile_star2_O2/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)
movq 0x5a7d(%rip), %rax      # 0xe568
xorl %ebx, %ebx
cmpq %rbx, %rax
jbe 0x8b2b
movq 0x5a67(%rip), %rcx      # 0xe560
movq (%rcx,%rbx,8), %rdi
cmpb $0x0, 0x64(%rdi)
jne 0x8b26
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x3c(%rdi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x40(%rdi)
callq *0x1d8(%rdi)
movq 0x5a42(%rip), %rax      # 0xe568
incq %rbx
jmp 0x8aed
addq $0x10, %rsp
popq %rbx
retq