// File: /workspace/github_c_makefile_star2_O2/Oric4ever[P]lcc65/6502/build/../src/decl.c
// Function: parameters
static Type *parameters(int lev) {
	Type *proto = 0;

	enterscope();
	if (kind[t] == CHAR || kind[t] == STATIC
	|| t == ID && tsym && tsym->sclass == TYPEDEF) {
		int sclass, n = 0;
		Type last = 0, ty;
		List list = 0;
		for (;;) {
			Symbol p;
			char *id = 0;
			n++;
			if (last && t == ELLIPSIS) {
				if (last == voidtype)
					error("illegal formal parameter types\n");
				list = append(voidtype, list);
				t = gettok();
				break;
			}
			if (t == ID && (tsym == 0 || tsym->sclass != TYPEDEF)
			||  t != ID && t != REGISTER && kind[t] != CHAR)
				error("missing parameter type\n");
			ty = dclr(type(PARAM, &sclass), &id, lev + 1);
			if (Aflag >= 1 && !hasproto(ty))
				warning("missing prototype\n");
			if (ty == voidtype && (last || id))
				error("illegal formal parameter types\n");
			if (id == 0)
				id = stringd(n);
			if (ty == voidtype)
				list = append(voidtype, list);
			else {
				p = dclparam(sclass, id, ty, &src);
				list = append(p->type, list);
			}
			last = ty;
			if (t != ',')
				break;
			t = gettok();
		}
		proto = (Type *)list_to_a(list, (Generic *)alloc((n + 1)*sizeof (Type)));
	} else if (t == ID) {
		for (;;) {
			if (t != ID) {
				error("expecting an identifier\n");
				break;
			}
			dclparam(0, token, (Type)0, &src);
			t = gettok();
			if (t != ',')
				break;
			t = gettok();
		}
	}
	if (t != ')') {
		static char follow[] = { CHAR, STATIC, IF, ')', 0 };
		expect(')');
		skipto('{', follow);
	}
	if (t == ')')
		t = gettok();
	return proto;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
callq 0x15bbf
leaq 0x2423a(%rip), %r12     # 0x2b9e0
movl (%r12), %eax
leaq 0x20dcf(%rip), %rcx     # 0x28580
movzbl (%rcx,%rax), %ecx
cmpl $0x3, %ecx
je 0x77c3
cmpl $0x51, %ecx
jne 0x79cf
incl %ebp
pushq $0x10
popq %rbx
pushq $0x1
popq %r15
xorl %r12d, %r12d
xorl %r14d, %r14d
andq $0x0, 0x8(%rsp)
testq %r12, %r12
setne %cl
cmpl $0x40, %eax
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
je 0x7911
cmpl $0x4e, %eax
je 0x782d
cmpl $0x20, %eax
jne 0x7810
leaq 0x24150(%rip), %rax     # 0x2b950
movq (%rax), %rax
testq %rax, %rax
je 0x781f
cmpb $0x53, 0x1a(%rax)
jne 0x781f
jmp 0x782d
movl %eax, %eax
leaq 0x20d67(%rip), %rcx     # 0x28580
cmpb $0x3, (%rcx,%rax)
je 0x782d
leaq 0x15380(%rip), %rdi     # 0x1cba6
xorl %eax, %eax
callq 0x8dd4
pushq $0x4
popq %rdi
leaq 0x14(%rsp), %rsi
callq 0x647e
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
movl %ebp, %edx
callq 0x71eb
movq %rax, %r13
leaq 0x24205(%rip), %rax     # 0x2ba58
cmpl $0x0, (%rax)
jle 0x7872
movq %r13, %rdi
callq 0x1805b
testl %eax, %eax
jne 0x7872
leaq 0x14b74(%rip), %rdi     # 0x1c3df
xorl %eax, %eax
callq 0x9239
leaq 0x2a767(%rip), %rax     # 0x31fe0
cmpq (%rax), %r13
jne 0x78a1
orq 0x8(%rsp), %r12
leaq 0x24156(%rip), %r12     # 0x2b9e0
je 0x78b2
leaq 0x152f3(%rip), %rdi     # 0x1cb86
xorl %eax, %eax
callq 0x8dd4
leaq 0x2a73f(%rip), %rax     # 0x31fe0
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
leaq 0x24130(%rip), %r12     # 0x2b9e0
jne 0x78c9
movl %r15d, %edi
callq 0x159ba
movq %rax, %rsi
leaq 0x2a71c(%rip), %rax     # 0x31fe0
movq %rsi, 0x8(%rsp)
movq (%rax), %rdi
cmpq %rdi, %r13
je 0x78e8
movl 0x14(%rsp), %edi
movq %r13, %rdx
leaq 0x24059(%rip), %rcx     # 0x2b938
callq 0x72f9
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x156a0
movq %rax, %r14
cmpl $0x2c, (%r12)
jne 0x794f
callq 0xd3c9
movl %eax, (%r12)
addl $0x8, %ebx
incl %r15d
movq %r13, %r12
jmp 0x77d2
leaq 0x2a6c8(%rip), %rax     # 0x31fe0
movq (%rax), %rdi
cmpq %rdi, %r12
jne 0x7934
leaq 0x1525f(%rip), %rdi     # 0x1cb86
movq %rax, %r15
xorl %eax, %eax
callq 0x8dd4
movq (%r15), %rdi
movq %r14, %rsi
callq 0x156a0
movq %rax, %r14
callq 0xd3c9
leaq 0x24095(%rip), %r12     # 0x2b9e0
movl %eax, (%r12)
leaq 0x21e1a(%rip), %rax     # 0x29770
movq (%rax), %rax
movl %ebx, (%rax)
movq 0x8(%rax), %rsi
movslq %ebx, %rcx
addq %rsi, %rcx
cmpq 0x10(%rax), %rcx
jae 0x7971
movq %rcx, 0x8(%rax)
jmp 0x7982
leaq 0x21df8(%rip), %rsi     # 0x29770
movl %ebx, %edi
callq 0x16438
movq %rax, %rsi
movq %r14, %rdi
callq 0x15731
movq %rax, %rbx
movl (%r12), %eax
cmpl $0x29, %eax
je 0x79b4
pushq $0x29
popq %rdi
callq 0x8ee9
leaq 0x207a8(%rip), %rsi     # 0x2814d
pushq $0x7b
popq %rdi
callq 0x90fc
cmpl $0x29, (%r12)
jne 0x79bd
callq 0xd3c9
movl %eax, (%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x20, %eax
sete %dl
leaq 0x23f74(%rip), %rcx     # 0x2b950
movq (%rcx), %rcx
testq %rcx, %rcx
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x79fb
cmpb $0x53, 0x1a(%rcx)
je 0x77c3
jmp 0x7a00
cmpl $0x20, %eax
jne 0x7a59
pushq $0x20
popq %rax
leaq 0x23f3e(%rip), %r15     # 0x2b948
leaq 0x23f27(%rip), %r14     # 0x2b938
xorl %ebx, %ebx
cmpl $0x20, %eax
jne 0x7a44
movq (%r15), %rsi
xorl %edi, %edi
xorl %edx, %edx
movq %r14, %rcx
callq 0x72f9
callq 0xd3c9
movl %eax, (%r12)
cmpl $0x2c, %eax
jne 0x7991
callq 0xd3c9
movl %eax, (%r12)
jmp 0x7a13
leaq 0x15173(%rip), %rdi     # 0x1cbbe
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x8dd4
jmp 0x798d
xorl %ebx, %ebx
jmp 0x798d