// File: /workspace/github_c_makefile_star2_O0/Oric4ever[P]lcc65/6502/build/../src/decl.c
// Function: dclr1
static Type dclr1(char **id, int lev) {
	Type ty = 0;

	switch (t) {
	case ID:
		if (id)
			*id = token;
		else
			error("extraneous identifier `%s'\n", token);
		t = gettok();
		break;
	case '*':
		t = gettok();
		if (t == CONST || t == VOLATILE) {
			Type ty1;
			ty1 = ty = tnode(t, 0);
			while ((t = gettok()) == CONST || t == VOLATILE)
				ty1 = tnode(t, ty1);
			ty->type = dclr1(id, lev);
			ty = ty1;
		} else
			ty = dclr1(id, lev);
		ty = tnode(POINTER, ty);
		break;
	case '(':
		t = gettok();
		if (kind[t] == CHAR || t == ID && tsym && tsym->sclass == TYPEDEF) {
			ty = tnode(FUNCTION, ty);
			ty->u.proto = parameters(lev);
			{ foreach(identifiers, level, checkparam, (Generic)0); exitscope(); }
		} else {
			ty = dclr1(id, lev);
			expect(')');
			if (ty == 0 && id == 0)
				return tnode(FUNCTION, ty);
		}
		break;
	case '[':
		break;
	default:
		return ty;
	}
	while (t == '(' || t == '[')
		if (t == '(') {
			t = gettok();
			ty = tnode(FUNCTION, ty);
			ty->u.proto = parameters(lev);
			if (lev == 0 && funcdclr == 0)
				funcdclr++;
			else
				{ foreach(identifiers, level, checkparam, (Generic)0); exitscope(); }
		} else {
			int n = 0;
			t = gettok();
			if (kind[t] == ID) {
				n = intexpr(']', 1);
				if (n <= 0) {
					error("`%d' is an illegal array size\n", n);
					n = 1;
				}
			} else
				expect(']');
			ty = tnode(ARRAY, ty);
			ty->size = n;
		}
	return ty;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
leaq 0x335a2(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, -0x30(%rbp)
subl $0x20, %eax
je 0xa613
jmp 0xa5ea
movl -0x30(%rbp), %eax
subl $0x28, %eax
je 0xa733
jmp 0xa5f8
movl -0x30(%rbp), %eax
subl $0x2a, %eax
je 0xa65a
jmp 0xa602
movl -0x30(%rbp), %eax
subl $0x5b, %eax
je 0xa81c
jmp 0xa81e
cmpq $0x0, -0x10(%rbp)
je 0xa62d
leaq 0x334c7(%rip), %rax     # 0x3dae8
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xa645
leaq 0x334b4(%rip), %rax     # 0x3dae8
movq (%rax), %rsi
leaq 0x25551(%rip), %rdi     # 0x2fb8f
movb $0x0, %al
callq 0xd530
callq 0x15170
movl %eax, %ecx
leaq 0x3352d(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
jmp 0xa82b
callq 0x15170
movl %eax, %ecx
leaq 0x33518(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
leaq 0x3350f(%rip), %rax     # 0x3db80
cmpl $0xf, (%rax)
je 0xa686
leaq 0x33503(%rip), %rax     # 0x3db80
cmpl $0x10, (%rax)
jne 0xa70c
leaq 0x334f3(%rip), %rax     # 0x3db80
movl (%rax), %edi
xorl %eax, %eax
movl %eax, %esi
callq 0xa990
movq %rax, -0x20(%rbp)
movq %rax, -0x28(%rbp)
callq 0x15170
movl %eax, %ecx
leaq 0x334d2(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
movb $0x1, %al
cmpl $0xf, %ecx
movb %al, -0x31(%rbp)
je 0xa6ca
leaq 0x334bf(%rip), %rax     # 0x3db80
cmpl $0x10, (%rax)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xa6d3
jmp 0xa6eb
leaq 0x334a6(%rip), %rax     # 0x3db80
movl (%rax), %edi
movq -0x28(%rbp), %rsi
callq 0xa990
movq %rax, -0x28(%rbp)
jmp 0xa6a0
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xa5c0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xa71c
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xa5c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
movl $0x7, %edi
callq 0xa990
movq %rax, -0x20(%rbp)
jmp 0xa82b
callq 0x15170
movl %eax, %ecx
leaq 0x3343f(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
leaq 0x33436(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x2f23b(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %eax
cmpl $0x3, %eax
je 0xa78a
leaq 0x3341b(%rip), %rax     # 0x3db80
cmpl $0x20, (%rax)
jne 0xa7d9
leaq 0x3337f(%rip), %rax     # 0x3daf0
cmpq $0x0, (%rax)
je 0xa7d9
leaq 0x33372(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movzbl 0x1a(%rax), %eax
cmpl $0x53, %eax
jne 0xa7d9
movq -0x20(%rbp), %rsi
movl $0xb, %edi
callq 0xa990
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
callq 0xaa70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
leaq 0x30982(%rip), %rax     # 0x3b138
movq (%rax), %rdi
leaq 0x367d0(%rip), %rax     # 0x40f90
movl (%rax), %esi
leaq -0x1b69(%rip), %rdx     # 0x8c60
xorl %eax, %eax
movl %eax, %ecx
callq 0x243f0
callq 0x24130
jmp 0xa81a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xa5c0
movq %rax, -0x20(%rbp)
movl $0x29, %edi
callq 0xd670
cmpq $0x0, -0x20(%rbp)
jne 0xa818
cmpq $0x0, -0x10(%rbp)
jne 0xa818
movq -0x20(%rbp), %rsi
movl $0xb, %edi
callq 0xa990
movq %rax, -0x8(%rbp)
jmp 0xa983
jmp 0xa81a
jmp 0xa82b
jmp 0xa82b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa983
jmp 0xa82d
movb $0x1, %al
leaq 0x3334a(%rip), %rcx     # 0x3db80
cmpl $0x28, (%rcx)
movb %al, -0x32(%rbp)
je 0xa84e
leaq 0x3333b(%rip), %rax     # 0x3db80
cmpl $0x5b, (%rax)
sete %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0xa85a
jmp 0xa97b
leaq 0x3331f(%rip), %rax     # 0x3db80
cmpl $0x28, (%rax)
jne 0xa8ec
callq 0x15170
movl %eax, %ecx
leaq 0x33308(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
movq -0x20(%rbp), %rsi
movl $0xb, %edi
callq 0xa990
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %edi
callq 0xaa70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpl $0x0, -0x14(%rbp)
jne 0xa8bf
cmpl $0x0, 0x31188(%rip)     # 0x3ba34
jne 0xa8bf
movl 0x31180(%rip), %eax     # 0x3ba34
addl $0x1, %eax
movl %eax, 0x31177(%rip)     # 0x3ba34
jmp 0xa8e7
leaq 0x30872(%rip), %rax     # 0x3b138
movq (%rax), %rdi
leaq 0x366c0(%rip), %rax     # 0x40f90
movl (%rax), %esi
leaq -0x1c79(%rip), %rdx     # 0x8c60
xorl %eax, %eax
movl %eax, %ecx
callq 0x243f0
callq 0x24130
jmp 0xa976
movl $0x0, -0x2c(%rbp)
callq 0x15170
movl %eax, %ecx
leaq 0x3327f(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
leaq 0x33276(%rip), %rax     # 0x3db80
movl (%rax), %eax
movl %eax, %ecx
leaq 0x2f07b(%rip), %rax     # 0x39990
movsbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jne 0xa950
movl $0x5d, %edi
movl $0x1, %esi
callq 0x10420
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jg 0xa94e
movl -0x2c(%rbp), %esi
leaq 0x2526b(%rip), %rdi     # 0x2fbab
movb $0x0, %al
callq 0xd530
movl $0x1, -0x2c(%rbp)
jmp 0xa95a
movl $0x5d, %edi
callq 0xd670
movq -0x20(%rbp), %rsi
movl $0xc, %edi
callq 0xa990
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0xa82d
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)