// File: /workspace/github_c_makefile_star2_O3/takoeight0821[P]hoc_nyan/src/parse.c
// Function: parse
Program *parse(Token *t) {
  tokens = t;

  init_typedef();

  Program *prog = calloc(1, sizeof(Program));
  prog->funcs = new_vec();

  while (tokens) {
    Function *func = toplevel();
    if (func) {
      vec_push(prog->funcs, func);
    }
  }

  prog->globals = global_env;

  return prog;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, 0x9306(%rip)      # 0x13158
callq 0x9c78
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x5366(%rip), %rcx      # 0xf1d6
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x92e9(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x92df(%rip)      # 0x13168
callq 0x9c87
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x5334(%rip), %rcx      # 0xf1db
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x92b2(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x92a8(%rip)      # 0x13168
callq 0x9cac
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x5302(%rip), %rcx      # 0xf1e0
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x927b(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x9271(%rip)      # 0x13168
callq 0x9cd1
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x52cf(%rip), %rcx      # 0xf1e4
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x9244(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x923a(%rip)      # 0x13168
movl $0x1, %edi
movl $0x10, %esi
callq 0x20f0
movq %rax, %rbx
xorl %eax, %eax
callq 0x307c
movq %rbx, (%rsp)
movq %rax, (%rbx)
cmpq $0x0, 0x9202(%rip)      # 0x13158
je 0xa040
movq %rax, %r14
leaq 0x5283(%rip), %r15      # 0xf1e9
leaq 0x5284(%rip), %r12      # 0xf1f1
leaq 0x53af(%rip), %rbp      # 0xf323
movq %r15, %rdi
callq 0xa09f
testq %rax, %rax
je 0x9fe9
callq 0xa5b8
movq 0x91cb(%rip), %r13      # 0x13158
cmpl $0x2, 0x8(%r13)
jne 0xa07f
movq (%r13), %rcx
movq 0x10(%r13), %rbx
movq %rcx, 0x91b1(%rip)      # 0x13158
movq %rax, %rdi
callq 0xa531
movq %rax, %r13
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
movq %rbx, 0x8(%rax)
movq %r13, 0x10(%rax)
movq 0x9198(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x918e(%rip)      # 0x13168
movq %rbp, %rdi
callq 0xa09f
testq %rax, %rax
jne 0xa032
jmp 0xa05e
movq %r12, %rdi
callq 0xa09f
testq %rax, %rax
je 0xa008
callq 0xa0d4
movq 0x915e(%rip), %rax      # 0x13160
movb $0x1, 0x28(%rax)
jmp 0xa032
leaq 0x51e9(%rip), %rdi      # 0xf1f8
callq 0xa09f
xorl %edi, %edi
testq %rax, %rax
setne %dil
callq 0xa287
testq %rax, %rax
je 0xa032
movq %r14, %rdi
movq %rax, %rsi
callq 0x30ae
cmpq $0x0, 0x911e(%rip)      # 0x13158
jne 0x9f74
movq 0x9119(%rip), %rcx      # 0x13160
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x90f3(%rip), %rbx      # 0x13158
leaq 0x3fe4(%rip), %rdi      # 0xe050
leaq 0x5192(%rip), %rsi      # 0xf205
xorl %eax, %eax
callq 0xd86a
movq %rbx, %rdi
jmp 0xa097
leaq 0x3fca(%rip), %rdi      # 0xe050
leaq 0x5172(%rip), %rsi      # 0xf1ff
xorl %eax, %eax
callq 0xd86a
movq %r13, %rdi
movq %rax, %rsi
callq 0xcd01