// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/aabb-tree.c
// Function: doVisible
static void doVisible(AABBtree *tree, Plane *planes, void (*func)(Node *), int planeMask){
    int nextMask = 0;
    int inView = inPlanes(tree, planes, planeMask, &nextMask);
    int i;
    if (inView == INSIDE)
	treeMap(tree, func);
    else if (inView == INTERSECT){
#ifdef DEBUG
        nTrees++;
#endif 
	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)
		doVisible(child, planes, func, nextMask);
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, 0x10(%rsp)
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r14
movzwl 0xea(%rdi), %ecx
pushq $0x1
popq %r13
movl %r13d, %eax
shll %cl, %eax
movl %eax, 0xc(%rsp)
shll $0x4, %ecx
movups (%rsi,%rcx), %xmm0
movaps %xmm0, 0x20(%rsp)
cmpb $0x0, 0x110(%rdi)
jne 0x755c
movq %r14, %rdi
callq 0x7a48
cmpw $0x0, 0xe8(%r14)
movq %rbp, 0x48(%rsp)
jne 0x7734
movq 0x120(%r14), %rbx
cmpq $0x1e, %rbx
jb 0x7734
movq %r12, 0x30(%rsp)
leaq 0x118(%r14), %r12
movq %r14, %rdi
callq 0x7c70
movss 0x104(%r14), %xmm0
movss 0x108(%r14), %xmm2
subss 0xf8(%r14), %xmm0
subss 0xfc(%r14), %xmm2
movss 0x10c(%r14), %xmm1
subss 0x100(%r14), %xmm1
movss 0x2ad9(%rip), %xmm4     # 0xa0ac
movaps %xmm2, %xmm3
mulss %xmm4, %xmm3
movaps %xmm1, %xmm5
mulss %xmm4, %xmm5
movaps %xmm0, %xmm6
cmpltps %xmm5, %xmm6
movaps %xmm0, %xmm7
cmpltps %xmm3, %xmm7
orps %xmm6, %xmm7
movd %xmm7, %eax
andl $0x1, %eax
xorl $0x7, %eax
mulss %xmm4, %xmm0
movaps %xmm2, %xmm4
cmpltps %xmm0, %xmm4
cmpltps %xmm5, %xmm2
orps %xmm4, %xmm2
movd %xmm2, %ecx
movl %eax, %edx
andl $-0x3, %edx
testb $0x1, %cl
cmovel %eax, %edx
movaps %xmm1, %xmm2
cmpltps %xmm0, %xmm2
cmpltps %xmm3, %xmm1
orps %xmm2, %xmm1
movd %xmm1, %eax
movl %edx, %ecx
andl $0x3, %ecx
testb $0x1, %al
cmovel %edx, %ecx
movw %cx, 0xe8(%r14)
xorl %r15d, %r15d
testl %ebx, %ebx
movl $0x0, %ebp
movq %rbx, 0x70(%rsp)
cmovgl %ebx, %ebp
cmpq %r15, %rbp
je 0x768c
movq 0x118(%r14), %rax
movq (%rax,%r15,8), %rbx
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x71c3
cmpq %r14, %rax
je 0x7687
movq %rbx, %rdi
movq %rax, %rsi
callq 0x43a0
movq (%r12), %rax
andq $0x0, (%rax,%r15,8)
incq %r15
jmp 0x7653
xorl %ebx, %ebx
movl %ebx, %ebx
cmpq %rbx, 0x120(%r14)
jbe 0x76b5
movq (%r12), %rax
cmpq $0x0, (%rax,%rbx,8)
jne 0x76b1
movq %r12, %rdi
movq %rbx, %rsi
callq 0x40a0
jmp 0x7690
incl %ebx
jmp 0x768e
movslq 0x70(%rsp), %rax
pushq $0x1
popq %rcx
movq 0x30(%rsp), %r12
cmpq $0x1c, %rcx
je 0x76df
movq (%r14,%rcx,8), %rdx
testq %rdx, %rdx
je 0x76da
cmpq %rax, 0x120(%rdx)
je 0x76fb
incq %rcx
jmp 0x76c2
pushq $0x1
popq %rbx
cmpq $0x1c, %rbx
je 0x7734
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x76f6
callq 0x7a48
incq %rbx
jmp 0x76e2
xorl %r15d, %r15d
cmpq $0x1b, %r15
je 0x7734
movq 0x8(%r14,%r15,8), %rbx
testq %rbx, %rbx
je 0x772f
addq $0x118, %rbx            # imm = 0x118
movq %rbx, %rdi
callq 0x4350
testq %rax, %rax
je 0x772f
movq %rax, %rdi
movq %r14, %rsi
callq 0x43a0
jmp 0x7715
incq %r15
jmp 0x76fe
movl 0x100(%r14), %eax
movl %eax, 0x68(%rsp)
movq 0xf8(%r14), %rax
movq %rax, 0x60(%rsp)
movq 0x104(%r14), %rax
movq %rax, 0x50(%rsp)
movl 0x10c(%r14), %eax
movl %eax, 0x58(%rsp)
xorl %ebp, %ebp
movl 0x10(%rsp), %eax
testl %eax, 0xc(%rsp)
je 0x7813
leaq 0x20(%rsp), %rbx
leaq 0x3c(%rsp), %r15
leaq 0x14(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x50(%rsp), %r8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x79d8
movss (%rbx), %xmm0
movss 0x4(%rbx), %xmm1
movss 0x4(%r15), %xmm2
mulss %xmm1, %xmm2
movss (%r15), %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movss 0x8(%rbx), %xmm2
movss 0x8(%r15), %xmm5
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
movss 0xc(%rbx), %xmm3
addss %xmm3, %xmm5
xorps %xmm4, %xmm4
ucomiss %xmm5, %xmm4
ja 0x7962
mulss 0x18(%rsp), %xmm1
mulss 0x14(%rsp), %xmm0
addss %xmm1, %xmm0
mulss 0x1c(%rsp), %xmm2
addss %xmm0, %xmm2
addss %xmm2, %xmm3
ucomiss %xmm3, %xmm4
movl $0x0, %ecx
movl 0x10(%rsp), %eax
jbe 0x7815
movl 0xc(%rsp), %ebp
pushq $0x2
popq %rcx
jmp 0x7815
xorl %ecx, %ecx
movl %ecx, 0xc(%rsp)
pushq $0x1
popq %rbx
xorl %r15d, %r15d
movq %r12, 0x30(%rsp)
cmpl %eax, %r13d
jg 0x7900
testl %eax, %r13d
je 0x78f1
movzwl 0xea(%r14), %eax
cmpq %rax, %r15
je 0x78ed
movups (%r12), %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x3c(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x60(%rsp), %rcx
leaq 0x50(%rsp), %r8
callq 0x79d8
movss 0x20(%rsp), %xmm0
movss 0x24(%rsp), %xmm1
movss 0x40(%rsp), %xmm2
mulss %xmm1, %xmm2
movss 0x3c(%rsp), %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
movss 0x28(%rsp), %xmm2
movss 0x44(%rsp), %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
movss 0x2c(%rsp), %xmm3
addss %xmm3, %xmm4
xorps %xmm5, %xmm5
ucomiss %xmm4, %xmm5
xorps %xmm4, %xmm4
ja 0x795a
mulss 0x18(%rsp), %xmm1
mulss 0x14(%rsp), %xmm0
addss %xmm1, %xmm0
mulss 0x1c(%rsp), %xmm2
addss %xmm0, %xmm2
addss %xmm2, %xmm3
ucomiss %xmm3, %xmm4
jbe 0x78ed
orl %r13d, %ebp
pushq $0x2
popq %rax
movl %eax, 0xc(%rsp)
movl 0x10(%rsp), %eax
incq %r15
addl %r13d, %r13d
addq $0x10, %r12
jmp 0x7824
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x7971
cmpl $0x2, %eax
movq 0x30(%rsp), %r12
movl %ebp, %r13d
movq 0x48(%rsp), %rbp
jne 0x7962
xorl %r15d, %r15d
cmpq %r15, 0x120(%r14)
jbe 0x7952
movq 0x118(%r14), %rax
movq (%rax,%r15,8), %rdi
callq *%rbp
incq %r15
jmp 0x791d
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x794f
movq %r12, %rsi
movq %rbp, %rdx
movl %r13d, %ecx
callq 0x7510
incq %rbx
cmpq $0x1c, %rbx
jne 0x7938
jmp 0x7962
movw %r15w, 0xea(%r14)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq 0x48(%rsp), %rsi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7989