// File: sus304[P]ForRocket/src/environment/coordinate.cpp
// Function: forrocket::Coordinate::setNED2Body(Eigen::Matrix<double, 3, 1, 0, 3, 1>)
void forrocket::Coordinate::setNED2Body(const Eigen::Vector3d euler_angle) {
    // Input: radian
    double azi = euler_angle(0);
    double elv = euler_angle(1);
    double rol = euler_angle(2);
    dcm.NED2body << cos(azi) * cos(elv)                                  ,  sin(azi) * cos(elv)                                 , -sin(elv),
                    -sin(azi) * cos(rol) + cos(azi) * sin(elv) * sin(rol),  cos(azi) * cos(rol) + sin(azi) * sin(elv) * sin(rol),  cos(elv) * sin(rol),
                    sin(azi) * sin(rol) + cos(azi) * sin(elv) * cos(rol) , -cos(azi) * sin(rol) + sin(azi) * sin(elv) * cos(rol),  cos(elv) * cos(rol);
    dcm.body2NED = dcm.NED2body.transpose();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, -0xe8(%rbp)
movq %rdi, %rax
movq -0xe8(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movq %rax, -0x8(%rbp)
movq %rdi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x2f520
movq -0xe0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movl $0x1, %esi
callq 0x2f520
movq -0xe0(%rbp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x2, %esi
callq 0x2f520
movq %rax, %rcx
movq -0xd8(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x28(%rbp)
addq $0xd0, %rax
movq %rax, -0xd0(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0xc8(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x67f0
movq -0xd0(%rbp), %rsi
movaps %xmm0, %xmm1
movsd -0xc8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
leaq -0x50(%rbp), %rdx
callq 0x2f2e0
movsd -0x18(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0xb8(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x67f0
movq -0xc0(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0xb8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x2f320
movq %rax, -0xb0(%rbp)
jmp 0x2cc57
movsd -0x20(%rbp), %xmm0
callq 0x6120
movq -0xb0(%rbp), %rdi
movaps 0x68a01(%rip), %xmm1    # 0x95670
pxor %xmm1, %xmm0
movlpd %xmm0, -0x70(%rbp)
leaq -0x70(%rbp), %rsi
callq 0x2f320
movq %rax, -0xf0(%rbp)
jmp 0x2cc8a
movsd -0x18(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x110(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x108(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x118(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x6120
movaps %xmm0, %xmm1
movsd -0x118(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x6120
movsd -0x110(%rbp), %xmm1
movsd -0x108(%rbp), %xmm2
movq -0xf0(%rbp), %rdi
movaps %xmm0, %xmm3
movsd -0x100(%rbp), %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x2f320
movq %rax, -0xf8(%rbp)
jmp 0x2cd30
movsd -0x18(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x128(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x130(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x140(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x6120
movaps %xmm0, %xmm1
movsd -0x140(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x138(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x6120
movsd -0x138(%rbp), %xmm1
movsd -0x130(%rbp), %xmm2
movq -0xf8(%rbp), %rdi
movaps %xmm0, %xmm3
movsd -0x128(%rbp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
leaq -0x80(%rbp), %rsi
callq 0x2f320
movq %rax, -0x120(%rbp)
jmp 0x2cdd6
movsd -0x20(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x150(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x6120
movq -0x120(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x150(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x88(%rbp)
leaq -0x88(%rbp), %rsi
callq 0x2f320
movq %rax, -0x148(%rbp)
jmp 0x2ce25
movsd -0x18(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x160(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x168(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x178(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x6120
movaps %xmm0, %xmm1
movsd -0x178(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x170(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x67f0
movsd -0x170(%rbp), %xmm1
movsd -0x168(%rbp), %xmm2
movq -0x148(%rbp), %rdi
movaps %xmm0, %xmm3
movsd -0x160(%rbp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x90(%rbp)
leaq -0x90(%rbp), %rsi
callq 0x2f320
movq %rax, -0x158(%rbp)
jmp 0x2ced1
movsd -0x18(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x198(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x190(%rbp)
movsd -0x18(%rbp), %xmm0
callq 0x6120
movsd %xmm0, -0x1a0(%rbp)
movsd -0x20(%rbp), %xmm0
callq 0x6120
movaps %xmm0, %xmm1
movsd -0x1a0(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x67f0
movsd -0x198(%rbp), %xmm1
movsd -0x190(%rbp), %xmm2
movq -0x158(%rbp), %rdi
movaps %xmm0, %xmm3
movsd -0x188(%rbp), %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
leaq -0x98(%rbp), %rsi
callq 0x2f320
movq %rax, -0x180(%rbp)
jmp 0x2cf7d
movsd -0x20(%rbp), %xmm0
callq 0x67f0
movsd %xmm0, -0x1a8(%rbp)
movsd -0x28(%rbp), %xmm0
callq 0x67f0
movq -0x180(%rbp), %rdi
movaps %xmm0, %xmm1
movsd -0x1a8(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
leaq -0xa0(%rbp), %rsi
callq 0x2f320
jmp 0x2cfc5
leaq -0x48(%rbp), %rdi
callq 0x2f490
movq -0xd8(%rbp), %rdi
addq $0x40, %rdi
addq $0x90, %rdi
callq 0x2f4c0
movq -0xd8(%rbp), %rdi
movq %rax, -0xa8(%rbp)
addq $0x40, %rdi
addq $0x120, %rdi            # imm = 0x120
leaq -0xa8(%rbp), %rsi
callq 0x2f4f0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x2f490
movq -0x60(%rbp), %rdi
callq 0x6760
nopw %cs:(%rax,%rax)