// File: /workspace/github_cpp_makefile_star2_O2/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 0x50(%rsp), %rdi
callq 0x39da
cmpl $0x1, 0x68(%r15)
jne 0x365a
leaq 0x48(%r15), %rdx
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2604
leaq 0x50(%rsp), %rdi
leaq 0x88(%rsp), %r12
movq %r12, %rsi
callq 0x38e0
movq %r12, %rdi
callq 0x2be2
leaq 0x88(%rsp), %rdi
movss 0x3a86(%rip), %xmm0     # 0x70f0
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x319a
leaq 0x148(%rsp), %rdi
movss 0x3a6f(%rip), %xmm0     # 0x70f4
xorps %xmm1, %xmm1
xorps %xmm2, %xmm2
callq 0x319a
leaq 0xa8(%rsp), %rdi
movq %r15, %rsi
callq 0x32be
leaq 0x128(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x2604
leaq 0x108(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x148(%rsp), %rdx
callq 0x2604
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x128(%rsp), %rdx
callq 0x2604
leaq 0x10(%rsp), %rdi
movaps 0x70(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x3226
leaq 0xe8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x2604
leaq 0xe8(%rsp), %rsi
callq 0x30d6
movlps %xmm0, (%r14)
movss %xmm1, 0x8(%r14)
leaq 0xe8(%rsp), %rdi
callq 0x2be2
leaq 0x10(%rsp), %rdi
callq 0x2be2
leaq 0x30(%rsp), %rdi
callq 0x2be2
leaq 0x30(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x108(%rsp), %rdx
callq 0x2604
leaq 0x10(%rsp), %rdi
movaps 0x70(%rsp), %xmm0
movss 0xc(%rsp), %xmm1
callq 0x3226
leaq 0xc8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x2604
leaq 0xc8(%rsp), %rsi
callq 0x30d6
movlps %xmm0, (%rbx)
movss %xmm1, 0x8(%rbx)
leaq 0xc8(%rsp), %rdi
callq 0x2be2
leaq 0x10(%rsp), %rdi
callq 0x2be2
leaq 0x30(%rsp), %rdi
callq 0x2be2
leaq 0x108(%rsp), %rdi
callq 0x2be2
leaq 0x128(%rsp), %rdi
callq 0x2be2
leaq 0xa8(%rsp), %rdi
callq 0x2be2
leaq 0x148(%rsp), %rdi
callq 0x2be2
leaq 0x88(%rsp), %rdi
callq 0x2be2
leaq 0x50(%rsp), %rdi
callq 0x2be2
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x38da
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x384b
jmp 0x3852
jmp 0x3861
jmp 0x3870
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x2be2
jmp 0x3855
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2be2
jmp 0x3864
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x2be2
jmp 0x3873
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x2be2
leaq 0x128(%rsp), %rdi
callq 0x2be2
leaq 0xa8(%rsp), %rdi
callq 0x2be2
leaq 0x148(%rsp), %rdi
callq 0x2be2
leaq 0x88(%rsp), %rdi
callq 0x2be2
leaq 0x50(%rsp), %rdi
callq 0x2be2
movq %rbx, %rdi
callq 0x22b0
movq %rax, %rbx
jmp 0x3880
movq %rax, %rbx
jmp 0x388d
movq %rax, %rbx
jmp 0x389a
movq %rax, %rbx
jmp 0x38a7
movq %rax, %rbx
jmp 0x38b4
nop