// File: /workspace/github_cpp_makefile_star2_O1/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: ForStatement::parse(Tokenizer*, std::vector<std::shared_ptr<FunctionToken>, std::allocator<std::shared_ptr<FunctionToken>>> const&, std::vector<std::shared_ptr<GlobalVarToken>, std::allocator<std::shared_ptr<GlobalVarToken>>> const&, std::vector<std::shared_ptr<ParamToken>, std::allocator<std::shared_ptr<ParamToken>>> const&, std::vector<std::shared_ptr<LocalVarToken>, std::allocator<std::shared_ptr<LocalVarToken>>> const&, std::vector<std::shared_ptr<LabelStatement>, std::allocator<std::shared_ptr<LabelStatement>>>&, std::vector<std::shared_ptr<GotoStatement>, std::allocator<std::shared_ptr<GotoStatement>>>&, std::shared_ptr<FunctionToken> const&)
bool ForStatement::parse(
      Tokenizer *tokenizer,
      const std::vector<std::shared_ptr<FunctionToken>>& functions,
      const std::vector<std::shared_ptr<GlobalVarToken>>& globals,
      const std::vector<std::shared_ptr<ParamToken>>& parameters,
      const std::vector<std::shared_ptr<LocalVarToken>>& localVars,
      std::vector<std::shared_ptr<LabelStatement>>& labels,
      std::vector<std::shared_ptr<GotoStatement>>& gotos,
      const std::shared_ptr<FunctionToken>& currentFunc) {
  _lineNum = tokenizer->peekNext().line();
  // Start with the "for" keyword.
  if (!_expect(tokenizer, "for")) {
    return false;
  }
  // Next get the "(" token.
  if (!_expect(tokenizer, "(")) {
    return false;
  }
  // Get the INIT_LIST.
  if (";" != tokenizer->peekNext().str()) {
    while (true) {
      std::shared_ptr<ExprToken> expr(new ExprToken());
      if (!expr->parse(tokenizer, functions, globals, parameters, localVars)) {
        return false;
      }
      _initExprs.push_back(expr);
      // If the next token is not a comma, we are done. Otherwise consume
      // the comma and continue.
      if ("," != tokenizer->peekNext().str()) {
        break;
      }
      tokenizer->getNext();
    }
  }
  // Make sure the INIT_LIST ended with a ';'.
  if (!_expect(tokenizer, ";")) {
    return false;
  }
  // Get the COND_EXPR. If the next token is a ';', then the COND_EXPR
  // is an implicit truthy value.
  if (";" == tokenizer->peekNext().str()) {
    _condExpr = std::shared_ptr<ExprToken>(new ExprToken(1));
  } else {
    _condExpr = std::shared_ptr<ExprToken>(new ExprToken());
    if (!_condExpr->parse(tokenizer, functions, globals,
                          parameters, localVars)) {
      return false;
    }
  }
  // Make sure the COND_EXPR ended with a ';'.
  if (!_expect(tokenizer, ";")) {
    return false;
  }
  // Get the LOOP_LIST.
  if (")" != tokenizer->peekNext().str()) {
    while (true) {
      std::shared_ptr<ExprToken> expr(new ExprToken());
      if (!expr->parse(tokenizer, functions, globals, parameters, localVars)) {
        return false;
      }
      _loopExprs.push_back(expr);
      // If the next token is not a comma, we are done. Otherwise consume
      // the comma and continue.
      if ("," != tokenizer->peekNext().str()) {
        break;
      }
      tokenizer->getNext();
    }
  }
  // Make sure the LOOP_LIST ended with a ')'.
  if (!_expect(tokenizer, ")")) {
    return false;
  }
  // Get the statement that is the body of the loop, make sure it is valid.
  _body = StatementToken::parse(tokenizer, functions, globals, parameters,
                                localVars, labels, gotos, currentFunc, true);
  if (!_body) {
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r9, %r12
movq %r8, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movq %rsp, %rbx
movq %rbx, %rdi
callq 0x33270
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
leaq 0x29f4c(%rip), %rax     # 0x46ce0
movq %rax, (%rbx)
movq 0x10(%rbx), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1cdb2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x19ff3(%rip), %rsi     # 0x36db5
leaq 0x19fef(%rip), %rdx     # 0x36db8
movq %rsp, %rdi
callq 0xc0a4
movq %rsp, %rsi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1cdf9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bl, %bl
je 0x1d519
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x192ab(%rip), %rsi     # 0x360b9
leaq 0x192a5(%rip), %rdx     # 0x360ba
callq 0xc0a4
movq %rsp, %rsi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1ce42
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bl, %bl
je 0x1d519
movq %r14, 0x60(%rsp)
movq %rsp, %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x33270
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
leaq 0x40(%rsp), %rdi
callq 0xc014
leaq 0x19d3f(%rip), %rsi     # 0x36bc1
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x70c0
movl %eax, %ebx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x1cea6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x29e33(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
movq 0x60(%rsp), %r14
je 0x1ced2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %ebx, %ebx
movq %r12, 0x80(%rsp)
je 0x1d057
addq $0x30, %r14
leaq 0x2a153(%rip), %r13     # 0x47040
leaq 0x40(%rsp), %r15
movl $0x28, %edi
callq 0x72b0
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq %r13, (%rax)
movb $0x1, 0xc(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rax)
movups %xmm0, 0x18(%rax)
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x31340
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r12, %r9
callq 0x1160e
movl $0x1, %ebx
testb %al, %al
je 0x1d032
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0x221f0
movq %rsp, %rdi
movq %rbp, %rsi
callq 0x33270
leaq 0x50(%rsp), %rbx
movq %rbx, 0x40(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xc014
movq %r15, %rdi
leaq 0x19a53(%rip), %rsi     # 0x369e7
callq 0x70c0
movl %eax, %r12d
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1cfb3
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x29d26(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1cfda
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
movl $0x3, %ebx
testl %r12d, %r12d
movq 0x80(%rsp), %r12
jne 0x1d032
leaq 0xb8(%rsp), %rdi
movq %rbp, %rsi
callq 0x32f76
leaq 0x29cdd(%rip), %rax     # 0x46ce0
movq %rax, 0xb8(%rsp)
movq 0xc8(%rsp), %rdi
xorl %ebx, %ebx
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d032
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1d041
callq 0x81ea
testl %ebx, %ebx
je 0x1cef2
cmpl $0x1, %ebx
leaq 0x10(%rsp), %r13
je 0x1d519
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x19b5d(%rip), %rsi     # 0x36bc1
leaq 0x19b57(%rip), %rdx     # 0x36bc2
callq 0xc0a4
movq %rsp, %rsi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1d098
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bl, %bl
je 0x1d519
movq %rsp, %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x33270
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %r15
movq %r15, (%rdi)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
callq 0xc014
leaq 0x19aef(%rip), %rsi     # 0x36bc1
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x70c0
movl %eax, %ebx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x1d0f6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x29be3(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
movq 0x60(%rsp), %r15
je 0x1d122
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %ebx, %ebx
je 0x1d1bc
movl $0x28, %edi
callq 0x72b0
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
leaq 0x29efe(%rip), %rcx     # 0x47040
movq %rcx, (%rax)
movb $0x1, 0xc(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rax)
movups %xmm0, 0x18(%rax)
leaq 0x8(%rsp), %rbx
movq %rax, -0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x31340
movaps -0x8(%rbx), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x8(%rbx)
movq 0x18(%r15), %rdi
movups %xmm0, 0x10(%r15)
testq %rdi, %rdi
je 0x1d186
callq 0x81ea
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d195
callq 0x81ea
movq 0x10(%r15), %rdi
movq %rbp, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r12, %r9
callq 0x1160e
testb %al, %al
jne 0x1d217
jmp 0x1d519
movl $0x28, %edi
callq 0x72b0
movq %rax, %r14
movq %rax, %rdi
movl $0x1, %esi
callq 0x136be
leaq 0x8(%rsp), %rbx
movq %r14, -0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x31340
movaps -0x8(%rbx), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, -0x8(%rbx)
movq 0x18(%r15), %rdi
movups %xmm0, 0x10(%r15)
testq %rdi, %rdi
je 0x1d208
callq 0x81ea
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d217
callq 0x81ea
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x1999d(%rip), %rsi     # 0x36bc1
leaq 0x19997(%rip), %rdx     # 0x36bc2
callq 0xc0a4
movq %rsp, %rsi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1d258
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bl, %bl
je 0x1d519
movq %rsp, %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x33270
leaq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %r15
movq %r15, (%rdi)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
addq %rsi, %rdx
callq 0xc014
leaq 0x1a64c(%rip), %rsi     # 0x378de
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x70c0
movl %eax, %ebx
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x1d2b6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x29a23(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
movq 0x60(%rsp), %r14
je 0x1d2e2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %ebx, %ebx
je 0x1d464
addq $0x48, %r14
leaq 0x29d4b(%rip), %r13     # 0x47040
leaq 0x40(%rsp), %r15
movl $0x28, %edi
callq 0x72b0
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq %r13, (%rax)
movb $0x1, 0xc(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xe(%rax)
movups %xmm0, 0x18(%rax)
movq %rax, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x31340
movq 0x30(%rsp), %rdi
movq %rbp, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r12, %r9
callq 0x1160e
movl $0x1, %ebx
testb %al, %al
je 0x1d43a
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0x221f0
movq %rsp, %rdi
movq %rbp, %rsi
callq 0x33270
leaq 0x50(%rsp), %rbx
movq %rbx, 0x40(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0xc014
movq %r15, %rdi
leaq 0x1964b(%rip), %rsi     # 0x369e7
callq 0x70c0
movl %eax, %r12d
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1d3bb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x2991e(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1d3e2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
movl $0x5, %ebx
testl %r12d, %r12d
movq 0x80(%rsp), %r12
jne 0x1d43a
leaq 0x88(%rsp), %rdi
movq %rbp, %rsi
callq 0x32f76
leaq 0x298d5(%rip), %rax     # 0x46ce0
movq %rax, 0x88(%rsp)
movq 0x98(%rsp), %rdi
xorl %ebx, %ebx
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x1d43a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1d449
callq 0x81ea
testl %ebx, %ebx
je 0x1d2fa
cmpl $0x1, %ebx
movq 0x60(%rsp), %r14
leaq 0x10(%rsp), %r13
je 0x1d519
movq %rsp, %rdi
movq %r13, (%rdi)
leaq 0x1a46d(%rip), %rsi     # 0x378de
leaq 0x1a467(%rip), %rdx     # 0x378df
callq 0xc0a4
movq %rsp, %rsi
movq %rbp, %rdi
movl $0x1, %edx
callq 0x3494f
movl %eax, %ebx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1d4a5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bl, %bl
je 0x1d519
movq %rsp, %rbx
movq %rbx, %rdi
movq %rbp, %rsi
movq 0x68(%rsp), %rdx
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movq %r12, %r9
pushq $0x1
pushq 0x138(%rsp)
pushq 0x138(%rsp)
pushq 0x138(%rsp)
callq 0x1a294
addq $0x20, %rsp
movaps (%rbx), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%rbx)
movq 0x28(%r14), %rdi
movups %xmm0, 0x20(%r14)
testq %rdi, %rdi
je 0x1d500
callq 0x81ea
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1d50f
callq 0x81ea
cmpq $0x0, 0x20(%r14)
setne %al
jmp 0x1d51b
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1d5bb
jmp 0x1d5d6
jmp 0x1d584
movq %rax, %rbx
movl $0x28, %esi
movq %r14, %rdi
jmp 0x1d5cf
jmp 0x1d5bb
jmp 0x1d5d6
jmp 0x1d584
movq %rax, %rbx
leaq 0x29784(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1d5af
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1d5af
jmp 0x1d5ac
jmp 0x1d5bb
jmp 0x1d5d6
movq %rax, %rbx
leaq 0x29752(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1d61b
movq 0x20(%rsp), %rsi
jmp 0x1d5cc
jmp 0x1d5bb
jmp 0x1d5d6
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1d61b
jmp 0x1d616
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x1d61b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1d61b
movq %rax, %rbx
jmp 0x1d61b
movq %rax, %rbx
leaq 0x296fb(%rip), %rax     # 0x46ce0
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1d60c
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1d60c
jmp 0x1d609
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1d61b
callq 0x81ea
movq %rbx, %rdi
callq 0x74f0
nop