// File: 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 %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movlpd %xmm0, -0x1c(%rbp)
movss %xmm1, -0x14(%rbp)
movq -0x1c(%rbp), %rax
movq %rax, -0xc(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rsi
movq %rsi, -0x270(%rbp)
addq $0x28, %rsi
leaq -0x58(%rbp), %rdi
callq 0x5e40
movq -0x270(%rbp), %rax
cmpl $0x1, 0x68(%rax)
jne 0x570a
movq -0x270(%rbp), %rdx
addq $0x48, %rdx
leaq -0x78(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x2900
jmp 0x56de
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x5bc0
leaq -0x78(%rbp), %rdi
callq 0x33e0
jmp 0x570a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b77
movq -0x270(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
movss 0x99d0(%rip), %xmm0     # 0xf0f0
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x4e40
jmp 0x572d
movq -0x270(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
movss 0x99b1(%rip), %xmm0     # 0xf0f4
xorps %xmm2, %xmm2
movaps %xmm2, %xmm1
callq 0x4e40
jmp 0x5750
movq -0x270(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x5080
jmp 0x5765
leaq -0x108(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x2900
jmp 0x5781
leaq -0x128(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
callq 0x2900
jmp 0x579d
leaq -0x178(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x108(%rbp), %rdx
callq 0x2900
jmp 0x57b6
movq -0x270(%rbp), %rsi
movl -0x4(%rbp), %eax
movl %eax, -0x1a0(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movl -0x1a0(%rbp), %eax
movl %eax, -0x1b0(%rbp)
movq -0x1a8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
movsd -0x1b8(%rbp), %xmm0
movss -0x1b0(%rbp), %xmm1
leaq -0x198(%rbp), %rdi
callq 0x4f60
jmp 0x5809
leaq -0x158(%rbp), %rdi
leaq -0x178(%rbp), %rsi
leaq -0x198(%rbp), %rdx
callq 0x2900
jmp 0x5825
movq -0x270(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x4cd0
movss %xmm1, -0x284(%rbp)
movaps %xmm0, -0x280(%rbp)
jmp 0x5849
movss -0x284(%rbp), %xmm0
movaps -0x280(%rbp), %xmm1
movlpd %xmm1, -0x1c8(%rbp)
movss %xmm0, -0x1c0(%rbp)
movl -0x1c0(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x30(%rbp), %rax
movl -0x130(%rbp), %ecx
movl %ecx, 0x8(%rax)
movq -0x138(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x158(%rbp), %rdi
callq 0x33e0
leaq -0x198(%rbp), %rdi
callq 0x33e0
leaq -0x178(%rbp), %rdi
callq 0x33e0
leaq -0x218(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x128(%rbp), %rdx
callq 0x2900
jmp 0x58d6
movq -0x270(%rbp), %rsi
movl -0x4(%rbp), %eax
movl %eax, -0x240(%rbp)
movq -0xc(%rbp), %rax
movq %rax, -0x248(%rbp)
movl -0x240(%rbp), %eax
movl %eax, -0x250(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movsd -0x258(%rbp), %xmm0
movss -0x250(%rbp), %xmm1
leaq -0x238(%rbp), %rdi
callq 0x4f60
jmp 0x5929
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x238(%rbp), %rdx
callq 0x2900
jmp 0x5945
movq -0x270(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x4cd0
movss %xmm1, -0x2a4(%rbp)
movaps %xmm0, -0x2a0(%rbp)
jmp 0x5969
movss -0x2a4(%rbp), %xmm0
movaps -0x2a0(%rbp), %xmm1
movlpd %xmm1, -0x268(%rbp)
movss %xmm0, -0x260(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x1d4(%rbp)
movl -0x260(%rbp), %eax
movl %eax, -0x1cc(%rbp)
movq -0x38(%rbp), %rax
movq -0x1d4(%rbp), %rcx
movq %rcx, (%rax)
movl -0x1cc(%rbp), %ecx
movl %ecx, 0x8(%rax)
leaq -0x1f8(%rbp), %rdi
callq 0x33e0
leaq -0x238(%rbp), %rdi
callq 0x33e0
leaq -0x218(%rbp), %rdi
callq 0x33e0
leaq -0x128(%rbp), %rdi
callq 0x33e0
leaq -0x108(%rbp), %rdi
callq 0x33e0
leaq -0xe8(%rbp), %rdi
callq 0x33e0
leaq -0xc8(%rbp), %rdi
callq 0x33e0
leaq -0xa8(%rbp), %rdi
callq 0x33e0
leaq -0x58(%rbp), %rdi
callq 0x33e0
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b6b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b5f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5ad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5acc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x33e0
leaq -0x198(%rbp), %rdi
callq 0x33e0
leaq -0x178(%rbp), %rdi
callq 0x33e0
jmp 0x5b3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
jmp 0x5b23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x80(%rbp)
movl %eax, -0x84(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x33e0
leaq -0x238(%rbp), %rdi
callq 0x33e0
leaq -0x218(%rbp), %rdi
callq 0x33e0
leaq -0x128(%rbp), %rdi
callq 0x33e0
leaq -0x108(%rbp), %rdi
callq 0x33e0
leaq -0xe8(%rbp), %rdi
callq 0x33e0
leaq -0xc8(%rbp), %rdi
callq 0x33e0
leaq -0xa8(%rbp), %rdi
callq 0x33e0
leaq -0x58(%rbp), %rdi
callq 0x33e0
movq -0x80(%rbp), %rdi
callq 0x2380
nopl (%rax)