// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/rs274ngc_pre.cc
// Function: Interp::synch()
int Interp::synch()
{

  char file_name[LINELEN];

  _setup.control_mode = GET_EXTERNAL_MOTION_CONTROL_MODE();
  _setup.AA_current = GET_EXTERNAL_POSITION_A();
  _setup.BB_current = GET_EXTERNAL_POSITION_B();
  _setup.CC_current = GET_EXTERNAL_POSITION_C();
  _setup.current_pocket = GET_EXTERNAL_TOOL_SLOT();
  _setup.current_x = GET_EXTERNAL_POSITION_X();
  _setup.current_y = GET_EXTERNAL_POSITION_Y();
  _setup.current_z = GET_EXTERNAL_POSITION_Z();
  _setup.u_current = GET_EXTERNAL_POSITION_U();
  _setup.v_current = GET_EXTERNAL_POSITION_V();
  _setup.w_current = GET_EXTERNAL_POSITION_W();
  _setup.feed_rate = GET_EXTERNAL_FEED_RATE();
  _setup.flood = (GET_EXTERNAL_FLOOD() != 0) ? ON : OFF;
  _setup.length_units = GET_EXTERNAL_LENGTH_UNIT_TYPE();
  _setup.mist = (GET_EXTERNAL_MIST() != 0) ? ON : OFF;
  _setup.plane = GET_EXTERNAL_PLANE();
  _setup.selected_pocket = GET_EXTERNAL_SELECTED_TOOL_SLOT();
  _setup.speed = GET_EXTERNAL_SPEED();
  _setup.spindle_turning = GET_EXTERNAL_SPINDLE();
  _setup.pockets_max = GET_EXTERNAL_POCKETS_MAX();
  _setup.traverse_rate = GET_EXTERNAL_TRAVERSE_RATE();
  _setup.feed_override = GET_EXTERNAL_FEED_OVERRIDE_ENABLE();
  _setup.speed_override = GET_EXTERNAL_SPINDLE_OVERRIDE_ENABLE();
  _setup.adaptive_feed = GET_EXTERNAL_ADAPTIVE_FEED_ENABLE();
  _setup.feed_hold = GET_EXTERNAL_FEED_HOLD_ENABLE();

  GET_EXTERNAL_PARAMETER_FILE_NAME(file_name, (LINELEN - 1));
  save_parameters(((file_name[0] ==
                             0) ?
                            RS274NGC_PARAMETER_FILE_NAME_DEFAULT :
                            file_name), _setup.parameters);

  load_tool_table();   /*  must set  _setup.tool_max first */

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
callq 0xb210
movq 0xfa6d(%rip), %r14      # 0x3cf60
movl %eax, 0x5f8(%r14)
callq 0xb2b0
movsd %xmm0, 0x8(%r14)
callq 0xb8f0
movsd %xmm0, 0x20(%r14)
callq 0xc260
movsd %xmm0, 0x38(%r14)
callq 0xb4c0
movl %eax, 0x5fc(%r14)
callq 0xc710
movsd %xmm0, 0x600(%r14)
callq 0xb7d0
movsd %xmm0, 0x608(%r14)
callq 0xb3a0
movsd %xmm0, 0x610(%r14)
callq 0xc7b0
movsd %xmm0, 0x50(%r14)
callq 0xbc40
movsd %xmm0, 0x68(%r14)
callq 0xb460
movsd %xmm0, 0x80(%r14)
callq 0xbda0
movsd %xmm0, 0x678(%r14)
callq 0xbdb0
testl %eax, %eax
setne 0x1688(%r14)
callq 0xc160
movl %eax, 0x1690(%r14)
callq 0xb8b0
testl %eax, %eax
setne 0x1797(%r14)
callq 0xb3e0
movl %eax, 0xc67c(%r14)
callq 0xbf30
movl %eax, 0xc6b0(%r14)
callq 0xba90
movsd %xmm0, 0xc6b8(%r14)
callq 0xb230
movl %eax, 0xc6cc(%r14)
callq 0xb390
movl %eax, 0xd6c0(%r14)
callq 0xb7e0
movsd %xmm0, 0xef48(%r14)
callq 0xbbe0
testl %eax, %eax
setne 0x674(%r14)
callq 0xbe70
testl %eax, %eax
setne 0xc6c8(%r14)
callq 0xc750
testl %eax, %eax
setne 0x1b6b0(%r14)
callq 0xb960
testl %eax, %eax
setne 0x1b6b1(%r14)
leaq -0x120(%rbp), %r15
movq %r15, %rdi
movl $0xfe, %esi
callq 0xb980
cmpb $0x0, (%r15)
leaq 0x9537(%rip), %rsi      # 0x36b8b
cmovneq %r15, %rsi
addq $0x17c0, %r14           # imm = 0x17C0
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc780
movq %rbx, %rdi
callq 0xc200
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq