// File: /workspace/github_cpp_makefile_star2_O2/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 $0xd8, %rsp
movq %rdi, %r12
cmpb $0x0, 0x198(%rsi)
jne 0x158a8
movq %rsi, %r15
cmpb $0x1, 0x1a8(%rsi)
jne 0x15905
leaq 0x1c885(%rip), %rdi     # 0x32134
callq 0xb220
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x27698(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1b0a4(%rip), %rsi     # 0x3097a
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
addq $0xd8, %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 0x159a2
cmpb $0x1, (%r15)
jne 0x1594a
cmpl $0x0, 0x1e6cc(%rbx)
je 0x1594a
movsd 0x8(%r15), %xmm1
andpd 0x186e4(%rip), %xmm1    # 0x2e020
ucomisd 0x1a574(%rip), %xmm1    # 0x2feb8
jae 0x15d46
cmpb $0x1, 0x10(%r15)
jne 0x15976
cmpl $0x0, 0x1e6d0(%rbx)
je 0x15976
movsd 0x18(%r15), %xmm1
andpd 0x186b8(%rip), %xmm1    # 0x2e020
ucomisd 0x1a548(%rip), %xmm1    # 0x2feb8
jae 0x15f74
cmpb $0x1, 0x20(%r15)
jne 0x159a2
cmpl $0x0, 0x1e6d4(%rbx)
je 0x159a2
movsd 0x28(%r15), %xmm1
andpd 0x1868c(%rip), %xmm1    # 0x2e020
ucomisd 0x1a51c(%rip), %xmm1    # 0x2feb8
jae 0x15f8a
addsd 0x19eb6(%rip), %xmm0    # 0x2f860
cvttsd2si %xmm0, %r14d
cmpl $0x0, 0x624(%rbx)
je 0x159cd
cmpl %r14d, 0x179c(%rbx)
jne 0x159cd
leaq 0x1c78e(%rip), %rdi     # 0x32156
jmp 0x158af
leaq -0xc0(%rbp), %rax
leaq -0xc8(%rbp), %r10
leaq -0xd0(%rbp), %r11
leaq -0xd8(%rbp), %r13
leaq -0x100(%rbp), %rcx
leaq -0xf8(%rbp), %r8
leaq -0xf0(%rbp), %r9
movq %r12, %rdi
movq %rbx, %rsi
movl %r14d, %edx
pushq %rax
pushq %r10
pushq %r11
pushq %r13
leaq -0xe0(%rbp), %rax
pushq %rax
leaq -0xe8(%rbp), %rax
pushq %rax
callq 0xc7e0
addq $0x30, %rsp
cmpb $0x1, 0x229(%r15)
jne 0x15a4e
cmpl $0x14, 0x1c8(%r15)
jne 0x15c99
leaq 0x1c75e(%rip), %rsi     # 0x321a4
movq %r12, %rdi
jmp 0x158ba
imull $0x14, %r14d, %eax
movslq %eax, %r13
movsd 0xba90(%rbx,%r13,8), %xmm0
movaps %xmm0, -0xa0(%rbp)
cmpl $0x14, 0x1c8(%r15)
jne 0x15cb8
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
movsd -0xf8(%rbp), %xmm1
movsd %xmm1, -0xa8(%rbp)
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
cmpb $0x1, 0x270(%r15)
jne 0x15ab6
movsd 0x278(%r15), %xmm0
movsd %xmm0, -0x80(%rbp)
cmpb $0x1, 0x280(%r15)
jne 0x15ace
movsd 0x288(%r15), %xmm0
movsd %xmm0, -0x78(%rbp)
leaq -0xb8(%rbp), %r12
leaq -0xa8(%rbp), %rdx
movq %r12, %rsi
movaps -0xa0(%rbp), %xmm0
callq 0xc300
leaq -0x80(%rbp), %rsi
leaq -0x78(%rbp), %rdx
movaps -0xa0(%rbp), %xmm0
callq 0xc300
movsd (%r12), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0xba48(%rbx,%r13,8), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xba40
movq 0x2743b(%rip), %r12     # 0x3cf60
movl 0x1690(%r12), %eax
movsd 0x1a38b(%rip), %xmm1    # 0x2fec0
movsd %xmm1, -0x48(%rbp)
cmpl $0x3, %eax
je 0x15b47
movsd 0x1a359(%rip), %xmm1    # 0x2fea0
movsd -0x30(%rbp), %xmm2
divsd %xmm0, %xmm2
movsd 0x1a370(%rip), %xmm0    # 0x2fec8
movsd %xmm0, -0x30(%rbp)
cmpl $0x1, %eax
je 0x15b66
movapd %xmm1, %xmm0
divsd %xmm0, %xmm2
movsd -0x68(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd %xmm0, -0x80(%rbp)
movsd -0xa8(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd 0xba50(%rbx,%r13,8), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0xba40
movl 0x1690(%r12), %eax
movsd 0x1a30d(%rip), %xmm1    # 0x2fec0
cmpl $0x3, %eax
je 0x15bc0
movsd 0x1a2e0(%rip), %xmm1    # 0x2fea0
movsd -0x40(%rbp), %xmm2
divsd %xmm0, %xmm2
movsd 0x1a2f7(%rip), %xmm0    # 0x2fec8
cmpl $0x1, %eax
je 0x15bda
movapd %xmm1, %xmm0
divsd %xmm0, %xmm2
movapd %xmm0, %xmm1
movsd -0x60(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd -0x78(%rbp), %xmm0
movsd %xmm0, -0x60(%rbp)
movsd %xmm0, -0x78(%rbp)
mulsd -0x68(%rbp), %xmm1
movsd %xmm1, -0x40(%rbp)
callq 0xba40
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, 0xba48(%rbx,%r13,8)
movl 0x1690(%r12), %eax
cmpl $0x3, %eax
je 0x15c32
movsd 0x1a273(%rip), %xmm0    # 0x2fea0
movsd %xmm0, -0x48(%rbp)
cmpl $0x1, %eax
je 0x15c41
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
mulsd -0x60(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xba40
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, 0xba50(%rbx,%r13,8)
cmpl %r14d, 0x179c(%rbx)
jne 0x15e7b
leaq 0x600(%rbx), %rsi
leaq 0x608(%rbx), %rdx
movsd 0x17b8(%rbx), %xmm0
callq 0xc300
andq $0x0, 0x17b8(%rbx)
jmp 0x15e7b
movsd 0x230(%r15), %xmm0
imull $0x14, %r14d, %eax
cltq
movaps %xmm0, -0xa0(%rbp)
movsd %xmm0, 0xba90(%rbx,%rax,8)
cmpb $0x1, 0x270(%r15)
jne 0x15cfa
movsd 0x278(%r15), %xmm0
movsd %xmm0, -0x80(%rbp)
movq 0x27289(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15d5f
movb %cl, %al
leaq 0x1a29d(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm1
jmp 0x15d67
imull $0x14, %r14d, %eax
cltq
movsd 0xba48(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0xba40
movsd -0x68(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2723d(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15d90
movb %cl, %al
leaq 0x1a251(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15d98
leaq 0x1b658(%rip), %rdi     # 0x313a5
callq 0xb220
movsd 0x8(%r15), %xmm0
pushq $0x41
jmp 0x15f9e
movsd 0x1a161(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x68(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xba40
mulsd -0x30(%rbp), %xmm0
imull $0x14, %r14d, %eax
cltq
movsd %xmm0, 0xba48(%rbx,%rax,8)
jmp 0x15da6
movsd 0x1a130(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x68(%rbp)
movsd %xmm1, -0x80(%rbp)
cmpb $0x1, 0x280(%r15)
jne 0x15de8
movsd 0x288(%r15), %xmm0
movsd %xmm0, -0x78(%rbp)
movq 0x2719b(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15e34
movb %cl, %al
leaq 0x1a1af(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm1
jmp 0x15e3c
imull $0x14, %r14d, %eax
cltq
movsd 0xba50(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0xba40
movsd -0x60(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x2714f(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15e65
movb %cl, %al
leaq 0x1a163(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15e6d
movsd 0x1a08c(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x60(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xba40
mulsd -0x30(%rbp), %xmm0
imull $0x14, %r14d, %eax
cltq
movsd %xmm0, 0xba50(%rbx,%rax,8)
jmp 0x15e7b
movsd 0x1a05b(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x60(%rbp)
movsd %xmm1, -0x78(%rbp)
cmpb $0x1, 0x290(%r15)
jne 0x15f03
movsd 0x298(%r15), %xmm0
imull $0x14, %r14d, %eax
cmpl $0x14, 0x1c8(%r15)
movslq %eax, %r12
jne 0x15f4f
movsd %xmm0, -0x70(%rbp)
movsd -0xf0(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0xba58(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0xba40
movsd -0x48(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x27087(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x15fb1
movb %dl, %cl
leaq 0x1a097(%rip), %rdx     # 0x2ff90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x15fb9
imull $0x14, %r14d, %eax
cltq
movsd 0xba58(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x70(%rbp)
callq 0xba40
movsd -0x70(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x27034(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x15f5e
movb %cl, %al
leaq 0x1a048(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x15f66
movq 0x2700a(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
jmp 0x15fcf
movsd 0x19f62(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x70(%rbp)
jmp 0x16016
leaq 0x1b42a(%rip), %rdi     # 0x313a5
callq 0xb220
movsd 0x18(%r15), %xmm0
pushq $0x42
jmp 0x15f9e
leaq 0x1b414(%rip), %rdi     # 0x313a5
callq 0xb220
movsd 0x28(%r15), %xmm0
pushq $0x43
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
movb $0x1, %al
callq 0xb8e0
jmp 0x158c1
movsd 0x19f0f(%rip), %xmm0    # 0x2fec8
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 0x15fec
movb %dl, %cl
leaq 0x19fab(%rip), %rax     # 0x2ff90
movsd (%rax,%rcx,8), %xmm1
jmp 0x15ff4
movsd 0x19ed4(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x70(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
callq 0xba40
mulsd -0x30(%rbp), %xmm0
movsd %xmm0, 0xba58(%rbx,%r12,8)
cmpb $0x1, (%r15)
jne 0x16073
movsd 0x8(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x30(%rbp)
jne 0x16097
movsd -0xe8(%rbp), %xmm1
movsd %xmm1, -0x48(%rbp)
imull $0x14, %r14d, %eax
movslq %eax, %r12
movsd 0xba60(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x40(%rbp)
callq 0xc090
movsd -0x40(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x48(%rbp), %xmm1
subsd -0x30(%rbp), %xmm1
movsd %xmm1, -0x30(%rbp)
jmp 0x1609e
imull $0x14, %r14d, %eax
cltq
movsd 0xba60(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x30(%rbp)
callq 0xc090
movsd -0x30(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x160b6
imull $0x14, %r14d, %eax
movslq %eax, %r12
callq 0xc090
movsd -0x30(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xba60(%rbx,%r12,8)
cmpb $0x1, 0x10(%r15)
movsd %xmm1, -0x30(%rbp)
jne 0x16119
movsd 0x18(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x48(%rbp)
jne 0x1613d
movsd -0xe0(%rbp), %xmm1
movsd %xmm1, -0x40(%rbp)
imull $0x14, %r14d, %eax
movslq %eax, %r12
movsd 0xba68(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x38(%rbp)
callq 0xc090
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x40(%rbp), %xmm1
subsd -0x48(%rbp), %xmm1
movsd %xmm1, -0x48(%rbp)
jmp 0x16144
imull $0x14, %r14d, %eax
cltq
movsd 0xba68(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0xc090
movsd -0x48(%rbp), %xmm1
divsd %xmm0, %xmm1
jmp 0x1615c
imull $0x14, %r14d, %eax
movslq %eax, %r12
callq 0xc090
movsd -0x48(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xba68(%rbx,%r12,8)
cmpb $0x1, 0x20(%r15)
movsd %xmm1, -0x48(%rbp)
jne 0x161bf
movsd 0x28(%r15), %xmm0
cmpl $0x14, 0x1c8(%r15)
movsd %xmm0, -0x40(%rbp)
jne 0x161e8
movsd -0xd8(%rbp), %xmm1
movsd %xmm1, -0x38(%rbp)
imull $0x14, %r14d, %eax
movslq %eax, %r12
movsd 0xba70(%rbx,%r12,8), %xmm1
movsd %xmm1, -0x58(%rbp)
callq 0xc090
movsd -0x58(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x38(%rbp), %xmm1
subsd -0x40(%rbp), %xmm1
movsd %xmm1, -0x40(%rbp)
jmp 0x161ef
imull $0x14, %r14d, %eax
cltq
movsd 0xba70(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0xc090
movsd -0x40(%rbp), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
jmp 0x16203
imull $0x14, %r14d, %eax
movslq %eax, %r12
callq 0xc090
mulsd -0x40(%rbp), %xmm0
movsd %xmm0, 0xba70(%rbx,%r12,8)
cmpb $0x1, 0x244(%r15)
jne 0x16284
movsd 0x248(%r15), %xmm0
imull $0x14, %r14d, %eax
cmpl $0x14, 0x1c8(%r15)
movslq %eax, %r12
jne 0x162d0
movsd %xmm0, -0x58(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0xba78(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0xba40
movsd -0x50(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x26cff(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x162f2
movb %dl, %cl
leaq 0x19d13(%rip), %rdx     # 0x2ff90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x162fa
imull $0x14, %r14d, %eax
cltq
movsd 0xba78(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0xba40
movsd -0x58(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x26cb3(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x162df
movb %cl, %al
leaq 0x19cc7(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x162e7
movq 0x26c89(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
jmp 0x16310
movsd 0x19be1(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x58(%rbp)
jmp 0x16357
movsd 0x19bce(%rip), %xmm0    # 0x2fec8
movsd -0x58(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x38(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x1632d
movb %dl, %cl
leaq 0x19c6a(%rip), %rax     # 0x2ff90
movsd (%rax,%rcx,8), %xmm1
jmp 0x16335
movsd 0x19b93(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x58(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
callq 0xba40
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, 0xba78(%rbx,%r12,8)
cmpb $0x1, 0x250(%r15)
jne 0x163de
movsd 0x258(%r15), %xmm0
imull $0x14, %r14d, %eax
cmpl $0x14, 0x1c8(%r15)
movslq %eax, %r12
jne 0x1642a
movsd %xmm0, -0x38(%rbp)
movsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd 0xba80(%rbx,%r12,8), %xmm0
movsd %xmm0, -0x88(%rbp)
callq 0xba40
movsd -0x88(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x26ba5(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x1644c
movb %dl, %cl
leaq 0x19bb9(%rip), %rdx     # 0x2ff90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x16454
imull $0x14, %r14d, %eax
cltq
movsd 0xba80(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0xba40
movsd -0x38(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x26b59(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x16439
movb %cl, %al
leaq 0x19b6d(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x16441
movq 0x26b2f(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
jmp 0x1646a
movsd 0x19a87(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
jmp 0x164b1
movsd 0x19a74(%rip), %xmm0    # 0x2fec8
movsd -0x38(%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 0x16487
movb %dl, %cl
leaq 0x19b10(%rip), %rax     # 0x2ff90
movsd (%rax,%rcx,8), %xmm1
jmp 0x1648f
movsd 0x19a39(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x38(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
callq 0xba40
mulsd -0x50(%rbp), %xmm0
movsd %xmm0, 0xba80(%rbx,%r12,8)
cmpb $0x1, 0x260(%r15)
jne 0x1653f
movsd 0x268(%r15), %xmm0
imull $0x14, %r14d, %eax
cmpl $0x14, 0x1c8(%r15)
movslq %eax, %r15
jne 0x1658b
movsd %xmm0, -0x50(%rbp)
movsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd 0xba88(%rbx,%r15,8), %xmm0
movsd %xmm0, -0xb0(%rbp)
callq 0xba40
movsd -0xb0(%rbp), %xmm2
divsd %xmm0, %xmm2
movq 0x26a44(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x165ad
movb %dl, %cl
leaq 0x19a58(%rip), %rdx     # 0x2ff90
movsd (%rdx,%rcx,8), %xmm0
jmp 0x165b5
imull $0x14, %r14d, %eax
cltq
movsd 0xba88(%rbx,%rax,8), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0xba40
movsd -0x50(%rbp), %xmm1
divsd %xmm0, %xmm1
movq 0x269f8(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %edx
xorl %eax, %eax
cmpl $0x3, %edx
sete %cl
cmpl $0x1, %edx
je 0x1659a
movb %cl, %al
leaq 0x19a0c(%rip), %rcx     # 0x2ff90
movsd (%rcx,%rax,8), %xmm0
jmp 0x165a2
movq 0x269ce(%rip), %rax     # 0x3cf60
movl 0x1690(%rax), %eax
jmp 0x165ce
movsd 0x19926(%rip), %xmm0    # 0x2fec8
divsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rbp)
jmp 0x1661b
movsd 0x19913(%rip), %xmm0    # 0x2fec8
movsd -0x50(%rbp), %xmm1
divsd %xmm0, %xmm2
movsd -0x88(%rbp), %xmm0
addsd %xmm2, %xmm0
subsd %xmm1, %xmm0
xorl %ecx, %ecx
cmpl $0x3, %eax
sete %dl
cmpl $0x1, %eax
je 0x165eb
movb %dl, %cl
leaq 0x199ac(%rip), %rax     # 0x2ff90
movsd (%rax,%rcx,8), %xmm1
jmp 0x165f3
movsd 0x198d5(%rip), %xmm1    # 0x2fec8
movsd %xmm0, -0x50(%rbp)
mulsd %xmm0, %xmm1
movsd %xmm1, -0x88(%rbp)
callq 0xba40
mulsd -0x88(%rbp), %xmm0
movsd %xmm0, 0xba88(%rbx,%r15,8)
cmpl %r14d, 0x179c(%rbx)
jne 0x16837
leaq 0x600(%rbx), %r14
leaq 0x608(%rbx), %r15
movsd 0x17b8(%rbx), %xmm0
movq %r14, %rsi
movq %r15, %rdx
callq 0xc300
movsd 0x17a0(%rbx), %xmm10
addsd 0x600(%rbx), %xmm10
movsd 0x17a8(%rbx), %xmm11
addsd 0x608(%rbx), %xmm11
movsd 0x17b0(%rbx), %xmm12
addsd 0x610(%rbx), %xmm12
movsd 0x10(%rbx), %xmm13
movsd 0x28(%rbx), %xmm9
addsd 0x8(%rbx), %xmm13
addsd 0x20(%rbx), %xmm9
movsd 0x40(%rbx), %xmm14
addsd 0x38(%rbx), %xmm14
movsd 0x58(%rbx), %xmm15
addsd 0x50(%rbx), %xmm15
movsd 0x70(%rbx), %xmm7
addsd 0x68(%rbx), %xmm7
movsd 0x88(%rbx), %xmm8
addsd 0x80(%rbx), %xmm8
movsd -0x68(%rbp), %xmm1
movsd %xmm1, 0x17a0(%rbx)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, 0x17a8(%rbx)
movsd -0x70(%rbp), %xmm2
movsd %xmm2, 0x17b0(%rbx)
movsd -0x30(%rbp), %xmm3
movsd %xmm3, 0x10(%rbx)
movsd -0x48(%rbp), %xmm4
movsd %xmm4, 0x28(%rbx)
movsd -0x40(%rbp), %xmm5
movsd %xmm5, 0x40(%rbx)
movsd -0x58(%rbp), %xmm6
movsd %xmm6, 0x58(%rbx)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x70(%rbx)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, 0x88(%rbx)
subsd %xmm1, %xmm10
movsd %xmm10, 0x600(%rbx)
movsd -0x60(%rbp), %xmm10
subsd %xmm10, %xmm11
movsd %xmm11, 0x608(%rbx)
subsd %xmm2, %xmm12
movsd %xmm12, 0x610(%rbx)
subsd %xmm3, %xmm13
movsd %xmm13, 0x8(%rbx)
subsd %xmm4, %xmm9
movsd %xmm9, 0x20(%rbx)
subsd %xmm5, %xmm14
movsd %xmm14, 0x38(%rbx)
subsd %xmm6, %xmm15
movsd %xmm15, 0x50(%rbx)
movsd -0x38(%rbp), %xmm9
subsd %xmm9, %xmm7
movsd %xmm7, 0x68(%rbx)
subsd %xmm0, %xmm8
movsd %xmm8, 0x80(%rbx)
movapd %xmm1, %xmm8
addsd 0x118(%rbx), %xmm8
addsd 0x120(%rbx), %xmm10
movapd %xmm10, %xmm1
addsd 0x128(%rbx), %xmm2
addsd (%rbx), %xmm3
addsd 0x18(%rbx), %xmm4
addsd 0x30(%rbx), %xmm5
addsd 0x48(%rbx), %xmm6
addsd 0x60(%rbx), %xmm9
movapd %xmm9, %xmm7
addsd 0x78(%rbx), %xmm0
subq $0x10, %rsp
movsd %xmm0, (%rsp)
movapd %xmm8, %xmm0
callq 0xb550
popq %rax
popq %rcx
movaps 0x19702(%rip), %xmm0    # 0x2ff10
xorps -0xa0(%rbp), %xmm0
movq %r14, %rsi
movq %r15, %rdx
callq 0xc300
movapd -0xa0(%rbp), %xmm0
movsd %xmm0, 0x17b8(%rbx)
callq 0xbf80
jmp 0x16843
leaq 0x1b97f(%rip), %rdi     # 0x321bd
callq 0xc4d0
xorl %eax, %eax
jmp 0x158f3