// File: /workspace/github_c_makefile_star2_O2/chgzm[P]minic/parser.c
// Function: create_declarator_node
static DeclaratorNode* create_declarator_node(const Vector* vec, int* index) {
    DeclaratorNode* declarator_node = calloc(1, sizeof(DeclaratorNode));

    const Token* token = vec->elements[*index];
    if (token->type == TK_ASTER) {
        declarator_node->pointer_node = create_pointer_node(vec, index); 
    }

    declarator_node->direct_declarator_node = create_direct_declarator_node(vec, index);
    if (declarator_node->direct_declarator_node == NULL) {
        error("Failed to create direct-declarator node.\n");
        return NULL;
    }

    return declarator_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x10c0
movq %rax, %rbx
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1a, (%rax)
jne 0x5266
movq %r15, %rdi
movq %r14, %rsi
callq 0x5a0e
movq %rax, (%rbx)
movq %rbx, 0x8(%rsp)
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10c0
movq %rax, %r12
xorl %eax, %eax
callq 0x812e
movq %rax, 0x28(%r12)
movq (%r15), %rbx
movslq (%r14), %r13
movq (%rbx,%r13,8), %rax
movl (%rax), %ecx
cmpl $0x21, %ecx
je 0x52a8
cmpl $0x3, %ecx
jne 0x52ae
movq 0x8(%rax), %rdi
callq 0x1190
movq %rax, (%r12)
incl %r13d
movl %r13d, (%r14)
movslq %r13d, %rax
movq (%rbx,%rax,8), %rbx
movl (%rbx), %eax
orl $0x4, %eax
cmpl $0x25, %eax
jne 0x54ea
incl %r13d
movl %r13d, (%r14)
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x10c0
movq %rax, %rbp
movq %r12, 0x10(%rax)
xorl %eax, %eax
callq 0x812e
movq %rax, 0x28(%rbp)
movl (%rbx), %eax
cmpl $0x21, %eax
je 0x5340
cmpl $0x25, %eax
jne 0x53d8
movq (%r15), %rbx
movslq (%r14), %r13
movq (%rbx,%r13,8), %rax
cmpl $0x26, (%rax)
je 0x545c
movq %r15, %rdi
movq %r14, %rsi
callq 0x5a86
movq %rax, 0x18(%rbp)
testq %rax, %rax
je 0x54f5
movq (%r15), %rbx
movslq (%r14), %r12
movq (%rbx,%r12,8), %rax
movl (%rax), %edi
cmpl $0x26, %edi
jne 0x54fe
leal 0x1(%r12), %r13d
jmp 0x545f
movl (%r14), %esi
movq %r15, %rdi
callq 0x518f
testb %al, %al
je 0x53e6
pushq $0x1
popq %rbx
movq %rbx, %rdi
pushq $0x10
popq %r12
movq %r12, %rsi
callq 0x10c0
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x10c0
movq %rax, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x67ee
movq %rax, (%r12)
testq %rax, %rax
je 0x5485
movq (%r15), %rbx
movl (%r14), %r13d
movslq %r13d, %rax
movq (%rbx,%rax,8), %rcx
cmpl $0x30, (%rcx)
jne 0x541a
movq 0x8(%rbx,%rax,8), %rcx
cmpl $0x45, (%rcx)
je 0x541a
incq %rax
movl %eax, (%r14)
pushq $0x1
popq %rdi
pushq $0x10
popq %rsi
callq 0x10c0
movq %rax, %r13
movq %r12, 0x8(%rax)
movq %r15, %rdi
movq %r14, %rsi
callq 0x67ee
movq %rax, (%r13)
movq %r13, %r12
jmp 0x5387
movq (%r15), %rbx
movl (%r14), %r13d
movq %rbp, %r12
jmp 0x52ae
movl (%r14), %r13d
movq (%r15), %rbx
movslq %r13d, %rax
movq (%rbx,%rax,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x5457
movq 0x8(%rax), %rdi
callq 0x1190
movq 0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x8167
movl (%r14), %r13d
incl %r13d
movl %r13d, (%r14)
jmp 0x53e9
movq 0x10(%rsp), %rdx
movq %r12, 0x8(%rdx)
movq (%rbx,%rax,8), %rcx
cmpl $0x30, (%rcx)
jne 0x544d
leaq 0x1(%rax), %r12
movl %r12d, (%r14)
movq 0x8(%rbx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x45, %edi
jne 0x5512
addq $0x2, %rax
movl %eax, (%r14)
movl %eax, %r13d
movq %rdx, 0x20(%rbp)
movq (%rbx,%rax,8), %rax
movl (%rax), %edi
cmpl $0x22, %edi
jne 0x546a
incl %r13d
movl %r13d, (%r14)
movq %rbp, %r12
jmp 0x52ae
callq 0x807a
leaq 0x497a(%rip), %rdi      # 0x9df0
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x80a8
jmp 0x54be
leaq 0x4fc7(%rip), %rdi      # 0xa453
xorl %eax, %eax
callq 0x80a8
movq 0x10(%rsp), %rax
andq $0x0, 0x8(%rax)
leaq 0x4bb0(%rip), %rdi      # 0xa054
xorl %eax, %eax
callq 0x80a8
andq $0x0, 0x20(%rbp)
leaq 0x4b9d(%rip), %rdi      # 0xa054
xorl %eax, %eax
callq 0x80a8
movq 0x8(%rsp), %rax
andq $0x0, 0x8(%rax)
leaq 0x4b2f(%rip), %rdi      # 0x9ffe
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x80a8
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rbx
movq %r12, 0x8(%rbx)
jmp 0x54d8
leaq 0x4b2c(%rip), %rdi      # 0xa028
jmp 0x54b7
callq 0x807a
leaq 0x48e6(%rip), %rdi      # 0x9df0
movl %r12d, %esi
jmp 0x5479
callq 0x807a
leaq 0x48d2(%rip), %rdi      # 0x9df0
movl %r12d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x80a8
jmp 0x54ab