// File: sundale[P]gcode/rs274ngc/interp_internal.cc
// Function: Interp::enhance_block(block_struct*, setup_struct*)
int Interp::enhance_block(block_pointer block,   //!< pointer to a block to be checked 
                         setup_pointer settings)        //!< pointer to machine settings      
{
  int axis_flag;
  int ijk_flag;
  int polar_flag;
  int mode_zero_covets_axes;
  int mode0;
  int mode1;

  if(block->radius_flag || block->theta_flag) {
      // someday, tediously add polar support for other planes here:
      CHKS((!_readers[(int)'x'] || !_readers[(int)'y']), _("Cannot use polar coordinate on a machine lacking X or Y axes"));
      CHKS(((settings->plane != CANON_PLANE_XY)), _("Cannot use polar coordinate except in G17 plane"));
      CHKS(((block->x_flag)), _("Cannot specify both polar coordinate and X word"));
      CHKS(((block->y_flag)), _("Cannot specify both polar coordinate and Y word"));
  }

  axis_flag = ((block->x_flag == ON) || (block->y_flag == ON) ||
               (block->z_flag == ON) || (block->a_flag == ON) ||
               (block->b_flag == ON) || (block->c_flag == ON) ||
               (block->u_flag == ON) || (block->v_flag == ON) ||
               (block->w_flag == ON));
  polar_flag = (block->radius_flag == ON) || (block->theta_flag == ON);
  ijk_flag = ((block->i_flag == ON) || (block->j_flag == ON) ||
              (block->k_flag == ON));
  mode0 = block->g_modes[0];
  mode1 = block->g_modes[1];
  mode_zero_covets_axes =
    ((mode0 == G_10) || (mode0 == G_28) || (mode0 == G_30)
     || (mode0 == G_92));

  if (mode1 != -1) {
    if (mode1 == G_80) {
      CHKS(((polar_flag || axis_flag) && (!mode_zero_covets_axes)),
          NCE_CANNOT_USE_AXIS_VALUES_WITH_G80);
      CHKS((polar_flag && mode0 == G_92), _("Polar coordinates can only be used for motion"));
      CHKS(((!axis_flag) && (mode0 == G_92)), NCE_ALL_AXES_MISSING_WITH_G92);
    } else {
      CHKS(mode_zero_covets_axes,
          NCE_CANNOT_USE_TWO_G_CODES_THAT_BOTH_USE_AXIS_VALUES);
      CHKS(((!axis_flag && !polar_flag) && 
            mode1 != G_0 && mode1 != G_1 && 
            mode1 != G_2 && mode1 != G_3 && mode1 != G_5_2),
          NCE_ALL_AXES_MISSING_WITH_MOTION_CODE);
    }
    block->motion_to_be = mode1;
  } else if (mode_zero_covets_axes) {   /* other 3 can get by without axes but not G92 */
    CHKS((polar_flag && mode0 == G_92), _("Polar coordinates can only be used for motion"));
    CHKS(((!axis_flag) && (block->g_modes[0] == G_92)), NCE_ALL_AXES_MISSING_WITH_G92);
  } else if (axis_flag || polar_flag) {
    CHKS(((settings->motion_mode == -1)
         || (settings->motion_mode == G_80)) && (block->g_modes[8] != G_43_1),
        NCE_CANNOT_USE_AXIS_VALUES_WITHOUT_A_G_CODE_THAT_USES_THEM);
    if (block->g_modes[8] != G_43_1) {
       block->motion_to_be = settings->motion_mode;
    }
  } else if (!axis_flag && !polar_flag && ijk_flag && (settings->motion_mode == G_2 || settings->motion_mode == G_3)) {
    // this is a block like simply "i1" which should be accepted if we're in arc mode
      block->motion_to_be = settings->motion_mode;
  }
  CHKS((polar_flag && block->motion_to_be == -1), _("Polar coordinates can only be used for motion"));
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x2a0(%rax)
jne 0x5a52a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x2b0(%rax)
je 0x5a8f7
jmp 0x5a52c
movq -0x40(%rbp), %rcx
movq 0x788(%rcx), %rax
movq 0x790(%rcx), %rcx
cmpq $0x0, %rax
je 0x5a560
movq -0x40(%rbp), %rcx
movq 0x798(%rcx), %rax
movq 0x7a0(%rcx), %rcx
cmpq $0x0, %rax
jne 0x5a635
jmp 0x5a562
leaq 0x228b9(%rip), %rdi     # 0x7ce22
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c9dd(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c9cc(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c9be(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x228a8(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c998(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c98a(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c972(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c962(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c955(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c947(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5a637
jmp 0x5a639
movq -0x20(%rbp), %rax
cmpl $0x1, 0xc67c(%rax)
je 0x5a71f
jmp 0x5a64c
leaq 0x22844(%rip), %rdi     # 0x7ce97
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c8f3(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c8e2(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c8d4(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x227be(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c8ae(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c8a0(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c888(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c878(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c86b(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c85d(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5a721
jmp 0x5a723
movq -0x18(%rbp), %rax
testb $0x1, 0x270(%rax)
je 0x5a809
jmp 0x5a736
leaq 0x2278a(%rip), %rdi     # 0x7cec7
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c809(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c7f8(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c7ea(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x226d4(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c7c4(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c7b6(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c79e(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c78e(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c781(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c773(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5a80b
jmp 0x5a80d
movq -0x18(%rbp), %rax
testb $0x1, 0x280(%rax)
je 0x5a8f3
jmp 0x5a820
leaq 0x226d0(%rip), %rdi     # 0x7cef7
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c71f(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c70e(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c700(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x225ea(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c6da(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c6cc(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c6b4(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c6a4(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c697(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c689(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5a8f5
jmp 0x5a8f7
movq -0x18(%rbp), %rax
movb 0x270(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x280(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x290(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb (%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x20(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x244(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x250(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x41(%rbp)
je 0x5a9d9
movq -0x18(%rbp), %rax
movb 0x260(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rcx
movb $0x1, %al
cmpl $0x1, 0x2a0(%rcx)
movb %al, -0x42(%rbp)
je 0x5aa07
movq -0x18(%rbp), %rax
cmpl $0x1, 0x2b0(%rax)
sete %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movb 0x198(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x43(%rbp)
je 0x5aa5c
movq -0x18(%rbp), %rax
movb 0x1a8(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movb $0x1, %al
cmpl $0x1, %ecx
movb %al, -0x43(%rbp)
je 0x5aa5c
movq -0x18(%rbp), %rax
movb 0x1b8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
sete %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x150(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movl 0x154(%rax), %eax
movl %eax, -0x38(%rbp)
movb $0x1, %al
cmpl $0x64, -0x34(%rbp)
movb %al, -0x44(%rbp)
je 0x5aab5
movb $0x1, %al
cmpl $0x118, -0x34(%rbp)     # imm = 0x118
movb %al, -0x44(%rbp)
je 0x5aab5
movb $0x1, %al
cmpl $0x12c, -0x34(%rbp)     # imm = 0x12C
movb %al, -0x44(%rbp)
je 0x5aab5
cmpl $0x398, -0x34(%rbp)     # imm = 0x398
sete %al
movb %al, -0x44(%rbp)
movb -0x44(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x30(%rbp)
cmpl $-0x1, -0x38(%rbp)
je 0x5afc5
cmpl $0x320, -0x38(%rbp)     # imm = 0x320
jne 0x5adaf
jmp 0x5aad9
cmpl $0x0, -0x2c(%rbp)
jne 0x5aae9
cmpl $0x0, -0x24(%rbp)
je 0x5abc8
cmpl $0x0, -0x30(%rbp)
jne 0x5abc8
jmp 0x5aaf5
leaq 0x2242b(%rip), %rdi     # 0x7cf27
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c44a(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c439(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c42b(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x22315(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c405(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c3f7(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c3df(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c3cf(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c3c2(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c3b4(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5abca
jmp 0x5abcc
cmpl $0x0, -0x2c(%rbp)
je 0x5acb8
cmpl $0x398, -0x34(%rbp)     # imm = 0x398
jne 0x5acb8
jmp 0x5abe5
leaq 0x2235b(%rip), %rdi     # 0x7cf47
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c35a(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c349(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c33b(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x22225(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c315(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c307(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c2ef(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c2df(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c2d2(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c2c4(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5acba
jmp 0x5acbc
cmpl $0x0, -0x24(%rbp)
jne 0x5ada8
cmpl $0x398, -0x34(%rbp)     # imm = 0x398
jne 0x5ada8
jmp 0x5acd5
leaq 0x22299(%rip), %rdi     # 0x7cf75
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c26a(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c259(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c24b(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x22135(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c225(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c217(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c1ff(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c1ef(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c1e2(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c1d4(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5adaa
jmp 0x5afb3
jmp 0x5adb1
cmpl $0x0, -0x30(%rbp)
je 0x5ae90
jmp 0x5adbd
leaq 0x221cb(%rip), %rdi     # 0x7cf8f
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c182(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c171(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c163(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x2204d(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c13d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c12f(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2c117(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2c107(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2c0fa(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c0ec(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5ae92
jmp 0x5ae94
cmpl $0x0, -0x24(%rbp)
jne 0x5afaf
cmpl $0x0, -0x2c(%rbp)
jne 0x5afaf
cmpl $0x0, -0x38(%rbp)
je 0x5afaf
cmpl $0xa, -0x38(%rbp)
je 0x5afaf
cmpl $0x14, -0x38(%rbp)
je 0x5afaf
cmpl $0x1e, -0x38(%rbp)
je 0x5afaf
cmpl $0x34, -0x38(%rbp)
je 0x5afaf
jmp 0x5aedc
leaq 0x220dd(%rip), %rdi     # 0x7cfc0
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2c063(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2c052(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2c044(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x21f2e(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2c01e(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2c010(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2bff8(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2bfe8(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2bfdb(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bfcd(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5afb1
jmp 0x5afb3
movl -0x38(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1d8(%rax)
jmp 0x5b345
cmpl $0x0, -0x30(%rbp)
je 0x5b1bb
jmp 0x5afd1
cmpl $0x0, -0x2c(%rbp)
je 0x5b0bd
cmpl $0x398, -0x34(%rbp)     # imm = 0x398
jne 0x5b0bd
jmp 0x5afea
leaq 0x21f56(%rip), %rdi     # 0x7cf47
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2bf55(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2bf44(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2bf36(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x21e20(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2bf10(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bf02(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2beea(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2beda(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2becd(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bebf(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5b0bf
jmp 0x5b0c1
cmpl $0x0, -0x24(%rbp)
jne 0x5b1b4
movq -0x18(%rbp), %rax
cmpl $0x398, 0x150(%rax)     # imm = 0x398
jne 0x5b1b4
jmp 0x5b0e1
leaq 0x21e8d(%rip), %rdi     # 0x7cf75
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2be5e(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2be4d(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2be3f(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x21d29(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2be19(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2be0b(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2bdf3(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2bde3(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2bdd6(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bdc8(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5b1b6
jmp 0x5b343
cmpl $0x0, -0x24(%rbp)
jne 0x5b1cb
cmpl $0x0, -0x2c(%rbp)
je 0x5b2ff
jmp 0x5b1cd
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x1798(%rax)
je 0x5b1ee
movq -0x20(%rbp), %rax
cmpl $0x320, 0x1798(%rax)    # imm = 0x320
jne 0x5b2d7
movq -0x18(%rbp), %rax
cmpl $0x1af, 0x170(%rax)     # imm = 0x1AF
je 0x5b2d7
jmp 0x5b204
leaq 0x21dd7(%rip), %rdi     # 0x7cfe2
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2bd3b(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2bd2a(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2bd1c(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x21c06(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2bcf6(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bce8(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2bcd0(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2bcc0(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2bcb3(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bca5(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5b2d9
movq -0x18(%rbp), %rax
cmpl $0x1af, 0x170(%rax)     # imm = 0x1AF
je 0x5b2fd
movq -0x20(%rbp), %rax
movl 0x1798(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1d8(%rax)
jmp 0x5b341
cmpl $0x0, -0x24(%rbp)
jne 0x5b33f
cmpl $0x0, -0x2c(%rbp)
jne 0x5b33f
cmpl $0x0, -0x28(%rbp)
je 0x5b33f
movq -0x20(%rbp), %rax
cmpl $0x14, 0x1798(%rax)
je 0x5b32b
movq -0x20(%rbp), %rax
cmpl $0x1e, 0x1798(%rax)
jne 0x5b33f
movq -0x20(%rbp), %rax
movl 0x1798(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x1d8(%rax)
jmp 0x5b341
jmp 0x5b343
jmp 0x5b345
jmp 0x5b347
cmpl $0x0, -0x2c(%rbp)
je 0x5b434
movq -0x18(%rbp), %rax
cmpl $-0x1, 0x1d8(%rax)
jne 0x5b434
jmp 0x5b364
leaq 0x21bdc(%rip), %rdi     # 0x7cf47
callq 0x10380
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x10df0
movq 0x2bbdb(%rip), %rax     # 0x86f60
movl $0x0, 0xd670(%rax)
movq 0x2bbca(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rax
movq 0x2bbbc(%rip), %rdi     # 0x86f60
addq $0xc6d0, %rdi           # imm = 0xC6D0
imulq $0x50, %rax, %rax
addq %rax, %rdi
leaq 0x21aa6(%rip), %rsi     # 0x7ce5f
movl $0x50, %edx
callq 0x10840
movq 0x2bb96(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bb88(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, 0x4f(%rax)
movq 0x2bb70(%rip), %rax     # 0x86f60
movl 0xd670(%rax), %ecx
addl $0x1, %ecx
movq 0x2bb60(%rip), %rax     # 0x86f60
movl %ecx, 0xd670(%rax)
movq 0x2bb53(%rip), %rax     # 0x86f60
movslq 0xd670(%rax), %rcx
movq 0x2bb45(%rip), %rax     # 0x86f60
addq $0xc6d0, %rax           # imm = 0xC6D0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movb $0x0, (%rax)
movl $0x5, -0x4(%rbp)
jmp 0x5b43d
jmp 0x5b436
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)