// File: /workspace/github_cpp_makefile_star2_O2/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 0xb017(%rip), %xmm11    # 0x2e020
movsd 0x20(%rbp), %xmm10
ucomisd 0x10818(%rip), %xmm11   # 0x33830
ja 0x23056
movapd %xmm10, %xmm11
subsd %xmm1, %xmm11
andpd 0xaff3(%rip), %xmm11    # 0x2e020
ucomisd 0x107fa(%rip), %xmm11   # 0x33830
ja 0x23056
movapd %xmm8, %xmm11
subsd %xmm2, %xmm11
andpd 0xafd5(%rip), %xmm11    # 0x2e020
ucomisd 0x107dc(%rip), %xmm11   # 0x33830
jbe 0x2307f
subsd %xmm9, %xmm0
mulsd %xmm0, %xmm0
subsd %xmm10, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd %xmm8, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
sqrtsd %xmm2, %xmm0
popq %rbp
retq
movsd 0x58(%rbp), %xmm0
movsd 0x50(%rbp), %xmm1
movsd 0x48(%rbp), %xmm8
movapd %xmm8, %xmm9
subsd %xmm6, %xmm9
andpd 0xaf7e(%rip), %xmm9     # 0x2e020
movsd 0x10(%rbp), %xmm2
ucomisd 0x10780(%rip), %xmm9    # 0x33830
ja 0x230ee
movapd %xmm1, %xmm9
subsd %xmm7, %xmm9
andpd 0xaf5b(%rip), %xmm9     # 0x2e020
ucomisd 0x10762(%rip), %xmm9    # 0x33830
ja 0x230ee
movapd %xmm0, %xmm9
subsd %xmm2, %xmm9
andpd 0xaf3d(%rip), %xmm9     # 0x2e020
ucomisd 0x10744(%rip), %xmm9    # 0x33830
jbe 0x23114
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 0x23079
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 0x23079