// File: /workspace/github_c_makefile_star2_O1/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 $0x48, %rsp
movl %ecx, 0x20(%rsp)
movq %rdx, %r12
movq %rdi, %r14
movzwl 0xea(%rdi), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, 0x24(%rsp)
shll $0x4, %ecx
movss (%rsi,%rcx), %xmm0
movss %xmm0, 0x1c(%rsp)
movss 0x4(%rsi,%rcx), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0x8(%rsi,%rcx), %xmm0
movss %xmm0, 0x18(%rsp)
movq %rsi, 0x28(%rsp)
movss 0xc(%rsi,%rcx), %xmm0
movss %xmm0, 0x14(%rsp)
cmpb $0x0, 0x110(%rdi)
jne 0x8226
movq %r14, %rdi
callq 0x87f1
cmpw $0x0, 0xe8(%r14)
jne 0x8439
movq 0x120(%r14), %rbx
cmpq $0x1e, %rbx
jb 0x8439
movq %r12, 0x30(%rsp)
leaq 0x118(%r14), %r13
movq %r14, %rdi
callq 0x8b2a
movss 0x104(%r14), %xmm1
movss 0x108(%r14), %xmm2
subss 0xf8(%r14), %xmm1
subss 0xfc(%r14), %xmm2
movss 0x10c(%r14), %xmm0
subss 0x100(%r14), %xmm0
movss 0x2e14(%rip), %xmm3     # 0xb0ac
movaps %xmm2, %xmm4
mulss %xmm3, %xmm4
movaps %xmm0, %xmm5
mulss %xmm3, %xmm5
movaps %xmm1, %xmm6
cmpltps %xmm5, %xmm6
movaps %xmm1, %xmm7
cmpltps %xmm4, %xmm7
orps %xmm6, %xmm7
movd %xmm7, %eax
andl $0x1, %eax
xorl $0x7, %eax
mulss %xmm3, %xmm1
movaps %xmm2, %xmm3
cmpltps %xmm1, %xmm3
cmpltps %xmm5, %xmm2
orps %xmm3, %xmm2
movd %xmm2, %ecx
movl %eax, %edx
andl $-0x3, %edx
movaps %xmm0, %xmm2
cmpltps %xmm1, %xmm2
cmpltps %xmm4, %xmm0
orps %xmm2, %xmm0
testb $0x1, %cl
cmovel %eax, %edx
movd %xmm0, %eax
movl %edx, %ecx
andl $0x3, %ecx
testb $0x1, %al
cmovel %edx, %ecx
movw %cx, 0xe8(%r14)
movq %rbx, (%rsp)
testl %ebx, %ebx
jle 0x8363
movq (%rsp), %rbp
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r12d, %r12d
movq 0x118(%r14), %rax
movq (%rax,%r12,8), %r15
movq (%r15), %rsi
movq %r14, %rdi
callq 0x7d9b
cmpq %r14, %rax
je 0x835b
movq %rax, %rbx
movq %rax, %rdi
addq $0x118, %rdi            # imm = 0x118
movq %r15, %rsi
callq 0x4270
movq %rbx, 0x8(%r15)
movq (%r13), %rax
movq $0x0, (%rax,%r12,8)
incq %r12
cmpq %r12, %rbp
jne 0x831b
cmpq $0x0, 0x120(%r14)
movq (%rsp), %r15
je 0x8398
xorl %esi, %esi
xorl %ebx, %ebx
movq (%r13), %rax
cmpq $0x0, (%rax,%rsi,8)
je 0x8384
incl %ebx
jmp 0x838c
movq %r13, %rdi
callq 0x40a0
movslq %ebx, %rsi
cmpq %rsi, 0x120(%r14)
ja 0x8375
movslq %r15d, %rax
movl $0x1, %ecx
movq 0x30(%rsp), %r12
movq (%r14,%rcx,8), %rsi
testq %rsi, %rsi
je 0x83bc
movl $0xa, %edx
cmpq %rax, 0x120(%rsi)
je 0x83be
xorl %edx, %edx
testl %edx, %edx
jne 0x83e9
incq %rcx
cmpq $0x1c, %rcx
jne 0x83a5
movl $0x1, %ebx
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x83de
callq 0x87f1
incq %rbx
cmpq $0x1c, %rbx
jne 0x83d0
jmp 0x8439
cmpl $0xa, %edx
jne 0x8439
xorl %ebp, %ebp
movq 0x8(%r14,%rbp,8), %r15
testq %r15, %r15
je 0x8430
addq $0x118, %r15            # imm = 0x118
movq %r15, %rdi
callq 0x42d0
testq %rax, %rax
je 0x8430
movq %rax, %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4270
movq %r14, 0x8(%rbx)
movq %r15, %rdi
callq 0x42d0
movq %rax, %rbx
testq %rax, %rax
jne 0x8411
incq %rbp
cmpq $0x1b, %rbp
jne 0x83f0
movss 0xf8(%r14), %xmm14
movss 0xfc(%r14), %xmm2
movss 0x100(%r14), %xmm6
movss 0x104(%r14), %xmm3
movss 0x108(%r14), %xmm4
movss 0x10c(%r14), %xmm0
movaps %xmm0, (%rsp)
movl 0x24(%rsp), %ebp
movl 0x20(%rsp), %r10d
testl %r10d, %ebp
movaps %xmm6, 0x30(%rsp)
je 0x853a
xorps %xmm5, %xmm5
movss 0x1c(%rsp), %xmm0
movaps %xmm0, %xmm7
cmpltss %xmm5, %xmm7
movaps %xmm7, %xmm8
andps %xmm14, %xmm8
movaps %xmm7, %xmm10
andnps %xmm3, %xmm10
orps %xmm8, %xmm10
movss 0x10(%rsp), %xmm15
movaps %xmm15, %xmm8
cmpltss %xmm5, %xmm8
movaps %xmm8, %xmm9
andps %xmm2, %xmm9
movaps %xmm8, %xmm11
andnps %xmm4, %xmm11
orps %xmm9, %xmm11
movaps %xmm14, %xmm1
movss 0x18(%rsp), %xmm14
movaps %xmm14, %xmm9
cmpltss %xmm5, %xmm9
movaps %xmm9, %xmm12
andps %xmm6, %xmm12
movaps %xmm9, %xmm13
andnps (%rsp), %xmm13
orps %xmm12, %xmm13
mulss %xmm15, %xmm11
mulss %xmm0, %xmm10
addss %xmm11, %xmm10
mulss %xmm14, %xmm13
addss %xmm10, %xmm13
movss 0x14(%rsp), %xmm11
addss %xmm11, %xmm13
ucomiss %xmm13, %xmm5
movq 0x28(%rsp), %r15
jbe 0x8545
movl $0x1, %eax
xorl %ebp, %ebp
jmp 0x8722
xorl %ebp, %ebp
xorl %eax, %eax
movq 0x28(%rsp), %r15
jmp 0x85b3
movaps %xmm9, %xmm10
andps (%rsp), %xmm10
andnps %xmm6, %xmm9
orps %xmm10, %xmm9
movaps %xmm8, %xmm10
andps %xmm4, %xmm10
movaps %xmm2, %xmm13
andnps %xmm2, %xmm8
orps %xmm10, %xmm8
movaps %xmm7, %xmm10
andps %xmm3, %xmm10
movaps %xmm1, %xmm12
andnps %xmm1, %xmm7
orps %xmm10, %xmm7
mulss %xmm8, %xmm15
mulss %xmm7, %xmm0
addss %xmm15, %xmm0
mulss %xmm9, %xmm14
addss %xmm0, %xmm14
addss %xmm14, %xmm11
ucomiss %xmm11, %xmm5
jbe 0x85a7
movl $0x2, %eax
jmp 0x85ab
xorl %ebp, %ebp
xorl %eax, %eax
movaps %xmm12, %xmm14
movaps %xmm13, %xmm2
testl %r10d, %r10d
jle 0x8722
movzwl 0xea(%r14), %ecx
leaq 0xc(%r15), %rsi
movl $0x1, %edi
xorl %edx, %edx
xorps %xmm1, %xmm1
xorps %xmm5, %xmm5
cmpq %rdx, %rcx
sete %r8b
testl %r10d, %edi
sete %r9b
orb %r8b, %r9b
jne 0x8701
movss -0xc(%rsi), %xmm7
movss -0x8(%rsi), %xmm9
movss -0x4(%rsi), %xmm0
movaps %xmm7, %xmm10
cmpltss %xmm1, %xmm10
movaps %xmm10, %xmm11
andps %xmm14, %xmm11
movaps %xmm10, %xmm13
andnps %xmm3, %xmm13
orps %xmm11, %xmm13
movaps %xmm9, %xmm11
cmpltss %xmm1, %xmm11
movaps %xmm11, %xmm12
andps %xmm2, %xmm12
movaps %xmm14, %xmm1
movaps %xmm11, %xmm14
andnps %xmm4, %xmm14
orps %xmm12, %xmm14
movaps %xmm0, %xmm8
cmpltss %xmm5, %xmm8
movaps %xmm8, %xmm15
movaps %xmm3, %xmm6
movaps 0x30(%rsp), %xmm3
andps %xmm3, %xmm15
movaps %xmm8, %xmm12
andnps (%rsp), %xmm12
orps %xmm15, %xmm12
mulss %xmm9, %xmm14
mulss %xmm7, %xmm13
addss %xmm14, %xmm13
mulss %xmm0, %xmm12
addss %xmm13, %xmm12
movss (%rsi), %xmm13
addss %xmm13, %xmm12
ucomiss %xmm12, %xmm5
ja 0x8715
movaps %xmm8, %xmm12
movaps (%rsp), %xmm14
andps %xmm14, %xmm12
andnps %xmm3, %xmm8
orps %xmm12, %xmm8
movaps %xmm11, %xmm12
movaps %xmm4, %xmm15
andps %xmm4, %xmm12
andnps %xmm2, %xmm11
orps %xmm12, %xmm11
movaps %xmm10, %xmm12
andps %xmm6, %xmm12
andnps %xmm1, %xmm10
orps %xmm12, %xmm10
mulss %xmm11, %xmm9
mulss %xmm10, %xmm7
addss %xmm9, %xmm7
mulss %xmm8, %xmm0
addss %xmm7, %xmm0
addss %xmm0, %xmm13
ucomiss %xmm13, %xmm5
movaps %xmm1, %xmm14
movaps %xmm6, %xmm3
xorps %xmm1, %xmm1
jbe 0x86fd
orl %edi, %ebp
movl $0x2, %eax
movaps %xmm15, %xmm4
incq %rdx
addl %edi, %edi
addq $0x10, %rsi
cmpl %r10d, %edi
jle 0x85d5
jmp 0x8722
movw %dx, 0xea(%r14)
movl $0x1, %eax
testl %eax, %eax
je 0x8784
cmpl $0x2, %eax
jne 0x8775
cmpq $0x0, 0x120(%r14)
je 0x8751
xorl %ebx, %ebx
movq 0x118(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq *%r12
incq %rbx
cmpq %rbx, 0x120(%r14)
ja 0x8737
movl $0x1, %ebx
movq (%r14,%rbx,8), %rdi
testq %rdi, %rdi
je 0x876c
movq %r15, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x81b4
incq %rbx
cmpq $0x1c, %rbx
jne 0x8756
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r12, %rsi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x879a