// File: sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_straight(int, block_struct*, setup_struct*)
int Interp::convert_straight(int move,   //!< either G_0 or G_1                       
                            block_pointer block,        //!< pointer to a block of RS274 instructions
                            setup_pointer settings)     //!< pointer to machine settings             
{
  double end_x;
  double end_y;
  double end_z;
  double AA_end;
  double BB_end;
  double CC_end;
  double u_end, v_end, w_end;
  int status;

  settings->arc_not_allowed = OFF;

  if (move == G_1) {
    if (settings->feed_mode == UNITS_PER_MINUTE) {
      CHKS((settings->feed_rate == 0.0), NCE_CANNOT_DO_G1_WITH_ZERO_FEED_RATE);
    } else if (settings->feed_mode == UNITS_PER_REVOLUTION) {
      CHKS((settings->feed_rate == 0.0), NCE_CANNOT_DO_G1_WITH_ZERO_FEED_RATE);
      CHKS((settings->speed == 0.0), "Cannot feed with zero spindle speed in feed per rev mode");
    } else if (settings->feed_mode == INVERSE_TIME) {
      CHKS((block->f_number == -1.0),
          NCE_F_WORD_MISSING_WITH_INVERSE_TIME_G1_MOVE);
    }
  }

  settings->motion_mode = move;
  CHP(find_ends(block, settings, &end_x, &end_y, &end_z,
                &AA_end, &BB_end, &CC_end, &u_end, &v_end, &w_end));

  if (move == G_1) {
      inverse_time_rate_straight(end_x, end_y, end_z,
                                 AA_end, BB_end, CC_end,
                                 u_end, v_end, w_end,
                                 block, settings);
  }

  if ((settings->cutter_comp_side != OFF) &&    /* ! "== ON" */
      (settings->cutter_comp_radius > 0.0)) {   /* radius always is >= 0 */

    CHKS((block->g_modes[0] == G_53),
        NCE_CANNOT_USE_G53_WITH_CUTTER_RADIUS_COMP);

    if(settings->plane == CANON_PLANE_XZ) {
        if (settings->cutter_comp_firstmove == ON)
            status = convert_straight_comp1(move, block, settings, end_z, end_x, end_y,
                                            AA_end, BB_end, CC_end, u_end, v_end, w_end);
        else
            status = convert_straight_comp2(move, block, settings, end_z, end_x, end_y,
                                            AA_end, BB_end, CC_end, u_end, v_end, w_end);
    } else if(settings->plane == CANON_PLANE_XY) {
        if (settings->cutter_comp_firstmove == ON)
            status = convert_straight_comp1(move, block, settings, end_x, end_y, end_z,
                                            AA_end, BB_end, CC_end, u_end, v_end, w_end);
        else
            status = convert_straight_comp2(move, block, settings, end_x, end_y, end_z,
                                            AA_end, BB_end, CC_end, u_end, v_end, w_end);
    } else ERS("BUG: Invalid plane for cutter compensation");
    CHP(status);
  } else if (move == G_0) {
    STRAIGHT_TRAVERSE(block->line_number, end_x, end_y, end_z,
                      AA_end, BB_end, CC_end,
                      u_end, v_end, w_end);
    settings->current_x = end_x;
    settings->current_y = end_y;
    settings->current_z = end_z;
  } else if (move == G_1) {
    STRAIGHT_FEED(block->line_number, end_x, end_y, end_z,
                  AA_end, BB_end, CC_end,
                  u_end, v_end, w_end);
    settings->current_x = end_x;
    settings->current_y = end_y;
    settings->current_z = end_z;
  } else if (move == G_33) {
    CHKS(((settings->spindle_turning != CANON_CLOCKWISE) &&
           (settings->spindle_turning != CANON_COUNTERCLOCKWISE)),
          "Spindle not turning in G33");
    START_SPEED_FEED_SYNCH(block->k_number, 0);
    STRAIGHT_FEED(block->line_number, end_x, end_y, end_z, AA_end, BB_end, CC_end, u_end, v_end, w_end);
    STOP_SPEED_FEED_SYNCH();
    settings->current_x = end_x;
    settings->current_y = end_y;
    settings->current_z = end_z;
  } else if (move == G_33_1) {
    CHKS(((settings->spindle_turning != CANON_CLOCKWISE) &&
           (settings->spindle_turning != CANON_COUNTERCLOCKWISE)),
          "Spindle not turning in G33.1");
    START_SPEED_FEED_SYNCH(block->k_number, 0);
    RIGID_TAP(block->line_number, end_x, end_y, end_z);
    STOP_SPEED_FEED_SYNCH();
    // after the RIGID_TAP cycle we'll be in the same spot
  } else if (move == G_76) {
    CHKS((settings->AA_current != AA_end || 
         settings->BB_current != BB_end || 
         settings->CC_current != CC_end ||
         settings->u_current != u_end ||
         settings->v_current != v_end ||
         settings->w_current != w_end), NCE_CANNOT_MOVE_ROTARY_AXES_WITH_G76);
    int result = convert_threading_cycle(block, settings, end_x, end_y, end_z);
    if(result != INTERP_OK) return result;
  } else
    ERS(NCE_BUG_CODE_NOT_G0_OR_G1);

  settings->AA_current = AA_end;
  settings->BB_current = BB_end;
  settings->CC_current = CC_end;
  settings->u_current = u_end;
  settings->v_current = v_end;
  settings->w_current = w_end;
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x40(%rbp), %rax
movb $0x0, 0x110(%rax)
cmpl $0xa, -0x2c(%rbp)
jne 0x2da8d
movq -0x40(%rbp), %rax
cmpl $0x0, 0x670(%rax)
jne 0x2d770
jmp 0x2d672
movq -0x40(%rbp), %rax
movsd 0x678(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2d769
jp 0x2d769
jmp 0x2d693
leaq 0x4d85b(%rip), %rdi     # 0x7aef5
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x598a9(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x59898(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x5988a(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d82b(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x59864(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59856(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x5983e(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x5982e(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x59821(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59813(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2d76b
jmp 0x2da8b
movq -0x40(%rbp), %rax
cmpl $0x2, 0x670(%rax)
jne 0x2d974
jmp 0x2d783
movq -0x40(%rbp), %rax
movsd 0x678(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2d87a
jp 0x2d87a
jmp 0x2d7a4
leaq 0x4d74a(%rip), %rdi     # 0x7aef5
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x59798(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x59787(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x59779(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d71a(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x59753(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59745(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x5972d(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x5971d(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x59710(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59702(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2d87c
jmp 0x2d87e
movq -0x40(%rbp), %rax
movsd 0xc6b8(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2d96d
jp 0x2d96d
jmp 0x2d89f
movq -0xa0(%rbp), %rdi
leaq 0x4bcdb(%rip), %rsi     # 0x79588
movb $0x0, %al
callq 0x10df0
movq 0x596a5(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x59694(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x59686(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d627(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x59660(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59652(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x5963a(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x5962a(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x5961d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x5960f(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2d96f
jmp 0x2da89
movq -0x40(%rbp), %rax
cmpl $0x1, 0x670(%rax)
jne 0x2da87
jmp 0x2d987
movq -0x38(%rbp), %rax
movsd 0x148(%rax), %xmm0
movsd 0x4aec5(%rip), %xmm1    # 0x78860
ucomisd %xmm1, %xmm0
jne 0x2da83
jp 0x2da83
jmp 0x2d9ad
leaq 0x4d5a2(%rip), %rdi     # 0x7af56
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x5958f(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x5957e(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x59570(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d511(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x5954a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x5953c(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x59524(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x59514(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x59507(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x594f9(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2da85
jmp 0x2da87
jmp 0x2da89
jmp 0x2da8b
jmp 0x2da8d
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x1798(%rax)
movq -0xa0(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x48(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0x58(%rbp), %r9
leaq -0x60(%rbp), %r15
leaq -0x68(%rbp), %r14
leaq -0x70(%rbp), %rbx
leaq -0x78(%rbp), %r11
leaq -0x80(%rbp), %r10
leaq -0x88(%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, -0x90(%rbp)
cmpl $0x0, -0x90(%rbp)
je 0x2dbc5
jmp 0x2db07
movq 0x59452(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x2dbb7
movq 0x5943e(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x59430(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d3d1(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x5940a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x593fc(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x593e4(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x593d4(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x593c7(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x593b9(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x90(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2dbc7
cmpl $0xa, -0x2c(%rbp)
jne 0x2dc18
movq -0xa0(%rbp), %rdi
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movsd %xmm8, (%rsp)
callq 0x10e10
movq -0x40(%rbp), %rax
cmpl $0x0, 0x624(%rax)
je 0x2e08e
movq -0x40(%rbp), %rax
movsd 0x618(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x2e08e
jmp 0x2dc44
movq -0x38(%rbp), %rax
cmpl $0x212, 0x150(%rax)     # imm = 0x212
jne 0x2dd30
jmp 0x2dc5a
leaq 0x4d31e(%rip), %rdi     # 0x7af7f
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x592e2(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x592d1(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x592c3(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4d264(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x5929d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x5928f(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x59277(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x59267(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x5925a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x5924c(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2dd32
movq -0x40(%rbp), %rax
cmpl $0x3, 0xc67c(%rax)
jne 0x2de06
movq -0x40(%rbp), %rax
movb 0xc689(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2ddad
movq -0xa0(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movsd -0x58(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10d20
movl %eax, -0x8c(%rbp)
jmp 0x2de01
movq -0xa0(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movsd -0x58(%rbp), %xmm0
movsd -0x48(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10930
movl %eax, -0x8c(%rbp)
jmp 0x2dfac
movq -0x40(%rbp), %rax
cmpl $0x1, 0xc67c(%rax)
jne 0x2deda
movq -0x40(%rbp), %rax
movb 0xc689(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x2de81
movq -0xa0(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10d20
movl %eax, -0x8c(%rbp)
jmp 0x2ded5
movq -0xa0(%rbp), %rdi
movl -0x2c(%rbp), %esi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10930
movl %eax, -0x8c(%rbp)
jmp 0x2dfaa
jmp 0x2dedc
movq -0xa0(%rbp), %rdi
leaq 0x4d0bc(%rip), %rsi     # 0x7afa6
movb $0x0, %al
callq 0x10df0
movq 0x59068(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x59057(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x59049(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4cfea(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x59023(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x59015(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x58ffd(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x58fed(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x58fe0(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58fd2(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2dfac
jmp 0x2dfae
movl -0x8c(%rbp), %eax
movl %eax, -0x94(%rbp)
cmpl $0x0, -0x94(%rbp)
je 0x2e087
jmp 0x2dfc9
movq 0x58f90(%rip), %rax     # 0x86f60
cmpl $0x31, 0xd670(%rax)
jge 0x2e079
movq 0x58f7c(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x58f6e(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4cf0f(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x58f48(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58f3a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x58f22(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x58f12(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x58f05(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58ef7(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl -0x94(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e089
jmp 0x2e6f1
cmpl $0x0, -0x2c(%rbp)
jne 0x2e112
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %edi
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10ef0
movsd -0x48(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x600(%rax)
movsd -0x50(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x608(%rax)
movsd -0x58(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x610(%rax)
jmp 0x2e6ef
cmpl $0xa, -0x2c(%rbp)
jne 0x2e196
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %edi
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10ac0
movsd -0x48(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x600(%rax)
movsd -0x50(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x608(%rax)
movsd -0x58(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x610(%rax)
jmp 0x2e6ed
cmpl $0x14a, -0x2c(%rbp)     # imm = 0x14A
jne 0x2e32f
jmp 0x2e1a5
movq -0x40(%rbp), %rax
cmpl $0x2, 0xc6cc(%rax)
je 0x2e297
movq -0x40(%rbp), %rax
cmpl $0x3, 0xc6cc(%rax)
je 0x2e297
jmp 0x2e1c9
movq -0xa0(%rbp), %rdi
leaq 0x4cdfa(%rip), %rsi     # 0x7afd1
movb $0x0, %al
callq 0x10df0
movq 0x58d7b(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x58d6a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x58d5c(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4ccfd(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x58d36(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58d28(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x58d10(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x58d00(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x58cf3(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58ce5(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e299
movq -0x38(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
xorl %edi, %edi
callq 0x11880
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %edi
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
movsd -0x60(%rbp), %xmm3
movsd -0x68(%rbp), %xmm4
movsd -0x70(%rbp), %xmm5
movsd -0x78(%rbp), %xmm6
movsd -0x80(%rbp), %xmm7
movsd -0x88(%rbp), %xmm8
movsd %xmm8, (%rsp)
callq 0x10ac0
callq 0x10980
movsd -0x48(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x600(%rax)
movsd -0x50(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x608(%rax)
movsd -0x58(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x610(%rax)
jmp 0x2e6eb
cmpl $0x14b, -0x2c(%rbp)     # imm = 0x14B
jne 0x2e46d
jmp 0x2e33e
movq -0x40(%rbp), %rax
cmpl $0x2, 0xc6cc(%rax)
je 0x2e430
movq -0x40(%rbp), %rax
cmpl $0x3, 0xc6cc(%rax)
je 0x2e430
jmp 0x2e362
movq -0xa0(%rbp), %rdi
leaq 0x4cc7c(%rip), %rsi     # 0x7afec
movb $0x0, %al
callq 0x10df0
movq 0x58be2(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x58bd1(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x58bc3(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4cb64(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x58b9d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58b8f(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x58b77(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x58b67(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x58b5a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58b4c(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e432
movq -0x38(%rbp), %rax
movsd 0x1c0(%rax), %xmm0
xorl %edi, %edi
callq 0x11880
movq -0x38(%rbp), %rax
movl 0x1d0(%rax), %edi
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
callq 0x111e0
callq 0x10980
jmp 0x2e6e9
cmpl $0x2f8, -0x2c(%rbp)     # imm = 0x2F8
jne 0x2e612
jmp 0x2e47c
movq -0x40(%rbp), %rax
movsd 0x8(%rax), %xmm0
ucomisd -0x60(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
movq -0x40(%rbp), %rax
movsd 0x20(%rax), %xmm0
ucomisd -0x68(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
movq -0x40(%rbp), %rax
movsd 0x38(%rax), %xmm0
ucomisd -0x70(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
movq -0x40(%rbp), %rax
movsd 0x50(%rax), %xmm0
ucomisd -0x78(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
movq -0x40(%rbp), %rax
movsd 0x68(%rax), %xmm0
ucomisd -0x80(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
movq -0x40(%rbp), %rax
movsd 0x80(%rax), %xmm0
ucomisd -0x88(%rbp), %xmm0
jne 0x2e4f3
jp 0x2e4f3
jmp 0x2e5cb
jmp 0x2e4f5
leaq 0x4cb0d(%rip), %rdi     # 0x7b009
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x58a47(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x58a36(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x58a28(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4c9c9(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x58a02(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x589f4(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x589dc(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x589cc(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x589bf(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x589b1(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e5cd
movq -0xa0(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movsd -0x48(%rbp), %xmm0
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm2
callq 0x11d20
movl %eax, -0x98(%rbp)
cmpl $0x0, -0x98(%rbp)
je 0x2e60d
movl -0x98(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e6e7
jmp 0x2e614
leaq 0x4ca0f(%rip), %rdi     # 0x7b02a
callq 0x10380
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x58928(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x58917(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x58909(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x4c8aa(%rip), %rsi     # 0x7af16
movl $0x50, %edx
callq 0x10840
movq 0x588e3(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x588d5(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x588bd(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x588ad(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x588a0(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x58892(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x1c(%rbp)
jmp 0x2e752
jmp 0x2e6e9
jmp 0x2e6eb
jmp 0x2e6ed
jmp 0x2e6ef
jmp 0x2e6f1
movsd -0x60(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x68(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x20(%rax)
movsd -0x70(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movsd -0x78(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x50(%rax)
movsd -0x80(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x68(%rax)
movsd -0x88(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x80(%rax)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)