// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
testb $0x1, 0x90(%rax)
je 0xe55b
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0xe45a
movq -0x8(%rbp), %rdi
addq $0x54, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x4060
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x4070
jmp 0xe498
movq -0x8(%rbp), %rdi
addq $0x54, %rdi
leaq -0x60(%rbp), %rsi
callq 0x4060
movq -0x8(%rbp), %rdi
addq $0x48, %rdi
leaq -0x60(%rbp), %rsi
callq 0x4070
leaq -0x60(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdx
callq 0x4140
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, (%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x4(%rax)
movq -0x68(%rbp), %rax
xorps %xmm0, %xmm0
movss %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rdi
movq -0x68(%rbp), %rsi
callq 0x4220
movq -0x8(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0xe4ec
movq -0x8(%rbp), %rdi
callq 0x4430
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq *%rax
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0xe54e
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movb $0x1, 0x90(%rax)
movq -0x70(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xe400
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe509
movq -0x8(%rbp), %rax
movb $0x0, 0x90(%rax)
jmp 0xe596
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0xe594
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
callq 0xe400
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xe562
jmp 0xe596
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)