// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/saicanon.cc
// Function: SET_MOTION_CONTROL_MODE(int, double)
extern void SET_MOTION_CONTROL_MODE(CANON_MOTION_MODE mode, double tolerance)
{
  motion_tolerance = 0;
  if (mode == CANON_EXACT_STOP)
    {
      PRINT0("SET_MOTION_CONTROL_MODE(CANON_EXACT_STOP)\n");
      _motion_mode = CANON_EXACT_STOP;
    }
  else if (mode == CANON_EXACT_PATH)
    {
      PRINT0("SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH)\n");
      _motion_mode = CANON_EXACT_PATH;
    }
  else if (mode == CANON_CONTINUOUS)
    {
      motion_tolerance = tolerance;
      PRINT1("SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, %f)\n", tolerance);
      _motion_mode = CANON_CONTINUOUS;
    }
  else
    PRINT0("SET_MOTION_CONTROL_MODE(UNKNOWN)\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
andq $0x0, 0xa08e(%rip)      # 0xfc68
cmpl $0x3, %edi
je 0x5cef
cmpl $0x2, %edi
je 0x5c72
cmpl $0x1, %edi
jne 0x5d7b
movq 0x86f4(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5c12
movq 0x73b0(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x86de(%rip)      # 0xe2f0
movl 0x7594(%rip), %edx      # 0xd1ac
leal 0x1(%rdx), %eax
movl %eax, 0x758b(%rip)      # 0xd1ac
leaq 0x35f0(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4240
callq 0x5320
movq 0x86b5(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5c51
movq 0x7371(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x869f(%rip)      # 0xe2f0
leaq 0x3721(%rip), %rdi      # 0x9379
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x42f0
movl $0x1, 0x7543(%rip)      # 0xd1b0
jmp 0x5d75
movq 0x8677(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5c8f
movq 0x7333(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x8661(%rip)      # 0xe2f0
movl 0x7517(%rip), %edx      # 0xd1ac
leal 0x1(%rdx), %eax
movl %eax, 0x750e(%rip)      # 0xd1ac
leaq 0x3573(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4240
callq 0x5320
movq 0x8638(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5cce
movq 0x72f4(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x8622(%rip)      # 0xe2f0
leaq 0x36cf(%rip), %rdi      # 0x93a4
pushq $0x2a
popq %rsi
pushq $0x1
popq %rdx
callq 0x42f0
movl $0x2, 0x74c6(%rip)      # 0xd1b0
jmp 0x5d75
movsd %xmm0, -0x8(%rbp)
movsd %xmm0, 0x9f6c(%rip)     # 0xfc68
movq 0x85ed(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5d19
movq 0x72a9(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x85d7(%rip)      # 0xe2f0
movl 0x748d(%rip), %edx      # 0xd1ac
leal 0x1(%rdx), %eax
movl %eax, 0x7484(%rip)      # 0xd1ac
leaq 0x34e9(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4240
callq 0x5320
movq 0x85ae(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5d58
movq 0x726a(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x8598(%rip)      # 0xe2f0
leaq 0x3670(%rip), %rsi      # 0x93cf
movsd -0x8(%rbp), %xmm0
movb $0x1, %al
callq 0x4240
movl $0x3, 0x743b(%rip)      # 0xd1b0
addq $0x10, %rsp
popq %rbp
retq
movq 0x856e(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5d98
movq 0x722a(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x8558(%rip)      # 0xe2f0
movl 0x740e(%rip), %edx      # 0xd1ac
leal 0x1(%rdx), %eax
movl %eax, 0x7405(%rip)      # 0xd1ac
leaq 0x346a(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4240
callq 0x5320
movq 0x852f(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5dd7
movq 0x71eb(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x8519(%rip)      # 0xe2f0
leaq 0x3620(%rip), %rdi      # 0x93fe
pushq $0x21
popq %rsi
pushq $0x1
popq %rdx
addq $0x10, %rsp
popq %rbp
jmp 0x42f0