// File: /workspace/github_c_makefile_star2_O1/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 $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rax
cmpl $0x1a, (%rax)
jne 0x55f7
movq %r15, %rdi
movq %r14, %rsi
callq 0x5ecb
movq %rax, (%rbx)
movq %rbx, 0x20(%rsp)
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, %rbx
xorl %eax, %eax
callq 0x8b08
movq %rbx, %r13
movq %rax, 0x28(%rbx)
movq (%r15), %rbx
movslq (%r14), %r12
movq (%rbx,%r12,8), %rax
movl (%rax), %ecx
cmpl $0x21, %ecx
je 0x563f
cmpl $0x3, %ecx
jne 0x5645
movq 0x8(%rax), %rdi
callq 0x1190
movq %rax, (%r13)
incl %r12d
movl %r12d, (%r14)
movslq (%r14), %rax
movq (%rbx,%rax,8), %rbp
movq %r13, %rbx
movl (%rbp), %eax
orl $0x4, %eax
cmpl $0x25, %eax
jne 0x5962
incl (%r14)
movl $0x1, %edi
movl $0x30, %esi
callq 0x10c0
movq %rax, %r12
movq %rbx, 0x10(%rax)
xorl %eax, %eax
callq 0x8b08
movq %rax, 0x28(%r12)
movl (%rbp), %eax
cmpl $0x21, %eax
je 0x56e1
cmpl $0x25, %eax
jne 0x590b
movq %rbx, 0x8(%rsp)
movq (%r15), %rax
movslq (%r14), %rbx
movq (%rax,%rbx,8), %rbp
cmpl $0x26, (%rbp)
je 0x5906
movq %r15, %rdi
movq %r14, %rsi
callq 0x5f58
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x583b
movq (%r15), %rax
movslq (%r14), %rbx
movq (%rax,%rbx,8), %rbp
movl (%rbp), %edi
cmpl $0x26, %edi
je 0x5906
jmp 0x591a
movq %rbx, 0x8(%rsp)
movslq (%r14), %rsi
movq (%r15), %rax
movq (%rax,%rsi,8), %rax
movl (%rax), %ebx
movq %r15, %rdi
callq 0x5ac1
testb %al, %al
jne 0x573e
andl $-0x9, %ebx
cmpl $0x4, %ebx
je 0x573e
movl (%r14), %eax
movq (%r15), %rcx
cltq
movq (%rcx,%rax,8), %rbp
movl (%rbp), %edi
cmpl $0x3, %edi
jne 0x5815
movq 0x8(%rbp), %rdi
callq 0x1190
movq 0x28(%r12), %rdi
movq %rax, %rsi
callq 0x8b3b
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
jmp 0x5709
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, 0x10(%rsp)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6fab
movq %rax, (%rbx)
testq %rax, %rax
je 0x5851
movq %rbx, 0x18(%rsp)
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rbx
cmpl $0x30, (%rbx)
jne 0x586d
movq (%r15), %rax
movslq (%r14), %rcx
movq 0x8(%rax,%rcx,8), %rdx
movl $0x3, %eax
cmpl $0x45, (%rdx)
je 0x5803
incq %rcx
movl %ecx, (%r14)
movl $0x1, %edi
movl $0x10, %esi
callq 0x10c0
movq %rax, %r13
movq 0x18(%rsp), %rax
movq %rax, 0x8(%r13)
movq %r15, %rdi
movq %r14, %rsi
callq 0x6fab
movq %rax, (%r13)
testq %rax, %rax
je 0x57f0
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rbx
xorl %eax, %eax
movq %r13, 0x18(%rsp)
jmp 0x5803
leaq 0x5c7d(%rip), %rdi      # 0xb474
xorl %eax, %eax
callq 0x8a7c
movl $0x1, %eax
testl %eax, %eax
je 0x578a
cmpl $0x3, %eax
movq 0x8(%rsp), %rbx
je 0x5872
xorl %ecx, %ecx
jmp 0x5866
cmpl $0x22, %edi
jne 0x5822
movl (%r14), %ebx
jmp 0x5906
movl (%r14), %ebx
callq 0x8a51
xorl %r13d, %r13d
leaq 0x55bc(%rip), %rdi      # 0xadf0
movl %ebx, %esi
jmp 0x592b
xorl %r13d, %r13d
leaq 0x57e3(%rip), %rdi      # 0xb028
xorl %eax, %eax
callq 0x8a7c
jmp 0x5935
leaq 0x5c1c(%rip), %rdi      # 0xb474
xorl %eax, %eax
callq 0x8a7c
xorl %ecx, %ecx
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rax
jmp 0x587c
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x8(%rax)
testq %rcx, %rcx
je 0x58b9
movq (%r15), %rcx
movslq (%r14), %rax
movq (%rcx,%rax,8), %rdx
cmpl $0x30, (%rdx)
jne 0x58b2
leaq 0x1(%rax), %rbx
movl %ebx, (%r14)
movq 0x8(%rcx,%rax,8), %rcx
movl (%rcx), %edi
cmpl $0x45, %edi
jne 0x58cb
addl $0x2, %eax
movl %eax, (%r14)
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %rax
jmp 0x58ea
leaq 0x5794(%rip), %rdi      # 0xb054
xorl %eax, %eax
callq 0x8a7c
xorl %eax, %eax
jmp 0x58ea
callq 0x8a51
leaq 0x5519(%rip), %rdi      # 0xadf0
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
xorl %eax, %eax
movq 0x8(%rsp), %rbx
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x5948
movq (%r15), %rax
movslq (%r14), %rbx
movq (%rax,%rbx,8), %rbp
movl (%rbp), %edi
cmpl $0x22, %edi
jne 0x591a
incl %ebx
movl %ebx, (%r14)
movq (%r15), %rax
movslq (%r14), %rcx
movq (%rax,%rcx,8), %rbp
movb $0x1, %r13b
jmp 0x593a
callq 0x8a51
xorl %r13d, %r13d
leaq 0x54c7(%rip), %rdi      # 0xadf0
movl %ebx, %esi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8a7c
movq 0x8(%rsp), %r12
movq %r12, %rbx
testb %r13b, %r13b
jne 0x564f
jmp 0x595e
xorl %r13d, %r13d
leaq 0x5702(%rip), %rdi      # 0xb054
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %r12
jmp 0x593a
xorl %eax, %eax
jmp 0x5965
movq %rbx, %rax
movq 0x20(%rsp), %rbx
movq %rax, 0x8(%rbx)
testq %rax, %rax
jne 0x5983
leaq 0x5684(%rip), %rdi      # 0xaffe
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8a7c
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq