// File: /workspace/github_cpp_makefile_star2_O3/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_setup(block_struct*, setup_struct*)
int Interp::convert_setup(block_pointer block,   //!< pointer to a block of RS274/NGC instructions
                         setup_pointer settings)        //!< pointer to machine settings                 
{
  double x;
  double y;
  double z;
  double a;
  double b;
  double c;
  double u, v, w;
  double r;
  double *parameters;
  int p_int;

  double cx, cy, cz, ca, cb, cc, cu, cv, cw;

  CHKS((block->i_flag || block->j_flag), _("I J words not allowed with G10 L2"));

  parameters = settings->parameters;
  p_int = (int) (block->p_number + 0.0001);

  CHKS((block->l_number == 20 && block->a_flag && settings->a_axis_wrapped && 
        (block->a_number <= -360.0 || block->a_number >= 360.0)), 
       (_("Invalid absolute position %5.2f for wrapped rotary axis %c")), block->a_number, 'A');
  CHKS((block->l_number == 20 && block->b_flag && settings->b_axis_wrapped && 
        (block->b_number <= -360.0 || block->b_number >= 360.0)), 
       (_("Invalid absolute position %5.2f for wrapped rotary axis %c")), block->b_number, 'B');
  CHKS((block->l_number == 20 && block->c_flag && settings->c_axis_wrapped && 
        (block->c_number <= -360.0 || block->c_number >= 360.0)), 
       (_("Invalid absolute position %5.2f for wrapped rotary axis %c")), block->c_number, 'C');

  CHKS((settings->cutter_comp_side && p_int == settings->origin_index),
       (_("Cannot change the active coordinate system with cutter radius compensation on")));

  find_current_in_system(settings, p_int,
                         &cx, &cy, &cz,
                         &ca, &cb, &cc,
                         &cu, &cv, &cw);

  if (block->r_flag == ON) {
    CHKS((block->l_number == 20), "R not allowed in G10 L20");
    r = block->r_number;
    parameters[5210 + (p_int * 20)] = r;
  } else
    r = parameters[5210 + (p_int * 20)];

  if (block->l_number == 20) {
      // old position in rotated system
      double oldx = cx, oldy = cy;

      // find new desired position in rotated system
      x = cx;
      y = cy;

      if (block->x_flag == ON) {
          x = block->x_number;
      }      
      if (block->y_flag == ON) {
          y = block->y_number;
      }

      // move old current position into the unrotated system
      rotate(&oldx, &oldy, r);
      // move desired position into the unrotated system
      rotate(&x, &y, r);

      // find new offset
      x = oldx + USER_TO_PROGRAM_LEN(parameters[5201 + (p_int * 20)]) - x;
      y = oldy + USER_TO_PROGRAM_LEN(parameters[5202 + (p_int * 20)]) - y;

      // parameters are not rotated
      parameters[5201 + (p_int * 20)] = PROGRAM_TO_USER_LEN(x);
      parameters[5202 + (p_int * 20)] = PROGRAM_TO_USER_LEN(y);

      if (p_int == settings->origin_index) {
          // let the code below fix up the current coordinates correctly
          rotate(&settings->current_x, &settings->current_y, settings->rotation_xy);
          settings->rotation_xy = 0;
      }
  } else {
      if (block->x_flag == ON) {
          x = block->x_number;
          parameters[5201 + (p_int * 20)] = PROGRAM_TO_USER_LEN(x);
      } else {
          x = USER_TO_PROGRAM_LEN(parameters[5201 + (p_int * 20)]);
      }
      if (block->y_flag == ON) {
          y = block->y_number;
          parameters[5202 + (p_int * 20)] = PROGRAM_TO_USER_LEN(y);
      } else {
          y = USER_TO_PROGRAM_LEN(parameters[5202 + (p_int * 20)]);
      }
  }

  if (block->z_flag == ON) {
    z = block->z_number;
    if (block->l_number == 20) z = cz + USER_TO_PROGRAM_LEN(parameters[5203 + (p_int * 20)]) - z;
    parameters[5203 + (p_int * 20)] = PROGRAM_TO_USER_LEN(z);
  } else
    z = USER_TO_PROGRAM_LEN(parameters[5203 + (p_int * 20)]);

  if (block->a_flag == ON) {
    a = block->a_number;
    if (block->l_number == 20) a = ca + USER_TO_PROGRAM_ANG(parameters[5204 + (p_int * 20)]) - a;
    parameters[5204 + (p_int * 20)] = PROGRAM_TO_USER_ANG(a);
  } else
    a = USER_TO_PROGRAM_ANG(parameters[5204 + (p_int * 20)]);

  if (block->b_flag == ON) {
    b = block->b_number;
    if (block->l_number == 20) b = cb + USER_TO_PROGRAM_ANG(parameters[5205 + (p_int * 20)]) - b;
    parameters[5205 + (p_int * 20)] = PROGRAM_TO_USER_ANG(b);
  } else
    b = USER_TO_PROGRAM_ANG(parameters[5205 + (p_int * 20)]);

  if (block->c_flag == ON) {
    c = block->c_number;
    if (block->l_number == 20) c = cc + USER_TO_PROGRAM_ANG(parameters[5206 + (p_int * 20)]) - c;
    parameters[5206 + (p_int * 20)] = PROGRAM_TO_USER_ANG(c);
  } else
    c = USER_TO_PROGRAM_ANG(parameters[5206 + (p_int * 20)]);

  if (block->u_flag == ON) {
    u = block->u_number;
    if (block->l_number == 20) u = cu + USER_TO_PROGRAM_LEN(parameters[5207 + (p_int * 20)]) - u;
    parameters[5207 + (p_int * 20)] = PROGRAM_TO_USER_LEN(u);
  } else
    u = USER_TO_PROGRAM_LEN(parameters[5207 + (p_int * 20)]);

  if (block->v_flag == ON) {
    v = block->v_number;
    if (block->l_number == 20) v = cv + USER_TO_PROGRAM_LEN(parameters[5208 + (p_int * 20)]) - v;
    parameters[5208 + (p_int * 20)] = PROGRAM_TO_USER_LEN(v);
  } else
    v = USER_TO_PROGRAM_LEN(parameters[5208 + (p_int * 20)]);

  if (block->w_flag == ON) {
    w = block->w_number;
    if (block->l_number == 20) w = cw + USER_TO_PROGRAM_LEN(parameters[5209 + (p_int * 20)]) - w;
    parameters[5209 + (p_int * 20)] = PROGRAM_TO_USER_LEN(w);
  } else
    w = USER_TO_PROGRAM_LEN(parameters[5209 + (p_int * 20)]);

  if (p_int == settings->origin_index) {        /* system is currently used */

    rotate(&settings->current_x, &settings->current_y, settings->rotation_xy);
      
    settings->current_x += settings->origin_offset_x;
    settings->current_y += settings->origin_offset_y;
    settings->current_z += settings->origin_offset_z;
    settings->AA_current += settings->AA_origin_offset;
    settings->BB_current += settings->BB_origin_offset;
    settings->CC_current += settings->CC_origin_offset;
    settings->u_current += settings->u_origin_offset;
    settings->v_current += settings->v_origin_offset;
    settings->w_current += settings->w_origin_offset;

    settings->origin_offset_x = x;
    settings->origin_offset_y = y;
    settings->origin_offset_z = z;
    settings->AA_origin_offset = a;
    settings->BB_origin_offset = b;
    settings->CC_origin_offset = c;
    settings->u_origin_offset = u;
    settings->v_origin_offset = v;
    settings->w_origin_offset = w;

    settings->current_x -= x;
    settings->current_y -= y;
    settings->current_z -= z;
    settings->AA_current -= a;
    settings->BB_current -= b;
    settings->CC_current -= c;
    settings->u_current -= u;
    settings->v_current -= v;
    settings->w_current -= w;

    SET_ORIGIN_OFFSETS(x + settings->axis_offset_x,
                       y + settings->axis_offset_y,
                       z + settings->axis_offset_z,
                       a + settings->AA_axis_offset,
                       b + settings->BB_axis_offset,
                       c + settings->CC_axis_offset,
                       u + settings->u_axis_offset,
                       v + settings->v_axis_offset,
                       w + settings->w_axis_offset);

    rotate(&settings->current_x, &settings->current_y, - r);
    settings->rotation_xy = r;
    SET_XY_ROTATION(settings->rotation_xy);

  }
#ifdef DEBUG_EMC
  else
    enqueue_COMMENT("interpreter: setting coordinate system origin");
#endif
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r12
cmpb $0x0, 0x198(%rsi)
jne 0x14d9a
movq %rsi, %r15
cmpb $0x1, 0x1a8(%rsi)
jne 0x14dfc
leaq 0x21389(%rip), %rdi     # 0x3612a
callq 0xa1f0
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x2c1a6(%rip), %rbx     # 0x40f60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1fbb2(%rip), %rsi     # 0x3497a
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movsd 0x210(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
jne 0x14e99
cmpb $0x1, (%r15)
jne 0x14e41
cmpl $0x0, 0x1e6cc(%rbx)
je 0x14e41
movsd 0x8(%r15), %xmm1
andpd 0x1d1ed(%rip), %xmm1    # 0x32020
ucomisd 0x1f07d(%rip), %xmm1    # 0x33eb8
jae 0x153be
cmpb $0x1, 0x10(%r15)
jne 0x14e6d
cmpl $0x0, 0x1e6d0(%rbx)
je 0x14e6d
movsd 0x18(%r15), %xmm1
andpd 0x1d1c1(%rip), %xmm1    # 0x32020
ucomisd 0x1f051(%rip), %xmm1    # 0x33eb8
jae 0x1560d
cmpb $0x1, 0x20(%r15)
jne 0x14e99
cmpl $0x0, 0x1e6d4(%rbx)
je 0x14e99
movsd 0x28(%r15), %xmm1
andpd 0x1d195(%rip), %xmm1    # 0x32020
ucomisd 0x1f025(%rip), %xmm1    # 0x33eb8
jae 0x1562c
addsd 0x1e9bf(%rip), %xmm0    # 0x33860
cvttsd2si %xmm0, %r14d
cmpl $0x0, 0x624(%rbx)
je 0x14ec4
cmpl %r14d, 0x179c(%rbx)
jne 0x14ec4
leaq 0x2128d(%rip), %rdi     # 0x3614c
jmp 0x14da1
leaq -0xa8(%rbp), %rax
leaq -0xb0(%rbp), %r10
leaq -0xb8(%rbp), %r11
leaq -0xc0(%rbp), %r13
leaq -0xe8(%rbp), %rcx
leaq -0xe0(%rbp), %r8
leaq -0xd8(%rbp), %r9
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
pushq %rax
pushq %r10
pushq %r11
pushq %r13
leaq -0xc8(%rbp), %rax
pushq %rax
leaq -0xd0(%rbp), %rax
pushq %rax
callq 0xb670
addq $0x30, %rsp
cmpb $0x1, 0x229(%r15)
jne 0x14f45
cmpl $0x14, 0x1c8(%r15)
jne 0x15303
leaq 0x2125d(%rip), %rsi     # 0x3619a
movq %r12, %rdi
jmp 0x14dac
leal (,%r14,4), %r12d
leal (%r12,%r12,4), %eax
cltq
movsd 0xba90(%rbx,%rax,8), %xmm3
cmpl $0x14, 0x1c8(%r15)
jne 0x15322
movsd -0xe8(%rbp), %xmm1
cmpb $0x1, 0x270(%r15)
movaps %xmm1, %xmm2
jne 0x14f88
movsd 0x278(%r15), %xmm2
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x48(%rbp)
movsd -0xe0(%rbp), %xmm1
cmpb $0x1, 0x280(%r15)
movsd %xmm1, -0x38(%rbp)
jne 0x14fb2
movsd 0x288(%r15), %xmm1
movsd %xmm1, -0x68(%rbp)
movsd 0x1ef19(%rip), %xmm0    # 0x33ed8
movsd %xmm3, -0xa0(%rbp)
mulsd %xmm3, %xmm0
divsd 0x1ef0d(%rip), %xmm0    # 0x33ee0
movsd %xmm0, -0x30(%rbp)
callq 0xb550
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x58(%rbp), %xmm0
mulsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x50(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb550
movsd %xmm0, -0x80(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb550
movsd %xmm0, -0x70(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x98(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x78(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb550
movsd %xmm0, -0x90(%rbp)
leal (%r12,%r12,4), %eax
movslq %eax, %r12
movsd 0xba48(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xa990
movq 0x2bed6(%rip), %r13     # 0x40f60
movl 0x1690(%r13), %eax
movsd 0x1ee27(%rip), %xmm1    # 0x33ec0
movsd %xmm1, -0x60(%rbp)
cmpl $0x3, %eax
je 0x150ab
movsd 0x1edf5(%rip), %xmm1    # 0x33ea0
movsd -0x98(%rbp), %xmm4
mulsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm3
mulsd -0x40(%rbp), %xmm3
movsd -0x58(%rbp), %xmm2
subsd -0x88(%rbp), %xmm2
movsd -0x30(%rbp), %xmm5
divsd %xmm0, %xmm5
movsd 0x1ede8(%rip), %xmm0    # 0x33ec8
movsd %xmm0, -0x30(%rbp)
cmpl $0x1, %eax
je 0x150ee
movapd %xmm1, %xmm0
divsd %xmm0, %xmm5
addsd %xmm5, %xmm2
movsd %xmm2, -0x58(%rbp)
movsd -0x38(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x48(%rbp), %xmm0
mulsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x48(%rbp)
subsd %xmm4, %xmm3
movsd %xmm3, -0x70(%rbp)
movsd 0xba50(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0xa990
movl 0x1690(%r13), %eax
movsd 0x1ed7b(%rip), %xmm1    # 0x33ec0
cmpl $0x3, %eax
je 0x15152
movsd 0x1ed4e(%rip), %xmm1    # 0x33ea0
movsd -0x68(%rbp), %xmm5
mulsd -0x90(%rbp), %xmm5
movsd -0x40(%rbp), %xmm4
mulsd -0x78(%rbp), %xmm4
movsd -0x48(%rbp), %xmm3
addsd -0x38(%rbp), %xmm3
movsd -0x58(%rbp), %xmm2
subsd -0x70(%rbp), %xmm2
movsd -0x50(%rbp), %xmm6
divsd %xmm0, %xmm6
movsd 0x1ed3a(%rip), %xmm0    # 0x33ec8
cmpl $0x1, %eax
je 0x15197
movapd %xmm1, %xmm0
addsd %xmm5, %xmm4
movsd %xmm4, -0x40(%rbp)
divsd %xmm0, %xmm6
addsd %xmm6, %xmm3
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x58(%rbp)
mulsd %xmm2, %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0xa990
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, 0xba48(%rbx,%r12,8)
movl 0x1690(%r13), %eax
cmpl $0x3, %eax
je 0x151e8
movsd 0x1ecbd(%rip), %xmm0    # 0x33ea0
movsd %xmm0, -0x60(%rbp)
movsd -0x48(%rbp), %xmm0
subsd -0x40(%rbp), %xmm0
cmpl $0x1, %eax
je 0x15201
movsd -0x60(%rbp), %xmm1
movsd %xmm1, -0x30(%rbp)
movsd %xmm0, -0x48(%rbp)
movsd -0x30(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xa990
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, 0xba50(%rbx,%r12,8)
cmpl %r14d, 0x179c(%rbx)
jne 0x15502
movsd 0x17b8(%rbx), %xmm0
mulsd 0x1ec93(%rip), %xmm0    # 0x33ed8
divsd 0x1ec93(%rip), %xmm0    # 0x33ee0
movsd %xmm0, -0x30(%rbp)
movsd 0x600(%rbx), %xmm1
movsd %xmm1, -0x38(%rbp)
callq 0xb550
movsd %xmm0, -0x40(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
mulsd -0x70(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x38(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movsd 0x600(%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x70(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb550
mulsd -0x68(%rbp), %xmm0
movsd -0x70(%rbp), %xmm1
mulsd -0x38(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x600(%rbx)
movsd %xmm1, 0x608(%rbx)
movq $0x0, 0x17b8(%rbx)
jmp 0x15502
movsd 0x230(%r15), %xmm3
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd %xmm3, 0xba90(%rbx,%rax,8)
cmpb $0x1, 0x270(%r15)
movsd %xmm3, -0xa0(%rbp)
jne 0x1536b
movsd 0x278(%r15), %xmm1
movq 0x2bc1c(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x153e0
movb %cl, %al
leaq 0x1ec2c(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x153e8
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba48(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0xa990
movsd -0x58(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2bbc5(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15418
movb %cl, %al
leaq 0x1ebd9(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15420
leaq 0x1ffe0(%rip), %rdi     # 0x353a5
callq 0xa1f0
movsd 0x8(%r15), %xmm0
movq %r12, %rdi
movq %rax, %rsi
movl $0x41, %edx
jmp 0x15649
movsd 0x1eae0(%rip), %xmm0    # 0x33ec8
movsd %xmm1, -0x58(%rbp)
mulsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0xa990
mulsd -0x48(%rbp), %xmm0
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd %xmm0, 0xba48(%rbx,%rax,8)
jmp 0x15429
movsd 0x1eaa8(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x58(%rbp)
cmpb $0x1, 0x280(%r15)
jne 0x15466
movsd 0x288(%r15), %xmm0
movq 0x2bb1d(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x154b9
movb %cl, %al
leaq 0x1eb31(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm1
jmp 0x154c1
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba50(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0xa990
movsd -0x48(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2baca(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x154f1
movb %cl, %al
leaq 0x1eade(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x154f9
movsd 0x1ea07(%rip), %xmm1    # 0x33ec8
movsd %xmm0, -0x48(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xa990
mulsd -0x30(%rbp), %xmm0
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd %xmm0, 0xba50(%rbx,%rax,8)
jmp 0x15502
movsd 0x1e9cf(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x48(%rbp)
cmpb $0x1, 0x290(%r15)
jne 0x15595
movsd 0x298(%r15), %xmm0
leal (,%r14,4), %eax
cmpl $0x14, 0x1c8(%r15)
leal (%rax,%rax,4), %eax
movslq %eax, %r12
jne 0x155e8
movsd %xmm0, -0x70(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0xba58(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0xa990
movsd -0x40(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x2b9f5(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15655
movb %dl, %cl
leaq 0x1ea05(%rip), %rdx     # 0x33f90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x1565d
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba58(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x70(%rbp)
callq 0xa990
movsd -0x70(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2b99b(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x155f7
movb %cl, %al
leaq 0x1e9af(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x155ff
movq 0x2b971(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
jmp 0x15673
movsd 0x1e8c9(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x70(%rbp)
jmp 0x156ba
leaq 0x1fd91(%rip), %rdi     # 0x353a5
callq 0xa1f0
movsd 0x18(%r15), %xmm0
movq %r12, %rdi
movq %rax, %rsi
movl $0x42, %edx
jmp 0x15649
leaq 0x1fd72(%rip), %rdi     # 0x353a5
callq 0xa1f0
movsd 0x28(%r15), %xmm0
movq %r12, %rdi
movq %rax, %rsi
movl $0x43, %edx
movb $0x1, %al
callq 0xa850
jmp 0x14db3
movsd 0x1e86b(%rip), %xmm0    # 0x33ec8
movsd -0x70(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x30(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15690
movb %dl, %cl
leaq 0x1e907(%rip), %rax     # 0x33f90
movsd (%rax,%rcx,8), %xmm1
jmp 0x15698
movsd 0x1e830(%rip), %xmm1    # 0x33ec8
movsd %xmm0, -0x70(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xa990
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, 0xba58(%rbx,%r12,8)
cmpb $0x1, (%r15)
jne 0x1571e
movsd 0x8(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x30(%rbp)
jne 0x15749
movsd -0xd0(%rbp), %xmm1
movsd %xmm1, -0x40(%rbp)
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
movsd 0xba60(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x38(%rbp)
callq 0xaf60
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x40(%rbp), %xmm1
subsd -0x30(%rbp), %xmm1
movsd %xmm1, -0x30(%rbp)
jmp 0x15757
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba60(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xaf60
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x1576f
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
callq 0xaf60
movsd -0x30(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xba60(%rbx,%r12,8)
cmpb $0x1, 0x10(%r15)
movsd %xmm1, -0x30(%rbp)
jne 0x157d9
movsd 0x18(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x40(%rbp)
jne 0x15804
movsd -0xc8(%rbp), %xmm1
movsd %xmm1, -0x38(%rbp)
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
movsd 0xba68(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x68(%rbp)
callq 0xaf60
movsd -0x68(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x38(%rbp), %xmm1
subsd -0x40(%rbp), %xmm1
movsd %xmm1, -0x40(%rbp)
jmp 0x15812
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba68(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0xaf60
movsd -0x40(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x1582a
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
callq 0xaf60
movsd -0x40(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xba68(%rbx,%r12,8)
cmpb $0x1, 0x20(%r15)
movsd %xmm1, -0x40(%rbp)
jne 0x15894
movsd 0x28(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x38(%rbp)
jne 0x158c4
movsd -0xc0(%rbp), %xmm1
movsd %xmm1, -0x68(%rbp)
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
movsd 0xba70(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x60(%rbp)
callq 0xaf60
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x68(%rbp), %xmm1
subsd -0x38(%rbp), %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x158d2
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba70(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0xaf60
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x158e6
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
movslq %eax, %r12
callq 0xaf60
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, 0xba70(%rbx,%r12,8)
cmpb $0x1, 0x244(%r15)
jne 0x15976
movsd 0x248(%r15), %xmm0
leal (,%r14,4), %eax
cmpl $0x14, 0x1c8(%r15)
leal (%rax,%rax,4), %eax
movslq %eax, %r12
jne 0x159c9
movsd %xmm0, -0x68(%rbp)
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd 0xba78(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0xa990
movsd -0x50(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x2b611(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x159eb
movb %dl, %cl
leaq 0x1e621(%rip), %rdx     # 0x33f90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x159f3
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba78(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0xa990
movsd -0x68(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2b5ba(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x159d8
movb %cl, %al
leaq 0x1e5ce(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x159e0
movq 0x2b590(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
jmp 0x15a09
movsd 0x1e4e8(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x68(%rbp)
jmp 0x15a50
movsd 0x1e4d5(%rip), %xmm0    # 0x33ec8
movsd -0x68(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x60(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15a26
movb %dl, %cl
leaq 0x1e571(%rip), %rax     # 0x33f90
movsd (%rax,%rcx,8), %xmm1
jmp 0x15a2e
movsd 0x1e49a(%rip), %xmm1    # 0x33ec8
movsd %xmm0, -0x68(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x60(%rbp)
callq 0xa990
mulsd -0x60(%rbp), %xmm0
movsd %xmm0, 0xba78(%rbx,%r12,8)
cmpb $0x1, 0x250(%r15)
jne 0x15ae0
movsd 0x258(%r15), %xmm0
leal (,%r14,4), %eax
cmpl $0x14, 0x1c8(%r15)
leal (%rax,%rax,4), %eax
movslq %eax, %r12
jne 0x15b33
movsd %xmm0, -0x60(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd 0xba80(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0xa990
movsd -0x78(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x2b4a7(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15b55
movb %dl, %cl
leaq 0x1e4b7(%rip), %rdx     # 0x33f90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x15b5d
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba80(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0xa990
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2b450(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15b42
movb %cl, %al
leaq 0x1e464(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15b4a
movq 0x2b426(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
jmp 0x15b73
movsd 0x1e37e(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x60(%rbp)
jmp 0x15bba
movsd 0x1e36b(%rip), %xmm0    # 0x33ec8
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x50(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15b90
movb %dl, %cl
leaq 0x1e407(%rip), %rax     # 0x33f90
movsd (%rax,%rcx,8), %xmm1
jmp 0x15b98
movsd 0x1e330(%rip), %xmm1    # 0x33ec8
movsd %xmm0, -0x60(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
callq 0xa990
mulsd -0x50(%rbp), %xmm0
movsd %xmm0, 0xba80(%rbx,%r12,8)
cmpb $0x1, 0x260(%r15)
jne 0x15c4a
movsd 0x268(%r15), %xmm0
leal (,%r14,4), %eax
cmpl $0x14, 0x1c8(%r15)
leal (%rax,%rax,4), %eax
movslq %eax, %r15
jne 0x15c9d
movsd %xmm0, -0x50(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd 0xba88(%rbx,%r15,8), %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0xa990
movsd -0x80(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x2b33d(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15cbf
movb %dl, %cl
leaq 0x1e34d(%rip), %rdx     # 0x33f90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x15cc7
leal (,%r14,4), %eax
leal (%rax,%rax,4), %eax
cltq
movsd 0xba88(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0xa990
movsd -0x50(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2b2e6(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15cac
movb %cl, %al
leaq 0x1e2fa(%rip), %rcx     # 0x33f90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15cb4
movq 0x2b2bc(%rip), %rax     # 0x40f60
movl 0x1690(%rax), %eax
jmp 0x15cdd
movsd 0x1e214(%rip), %xmm0    # 0x33ec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
jmp 0x15d24
movsd 0x1e201(%rip), %xmm0    # 0x33ec8
movsd -0x50(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x78(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15cfa
movb %dl, %cl
leaq 0x1e29d(%rip), %rax     # 0x33f90
movsd (%rax,%rcx,8), %xmm1
jmp 0x15d02
movsd 0x1e1c6(%rip), %xmm1    # 0x33ec8
movsd %xmm0, -0x50(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x78(%rbp)
callq 0xa990
mulsd -0x78(%rbp), %xmm0
movsd %xmm0, 0xba88(%rbx,%r15,8)
cmpl %r14d, 0x179c(%rbx)
jne 0x16086
movsd 0x17b8(%rbx), %xmm0
mulsd 0x1e197(%rip), %xmm0    # 0x33ed8
divsd 0x1e197(%rip), %xmm0    # 0x33ee0
movsd %xmm0, -0x80(%rbp)
movsd 0x600(%rbx), %xmm1
movsd %xmm1, -0x78(%rbp)
callq 0xb550
movsd %xmm0, -0x90(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
callq 0xa1d0
mulsd -0x88(%rbp), %xmm0
movsd -0x90(%rbp), %xmm1
mulsd -0x78(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x90(%rbp)
movsd 0x600(%rbx), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x80(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x78(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x80(%rbp), %xmm0
callq 0xb550
mulsd -0x98(%rbp), %xmm0
movsd -0x78(%rbp), %xmm1
mulsd -0x88(%rbp), %xmm1
movsd -0x90(%rbp), %xmm15
addsd 0x17a0(%rbx), %xmm15
addsd %xmm0, %xmm1
addsd 0x17a8(%rbx), %xmm1
movsd %xmm1, -0x78(%rbp)
movsd 0x17b0(%rbx), %xmm8
addsd 0x610(%rbx), %xmm8
movsd 0x10(%rbx), %xmm9
movsd 0x28(%rbx), %xmm14
addsd 0x8(%rbx), %xmm9
addsd 0x20(%rbx), %xmm14
movsd 0x40(%rbx), %xmm10
addsd 0x38(%rbx), %xmm10
movsd 0x58(%rbx), %xmm11
addsd 0x50(%rbx), %xmm11
movsd 0x70(%rbx), %xmm12
addsd 0x68(%rbx), %xmm12
movsd 0x88(%rbx), %xmm13
addsd 0x80(%rbx), %xmm13
movsd -0x58(%rbp), %xmm0
movsd %xmm0, 0x17a0(%rbx)
movsd %xmm0, -0x58(%rbp)
movsd -0x48(%rbp), %xmm1
movsd %xmm1, 0x17a8(%rbx)
movsd -0x70(%rbp), %xmm2
movsd %xmm2, 0x17b0(%rbx)
movsd -0x30(%rbp), %xmm3
movsd %xmm3, 0x10(%rbx)
movsd -0x40(%rbp), %xmm4
movsd %xmm4, 0x28(%rbx)
movsd -0x38(%rbp), %xmm5
movsd %xmm5, 0x40(%rbx)
movsd -0x68(%rbp), %xmm6
movsd %xmm6, 0x58(%rbx)
movsd -0x60(%rbp), %xmm7
movsd %xmm7, 0x70(%rbx)
movsd -0x50(%rbp), %xmm1
movsd %xmm1, 0x88(%rbx)
subsd %xmm0, %xmm15
movsd %xmm15, 0x600(%rbx)
movsd -0x48(%rbp), %xmm15
movsd -0x78(%rbp), %xmm0
subsd %xmm15, %xmm0
movsd %xmm0, 0x608(%rbx)
subsd %xmm2, %xmm8
movsd %xmm8, 0x610(%rbx)
subsd %xmm3, %xmm9
movsd %xmm9, 0x8(%rbx)
subsd %xmm4, %xmm14
movsd %xmm14, 0x20(%rbx)
subsd %xmm5, %xmm10
movsd %xmm10, 0x38(%rbx)
subsd %xmm6, %xmm11
movsd %xmm11, 0x50(%rbx)
subsd %xmm7, %xmm12
movsd %xmm12, 0x68(%rbx)
subsd %xmm1, %xmm13
movsd %xmm13, 0x80(%rbx)
movsd -0x58(%rbp), %xmm8
addsd 0x118(%rbx), %xmm8
addsd 0x120(%rbx), %xmm15
addsd 0x128(%rbx), %xmm2
addsd (%rbx), %xmm3
addsd 0x18(%rbx), %xmm4
addsd 0x30(%rbx), %xmm5
addsd 0x48(%rbx), %xmm6
addsd 0x60(%rbx), %xmm7
addsd 0x78(%rbx), %xmm1
subq $0x10, %rsp
movsd %xmm1, (%rsp)
movapd %xmm8, %xmm0
movapd %xmm15, %xmm1
callq 0xa510
addq $0x10, %rsp
movsd 0x1df37(%rip), %xmm0    # 0x33ef0
mulsd -0xa0(%rbp), %xmm0
divsd 0x1df17(%rip), %xmm0    # 0x33ee0
movsd %xmm0, -0x58(%rbp)
movsd 0x600(%rbx), %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xb550
movsd %xmm0, -0x48(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x58(%rbp), %xmm0
callq 0xa1d0
mulsd -0x40(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
mulsd -0x30(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x48(%rbp)
movsd 0x600(%rbx), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x58(%rbp), %xmm0
callq 0xa1d0
movsd %xmm0, -0x40(%rbp)
movsd 0x608(%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x58(%rbp), %xmm0
callq 0xb550
mulsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
mulsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x600(%rbx)
movsd %xmm1, 0x608(%rbx)
movsd -0xa0(%rbp), %xmm0
movsd %xmm0, 0x17b8(%rbx)
callq 0xae60
jmp 0x16092
leaq 0x20126(%rip), %rdi     # 0x361b3
callq 0xb370
xorl %eax, %eax
jmp 0x14dea
nop