// File: AshOlogn[P]ash-language-interpreter/src/unaryeval.cpp
// Function: evaluateUnaryExpression(UnaryOperatorNode*)
ParseData evaluateUnaryExpression(UnaryOperatorNode* node) {
  
  ParseData arg = node->leftArg->evaluate();
  ParseData d;
  d.type = arg.type;
  
  switch(node->operation) {
    
    case POSITIVE_OP: {
      
      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case DOUBLE_T: {
          double val = (double) arg.value.floatingPoint;
          d.value.floatingPoint = (double) val;
          return d;
        }
        
      }
    }
    
    case NEGATIVE_OP: {
      
      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) arg.value.integer;
          d.value.integer = -val;
          return d;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) arg.value.integer;
          d.value.integer = -val;
          return d;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) arg.value.integer;
          d.value.integer = -val;
          return d;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) arg.value.integer;
          d.value.integer = -val;
          return d;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) arg.value.integer;
          d.value.integer = -val;
          return d;
        }
        
        case DOUBLE_T: {
          double val = (double) arg.value.floatingPoint;
          d.value.floatingPoint = -val;
          return d;
        }
        
      }
    }
    
    case BIT_NOT_OP: {
      
      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) arg.value.integer;
          d.value.integer = ~val;
          return d;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) arg.value.integer;
          d.value.integer = ~val;
          return d;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) arg.value.integer;
          d.value.integer = ~val;
          return d;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) arg.value.integer;
          d.value.integer = val;
          return d;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) arg.value.integer;
          d.value.integer = ~val;
          return d;
        }
      }
    }
    
    case NOT_OP: {
      bool val = (bool) arg.value.integer;
      d.value.integer = !val;
      return d;
    }


    case POSTFIX_INC_OP: {
      
      VariableNode* varNode = dynamic_cast<VariableNode*>(node->leftArg);

      //get variable name
			char* variableName = copyString(varNode->variable.c_str());

      //get variable type
      ParseDataType varType = varNode->evalType;

      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case DOUBLE_T: {
          double val = (double) arg.value.floatingPoint;
          d.value.floatingPoint = val;
          break;
        }
        
      }

      //update value in symbol table
      ParseData update;
      update.type = d.type;
      if(d.type == DOUBLE_T) {
        update.value.floatingPoint = d.value.floatingPoint + 1.0;
      } else {
        update.value.integer = d.value.integer + 1;
      }

      SymbolTable* symbolTable = node->symbolTable;
      symbolTable->update(variableName, update);

      //return original value
      return d;
    }

    case POSTFIX_DEC_OP: {
      
      VariableNode* varNode = dynamic_cast<VariableNode*>(node->leftArg);

      //get variable name
      char* variableName = copyString(varNode->variable.c_str());

      //get variable type
      ParseDataType varType = varNode->evalType;

      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) arg.value.integer;
          d.value.integer = val;
          break;
        }
        
        case DOUBLE_T: {
          double val = (double) arg.value.floatingPoint;
          d.value.floatingPoint = val;
          break;
        }
        
      }

      //update value in symbol table
      ParseData update;
      update.type = d.type;
      if(d.type == DOUBLE_T) {
        update.value.floatingPoint = d.value.floatingPoint - 1.0;
      } else {
        update.value.integer = d.value.integer - 1;
      }

      SymbolTable* symbolTable = node->symbolTable;
      symbolTable->update(variableName, update);

      //return original value
      return d;
    }

    case PREFIX_INC_OP: {
      
      VariableNode* varNode = dynamic_cast<VariableNode*>(node->leftArg);

      //get variable name
      char* variableName = copyString(varNode->variable.c_str());

      //get variable type
      ParseDataType varType = varNode->evalType;

      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) (arg.value.integer + 1);
          d.value.integer = val;
          break;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) (arg.value.integer + 1);
          d.value.integer = val;
          break;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) (arg.value.integer + 1);
          d.value.integer = val;
          break;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) (arg.value.integer + 1);
          d.value.integer = val;
          break;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) (arg.value.integer + 1);
          d.value.integer = val;
          break;
        }
        
        case DOUBLE_T: {
          double val = (double) (arg.value.floatingPoint + 1.0);
          d.value.floatingPoint = val;
          break;
        }
        
      }

      //update value in symbol table
      SymbolTable* symbolTable = node->symbolTable;
      symbolTable->update(variableName, d);

      //return original value
      return d;
    }

    case PREFIX_DEC_OP: {
      
      VariableNode* varNode = dynamic_cast<VariableNode*>(node->leftArg);

      //get variable name
      char* variableName = copyString(varNode->variable.c_str());

      //get variable type
      ParseDataType varType = varNode->evalType;

      switch(arg.type) {
        
        case CHAR_T: {
          unsigned char val = (unsigned char) (arg.value.integer - 1);
          d.value.integer = val;
          break;
        }
        
        case INT32_T: {
          int32_t val = (int32_t) (arg.value.integer - 1);
          d.value.integer = val;
          break;
        }
        
        case INT64_T: {
          int64_t val = (int64_t) (arg.value.integer - 1);
          d.value.integer = val;
          break;
        }
        
        case UINT32_T:  {
          uint32_t val = (uint32_t) (arg.value.integer - 1);
          d.value.integer = val;
          break;
        }
        
        case UINT64_T: {
          uint64_t val = (uint64_t) (arg.value.integer - 1);
          d.value.integer = val;
          break;
        }
        
        case DOUBLE_T: {
          double val = (double) (arg.value.floatingPoint - 1.0);
          d.value.floatingPoint = val;
          break;
        }
      }

      SymbolTable* symbolTable = node->symbolTable;
      symbolTable->update(variableName, d);

      //return original value
      return d;
    }
  }
  
  return d;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movl %eax, -0x28(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rax
movl 0x18(%rax), %eax
movq %rax, -0x2d8(%rbp)
subq $0xa, %rax
ja 0x291d0
movq -0x2d8(%rbp), %rax
leaq 0x1ba7e(%rip), %rcx     # 0x44090
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x2e0(%rbp)
subl $0x8, %eax
ja 0x286c8
movq -0x2e0(%rbp), %rax
leaq 0x1bb0b(%rip), %rcx     # 0x4414c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x30(%rbp)
movslq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x291d2
jmp 0x286ca
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x2e8(%rbp)
subl $0x8, %eax
ja 0x2879f
movq -0x2e8(%rbp), %rax
leaq 0x1ba80(%rip), %rcx     # 0x44170
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %ecx
xorl %eax, %eax
subl %ecx, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x58(%rbp)
xorl %eax, %eax
subl -0x58(%rbp), %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
xorl %eax, %eax
subq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x64(%rbp)
xorl %eax, %eax
subl -0x64(%rbp), %eax
movl %eax, %eax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x70(%rbp)
xorl %eax, %eax
subq -0x70(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x8(%rbp)
jmp 0x291d2
jmp 0x287a1
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x2f0(%rbp)
subl $0x6, %eax
ja 0x28858
movq -0x2f0(%rbp), %rax
leaq 0x1b9cd(%rip), %rcx     # 0x44194
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movb %al, -0x79(%rbp)
movzbl -0x79(%rbp), %eax
xorl $-0x1, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
xorl $-0x1, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
xorq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movl %eax, -0x8c(%rbp)
movl -0x8c(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x20(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
xorq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x291d2
jmp 0x2885a
cmpq $0x0, -0x20(%rbp)
setne %al
andb $0x1, %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movq %rax, -0x8(%rbp)
jmp 0x291d2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x2f8(%rbp)
cmpq $0x0, %rax
je 0x288bc
movq -0x2f8(%rbp), %rdi
leaq 0x2b22d(%rip), %rsi     # 0x53ad0
leaq 0x2b1c6(%rip), %rdx     # 0x53a70
xorl %eax, %eax
movl %eax, %ecx
callq 0x42b0
movq %rax, -0x300(%rbp)
jmp 0x288c7
xorl %eax, %eax
movq %rax, -0x300(%rbp)
jmp 0x288c7
movq -0x300(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
addq $0x20, %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0xb4(%rbp)
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x308(%rbp)
subl $0x8, %eax
ja 0x289c1
movq -0x308(%rbp), %rax
leaq 0x1b7fe(%rip), %rcx     # 0x44128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movb %al, -0xb5(%rbp)
movzbl -0xb5(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x289c1
movq -0x20(%rbp), %rax
movl %eax, -0xbc(%rbp)
movslq -0xbc(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x289c1
movq -0x20(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x289c1
movq -0x20(%rbp), %rax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x289c1
movq -0x20(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x289c1
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xe0(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xf0(%rbp)
cmpl $0xa, -0x10(%rbp)
jne 0x289e7
movsd 0x1b6b0(%rip), %xmm0    # 0x44088
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0xe8(%rbp)
jmp 0x289f6
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x320(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x318(%rbp)
leaq -0x119(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x4430
movq -0x318(%rbp), %rsi
movq -0x310(%rbp), %rdx
leaq -0x118(%rbp), %rdi
callq 0x4350
jmp 0x28a50
movq -0x320(%rbp), %rdi
movups -0xf0(%rbp), %xmm0
movaps %xmm0, -0x140(%rbp)
movl -0x140(%rbp), %edx
movq -0x138(%rbp), %rcx
leaq -0x118(%rbp), %rsi
callq 0x2bdf0
jmp 0x28a80
leaq -0x118(%rbp), %rdi
callq 0x4170
leaq -0x119(%rbp), %rdi
callq 0x4290
jmp 0x291d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x28acf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x4170
leaq -0x119(%rbp), %rdi
callq 0x4290
jmp 0x291e2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x328(%rbp)
cmpq $0x0, %rax
je 0x28b1c
movq -0x328(%rbp), %rdi
leaq 0x2afcd(%rip), %rsi     # 0x53ad0
leaq 0x2af66(%rip), %rdx     # 0x53a70
xorl %eax, %eax
movl %eax, %ecx
callq 0x42b0
movq %rax, -0x330(%rbp)
jmp 0x28b27
xorl %eax, %eax
movq %rax, -0x330(%rbp)
jmp 0x28b27
movq -0x330(%rbp), %rax
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rdi
addq $0x20, %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x150(%rbp)
movq -0x148(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x154(%rbp)
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x338(%rbp)
subl $0x8, %eax
ja 0x28c21
movq -0x338(%rbp), %rax
leaq 0x1b57a(%rip), %rcx     # 0x44104
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movb %al, -0x155(%rbp)
movzbl -0x155(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x28c21
movq -0x20(%rbp), %rax
movl %eax, -0x15c(%rbp)
movslq -0x15c(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28c21
movq -0x20(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28c21
movq -0x20(%rbp), %rax
movl %eax, -0x16c(%rbp)
movl -0x16c(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x28c21
movq -0x20(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28c21
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x180(%rbp)
movsd -0x180(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x190(%rbp)
cmpl $0xa, -0x10(%rbp)
jne 0x28c4b
movsd -0x8(%rbp), %xmm0
movsd 0x1b44b(%rip), %xmm1    # 0x44088
subsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
jmp 0x28c5a
movq -0x8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x188(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x348(%rbp)
leaq -0x1b9(%rbp), %rdi
movq %rdi, -0x340(%rbp)
callq 0x4430
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
callq 0x4350
jmp 0x28cb4
movq -0x350(%rbp), %rdi
movups -0x190(%rbp), %xmm0
movaps %xmm0, -0x1d0(%rbp)
movl -0x1d0(%rbp), %edx
movq -0x1c8(%rbp), %rcx
leaq -0x1b8(%rbp), %rsi
callq 0x2bdf0
jmp 0x28ce4
leaq -0x1b8(%rbp), %rdi
callq 0x4170
leaq -0x1b9(%rbp), %rdi
callq 0x4290
jmp 0x291d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x28d33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x4170
leaq -0x1b9(%rbp), %rdi
callq 0x4290
jmp 0x291e2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x358(%rbp)
cmpq $0x0, %rax
je 0x28d80
movq -0x358(%rbp), %rdi
leaq 0x2ad69(%rip), %rsi     # 0x53ad0
leaq 0x2ad02(%rip), %rdx     # 0x53a70
xorl %eax, %eax
movl %eax, %ecx
callq 0x42b0
movq %rax, -0x360(%rbp)
jmp 0x28d8b
xorl %eax, %eax
movq %rax, -0x360(%rbp)
jmp 0x28d8b
movq -0x360(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movq -0x1d8(%rbp), %rdi
addq $0x20, %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x1e4(%rbp)
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x368(%rbp)
subl $0x8, %eax
ja 0x28ea4
movq -0x368(%rbp), %rax
leaq 0x1b2f2(%rip), %rcx     # 0x440e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
addq $0x1, %rax
movb %al, -0x1e5(%rbp)
movzbl -0x1e5(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x28ea4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x1ec(%rbp)
movslq -0x1ec(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28ea4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1f8(%rbp)
movq -0x1f8(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28ea4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movl %eax, -0x1fc(%rbp)
movl -0x1fc(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x28ea4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x28ea4
movsd 0x1b1fe(%rip), %xmm0    # 0x44088
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x210(%rbp)
movsd -0x210(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x218(%rbp)
movq -0x218(%rbp), %rax
movq %rax, -0x380(%rbp)
movq -0x1e0(%rbp), %rax
movq %rax, -0x378(%rbp)
leaq -0x239(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x4430
movq -0x378(%rbp), %rsi
movq -0x370(%rbp), %rdx
leaq -0x238(%rbp), %rdi
callq 0x4350
jmp 0x28efe
movq -0x380(%rbp), %rdi
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x250(%rbp)
movl -0x250(%rbp), %edx
movq -0x248(%rbp), %rcx
leaq -0x238(%rbp), %rsi
callq 0x2bdf0
jmp 0x28f2b
leaq -0x238(%rbp), %rdi
callq 0x4170
leaq -0x239(%rbp), %rdi
callq 0x4290
jmp 0x291d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x28f7a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x238(%rbp), %rdi
callq 0x4170
leaq -0x239(%rbp), %rdi
callq 0x4290
jmp 0x291e2
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x388(%rbp)
cmpq $0x0, %rax
je 0x28fc7
movq -0x388(%rbp), %rdi
leaq 0x2ab22(%rip), %rsi     # 0x53ad0
leaq 0x2aabb(%rip), %rdx     # 0x53a70
xorl %eax, %eax
movl %eax, %ecx
callq 0x42b0
movq %rax, -0x390(%rbp)
jmp 0x28fd2
xorl %eax, %eax
movq %rax, -0x390(%rbp)
jmp 0x28fd2
movq -0x390(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rdi
addq $0x20, %rdi
callq 0x40e0
movq %rax, %rdi
callq 0x2fb10
movq %rax, -0x260(%rbp)
movq -0x258(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, -0x264(%rbp)
movl -0x28(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x398(%rbp)
subl $0x8, %eax
ja 0x290ef
movq -0x398(%rbp), %rax
leaq 0x1b087(%rip), %rcx     # 0x440bc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
subq $0x1, %rax
movb %al, -0x265(%rbp)
movzbl -0x265(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x290ef
movq -0x20(%rbp), %rax
subq $0x1, %rax
movl %eax, -0x26c(%rbp)
movslq -0x26c(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x290ef
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x290ef
movq -0x20(%rbp), %rax
subq $0x1, %rax
movl %eax, -0x27c(%rbp)
movl -0x27c(%rbp), %eax
movq %rax, -0x8(%rbp)
jmp 0x290ef
movq -0x20(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x288(%rbp)
movq -0x288(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x290ef
movsd -0x20(%rbp), %xmm0
movsd 0x1afb2(%rip), %xmm1    # 0x44088
subsd %xmm1, %xmm0
movsd %xmm0, -0x290(%rbp)
movsd -0x290(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x3b0(%rbp)
movq -0x260(%rbp), %rax
movq %rax, -0x3a8(%rbp)
leaq -0x2b9(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x4430
movq -0x3a8(%rbp), %rsi
movq -0x3a0(%rbp), %rdx
leaq -0x2b8(%rbp), %rdi
callq 0x4350
jmp 0x29149
movq -0x3b0(%rbp), %rdi
movups -0x10(%rbp), %xmm0
movaps %xmm0, -0x2d0(%rbp)
movl -0x2d0(%rbp), %edx
movq -0x2c8(%rbp), %rcx
leaq -0x2b8(%rbp), %rsi
callq 0x2bdf0
jmp 0x29176
leaq -0x2b8(%rbp), %rdi
callq 0x4170
leaq -0x2b9(%rbp), %rdi
callq 0x4290
jmp 0x291d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x291c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x2b8(%rbp), %rdi
callq 0x4170
leaq -0x2b9(%rbp), %rdi
callq 0x4290
jmp 0x291e2
jmp 0x291d2
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
movq -0x128(%rbp), %rdi
callq 0x4420
nop