// File: /workspace/github_cpp_makefile_star2_O3/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 0xc8b1(%rip), %xmm11    # 0x32020
movsd 0x20(%rbp), %xmm10
ucomisd 0x120b2(%rip), %xmm11   # 0x37830
ja 0x257bc
movapd %xmm10, %xmm11
subsd %xmm1, %xmm11
andpd 0xc88d(%rip), %xmm11    # 0x32020
ucomisd 0x12094(%rip), %xmm11   # 0x37830
ja 0x257bc
movapd %xmm8, %xmm11
subsd %xmm2, %xmm11
andpd 0xc86f(%rip), %xmm11    # 0x32020
ucomisd 0x12076(%rip), %xmm11   # 0x37830
jbe 0x257e8
subsd %xmm9, %xmm0
mulsd %xmm0, %xmm0
subsd %xmm10, %xmm1
mulsd %xmm1, %xmm1
addsd %xmm0, %xmm1
subsd %xmm8, %xmm2
mulsd %xmm2, %xmm2
addsd %xmm1, %xmm2
xorps %xmm0, %xmm0
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 0xc815(%rip), %xmm9     # 0x32020
movsd 0x10(%rbp), %xmm2
ucomisd 0x12017(%rip), %xmm9    # 0x37830
ja 0x25857
movapd %xmm1, %xmm9
subsd %xmm7, %xmm9
andpd 0xc7f2(%rip), %xmm9     # 0x32020
ucomisd 0x11ff9(%rip), %xmm9    # 0x37830
ja 0x25857
movapd %xmm0, %xmm9
subsd %xmm2, %xmm9
andpd 0xc7d4(%rip), %xmm9     # 0x32020
ucomisd 0x11fdb(%rip), %xmm9    # 0x37830
jbe 0x2587d
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 0x257df
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 0x257df
nop