// File: /workspace/github_cpp_makefile_star2_O1/sundale[P]gcode/rs274ngc/interp_read.cc
// Function: Interp::read_o(char*, int*, block_struct*, double*)
int Interp::read_o(    /* ARGUMENTS                                     */
 char * line,         /* string: line of RS274/NGC code being processed */
 int * counter,       /* pointer to a counter for position on the line  */
 block_pointer block, /* pointer to a block being filled from the line  */
 double * parameters) /* array of system parameters                     */
{
  static char name[] = "read_o";
  double value;
  int param_cnt;
  char oNameBuf[LINELEN+1];
  char *subName;
  char fullNameBuf[2*LINELEN+1];
  int oNumber;

  CHKS((line[*counter] != 'o'), NCE_BUG_FUNCTION_SHOULD_NOT_HAVE_BEEN_CALLED);

  // changed spec so we now read an expression
  // so... we can have a parameter contain a function pointer!
  *counter += 1;

  block->o_number = 0;

  logDebug("In: %s line:%d |%s|", name, block->line_number, line);

  if(line[*counter] == '<')
  {
      read_name(line, counter, oNameBuf);
  }
  else
  {
     CHP(read_integer_value(line, counter, &oNumber,
                            parameters));
     sprintf(oNameBuf, "%d", oNumber);
     block->o_number = oNumber; //!!!KL keeps this for now
  }

  // We stash the text the offset part of setup
  // And then store the index into block->o_number
  // Just to be clean, we do not use index zero.

#define CMP(txt) (strncmp(line+*counter, txt, strlen(txt)) == 0)
  // characterize the type of o-word

  if(CMP("sub"))
    block->o_type = O_sub;
  else if(CMP("endsub"))
    block->o_type = O_endsub;
  else if(CMP("call"))
    block->o_type = O_call;
  else if(CMP("do"))
    block->o_type = O_do;
  else if(CMP("while"))
    block->o_type = O_while;
  else if(CMP("repeat"))
    block->o_type = O_repeat;
  else if(CMP("if"))
    block->o_type = O_if;
  else if(CMP("elseif"))
    block->o_type = O_elseif;
  else if(CMP("else"))
    block->o_type = O_else;
  else if(CMP("endif"))
    block->o_type = O_endif;
  else if(CMP("break"))
    block->o_type = O_break;
  else if(CMP("continue"))
    block->o_type = O_continue;
  else if(CMP("endwhile"))
    block->o_type = O_endwhile;
  else if(CMP("endrepeat"))
    block->o_type = O_endrepeat;
  else if(CMP("return"))
    block->o_type = O_return;
  else
    block->o_type = O_none;

  // we now have it characterized
  // now create the text of the oword

  switch(block->o_type)
    {
      // the global cases first
    case O_sub:
    case O_endsub:
    case O_call:
    case O_return:
      block->o_name = strdup(oNameBuf);
      logDebug("global case:|%s|", block->o_name);
      break;

      // the remainder are local cases
    default:
      if(_setup.call_level)
	{
	  subName = _setup.sub_context[_setup.call_level].subName;
	  logDebug("inside a call[%d]:|%s|", _setup.call_level, subName);
	}
      else if(_setup.defining_sub)
	{
	  subName = _setup.sub_name;
	  logDebug("defining_sub:|%s|", subName);
	}
      else
	{
	  subName = "";
	  logDebug("not defining_sub:|%s|", subName);
	}
      sprintf(fullNameBuf, "%s#%s", subName, oNameBuf);
      block->o_name = strdup(fullNameBuf);
      logDebug("local case:|%s|", block->o_name);
    }

  logDebug("o_type:%d o_name:|%s| line:%d |%s|", block->o_type, block->o_name,
	   block->line_number, line);

  if(block->o_type == O_sub)
    {
      block->o_type = O_sub;
    }
  else if(block->o_type == O_endsub)
    {
      block->o_type = O_endsub;
    }
  else if(_setup.defining_sub == 1)
    {
      // we can not evaluate expressions -- so just skip on out
      block->o_type = O_none;
    }
  else if(block->o_type == O_call)
    {
      // we need to NOT evaluate parameters if skipping
      // skipping never ends on a "call"
      if(_setup.skipping_o != 0)
      {
          block->o_type = O_none;
          return INTERP_OK;
      }

      *counter += strlen("call");
      block->o_type = O_call;

      for(param_cnt=0;(line[*counter] == '[') || (line[*counter] == '(');)
	{
	  if(line[*counter] == '(')
	    {
	      CHP(read_comment(line, counter, block, parameters));
	      continue;
	    }
	  logDebug("counter[%d] rest of line:|%s|", *counter,
		   line+*counter);
	  CHKS((param_cnt >= INTERP_SUB_PARAMS),
	      NCE_TOO_MANY_SUBROUTINE_PARAMETERS);
	  CHP(read_real_expression(line, counter, &value, parameters));
	  block->params[param_cnt] = value;
	  param_cnt++;
	}
      logDebug("set arg params:%d", param_cnt);

      // zero the remaining params
      for(;param_cnt < INTERP_SUB_PARAMS; param_cnt++)
	{
	  block->params[param_cnt] = 0.0;
	}
    }
  else if(block->o_type == O_do)
    {
      block->o_type = O_do;
    }
  else if(block->o_type == O_while)
    {
      // TESTME !!!KL -- should not eval expressions if skipping ???
      if((_setup.skipping_o != 0) &&
	 (0 != strcmp(_setup.skipping_o, block->o_name)))
      {
	    return INTERP_OK;
      }

      *counter += strlen("while");
      block->o_type = O_while;
      CHKS((line[*counter] != '['),
	    "Left bracket missing after 'while'");
      CHP(read_real_expression(line, counter, &value, parameters));
      _setup.test_value = value;
    }
  else if(block->o_type == O_repeat)
      {
          // TESTME !!!KL -- should not eval expressions if skipping ???
          if((_setup.skipping_o != 0) &&
	     (0 != strcmp(_setup.skipping_o, block->o_name)))
          {
	    return INTERP_OK;
          }

          *counter += strlen("repeat");
          block->o_type = O_repeat;
          CHKS((line[*counter] != '['),
               "Left bracket missing after 'repeat'");
          CHP(read_real_expression(line, counter, &value, parameters));
          _setup.test_value = value;
      }
  else if(block->o_type == O_if)
    {
      // TESTME !!!KL -- should not eval expressions if skipping ???
      if((_setup.skipping_o != 0) &&
	 (0 != strcmp(_setup.skipping_o, block->o_name)))
      {
	    return INTERP_OK;
      }

      *counter += strlen("if");
      block->o_type = O_if;
      CHKS((line[*counter] != '['),
	    "Left bracket missing after 'if'");
      CHP(read_real_expression(line, counter, &value, parameters));
      _setup.test_value = value;
    }
  else if(block->o_type == O_elseif)
    {
      // TESTME !!!KL -- should not eval expressions if skipping ???
      if((_setup.skipping_o != 0) &&
	 (0 != strcmp(_setup.skipping_o, block->o_name)))
      {
	    return INTERP_OK;
      }

      *counter += strlen("elseif");
      block->o_type = O_elseif;
      CHKS((line[*counter] != '['),
	    "Left bracket missing after 'elseif'");
      CHP(read_real_expression(line, counter, &value, parameters));
      _setup.test_value = value;
    }
  else if(block->o_type == O_else)
    {
      block->o_type = O_else;
    }
  else if(block->o_type == O_endif)
    {
      block->o_type = O_endif;
    }
  else if(block->o_type == O_break)
    {
      block->o_type = O_break;
    }
  else if(block->o_type == O_continue)
    {
      block->o_type = O_continue;
    }
  else if(block->o_type == O_endwhile)
    {
      block->o_type = O_endwhile;
    }
  else if(block->o_type == O_endrepeat)
      {
          block->o_type = O_endrepeat;
      }
  else if(block->o_type == O_return)
    {
      block->o_type = O_return;
    }
  else
    {
      // not legal
      block->o_type = O_none;
      ERS(NCE_UNKNOWN_COMMAND_IN_O_LINE);
    }

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %r14
movslq (%rdx), %rax
cmpb $0x6f, (%rsi,%rax)
jne 0x2adb4
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %r15
movq %r8, -0x48(%rbp)
incl %eax
movl %eax, (%rdx)
movl $0x0, 0x2cc(%rcx)
movq 0x1921e(%rip), %rbx     # 0x43f60
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2ad8f
callq 0xaf80
movl 0x1d0(%r12), %r10d
subq $0x8, %rsp
leaq 0x19e1d(%rip), %r11     # 0x44b80
leaq 0x11725(%rip), %rsi     # 0x3c48f
leaq 0x11745(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5a2, %r9d            # imm = 0x5A2
xorl %eax, %eax
pushq %r15
pushq %r10
pushq %r11
callq 0xb470
addq $0x20, %rsp
movslq (%r13), %rax
cmpb $0x3c, (%r15,%rax)
jne 0x2ae13
leaq -0x150(%rbp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa9a0
jmp 0x2aebb
leaq 0xf49c(%rip), %rdi      # 0x3a257
callq 0xa1f0
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movq 0x1918c(%rip), %rbx     # 0x43f60
movl $0x0, 0xd670(%rbx)
leaq 0xc6d0(%rbx), %rdi
leaq 0x10756(%rip), %rsi     # 0x3b542
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
movl $0x5, %ecx
jmp 0x2b26b
leaq -0x4c(%rbp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq -0x48(%rbp), %r8
callq 0xab30
movl %eax, %ecx
testl %eax, %eax
je 0x2ae96
movslq 0xd670(%rbx), %rax
cmpq $0x30, %rax
jg 0x2b26b
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rbx,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x106e8(%rip), %rsi     # 0x3b542
movl $0x50, %edx
movl %ecx, %r14d
callq 0xa8a0
movslq 0xd670(%rbx), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%rbx,%rcx)
incl %eax
movl %eax, 0xd670(%rbx)
movb %dl, 0xc720(%rbx,%rcx)
movl %r14d, %ecx
jmp 0x2b26b
movl %ecx, -0x2c(%rbp)
movl -0x4c(%rbp), %ebx
leaq 0x11dbc(%rip), %rsi     # 0x3cc5f
leaq -0x150(%rbp), %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0xa170
movl %ebx, 0x2cc(%r12)
movslq (%r13), %rbx
addq %r15, %rbx
leaq 0x115ff(%rip), %rsi     # 0x3c4c8
movl $0x3, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b077
leaq 0x115e0(%rip), %rsi     # 0x3c4c5
movl $0x6, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b088
leaq 0x115cb(%rip), %rsi     # 0x3c4cc
movl $0x4, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b099
leaq 0x115b4(%rip), %rsi     # 0x3c4d1
movl $0x2, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0aa
leaq 0x115bf(%rip), %rsi     # 0x3c4f8
movl $0x5, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0bb
leaq 0x115ac(%rip), %rsi     # 0x3c501
movl $0x6, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0cc
leaq 0x11572(%rip), %rsi     # 0x3c4e3
movl $0x2, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0da
leaq 0x11547(%rip), %rsi     # 0x3c4d4
movl $0x6, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0e8
leaq 0x11532(%rip), %rsi     # 0x3c4db
movl $0x4, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b0f6
leaq 0x1151b(%rip), %rsi     # 0x3c4e0
movl $0x5, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b104
leaq 0x11505(%rip), %rsi     # 0x3c4e6
movl $0x5, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b112
leaq 0x114ef(%rip), %rsi     # 0x3c4ec
movl $0x8, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b120
leaq 0x114dc(%rip), %rsi     # 0x3c4f5
movl $0x8, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b12e
leaq 0x114c9(%rip), %rsi     # 0x3c4fe
movl $0x9, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b13c
leaq 0xdbdc(%rip), %rsi      # 0x38c2d
movl $0x6, %edx
movq %rbx, %rdi
callq 0xa4e0
testl %eax, %eax
je 0x2b14a
movl $0x0, 0x2c8(%r12)
jmp 0x2b156
movl $0x1, 0x2c8(%r12)
jmp 0x2b156
movl $0x2, 0x2c8(%r12)
jmp 0x2b156
movl $0x3, 0x2c8(%r12)
jmp 0x2b156
movl $0x4, 0x2c8(%r12)
jmp 0x2b156
movl $0x5, 0x2c8(%r12)
jmp 0x2b156
movl $0xe, 0x2c8(%r12)
jmp 0x2b156
movl $0x6, 0x2c8(%r12)
jmp 0x2b156
movl $0x7, 0x2c8(%r12)
jmp 0x2b156
movl $0x8, 0x2c8(%r12)
jmp 0x2b156
movl $0x9, 0x2c8(%r12)
jmp 0x2b156
movl $0xa, 0x2c8(%r12)
jmp 0x2b156
movl $0xb, 0x2c8(%r12)
jmp 0x2b156
movl $0xc, 0x2c8(%r12)
jmp 0x2b156
movl $0xf, 0x2c8(%r12)
jmp 0x2b156
movl $0xd, 0x2c8(%r12)
movq 0x18e03(%rip), %rbx     # 0x43f60
movl 0x2c8(%r12), %eax
cmpl $0xd, %eax
ja 0x2b27f
movl $0x200e, %ecx           # imm = 0x200E
btl %eax, %ecx
jae 0x2b27f
leaq -0x150(%rbp), %rdi
callq 0xb4e0
movq %rax, 0x2d0(%r12)
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b1d0
callq 0xaf80
subq $0x8, %rsp
leaq 0x1135f(%rip), %rsi     # 0x3c508
leaq 0x11306(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5e3, %r9d            # imm = 0x5E3
xorl %eax, %eax
pushq 0x2d0(%r12)
callq 0xb470
addq $0x10, %rsp
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b222
callq 0xaf80
movl 0x1d0(%r12), %r10d
movl 0x2c8(%r12), %r11d
leaq 0x113d8(%rip), %rsi     # 0x3c5cd
leaq 0x112ba(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5fd, %r9d            # imm = 0x5FD
xorl %eax, %eax
pushq %r15
pushq %r10
pushq 0x2d0(%r12)
pushq %r11
callq 0xb470
addq $0x20, %rsp
movl 0x2c8(%r12), %eax
cmpl $0x2, %eax
je 0x2b242
cmpl $0x1, %eax
jne 0x2b250
movl $0x1, 0x2c8(%r12)
jmp 0x2b269
movl $0x2, 0x2c8(%r12)
jmp 0x2b269
cmpl $0x1, 0xef50(%rbx)
jne 0x2b2ef
movl $0x0, 0x2c8(%r12)
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movslq 0xef90(%rbx), %rax
testq %rax, %rax
je 0x2b4ec
imulq $0x128, %rax, %rax      # imm = 0x128
movq 0xefb0(%rbx,%rax), %rdx
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b57c
movq %rdx, -0x40(%rbp)
callq 0xaf80
movl 0xef90(%rbx), %r10d
leaq 0x1126a(%rip), %rsi     # 0x3c52c
leaq 0x111ed(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5eb, %r9d            # imm = 0x5EB
xorl %eax, %eax
pushq -0x40(%rbp)
pushq %r10
callq 0xb470
movq -0x40(%rbp), %rdx
addq $0x10, %rsp
jmp 0x2b57c
addl $-0x3, %eax
cmpl $0xc, %eax
ja 0x2b7f9
leaq 0xfba6(%rip), %rcx      # 0x3aea8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq $0x0, 0xef70(%rbx)
jne 0x2b25d
addl $0x4, (%r13)
movl $0x3, 0x2c8(%r12)
movq $0x0, -0x40(%rbp)
movl -0x2c(%rbp), %ecx
movslq (%r13), %rax
movzbl (%r15,%rax), %eax
cmpl $0x28, %eax
jne 0x2b3de
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movl %ecx, %ebx
movq %r12, %rcx
callq 0xaee0
movl %ebx, %ecx
movl %eax, %ebx
testl %eax, %eax
je 0x2b3ca
movq 0x18bf7(%rip), %rcx     # 0x43f60
movslq 0xd670(%rcx), %rax
cmpq $0x30, %rax
jg 0x2b3c8
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x101ad(%rip), %rsi     # 0x3b542
callq 0xa8a0
movq 0x18bbf(%rip), %rsi     # 0x43f60
movslq 0xd670(%rsi), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%rsi,%rcx)
incl %eax
movl %eax, 0xd670(%rsi)
movb %dl, 0xc720(%rsi,%rcx)
movl %ebx, %ecx
testl %ebx, %ebx
movq 0x18b8d(%rip), %rbx     # 0x43f60
je 0x2b335
jmp 0x2b26b
cmpl $0x5b, %eax
jne 0x2b8ad
movl %ecx, -0x2c(%rbp)
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b42c
callq 0xaf80
movslq (%r13), %r10
movq %r10, %r11
addq %r15, %r11
movq %r14, %rdi
leaq 0x111f7(%rip), %rsi     # 0x3c603
xorl %edx, %edx
movl %eax, %ecx
leaq 0x1109f(%rip), %r8      # 0x3c4b6
movl $0x621, %r9d            # imm = 0x621
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0xb470
addq $0x10, %rsp
cmpq $0x1e, -0x40(%rbp)
movq -0x48(%rbp), %r8
je 0x2b928
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
leaq -0x38(%rbp), %rcx
callq 0xafc0
movl %eax, %ebx
testl %eax, %eax
movl -0x2c(%rbp), %ecx
je 0x2b4be
movq 0x18b03(%rip), %rcx     # 0x43f60
movslq 0xd670(%rcx), %rax
cmpq $0x30, %rax
jg 0x2b4bc
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%rcx,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
movl $0x50, %edx
leaq 0x100b9(%rip), %rsi     # 0x3b542
callq 0xa8a0
movq 0x18acb(%rip), %rsi     # 0x43f60
movslq 0xd670(%rsi), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%rsi,%rcx)
incl %eax
movl %eax, 0xd670(%rsi)
movb %dl, 0xc720(%rsi,%rcx)
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x2b26b
movsd -0x38(%rbp), %xmm0
movq -0x40(%rbp), %rax
movsd %xmm0, 0x2d8(%r12,%rax,8)
incq %rax
movq %rax, -0x40(%rbp)
movq 0x18a79(%rip), %rbx     # 0x43f60
jmp 0x2b335
cmpl $0x0, 0xef50(%rbx)
je 0x2b52e
movq 0xef58(%rbx), %rdx
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b575
movq %rdx, %rbx
callq 0xaf80
subq $0x8, %rsp
leaq 0x1103e(%rip), %rsi     # 0x3c556
leaq 0x10f97(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5f0, %r9d            # imm = 0x5F0
jmp 0x2b566
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b88b
callq 0xaf80
subq $0x8, %rsp
leaq 0x12812(%rip), %rbx     # 0x3dd5d
leaq 0x11029(%rip), %rsi     # 0x3c57b
leaq 0x10f5d(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5f5, %r9d            # imm = 0x5F5
xorl %eax, %eax
pushq %rbx
callq 0xb470
movq %rbx, %rdx
addq $0x10, %rsp
movq 0x189e4(%rip), %rbx     # 0x43f60
leaq 0x11021(%rip), %rsi     # 0x3c5a4
leaq -0x350(%rbp), %rdi
leaq -0x150(%rbp), %rcx
xorl %eax, %eax
callq 0xa170
leaq -0x350(%rbp), %rdi
callq 0xb4e0
movq %rax, 0x2d0(%r12)
cmpl $0x0, 0x1b6b4(%rbx)
jle 0x2b1d0
callq 0xaf80
subq $0x8, %rsp
leaq 0x10fe1(%rip), %rsi     # 0x3c5aa
leaq 0x10ee6(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x5f9, %r9d            # imm = 0x5F9
jmp 0x2b1bd
movq 0xef70(%rbx), %rdi
testq %rdi, %rdi
je 0x2b603
movq 0x2d0(%r12), %rsi
callq 0xaeb0
testl %eax, %eax
jne 0x2b269
addl $0x6, (%r13)
movl $0xe, 0x2c8(%r12)
movslq (%r13), %rax
cmpb $0x5b, (%r15,%rax)
je 0x2b728
leaq 0x11071(%rip), %rsi     # 0x3c69b
jmp 0x2b89e
movq 0xef70(%rbx), %rdi
testq %rdi, %rdi
je 0x2b650
movq 0x2d0(%r12), %rsi
callq 0xaeb0
testl %eax, %eax
jne 0x2b269
addl $0x6, (%r13)
movl $0x7, 0x2c8(%r12)
movslq (%r13), %rax
cmpb $0x5b, (%r15,%rax)
je 0x2b728
leaq 0x11068(%rip), %rsi     # 0x3c6df
jmp 0x2b89e
movl $0xf, 0x2c8(%r12)
jmp 0x2b269
movl $0xc, 0x2c8(%r12)
jmp 0x2b269
movq 0xef70(%rbx), %rdi
testq %rdi, %rdi
je 0x2b6bf
movq 0x2d0(%r12), %rsi
callq 0xaeb0
testl %eax, %eax
jne 0x2b269
addl $0x5, (%r13)
movl $0x5, 0x2c8(%r12)
movslq (%r13), %rax
cmpb $0x5b, (%r15,%rax)
je 0x2b728
leaq 0x10f96(%rip), %rsi     # 0x3c678
jmp 0x2b89e
movq 0xef70(%rbx), %rdi
testq %rdi, %rdi
je 0x2b708
movq 0x2d0(%r12), %rsi
callq 0xaeb0
testl %eax, %eax
jne 0x2b269
addl $0x2, (%r13)
movl $0x6, 0x2c8(%r12)
movslq (%r13), %rax
cmpb $0x5b, (%r15,%rax)
jne 0x2b897
movq %rbx, %r12
leaq -0x38(%rbp), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq -0x48(%rbp), %r8
callq 0xafc0
movl %eax, %ebx
testl %eax, %eax
movl -0x2c(%rbp), %ecx
je 0x2b7aa
movslq 0xd670(%r12), %rax
cmpq $0x30, %rax
jg 0x2b7a8
leaq (%rax,%rax,4), %rax
shlq $0x4, %rax
leaq (%r12,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0xfdd0(%rip), %rsi      # 0x3b542
movl $0x50, %edx
callq 0xa8a0
movslq 0xd670(%r12), %rax
leaq (%rax,%rax,4), %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%r12,%rcx)
incl %eax
movl %eax, 0xd670(%r12)
movb %dl, 0xc720(%r12,%rcx)
movl %ebx, %ecx
testl %ebx, %ebx
jne 0x2b26b
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0xef88(%r12)
jmp 0x2b269
movl $0xa, 0x2c8(%r12)
jmp 0x2b269
movl $0x4, 0x2c8(%r12)
jmp 0x2b269
movl $0x8, 0x2c8(%r12)
jmp 0x2b269
movq %rbx, %r15
xorl %ebx, %ebx
movl %ebx, 0x2c8(%r12)
leaq 0x10ef6(%rip), %rdi     # 0x3c703
callq 0xa1f0
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xa850
movl %ebx, 0xd670(%r15)
leaq 0xc6d0(%r15), %rdi
leaq 0xfd0e(%rip), %rsi      # 0x3b542
movl $0x50, %edx
callq 0xa8a0
movw $0x0, 0xc71f(%r15)
movl $0x1, 0xd670(%r15)
jmp 0x2ae09
movl $0x9, 0x2c8(%r12)
jmp 0x2b269
movl $0xd, 0x2c8(%r12)
jmp 0x2b269
movl $0xb, 0x2c8(%r12)
jmp 0x2b269
leaq 0x124cb(%rip), %rdx     # 0x3dd5d
jmp 0x2b575
leaq 0x10e21(%rip), %rsi     # 0x3c6bf
movq %r14, %rdi
xorl %eax, %eax
callq 0xa850
jmp 0x2add4
cmpl $0x0, 0x1b6b4(%rbx)
movq -0x40(%rbp), %rbx
jle 0x2b8ea
callq 0xaf80
subq $0x8, %rsp
leaq 0x10d89(%rip), %rsi     # 0x3c653
leaq 0x10be5(%rip), %r8      # 0x3c4b6
movq %r14, %rdi
xorl %edx, %edx
movl %eax, %ecx
movl $0x628, %r9d            # imm = 0x628
xorl %eax, %eax
pushq %rbx
callq 0xb470
addq $0x10, %rsp
cmpq $0x1d, %rbx
ja 0x2b269
leaq (%r12,%rbx,8), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
shlq $0x3, %rbx
movl $0xe8, %eax
subq %rbx, %rax
movabsq $0x7fffffff8, %rdx      # imm = 0x7FFFFFFF8
andq %rax, %rdx
addq $0x8, %rdx
xorl %esi, %esi
callq 0xa570
jmp 0x2b269
leaq 0x10d05(%rip), %rdi     # 0x3c634
jmp 0x2adbb