// File: /workspace/github_c_makefile_star2_O1/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 $0x18, %rsp
movq %rdi, %rbx
movabsq $0x100000000, %r15      # imm = 0x100000000
movl $0x400, %edi            # imm = 0x400
callq 0x8c93
movq %rax, 0xa460(%rip)      # 0xf160
movl $0x8, %edi
callq 0x1100
movq %rax, %r14
xorl %eax, %eax
callq 0x8b08
movq %r14, 0x10(%rsp)
movq %rax, (%r14)
leaq 0x4(%rsp), %rax
movl $0x0, (%rax)
movslq 0x4(%rsp), %r12
cmpl 0x8(%rbx), %r12d
jge 0x5267
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, 0x8(%rsp)
movq (%rbx), %r13
movq (%r13,%r12,8), %rax
movl (%rax), %eax
cmpl $0x5, %eax
je 0x4e35
cmpl $0xb, %eax
jne 0x4eb8
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbp
leal 0x1(%r12), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%r13,%r12,8), %rax
cmpl $0x3, (%rax)
jne 0x4da1
movq 0x8(%rax), %rdi
callq 0x1190
movq %rax, (%rbp)
leal 0x2(%r12), %eax
movl %eax, 0x4(%rsp)
movslq 0x4(%rsp), %r14
movq (%r13,%r14,8), %rax
movl (%rax), %edi
cmpl $0x23, %edi
jne 0x50b2
leal 0x1(%r14), %eax
movl %eax, 0x4(%rsp)
movl $0x8, %edi
callq 0x1100
movq %rax, %r12
xorl %eax, %eax
callq 0x8b08
movq %rax, %r14
movq %rax, (%r12)
movq (%rbx), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x50cd
movq 0x8(%rax), %rdi
callq 0x1190
movq %r14, %rdi
movq %rax, %rsi
callq 0x8b3b
movslq 0x4(%rsp), %rcx
leaq 0x1(%rcx), %rax
movl %eax, 0x4(%rsp)
movq (%rbx), %rdx
movq 0x8(%rdx,%rcx,8), %rax
cmpl $0x30, (%rax)
jne 0x4e2b
leaq 0x2(%rcx), %rax
movl %eax, 0x4(%rsp)
movq 0x10(%rdx,%rcx,8), %rax
cmpl $0x24, (%rax)
jne 0x4de5
jmp 0x50ee
leaq 0x1(%r12), %r14
movl %r14d, 0x4(%rsp)
movq 0x8(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0xa, %edi
jne 0x5159
leaq 0x2(%r12), %r14
movl %r14d, 0x4(%rsp)
movq 0x10(%r13,%r12,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x5159
movq 0x8(%rax), %rdi
callq 0x1190
leaq 0x3(%r12), %r14
movl %r14d, 0x4(%rsp)
movq 0x18(%r13,%r12,8), %rcx
movl (%rcx), %ebp
cmpl $0x3, %ebp
jne 0x5239
movq 0x8(%rcx), %rdi
movq %rax, %r14
callq 0x1190
addl $0x4, %r12d
movl %r12d, 0x4(%rsp)
movq 0xa2b8(%rip), %rdi      # 0xf160
movq %rax, %rsi
movq %r14, %rdx
callq 0x8ccb
jmp 0x5254
leaq (,%r12,8), %rax
addq %r13, %rax
leaq 0x8(,%r12,8), %r13
movq %r12, %r14
shlq $0x20, %r14
addq %r15, %r14
leal 0x1(%r12), %ebp
movq (%rax), %rax
cmpl $0x3, (%rax)
jne 0x4ef6
movq 0xa277(%rip), %rdi      # 0xf160
movq 0x8(%rax), %rsi
callq 0x8d8c
testb %al, %al
je 0x4f07
addq %r15, %r14
movq %r13, %rax
addq $0x8, %r13
addq (%rbx), %rax
incl %ebp
jmp 0x4eda
movq (%rbx), %rax
sarq $0x1d, %r14
movq (%rax,%r14), %rcx
cmpl $0x21, (%rcx)
jne 0x4fce
movslq %ebp, %rcx
leaq (%rax,%rcx,8), %rdx
addq $0x8, %rdx
shlq $0x20, %rcx
movq (%rdx), %rsi
addq %r15, %rcx
addq $0x8, %rdx
cmpl $0x22, (%rsi)
jne 0x4f2a
sarq $0x1d, %rcx
movq 0x8(%rax,%rcx), %rcx
cmpl $0x23, (%rcx)
jne 0x4fce
movl $0x1, %edi
movl $0x18, %esi
callq 0x10c0
movq %rax, %rbp
xorl %eax, %eax
callq 0x8b08
movq %rax, %r12
movq %rax, (%rbp)
movslq 0x4(%rsp), %rsi
movq (%rbx), %rax
movq (%rax,%rsi,8), %rax
movl (%rax), %r14d
movq %rbx, %rdi
callq 0x5ac1
testb %al, %al
jne 0x4f94
andl $-0x9, %r14d
cmpl $0x4, %r14d
jne 0x51d8
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x5537
movq %rax, %r14
testq %rax, %rax
je 0x4fb6
movq %r12, %rdi
movq %r14, %rsi
callq 0x8b3b
jmp 0x4fc4
leaq 0x5ef6(%rip), %rdi      # 0xaeb3
xorl %eax, %eax
callq 0x8a7c
testq %r14, %r14
jne 0x4f6b
jmp 0x5219
movslq 0x4(%rsp), %r14
leaq (%rax,%r14,8), %rax
leaq 0x8(,%r14,8), %r12
leal 0x1(%r14), %ebp
shlq $0x20, %r14
addq %r15, %r14
movq (%rax), %rax
cmpl $0x3, (%rax)
jne 0x5006
movq 0xa167(%rip), %rdi      # 0xf160
movq 0x8(%rax), %rsi
callq 0x8d8c
testb %al, %al
je 0x5017
addq %r15, %r14
movq %r12, %rax
addq $0x8, %r12
addq (%rbx), %rax
incl %ebp
jmp 0x4fea
movq (%rbx), %rax
sarq $0x1d, %r14
movq (%rax,%r14), %rcx
cmpl $0x21, (%rcx)
movq 0x8(%rsp), %r12
jne 0x508b
movslq %ebp, %rcx
leaq (%rax,%rcx,8), %rdx
addq $0x8, %rdx
shlq $0x20, %rcx
movq (%rdx), %rsi
addq %r15, %rcx
addq $0x8, %rdx
cmpl $0x22, (%rsi)
jne 0x503b
sarq $0x1d, %rcx
movq 0x8(%rax,%rcx), %rcx
cmpl $0x1f, (%rcx)
jne 0x508b
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
cmpl $0x1f, (%rdx)
je 0x5082
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
incl %ecx
movl %ecx, 0x4(%rsp)
movq (%rax), %rdx
addq $0x8, %rax
incl %ecx
cmpl $0x1f, (%rdx)
jne 0x5070
incl 0x4(%rsp)
jmp 0x5185
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x53b5
movq %rax, 0x8(%r12)
testq %rax, %rax
jne 0x5185
leaq 0x5daf(%rip), %rdi      # 0xae5c
jmp 0x517b
callq 0x8a51
leaq 0x5d32(%rip), %rdi      # 0xadf0
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
jmp 0x512b
movl 0x4(%rsp), %r14d
callq 0x8a51
leaq 0x5d12(%rip), %rdi      # 0xadf0
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
xorl %r12d, %r12d
movq %r12, 0x8(%rbp)
testq %r12, %r12
je 0x511d
movq (%rbx), %rax
movslq 0x4(%rsp), %r14
movq (%rax,%r14,8), %rax
movl (%rax), %edi
cmpl $0x24, %edi
movq 0x8(%rsp), %r12
jne 0x51b8
leal 0x1(%r14), %eax
movl %eax, 0x4(%rsp)
jmp 0x5132
leaq 0x5d67(%rip), %rdi      # 0xae8b
xorl %eax, %eax
callq 0x8a7c
xorl %ebp, %ebp
movq 0x8(%rsp), %r12
movq %rbp, 0x10(%r12)
testq %rbp, %rbp
je 0x5174
movq (%rbx), %rax
movslq 0x4(%rsp), %r14
movq (%rax,%r14,8), %rax
movl (%rax), %edi
cmpl $0x1f, %edi
jne 0x5159
leal 0x1(%r14), %eax
movl %eax, 0x4(%rsp)
jmp 0x5185
callq 0x8a51
leaq 0x5c8b(%rip), %rdi      # 0xadf0
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
jmp 0x5182
leaq 0x5c8e(%rip), %rdi      # 0xae09
xorl %eax, %eax
callq 0x8a7c
xorl %r12d, %r12d
testq %r12, %r12
je 0x519c
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x8b3b
jmp 0x51aa
leaq 0x59dd(%rip), %rdi      # 0xab80
xorl %eax, %eax
callq 0x8a7c
testq %r12, %r12
jne 0x4d27
jmp 0x526e
callq 0x8a51
leaq 0x5c2c(%rip), %rdi      # 0xadf0
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
xorl %ebp, %ebp
jmp 0x5132
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x55b4
movq %rax, 0x8(%rbp)
leaq 0x5cf1(%rip), %rdi      # 0xaee1
testq %rax, %rax
je 0x5212
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
callq 0x5995
movq %rax, 0x10(%rbp)
leaq 0x5cf7(%rip), %rdi      # 0xaf04
testq %rax, %rax
jne 0x521b
xorl %eax, %eax
callq 0x8a7c
xorl %ebp, %ebp
movq 0x8(%rsp), %r12
movq %rbp, (%r12)
testq %rbp, %rbp
jne 0x5185
leaq 0x5bfc(%rip), %rdi      # 0xae30
jmp 0x517b
movl %ebp, %edi
callq 0x8a51
leaq 0x5ba9(%rip), %rdi      # 0xadf0
movl %r14d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq 0x8(%rsp), %r12
cmpl $0x3, %ebp
jne 0x5182
jmp 0x5185
movq 0x10(%rsp), %rax
jmp 0x5270
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq