// File: /workspace/github_c_makefile_star2_O2/AlexCharlton[P]Hyperscene/src/camera.c
// Function: hpsRenderCamera
void hpsRenderCamera(HPScamera *camera){
    currentCamera = *camera; // Set current camera to this one
    HPScamera *c = &currentCamera;
    clearQueues();
    computePlanes(c);
    c->scene->partitionInterface->doVisible(c->scene->partitionStruct,
                                            c->planes, &addToQueue);
    setCameraSort(c);
    hpsPreRenderExtensions(c->scene);
    renderQueues(c);
    hpsPostRenderExtensions(c->scene);
    *camera = currentCamera; // Copy currentCamera back into camera
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rsi
leaq 0x6253(%rip), %rdi      # 0xe330
movl $0x1e8, %edx            # imm = 0x1E8
movq %rsi, (%rsp)
callq 0x4270
andq $0x0, 0x64b5(%rip)      # 0xe5a8
andq $0x0, 0x64cd(%rip)      # 0xe5c8
movups 0x6326(%rip), %xmm0     # 0xe428
movups 0x632b(%rip), %xmm2     # 0xe434
movups 0x6334(%rip), %xmm3     # 0xe444
movups 0x633d(%rip), %xmm1     # 0xe454
movaps %xmm2, %xmm5
shufps $0x1, %xmm0, %xmm5      # xmm5 = xmm5[1,0],xmm0[0,0]
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
movss 0x633b(%rip), %xmm4     # 0xe464
movaps %xmm4, %xmm6
shufps $0xd4, %xmm3, %xmm6     # xmm6 = xmm6[0,1],xmm3[1,3]
shufps $0x28, %xmm6, %xmm0     # xmm0 = xmm0[0,2],xmm6[2,0]
movaps %xmm2, %xmm6
movlhps %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0]
addps %xmm0, %xmm6
movups %xmm6, 0x6374(%rip)     # 0xe4b8
movaps %xmm2, %xmm0
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movaps %xmm4, %xmm6
movlhps %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0]
shufps $0x24, %xmm6, %xmm0     # xmm0 = xmm0[0,1],xmm6[2,0]
movaps %xmm1, %xmm6
shufps $0x55, %xmm3, %xmm6     # xmm6 = xmm6[1,1],xmm3[1,1]
shufps $0x22, %xmm6, %xmm5     # xmm5 = xmm5[2,0],xmm6[2,0]
movaps %xmm0, %xmm6
subps %xmm5, %xmm6
movups %xmm6, 0x633c(%rip)     # 0xe4a8
leaq 0x6335(%rip), %rsi      # 0xe4a8
movups 0x62b2(%rip), %xmm5     # 0xe42c
movss 0x62ba(%rip), %xmm6     # 0xe43c
movaps %xmm6, %xmm7
movlhps %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
unpcklps %xmm3, %xmm5            # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1]
movss 0x62b9(%rip), %xmm3     # 0xe44c
movlhps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
shufps $0x24, %xmm4, %xmm5     # xmm5 = xmm5[0,1],xmm4[2,0]
movlhps %xmm2, %xmm7            # xmm7 = xmm7[0],xmm2[0]
movss 0x62b7(%rip), %xmm2     # 0xe45c
movaps %xmm2, %xmm4
movlhps %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0]
shufps $0x22, %xmm4, %xmm7     # xmm7 = xmm7[2,0],xmm4[2,0]
addps %xmm5, %xmm7
movups %xmm7, 0x631f(%rip)     # 0xe4d8
movlhps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
shufps $0x22, %xmm2, %xmm6     # xmm6 = xmm6[2,0],xmm2[2,0]
movaps %xmm0, %xmm1
subps %xmm6, %xmm1
movups %xmm1, 0x62fb(%rip)     # 0xe4c8
movss 0x626b(%rip), %xmm1     # 0xe440
movhps 0x6254(%rip), %xmm1     # xmm1 = xmm1[0,1],mem[0,1]
movss 0x626c(%rip), %xmm2     # 0xe450
movss 0x6274(%rip), %xmm3     # 0xe460
movlhps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
shufps $0x22, %xmm3, %xmm1     # xmm1 = xmm1[2,0],xmm3[2,0]
movaps %xmm0, %xmm2
addps %xmm1, %xmm2
movups %xmm2, 0x62e8(%rip)     # 0xe4e8
subps %xmm1, %xmm0
movups %xmm0, 0x62ee(%rip)     # 0xe4f8
movq 0x611f(%rip), %rax      # 0xe330
movq 0x28(%rax), %rcx
movq 0x30(%rax), %rdi
leaq 0x21c(%rip), %rdx       # 0x843c
callq *0x28(%rcx)
movss 0x62bd(%rip), %xmm1     # 0xe4e8
movss 0x62b9(%rip), %xmm0     # 0xe4ec
cvttss2si %xmm0, %eax
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cvtsi2ss %ecx, %xmm3
movss 0x62a6(%rip), %xmm2     # 0xe4f0
movaps %xmm1, %xmm4
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
cvttps2dq %xmm4, %xmm4
movdqa %xmm4, %xmm5
psrad $0x1f, %xmm5
pxor %xmm5, %xmm4
psubd %xmm5, %xmm4
cvtdq2ps %xmm4, %xmm5
ucomiss %xmm3, %xmm5
movaps %xmm5, %xmm4
shufps $0x55, %xmm5, %xmm4     # xmm4 = xmm4[1,1],xmm5[1,1]
jbe 0x828f
ucomiss %xmm4, %xmm5
jbe 0x828f
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
leaq 0xaa7(%rip), %rcx       # 0x8d2d
leaq 0xab1(%rip), %rax       # 0x8d3e
jmp 0x82be
ucomiss %xmm4, %xmm3
jbe 0x82aa
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
leaq 0xabb(%rip), %rcx       # 0x8d5c
leaq 0xac7(%rip), %rax       # 0x8d6f
jmp 0x82be
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
leaq 0xad8(%rip), %rcx       # 0x8d8f
leaq 0xae4(%rip), %rax       # 0x8da2
cmovaq %rcx, %rax
movq %rax, 0x6247(%rip)      # 0xe510
movq 0x6060(%rip), %rdi      # 0xe330
callq 0x43c0
movq 0x62c4(%rip), %rdi      # 0xe5a0
movq 0x62c5(%rip), %rsi      # 0xe5a8
leaq 0xad8(%rip), %rcx       # 0x8dc2
pushq $0x8
popq %rdx
callq 0x4090
movq 0x62a7(%rip), %r15      # 0xe5a0
leaq 0xadc(%rip), %r12       # 0x8ddc
xorl %ebx, %ebx
movl %ebx, %ebx
cmpq %rbx, 0x629d(%rip)      # 0xe5a8
jbe 0x837d
movq (%r15), %rax
movq 0x70(%rax), %r14
movq 0x88(%rax), %rdi
callq *0x8(%r14)
movq 0x6282(%rip), %r13      # 0xe5a8
subq %rbx, %r13
cmpq $0x1, %r13
adcq $0x0, %r13
pushq $0x1
popq %rax
cmpq %rax, %r13
je 0x834b
movq (%r15,%rax,8), %rcx
cmpq %r14, 0x70(%rcx)
jne 0x8348
incq %rax
jmp 0x8334
movq %rax, %r13
movq %r15, %rdi
movq %r13, %rsi
pushq $0x8
popq %rdx
movq %r12, %rcx
callq 0x4090
movl %r13d, %ebp
subl $0x1, %ebp
jb 0x8372
movq (%r15), %rdi
callq 0x8df9
addq $0x8, %r15
jmp 0x835f
xorl %eax, %eax
callq *0x18(%r14)
addl %r13d, %ebx
jmp 0x8302
movq 0x623c(%rip), %rdi      # 0xe5c0
movq 0x623d(%rip), %rsi      # 0xe5c8
leaq 0xaa1(%rip), %rcx       # 0x8e33
pushq $0x8
popq %rdx
callq 0x4090
movq 0x621f(%rip), %rbx      # 0xe5c0
pushq $0x1
popq %r15
xorl %r12d, %r12d
movl %r12d, %r12d
cmpq %r12, 0x6216(%rip)      # 0xe5c8
jbe 0x840a
movq (%rbx), %r14
movq 0x70(%r14), %r13
movq 0x88(%r14), %rdi
callq *0x8(%r13)
movq %r14, %rdi
callq 0x8df9
addq $0x8, %rbx
movq %r15, %r14
movq 0x61ec(%rip), %rax      # 0xe5c8
subq %r12, %rax
cmpq %r14, %rax
jbe 0x83fb
movq (%rbx), %rdi
cmpq %r13, 0x70(%rdi)
jne 0x83ff
callq 0x8df9
incq %r14
addq $0x8, %rbx
jmp 0x83d5
addq $-0x8, %rbx
xorl %eax, %eax
callq *0x18(%r13)
addl %r14d, %r12d
jmp 0x83a8
leaq 0x5f1f(%rip), %r14      # 0xe330
movq 0x5f18(%rip), %rdi      # 0xe330
callq 0x4450
movl $0x1e8, %edx            # imm = 0x1E8
movq (%rsp), %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4270