// File: /workspace/github_cpp_makefile_star2_O3/SpiritLooper[P]RDV_OBJRender/camera.cpp
// Function: Camera::camera_transform_analygraph(Vec3<float>, Vec3<float>&, Vec3<float>&)
void Camera::camera_transform_analygraph(Vec3f p, Vec3f& le, Vec3f& re) {
    Matrix res = ViewPort;

    if (mode == PERSPECTIVE)
    {
        res = res * Projection;
    }
    
    Matrix trans_left =  translate(- ( ecart_analygraphe / 2.f),0 ,0);
    Matrix trans_right = translate(    ecart_analygraphe / 2.f ,0 ,0);

    Matrix ModelView = lookat();

    Matrix ModelViewLeft  = ModelView * trans_left;
    Matrix ModelViewRight = ModelView * trans_right;

    le = m2v(res * ModelViewLeft  * v2m(p));
    re = m2v(res * ModelViewRight * v2m(p));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdx, %rbx
movq %rsi, %r14
movss %xmm1, 0xc(%rsp)
movaps %xmm0, 0x70(%rsp)
movq %rdi, %r15
leaq 0x28(%rdi), %rsi
leaq 0x10(%rsp), %r12
movq %r12, %rdi
callq 0x3d36
movq 0x40(%r15), %rax
movq %rax, 0x18(%r12)
cmpl $0x1, 0x68(%r15)
jne 0x3ab0
leaq 0x48(%r15), %rdx
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2736
movq 0x20(%rsp), %rax
leaq 0x80(%rsp), %r12
movaps (%r12), %xmm0
movq 0x10(%r12), %rcx
movq %rcx, 0x20(%rsp)
movaps 0x10(%rsp), %xmm1
movaps %xmm0, 0x10(%rsp)
leaq 0xa0(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
callq 0x2f62
movq 0x18(%r12), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
callq 0x2f62
leaq 0x80(%rsp), %rdi
movss 0x366c(%rip), %xmm0     # 0x712c
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x34c0
leaq 0xa0(%rsp), %rdi
movss 0x3655(%rip), %xmm0     # 0x7130
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x34c0
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x35fa
leaq 0x148(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x2736
leaq 0x128(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x2736
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x148(%rsp), %rdx
callq 0x2736
leaq 0x30(%rsp), %rdi
movaps 0x70(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x3552
leaq 0x108(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x2736
leaq 0x108(%rsp), %rsi
callq 0x33f4
movlps %xmm0, (%r14)
movss %xmm1, 0x8(%r14)
leaq 0x108(%rsp), %rdi
callq 0x2f62
leaq 0x30(%rsp), %rdi
callq 0x2f62
leaq 0x50(%rsp), %rdi
callq 0x2f62
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x2736
leaq 0x30(%rsp), %rdi
movaps 0x70(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x3552
leaq 0xe8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x2736
leaq 0xe8(%rsp), %rsi
callq 0x33f4
movlps %xmm0, (%rbx)
movss %xmm1, 0x8(%rbx)
leaq 0xe8(%rsp), %rdi
callq 0x2f62
leaq 0x30(%rsp), %rdi
callq 0x2f62
leaq 0x50(%rsp), %rdi
callq 0x2f62
leaq 0x128(%rsp), %rdi
callq 0x2f62
leaq 0x148(%rsp), %rdi
callq 0x2f62
leaq 0xc8(%rsp), %rdi
callq 0x2f62
leaq 0xa0(%rsp), %rdi
callq 0x2f62
leaq 0x80(%rsp), %rdi
callq 0x2f62
leaq 0x10(%rsp), %rdi
callq 0x2f62
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3d30
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0x3ca1
jmp 0x3ca8
jmp 0x3cb7
jmp 0x3cc6
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2f62
jmp 0x3cab
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2f62
jmp 0x3cba
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2f62
jmp 0x3cc9
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x2f62
leaq 0x148(%rsp), %rdi
callq 0x2f62
leaq 0xc8(%rsp), %rdi
callq 0x2f62
leaq 0xa0(%rsp), %rdi
callq 0x2f62
leaq 0x80(%rsp), %rdi
callq 0x2f62
leaq 0x10(%rsp), %rdi
callq 0x2f62
movq %rbx, %rdi
callq 0x22d0
movq %rax, %rbx
jmp 0x3cd6
movq %rax, %rbx
jmp 0x3ce3
movq %rax, %rbx
jmp 0x3cf0
movq %rax, %rbx
jmp 0x3cfd
movq %rax, %rbx
jmp 0x3d0a
nop