// File: rfotino[P]consolite-compiler/src/syntax.cpp
// Function: VoidStatement::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&)
bool VoidStatement::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) {
  _lineNum = tokenizer->peekNext().line();
  // Parse the function call.
  if (!_fnCall.parse(tokenizer, functions, globals, parameters, localVars)) {
    return false;
  }
  // Make sure the function call is void.
  auto function = getFunction(_fnCall.funcName(), functions);
  if (!function || "void" != function->type().name()) {
    _error("Expected function call to be of type 'void'.", _lineNum);
    return false;
  }
  // Make sure the next symbol is a semicolon.
  if (!_expect(tokenizer, ";")) {
    return false;
  }
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x6bae0
movq -0x160(%rbp), %rdi
callq 0x32270
movl %eax, -0x158(%rbp)
jmp 0x2f1e6
movq -0x168(%rbp), %rax
movl -0x158(%rbp), %ecx
movl %ecx, 0x8(%rax)
leaq -0x68(%rbp), %rdi
callq 0x99b0
movq -0x168(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x1fd00
testb $0x1, %al
jne 0x2f24a
movb $0x0, -0x1(%rbp)
jmp 0x2f58a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x99b0
jmp 0x2f598
movq -0x168(%rbp), %rsi
addq $0x10, %rsi
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x35780
movq -0x170(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x6d580
jmp 0x2f281
leaq -0xa8(%rbp), %rdi
callq 0x8848
leaq -0x88(%rbp), %rdi
callq 0xd8c0
movb %al, %cl
movb $0x0, -0x101(%rbp)
movb $0x0, -0x102(%rbp)
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x171(%rbp)
jne 0x2f2b8
jmp 0x2f321
leaq -0x88(%rbp), %rdi
callq 0xd780
movq %rax, %rsi
leaq -0x100(%rbp), %rdi
callq 0xd910
jmp 0x2f2d5
movb $0x1, -0x101(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0xd940
jmp 0x2f2f1
movb $0x1, -0x102(%rbp)
leaq 0x3fd35(%rip), %rdi     # 0x6f034
leaq -0xc8(%rbp), %rsi
callq 0xd8e0
movb %al, -0x172(%rbp)
jmp 0x2f313
movb -0x172(%rbp), %al
movb %al, -0x171(%rbp)
jmp 0x2f321
movb -0x171(%rbp), %al
movb %al, -0x173(%rbp)
testb $0x1, -0x102(%rbp)
jne 0x2f338
jmp 0x2f344
leaq -0xc8(%rbp), %rdi
callq 0x8848
testb $0x1, -0x101(%rbp)
jne 0x2f34f
jmp 0x2f35b
leaq -0x100(%rbp), %rdi
callq 0xd440
movb -0x173(%rbp), %al
testb $0x1, %al
jne 0x2f36a
jmp 0x2f490
leaq -0x129(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x8760
movq -0x180(%rbp), %rdx
leaq 0x40ba1(%rip), %rsi     # 0x6ff2c
leaq -0x128(%rbp), %rdi
callq 0xced0
jmp 0x2f399
movq -0x168(%rbp), %rax
movl 0x8(%rax), %esi
leaq -0x128(%rbp), %rdi
callq 0x6d960
jmp 0x2f3b1
leaq -0x128(%rbp), %rdi
callq 0x8848
leaq -0x129(%rbp), %rdi
callq 0x8460
movb $0x0, -0x1(%rbp)
movl $0x1, -0x130(%rbp)
jmp 0x2f56e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x8848
jmp 0x2f598
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2f57c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2f43d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
testb $0x1, -0x102(%rbp)
jne 0x2f42f
jmp 0x2f43b
leaq -0xc8(%rbp), %rdi
callq 0x8848
jmp 0x2f43d
testb $0x1, -0x101(%rbp)
jne 0x2f448
jmp 0x2f454
leaq -0x100(%rbp), %rdi
callq 0xd440
jmp 0x2f57c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2f47f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x8848
leaq -0x129(%rbp), %rdi
callq 0x8460
jmp 0x2f57c
movq -0x18(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq -0x151(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x8760
movq -0x188(%rbp), %rdx
leaq 0x40795(%rip), %rsi     # 0x6fc51
leaq -0x150(%rbp), %rdi
callq 0xced0
jmp 0x2f4ca
movq -0x190(%rbp), %rdi
leaq -0x150(%rbp), %rsi
movl $0x1, %edx
callq 0x6da60
movb %al, -0x191(%rbp)
jmp 0x2f4ea
movb -0x191(%rbp), %al
xorb $-0x1, %al
movb %al, -0x192(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x8848
leaq -0x151(%rbp), %rdi
callq 0x8460
movb -0x192(%rbp), %al
testb $0x1, %al
jne 0x2f51c
jmp 0x2f560
movb $0x0, -0x1(%rbp)
movl $0x1, -0x130(%rbp)
jmp 0x2f56e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x2f552
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x8848
leaq -0x151(%rbp), %rdi
callq 0x8460
jmp 0x2f57c
movb $0x1, -0x1(%rbp)
movl $0x1, -0x130(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x94c0
jmp 0x2f58a
leaq -0x88(%rbp), %rdi
callq 0x94c0
jmp 0x2f598
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x8750
nopw %cs:(%rax,%rax)