// File: /workspace/github_cpp_makefile_star2_O3/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
movq $0x0, 0x9e9b(%rip) # 0xfc68
cmpl $0x3, %edi
je 0x5eea
cmpl $0x2, %edi
je 0x5e69
cmpl $0x1, %edi
jne 0x5f76
movq 0x8501(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5e05
movq 0x71bd(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x84eb(%rip)      # 0xe2f0
movl 0x7399(%rip), %edx      # 0xd1a4
leal 0x1(%rdx), %eax
movl %eax, 0x7390(%rip)      # 0xd1a4
leaq 0x33fd(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4230
callq 0x54d0
movq 0x84c2(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5e44
movq 0x717e(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x84ac(%rip)      # 0xe2f0
leaq 0x352e(%rip), %rdi      # 0x9379
movl $0x2a, %esi
movl $0x1, %edx
callq 0x42e0
movl $0x1, 0x7344(%rip)      # 0xd1a8
jmp 0x5f70
movq 0x8480(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5e86
movq 0x713c(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x846a(%rip)      # 0xe2f0
movl 0x7318(%rip), %edx      # 0xd1a4
leal 0x1(%rdx), %eax
movl %eax, 0x730f(%rip)      # 0xd1a4
leaq 0x337c(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4230
callq 0x54d0
movq 0x8441(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5ec5
movq 0x70fd(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x842b(%rip)      # 0xe2f0
leaq 0x34d8(%rip), %rdi      # 0x93a4
movl $0x2a, %esi
movl $0x1, %edx
callq 0x42e0
movl $0x2, 0x72c3(%rip)      # 0xd1a8
jmp 0x5f70
movsd %xmm0, -0x8(%rbp)
movsd %xmm0, 0x9d71(%rip)     # 0xfc68
movq 0x83f2(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5f14
movq 0x70ae(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x83dc(%rip)      # 0xe2f0
movl 0x728a(%rip), %edx      # 0xd1a4
leal 0x1(%rdx), %eax
movl %eax, 0x7281(%rip)      # 0xd1a4
leaq 0x32ee(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4230
callq 0x54d0
movq 0x83b3(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5f53
movq 0x706f(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x839d(%rip)      # 0xe2f0
leaq 0x3475(%rip), %rsi      # 0x93cf
movsd -0x8(%rbp), %xmm0
movb $0x1, %al
callq 0x4230
movl $0x3, 0x7238(%rip)      # 0xd1a8
addq $0x10, %rsp
popq %rbp
retq
movq 0x8373(%rip), %rdi      # 0xe2f0
testq %rdi, %rdi
jne 0x5f93
movq 0x702f(%rip), %rax      # 0xcfb8
movq (%rax), %rdi
movq %rdi, 0x835d(%rip)      # 0xe2f0
movl 0x720b(%rip), %edx      # 0xd1a4
leal 0x1(%rdx), %eax
movl %eax, 0x7202(%rip)      # 0xd1a4
leaq 0x326f(%rip), %rsi      # 0x9218
xorl %eax, %eax
callq 0x4230
callq 0x54d0
movq 0x8334(%rip), %rcx      # 0xe2f0
testq %rcx, %rcx
jne 0x5fd2
movq 0x6ff0(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq %rcx, 0x831e(%rip)      # 0xe2f0
leaq 0x3425(%rip), %rdi      # 0x93fe
movl $0x21, %esi
movl $0x1, %edx
addq $0x10, %rsp
popq %rbp
jmp 0x42e0