// File: /workspace/github_c_makefile_star2_O1/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, 0x922a(%rip)      # 0x13158
callq 0x9d10
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x52b2(%rip), %rcx      # 0xf1fe
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x920d(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x9203(%rip)      # 0x13168
callq 0x9d2f
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x5280(%rip), %rcx      # 0xf203
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x91d6(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x91cc(%rip)      # 0x13168
callq 0x9d54
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x524e(%rip), %rcx      # 0xf208
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x919f(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x9195(%rip)      # 0x13168
callq 0x9d79
movq %rax, %rbx
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
leaq 0x521b(%rip), %rcx      # 0xf20c
movq %rcx, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x9168(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x915e(%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, 0x9126(%rip)      # 0x13158
je 0xa125
movq %rax, %r14
leaq 0x51cf(%rip), %r15      # 0xf211
leaq 0x51d0(%rip), %r12      # 0xf219
leaq 0x52f9(%rip), %rbp      # 0xf349
movq %r15, %rdi
callq 0xa184
testq %rax, %rax
je 0xa0c5
callq 0xa6d2
movq 0x90ef(%rip), %r13      # 0x13158
cmpl $0x2, 0x8(%r13)
jne 0xa164
movq (%r13), %rcx
movq 0x10(%r13), %rbx
movq %rcx, 0x90d5(%rip)      # 0x13158
movq %rax, %rdi
callq 0xa64b
movq %rax, %r13
movl $0x1, %edi
movl $0x18, %esi
callq 0x20f0
movq %rbx, 0x8(%rax)
movq %r13, 0x10(%rax)
movq 0x90bc(%rip), %rcx      # 0x13168
movq %rcx, (%rax)
movq %rax, 0x90b2(%rip)      # 0x13168
movq %rbp, %rdi
callq 0xa184
testq %rax, %rax
jne 0xa0e2
jmp 0xa143
movq %r12, %rdi
callq 0xa184
testq %rax, %rax
je 0xa101
callq 0xa1b9
movq 0x9082(%rip), %rax      # 0x13160
movb $0x1, 0x28(%rax)
xorl %esi, %esi
testq %rsi, %rsi
je 0xa0f1
movq %r14, %rdi
callq 0x30b6
cmpq $0x0, 0x905f(%rip)      # 0x13158
jne 0xa050
jmp 0xa125
leaq 0x5118(%rip), %rdi      # 0xf220
callq 0xa184
testq %rax, %rax
je 0xa119
movl $0x1, %edi
jmp 0xa11b
xorl %edi, %edi
callq 0xa383
movq %rax, %rsi
jmp 0xa0e4
movq 0x9034(%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 0x900e(%rip), %rbx      # 0x13158
leaq 0x3eff(%rip), %rdi      # 0xe050
leaq 0x50d5(%rip), %rsi      # 0xf22d
xorl %eax, %eax
callq 0xd7f2
movq %rbx, %rdi
jmp 0xa17c
leaq 0x3ee5(%rip), %rdi      # 0xe050
leaq 0x50b5(%rip), %rsi      # 0xf227
xorl %eax, %eax
callq 0xd7f2
movq %r13, %rdi
movq %rax, %rsi
callq 0xce4d