// File: CoinXu[P]reviser-compiler/src/parser.cpp
// Function: reviser::compiler::Parser::Program()
void Parser::Program() {
    Accept(TOKEN_CODE_START);
    generator->descriptor->PushNewContext();

    do {
      if (LookAtType(TOKEN_STRUCT)) {
        Struct* s = ConsumeStruct();
        generator->descriptor->AddGlobalVariableOnce(s->id->text, DECLARE_STRUCT);
        generator->AddStmtStruct(s);
      } else if (LookAtType(TOKEN_ENUM)) {
        Enum* s = ConsumeEnum();
        generator->descriptor->AddGlobalVariableOnce(s->id->text, DECLARE_ENUM);
        generator->AddStmtEnum(s);
      } else {
        Next();
      }
    } while (!Accept(TOKEN_CODE_END));

    generator->descriptor->PopBackContext();
    printer->Print(generator->Generate());
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movl $0x8, %esi
callq 0xa75f0
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rdi
callq 0xbca80
movq -0x90(%rbp), %rdi
movl $0x2, %esi
callq 0xa7650
testb $0x1, %al
jne 0xa73d2
jmp 0xa7471
movq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xa7680
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq 0x8(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x991c0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl $0x1, %edx
callq 0xbd300
jmp 0xa7435
leaq -0x30(%rbp), %rdi
callq 0x992c0
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0xb6e10
jmp 0xa753c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x992c0
jmp 0xa75df
movq -0x90(%rbp), %rdi
movl $0x3, %esi
callq 0xa7650
testb $0x1, %al
jne 0xa748b
jmp 0xa752e
movq -0x90(%rbp), %rdi
xorl %eax, %eax
movl %eax, -0xa4(%rbp)
movl %eax, %esi
callq 0xa7d10
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rsi
addq $0x8, %rsi
leaq -0x68(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x991c0
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movl -0xa4(%rbp), %edx
callq 0xbd300
jmp 0xa74f5
leaq -0x68(%rbp), %rdi
callq 0x992c0
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0xb6db0
jmp 0xa753a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x992c0
jmp 0xa75df
movq -0x90(%rbp), %rdi
callq 0xa81d0
jmp 0xa753c
jmp 0xa753e
movq -0x90(%rbp), %rdi
movl $0x9, %esi
callq 0xa75f0
xorb $-0x1, %al
testb $0x1, %al
jne 0xa73b8
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rdi
callq 0xbcb30
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x50(%rax), %rax
movq %rax, -0xc8(%rbp)
movq (%rsi), %rax
movq 0x10(%rax), %rax
leaq -0x88(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq *%rax
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0xa75b2
leaq -0x88(%rbp), %rdi
callq 0x992c0
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x992c0
movq -0x38(%rbp), %rdi
callq 0x99840
nopl (%rax,%rax)