LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_lathe_diameter_mode(int, block_struct*, setup_struct*)
int Interp::convert_lathe_diameter_mode(int g_code,    //!< g_code being executed (must be G_90_1 or G_91_1)
                  block_pointer block,           //!< pointer to current block
                  setup_pointer settings)        //!< pointer to machine settings
{
  if (g_code == G_7) {
    if (settings->lathe_diameter_mode != ON) {
      if(block->x_flag)
      {
        block->x_number /= 2; //Apply scaling now
      }
      if(block->motion_to_be == G_76) {
          block->i_number /= 2;
          block->j_number /= 2;
          block->k_number /= 2;
      }              
#ifdef DEBUG_EMC
      COMMENT("interpreter: Lathe diameter mode changed to diameter");
#endif
      settings->lathe_diameter_mode = ON;
    }
  } else if (g_code == G_8) {
    if (settings->lathe_diameter_mode != OFF) {
      if(block->x_flag)
      {
        block->x_number *= 2; //Remove any existing scaling
      }
      if(block->motion_to_be == G_76) {
          block->i_number *= 2;
          block->j_number *= 2;
          block->k_number *= 2;
      }              
#ifdef DEBUG_EMC
      COMMENT("interpreter: Lathe diameter mode changed to radius");
#endif
      settings->lathe_diameter_mode = OFF;
    }
  } else
    ERS("BUG: Code not G7 or G8");
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
cmpl $0x50, %esi
je 0x11fe0
cmpl $0x46, %esi
jne 0x1206b
xorl %ebx, %ebx
cmpb $0x0, 0x1e6d8(%r14)
jne 0x120ab
cmpb $0x1, 0x270(%rdx)
jne 0x11f7b
movsd 0x278(%rdx), %xmm0
mulsd 0x1c095(%rip), %xmm0    # 0x2e008
movsd %xmm0, 0x278(%rdx)
cmpl $0x2f8, 0x1d8(%rdx)     # imm = 0x2F8
jne 0x11fc7
movsd 0x1c079(%rip), %xmm0    # 0x2e008
movsd 0x1a0(%rdx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x1a0(%rdx)
movsd 0x1b0(%rdx), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x1b0(%rdx)
mulsd 0x1c0(%rdx), %xmm0
movsd %xmm0, 0x1c0(%rdx)
leaq 0x1f8f3(%rip), %rdi     # 0x318c1
callq 0xb870
movb $0x1, 0x1e6d8(%r14)
jmp 0x120ab
xorl %ebx, %ebx
cmpb $0x1, 0x1e6d8(%r14)
jne 0x120ab
cmpb $0x1, 0x270(%rdx)
jne 0x1200d
movsd 0x278(%rdx), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x278(%rdx)
cmpl $0x2f8, 0x1d8(%rdx)     # imm = 0x2F8
jne 0x12055
movsd 0x1a0(%rdx), %xmm0
movsd 0x1b0(%rdx), %xmm1
addsd %xmm0, %xmm0
movsd %xmm0, 0x1a0(%rdx)
addsd %xmm1, %xmm1
movsd %xmm1, 0x1b0(%rdx)
movsd 0x1c0(%rdx), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x1c0(%rdx)
leaq 0x1f89a(%rip), %rdi     # 0x318f6
callq 0xb870
movb $0x0, 0x1e6d8(%r14)
jmp 0x120ab
leaq 0x1f8b7(%rip), %rsi     # 0x31929
xorl %eax, %eax
callq 0xb8e0
movq 0x2aee0(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1e47e(%rip), %rsi     # 0x3050c
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_feed_mode(int, setup_struct*)
int Interp::convert_feed_mode(int g_code,        //!< g_code being executed (must be G_93, G_94 or G_95)
                             setup_pointer settings)    //!< pointer to machine settings                 
{
  if (g_code == G_93) {
#ifdef DEBUG_EMC
    enqueue_COMMENT("interpreter: feed mode set to inverse time");
#endif
    settings->feed_mode = INVERSE_TIME;
    enqueue_SET_FEED_MODE(0);
  } else if (g_code == G_94) {
#ifdef DEBUG_EMC
    enqueue_COMMENT("interpreter: feed mode set to units per minute");
#endif
    settings->feed_mode = UNITS_PER_MINUTE;
    enqueue_SET_FEED_MODE(0);
    settings->feed_rate = 0.0;
    enqueue_SET_FEED_RATE(0);
  } else if(g_code == G_95) {
#ifdef DEBUG_EMC
    enqueue_COMMENT("interpreter: feed mode set to units per revolution");
#endif
    settings->feed_mode = UNITS_PER_REVOLUTION;
    enqueue_SET_FEED_MODE(1);
    settings->feed_rate = 0.0;
    enqueue_SET_FEED_RATE(0);
  } else
    ERS("BUG: Code not G93, G94, or G95");
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
cmpl $0x3b6, %esi            # imm = 0x3B6
je 0x1213a
cmpl $0x3ac, %esi            # imm = 0x3AC
je 0x1210b
cmpl $0x3a2, %esi            # imm = 0x3A2
jne 0x1216d
leaq 0x1f853(%rip), %rdi     # 0x31940
callq 0xc4d0
movl $0x1, 0x670(%rbx)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xb8c0
jmp 0x121ae
leaq 0x1f859(%rip), %rdi     # 0x3196b
callq 0xc4d0
andl $0x0, 0x670(%rbx)
xorl %r14d, %r14d
xorl %edi, %edi
callq 0xb8c0
andq $0x0, 0x678(%rbx)
xorps %xmm0, %xmm0
callq 0xb800
jmp 0x121ae
leaq 0x1f859(%rip), %rdi     # 0x3199a
callq 0xc4d0
movl $0x2, 0x670(%rbx)
pushq $0x1
popq %rdi
callq 0xb8c0
andq $0x0, 0x678(%rbx)
xorps %xmm0, %xmm0
callq 0xb800
xorl %r14d, %r14d
jmp 0x121ae
leaq 0x1f859(%rip), %rsi     # 0x319cd
xorl %eax, %eax
callq 0xb8e0
movq 0x2adde(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1e3cd(%rip), %rsi     # 0x3055d
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %r14
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_set_plane(int, setup_struct*)
int Interp::convert_set_plane(int g_code,        //!< must be G_17, G_18, or G_19 
                             setup_pointer settings)    //!< pointer to machine settings 
{
  CHKS((settings->cutter_comp_side != OFF && g_code == G_17 && settings->plane != CANON_PLANE_XY),
        NCE_CANNOT_CHANGE_PLANES_WITH_CUTTER_RADIUS_COMP_ON);
  CHKS((settings->cutter_comp_side != OFF && g_code == G_18 && settings->plane != CANON_PLANE_XZ),
        NCE_CANNOT_CHANGE_PLANES_WITH_CUTTER_RADIUS_COMP_ON);
  CHKS((settings->cutter_comp_side != OFF && g_code == G_19 && settings->plane != CANON_PLANE_YZ),
        NCE_CANNOT_CHANGE_PLANES_WITH_CUTTER_RADIUS_COMP_ON);

  CHKS((settings->cutter_comp_side != OFF && g_code == G_19), 
          NCE_RADIUS_COMP_ONLY_IN_XY_OR_XZ);

  if (g_code == G_17) {
    SELECT_PLANE(CANON_PLANE_XY);
    settings->plane = CANON_PLANE_XY;
  } else if (g_code == G_18) {
    SELECT_PLANE(CANON_PLANE_XZ);
    settings->plane = CANON_PLANE_XZ;
  } else if (g_code == G_19) {
    SELECT_PLANE(CANON_PLANE_YZ);
    settings->plane = CANON_PLANE_YZ;
  } else if (g_code == G_17_1) {
    SELECT_PLANE(CANON_PLANE_UV);
    settings->plane = CANON_PLANE_UV;
  } else if (g_code == G_18_1) {
    SELECT_PLANE(CANON_PLANE_UW);
    settings->plane = CANON_PLANE_UW;
  } else if (g_code == G_19_1) {
    SELECT_PLANE(CANON_PLANE_VW);
    settings->plane = CANON_PLANE_VW;
  } else
    ERS(NCE_BUG_CODE_NOT_G17_G18_OR_G19);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movl 0x624(%rdx), %eax
testl %eax, %eax
sete %cl
cmpl $0xaa, %esi
setne %dl
orb %cl, %dl
jne 0x12440
cmpl $0x1, 0xc67c(%r14)
jne 0x12498
pushq $0x1
popq %rdi
callq 0xbcb0
movl $0x1, 0xc67c(%r14)
jmp 0x1246f
testl %eax, %eax
sete %cl
cmpl $0xb4, %esi
setne %dl
orb %cl, %dl
jne 0x12473
cmpl $0x3, 0xc67c(%r14)
jne 0x12498
pushq $0x3
popq %rdi
callq 0xbcb0
movl $0x3, 0xc67c(%r14)
xorl %eax, %eax
jmp 0x124e3
testl %eax, %eax
sete %al
cmpl $0xbe, %esi
setne %cl
orb %al, %cl
jne 0x124e8
cmpl $0x2, 0xc67c(%r14)
jne 0x12498
leaq 0x1f1ce(%rip), %rdi     # 0x31664
jmp 0x1249f
leaq 0x1fd4c(%rip), %rdi     # 0x321eb
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x2aaa8(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1e139(%rip), %rsi     # 0x305ff
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
cmpl $0xaa, %esi
je 0x1242b
cmpl $0xb4, %esi
je 0x1245c
cmpl $0xbe, %esi
jne 0x12520
pushq $0x2
popq %rdi
callq 0xbcb0
movl $0x2, 0xc67c(%r14)
jmp 0x1246f
cmpl $0xbf, %esi
je 0x12568
cmpl $0xb5, %esi
je 0x12550
cmpl $0xab, %esi
jne 0x12580
pushq $0x4
popq %rdi
callq 0xbcb0
movl $0x4, 0xc67c(%r14)
jmp 0x1246f
pushq $0x6
popq %rdi
callq 0xbcb0
movl $0x6, 0xc67c(%r14)
jmp 0x1246f
pushq $0x5
popq %rdi
callq 0xbcb0
movl $0x5, 0xc67c(%r14)
jmp 0x1246f
leaq 0x1fc9c(%rip), %rdi     # 0x32223
jmp 0x1249f
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_retract_mode(int, setup_struct*)
int Interp::convert_retract_mode(int g_code,     //!< g_code being executed (must be G_98 or G_99)
                                setup_pointer settings) //!< pointer to machine settings                 
{
  CHKS((settings->cutter_comp_side != OFF),
       (_("Cannot change retract mode with cutter radius compensation on")));
  if (g_code == G_98) {
#ifdef DEBUG_EMC
    enqueue_COMMENT("interpreter: retract mode set to old_z");
#endif
    settings->retract_mode = OLD_Z;
  } else if (g_code == G_99) {
#ifdef DEBUG_EMC
    enqueue_COMMENT("interpreter: retract mode set to r_plane");
#endif
    settings->retract_mode = R_PLANE;
  } else
    ERS(NCE_BUG_CODE_NOT_G98_OR_G99);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x624(%rdx)
je 0x130a0
leaq 0x1eff9(%rip), %rdi     # 0x32053
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x29eed(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1d671(%rip), %rsi     # 0x306f2
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
jmp 0x130e2
movq %rdx, %r14
cmpl $0x3de, %esi            # imm = 0x3DE
je 0x130cc
cmpl $0x3d4, %esi            # imm = 0x3D4
jne 0x130e7
leaq 0x1efd7(%rip), %rdi     # 0x32091
callq 0xc4d0
movl $0x1, 0xc6a8(%r14)
jmp 0x130e0
leaq 0x1efe5(%rip), %rdi     # 0x320b8
callq 0xc4d0
andl $0x0, 0xc6a8(%r14)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1eff3(%rip), %rdi     # 0x320e1
jmp 0x1305a
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_modal_0(int, block_struct*, setup_struct*)
int Interp::convert_modal_0(int code,    //!< G code, must be from group 0                
                           block_pointer block, //!< pointer to a block of RS274/NGC instructions
                           setup_pointer settings)      //!< pointer to machine settings                 
{

  if (code == G_10) {
      if(block->l_number == 1 || block->l_number == 10)
          CHP(convert_setup_tool(block, settings));
      else
          CHP(convert_setup(block, settings));
  } else if ((code == G_28) || (code == G_30)) {
    CHP(convert_home(code, block, settings));
  } else if ((code == G_28_1) || (code == G_30_1)) {
    CHP(convert_savehome(code, block, settings));
  } else if ((code == G_92) || (code == G_92_1) ||
             (code == G_92_2) || (code == G_92_3)) {
    CHP(convert_axis_offsets(code, block, settings));
  } else if (code == G_5_3) {
    CHP(convert_nurbs(code, block, settings));
  } else if ((code == G_4) || (code == G_53));  /* handled elsewhere */
  else
    ERS(NCE_BUG_CODE_NOT_G4_G10_G28_G30_G53_OR_G92_SERIES);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
leal -0x398(%rsi), %eax
cmpl $0x4, %eax
jb 0x13175
cmpl $0x28, %esi
je 0x13269
cmpl $0x35, %esi
je 0x13196
cmpl $0x212, %esi            # imm = 0x212
je 0x13269
cmpl $0x118, %esi            # imm = 0x118
je 0x1318c
cmpl $0x119, %esi            # imm = 0x119
je 0x13182
cmpl $0x12c, %esi            # imm = 0x12C
je 0x1318c
cmpl $0x12d, %esi            # imm = 0x12D
je 0x13182
cmpl $0x64, %esi
jne 0x131a3
movl 0x1c8(%rdx), %eax
cmpl $0xa, %eax
je 0x13162
cmpl $0x1, %eax
jne 0x131f8
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xb370
jmp 0x13206
movq %rbx, %rdi
callq 0xc7a0
jmp 0x13206
movq %rbx, %rdi
callq 0xb450
jmp 0x13206
movq %rbx, %rdi
callq 0xbfc0
jmp 0x13206
pushq $0x35
popq %rsi
movq %rbx, %rdi
callq 0xc5d0
jmp 0x13206
leaq 0x1ed71(%rip), %rdi     # 0x31f1b
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x29d9d(%rip), %r14     # 0x3cf60
leaq 0xc6d0(%r14), %rdi
leaq 0x1d572(%rip), %rsi     # 0x30743
pushq $0x50
popq %rdx
callq 0xb940
movb $0x0, 0xc71f(%r14)
movl $0x1, 0xd670(%r14)
addq $0xc720, %r14           # imm = 0xC720
pushq $0x5
popq %rbx
jmp 0x13262
movq %rbx, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0xb7f0
testl %eax, %eax
je 0x13269
movl %eax, %ebx
movq 0x29d4d(%rip), %r15     # 0x3cf60
movslq 0xd670(%r15), %rax
cmpq $0x30, %rax
jg 0x13266
imulq $0x50, %rax, %rax
leaq (%r15,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x1d50d(%rip), %rsi     # 0x30743
pushq $0x50
popq %rdx
callq 0xb940
movslq 0xd670(%r15), %rax
imulq $0x50, %rax, %rcx
leaq (%r15,%rcx), %r14
addq $0xc720, %r14           # imm = 0xC720
movb $0x0, -0x1(%r14)
incl %eax
movl %eax, 0xd670(%r15)
movb $0x0, (%r14)
movl %ebx, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_spindle_mode(block_struct*, setup_struct*)
int Interp::convert_spindle_mode(block_pointer block, setup_pointer settings)
{
    if(block->g_modes[14] == G_97) {
	enqueue_SET_SPINDLE_MODE(0);
    } else { /* G_96 */
	if(block->d_flag)
	    enqueue_SET_SPINDLE_MODE(block->d_number_float);
	else
	    enqueue_SET_SPINDLE_MODE(1e30);
    }
    return INTERP_OK;
}

// Assembly:
xorps %xmm0, %xmm0
cmpl $0x3ca, 0x188(%rsi)     # imm = 0x3CA
je 0x1711c
cmpb $0x1, 0x138(%rsi)
jne 0x17114
movsd 0x130(%rsi), %xmm0
jmp 0x1711c
movsd 0x18dd4(%rip), %xmm0    # 0x2fef0
pushq %rbp
movq %rsp, %rbp
callq 0xb6f0
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_SET_FEED_RATE(double)
void enqueue_SET_FEED_RATE(double feed) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate set feed rate %f\n", feed);
        SET_FEED_RATE(feed);
        return;
    }
    queued_canon q;
    q.type = QSET_FEED_RATE;
    q.data.set_feed_rate.feed = feed;
    if(debug_qc) printf("enqueue set feed rate %f\n", feed);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0xb240
movq 0x42f09(%rip), %rax     # 0x5c430
cmpq 0x42f0a(%rip), %rax     # 0x5c438
je 0x19565
leaq -0x88(%rbp), %rbx
movl $0x3, (%rbx)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
callq 0xb240
leaq 0x42edd(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movsd -0x10(%rbp), %xmm0
addq $0x88, %rsp
popq %rbx
popq %rbp
jmp 0xbc60
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_DWELL(double)
void enqueue_DWELL(double time) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate dwell %f\n", time);
        DWELL(time);
        return;
    }
    queued_canon q;
    q.type = QDWELL;
    q.data.dwell.time = time;
    if(debug_qc) printf("enqueue dwell %f\n", time);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0xb240
movq 0x42e9b(%rip), %rax     # 0x5c430
cmpq 0x42e9c(%rip), %rax     # 0x5c438
je 0x195d3
leaq -0x88(%rbp), %rbx
movl $0x4, (%rbx)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
callq 0xb240
leaq 0x42e6f(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movsd -0x10(%rbp), %xmm0
addq $0x88, %rsp
popq %rbx
popq %rbp
jmp 0xb040
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_SET_FEED_MODE(int)
void enqueue_SET_FEED_MODE(int mode) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate set feed mode %d\n", mode);
        SET_FEED_MODE(mode);
        return;
    }
    queued_canon q;
    q.type = QSET_FEED_MODE;
    q.data.set_feed_mode.mode = mode;
    if(debug_qc) printf("enqueue set feed mode %d\n", mode);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl %edi, %ebx
callq 0xb240
movq 0x42e2e(%rip), %rax     # 0x5c430
cmpq 0x42e2f(%rip), %rax     # 0x5c438
je 0x1963d
leaq -0x88(%rbp), %r14
movl $0x5, (%r14)
movl %ebx, 0x8(%r14)
callq 0xb240
leaq 0x42e07(%rip), %rdi     # 0x5c430
movq %r14, %rsi
callq 0xb1f0
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, %edi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xc340
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_MIST_ON()
void enqueue_MIST_ON(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate mist on\n");
        MIST_ON();
        return;
    }
    queued_canon q;
    q.type = QMIST_ON;
    if(debug_qc) printf("enqueue mist on\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42dcc(%rip), %rax     # 0x5c430
cmpq 0x42dcd(%rip), %rax     # 0x5c438
je 0x19692
leaq -0x80(%rbp), %rbx
movl $0x6, (%rbx)
callq 0xb240
leaq 0x42dad(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xc3c0
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_MIST_OFF()
void enqueue_MIST_OFF(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate mist off\n");
        MIST_OFF();
        return;
    }
    queued_canon q;
    q.type = QMIST_OFF;
    if(debug_qc) printf("enqueue mist off\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42d7e(%rip), %rax     # 0x5c430
cmpq 0x42d7f(%rip), %rax     # 0x5c438
je 0x196e0
leaq -0x80(%rbp), %rbx
movl $0x7, (%rbx)
callq 0xb240
leaq 0x42d5f(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xb100
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_FLOOD_ON()
void enqueue_FLOOD_ON(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate flood on\n");
        FLOOD_ON();
        return;
    }
    queued_canon q;
    q.type = QFLOOD_ON;
    if(debug_qc) printf("enqueue flood on\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42d30(%rip), %rax     # 0x5c430
cmpq 0x42d31(%rip), %rax     # 0x5c438
je 0x1972e
leaq -0x80(%rbp), %rbx
movl $0x8, (%rbx)
callq 0xb240
leaq 0x42d11(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xb850
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_FLOOD_OFF()
void enqueue_FLOOD_OFF(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate flood on\n");
        FLOOD_OFF();
        return;
    }
    queued_canon q;
    q.type = QFLOOD_OFF;
    if(debug_qc) printf("enqueue flood off\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42ce2(%rip), %rax     # 0x5c430
cmpq 0x42ce3(%rip), %rax     # 0x5c438
je 0x1977c
leaq -0x80(%rbp), %rbx
movl $0x9, (%rbx)
callq 0xb240
leaq 0x42cc3(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xb760
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_START_SPINDLE_CLOCKWISE()
void enqueue_START_SPINDLE_CLOCKWISE(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate spindle clockwise\n");
        START_SPINDLE_CLOCKWISE();
        return;
    }
    queued_canon q;
    q.type = QSTART_SPINDLE_CLOCKWISE;
    if(debug_qc) printf("enqueue spindle clockwise\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42c94(%rip), %rax     # 0x5c430
cmpq 0x42c95(%rip), %rax     # 0x5c438
je 0x197ca
leaq -0x80(%rbp), %rbx
movl $0xa, (%rbx)
callq 0xb240
leaq 0x42c75(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xbc90
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_START_SPINDLE_COUNTERCLOCKWISE()
void enqueue_START_SPINDLE_COUNTERCLOCKWISE(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate spindle counterclockwise\n");
        START_SPINDLE_COUNTERCLOCKWISE();
        return;
    }
    queued_canon q;
    q.type = QSTART_SPINDLE_COUNTERCLOCKWISE;
    if(debug_qc) printf("enqueue spindle counterclockwise\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42c46(%rip), %rax     # 0x5c430
cmpq 0x42c47(%rip), %rax     # 0x5c438
je 0x19818
leaq -0x80(%rbp), %rbx
movl $0xb, (%rbx)
callq 0xb240
leaq 0x42c27(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xc050
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_STOP_SPINDLE_TURNING()
void enqueue_STOP_SPINDLE_TURNING(void) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate spindle stop\n");
        STOP_SPINDLE_TURNING();
        return;
    }
    queued_canon q;
    q.type = QSTOP_SPINDLE_TURNING;
    if(debug_qc) printf("enqueue spindle stop\n");
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
callq 0xb240
movq 0x42bf8(%rip), %rax     # 0x5c430
cmpq 0x42bf9(%rip), %rax     # 0x5c438
je 0x19866
leaq -0x80(%rbp), %rbx
movl $0xc, (%rbx)
callq 0xb240
leaq 0x42bd9(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
addq $0x78, %rsp
popq %rbx
popq %rbp
jmp 0xbca0
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_SET_SPINDLE_MODE(double)
void enqueue_SET_SPINDLE_MODE(double mode) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate spindle mode %f\n", mode);
        SET_SPINDLE_MODE(mode);
        return;
    }
    queued_canon q;
    q.type = QSET_SPINDLE_MODE;
    q.data.set_spindle_mode.mode = mode;
    if(debug_qc) printf("enqueue spindle mode %f\n", mode);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0xb240
movq 0x42ba2(%rip), %rax     # 0x5c430
cmpq 0x42ba3(%rip), %rax     # 0x5c438
je 0x198cc
leaq -0x88(%rbp), %rbx
movl $0xd, (%rbx)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
callq 0xb240
leaq 0x42b76(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movsd -0x10(%rbp), %xmm0
addq $0x88, %rsp
popq %rbx
popq %rbp
jmp 0xbc70
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_SET_SPINDLE_SPEED(double)
void enqueue_SET_SPINDLE_SPEED(double speed) {
    if(qc().empty()) {
    if(debug_qc) printf("immediate set spindle speed %f\n", speed);
        SET_SPINDLE_SPEED(speed);
        return;
    }
    queued_canon q;
    q.type = QSET_SPINDLE_SPEED;
    q.data.set_spindle_speed.speed = speed;
    if(debug_qc) printf("enqueue set spindle speed %f\n", speed);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
movsd %xmm0, -0x10(%rbp)
callq 0xb240
movq 0x42b34(%rip), %rax     # 0x5c430
cmpq 0x42b35(%rip), %rax     # 0x5c438
je 0x1993a
leaq -0x88(%rbp), %rbx
movl $0xe, (%rbx)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x8(%rbx)
callq 0xb240
leaq 0x42b08(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movsd -0x10(%rbp), %xmm0
addq $0x88, %rsp
popq %rbx
popq %rbp
jmp 0xb530
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_COMMENT(char*)
void enqueue_COMMENT(char *c) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate comment \"%s\"\n", c);
        COMMENT(c);
        return;
    }
    queued_canon q;
    q.type = QCOMMENT;
    q.data.comment.comment = strdup(c);
    if(debug_qc) printf("enqueue comment \"%s\"\n", c);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
callq 0xb240
movq 0x42ac6(%rip), %rax     # 0x5c430
cmpq 0x42ac7(%rip), %rax     # 0x5c438
je 0x199ad
leaq -0x88(%rbp), %r14
movl $0xf, (%r14)
movq %rbx, %rdi
callq 0xc650
movq %rax, 0x8(%r14)
callq 0xb240
leaq 0x42a97(%rip), %rdi     # 0x5c430
movq %r14, %rsi
callq 0xb1f0
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xb870
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_STRAIGHT_FEED(setup_struct*, int, double, double, double, double, double, double, double, double, double, double, double, double)
int enqueue_STRAIGHT_FEED(setup_pointer settings, int l, 
                           double dx, double dy, double dz,
                           double x, double y, double z, 
                           double a, double b, double c, 
                           double u, double v, double w) {
    queued_canon q;
    q.type = QSTRAIGHT_FEED;
    q.data.straight_feed.line_number = l;
    switch(settings->plane) {
    case CANON_PLANE_XY:
        q.data.straight_feed.dx = dx;
        q.data.straight_feed.dy = dy;
        q.data.straight_feed.dz = dz;
        q.data.straight_feed.x = x;
        q.data.straight_feed.y = y;
        q.data.straight_feed.z = z;
        break;
    case CANON_PLANE_XZ:
        q.data.straight_feed.dz = dx;
        q.data.straight_feed.dx = dy;
        q.data.straight_feed.dy = dz;
        q.data.straight_feed.z = x;
        q.data.straight_feed.x = y;
        q.data.straight_feed.y = z;
        break;
    default:
        ;
    }        
    q.data.straight_feed.a = a;
    q.data.straight_feed.b = b;
    q.data.straight_feed.c = c;
    q.data.straight_feed.u = u;
    q.data.straight_feed.v = v;
    q.data.straight_feed.w = w;
    qc().push_back(q);
    if(debug_qc) printf("enqueue straight feed lineno %d to %f %f %f direction %f %f %f\n", l, x,y,z, dx, dy, dz);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movsd 0x28(%rbp), %xmm8
movsd 0x20(%rbp), %xmm9
movsd 0x18(%rbp), %xmm10
movsd 0x10(%rbp), %xmm11
movl $0x1, -0x80(%rbp)
movl %esi, -0x78(%rbp)
movl 0xc67c(%rdi), %eax
cmpl $0x1, %eax
je 0x19a15
cmpl $0x3, %eax
jne 0x19a46
leaq -0x60(%rbp), %r8
leaq -0x70(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x58(%rbp), %rcx
leaq -0x50(%rbp), %rax
jmp 0x19a2d
leaq -0x48(%rbp), %rax
leaq -0x50(%rbp), %rcx
leaq -0x58(%rbp), %rdx
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %r8
movsd %xmm0, (%r8)
movsd %xmm1, (%rdi)
movsd %xmm2, (%rsi)
movsd %xmm3, (%rdx)
movsd %xmm4, (%rcx)
movsd %xmm5, (%rax)
leaq -0x80(%rbp), %rbx
movsd %xmm6, 0x40(%rbx)
movsd %xmm7, 0x48(%rbx)
movsd %xmm11, 0x50(%rbx)
movsd %xmm10, 0x58(%rbx)
movsd %xmm9, 0x60(%rbx)
movsd %xmm8, 0x68(%rbx)
callq 0xb240
leaq 0x429b8(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_STRAIGHT_TRAVERSE(setup_struct*, int, double, double, double, double, double, double, double, double, double, double, double, double)
int enqueue_STRAIGHT_TRAVERSE(setup_pointer settings, int l, 
                               double dx, double dy, double dz,
                               double x, double y, double z, 
                               double a, double b, double c, 
                               double u, double v, double w) {
    queued_canon q;
    q.type = QSTRAIGHT_TRAVERSE;
    q.data.straight_traverse.line_number = l;
    switch(settings->plane) {
    case CANON_PLANE_XY:
        q.data.straight_traverse.dx = dx;
        q.data.straight_traverse.dy = dy;
        q.data.straight_traverse.dz = dz;
        q.data.straight_traverse.x = x;
        q.data.straight_traverse.y = y;
        q.data.straight_traverse.z = z;
        break;
    case CANON_PLANE_XZ:
        q.data.straight_traverse.dz = dx;
        q.data.straight_traverse.dx = dy;
        q.data.straight_traverse.dy = dz;
        q.data.straight_traverse.z = x;
        q.data.straight_traverse.x = y;
        q.data.straight_traverse.y = z;
        break;
    default:
        ;
    }        
    q.data.straight_traverse.a = a;
    q.data.straight_traverse.b = b;
    q.data.straight_traverse.c = c;
    q.data.straight_traverse.u = u;
    q.data.straight_traverse.v = v;
    q.data.straight_traverse.w = w;
    if(debug_qc) printf("enqueue straight traverse lineno %d to %f %f %f direction %f %f %f\n", l, x,y,z, dx, dy, dz);
    qc().push_back(q);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movsd 0x28(%rbp), %xmm8
movsd 0x20(%rbp), %xmm9
movsd 0x18(%rbp), %xmm10
andl $0x0, -0x80(%rbp)
movsd 0x10(%rbp), %xmm11
movl %esi, -0x78(%rbp)
movl 0xc67c(%rdi), %eax
cmpl $0x1, %eax
je 0x19adb
cmpl $0x3, %eax
jne 0x19b0c
leaq -0x60(%rbp), %r8
leaq -0x70(%rbp), %rdi
leaq -0x68(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x58(%rbp), %rcx
leaq -0x50(%rbp), %rax
jmp 0x19af3
leaq -0x48(%rbp), %rax
leaq -0x50(%rbp), %rcx
leaq -0x58(%rbp), %rdx
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %r8
movsd %xmm0, (%r8)
movsd %xmm1, (%rdi)
movsd %xmm2, (%rsi)
movsd %xmm3, (%rdx)
movsd %xmm4, (%rcx)
movsd %xmm5, (%rax)
leaq -0x80(%rbp), %rbx
movsd %xmm6, 0x40(%rbx)
movsd %xmm7, 0x48(%rbx)
movsd %xmm11, 0x50(%rbx)
movsd %xmm10, 0x58(%rbx)
movsd %xmm9, 0x60(%rbx)
movsd %xmm8, 0x68(%rbx)
callq 0xb240
leaq 0x428f2(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_ARC_FEED(setup_struct*, int, double, double, double, double, double, int, double, double, double, double, double, double, double)
void enqueue_ARC_FEED(setup_pointer settings, int l, 
                      double original_turns,
                      double end1, double end2, double center1, double center2,
                      int turn,
                      double end3,
                      double a, double b, double c,
                      double u, double v, double w) {
    queued_canon q;

    q.type = QARC_FEED;
    q.data.arc_feed.line_number = l;
    q.data.arc_feed.original_turns = original_turns;
    q.data.arc_feed.end1 = end1;
    q.data.arc_feed.end2 = end2;
    q.data.arc_feed.center1 = center1;
    q.data.arc_feed.center2 = center2;
    q.data.arc_feed.turn = turn;
    q.data.arc_feed.end3 = end3;
    q.data.arc_feed.a = a;
    q.data.arc_feed.b = b;
    q.data.arc_feed.c = c;
    q.data.arc_feed.u = u;
    q.data.arc_feed.v = v;
    q.data.arc_feed.w = w;

    if(debug_qc) printf("enqueue arc lineno %d to %f %f center %f %f turn %d sweeping %f\n", l, end1, end2, center1, center2, turn, original_turns);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movaps 0x20(%rbp), %xmm8
movaps 0x10(%rbp), %xmm9
leaq -0x80(%rbp), %rbx
movl $0x2, (%rbx)
movl %esi, 0x8(%rbx)
movsd %xmm0, 0x10(%rbx)
movsd %xmm1, 0x18(%rbx)
movsd %xmm2, 0x20(%rbx)
movsd %xmm3, 0x28(%rbx)
movsd %xmm4, 0x30(%rbx)
movl %edx, 0x38(%rbx)
movsd %xmm5, 0x40(%rbx)
movsd %xmm6, 0x48(%rbx)
movsd %xmm7, 0x50(%rbx)
movups %xmm9, 0x58(%rbx)
movups %xmm8, 0x68(%rbx)
callq 0xb240
leaq 0x42880(%rip), %rdi     # 0x5c430
movq %rbx, %rsi
callq 0xb1f0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: enqueue_M_USER_COMMAND(int, double, double)
void enqueue_M_USER_COMMAND (int index, double p_number, double q_number) {
    if(qc().empty()) {
        if(debug_qc) printf("immediate M_USER_COMMAND index=%d p=%f q=%f\n",
                           index,p_number,q_number);
        (*(USER_DEFINED_FUNCTION[index - 100])) (index - 100,p_number,q_number);
        return;
    }
    queued_canon q;
    q.type = QM_USER_COMMAND;
    q.data.mcommand.index    = index;
    q.data.mcommand.p_number = p_number;
    q.data.mcommand.q_number = q_number;
    if(debug_qc) printf("enqueue M_USER_COMMAND index=%d p=%f q=%f\n",
                        index,p_number,q_number);
    qc().push_back(q);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movsd %xmm1, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
movl %edi, %ebx
callq 0xb240
movq 0x4284b(%rip), %rax     # 0x5c430
cmpq 0x4284c(%rip), %rax     # 0x5c438
je 0x19c36
leaq -0x98(%rbp), %r14
movl $0x10, (%r14)
movl %ebx, 0x8(%r14)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x10(%r14)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x18(%r14)
callq 0xb240
leaq 0x4280e(%rip), %rdi     # 0x5c430
movq %r14, %rsi
callq 0xb1f0
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movslq %ebx, %rax
addl $-0x64, %ebx
movq 0x23395(%rip), %rcx     # 0x3cfd8
movq -0x320(%rcx,%rax,8), %rax
movl %ebx, %edi
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: latheorigin_z(setup_struct*, double)
static double latheorigin_z(setup_pointer settings, double z) {
    int o = settings->cutter_comp_orientation;
    double r = settings->cutter_comp_radius;
    if(settings->plane != CANON_PLANE_XZ) return z;

    if(o==2 || o==7 || o==3) z -= r;
    if(o==1 || o==5 || o==4) z += r;
    return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x3, 0xc67c(%rdi)
jne 0x1a0f1
movl 0x620(%rdi), %eax
movsd 0x618(%rdi), %xmm1
cmpl $0x7, %eax
ja 0x1a0de
movl $0x8c, %ecx
btl %eax, %ecx
jae 0x1a0de
subsd %xmm1, %xmm0
cmpl $0x5, %eax
ja 0x1a0f1
movl $0x32, %ecx
btl %eax, %ecx
jae 0x1a0f1
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_queue.cc
// Function: latheorigin_x(setup_struct*, double)
static double latheorigin_x(setup_pointer settings, double x) {
    int o = settings->cutter_comp_orientation;
    double r = settings->cutter_comp_radius;
    if(settings->plane != CANON_PLANE_XZ) return x;

    if(o==2 || o==6 || o==1) x -= r;
    if(o==3 || o==8 || o==4) x += r;
    return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x3, 0xc67c(%rdi)
jne 0x1a134
movl 0x620(%rdi), %eax
movsd 0x618(%rdi), %xmm1
cmpl $0x6, %eax
ja 0x1a121
movl $0x46, %ecx
btl %eax, %ecx
jae 0x1a121
subsd %xmm1, %xmm0
cmpl $0x8, %eax
ja 0x1a134
movl $0x118, %ecx            # imm = 0x118
btl %eax, %ecx
jae 0x1a134
addsd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_cycles.cc
// Function: Interp::convert_cycle_g82(block_struct*, int, double, double, double, double, double)
int Interp::convert_cycle_g82(block_pointer block,
                              CANON_PLANE plane, //!< selected plane                  
                              double x,  //!< x-value where cycle is executed 
                              double y,  //!< y-value where cycle is executed 
                              double clear_z,    //!< z-value of clearance plane      
                              double bottom_z,   //!< value of z at bottom of cycle   
                              double dwell)      //!< dwell time                      
{
  cycle_feed(block, plane, x, y, bottom_z);
  DWELL(dwell);
  cycle_traverse(block, plane, x, y, clear_z);

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd %xmm4, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm1, -0x20(%rbp)
movsd %xmm0, -0x18(%rbp)
movl %edx, %ebx
movq %rsi, %r14
movaps %xmm3, %xmm2
callq 0xb1a0
movsd -0x28(%rbp), %xmm0
callq 0xb040
movq %r14, %rsi
movl %ebx, %edx
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
callq 0xc270
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_cycles.cc
// Function: Interp::convert_cycle_g86(block_struct*, int, double, double, double, double, double, int)
int Interp::convert_cycle_g86(block_pointer block,
                              CANON_PLANE plane, //!< selected plane                     
                              double x,  //!< x-value where cycle is executed    
                              double y,  //!< y-value where cycle is executed    
                              double clear_z,    //!< z-value of clearance plane         
                              double bottom_z,   //!< value of z at bottom of cycle      
                              double dwell,      //!< dwell time                         
                              CANON_DIRECTION direction) //!< direction spindle turning at outset
{
  CHKS(((direction != CANON_CLOCKWISE) &&
       (direction != CANON_COUNTERCLOCKWISE)),
      NCE_SPINDLE_NOT_TURNING_IN_G86);

  cycle_feed(block, plane, x, y, bottom_z);
  DWELL(dwell);
  STOP_SPINDLE_TURNING();
  cycle_traverse(block, plane, x, y, clear_z);
  if (direction == CANON_CLOCKWISE)
    START_SPINDLE_CLOCKWISE();
  else
    START_SPINDLE_COUNTERCLOCKWISE();

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %ecx, %ebx
leal -0x4(%rbx), %eax
cmpl $-0x3, %eax
ja 0x1ae95
movq %rdi, %r12
leaq 0x17f7a(%rip), %rdi     # 0x32dc9
callq 0xb220
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x220f8(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x17f6e(%rip), %rsi     # 0x32de4
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
jmp 0x1aef3
movl %edx, %r14d
movq %rsi, %r15
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x40(%rbp)
movaps %xmm3, %xmm2
movsd %xmm4, -0x28(%rbp)
callq 0xb1a0
movsd -0x28(%rbp), %xmm0
callq 0xb040
callq 0xbca0
movq %r15, %rsi
movl %r14d, %edx
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
callq 0xc270
cmpl $0x2, %ebx
jne 0x1aeec
callq 0xbc90
jmp 0x1aef1
callq 0xc050
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_cycles.cc
// Function: Interp::convert_cycle_g88(block_struct*, int, double, double, double, double, int)
int Interp::convert_cycle_g88(block_pointer block,
                              CANON_PLANE plane, //!< selected plane                     
                              double x,  //!< x-value where cycle is executed    
                              double y,  //!< y-value where cycle is executed    
                              double bottom_z,   //!< value of z at bottom of cycle      
                              double dwell,      //!< dwell time                         
                              CANON_DIRECTION direction) //!< direction spindle turning at outset
{
  CHKS(((direction != CANON_CLOCKWISE) &&
       (direction != CANON_COUNTERCLOCKWISE)),
      NCE_SPINDLE_NOT_TURNING_IN_G88);

  cycle_feed(block, plane, x, y, bottom_z);
  DWELL(dwell);
  STOP_SPINDLE_TURNING();
  PROGRAM_STOP();               /* operator retracts the spindle here */
  if (direction == CANON_CLOCKWISE)
    START_SPINDLE_CLOCKWISE();
  else
    START_SPINDLE_COUNTERCLOCKWISE();

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
leal -0x4(%rbx), %eax
cmpl $-0x3, %eax
ja 0x1b10d
movq %rdi, %r14
leaq 0x17e36(%rip), %rdi     # 0x32efd
callq 0xb220
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x21e80(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x17e2a(%rip), %rsi     # 0x32f18
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
jmp 0x1b13e
movsd %xmm3, -0x18(%rbp)
callq 0xb1a0
movsd -0x18(%rbp), %xmm0
callq 0xb040
callq 0xbca0
callq 0xbd70
cmpl $0x2, %ebx
jne 0x1b137
callq 0xbc90
jmp 0x1b13c
callq 0xc050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_execute.cc
// Function: Interp::execute_binary1(double*, int, double*)
int Interp::execute_binary1(double *left,        //!< pointer to the left operand    
                           int operation,       //!< integer code for the operation 
                           double *right)       //!< pointer to the right operand   
{
  switch (operation) {
  case DIVIDED_BY:
    CHKS((*right == 0.0), NCE_ATTEMPT_TO_DIVIDE_BY_ZERO);
    *left = (*left / *right);
    break;
  case MODULO:                 /* always calculates a positive answer */
    *left = fmod(*left, *right);
    if (*left < 0.0) {
      *left = (*left + fabs(*right));
    }
    break;
  case POWER:
    CHKS(((*left < 0.0) && (floor(*right) != *right)),
        NCE_ATTEMPT_TO_RAISE_NEGATIVE_TO_NON_INTEGER_POWER);
    *left = pow(*left, *right);
    break;
  case TIMES:
    *left = (*left * *right);
    break;
  default:
    ERS(NCE_BUG_UNKNOWN_OPERATION);
  }
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
decl %edx
cmpl $0x3, %edx
ja 0x213f2
movq %rcx, %r15
movq %rsi, %rbx
leaq 0x12208(%rip), %rax     # 0x33540
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movsd (%r15), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x21459
jp 0x21459
leaq 0x123ef(%rip), %rdi     # 0x33750
jmp 0x213f9
movsd (%rbx), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd (%r15), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0xc450
movsd -0x20(%rbp), %xmm1
xorpd %xmm2, %xmm2
movsd -0x28(%rbp), %xmm3
ucomisd %xmm3, %xmm2
movapd %xmm3, %xmm2
jbe 0x2143f
ucomisd %xmm1, %xmm0
jne 0x213a6
jnp 0x2143f
leaq 0x123bd(%rip), %rdi     # 0x3376a
jmp 0x213f9
movsd (%rbx), %xmm0
mulsd (%r15), %xmm0
jmp 0x21448
movsd (%rbx), %xmm0
movsd (%r15), %xmm1
callq 0xbf20
movsd %xmm0, (%rbx)
xorl %eax, %eax
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x2144e
movsd (%r15), %xmm1
andpd 0xcc38(%rip), %xmm1     # 0x2e020
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
jmp 0x2144e
leaq 0x123a0(%rip), %rdi     # 0x33799
callq 0xb220
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x1bb4e(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x121e5(%rip), %rsi     # 0x33605
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
jmp 0x2144e
movapd %xmm2, %xmm0
callq 0xc4c0
movsd %xmm0, (%rbx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movsd (%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
jmp 0x2144c
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_find.cc
// Function: Interp::find_arc_length(double, double, double, double, double, int, double, double, double)
double Interp::find_arc_length(double x1,        //!< X-coordinate of start point       
                              double y1,        //!< Y-coordinate of start point       
                              double z1,        //!< Z-coordinate of start point       
                              double center_x,  //!< X-coordinate of arc center        
                              double center_y,  //!< Y-coordinate of arc center        
                              int turn, //!< no. of full or partial circles CCW
                              double x2,        //!< X-coordinate of end point         
                              double y2,        //!< Y-coordinate of end point         
                              double z2)        //!< Z-coordinate of end point         
{
  double radius;
  double theta;                 /* amount of turn of arc in radians */

  radius = hypot((center_x - x1), (center_y - y1));
  theta = find_turn(x1, y1, center_x, center_y, turn, x2, y2);
  if (z2 == z1)
    return (radius * fabs(theta));
  else
    return hypot((radius * theta), (z2 - z1));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movsd %xmm7, -0x50(%rbp)
movsd %xmm6, -0x48(%rbp)
movsd %xmm5, -0x40(%rbp)
movl %esi, %ebx
movsd %xmm4, -0x28(%rbp)
movsd %xmm3, -0x30(%rbp)
movsd %xmm2, -0x38(%rbp)
movapd %xmm1, %xmm2
movsd %xmm1, -0x18(%rbp)
movapd %xmm0, %xmm1
movsd %xmm0, -0x20(%rbp)
movapd %xmm3, %xmm0
subsd %xmm1, %xmm0
movapd %xmm4, %xmm1
subsd %xmm2, %xmm1
callq 0xb2c0
movsd %xmm0, -0x10(%rbp)
movsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
movsd -0x28(%rbp), %xmm3
movl %ebx, %esi
movsd -0x40(%rbp), %xmm4
movsd -0x48(%rbp), %xmm5
callq 0xbc80
movsd -0x38(%rbp), %xmm2
movsd -0x50(%rbp), %xmm1
ucomisd %xmm2, %xmm1
jne 0x21ae4
jp 0x21ae4
andpd 0xc550(%rip), %xmm0     # 0x2e020
movsd -0x10(%rbp), %xmm1
mulsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
movsd -0x10(%rbp), %xmm3
mulsd %xmm0, %xmm3
subsd %xmm2, %xmm1
movapd %xmm3, %xmm0
addq $0x48, %rsp
popq %rbx
popq %rbp
jmp 0xb2c0
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_find.cc
// Function: Interp::find_turn(double, double, double, double, int, double, double)
double Interp::find_turn(double x1,      //!< X-coordinate of start point       
                        double y1,      //!< Y-coordinate of start point       
                        double center_x,        //!< X-coordinate of arc center        
                        double center_y,        //!< Y-coordinate of arc center        
                        int turn,       //!< no. of full or partial circles CCW
                        double x2,      //!< X-coordinate of end point         
                        double y2)      //!< Y-coordinate of end point         
{
  double alpha;                 /* angle of first radius */
  double beta;                  /* angle of second radius */
  double theta;                 /* amount of turn of arc CCW - negative if CW */

  if (turn == 0)
    return 0.0;
  alpha = atan2((y1 - center_y), (x1 - center_x));
  beta = atan2((y2 - center_y), (x2 - center_x));
  if (turn > 0) {
    if (beta <= alpha)
      beta = (beta + (2 * M_PIl));
    theta = ((beta - alpha) + ((turn - 1) * (2 * M_PIl)));
  } else {                      /* turn < 0 */

    if (alpha <= beta)
      alpha = (alpha + (2 * M_PIl));
    theta = ((beta - alpha) + ((turn + 1) * (2 * M_PIl)));
  }
  return (theta);
}

// Assembly:
testl %esi, %esi
je 0x21bae
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x78, %rsp
movl %esi, %ebx
movapd %xmm0, %xmm6
subsd %xmm3, %xmm1
subsd %xmm2, %xmm6
movapd %xmm1, %xmm0
movapd %xmm6, %xmm1
movsd %xmm5, -0x20(%rbp)
movsd %xmm4, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd %xmm3, -0x18(%rbp)
callq 0xb110
movapd %xmm0, -0x80(%rbp)
movsd -0x20(%rbp), %xmm0
subsd -0x18(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
subsd -0x30(%rbp), %xmm1
callq 0xb110
testl %ebx, %ebx
jle 0x21bb2
movsd %xmm0, -0x50(%rbp)
fldt 0xe3d3(%rip)            # 0x2ff40
fld %st(0)
faddl -0x50(%rbp)
fstpl -0x48(%rbp)
movapd %xmm0, %xmm1
movapd -0x80(%rbp), %xmm3
cmpnlesd %xmm3, %xmm1
movapd %xmm1, %xmm2
andpd %xmm0, %xmm2
movsd -0x48(%rbp), %xmm0
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
subsd %xmm3, %xmm1
movsd %xmm1, -0x40(%rbp)
decl %ebx
movl %ebx, -0xc(%rbp)
fimull -0xc(%rbp)
faddl -0x40(%rbp)
jmp 0x21bfc
xorps %xmm0, %xmm0
retq
movapd -0x80(%rbp), %xmm3
movsd %xmm3, -0x68(%rbp)
fldt 0xe37e(%rip)            # 0x2ff40
fld %st(0)
faddl -0x68(%rbp)
fstpl -0x60(%rbp)
movapd %xmm3, %xmm1
cmpnlesd %xmm0, %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
movsd -0x60(%rbp), %xmm3
andnpd %xmm3, %xmm1
orpd %xmm2, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
incl %ebx
movl %ebx, -0x10(%rbp)
fimull -0x10(%rbp)
faddl -0x58(%rbp)
fstpl -0x38(%rbp)
movsd -0x38(%rbp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
nop