// File: /workspace/github_c_makefile_star2_O0/Oric4ever[P]lcc65/6502/build/../src/expr.c
// Function: primary
static Tree primary() {
	Tree p;

	switch (t) {
	case ID:
		if (tsym == 0) {
			Symbol q = install(token, &identifiers, level < LOCAL);
			q->src = src;
			t = gettok();
			if (t == '(') {
				Symbol r;
				q->sclass = EXTERN;
				q->type = func(inttype, 0);
				if (Aflag >= 1)
					warning("missing prototype\n");
				defsymbol(q);
		 		if (r = lookup(q->name, externals)) {
					q->defined = r->defined;
					q->temporary = r->temporary;
					q->generated = r->generated;
					q->computed = r->computed;
					q->addressed = r->addressed;
					q->initialized = r->initialized;
				} else {
					r = install(q->name, &externals, 1);
					r->src = q->src;
					r->type = q->type;
					r->sclass = EXTERN;
				}
			} else {
				error("undeclared identifier `%s'\n", q->name);
				q->sclass = AUTO;
				q->type = inttype;
				if (q->scope == GLOBAL)
					defsymbol(q);
				else
					addlocal(q);
			}
			if (xref)
				use(q, src);
			return idnode(q);
		}
		if (xref)
			use(tsym, src);
		if (tsym->sclass == ENUM)
			p = constnode(tsym->u.value, inttype);
		else {
			if (tsym->sclass == TYPEDEF)
				error("illegal use of type name `%s'\n", tsym->name);
			p = idnode(tsym);
		}
		break;
	case ICON: case FCON:
		p = tree(CNST + ttob(tsym->type), tsym->type, 0, 0);
		p->u.v = tsym->u.c.v;
		break;
	case SCON:
		tsym->u.c.v.p = stringn(tsym->u.c.v.p, tsym->type->size);
		tsym = constant(tsym->type, tsym->u.c.v);
		if (tsym->u.c.loc == 0)
			tsym->u.c.loc = genident(STATIC, tsym->type, GLOBAL);
		p = idnode(tsym->u.c.loc);
		break;
	case '(':
		t = gettok();
		return expr(')');
	default:
		error("illegal expression\n");
		p = constnode(0, inttype);
	}
	t = gettok();
	return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x2bd21(%rip), %rax     # 0x3db80
movl (%rax), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x8, %eax
ja 0x12300
movq -0x28(%rbp), %rax
leaq 0x1e1ce(%rip), %rcx     # 0x3004c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2bc62(%rip), %rax     # 0x3daf0
cmpq $0x0, (%rax)
jne 0x12128
leaq 0x2bc49(%rip), %rax     # 0x3dae8
movq (%rax), %rdi
leaq 0x2f0e7(%rip), %rax     # 0x40f90
cmpl $0x5, (%rax)
setl %al
andb $0x1, %al
movzbl %al, %edx
leaq 0x2927d(%rip), %rsi     # 0x3b138
callq 0x24720
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
leaq 0x2bc09(%rip), %rcx     # 0x3dad8
movq (%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x30(%rax)
callq 0x15170
movl %eax, %ecx
leaq 0x2bc94(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
leaq 0x2bc8b(%rip), %rax     # 0x3db80
cmpl $0x28, (%rax)
jne 0x12099
movq -0x18(%rbp), %rax
movb $0x4a, 0x1a(%rax)
leaq 0x322eb(%rip), %rax     # 0x441f8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x27c60
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
leaq 0x2bcfd(%rip), %rax     # 0x3dc28
cmpl $0x1, (%rax)
jl 0x11f3e
leaq 0x1d4ec(%rip), %rdi     # 0x2f423
movb $0x0, %al
callq 0xdba0
movq -0x18(%rbp), %rdi
callq 0x2a470
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x28dc2(%rip), %rax     # 0x3ad18
movq (%rax), %rsi
callq 0x24670
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x1204a
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
andb $-0x2, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
shlb %dl
andb $-0x3, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
shlb $0x2, %dl
andb $-0x5, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
shlb $0x3, %dl
andb $-0x9, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
shlb $0x4, %dl
andb $-0x11, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
movq -0x20(%rbp), %rax
movb 0x1b(%rax), %al
shrb $0x5, %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x18(%rbp), %rax
movb %cl, %dl
movb 0x1b(%rax), %cl
andb $0x1, %dl
shlb $0x5, %dl
andb $-0x21, %cl
orb %dl, %cl
movb %cl, 0x1b(%rax)
jmp 0x12097
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x28cbf(%rip), %rsi     # 0x3ad18
movl $0x1, %edx
callq 0x24720
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x28(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x30(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
movb $0x4a, 0x1a(%rax)
jmp 0x120ec
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x1e388(%rip), %rdi     # 0x30430
movb $0x0, %al
callq 0xd530
movq -0x18(%rbp), %rax
movb $0x43, 0x1a(%rax)
leaq 0x3213a(%rip), %rax     # 0x441f8
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
movzwl 0x18(%rax), %eax
cmpl $0x3, %eax
jne 0x120e1
movq -0x18(%rbp), %rdi
callq 0x2a470
jmp 0x120ea
movq -0x18(%rbp), %rdi
callq 0x3290
jmp 0x120ec
leaq 0x2bb11(%rip), %rax     # 0x3dc04
cmpl $0x0, (%rax)
je 0x12116
movq -0x18(%rbp), %rdi
leaq 0x2b9d5(%rip), %rax     # 0x3dad8
movq (%rax), %rsi
leaq 0x2b9cb(%rip), %rax     # 0x3dad8
movq 0x8(%rax), %rdx
callq 0x252c0
movq -0x18(%rbp), %rdi
callq 0xddf0
movq %rax, -0x8(%rbp)
jmp 0x1233b
leaq 0x2bad5(%rip), %rax     # 0x3dc04
cmpl $0x0, (%rax)
je 0x12158
leaq 0x2b9b5(%rip), %rax     # 0x3daf0
movq (%rax), %rdi
leaq 0x2b993(%rip), %rax     # 0x3dad8
movq (%rax), %rsi
leaq 0x2b989(%rip), %rax     # 0x3dad8
movq 0x8(%rax), %rdx
callq 0x252c0
leaq 0x2b991(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movzbl 0x1a(%rax), %eax
cmpl $0xd, %eax
jne 0x1218d
leaq 0x2b97e(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movl 0x48(%rax), %edi
leaq 0x32079(%rip), %rax     # 0x441f8
movq (%rax), %rsi
callq 0xc7b0
movq %rax, -0x10(%rbp)
jmp 0x121cf
leaq 0x2b95c(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movzbl 0x1a(%rax), %eax
cmpl $0x53, %eax
jne 0x121bc
leaq 0x2b949(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x1e297(%rip), %rdi     # 0x3044c
movb $0x0, %al
callq 0xd530
leaq 0x2b92d(%rip), %rax     # 0x3daf0
movq (%rax), %rdi
callq 0xddf0
movq %rax, -0x10(%rbp)
jmp 0x12323
leaq 0x2b915(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x20(%rax), %rdi
callq 0x29e30
movl %eax, %edi
addl $0x10, %edi
leaq 0x2b8fd(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x20(%rax), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x256f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x2b8db(%rip), %rcx     # 0x3daf0
movq (%rcx), %rcx
movq 0x48(%rcx), %rcx
movq %rcx, 0x28(%rax)
jmp 0x12323
leaq 0x2b8c4(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x48(%rax), %rdi
leaq 0x2b8b6(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %esi
callq 0x23830
movq %rax, %rcx
leaq 0x2b89d(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq %rcx, 0x48(%rax)
leaq 0x2b88f(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x20(%rax), %rdi
leaq 0x2b881(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x48(%rax), %rsi
callq 0x23d40
movq %rax, %rcx
leaq 0x2b86b(%rip), %rax     # 0x3daf0
movq %rcx, (%rax)
leaq 0x2b861(%rip), %rax     # 0x3daf0
movq (%rax), %rax
cmpq $0x0, 0x50(%rax)
jne 0x122c7
leaq 0x2b850(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x20(%rax), %rsi
movl $0x51, %edi
movl $0x3, %edx
callq 0x24b00
movq %rax, %rcx
leaq 0x2b830(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq %rcx, 0x50(%rax)
leaq 0x2b822(%rip), %rax     # 0x3daf0
movq (%rax), %rax
movq 0x50(%rax), %rdi
callq 0xddf0
movq %rax, -0x10(%rbp)
jmp 0x12323
callq 0x15170
movl %eax, %ecx
leaq 0x2b892(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
movl $0x29, %edi
callq 0xfc70
movq %rax, -0x8(%rbp)
jmp 0x1233b
leaq 0x1e164(%rip), %rdi     # 0x3046b
movb $0x0, %al
callq 0xd530
leaq 0x31ee3(%rip), %rax     # 0x441f8
movq (%rax), %rsi
xorl %edi, %edi
callq 0xc7b0
movq %rax, -0x10(%rbp)
callq 0x15170
movl %eax, %ecx
leaq 0x2b84f(%rip), %rax     # 0x3db80
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)