// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq %r15, 0x8(%rsp)
movq (%r15), %rdi
movslq (%r14), %rax
movq (%rdi,%rax,8), %rax
cmpl $0x1a, (%rax)
jne 0x5568
movq %r14, %rsi
callq 0x5db0
movq %rax, (%rbx)
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, %rbp
xorl %eax, %eax
callq 0x8738
movq %rax, 0x28(%rbp)
movq 0x8(%rsp), %rax
movq (%rax), %r15
movslq (%r14), %r13
movq (%r15,%r13,8), %rax
movl (%rax), %ecx
cmpl $0x21, %ecx
movq %rbx, (%rsp)
je 0x55b1
cmpl $0x3, %ecx
jne 0x55b7
movq 0x8(%rax), %rdi
callq 0x1190
movq %rax, (%rbp)
incl %r13d
movl %r13d, (%r14)
movslq %r13d, %rax
movq (%r15,%rax,8), %rbx
movl (%rbx), %eax
orl $0x4, %eax
cmpl $0x25, %eax
jne 0x584d
incl %r13d
movl %r13d, (%r14)
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, %r12
movq %rbp, 0x10(%rax)
xorl %eax, %eax
callq 0x8738
movq %rax, 0x28(%r12)
movl (%rbx), %eax
cmpl $0x21, %eax
je 0x5653
cmpl $0x25, %eax
movq 0x8(%rsp), %rbx
jne 0x56b0
movq (%rbx), %r15
movslq (%r14), %r13
movq (%r15,%r13,8), %rax
cmpl $0x26, (%rax)
je 0x57b6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5e3d
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x5857
movq (%rbx), %r15
movslq (%r14), %rbx
movq (%r15,%rbx,8), %rax
movl (%rax), %edi
cmpl $0x26, %edi
jne 0x5860
leal 0x1(%rbx), %r13d
jmp 0x57b9
movslq (%r14), %rsi
movq 0x8(%rsp), %rbp
movq (%rbp), %rdi
movq (%rdi,%rsi,8), %rax
movl (%rax), %ebx
callq 0x59c5
testb %al, %al
jne 0x56be
andl $-0x9, %ebx
cmpl $0x4, %ebx
je 0x56be
movl (%r14), %r13d
movq (%rbp), %r15
movslq %r13d, %rax
movq (%r15,%rax,8), %rax
movl (%rax), %edi
cmpl $0x3, %edi
jne 0x57b1
movq 0x8(%rax), %rdi
callq 0x1190
movq 0x28(%r12), %rdi
movq %rax, %rsi
callq 0x876b
movl (%r14), %r13d
incl %r13d
movl %r13d, (%r14)
jmp 0x5679
movq (%rbx), %r15
movl (%r14), %r13d
movq %r12, %rbp
jmp 0x55b7
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, 0x10(%rsp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rbp, %rbx
movq %rax, %rbp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6cdc
movq %rax, (%rbp)
testq %rax, %rax
je 0x57df
movq (%rbx), %r15
movl (%r14), %r13d
movslq %r13d, %rax
movq (%r15,%rax,8), %rcx
cmpl $0x30, (%rcx)
jne 0x576d
movslq %r13d, %rax
movq 0x8(%r15,%rax,8), %rcx
cmpl $0x45, (%rcx)
je 0x576d
incl %r13d
movl %r13d, (%r14)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq %rbp, 0x8(%rax)
movq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6cdc
movq %rax, (%rbx)
testq %rax, %rax
je 0x57df
movq (%r15), %r15
movl (%r14), %r13d
movslq %r13d, %rax
movq (%r15,%rax,8), %rcx
cmpl $0x30, (%rcx)
movq %rbx, %rbp
je 0x5711
jmp 0x5770
movq %rbp, %rbx
movq 0x10(%rsp), %rdx
movq %rbx, 0x8(%rdx)
movq (%r15,%rax,8), %rcx
cmpl $0x30, (%rcx)
jne 0x57a6
leal 0x1(%r13), %ebx
movl %ebx, (%r14)
movslq %r13d, %rax
movq 0x8(%r15,%rax,8), %rax
movl (%rax), %edi
cmpl $0x45, %edi
jne 0x5873
addl $0x2, %r13d
movl %r13d, (%r14)
movslq %r13d, %rax
movq %rdx, 0x20(%r12)
movq (%r15,%rax,8), %rax
movl (%rax), %edi
cmpl $0x22, %edi
jne 0x57c4
incl %r13d
movl %r13d, (%r14)
movq %r12, %rbp
jmp 0x55b7
callq 0x8681
leaq 0x4620(%rip), %rdi      # 0x9df0
movl %r13d, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x86ac
jmp 0x581f
leaq 0x4c6d(%rip), %rdi      # 0xa453
xorl %eax, %eax
callq 0x86ac
movq 0x10(%rsp), %rax
movq $0x0, 0x8(%rax)
leaq 0x4853(%rip), %rdi      # 0xa054
xorl %eax, %eax
callq 0x86ac
movq $0x0, 0x20(%r12)
leaq 0x483c(%rip), %rdi      # 0xa054
xorl %eax, %eax
callq 0x86ac
movq (%rsp), %rax
movq $0x0, 0x8(%rax)
leaq 0x47cc(%rip), %rdi      # 0x9ffe
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x86ac
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rbx
movq %rbp, 0x8(%rbx)
jmp 0x583b
leaq 0x47ca(%rip), %rdi      # 0xa028
jmp 0x5818
callq 0x8681
leaq 0x4584(%rip), %rdi      # 0x9df0
movl %ebx, %esi
jmp 0x57d3
callq 0x8681
leaq 0x4571(%rip), %rdi      # 0x9df0
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x86ac
jmp 0x5808