// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_cycles.cc
// Function: Interp::convert_cycle_vw(int, block_struct*, setup_struct*)
int Interp::convert_cycle_vw(int motion, //!< a g-code between G_81 and G_89, a canned cycle
                            block_pointer block,        //!< pointer to a block of RS274/NGC instructions  
                            setup_pointer settings)     //!< pointer to machine settings                   
{
  double aa;
  double aa_increment=0.;
  double bb;
  double bb_increment=0.;
  double cc;
  double clear_cc;
  double i;
  double j;
  double k;
  double old_cc;
  double radius_increment = 0.;
  double theta_increment = 0.;
  CANON_PLANE plane;
  double r;
  int repeat;
  CANON_MOTION_MODE save_mode;
  double save_tolerance; //save the current tolerance, to restore it lateron

  plane = CANON_PLANE_VW;
  if (settings->motion_mode != motion) {
    CHKS((block->x_flag == OFF),
        _readers[(int)'u']? NCE_U_VALUE_UNSPECIFIED_IN_VW_PLANE_CANNED_CYCLE: _("G19.1 canned cycle is not possible on a machine without U axis"));
  }
  block->u_number =
    block->u_flag == ON ? block->u_number : settings->cycle_cc;
  old_cc = settings->u_current;

  if (settings->distance_mode == MODE_ABSOLUTE) {
    aa_increment = 0.0;
    bb_increment = 0.0;
    r = block->r_number;
    cc = block->u_number;
    aa = block->v_flag == ON ? block->v_number : settings->v_current;
    bb = block->w_flag == ON ? block->w_number : settings->w_current;
  } else if (settings->distance_mode == MODE_INCREMENTAL) {
    if (block->v_flag == ON) aa_increment = block->v_number;
    if (block->w_flag == ON) bb_increment = block->w_number;
    r = (block->r_number + old_cc);
    cc = (r + block->u_number); /* [NCMS, page 98] */
    aa = settings->v_current;
    bb = settings->w_current;
  } else
    ERS(NCE_BUG_DISTANCE_MODE_NOT_G90_OR_G91);
  CHKS((r < cc), NCE_R_LESS_THAN_U_IN_CYCLE_IN_VW_PLANE);

  if (old_cc < r) {
    STRAIGHT_TRAVERSE(block->line_number, settings->current_x, settings->current_y, settings->current_z,
                      settings->AA_current, settings->BB_current, settings->CC_current,
                      r, settings->v_current, settings->w_current);
    old_cc = r;
  }
  clear_cc = (settings->retract_mode == R_PLANE) ? r : old_cc;

  save_mode = GET_EXTERNAL_MOTION_CONTROL_MODE();
  save_tolerance = GET_EXTERNAL_MOTION_CONTROL_TOLERANCE();
  if (save_mode != CANON_EXACT_PATH)
    SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH, 0);

  switch (motion) {
  case G_81:
    CYCLE_MACRO(convert_cycle_g81(block, CANON_PLANE_VW, aa, bb, clear_cc, cc))
      break;
  case G_82:
    CHKS(((settings->motion_mode != G_82) && (block->p_number == -1.0)),
        NCE_DWELL_TIME_P_WORD_MISSING_WITH_G82);
    block->p_number =
      block->p_number == -1.0 ? settings->cycle_p : block->p_number;
    CYCLE_MACRO(convert_cycle_g82(block, CANON_PLANE_VW, aa, bb, clear_cc, cc,
                                  block->p_number))
      settings->cycle_p = block->p_number;
    break;
  case G_83:
    CHKS(((settings->motion_mode != G_83) && (block->q_number == -1.0)),
        NCE_Q_WORD_MISSING_WITH_G83);
    block->q_number =
      block->q_number == -1.0 ? settings->cycle_q : block->q_number;
    CYCLE_MACRO(convert_cycle_g83(block, CANON_PLANE_VW, aa, bb, r, clear_cc, cc,
                                  block->q_number))
      settings->cycle_q = block->q_number;
    break;
  case G_73:
    CHKS(((settings->motion_mode != G_73) && (block->q_number == -1.0)),
        NCE_Q_WORD_MISSING_WITH_G73);
    block->q_number =
      block->q_number == -1.0 ? settings->cycle_q : block->q_number;
    CYCLE_MACRO(convert_cycle_g73(block, CANON_PLANE_VW, aa, bb, r, clear_cc, cc,
                                  block->q_number))
      settings->cycle_q = block->q_number;
    break;
  case G_84:
    CYCLE_MACRO(convert_cycle_g84(block, CANON_PLANE_VW, aa, bb, clear_cc, cc,
                                  settings->spindle_turning,
                                  settings->speed_feed_mode)) break;
  case G_85:
    CYCLE_MACRO(convert_cycle_g85(block, CANON_PLANE_VW, aa, bb, clear_cc, cc))
      break;
  case G_86:
    CHKS(((settings->motion_mode != G_86) && (block->p_number == -1.0)),
        NCE_DWELL_TIME_P_WORD_MISSING_WITH_G86);
    block->p_number =
      block->p_number == -1.0 ? settings->cycle_p : block->p_number;
    CYCLE_MACRO(convert_cycle_g86(block, CANON_PLANE_VW, aa, bb, clear_cc, cc,
                                  block->p_number,
                                  settings->spindle_turning)) settings->
      cycle_p = block->p_number;
    break;
  case G_87:
    if (settings->motion_mode != G_87) {
      CHKS((block->i_flag == OFF), NCE_I_WORD_MISSING_WITH_G87);
      CHKS((block->j_flag == OFF), NCE_J_WORD_MISSING_WITH_G87);
      CHKS((block->k_flag == OFF), NCE_K_WORD_MISSING_WITH_G87);
    }
    i = block->i_flag == ON ? block->i_number : settings->cycle_i;
    j = block->j_flag == ON ? block->j_number : settings->cycle_j;
    k = block->k_flag == ON ? block->k_number : settings->cycle_k;
    settings->cycle_i = i;
    settings->cycle_j = j;
    settings->cycle_k = k;
    if (settings->distance_mode == MODE_INCREMENTAL) {
      i = (cc + i);             /* i always absolute in function call below */
    }
    CYCLE_MACRO(convert_cycle_g87(block, CANON_PLANE_VW, aa, (aa + j), bb,
                                  (bb + k), r, clear_cc, i, cc,
                                  settings->spindle_turning)) break;
  case G_88:
    CHKS(((settings->motion_mode != G_88) && (block->p_number == -1.0)),
        NCE_DWELL_TIME_P_WORD_MISSING_WITH_G88);
    block->p_number =
      block->p_number == -1.0 ? settings->cycle_p : block->p_number;
    CYCLE_MACRO(convert_cycle_g88(block, CANON_PLANE_VW, aa, bb, cc,
                                  block->p_number,
                                  settings->spindle_turning)) settings->
      cycle_p = block->p_number;
    break;
  case G_89:
    CHKS(((settings->motion_mode != G_89) && (block->p_number == -1.0)),
        NCE_DWELL_TIME_P_WORD_MISSING_WITH_G89);
    block->p_number =
      block->p_number == -1.0 ? settings->cycle_p : block->p_number;
    CYCLE_MACRO(convert_cycle_g89(block, CANON_PLANE_VW, aa, bb, clear_cc, cc,
                                  block->p_number))
      settings->cycle_p = block->p_number;
    break;
  default:
    ERS(NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);
  }
  settings->v_current = aa;     /* CYCLE_MACRO updates aa and bb */
  settings->w_current = bb;
  settings->u_current = clear_cc;
  settings->cycle_cc = block->u_number;

  if (save_mode != CANON_EXACT_PATH)
    SET_MOTION_CONTROL_MODE(save_mode, save_tolerance);

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r13d
movq %rdi, %r12
cmpl %esi, 0x1798(%rcx)
je 0x233f2
cmpb $0x0, 0x270(%r14)
je 0x237eb
leaq 0x248(%r14), %r15
cmpb $0x0, 0x244(%r14)
leaq 0x628(%rbx), %rax
cmovneq %r15, %rax
movsd (%rax), %xmm2
movsd %xmm2, 0x248(%r14)
movsd 0x50(%rbx), %xmm3
movl 0x668(%rbx), %eax
cmpl $0x1, %eax
je 0x2347b
testl %eax, %eax
jne 0x237e2
movsd 0x230(%r14), %xmm1
leaq 0x258(%r14), %rcx
leaq 0x68(%rbx), %rax
cmpb $0x0, 0x250(%r14)
cmovneq %rcx, %rax
leaq 0x268(%r14), %rdx
leaq 0x80(%rbx), %rcx
cmpb $0x0, 0x260(%r14)
cmovneq %rdx, %rcx
xorpd %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
movsd %xmm0, -0x78(%rbp)
jmp 0x234d5
xorpd %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
cmpb $0x1, 0x250(%r14)
movsd %xmm0, -0x78(%rbp)
jne 0x234a1
movsd 0x258(%r14), %xmm0
movsd %xmm0, -0x78(%rbp)
cmpb $0x1, 0x260(%r14)
jne 0x234b9
movsd 0x268(%r14), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd 0x230(%r14), %xmm1
addsd %xmm3, %xmm1
addsd %xmm1, %xmm2
leaq 0x68(%rbx), %rax
leaq 0x80(%rbx), %rcx
ucomisd %xmm1, %xmm2
jbe 0x234e7
leaq 0x16f26(%rip), %rdi     # 0x3a408
jmp 0x23806
movsd %xmm2, -0x70(%rbp)
movsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd (%rcx), %xmm0
movsd %xmm0, -0x30(%rbp)
ucomisd %xmm3, %xmm1
movsd %xmm1, -0x60(%rbp)
jbe 0x2355c
movl 0x1d0(%r14), %edi
movsd 0x600(%rbx), %xmm0
movsd 0x608(%rbx), %xmm1
movsd 0x610(%rbx), %xmm2
movsd 0x8(%rbx), %xmm3
movsd 0x20(%rbx), %xmm4
movsd 0x38(%rbx), %xmm5
movsd 0x68(%rbx), %xmm7
movsd 0x80(%rbx), %xmm6
movsd %xmm6, (%rsp)
movsd -0x60(%rbp), %xmm6
callq 0xa8d0
movsd -0x60(%rbp), %xmm1
movapd %xmm1, %xmm3
movq %r12, -0x68(%rbp)
cmpl $0x0, 0xc6a8(%rbx)
movsd %xmm1, -0x58(%rbp)
je 0x23573
movsd %xmm3, -0x58(%rbp)
movsd %xmm3, -0x48(%rbp)
callq 0xa1e0
movl %eax, %r12d
callq 0xb5b0
movsd %xmm0, -0xb0(%rbp)
cmpl $0x2, %r12d
je 0x235a1
xorpd %xmm0, %xmm0
movl $0x2, %edi
callq 0xa0d0
cmpl $0x351, %r13d           # imm = 0x351
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
movsd -0x48(%rbp), %xmm6
jg 0x2386f
cmpl $0x333, %r13d           # imm = 0x333
jle 0x238dc
cmpl $0x334, %r13d           # imm = 0x334
je 0x23cd8
cmpl $0x33e, %r13d           # imm = 0x33E
je 0x23f87
cmpl $0x348, %r13d           # imm = 0x348
jne 0x23ff3
movl %r12d, -0x4c(%rbp)
movq %r15, -0x88(%rbp)
movl 0x1c8(%r14), %r15d
testl %r15d, %r15d
jle 0x24a5a
incl %r15d
movq 0x20949(%rip), %r13     # 0x43f60
leaq 0xc6d0(%r13), %rax
movq %rax, -0x70(%rbp)
movq %rbx, -0xa8(%rbp)
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x23695
jnp 0x236dd
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movl 0xc6cc(%rbx), %r12d
xorl %ebx, %ebx
cmpl $0x2, %r12d
je 0x23740
leaq 0x16637(%rip), %rdi     # 0x39d2a
callq 0xa1f0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movl $0x0, 0xd670(%r13)
movl $0x50, %edx
movq -0x70(%rbp), %rdi
leaq 0x1662e(%rip), %rsi     # 0x39d4f
callq 0xa8a0
movw $0x0, 0xc71f(%r13)
movl $0x1, 0xd670(%r13)
movl $0x5, %ebx
cmpl $0x2, %r12d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
je 0x237ba
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x237b7
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x16404(%rip), %rsi     # 0x39b81
callq 0xa8a0
movsd -0x30(%rbp), %xmm8
movsd -0x38(%rbp), %xmm7
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
movl %ebx, -0x3c(%rbp)
cmpl $0x2, %r12d
jne 0x24aa6
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r15d
movq -0xa8(%rbp), %rbx
jge 0x23629
jmp 0x24a5a
leaq 0x168d8(%rip), %rdi     # 0x3a0c1
jmp 0x23806
cmpq $0x0, 0x758(%r12)
leaq 0x16bce(%rip), %rax     # 0x3a3c9
leaq 0x16b9a(%rip), %rdi     # 0x3a39c
cmoveq %rax, %rdi
callq 0xa1f0
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x20741(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0x1634a(%rip), %rsi     # 0x39b81
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %r14d
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x365, %r13d           # imm = 0x365
jle 0x23aa3
cmpl $0x366, %r13d           # imm = 0x366
je 0x23d11
cmpl $0x370, %r13d           # imm = 0x370
je 0x23fbd
cmpl $0x37a, %r13d           # imm = 0x37A
jne 0x23ff3
cmpl $0x37a, 0x1798(%rbx)    # imm = 0x37A
je 0x2451d
movsd 0x210(%r14), %xmm0
ucomisd 0x12fac(%rip), %xmm0    # 0x36870
jne 0x2451d
jp 0x2451d
leaq 0x1695d(%rip), %rdi     # 0x3a234
jmp 0x23ffa
cmpl $0x2da, %r13d           # imm = 0x2DA
je 0x23af2
cmpl $0x32a, %r13d           # imm = 0x32A
jne 0x23ff3
movl %r12d, -0x4c(%rbp)
movq %r15, -0x88(%rbp)
movl 0x1c8(%r14), %r15d
testl %r15d, %r15d
jle 0x24a5a
incl %r15d
movq 0x20645(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x2398d
jnp 0x239db
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x70(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa6d0
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x58(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x1, %r15d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jg 0x2391b
jmp 0x24a5a
cmpl $0x352, %r13d           # imm = 0x352
je 0x23b2b
cmpl $0x35c, %r13d           # imm = 0x35C
jne 0x23ff3
cmpl $0x35c, 0x1798(%rbx)    # imm = 0x35C
je 0x24008
movsd 0x210(%r14), %xmm0
ucomisd 0x12d96(%rip), %xmm0    # 0x36870
jne 0x24008
jp 0x24008
leaq 0x166b9(%rip), %rdi     # 0x3a1a6
jmp 0x23ffa
cmpl $0x2da, 0x1798(%rbx)    # imm = 0x2DA
je 0x241df
movsd 0x220(%r14), %xmm0
ucomisd 0x12d5d(%rip), %xmm0    # 0x36870
jne 0x241df
jp 0x241df
leaq 0x16650(%rip), %rdi     # 0x3a176
jmp 0x23ffa
movl %r12d, -0x4c(%rbp)
movq %r15, -0x88(%rbp)
movl 0x1c8(%r14), %r15d
testl %r15d, %r15d
jle 0x24a5a
incl %r15d
movq 0x20410(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x23bc2
jnp 0x23c10
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x70(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa6d0
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x58(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa6d0
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x1, %r15d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jg 0x23b50
jmp 0x24a5a
cmpl $0x334, 0x1798(%rbx)    # imm = 0x334
je 0x243ba
movsd 0x210(%r14), %xmm0
ucomisd 0x12b77(%rip), %xmm0    # 0x36870
jne 0x243ba
jp 0x243ba
leaq 0x16447(%rip), %rdi     # 0x3a153
jmp 0x23ffa
cmpl $0x366, 0x1798(%rbx)    # imm = 0x366
jne 0x24aaf
leaq 0x1a0(%r14), %rax
leaq 0x630(%rbx), %rcx
cmpb $0x0, 0x198(%r14)
cmovneq %rax, %rcx
movsd (%rcx), %xmm0
leaq 0x1b0(%r14), %rax
cmpb $0x0, 0x1a8(%r14)
leaq 0x638(%rbx), %rcx
cmovneq %rax, %rcx
movsd (%rcx), %xmm1
leaq 0x1c0(%r14), %rax
leaq 0x640(%rbx), %rcx
cmpb $0x0, 0x1b8(%r14)
cmovneq %rax, %rcx
movsd (%rcx), %xmm2
movsd %xmm0, 0x630(%rbx)
movsd %xmm1, -0x90(%rbp)
movsd %xmm1, 0x638(%rbx)
movsd %xmm2, -0xa0(%rbp)
movsd %xmm2, 0x640(%rbx)
cmpl $0x1, 0x668(%rbx)
movq %r15, -0x88(%rbp)
jne 0x23db8
addsd -0x70(%rbp), %xmm0
movl %r12d, -0x4c(%rbp)
movl 0x1c8(%r14), %r13d
testl %r13d, %r13d
jle 0x24a5a
movsd %xmm0, -0x98(%rbp)
incl %r13d
movq 0x20182(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm4
movsd -0x48(%rbp), %xmm0
ucomisd %xmm4, %xmm0
jne 0x23e50
jnp 0x23ea8
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x60(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd -0x60(%rbp), %xmm4
movsd -0x90(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm1
movsd -0xa0(%rbp), %xmm3
movsd -0x30(%rbp), %xmm2
addsd %xmm2, %xmm3
movl 0xc6cc(%rbx), %ecx
movq -0x68(%rbp), %rdi
movq %r14, %rsi
movl $0x5, %edx
movsd -0x58(%rbp), %xmm5
movsd -0x98(%rbp), %xmm6
movsd -0x70(%rbp), %xmm7
callq 0xaac0
movl %eax, %r15d
testl %eax, %eax
je 0x23f5c
movslq 0xd670(%r12), %rax
cmpq $0x30, %rax
jg 0x23f58
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x15c5a(%rip), %rsi     # 0x39b81
callq 0xa8a0
movslq 0xd670(%r12), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r12,%rcx)
incl %eax
movl %eax, 0xd670(%r12)
movb %dl, 0xc720(%r12,%rcx)
movl %r15d, -0x3c(%rbp)
testl %r15d, %r15d
jne 0x24aa6
decl %r13d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r13d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jge 0x23dde
jmp 0x24a5a
cmpl $0x33e, 0x1798(%rbx)    # imm = 0x33E
je 0x24680
movsd 0x220(%r14), %xmm0
ucomisd 0x128c8(%rip), %xmm0    # 0x36870
jne 0x24680
jp 0x24680
leaq 0x161d3(%rip), %rdi     # 0x3a18e
jmp 0x23ffa
cmpl $0x370, 0x1798(%rbx)    # imm = 0x370
je 0x24876
movsd 0x210(%r14), %xmm0
ucomisd 0x12892(%rip), %xmm0    # 0x36870
jne 0x24876
jp 0x24876
leaq 0x16220(%rip), %rdi     # 0x3a211
jmp 0x23ffa
leaq 0x1625d(%rip), %rdi     # 0x3a257
callq 0xa1f0
movq -0x68(%rbp), %rdi
jmp 0x2380e
movl %r12d, -0x4c(%rbp)
movsd 0x210(%r14), %xmm0
ucomisd 0x12853(%rip), %xmm0    # 0x36870
jne 0x24029
jp 0x24029
movsd 0x650(%rbx), %xmm0
movq %r15, -0x88(%rbp)
leaq 0x210(%r14), %r13
movsd %xmm0, 0x210(%r14)
movl 0x1c8(%r14), %r12d
movl $0x650, %eax            # imm = 0x650
testl %r12d, %r12d
jle 0x24a4f
movq %r13, -0x90(%rbp)
incl %r12d
movq 0x1fefa(%rip), %r13     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x240d2
jnp 0x2411a
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd 0x210(%r14), %xmm4
movl 0xc6cc(%rbx), %ecx
movq -0x68(%rbp), %rdi
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x70(%rbp), %xmm3
callq 0xb620
movl %eax, %r15d
testl %eax, %eax
je 0x241b4
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x241b0
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x15a00(%rip), %rsi     # 0x39b81
callq 0xa8a0
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
movl %r15d, -0x3c(%rbp)
testl %r15d, %r15d
jne 0x24aa6
decl %r12d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r12d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jge 0x24066
jmp 0x24a43
movl %r12d, -0x4c(%rbp)
movsd 0x220(%r14), %xmm0
ucomisd 0x1267c(%rip), %xmm0    # 0x36870
jne 0x24200
jp 0x24200
movsd 0x658(%rbx), %xmm0
movq %r15, -0x88(%rbp)
leaq 0x220(%r14), %r13
movsd %xmm0, 0x220(%r14)
movl 0x1c8(%r14), %r12d
movl $0x658, %eax            # imm = 0x658
testl %r12d, %r12d
jle 0x24a4f
movq %r13, -0x90(%rbp)
incl %r12d
movq 0x1fd23(%rip), %r13     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm2
movsd -0x48(%rbp), %xmm0
ucomisd %xmm2, %xmm0
jne 0x242a9
jnp 0x242fb
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x60(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd -0x60(%rbp), %xmm2
movsd 0x220(%r14), %xmm5
movq -0x68(%rbp), %rdi
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x58(%rbp), %xmm3
movsd -0x70(%rbp), %xmm4
callq 0xb350
movl %eax, %r15d
testl %eax, %eax
je 0x2438f
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x2438b
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x15825(%rip), %rsi     # 0x39b81
callq 0xa8a0
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
movl %r15d, -0x3c(%rbp)
testl %r15d, %r15d
jne 0x24aa6
decl %r12d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r12d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jge 0x2423d
jmp 0x24865
movq %r15, -0x88(%rbp)
movsd 0x210(%r14), %xmm0
ucomisd 0x1249e(%rip), %xmm0    # 0x36870
jne 0x243de
jp 0x243de
movsd 0x650(%rbx), %xmm0
movl %r12d, -0x4c(%rbp)
leaq 0x210(%r14), %r13
movsd %xmm0, 0x210(%r14)
movl 0x1c8(%r14), %r15d
movl $0x650, %eax            # imm = 0x650
testl %r15d, %r15d
jle 0x24a4f
incl %r15d
movq 0x1fb4f(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x24483
jnp 0x244d1
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd 0x210(%r14), %xmm4
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x70(%rbp), %xmm3
callq 0xa2b0
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x1, %r15d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jg 0x24411
jmp 0x24a4a
movq %r15, -0x88(%rbp)
movsd 0x210(%r14), %xmm0
ucomisd 0x1233b(%rip), %xmm0    # 0x36870
jne 0x24541
jp 0x24541
movsd 0x650(%rbx), %xmm0
movl %r12d, -0x4c(%rbp)
leaq 0x210(%r14), %r13
movsd %xmm0, 0x210(%r14)
movl 0x1c8(%r14), %r15d
movl $0x650, %eax            # imm = 0x650
testl %r15d, %r15d
jle 0x24a4f
incl %r15d
movq 0x1f9ec(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x245e6
jnp 0x24634
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd 0x210(%r14), %xmm4
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x70(%rbp), %xmm3
callq 0xb500
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x1, %r15d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jg 0x24574
jmp 0x24a4a
movq %r15, -0x88(%rbp)
movsd 0x220(%r14), %xmm0
ucomisd 0x121d8(%rip), %xmm0    # 0x36870
jne 0x246a4
jp 0x246a4
movsd 0x658(%rbx), %xmm0
movl %r12d, -0x4c(%rbp)
leaq 0x220(%r14), %r13
movsd %xmm0, 0x220(%r14)
movl 0x1c8(%r14), %r15d
movl $0x658, %eax            # imm = 0x658
testl %r15d, %r15d
jle 0x24a4f
movq %r13, -0x90(%rbp)
incl %r15d
movq 0x1f882(%rip), %r12     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm2
movsd -0x48(%rbp), %xmm0
ucomisd %xmm2, %xmm0
jne 0x24750
jnp 0x247a8
movl 0x1d0(%r14), %edi
movsd 0x600(%r12), %xmm0
movsd 0x608(%r12), %xmm1
movsd 0x610(%r12), %xmm2
movsd 0x8(%r12), %xmm3
movsd 0x20(%r12), %xmm4
movsd 0x38(%r12), %xmm5
movsd -0x30(%rbp), %xmm6
movsd %xmm6, (%rsp)
movsd -0x60(%rbp), %xmm6
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd -0x60(%rbp), %xmm2
movsd 0x220(%r14), %xmm5
movq -0x68(%rbp), %rdi
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x58(%rbp), %xmm3
movsd -0x70(%rbp), %xmm4
callq 0xb220
movl %eax, %r13d
testl %eax, %eax
je 0x2483f
movslq 0xd670(%r12), %rax
cmpq $0x30, %rax
jg 0x2483b
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x15377(%rip), %rsi     # 0x39b81
callq 0xa8a0
movslq 0xd670(%r12), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r12,%rcx)
incl %eax
movl %eax, 0xd670(%r12)
movb %dl, 0xc720(%r12,%rcx)
movl %r13d, -0x3c(%rbp)
testl %r13d, %r13d
jne 0x24aa6
decl %r15d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r15d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jge 0x246de
movq -0x90(%rbp), %r13
movl $0x658, %eax            # imm = 0x658
jmp 0x24a4f
movl %r12d, -0x4c(%rbp)
movsd 0x210(%r14), %xmm0
ucomisd 0x11fe5(%rip), %xmm0    # 0x36870
jne 0x24897
jp 0x24897
movsd 0x650(%rbx), %xmm0
movq %r15, -0x88(%rbp)
leaq 0x210(%r14), %r13
movsd %xmm0, 0x210(%r14)
movl 0x1c8(%r14), %r12d
movl $0x650, %eax            # imm = 0x650
testl %r12d, %r12d
jle 0x24a4f
movq %r13, -0x90(%rbp)
incl %r12d
movq 0x1f68c(%rip), %r13     # 0x43f60
movsd %xmm6, -0x48(%rbp)
addsd -0x78(%rbp), %xmm7
addsd -0x80(%rbp), %xmm8
movsd %xmm8, -0x30(%rbp)
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd %xmm8, (%rsp)
movsd %xmm7, -0x38(%rbp)
callq 0xa8d0
movsd -0x60(%rbp), %xmm6
movsd -0x48(%rbp), %xmm0
ucomisd %xmm6, %xmm0
jne 0x24940
jnp 0x24988
movl 0x1d0(%r14), %edi
movsd 0x600(%r13), %xmm0
movsd 0x608(%r13), %xmm1
movsd 0x610(%r13), %xmm2
movsd 0x8(%r13), %xmm3
movsd 0x20(%r13), %xmm4
movsd 0x38(%r13), %xmm5
movsd -0x30(%rbp), %xmm7
movsd %xmm7, (%rsp)
movsd -0x38(%rbp), %xmm7
callq 0xa8d0
movsd 0x210(%r14), %xmm3
movl 0xc6cc(%rbx), %ecx
movq -0x68(%rbp), %rdi
movq %r14, %rsi
movl $0x5, %edx
movsd -0x38(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x70(%rbp), %xmm2
callq 0xae90
movl %eax, %r15d
testl %eax, %eax
je 0x24a1d
movslq 0xd670(%r13), %rax
cmpq $0x30, %rax
jg 0x24a19
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x15197(%rip), %rsi     # 0x39b81
callq 0xa8a0
movslq 0xd670(%r13), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r13,%rcx)
incl %eax
movl %eax, 0xd670(%r13)
movb %dl, 0xc720(%r13,%rcx)
movl %r15d, -0x3c(%rbp)
testl %r15d, %r15d
jne 0x24aa6
decl %r12d
movsd -0x58(%rbp), %xmm6
cmpl $0x2, %r12d
movsd -0x38(%rbp), %xmm7
movsd -0x30(%rbp), %xmm8
jge 0x248d4
movq -0x90(%rbp), %r13
movl $0x650, %eax            # imm = 0x650
movsd (%r13), %xmm0
movsd %xmm0, (%rbx,%rax)
xorl %r14d, %r14d
movsd %xmm7, 0x68(%rbx)
movsd %xmm8, 0x80(%rbx)
movsd -0x58(%rbp), %xmm0
movsd %xmm0, 0x50(%rbx)
movq -0x88(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x628(%rbx)
movl -0x4c(%rbp), %edi
cmpl $0x2, %edi
je 0x2385a
movsd -0xb0(%rbp), %xmm0
callq 0xa0d0
jmp 0x2385a
movl -0x3c(%rbp), %r14d
jmp 0x2385a
cmpb $0x0, 0x198(%r14)
je 0x24add
cmpb $0x0, 0x1a8(%r14)
je 0x24ae9
cmpb $0x0, 0x1b8(%r14)
jne 0x23d21
leaq 0x15721(%rip), %rdi     # 0x3a1f9
jmp 0x23ffa
leaq 0x156e5(%rip), %rdi     # 0x3a1c9
jmp 0x23ffa
leaq 0x156f1(%rip), %rdi     # 0x3a1e1
jmp 0x23ffa
nop