// File: /workspace/github_c_makefile_star2_O3/Oric4ever[P]lcc65/6502/build/../src/decl.c
// Function: dclparam
static Symbol dclparam(int sclass, char *id, Type ty, Coordinate *pos) {
	Symbol p;

	if ((p = lookup(id, identifiers)) && p->scope == level
	&& (p->defined || p->type == 0 && ty == 0))
		error("duplicate definition for `%s' previously declared at %w\n",
			id, &p->src);
	else if (p == 0 || p->scope < level)
		p = install(id, &identifiers, 0);
	if (ty && isfunc(ty))
		ty = ptr(ty);
	else if (ty && isarray(ty))
		ty = atop(ty);
	if (sclass == 0)
		sclass = AUTO;
	if (sclass == REGISTER && ty && (isvolatile(ty) || isstruct(ty))) {
		warning("register declaration ignored for `%t%s\n", ty,
			stringf(id ? " %s'" : "' parameter", id));
		sclass = AUTO;
	}
	p->sclass = sclass;
	p->src = *pos;
	if (p->type = ty)
		p->defined = 1;
	if (t == '=') {
		error("illegal initialization for parameter `%s'\n", id);
		t = gettok();
		expr1(0);
	}
	return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x2281d(%rip), %rax     # 0x2a2e8
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x1728e
testq %rax, %rax
je 0x7b1d
movq %rax, %r14
movzwl 0x18(%rax), %eax
leaq 0x28247(%rip), %rcx     # 0x2fd30
movl (%rcx), %ecx
cmpl %eax, %ecx
jne 0x7b19
testb $0x1, 0x1b(%r14)
jne 0x7aff
movq 0x20(%r14), %rdx
orq %r12, %rdx
jne 0x7b19
movq %r14, %rdx
addq $0x28, %rdx
leaq 0x16c00(%rip), %rdi     # 0x1e70d
movq %rbx, %rsi
xorl %eax, %eax
callq 0x974c
jmp 0x7b31
cmpl %eax, %ecx
jle 0x7b31
leaq 0x227c4(%rip), %rsi     # 0x2a2e8
movq %rbx, %rdi
xorl %edx, %edx
callq 0x172de
movq %rax, %r14
testq %r12, %r12
je 0x7b55
movl (%r12), %eax
cmpl $0xf, %eax
jb 0x7b46
movq 0x10(%r12), %rax
movl (%rax), %eax
cmpl $0xb, %eax
jne 0x7b79
movq %r12, %rdi
callq 0x188cc
jmp 0x7b86
testl %ebp, %ebp
movl $0x43, %eax
cmovnel %ebp, %eax
movb %al, 0x1a(%r14)
movups (%r15), %xmm0
movups %xmm0, 0x28(%r14)
movq $0x0, 0x20(%r14)
jmp 0x7c2f
cmpl $0xc, %eax
jne 0x7b89
movq %r12, %rdi
callq 0x18a0a
movq %rax, %r12
testl %ebp, %ebp
movl $0x43, %eax
cmovnel %ebp, %eax
cmpl $0x4e, %eax
sete %cl
testq %r12, %r12
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x7c14
movl (%r12), %eax
cmpl $0x10, %eax
je 0x7bcc
cmpl $0x1f, %eax
je 0x7bcc
cmpl $0xf, %eax
jb 0x7bc0
movq 0x10(%r12), %rax
movl (%rax), %eax
cmpl $0x9, %eax
je 0x7bcc
movb $0x4e, %cl
cmpl $0xa, %eax
jne 0x7c01
testq %rbx, %rbx
leaq 0x16b9d(%rip), %rax     # 0x1e773
leaq 0x16b91(%rip), %rdi     # 0x1e76e
cmoveq %rax, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x11b33
leaq 0x16b54(%rip), %rdi     # 0x1e746
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x9bfd
movb $0x43, %cl
movb %cl, 0x1a(%r14)
movups (%r15), %xmm0
movups %xmm0, 0x28(%r14)
movq %r12, 0x20(%r14)
jmp 0x7c2a
movb %al, 0x1a(%r14)
movups (%r15), %xmm0
movups %xmm0, 0x28(%r14)
movq %r12, 0x20(%r14)
testq %r12, %r12
je 0x7c2f
orb $0x1, 0x1b(%r14)
leaq 0x24daa(%rip), %r15     # 0x2c9e0
cmpl $0x3d, (%r15)
jne 0x7c5c
leaq 0x16b3c(%rip), %rdi     # 0x1e77f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x974c
callq 0xe195
movl %eax, (%r15)
xorl %edi, %edi
callq 0xae91
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq