// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: CompoundStatement::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)
bool CompoundStatement::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,
      bool inLoop) {
  _lineNum = tokenizer->peekNext().line();
  // Make sure the first token is a '{'.
  if (!_expect(tokenizer, "{")) {
    return false;
  }
  // Get the inner statements.
  while ("}" != tokenizer->peekNext().str()) {
    auto statement = StatementToken::parse(tokenizer, functions, globals,
                                           parameters, localVars, labels,
                                           gotos, currentFunc, inLoop);
    if (!statement) {
      return false;
    }
    // Local variables are only allowed as top level statements in
    // a function.
    if (std::dynamic_pointer_cast<LocalVarToken>(statement)) {
      _error("Local variables can only be declared as top level "
             "statements in a function.", statement->line());
      return false;
    }
    _statements.push_back(statement);
  }
  // Consume the final '}' token.
  tokenizer->getNext();
  return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %r14
movq %r14, %rdi
callq 0x32bec
movl 0x8(%r14), %eax
movq %r15, 0x30(%rsp)
movl %eax, 0x8(%r15)
leaq 0x29bea(%rip), %rax     # 0x45d10
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1c144
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1987f(%rip), %rsi     # 0x359d3
leaq 0x19879(%rip), %rdx     # 0x359d4
movq %rsp, %rdi
callq 0xbdee
movq %rsp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x342b6
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1c18b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
testb %bpl, %bpl
je 0x1c326
leaq 0x48(%rsp), %r12
addq $0x10, 0x30(%rsp)
movq %rsp, %rbp
leaq 0x38(%rsp), %r14
movzbl 0xf8(%rsp), %r13d
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x32bec
movq %r12, 0x38(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xbd58
movq %r14, %rdi
leaq 0x197f6(%rip), %rsi     # 0x359d5
callq 0x70c0
movl %eax, %r15d
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x1c1fe
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x29b0b(%rip), %rax     # 0x45d10
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1c225
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
testl %r15d, %r15d
je 0x1c33c
movq %r14, %rdi
movq %rbx, %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movq 0x70(%rsp), %r9
pushq %r13
pushq 0xf8(%rsp)
pushq 0xf8(%rsp)
pushq 0xf8(%rsp)
callq 0x19e3a
addq $0x20, %rsp
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1c30b
leaq 0x29de3(%rip), %rsi     # 0x46060
leaq 0x2a044(%rip), %rdx     # 0x462c8
xorl %ecx, %ecx
callq 0x7330
testq %rax, %rax
je 0x1c2b0
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
leaq 0x10(%rsp), %r15
je 0x1c2cb
movq 0x2acf2(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x1c2c2
incl 0x8(%rdi)
jmp 0x1c2c6
movb $0x1, %r15b
movq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x21ce2
jmp 0x1c30e
lock
incl 0x8(%rdi)
callq 0x8036
movq %r15, (%rsp)
movq %rbp, %rdi
leaq 0x19aee(%rip), %rsi     # 0x35dc7
leaq 0x19b32(%rip), %rdx     # 0x35e12
callq 0xbdee
movq 0x38(%rsp), %rax
movl 0x8(%rax), %esi
movq %rbp, %rdi
callq 0x34178
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1c30b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
xorl %r15d, %r15d
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1c31d
callq 0x8036
testb %r15b, %r15b
jne 0x1c1b0
xorl %ebx, %ebx
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x78(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x32902
leaq 0x299bd(%rip), %rax     # 0x45d10
movq %rax, (%r14)
movq 0x10(%r14), %rdi
leaq 0x98(%rsp), %rax
movb $0x1, %bl
cmpq %rax, %rdi
je 0x1c328
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1c328
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1c3ee
movq 0x10(%rsp), %rsi
jmp 0x1c3e6
movq %rax, %rbx
jmp 0x1c3ee
jmp 0x1c3b0
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x1c3b3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x1c3b3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1c3ee
callq 0x8036
jmp 0x1c3ee
movq %rax, %rbx
leaq 0x29942(%rip), %rax     # 0x45d10
movq %rax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1c3ee
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0