// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_find.cc
// Function: Interp::find_straight_length(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double)
double Interp::find_straight_length(double x2,   //!< X-coordinate of end point   
                                    double y2,   //!< Y-coordinate of end point   
                                    double z2,   //!< Z-coordinate of end point   
                                    double AA_2, //!< A-coordinate of end point    
                                    double BB_2, //!< B-coordinate of end point    
                                    double CC_2, //!< C-coordinate of end point    
                                    double u_2,
                                    double v_2,
                                    double w_2,
                                    double x1,   //!< X-coordinate of start point 
                                    double y1,   //!< Y-coordinate of start point 
                                    double z1,    //!< Z-coordinate of start point 
                                    double AA_1,        //!< A-coordinate of start point  
                                    double BB_1,        //!< B-coordinate of start point  
                                    double CC_1,        //!< C-coordinate of start point  
                                    double u_1,
                                    double v_1,
                                    double w_1
  )
{
#define tiny 1e-7
    if ( (fabs(x1-x2) > tiny) || (fabs(y1-y2) > tiny) || (fabs(z1-z2) > tiny) )
        return sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2) + pow((z2 - z1), 2));
    else if ( (fabs(u_1-u_2) > tiny) || (fabs(v_1-v_2) > tiny) || (fabs(w_1-w_2) > tiny) )
        return sqrt(pow((u_2 - u_1), 2) + pow((v_2 - v_1), 2) + pow((w_2 - w_1), 2));
    else
        return sqrt(pow((AA_2 - AA_1), 2) + pow((BB_2 - BB_1), 2) + pow((CC_2 - CC_1), 2));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd 0x28(%rbp), %xmm8
movsd 0x18(%rbp), %xmm9
movapd %xmm9, %xmm11
subsd %xmm0, %xmm11
andpd 0xc917(%rip), %xmm11    # 0x35020
movsd 0x20(%rbp), %xmm10
ucomisd 0x12120(%rip), %xmm11   # 0x3a838
ja 0x28756
movapd %xmm10, %xmm11
subsd %xmm1, %xmm11
andpd 0xc8f3(%rip), %xmm11    # 0x35020
ucomisd 0x12102(%rip), %xmm11   # 0x3a838
ja 0x28756
movapd %xmm8, %xmm11
subsd %xmm2, %xmm11
andpd 0xc8d5(%rip), %xmm11    # 0x35020
ucomisd 0x120e4(%rip), %xmm11   # 0x3a838
jbe 0x28796
subsd %xmm9, %xmm0
mulsd %xmm0, %xmm0
subsd %xmm10, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd %xmm8, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm2
jb 0x2878c
xorps %xmm0, %xmm0
sqrtsd %xmm2, %xmm0
popq %rbp
retq
movapd %xmm2, %xmm0
popq %rbp
jmp 0xa810
movsd 0x58(%rbp), %xmm0
movsd 0x50(%rbp), %xmm1
movsd 0x48(%rbp), %xmm8
movapd %xmm8, %xmm9
subsd %xmm6, %xmm9
andpd 0xc867(%rip), %xmm9     # 0x35020
movsd 0x10(%rbp), %xmm2
ucomisd 0x12071(%rip), %xmm9    # 0x3a838
ja 0x28805
movapd %xmm1, %xmm9
subsd %xmm7, %xmm9
andpd 0xc844(%rip), %xmm9     # 0x35020
ucomisd 0x12053(%rip), %xmm9    # 0x3a838
ja 0x28805
movapd %xmm0, %xmm9
subsd %xmm2, %xmm9
andpd 0xc826(%rip), %xmm9     # 0x35020
ucomisd 0x12035(%rip), %xmm9    # 0x3a838
jbe 0x2882b
subsd %xmm8, %xmm6
mulsd %xmm6, %xmm6
subsd %xmm1, %xmm7
mulsd %xmm7, %xmm7
addsd %xmm6, %xmm7
subsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm7, %xmm2
jmp 0x28779
subsd 0x30(%rbp), %xmm3
subsd 0x38(%rbp), %xmm4
mulsd %xmm3, %xmm3
mulsd %xmm4, %xmm4
subsd 0x40(%rbp), %xmm5
addsd %xmm3, %xmm4
mulsd %xmm5, %xmm5
addsd %xmm4, %xmm5
movapd %xmm5, %xmm2
jmp 0x28779
nop