// File: /workspace/github_c_makefile_star2_O3/chgzm[P]minic/parser.c
// Function: parse
TransUnitNode* parse(const Vector* vec) {
    // init
    typedef_map = create_strptrmap(1024);
    TransUnitNode* trans_unit_node = create_trans_unit_node();

    int index = 0;
    while (index < vec->size) {
        ExternalDeclNode* external_decl_node = create_external_decl_node(vec, &index);
        if (external_decl_node == NULL) {
            error("Failed to create external-declaration node.\n");
            return NULL;
        }

        vector_push_back(trans_unit_node->external_decl_nodes, external_decl_node);
    }

    return trans_unit_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movl $0x400, %edi            # imm = 0x400
callq 0x88c7
movq %rax, 0x947a(%rip)      # 0xe160
movl $0x8, %edi
callq 0x1100
movq %rax, %rbx
xorl %eax, %eax
callq 0x8738
movq %rax, 0x20(%rsp)
movq %rax, (%rbx)
movl $0x0, 0xc(%rsp)
cmpl $0x0, 0x8(%r14)
jle 0x5187
movq %rbx, 0x18(%rsp)
movabsq $0x100000000, %rbp      # imm = 0x100000000
xorl %r15d, %r15d
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, 0x10(%rsp)
movq (%r14), %r13
movslq %r15d, %r12
movq (%r13,%r12,8), %rax
movl (%rax), %ecx
cmpl $0x5, %ecx
je 0x4e66
cmpl $0xb, %ecx
jne 0x4ef4
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %r15
leal 0x1(%r12), %ebx
movl %ebx, 0xc(%rsp)
movq 0x8(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x4d9d
movq 0x8(%rax), %rdi
callq 0x1190
movq %rax, (%r15)
leal 0x2(%r12), %ebx
movl %ebx, 0xc(%rsp)
movq 0x10(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0x23, %edi
jne 0x51ca
movq %r15, %r12
incl %ebx
movl %ebx, 0xc(%rsp)
movl $0x8, %edi
callq 0x1100
movq %rax, %rbx
xorl %eax, %eax
callq 0x8738
movq %rax, %r15
movq %rax, (%rbx)
movq (%r14), %rax
movslq 0xc(%rsp), %r13
movq (%rax,%r13,8), %rcx
movl (%rcx), %edi
cmpl $0x3, %edi
jne 0x5142
movq 0x8(%rcx), %rdi
callq 0x1190
movq %r15, %rdi
movq %rax, %rsi
callq 0x876b
movslq 0xc(%rsp), %rdx
leaq 0x1(%rdx), %r13
movl %r13d, 0xc(%rsp)
movq (%r14), %rax
movq 0x8(%rax,%rdx,8), %rcx
movl (%rcx), %edi
cmpl $0x30, %edi
jne 0x4e21
leaq 0x2(%rdx), %r13
movl %r13d, 0xc(%rsp)
movq 0x10(%rax,%rdx,8), %rcx
movl (%rcx), %edi
cmpl $0x3, %edi
je 0x4de0
cmpl $0x24, %edi
jne 0x5142
movq %rbx, 0x8(%r12)
leal 0x1(%r13), %ebx
movl %ebx, 0xc(%rsp)
movq 0x10(%rsp), %r15
movq %r12, 0x10(%r15)
movslq %r13d, %rcx
movq 0x8(%rax,%rcx,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x5199
addl $0x2, %r13d
movl %r13d, 0xc(%rsp)
jmp 0x511f
leal 0x1(%r12), %ebx
movl %ebx, 0xc(%rsp)
movq 0x8(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0xa, %edi
jne 0x5199
leal 0x2(%r12), %ebx
movl %ebx, 0xc(%rsp)
movq 0x10(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x5199
movq 0x8(%rax), %rdi
callq 0x1190
leal 0x3(%r12), %ebx
movl %ebx, 0xc(%rsp)
movq 0x18(%r13,%r12,8), %rcx
movl (%rcx), %edi
cmpl $0x3, %edi
jne 0x5199
movq 0x8(%rcx), %rdi
movq %rax, %rbx
callq 0x1190
addl $0x4, %r15d
movl %r15d, 0xc(%rsp)
movq 0x928a(%rip), %rdi      # 0xe160
movq %rax, %rsi
movq %rbx, %rdx
callq 0x88ff
movq 0x10(%rsp), %r15
testq %r15, %r15
jne 0x511f
jmp 0x5177
movq %r12, %rbx
shlq $0x20, %rbx
addq %rbp, %rbx
leaq 0x8(,%r12,8), %r15
incl %r12d
cmpl $0x3, %ecx
jne 0x4f25
movq 0x924b(%rip), %rdi      # 0xe160
movq 0x8(%rax), %rsi
callq 0x89bf
movq (%r14), %r13
testb %al, %al
je 0x4f35
movq (%r13,%r15), %rax
movl (%rax), %ecx
addq %rbp, %rbx
addq $0x8, %r15
jmp 0x4f06
sarq $0x1d, %rbx
movq (%r13,%rbx), %rax
cmpl $0x21, (%rax)
jne 0x4fb8
movslq %r12d, %rax
leaq 0x8(,%rax,8), %rcx
addq %r13, %rcx
shlq $0x20, %rax
movq (%rcx), %rdx
addq %rbp, %rax
addq $0x8, %rcx
cmpl $0x22, (%rdx)
jne 0x4f55
sarq $0x1d, %rax
movq 0x8(%r13,%rax), %rax
cmpl $0x23, (%rax)
jne 0x4fb8
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %r12
xorl %eax, %eax
callq 0x8738
movq %rax, %rbx
movq %rax, (%r12)
movslq 0xc(%rsp), %rsi
movq (%r14), %rdi
movq (%rdi,%rsi,8), %rax
movl (%rax), %r15d
callq 0x59c5
testb %al, %al
leaq 0xc(%rsp), %r13
je 0x50db
jmp 0x50a4
movslq 0xc(%rsp), %r12
leaq (,%r12,8), %rax
addq %r13, %rax
leaq 0x8(,%r12,8), %r15
leal 0x1(%r12), %ebx
shlq $0x20, %r12
addq %rbp, %r12
movq (%rax), %rax
cmpl $0x3, (%rax)
jne 0x4ffb
movq 0x9175(%rip), %rdi      # 0xe160
movq 0x8(%rax), %rsi
callq 0x89bf
movq (%r14), %r13
testb %al, %al
je 0x500a
addq %rbp, %r12
leaq (%r15,%r13), %rax
addq $0x8, %r15
incl %ebx
jmp 0x4fdc
sarq $0x1d, %r12
movq (%r13,%r12), %rax
cmpl $0x21, (%rax)
movq 0x10(%rsp), %r15
jne 0x5085
movslq %ebx, %rax
leaq 0x8(,%rax,8), %rcx
addq %r13, %rcx
shlq $0x20, %rax
movq (%rcx), %rdx
addq %rbp, %rax
addq $0x8, %rcx
cmpl $0x22, (%rdx)
jne 0x502f
sarq $0x1d, %rax
movq 0x8(%r13,%rax), %rax
cmpl $0x1f, (%rax)
jne 0x5085
movl 0xc(%rsp), %eax
movslq %eax, %rcx
movq (%r13,%rcx,8), %rdx
cmpl $0x1f, (%rdx)
je 0x507a
leaq 0x8(,%rcx,8), %rcx
addq %r13, %rcx
incl %eax
movl %eax, 0xc(%rsp)
movq (%rcx), %rdx
addq $0x8, %rcx
cmpl $0x1f, (%rdx)
jne 0x5068
incl %eax
movl %eax, 0xc(%rsp)
jmp 0x4ee6
movq %r14, %rdi
leaq 0xc(%rsp), %rsi
callq 0x5335
movq %rax, 0x8(%r15)
testq %rax, %rax
jne 0x511f
jmp 0x51e4
movq %r14, %rdi
movq %r13, %rsi
callq 0x54a9
testq %rax, %rax
je 0x51b3
movq %rbx, %rdi
movq %rax, %rsi
callq 0x876b
movslq 0xc(%rsp), %rsi
movq (%r14), %rdi
movq (%rdi,%rsi,8), %rax
movl (%rax), %r15d
callq 0x59c5
testb %al, %al
jne 0x50a4
andl $-0x9, %r15d
cmpl $0x4, %r15d
je 0x50a4
movq %r14, %rdi
movq %r13, %rsi
callq 0x5523
movq %rax, 0x8(%r12)
testq %rax, %rax
je 0x51ed
movq %r14, %rdi
movq %r13, %rsi
callq 0x5890
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x51f6
movq 0x10(%rsp), %r15
movq %r12, (%r15)
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x876b
movl 0xc(%rsp), %r15d
cmpl 0x8(%r14), %r15d
jl 0x4d27
movq 0x18(%rsp), %rbx
jmp 0x5187
callq 0x8681
leaq 0x4ca2(%rip), %rdi      # 0x9df0
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x86ac
leaq 0x4d29(%rip), %rdi      # 0x9e8b
xorl %eax, %eax
callq 0x86ac
leaq 0x4c99(%rip), %rdi      # 0x9e09
xorl %eax, %eax
callq 0x86ac
leaq 0x4a02(%rip), %rdi      # 0x9b80
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x86ac
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x8681
leaq 0x4c4b(%rip), %rdi      # 0x9df0
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x86ac
jmp 0x5177
leaq 0x4cf9(%rip), %rdi      # 0x9eb3
xorl %eax, %eax
callq 0x86ac
leaq 0x4c68(%rip), %rdi      # 0x9e30
jmp 0x5170
callq 0x8681
leaq 0x4c1a(%rip), %rdi      # 0x9df0
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x86ac
jmp 0x5169
leaq 0x4c71(%rip), %rdi      # 0x9e5c
jmp 0x5170
leaq 0x4ced(%rip), %rdi      # 0x9ee1
jmp 0x51ba
leaq 0x4d07(%rip), %rdi      # 0x9f04
jmp 0x51ba