// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/saicanon.cc
// Function: STRAIGHT_PROBE(int, double, double, double, double, double, double, double, double, double, unsigned char)
void STRAIGHT_PROBE(int line_number,
 double x, double y, double z
 , double a /*AA*/
 , double b /*BB*/
 , double c /*CC*/
 , double u, double v, double w, unsigned char probe_type
)
{
  double distance;
  double dx, dy, dz;
  double backoff;

  dx = (_program_position_x - x);
  dy = (_program_position_y - y);
  dz = (_program_position_z - z);
  distance = sqrt((dx * dx) + (dy * dy) + (dz * dz));

  fprintf(_outfile, "%5d ", _line_number++);
  print_nc_line_number();
  fprintf(_outfile, "STRAIGHT_PROBE(%.4f, %.4f, %.4f"
         ", %.4f" /*AA*/
         ", %.4f" /*BB*/
         ", %.4f" /*CC*/
         ")\n", x, y, z
         , a /*AA*/
         , b /*BB*/
         , c /*CC*/
         );
  _probe_position_x = x;
  _probe_position_y = y;
  _probe_position_z = z;
  _probe_position_a = a; /*AA*/
  _probe_position_b = b; /*BB*/
  _probe_position_c = c; /*CC*/
  if (distance == 0)
    {
      _program_position_x = _program_position_x;
      _program_position_y = _program_position_y;
      _program_position_z = _program_position_z;
    }
  else
    {
      backoff = ((_length_unit_type == CANON_UNITS_MM) ? 0.254 : 0.01);
      _program_position_x = (x + (backoff * (dx / distance)));
      _program_position_y = (y + (backoff * (dy / distance)));
      _program_position_z = (z + (backoff * (dz / distance)));
    }
  _program_position_a = a; /*AA*/
  _program_position_b = b; /*BB*/
  _program_position_c = c; /*CC*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movsd %xmm5, -0x38(%rbp)
movsd %xmm4, -0x30(%rbp)
movsd %xmm3, -0x28(%rbp)
movsd 0x93a7(%rip), %xmm4     # 0xfbf0
movsd %xmm0, -0x10(%rbp)
subsd %xmm0, %xmm4
movsd 0x93a6(%rip), %xmm0     # 0xfc00
movsd %xmm1, -0x18(%rbp)
subsd %xmm1, %xmm0
movsd 0x93a5(%rip), %xmm3     # 0xfc10
movsd %xmm2, -0x20(%rbp)
subsd %xmm2, %xmm3
movsd %xmm0, -0x48(%rbp)
mulsd %xmm0, %xmm0
movsd %xmm4, -0x40(%rbp)
movapd %xmm4, %xmm1
mulsd %xmm4, %xmm1
addsd %xmm0, %xmm1
movsd %xmm3, -0x50(%rbp)
movapd %xmm3, %xmm0
mulsd %xmm3, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x68af
sqrtsd %xmm0, %xmm0
jmp 0x68b4
callq 0x4130
movsd %xmm0, -0x8(%rbp)
movq 0x7a30(%rip), %rdi      # 0xe2f0
movl 0x68e6(%rip), %edx      # 0xd1ac
leal 0x1(%rdx), %eax
movl %eax, 0x68dd(%rip)      # 0xd1ac
leaq 0x294a(%rip), %rsi      # 0x9220
xorl %eax, %eax
callq 0x4240
callq 0x5504
movq 0x7a07(%rip), %rdi      # 0xe2f0
leaq 0x2d22(%rip), %rsi      # 0x9612
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x20(%rbp), %xmm2
movsd -0x28(%rbp), %xmm3
movsd -0x30(%rbp), %xmm4
movsd -0x38(%rbp), %xmm5
movb $0x6, %al
callq 0x4240
movsd -0x10(%rbp), %xmm6
movsd -0x18(%rbp), %xmm5
movsd -0x20(%rbp), %xmm4
movsd -0x28(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
movsd -0x38(%rbp), %xmm1
movsd %xmm6, 0x9335(%rip)     # 0xfc70
movsd %xmm5, 0x9335(%rip)     # 0xfc78
movsd %xmm4, 0x9335(%rip)     # 0xfc80
movsd %xmm3, 0x9335(%rip)     # 0xfc88
movsd %xmm2, 0x9335(%rip)     # 0xfc90
movsd %xmm1, 0x9335(%rip)     # 0xfc98
movsd -0x8(%rbp), %xmm8
ucomisd 0x288e(%rip), %xmm8     # 0x9200
jne 0x6976
jnp 0x69df
cmpb $0x0, 0x92d3(%rip)      # 0xfc50
jne 0x6989
movsd 0x2871(%rip), %xmm0     # 0x91f8
jmp 0x6991
movsd 0x285f(%rip), %xmm0     # 0x91f0
movsd -0x40(%rbp), %xmm7
divsd %xmm8, %xmm7
mulsd %xmm0, %xmm7
addsd %xmm6, %xmm7
movsd %xmm7, 0x9245(%rip)     # 0xfbf0
movsd -0x48(%rbp), %xmm6
divsd %xmm8, %xmm6
mulsd %xmm0, %xmm6
addsd %xmm5, %xmm6
movsd %xmm6, 0x923b(%rip)     # 0xfc00
movsd -0x50(%rbp), %xmm5
divsd %xmm8, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
movsd %xmm5, 0x9231(%rip)     # 0xfc10
movsd %xmm3, 0x9239(%rip)     # 0xfc20
movsd %xmm2, 0x9241(%rip)     # 0xfc30
movsd %xmm1, 0x9249(%rip)     # 0xfc40
addq $0x50, %rsp
popq %rbp
retq