// File: sus304[P]ForRocket/src/environment/coordinate.cpp
// Function: forrocket::Coordinate::Quaternion(Eigen::Matrix<double, 3, 1, 0, 3, 1>)
Eigen::Vector4d forrocket::Coordinate::Quaternion(const Eigen::Vector3d euler_angle) {
    // Input: radian
    setNED2Body(euler_angle);
    Eigen::Vector4d q;
    q(0) = 0.5 * std::sqrt(1.0 + dcm.NED2body(0, 0) - dcm.NED2body(1, 1) - dcm.NED2body(2, 2));
    q(1) = 0.5 * std::sqrt(1.0 - dcm.NED2body(0, 0) + dcm.NED2body(1, 1) - dcm.NED2body(2, 2));
    q(2) = 0.5 * std::sqrt(1.0 - dcm.NED2body(0, 0) - dcm.NED2body(1, 1) + dcm.NED2body(2, 2));
    q(3) = 0.5 * std::sqrt(1.0 + dcm.NED2body(0, 0) + dcm.NED2body(1, 1) + dcm.NED2body(2, 2));

    Eigen::VectorXd::Index index_quat_max;
    double quat_max = q.maxCoeff(&index_quat_max);
    switch(index_quat_max) {
        case 0:
            q(0) = 0.5 * sqrt(1.0 + dcm.NED2body(0, 0) - dcm.NED2body(1,1) - dcm.NED2body(2,2));
            q(1) = (dcm.NED2body(0, 1) + dcm.NED2body(1, 0)) / (4.0 * q(0));
            q(2) = (dcm.NED2body(2, 0) + dcm.NED2body(0, 2)) / (4.0 * q(0));
            q(3) = (dcm.NED2body(1, 2) - dcm.NED2body(2, 1)) / (4.0 * q(0));
            break;
        case 1:
            q(1) = 0.5 * sqrt(1.0 - dcm.NED2body(0, 0) + dcm.NED2body(1,1) - dcm.NED2body(2,2));
            q(0) = (dcm.NED2body(0, 1) + dcm.NED2body(1, 0)) / (4.0 * q(1));
            q(2) = (dcm.NED2body(1, 2) + dcm.NED2body(2, 1)) / (4.0 * q(1));
            q(3) = (dcm.NED2body(2, 0) - dcm.NED2body(0, 2)) / (4.0 * q(1));
            break;
        case 2:
            q(2) = 0.5 * sqrt(1.0 - dcm.NED2body(0, 0) - dcm.NED2body(1,1) + dcm.NED2body(2,2));
            q(0) = (dcm.NED2body(2, 0) + dcm.NED2body(0, 2)) / (4.0 * q(2));
            q(1) = (dcm.NED2body(1, 2) + dcm.NED2body(2, 1)) / (4.0 * q(2));
            q(3) = (dcm.NED2body(0, 1) - dcm.NED2body(1, 0)) / (4.0 * q(2));
            break;
        case 3:
            q(3) = 0.5 * sqrt(1.0 + dcm.NED2body(0, 0) + dcm.NED2body(1,1) + dcm.NED2body(2,2));
            q(0) = (dcm.NED2body(1, 2) - dcm.NED2body(2, 1)) / (4.0 * q(3));
            q(1) = (dcm.NED2body(2, 0) - dcm.NED2body(0, 2)) / (4.0 * q(3));
            q(2) = (dcm.NED2body(0, 1) - dcm.NED2body(1, 0)) / (4.0 * q(3));  
            break;
        default:
            break;
    }
    q.normalize();
    return q;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdx, -0x100(%rbp)
movq %rsi, %rax
movq -0x100(%rbp), %rsi
movq %rdi, -0x50(%rbp)
movq %rdi, %rcx
movq %rcx, -0xf8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x2f760
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdi
callq 0x2cb30
movq -0x50(%rbp), %rdi
callq 0x2f790
movq -0xe8(%rbp), %rdi
addq $0xd0, %rdi
movq %rdi, -0x78(%rbp)
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x98(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm0
movsd 0x67756(%rip), %xmm1    # 0x95638
movsd %xmm1, -0x90(%rbp)
addsd %xmm1, %xmm0
movsd %xmm0, -0xe0(%rbp)
movl $0x1, %edx
movq %rdx, -0x88(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xe0(%rbp), %xmm0
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movl $0x2, %edx
movq %rdx, -0x70(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xd8(%rbp), %xmm0
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
callq 0x6370
movq -0x98(%rbp), %rsi
movq -0x50(%rbp), %rdi
movsd 0x67701(%rip), %xmm1    # 0x95660
movsd %xmm1, -0x60(%rbp)
mulsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
callq 0x2f870
movsd -0xd0(%rbp), %xmm0
movq -0x98(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd %xmm0, (%rax)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x90(%rbp), %xmm0
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xc8(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xc8(%rbp), %xmm0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xc0(%rbp), %xmm0
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
callq 0x6370
movq -0x88(%rbp), %rsi
movsd -0x60(%rbp), %xmm1
movq -0x50(%rbp), %rdi
mulsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x2f870
movsd -0xb8(%rbp), %xmm0
movq -0x98(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd %xmm0, (%rax)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x90(%rbp), %xmm0
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xb0(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xb0(%rbp), %xmm0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movsd (%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0xa8(%rbp), %xmm0
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
callq 0x6370
movq -0x70(%rbp), %rsi
movsd -0x60(%rbp), %xmm1
movq -0x50(%rbp), %rdi
mulsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
callq 0x2f870
movsd -0xa0(%rbp), %xmm0
movq -0x98(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd %xmm0, (%rax)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x90(%rbp), %xmm1
movq -0x88(%rbp), %rdx
movq -0x78(%rbp), %rdi
movsd (%rax), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x80(%rbp), %xmm0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x68(%rbp), %xmm0
movsd (%rax), %xmm1
addsd %xmm1, %xmm0
callq 0x6370
movsd -0x60(%rbp), %xmm1
movq -0x50(%rbp), %rdi
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x58(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd %xmm0, (%rax)
leaq -0x38(%rbp), %rsi
callq 0x2f900
movsd %xmm0, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
subq $0x3, %rax
ja 0x2eca4
movq -0x48(%rbp), %rax
leaq 0x674ef(%rip), %rcx     # 0x95680
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd 0x67471(%rip), %xmm0    # 0x95638
addsd (%rax), %xmm0
movsd %xmm0, -0x160(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x160(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x158(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x158(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x6370
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x67422(%rip), %xmm0    # 0x95660
mulsd %xmm1, %xmm0
movsd %xmm0, -0x150(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x150(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x148(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movsd -0x148(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x140(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x140(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x67388(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x138(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x138(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x130(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2f7b0
movsd -0x130(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x128(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x128(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x672e1(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x120(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x120(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x2f7b0
movsd -0x118(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x110(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x110(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x67238(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x108(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x108(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x2eca6
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd 0x671b0(%rip), %xmm0    # 0x95638
subsd (%rax), %xmm0
movsd %xmm0, -0x1c0(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x1c0(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x1b8(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x1b8(%rbp), %xmm0
subsd (%rax), %xmm0
callq 0x6370
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x67161(%rip), %xmm0    # 0x95660
mulsd %xmm1, %xmm0
movsd %xmm0, -0x1b0(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x1b0(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1a8(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movsd -0x1a8(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x1a0(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x1a0(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x670c5(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x198(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x198(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x190(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x2f7b0
movsd -0x190(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x188(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x6701c(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x180(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x180(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x178(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2f7b0
movsd -0x178(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x170(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x170(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66f74(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x168(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x168(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x2eca6
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd 0x66eec(%rip), %xmm0    # 0x95638
subsd (%rax), %xmm0
movsd %xmm0, -0x220(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x220(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x218(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x218(%rbp), %xmm0
addsd (%rax), %xmm0
callq 0x6370
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x66e9d(%rip), %xmm0    # 0x95660
mulsd %xmm1, %xmm0
movsd %xmm0, -0x210(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x210(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x208(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2f7b0
movsd -0x208(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x200(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x200(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66e01(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x1f8(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x1f8(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1f0(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x2f7b0
movsd -0x1f0(%rbp), %xmm0
movq -0x50(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x1e8(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x1e8(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66d58(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x1e0(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x1e0(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x1d8(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movsd -0x1d8(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x1d0(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x1d0(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66cb0(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x1c8(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x1c8(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x2eca6
movq -0xe8(%rbp), %rdi
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd 0x66c28(%rip), %xmm0    # 0x95638
addsd (%rax), %xmm0
movsd %xmm0, -0x280(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x280(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
addsd (%rax), %xmm0
movsd %xmm0, -0x278(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %edx
movq %rdx, %rsi
callq 0x2f7b0
movsd -0x278(%rbp), %xmm0
addsd (%rax), %xmm0
callq 0x6370
movq -0x50(%rbp), %rdi
movaps %xmm0, %xmm1
movsd 0x66bd9(%rip), %xmm0    # 0x95660
mulsd %xmm1, %xmm0
movsd %xmm0, -0x270(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x270(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x268(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
movl $0x1, %edx
callq 0x2f7b0
movsd -0x268(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x260(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x260(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66b3b(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x258(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f870
movsd -0x258(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x2, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x250(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x2f7b0
movsd -0x250(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x248(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x248(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x66a94(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x240(%rbp)
movl $0x1, %esi
callq 0x2f870
movsd -0x240(%rbp), %xmm0
movq -0xe8(%rbp), %rdi
movsd %xmm0, (%rax)
addq $0x40, %rdi
addq $0x90, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x2f7b0
movq -0xe8(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x238(%rbp)
addq $0x40, %rdi
addq $0x90, %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2f7b0
movsd -0x238(%rbp), %xmm0
movq -0x50(%rbp), %rdi
subsd (%rax), %xmm0
movsd %xmm0, -0x230(%rbp)
movl $0x3, %esi
callq 0x2f870
movsd -0x230(%rbp), %xmm0
movq -0x50(%rbp), %rdi
movsd 0x669ec(%rip), %xmm1    # 0x95668
mulsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x228(%rbp)
movl $0x2, %esi
callq 0x2f870
movsd -0x228(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x2eca6
jmp 0x2eca6
movq -0x50(%rbp), %rdi
callq 0x2f940
movq -0xf8(%rbp), %rax
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
nop