// File: /workspace/github_cpp_makefile_star2_O3/sundale[P]gcode/saicanon.cc
// Function: ARC_FEED(int, double, double, double, double, int, double, double, double, double, double, double, double)
void ARC_FEED(int line_number,
 double first_end, double second_end,
 double first_axis, double second_axis, int rotation, double axis_end_point
 , double a /*AA*/
 , double b /*BB*/
 , double c /*CC*/
 , double u, double v, double w
)
{
	double radius = 0.0f;

  fprintf(_outfile, "%5d ", _line_number++);
  print_nc_line_number();
  fprintf(_outfile, "ARC_FEED(%.4f, %.4f, %.4f, %.4f, %d, %.4f"
         ", %.4f" /*AA*/
         ", %.4f" /*BB*/
         ", %.4f" /*CC*/
         ")\n", first_end, second_end, first_axis, second_axis,
         rotation, axis_end_point
         , a /*AA*/
         , b /*BB*/
         , c /*CC*/
         );
	radius = hypot(first_end - first_axis, second_end - second_axis);
	if(rotation > 0)
	{
		fprintf(_outfile, "\t\tcounter clockwise\n");
	}
	else if(rotation < 0)
	{
		fprintf(_outfile, "\t\clockwise\n");
	}
	else if(rotation == 0)
	{
		
	}
	fprintf(_outfile, "\t\tstart (x=%.4f, y=%.4f, z=%.4f)\n", _program_position_x, _program_position_y, _program_position_z);
  if (_active_plane == CANON_PLANE_XY)
    {
      _program_position_x = first_end;
      _program_position_y = second_end;
      _program_position_z = axis_end_point;
    }
  else if (_active_plane == CANON_PLANE_YZ)
    {
      _program_position_x = axis_end_point;
      _program_position_y = first_end;
      _program_position_z = second_end;
    }
  else /* if (_active_plane == CANON_PLANE_XZ) */
    {
      _program_position_x = second_end;
      _program_position_y = axis_end_point;
      _program_position_z = first_end;
    }
  fprintf(_outfile, "\t\tend (x=%.4f, y=%.4f, z=%.4f)\n", _program_position_x, _program_position_y, _program_position_z);
  fprintf(_outfile, "\t\tradius (%.4f)\n", radius);
  _program_position_a = a; /*AA*/
  _program_position_b = b; /*BB*/
  _program_position_c = c; /*CC*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movsd %xmm7, -0x48(%rbp)
movsd %xmm6, -0x40(%rbp)
movsd %xmm5, -0x38(%rbp)
movsd %xmm4, -0x18(%rbp)
movl %esi, %ebx
movsd %xmm3, -0x20(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm1, -0x10(%rbp)
movsd %xmm0, -0x28(%rbp)
movq 0x7e93(%rip), %rdi      # 0xe2f0
movl 0x6d41(%rip), %edx      # 0xd1a4
leal 0x1(%rdx), %eax
movl %eax, 0x6d38(%rip)      # 0xd1a4
leaq 0x2da5(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4230
callq 0x54d0
movq 0x7e6a(%rip), %rdi      # 0xe2f0
leaq 0x3098(%rip), %rsi      # 0x9525
movsd -0x28(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x20(%rbp), %xmm3
movl %ebx, %edx
movsd -0x18(%rbp), %xmm4
movsd -0x38(%rbp), %xmm5
movsd -0x40(%rbp), %xmm6
movsd -0x48(%rbp), %xmm7
movb $0x8, %al
callq 0x4230
movsd -0x28(%rbp), %xmm0
subsd -0x30(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
subsd -0x20(%rbp), %xmm1
callq 0x4080
movsd %xmm0, -0x20(%rbp)
testl %ebx, %ebx
jle 0x64ff
movq 0x7e09(%rip), %rcx      # 0xe2f0
leaq 0x3075(%rip), %rdi      # 0x9563
movl $0x14, %esi
movl $0x1, %edx
callq 0x42e0
jmp 0x6505
js 0x65e6
movq 0x7de4(%rip), %rdi      # 0xe2f0
movsd 0x96dc(%rip), %xmm0     # 0xfbf0
movsd 0x96e4(%rip), %xmm1     # 0xfc00
movsd 0x96ec(%rip), %xmm2     # 0xfc10
leaq 0x3059(%rip), %rsi      # 0x9584
movb $0x3, %al
callq 0x4230
movl 0x6c74(%rip), %eax      # 0xd1ac
cmpl $0x1, %eax
je 0x6556
cmpl $0x2, %eax
movsd -0x28(%rbp), %xmm2
jne 0x6567
movsd -0x18(%rbp), %xmm0
movaps %xmm2, %xmm1
movsd -0x10(%rbp), %xmm2
jmp 0x6571
movsd -0x28(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
jmp 0x6571
movsd -0x10(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd %xmm0, 0x9677(%rip)     # 0xfbf0
movsd %xmm1, 0x967f(%rip)     # 0xfc00
movsd %xmm2, 0x9687(%rip)     # 0xfc10
movq 0x7d60(%rip), %rdi      # 0xe2f0
leaq 0x300f(%rip), %rsi      # 0x95a6
movb $0x3, %al
callq 0x4230
movq 0x7d4b(%rip), %rdi      # 0xe2f0
leaq 0x301a(%rip), %rsi      # 0x95c6
movsd -0x20(%rbp), %xmm0
movb $0x1, %al
callq 0x4230
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x965b(%rip)     # 0xfc20
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x965e(%rip)     # 0xfc30
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x9661(%rip)     # 0xfc40
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movq 0x7d03(%rip), %rcx      # 0xe2f0
leaq 0x2f84(%rip), %rdi      # 0x9578
movl $0xb, %esi
jmp 0x64f3