// File: /workspace/github_cpp_makefile_star2_O1/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 0x726c
movsd %xmm0, (%rsp)
movsd 0x8(%r14), %xmm0
callq 0x726c
movsd %xmm0, 0x8(%rsp)
leaq 0x88(%rbx), %r15
movsd (%rsp), %xmm0
callq 0x50e0
xorps 0x241a7(%rip), %xmm0    # 0x3a6d0
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 0x2415b(%rip), %xmm0    # 0x3a6d0
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 0x171ac
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
leaq 0x70(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x171ac
movq %rax, %r14
movsd 0x8(%rsp), %xmm0
callq 0x50e0
xorpd 0x24100(%rip), %xmm0    # 0x3a6d0
leaq 0x68(%rsp), %rsi
movlpd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x171ac
movq %rax, %r14
movsd 0x8(%rsp), %xmm0
callq 0x5640
leaq 0x60(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x171ac
leaq 0x58(%rsp), %rsi
movq $0x0, (%rsi)
movq %rax, %rdi
callq 0x171ac
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
xorps 0x240a8(%rip), %xmm0    # 0x3a6d0
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 0x171ac
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x5640
xorps 0x2406d(%rip), %xmm0    # 0x3a6d0
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 0x171ac
movq %rax, %r14
movsd (%rsp), %xmm0
callq 0x50e0
xorpd 0x24031(%rip), %xmm0    # 0x3a6d0
leaq 0x40(%rsp), %rsi
movlpd %xmm0, (%rsi)
movq %r14, %rdi
callq 0x171ac
movq 0x38(%rsp), %rax
addq 0x28(%rsp), %rax
cmpq $0x3, %rax
jne 0x1679b
cmpq $0x3, 0x30(%rsp)
jne 0x1679b
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 0x1677b
jmp 0x1677b
jmp 0x1677b
jmp 0x1677b
jmp 0x1677b
jmp 0x1677b
jmp 0x1677b
movq 0x38(%rsp), %rcx
addq 0x28(%rsp), %rcx
cmpq $0x3, %rcx
jne 0x1679b
cmpq $0x3, 0x30(%rsp)
jne 0x1679b
movq %rax, %rdi
callq 0x55e0
leaq 0x23f6e(%rip), %rdi     # 0x3a710
leaq 0x24005(%rip), %rsi     # 0x3a7ae
leaq 0x24026(%rip), %rcx     # 0x3a7d6
movl $0x78, %edx
callq 0x5230