// File: /workspace/github_cpp_makefile_star2_O1/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 0x3d4c
movq 0x40(%r15), %rax
movq %rax, 0x18(%r12)
cmpl $0x1, 0x68(%r15)
jne 0x3ac6
leaq 0x48(%r15), %rdx
leaq 0x80(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2736
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rdi
movaps %xmm0, (%rdi)
movups 0x10(%rsp), %xmm0
movq 0x20(%rsp), %rax
leaq 0x80(%rsp), %r12
movups (%r12), %xmm1
movups %xmm1, 0x10(%rsp)
movq 0x10(%r12), %rcx
movq %rcx, 0x20(%rsp)
movaps (%rdi), %xmm1
movaps %xmm0, (%rdi)
movq %rax, 0x10(%rdi)
movups %xmm1, (%r12)
movq $0x0, 0x10(%r12)
callq 0x2e46
movq 0x18(%r12), %rax
movq %rax, 0x28(%rsp)
movq %r12, %rdi
callq 0x2e46
leaq 0x80(%rsp), %rdi
movss 0x361a(%rip), %xmm0     # 0x70f0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x33e8
leaq 0xa0(%rsp), %rdi
movss 0x3603(%rip), %xmm0     # 0x70f4
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x33e8
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x3522
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 0x347a
leaq 0x108(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x2736
leaq 0x108(%rsp), %rsi
callq 0x3304
movlps %xmm0, (%r14)
movss %xmm1, 0x8(%r14)
leaq 0x108(%rsp), %rdi
callq 0x2e46
leaq 0x30(%rsp), %rdi
callq 0x2e46
leaq 0x50(%rsp), %rdi
callq 0x2e46
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 0x347a
leaq 0xe8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x2736
leaq 0xe8(%rsp), %rsi
callq 0x3304
movlps %xmm0, (%rbx)
movss %xmm1, 0x8(%rbx)
leaq 0xe8(%rsp), %rdi
callq 0x2e46
leaq 0x30(%rsp), %rdi
callq 0x2e46
leaq 0x50(%rsp), %rdi
callq 0x2e46
leaq 0x128(%rsp), %rdi
callq 0x2e46
leaq 0x148(%rsp), %rdi
callq 0x2e46
leaq 0xc8(%rsp), %rdi
callq 0x2e46
leaq 0xa0(%rsp), %rdi
callq 0x2e46
leaq 0x80(%rsp), %rdi
callq 0x2e46
leaq 0x10(%rsp), %rdi
callq 0x2e46
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3d46
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
jmp 0x3cb7
jmp 0x3cbe
jmp 0x3ccd
jmp 0x3cdc
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2e46
jmp 0x3cc1
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2e46
jmp 0x3cd0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x2e46
jmp 0x3cdf
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x2e46
leaq 0x148(%rsp), %rdi
callq 0x2e46
leaq 0xc8(%rsp), %rdi
callq 0x2e46
leaq 0xa0(%rsp), %rdi
callq 0x2e46
leaq 0x80(%rsp), %rdi
callq 0x2e46
leaq 0x10(%rsp), %rdi
callq 0x2e46
movq %rbx, %rdi
callq 0x22d0
movq %rax, %rbx
jmp 0x3cec
movq %rax, %rbx
jmp 0x3cf9
movq %rax, %rbx
jmp 0x3d06
movq %rax, %rbx
jmp 0x3d13
movq %rax, %rbx
jmp 0x3d20
nop