// File: rfotino[P]consolite-compiler/src/syntax.cpp
// Function: ExprToken::output(Parser*, VarLocation const&)
void ExprToken::output(Parser *parser, const VarLocation& varLoc) {
  // Evaluate the postfix expression using the stack, pushing nullptr
  // as an operand where a temporary value would go (one that is
  // not already represented by a Token).
  std::stack<Operand> operands;
  for (auto token : _postfix) {
    auto op = std::dynamic_pointer_cast<OperatorToken>(token);
    auto global = std::dynamic_pointer_cast<GlobalVarToken>(token);
    auto var = std::dynamic_pointer_cast<Variable>(token);
    auto literal = std::dynamic_pointer_cast<LiteralToken>(token);
    auto fnCall = std::dynamic_pointer_cast<FunctionCallToken>(token);
    if (nullptr != op) {
      // Pop one or two operands off the stack, depending on if the
      // operator is unary or binary. Then output the operation in
      // assembly.
      Operand rhs = operands.top();
      operands.pop();
      Operand lhs;
      if (op->isBinary()) {
        lhs = operands.top();
        operands.pop();
      }
      Operand result = op->output(parser, lhs, rhs);
      operands.push(result);
    } else if (nullptr != global) {
      // Push the address onto the stack.
      parser->writeInst("MOVI L " + global->name());
      parser->writeInst("PUSH L");
      operands.push(Operand(OperandType::ADDRESS));
    } else if (nullptr != var) {
      // Push nothing onto the stack for a register, or the address onto the
      // stack for a variable on the stack.
      if (var->isReg()) {
        operands.push(Operand(OperandType::REGISTER, var->getReg()));
      } else {
        // Get the variable's location into register M
        parser->writeInst("MOV M FP");
        int offset = var->getOffset();
        if (0 != offset) {
          parser->writeInst("MOVI L " + toHexStr(0 < offset ? offset : -offset));
          if (0 < offset) {
            parser->writeInst("ADD M L");
          } else {
            parser->writeInst("SUB M L");
          }
        }
        // Push the address onto the stack.
        parser->writeInst("PUSH M");
        operands.push(Operand(OperandType::ADDRESS));
      }
    } else if (nullptr != literal) {
      // Don't do anything with the stack, we can save this literal for
      // later use.
      operands.push(Operand(OperandType::LITERAL, literal->val()));
    } else if (nullptr != fnCall) {
      // Get the result of the function call and push it onto the stack.
      fnCall->output(parser);
      parser->writeInst("PUSH L");
      // The result of a function call is a value token.
      operands.push(Operand(OperandType::VALUE));
    }
  }
  // Move the evaluated expression output to the given variable location.
  if (varLoc.isReg()) {
    operandValueToReg(parser, operands.top(), varLoc.getReg());
  } else {
    // Get the variable's address in a register so that we can store to
    // that address.
    int offset = varLoc.getOffset();
    parser->writeInst("MOV M FP");
    if (0 != offset) {
      if (offset < 0) {
        parser->writeInst("MOVI L " + toHexStr(-offset));
        parser->writeInst("SUB M L");
      } else {
        parser->writeInst("MOVI L " + toHexStr(offset));
        parser->writeInst("ADD M L");
      }
    }
    // Pop the result from the expression and store it in the calculated
    // address.
    operandValueToReg(parser, operands.top(), "L");
    parser->writeInst("STOR L M");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x740, %rsp            # imm = 0x740
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x5f0(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x337d0
movq -0x5f0(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x32fd0
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rdi
callq 0x33000
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x33030
testb $0x1, %al
jne 0x223fa
jmp 0x2311b
leaq -0x78(%rbp), %rdi
callq 0x33070
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x33090
leaq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x32a80
leaq -0xb0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x33220
leaq -0xc0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x336b0
leaq -0xd0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x330c0
leaq -0xe0(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x33170
xorl %eax, %eax
movl %eax, %edi
leaq -0xa0(%rbp), %rsi
callq 0x33430
testb $0x1, %al
jne 0x2248a
jmp 0x22610
leaq -0x68(%rbp), %rdi
callq 0x33800
movq %rax, -0x5f8(%rbp)
jmp 0x2249c
movq -0x5f8(%rbp), %rsi
leaq -0x110(%rbp), %rdi
callq 0x33820
jmp 0x224b1
leaq -0x68(%rbp), %rdi
callq 0x33870
jmp 0x224bc
leaq -0x150(%rbp), %rdi
callq 0x33890
jmp 0x224ca
leaq -0xa0(%rbp), %rdi
callq 0x32c70
movq %rax, %rdi
callq 0x32590
movb %al, -0x5f9(%rbp)
jmp 0x224e6
movb -0x5f9(%rbp), %al
testb $0x1, %al
jne 0x224f2
jmp 0x2256b
leaq -0x68(%rbp), %rdi
callq 0x33800
movq %rax, -0x608(%rbp)
jmp 0x22504
movq -0x608(%rbp), %rsi
leaq -0x150(%rbp), %rdi
callq 0x338b0
jmp 0x22519
leaq -0x68(%rbp), %rdi
callq 0x33870
jmp 0x22524
jmp 0x2256b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x225ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x225f3
leaq -0xa0(%rbp), %rdi
callq 0x32c70
movq %rax, %rsi
movq -0x10(%rbp), %rdx
leaq -0x180(%rbp), %rdi
leaq -0x150(%rbp), %rcx
leaq -0x110(%rbp), %r8
callq 0x19120
jmp 0x2259a
leaq -0x68(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x33900
jmp 0x225ac
leaq -0x180(%rbp), %rdi
callq 0x33930
leaq -0x150(%rbp), %rdi
callq 0x33930
leaq -0x110(%rbp), %rdi
callq 0x33930
jmp 0x23078
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x33930
leaq -0x150(%rbp), %rdi
callq 0x33930
leaq -0x110(%rbp), %rdi
callq 0x33930
jmp 0x230ce
xorl %eax, %eax
movl %eax, %edi
leaq -0xb0(%rbp), %rsi
callq 0x32d50
testb $0x1, %al
jne 0x22629
jmp 0x2286f
movq -0x10(%rbp), %rax
movq %rax, -0x610(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xd830
movq %rax, %rsi
addq $0x10, %rsi
leaq -0x1c0(%rbp), %rdi
callq 0xdaa0
jmp 0x22655
leaq 0x4d24f(%rip), %rsi     # 0x6f8ab
leaq -0x1a0(%rbp), %rdi
leaq -0x1c0(%rbp), %rdx
callq 0x325f0
jmp 0x22671
movq -0x610(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xc600
jmp 0x22686
leaq -0x1a0(%rbp), %rdi
callq 0x8848
leaq -0x1c0(%rbp), %rdi
callq 0x8848
movq -0x10(%rbp), %rax
movq %rax, -0x620(%rbp)
leaq -0x1e1(%rbp), %rdi
movq %rdi, -0x618(%rbp)
callq 0x8760
movq -0x618(%rbp), %rdx
leaq 0x4d171(%rip), %rsi     # 0x6f83b
leaq -0x1e0(%rbp), %rdi
callq 0xced0
jmp 0x226d8
movq -0x620(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0xc600
jmp 0x226ed
leaq -0x1e0(%rbp), %rdi
callq 0x8848
leaq -0x1e1(%rbp), %rdi
callq 0x8460
leaq -0x239(%rbp), %rdi
movq %rdi, -0x628(%rbp)
callq 0x8760
movq -0x628(%rbp), %rdx
leaq 0x4da39(%rip), %rsi     # 0x7015f
leaq -0x238(%rbp), %rdi
callq 0xced0
jmp 0x22734
leaq -0x218(%rbp), %rdi
xorl %esi, %esi
leaq -0x238(%rbp), %rdx
callq 0x325b0
jmp 0x2274b
leaq -0x68(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x33950
jmp 0x2275d
leaq -0x218(%rbp), %rdi
callq 0x33930
leaq -0x238(%rbp), %rdi
callq 0x8848
leaq -0x239(%rbp), %rdi
callq 0x8460
jmp 0x23076
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x227b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x8848
leaq -0x1c0(%rbp), %rdi
callq 0x8848
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x227fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x8848
leaq -0x1e1(%rbp), %rdi
callq 0x8460
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x2285e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22852
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x33930
leaq -0x238(%rbp), %rdi
callq 0x8848
leaq -0x239(%rbp), %rdi
callq 0x8460
jmp 0x230ce
xorl %eax, %eax
movl %eax, %edi
leaq -0xc0(%rbp), %rsi
callq 0x33740
testb $0x1, %al
jne 0x22888
jmp 0x22e13
leaq -0xc0(%rbp), %rdi
callq 0x33770
movq %rax, %rdi
callq 0x33980
movb %al, -0x629(%rbp)
jmp 0x228a4
movb -0x629(%rbp), %al
testb $0x1, %al
jne 0x228b3
jmp 0x2295c
leaq -0xc0(%rbp), %rdi
callq 0x33770
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
callq 0x339a0
jmp 0x228d0
leaq -0x270(%rbp), %rdi
movl $0x1, %esi
leaq -0x290(%rbp), %rdx
callq 0x325b0
jmp 0x228ea
leaq -0x68(%rbp), %rdi
leaq -0x270(%rbp), %rsi
callq 0x33950
jmp 0x228fc
leaq -0x270(%rbp), %rdi
callq 0x33930
leaq -0x290(%rbp), %rdi
callq 0x8848
jmp 0x22e0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x2294b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x33930
leaq -0x290(%rbp), %rdi
callq 0x8848
jmp 0x230ce
movq -0x10(%rbp), %rax
movq %rax, -0x640(%rbp)
leaq -0x2b1(%rbp), %rdi
movq %rdi, -0x638(%rbp)
callq 0x8760
movq -0x638(%rbp), %rdx
leaq 0x4d0b9(%rip), %rsi     # 0x6fa41
leaq -0x2b0(%rbp), %rdi
callq 0xced0
jmp 0x22996
movq -0x640(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0xc600
jmp 0x229ab
leaq -0x2b0(%rbp), %rdi
callq 0x8848
leaq -0x2b1(%rbp), %rdi
callq 0x8460
leaq -0xc0(%rbp), %rdi
callq 0x33770
movq %rax, %rdi
callq 0x339d0
movl %eax, -0x644(%rbp)
jmp 0x229df
movl -0x644(%rbp), %eax
movl %eax, -0x2b8(%rbp)
xorl %eax, %eax
cmpl -0x2b8(%rbp), %eax
je 0x22c80
movq -0x10(%rbp), %rax
movq %rax, -0x650(%rbp)
xorl %eax, %eax
cmpl -0x2b8(%rbp), %eax
jge 0x22a1c
movl -0x2b8(%rbp), %eax
movl %eax, -0x654(%rbp)
jmp 0x22a2a
xorl %eax, %eax
subl -0x2b8(%rbp), %eax
movl %eax, -0x654(%rbp)
movl -0x654(%rbp), %eax
movzwl %ax, %esi
leaq -0x2f8(%rbp), %rdi
movl $0x4, %edx
callq 0x6c950
jmp 0x22a46
leaq 0x4ce5e(%rip), %rsi     # 0x6f8ab
leaq -0x2d8(%rbp), %rdi
leaq -0x2f8(%rbp), %rdx
callq 0x325f0
jmp 0x22a62
movq -0x650(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
callq 0xc600
jmp 0x22a77
leaq -0x2d8(%rbp), %rdi
callq 0x8848
leaq -0x2f8(%rbp), %rdi
callq 0x8848
xorl %eax, %eax
cmpl -0x2b8(%rbp), %eax
jge 0x22bd2
movq -0x10(%rbp), %rax
movq %rax, -0x668(%rbp)
leaq -0x319(%rbp), %rdi
movq %rdi, -0x660(%rbp)
callq 0x8760
movq -0x660(%rbp), %rdx
leaq 0x4cf81(%rip), %rsi     # 0x6fa4a
leaq -0x318(%rbp), %rdi
callq 0xced0
jmp 0x22ad7
movq -0x668(%rbp), %rdi
leaq -0x318(%rbp), %rsi
callq 0xc600
jmp 0x22aec
leaq -0x318(%rbp), %rdi
callq 0x8848
leaq -0x319(%rbp), %rdi
callq 0x8460
jmp 0x22c7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22b3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x8848
leaq -0x2b1(%rbp), %rdi
callq 0x8460
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22b7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x8848
leaq -0x2f8(%rbp), %rdi
callq 0x8848
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22bc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x8848
leaq -0x319(%rbp), %rdi
callq 0x8460
jmp 0x230ce
movq -0x10(%rbp), %rax
movq %rax, -0x678(%rbp)
leaq -0x341(%rbp), %rdi
movq %rdi, -0x670(%rbp)
callq 0x8760
movq -0x670(%rbp), %rdx
leaq 0x4ce54(%rip), %rsi     # 0x6fa52
leaq -0x340(%rbp), %rdi
callq 0xced0
jmp 0x22c0c
movq -0x678(%rbp), %rdi
leaq -0x340(%rbp), %rsi
callq 0xc600
jmp 0x22c21
leaq -0x340(%rbp), %rdi
callq 0x8848
leaq -0x341(%rbp), %rdi
callq 0x8460
jmp 0x22c7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22c6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x8848
leaq -0x341(%rbp), %rdi
callq 0x8460
jmp 0x230ce
jmp 0x22c80
movq -0x10(%rbp), %rax
movq %rax, -0x688(%rbp)
leaq -0x369(%rbp), %rdi
movq %rdi, -0x680(%rbp)
callq 0x8760
movq -0x680(%rbp), %rdx
leaq 0x4caff(%rip), %rsi     # 0x6f7ab
leaq -0x368(%rbp), %rdi
callq 0xced0
jmp 0x22cba
movq -0x688(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0xc600
jmp 0x22ccf
leaq -0x368(%rbp), %rdi
callq 0x8848
leaq -0x369(%rbp), %rdi
callq 0x8460
leaq -0x3c1(%rbp), %rdi
movq %rdi, -0x690(%rbp)
callq 0x8760
movq -0x690(%rbp), %rdx
leaq 0x4d457(%rip), %rsi     # 0x7015f
leaq -0x3c0(%rbp), %rdi
callq 0xced0
jmp 0x22d16
leaq -0x3a0(%rbp), %rdi
xorl %esi, %esi
leaq -0x3c0(%rbp), %rdx
callq 0x325b0
jmp 0x22d2d
leaq -0x68(%rbp), %rdi
leaq -0x3a0(%rbp), %rsi
callq 0x33950
jmp 0x22d3f
leaq -0x3a0(%rbp), %rdi
callq 0x33930
leaq -0x3c0(%rbp), %rdi
callq 0x8848
leaq -0x3c1(%rbp), %rdi
callq 0x8460
jmp 0x22e0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22d9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x8848
leaq -0x369(%rbp), %rdi
callq 0x8460
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22dfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22df1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x3a0(%rbp), %rdi
callq 0x33930
leaq -0x3c0(%rbp), %rdi
callq 0x8848
leaq -0x3c1(%rbp), %rdi
callq 0x8460
jmp 0x230ce
jmp 0x23074
xorl %eax, %eax
movl %eax, %edi
leaq -0xd0(%rbp), %rsi
callq 0x339f0
testb $0x1, %al
jne 0x22e2c
jmp 0x22eaf
leaq -0xd0(%rbp), %rdi
callq 0x32c20
movq %rax, %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
movw %ax, -0x692(%rbp)
jmp 0x22e4c
movw -0x692(%rbp), %ax
movzwl %ax, %edx
leaq -0x3f8(%rbp), %rdi
movl $0x3, %esi
callq 0x33a20
jmp 0x22e69
leaq -0x68(%rbp), %rdi
leaq -0x3f8(%rbp), %rsi
callq 0x33950
jmp 0x22e7b
leaq -0x3f8(%rbp), %rdi
callq 0x33930
jmp 0x23072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x3f8(%rbp), %rdi
callq 0x33930
jmp 0x230ce
xorl %eax, %eax
movl %eax, %edi
leaq -0xe0(%rbp), %rsi
callq 0x33a60
testb $0x1, %al
jne 0x22ec8
jmp 0x23070
leaq -0xe0(%rbp), %rdi
callq 0x32f20
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x23710
jmp 0x22ee2
movq -0x10(%rbp), %rax
movq %rax, -0x6a8(%rbp)
leaq -0x419(%rbp), %rdi
movq %rdi, -0x6a0(%rbp)
callq 0x8760
movq -0x6a0(%rbp), %rdx
leaq 0x4c92d(%rip), %rsi     # 0x6f83b
leaq -0x418(%rbp), %rdi
callq 0xced0
jmp 0x22f1c
movq -0x6a8(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0xc600
jmp 0x22f31
leaq -0x418(%rbp), %rdi
callq 0x8848
leaq -0x419(%rbp), %rdi
callq 0x8460
leaq -0x471(%rbp), %rdi
movq %rdi, -0x6b0(%rbp)
callq 0x8760
movq -0x6b0(%rbp), %rdx
leaq 0x4d1f5(%rip), %rsi     # 0x7015f
leaq -0x470(%rbp), %rdi
callq 0xced0
jmp 0x22f78
leaq -0x450(%rbp), %rdi
movl $0x2, %esi
leaq -0x470(%rbp), %rdx
callq 0x325b0
jmp 0x22f92
leaq -0x68(%rbp), %rdi
leaq -0x450(%rbp), %rsi
callq 0x33950
jmp 0x22fa4
leaq -0x450(%rbp), %rdi
callq 0x33930
leaq -0x470(%rbp), %rdi
callq 0x8848
leaq -0x471(%rbp), %rdi
callq 0x8460
jmp 0x23070
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x22fff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x8848
leaq -0x419(%rbp), %rdi
callq 0x8460
jmp 0x230ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23062
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23056
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x450(%rbp), %rdi
callq 0x33930
leaq -0x470(%rbp), %rdi
callq 0x8848
leaq -0x471(%rbp), %rdi
callq 0x8460
jmp 0x230ce
jmp 0x23072
jmp 0x23074
jmp 0x23076
jmp 0x23078
leaq -0xe0(%rbp), %rdi
callq 0x32f70
leaq -0xd0(%rbp), %rdi
callq 0x32f90
leaq -0xc0(%rbp), %rdi
callq 0x337b0
leaq -0xb0(%rbp), %rdi
callq 0x9880
leaq -0xa0(%rbp), %rdi
callq 0x32b50
leaq -0x90(%rbp), %rdi
callq 0x327f0
leaq -0x78(%rbp), %rdi
callq 0x334c0
jmp 0x223e4
leaq -0xe0(%rbp), %rdi
callq 0x32f70
leaq -0xd0(%rbp), %rdi
callq 0x32f90
leaq -0xc0(%rbp), %rdi
callq 0x337b0
leaq -0xb0(%rbp), %rdi
callq 0x9880
leaq -0xa0(%rbp), %rdi
callq 0x32b50
leaq -0x90(%rbp), %rdi
callq 0x327f0
jmp 0x236f7
movq -0x18(%rbp), %rdi
callq 0x33980
movb %al, -0x6b1(%rbp)
jmp 0x2312c
movb -0x6b1(%rbp), %al
testb $0x1, %al
jne 0x2313b
jmp 0x231d1
movq -0x10(%rbp), %rax
movq %rax, -0x6c8(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x33800
movq %rax, -0x6c0(%rbp)
jmp 0x23158
movq -0x18(%rbp), %rsi
leaq -0x498(%rbp), %rdi
callq 0x339a0
jmp 0x2316a
movq -0x6c0(%rbp), %rsi
movq -0x6c8(%rbp), %rdi
leaq -0x498(%rbp), %rdx
callq 0x6c4b0
jmp 0x23186
leaq -0x498(%rbp), %rdi
callq 0x8848
jmp 0x236e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x236f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x498(%rbp), %rdi
callq 0x8848
jmp 0x236f7
movq -0x18(%rbp), %rdi
callq 0x339d0
movl %eax, -0x6cc(%rbp)
jmp 0x231e2
movl -0x6cc(%rbp), %eax
movl %eax, -0x49c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x6e0(%rbp)
leaq -0x4c1(%rbp), %rdi
movq %rdi, -0x6d8(%rbp)
callq 0x8760
movq -0x6d8(%rbp), %rdx
leaq 0x4c827(%rip), %rsi     # 0x6fa41
leaq -0x4c0(%rbp), %rdi
callq 0xced0
jmp 0x23228
movq -0x6e0(%rbp), %rdi
leaq -0x4c0(%rbp), %rsi
callq 0xc600
jmp 0x2323d
leaq -0x4c0(%rbp), %rdi
callq 0x8848
leaq -0x4c1(%rbp), %rdi
callq 0x8460
xorl %eax, %eax
cmpl -0x49c(%rbp), %eax
je 0x23579
cmpl $0x0, -0x49c(%rbp)
jge 0x23417
movq -0x10(%rbp), %rax
movq %rax, -0x6e8(%rbp)
movl -0x49c(%rbp), %eax
negl %eax
movzwl %ax, %esi
leaq -0x508(%rbp), %rdi
movl $0x4, %edx
callq 0x6c950
jmp 0x23299
leaq 0x4c60b(%rip), %rsi     # 0x6f8ab
leaq -0x4e8(%rbp), %rdi
leaq -0x508(%rbp), %rdx
callq 0x325f0
jmp 0x232b5
movq -0x6e8(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
callq 0xc600
jmp 0x232ca
leaq -0x4e8(%rbp), %rdi
callq 0x8848
leaq -0x508(%rbp), %rdi
callq 0x8848
movq -0x10(%rbp), %rax
movq %rax, -0x6f8(%rbp)
leaq -0x529(%rbp), %rdi
movq %rdi, -0x6f0(%rbp)
callq 0x8760
movq -0x6f0(%rbp), %rdx
leaq 0x4c744(%rip), %rsi     # 0x6fa52
leaq -0x528(%rbp), %rdi
callq 0xced0
jmp 0x2331c
movq -0x6f8(%rbp), %rdi
leaq -0x528(%rbp), %rsi
callq 0xc600
jmp 0x23331
leaq -0x528(%rbp), %rdi
callq 0x8848
leaq -0x529(%rbp), %rdi
callq 0x8460
jmp 0x23577
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x4c0(%rbp), %rdi
callq 0x8848
leaq -0x4c1(%rbp), %rdi
callq 0x8460
jmp 0x236f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x233c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x4e8(%rbp), %rdi
callq 0x8848
leaq -0x508(%rbp), %rdi
callq 0x8848
jmp 0x236f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23406
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x528(%rbp), %rdi
callq 0x8848
leaq -0x529(%rbp), %rdi
callq 0x8460
jmp 0x236f7
movq -0x10(%rbp), %rax
movq %rax, -0x700(%rbp)
movzwl -0x49c(%rbp), %esi
leaq -0x570(%rbp), %rdi
movl $0x4, %edx
callq 0x6c950
jmp 0x2343c
leaq 0x4c468(%rip), %rsi     # 0x6f8ab
leaq -0x550(%rbp), %rdi
leaq -0x570(%rbp), %rdx
callq 0x325f0
jmp 0x23458
movq -0x700(%rbp), %rdi
leaq -0x550(%rbp), %rsi
callq 0xc600
jmp 0x2346d
leaq -0x550(%rbp), %rdi
callq 0x8848
leaq -0x570(%rbp), %rdi
callq 0x8848
movq -0x10(%rbp), %rax
movq %rax, -0x710(%rbp)
leaq -0x591(%rbp), %rdi
movq %rdi, -0x708(%rbp)
callq 0x8760
movq -0x708(%rbp), %rdx
leaq 0x4c599(%rip), %rsi     # 0x6fa4a
leaq -0x590(%rbp), %rdi
callq 0xced0
jmp 0x234bf
movq -0x710(%rbp), %rdi
leaq -0x590(%rbp), %rsi
callq 0xc600
jmp 0x234d4
leaq -0x590(%rbp), %rdi
callq 0x8848
leaq -0x591(%rbp), %rdi
callq 0x8460
jmp 0x23577
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23523
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x8848
leaq -0x570(%rbp), %rdi
callq 0x8848
jmp 0x236f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23566
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x590(%rbp), %rdi
callq 0x8848
leaq -0x591(%rbp), %rdi
callq 0x8460
jmp 0x236f7
jmp 0x23579
movq -0x10(%rbp), %rax
movq %rax, -0x720(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x33800
movq %rax, -0x718(%rbp)
jmp 0x23596
leaq -0x5b9(%rbp), %rdi
movq %rdi, -0x728(%rbp)
callq 0x8760
movq -0x728(%rbp), %rdx
leaq 0x4c5b1(%rip), %rsi     # 0x6fb68
leaq -0x5b8(%rbp), %rdi
callq 0xced0
jmp 0x235c5
movq -0x718(%rbp), %rsi
movq -0x720(%rbp), %rdi
leaq -0x5b8(%rbp), %rdx
callq 0x6c4b0
jmp 0x235e1
leaq -0x5b8(%rbp), %rdi
callq 0x8848
leaq -0x5b9(%rbp), %rdi
callq 0x8460
movq -0x10(%rbp), %rax
movq %rax, -0x738(%rbp)
leaq -0x5e1(%rbp), %rdi
movq %rdi, -0x730(%rbp)
callq 0x8760
movq -0x730(%rbp), %rdx
leaq 0x4c435(%rip), %rsi     # 0x6fa5a
leaq -0x5e0(%rbp), %rdi
callq 0xced0
jmp 0x23633
movq -0x738(%rbp), %rdi
leaq -0x5e0(%rbp), %rsi
callq 0xc600
jmp 0x23648
leaq -0x5e0(%rbp), %rdi
callq 0x8848
leaq -0x5e1(%rbp), %rdi
callq 0x8460
jmp 0x236e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x23697
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x5b8(%rbp), %rdi
callq 0x8848
leaq -0x5b9(%rbp), %rdi
callq 0x8460
jmp 0x236f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
jmp 0x236d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x118(%rbp)
movl %eax, -0x11c(%rbp)
leaq -0x5e0(%rbp), %rdi
callq 0x8848
leaq -0x5e1(%rbp), %rdi
callq 0x8460
jmp 0x236f7
leaq -0x68(%rbp), %rdi
callq 0x33a90
addq $0x740, %rsp            # imm = 0x740
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0x33a90
movq -0x118(%rbp), %rdi
callq 0x8750
nopl (%rax)