// File: /workspace/github_cpp_makefile_star2_O3/sus304[P]ForRocket/src/environment/coordinate.cpp
// Function: forrocket::Coordinate::setECEF2NED(Eigen::Matrix<double, 3, 1, 0, 3, 1>)
void forrocket::Coordinate::setECEF2NED(const Eigen::Vector3d pos_LLH) {
    // Input: degree
    double lat = deg2rad(pos_LLH(0));
    double lon = deg2rad(pos_LLH(1));

    dcm.ECEF2NED << -std::sin(lat) * std::cos(lon), -std::sin(lat) * std::sin(lon), std::cos(lat),
                    -std::sin(lon)                 ,                  std::cos(lon),             0,
                    -std::cos(lat) * std::cos(lon) , -std::cos(lat) * std::sin(lon), -std::sin(lat);
    dcm.NED2ECEF = dcm.ECEF2NED.transpose();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movsd (%rsi), %xmm0
callq 0x734c
movsd %xmm0, (%rsp)
movsd 0x8(%r14), %xmm0
callq 0x734c
movsd %xmm0, 0x8(%rsp)
leaq 0x88(%rbx), %r15
movsd (%rsp), %xmm0
callq 0x50e0
xorps 0x246b9(%rip), %xmm0    # 0x3a710
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x5640
mulsd 0x10(%rsp), %xmm0
leaq 0x20(%rsp), %r14
movq %r15, (%r14)
movq $0x0, 0x8(%r14)
movl $0x1, %eax
movq %rax, 0x10(%r14)
movq %rax, 0x18(%r14)
movsd %xmm0, 0x88(%rbx)
movsd (%rsp), %xmm0
callq 0x50e0
xorps 0x2466d(%rip), %xmm0    # 0x3a710
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x50e0
mulsd 0x10(%rsp), %xmm0
leaq 0x78(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
leaq 0x70(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq %rax, %r14
movsd 0x8(%rsp), %xmm0
callq 0x50e0
xorpd 0x24612(%rip), %xmm0    # 0x3a710
leaq 0x68(%rsp), %rsi
movlpd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq %rax, %r14
movsd 0x8(%rsp), %xmm0
callq 0x5640
leaq 0x60(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
leaq 0x58(%rsp), %rsi
movq $0x0, (%rsi)
movq %rax, %rdi
callq 0x16ca8
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
xorps 0x245ba(%rip), %xmm0    # 0x3a710
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x5640
mulsd 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
xorps 0x2457f(%rip), %xmm0    # 0x3a710
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x50e0
mulsd 0x10(%rsp), %xmm0
leaq 0x48(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x50e0
xorpd 0x24543(%rip), %xmm0    # 0x3a710
leaq 0x40(%rsp), %rsi
movlpd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x16ca8
movq 0x38(%rsp), %rax
addq 0x28(%rsp), %rax
cmpq $0x3, %rax
jne 0x162c9
cmpq $0x3, 0x30(%rsp)
jne 0x162c9
movsd 0x88(%rbx), %xmm0
movsd 0x90(%rbx), %xmm1
movsd %xmm0, 0x1a8(%rbx)
movsd 0xa0(%rbx), %xmm0
movsd %xmm0, 0x1b0(%rbx)
movsd 0xb8(%rbx), %xmm0
movsd %xmm0, 0x1b8(%rbx)
movsd %xmm1, 0x1c0(%rbx)
movsd 0xa8(%rbx), %xmm0
movsd %xmm0, 0x1c8(%rbx)
movsd 0xc0(%rbx), %xmm0
movsd %xmm0, 0x1d0(%rbx)
movsd 0x98(%rbx), %xmm0
movsd %xmm0, 0x1d8(%rbx)
movsd 0xb0(%rbx), %xmm0
movsd %xmm0, 0x1e0(%rbx)
movsd 0xc8(%rbx), %xmm0
movsd %xmm0, 0x1e8(%rbx)
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x162a9
jmp 0x162a9
jmp 0x162a9
jmp 0x162a9
jmp 0x162a9
jmp 0x162a9
jmp 0x162a9
movq 0x38(%rsp), %rcx
addq 0x28(%rsp), %rcx
cmpq $0x3, %rcx
jne 0x162c9
cmpq $0x3, 0x30(%rsp)
jne 0x162c9
movq %rax, %rdi
callq 0x55e0
leaq 0x24478(%rip), %rdi     # 0x3a748
leaq 0x2450f(%rip), %rsi     # 0x3a7e6
leaq 0x24530(%rip), %rcx     # 0x3a80e
movl $0x78, %edx
callq 0x5230