// File: sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_spline(int, block_struct*, setup_struct*)
int Interp::convert_spline(int mode,
       block_pointer block,     //!< pointer to a block of RS274 instructions
       setup_pointer settings)  //!< pointer to machine settings
{
    double x1, y1, x2, y2, x3, y3;
    double end_z, AA_end, BB_end, CC_end, u_end, v_end, w_end;
    CONTROL_POINT cp;

    CHKS((settings->cutter_comp_side != OFF), _("Cannot convert spline with cutter radius compensation")); // XXX

    if (settings->feed_mode == UNITS_PER_MINUTE) {
      CHKS((settings->feed_rate == 0.0),
        NCE_CANNOT_MAKE_ARC_WITH_ZERO_FEED_RATE);
    } else if (settings->feed_mode == INVERSE_TIME) {
      CHKS((block->f_number == -1.0),
        NCE_F_WORD_MISSING_WITH_INVERSE_TIME_ARC_MOVE);
    }

    CHKS((settings->plane != CANON_PLANE_XY), _("Splines must be in the XY plane")); // XXX
       //Error (for now): Splines must be in XY plane

    CHKS((block->z_flag == ON || block->a_flag == ON || block->b_flag == ON
          || block->c_flag == ON),
          ("Splines may not have motion in Z, A, B, or C"));

    if(mode == G_5_1) {
      CHKS(block->i_flag != ON || block->j_flag != ON,
                  ("Must specify both I and J with G5.1"));
      x1 = settings->current_x + block->i_number;
      y1 = settings->current_y + block->j_number;
      CHP(find_ends(block, settings, &x2, &y2, &end_z, &AA_end, &BB_end, &CC_end,
                    &u_end, &v_end, &w_end));
      cp.W = 1;
      cp.X = settings->current_x, cp.Y = settings->current_y;
      nurbs_control_points.push_back(cp);
      cp.X = x1, cp.Y = y1;
      nurbs_control_points.push_back(cp);
      cp.X = x2, cp.Y = y2;
      nurbs_control_points.push_back(cp);
      NURBS_FEED(block->line_number, nurbs_control_points, 3);
      nurbs_control_points.clear();
      settings->current_x = x2;
      settings->current_y = y2;
    } else {
      if(block->i_flag != ON || block->j_flag != ON) {
          CHKS(block->i_flag == ON || block->j_flag == ON,
                  ("Must specify both I and J, or neither"));
          x1 = settings->current_x + settings->cycle_i;
          y1 = settings->current_y + settings->cycle_j;
      } else {
          x1 = settings->current_x + block->i_number;
          y1 = settings->current_y + block->j_number;
      }
      CHP(find_ends(block, settings, &x3, &y3, &end_z, &AA_end, &BB_end, &CC_end,
                    &u_end, &v_end, &w_end));

      CHKS(block->p_flag != ON || block->q_flag != ON,
	      ("Must specify both P and Q with G5"));
      x2 = x3 + block->p_number;
      y2 = y3 + block->q_number;

      cp.W = 1;
      cp.X = settings->current_x, cp.Y = settings->current_y;
      nurbs_control_points.push_back(cp);
      cp.X = x1, cp.Y = y1;
      nurbs_control_points.push_back(cp);
      cp.X = x2, cp.Y = y2;
      nurbs_control_points.push_back(cp);
      cp.X = x3, cp.Y = y3;
      nurbs_control_points.push_back(cp);
      NURBS_FEED(block->line_number, nurbs_control_points, 4);
      nurbs_control_points.clear();

      settings->cycle_i = -block->p_number;
      settings->cycle_j = -block->q_number;
      settings->current_x = x3;
      settings->current_y = y3;
    }
    return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, 0x624(%rax)
je 0x16c53
jmp 0x16b7d
leaq 0x627ba(%rip), %rdi     # 0x7933e
callq 0x10380
movq -0x110(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x703bf(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x703ae(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x703a0(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x6279f(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x7037a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x7036c(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x70354(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x70344(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x70337(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x70329(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x16c55
movq -0x40(%rbp), %rax
cmpl $0x0, 0x670(%rax)
jne 0x16d66
jmp 0x16c68
movq -0x40(%rbp), %rax
movsd 0x678(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x16d5f
jp 0x16d5f
jmp 0x16c89
leaq 0x62722(%rip), %rdi     # 0x793b2
callq 0x10380
movq -0x110(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x702b3(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x702a2(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x70294(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x62693(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x7026e(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x70260(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x70248(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x70238(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x7022b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x7021d(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x16d61
jmp 0x16e7b
movq -0x40(%rbp), %rax
cmpl $0x1, 0x670(%rax)
jne 0x16e79
jmp 0x16d79
movq -0x38(%rbp), %rax
movsd 0x148(%rax), %xmm0
movsd 0x61ad3(%rip), %xmm1    # 0x78860
ucomisd %xmm1, %xmm0
jne 0x16e75
jp 0x16e75
jmp 0x16d9f
leaq 0x62630(%rip), %rdi     # 0x793d6
callq 0x10380
movq -0x110(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x7019d(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x7018c(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x7017e(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x6257d(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x70158(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x7014a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x70132(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x70122(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x70115(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x70107(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x16e77
jmp 0x16e79
jmp 0x16e7b
jmp 0x16e7d
movq -0x40(%rbp), %rax
cmpl $0x1, 0xc67c(%rax)
je 0x16f66
jmp 0x16e90
leaq 0x62569(%rip), %rdi     # 0x79400
callq 0x10380
movq -0x110(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x700ac(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x7009b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x7008d(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x6248c(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x70067(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x70059(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x70041(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x70031(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x70024(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x70016(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x16f68
jmp 0x16f6a
movq -0x38(%rbp), %rax
movb 0x290(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x16fb4
movq -0x38(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x16fb4
movq -0x38(%rbp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x16fb4
movq -0x38(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x17084
jmp 0x16fb6
movq -0x110(%rbp), %rdi
leaq 0x6245c(%rip), %rsi     # 0x79420
movb $0x0, %al
callq 0x10df0
movq 0x6ff8e(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x6ff7d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6ff6f(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x6236e(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6ff49(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6ff3b(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6ff23(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6ff13(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6ff06(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fef8(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17086
cmpl $0x33, -0x2c(%rbp)
jne 0x1745c
jmp 0x17092
movq -0x38(%rbp), %rax
movb 0x198(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x170be
movq -0x38(%rbp), %rax
movb 0x1a8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x1718e
jmp 0x170c0
movq -0x110(%rbp), %rdi
leaq 0x6237f(%rip), %rsi     # 0x7944d
movb $0x0, %al
callq 0x10df0
movq 0x6fe84(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x6fe73(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6fe65(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x62264(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6fe3f(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fe31(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6fe19(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6fe09(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6fdfc(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fdee(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17190
movq -0x40(%rbp), %rax
movsd 0x600(%rax), %xmm0
movq -0x38(%rbp), %rax
addsd 0x1a0(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x40(%rbp), %rax
movsd 0x608(%rax), %xmm0
movq -0x38(%rbp), %rax
addsd 0x1b0(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x110(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x58(%rbp), %rcx
leaq -0x60(%rbp), %r8
leaq -0x78(%rbp), %r9
leaq -0x80(%rbp), %r15
leaq -0x88(%rbp), %r14
leaq -0x90(%rbp), %rbx
leaq -0x98(%rbp), %r11
leaq -0xa0(%rbp), %r10
leaq -0xa8(%rbp), %rax
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x11150
movl %eax, -0xc4(%rbp)
cmpl $0x0, -0xc4(%rbp)
je 0x17301
jmp 0x17243
movq 0x6fd16(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x172f3
movq 0x6fd02(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6fcf4(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x620f3(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6fcce(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fcc0(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6fca8(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6fc98(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6fc8b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fc7d(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0xc4(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17303
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rax
movsd 0x600(%rax), %xmm0
movsd %xmm0, -0xc0(%rbp)
movq -0x40(%rbp), %rax
movsd 0x608(%rax), %xmm0
movsd %xmm0, -0xb8(%rbp)
leaq 0x8f685(%rip), %rdi     # 0xa69c8
movq %rdi, -0x128(%rbp)
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x130(%rbp)
callq 0x100a0
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x100a0
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x100a0
movq -0x128(%rbp), %rsi
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %eax
movl %eax, -0x11c(%rbp)
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x10970
movl -0x11c(%rbp), %edi
movq -0x118(%rbp), %rsi
movl $0x3, %edx
callq 0x10690
jmp 0x173fa
leaq -0xe0(%rbp), %rdi
callq 0x123e0
leaq 0x8f5bb(%rip), %rdi     # 0xa69c8
callq 0x10b30
movsd -0x58(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x600(%rax)
movsd -0x60(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x608(%rax)
jmp 0x17a4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x123e0
jmp 0x17a63
movq -0x38(%rbp), %rax
movb 0x198(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x17488
movq -0x38(%rbp), %rax
movb 0x1a8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x175c4
jmp 0x1748a
movq -0x38(%rbp), %rax
movb 0x198(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x174b6
movq -0x38(%rbp), %rax
movb 0x1a8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x17586
jmp 0x174b8
movq -0x110(%rbp), %rdi
leaq 0x61fab(%rip), %rsi     # 0x79471
movb $0x0, %al
callq 0x10df0
movq 0x6fa8c(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x6fa7b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6fa6d(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x61e6c(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6fa47(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6fa39(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6fa21(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6fa11(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6fa04(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6f9f6(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17588
movq -0x40(%rbp), %rax
movsd 0x600(%rax), %xmm0
movq -0x40(%rbp), %rax
addsd 0x630(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x40(%rbp), %rax
movsd 0x608(%rax), %xmm0
movq -0x40(%rbp), %rax
addsd 0x638(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x175fe
movq -0x40(%rbp), %rax
movsd 0x600(%rax), %xmm0
movq -0x38(%rbp), %rax
addsd 0x1a0(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x40(%rbp), %rax
movsd 0x608(%rax), %xmm0
movq -0x38(%rbp), %rax
addsd 0x1b0(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x17600
movq -0x110(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x68(%rbp), %rcx
leaq -0x70(%rbp), %r8
leaq -0x78(%rbp), %r9
leaq -0x80(%rbp), %r15
leaq -0x88(%rbp), %r14
leaq -0x90(%rbp), %rbx
leaq -0x98(%rbp), %r11
leaq -0xa0(%rbp), %r10
leaq -0xa8(%rbp), %rax
movq %r15, (%rsp)
movq %r14, 0x8(%rsp)
movq %rbx, 0x10(%rsp)
movq %r11, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x11150
movl %eax, -0xf0(%rbp)
cmpl $0x0, -0xf0(%rbp)
je 0x17737
jmp 0x17679
movq 0x6f8e0(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x17729
movq 0x6f8cc(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6f8be(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x61cbd(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6f898(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6f88a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6f872(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6f862(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6f855(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6f847(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0xf0(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17739
jmp 0x1773b
movq -0x38(%rbp), %rax
movb 0x218(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x17767
movq -0x38(%rbp), %rax
movb 0x228(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
je 0x17837
jmp 0x17769
movq -0x110(%rbp), %rdi
leaq 0x61d20(%rip), %rsi     # 0x79497
movb $0x0, %al
callq 0x10df0
movq 0x6f7db(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x6f7ca(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x6f7bc(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x61bbb(%rip), %rsi     # 0x79374
movl $0x50, %edx
callq 0x10840
movq 0x6f796(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6f788(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x6f770(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x6f760(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x6f753(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x6f745(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x17a52
jmp 0x17839
movsd -0x68(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd 0x210(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x70(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd 0x220(%rax), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rax
movsd 0x600(%rax), %xmm0
movsd %xmm0, -0xc0(%rbp)
movq -0x40(%rbp), %rax
movsd 0x608(%rax), %xmm0
movsd %xmm0, -0xb8(%rbp)
leaq 0x8f11b(%rip), %rdi     # 0xa69c8
movq %rdi, -0x148(%rbp)
leaq -0xc0(%rbp), %rsi
movq %rsi, -0x150(%rbp)
callq 0x100a0
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x100a0
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdi
movsd -0x58(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x60(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x100a0
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rdi
movsd -0x68(%rbp), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, -0xb8(%rbp)
callq 0x100a0
movq -0x148(%rbp), %rsi
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %eax
movl %eax, -0x13c(%rbp)
leaq -0x108(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x10970
movl -0x13c(%rbp), %edi
movq -0x138(%rbp), %rsi
movl $0x4, %edx
callq 0x10690
jmp 0x17991
leaq -0x108(%rbp), %rdi
callq 0x123e0
leaq 0x8f024(%rip), %rdi     # 0xa69c8
callq 0x10b30
movq -0x38(%rbp), %rax
movsd 0x210(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x630(%rax)
movq -0x38(%rbp), %rax
movsd 0x220(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x638(%rax)
movsd -0x68(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x600(%rax)
movsd -0x70(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x608(%rax)
jmp 0x17a4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe8(%rbp)
movl %eax, -0xec(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x123e0
jmp 0x17a63
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq -0xe8(%rbp), %rdi
callq 0x11f50
nop