// File: /workspace/github_cpp_makefile_star2_O1/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 0xa1e0
movq 0xffc7(%rip), %r14      # 0x43f60
movl %eax, 0x5f8(%r14)
callq 0xa280
movsd %xmm0, 0x8(%r14)
callq 0xa860
movsd %xmm0, 0x20(%r14)
callq 0xb110
movsd %xmm0, 0x38(%r14)
callq 0xa480
movl %eax, 0x5fc(%r14)
callq 0xb5a0
movsd %xmm0, 0x600(%r14)
callq 0xa770
movsd %xmm0, 0x608(%r14)
callq 0xa360
movsd %xmm0, 0x610(%r14)
callq 0xb640
movsd %xmm0, 0x50(%r14)
callq 0xab50
movsd %xmm0, 0x68(%r14)
callq 0xa420
movsd %xmm0, 0x80(%r14)
callq 0xacb0
movsd %xmm0, 0x678(%r14)
callq 0xacc0
testl %eax, %eax
setne 0x1688(%r14)
callq 0xb030
movl %eax, 0x1690(%r14)
callq 0xa820
testl %eax, %eax
setne 0x1797(%r14)
callq 0xa3a0
movl %eax, 0xc67c(%r14)
callq 0xae20
movl %eax, 0xc6b0(%r14)
callq 0xa9e0
movsd %xmm0, 0xc6b8(%r14)
callq 0xa200
movl %eax, 0xc6cc(%r14)
callq 0xa350
movl %eax, 0xd6c0(%r14)
callq 0xa780
movsd %xmm0, 0xef48(%r14)
callq 0xab00
testl %eax, %eax
setne 0x674(%r14)
callq 0xad70
testl %eax, %eax
setne 0xc6c8(%r14)
callq 0xb5e0
testl %eax, %eax
setne 0x1b6b0(%r14)
callq 0xa8c0
testl %eax, %eax
setne 0x1b6b1(%r14)
leaq -0x120(%rbp), %r15
movq %r15, %rdi
movl $0xfe, %esi
callq 0xa8e0
cmpb $0x0, (%r15)
leaq 0x9ae1(%rip), %rsi      # 0x3dbdb
cmovneq %r15, %rsi
addq $0x17c0, %r14           # imm = 0x17C0
movq %rbx, %rdi
movq %r14, %rdx
callq 0xb610
movq %rbx, %rdi
callq 0xb0c0
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq