// File: /workspace/github_c_makefile_star2_O0/mist64[P]cbm6502asm/src/express.c
// Function: evalocal
long evalocal() { /* evaluate a local symbol */
	int loc = 0;
	char *p, sym[8];

	for (p = lp; isdigit(*p); p++)
		loc = loc * 10 + *p -
		      '0'; /* get the decimal # part of local symbol */
	if (*p == '$') {   /* yes it is a local symbol */
		lp = ++p;  /* point past the $ */
		if (loc < 1 ||
		    loc > 255) { /* it is a valid local symbol name */
			display_error(error = 'E');
			return (0L);
		}
		makelocal(loc, sym);
		ptr = find_symbol(
		        sym); /* get a pointer to the symbol table entry */
		if (!ptr)
			insert_symbol(sym, 0L, 0, 0,
			              1); /* insert an undefined symbol */
		if (ptr->section)         /* bad idea to use section names in
		                             expressions */
			display_error(error = 'S');
		if (ptr->multiple) /* use of multiply defined symbol */
			display_error(error = 'S');
		if (ptr->known) /* is the value of the symbol known? */
			return (ptr->value); /* value of symbol */
		if (pass == 2) display_error(error = 'U');
		expdef = FALSE; /* symbol value is unknown */
		return (0L);
	}
	/* wasn't local symbol - must be a constant */
	return (evalcon(radix));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0xc(%rbp)
movq 0xb42a(%rip), %rax      # 0x112c0
movq %rax, -0x18(%rbp)
callq 0x1200
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x5edb
imull $0xa, -0xc(%rbp), %eax
movq -0x18(%rbp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
subl $0x30, %eax
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x5e9a
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x6041
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq %rax, 0xb3c2(%rip)      # 0x112c0
cmpl $0x1, -0xc(%rbp)
jl 0x5f0d
cmpl $0xff, -0xc(%rbp)
jle 0x5f2e
leaq 0xaecc(%rip), %rax      # 0x10de0
movb $0x45, (%rax)
movl $0x45, %edi
callq 0x2350
movq $0x0, -0x8(%rbp)
jmp 0x6053
movl -0xc(%rbp), %edi
leaq -0x20(%rbp), %rsi
callq 0xc280
leaq -0x20(%rbp), %rdi
callq 0xc810
movq %rax, %rcx
leaq 0xace3(%rip), %rax      # 0x10c30
movq %rcx, (%rax)
leaq 0xacd9(%rip), %rax      # 0x10c30
cmpq $0x0, (%rax)
jne 0x5f74
leaq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %edx
callq 0xc340
leaq 0xacb5(%rip), %rax      # 0x10c30
movq (%rax), %rax
movw 0x20(%rax), %ax
shrw $0x4, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x5fa6
leaq 0xae47(%rip), %rax      # 0x10de0
movb $0x53, (%rax)
movl $0x53, %edi
callq 0x2350
leaq 0xac83(%rip), %rax      # 0x10c30
movq (%rax), %rax
movw 0x20(%rax), %ax
shrw $0x3, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x5fd8
leaq 0xae15(%rip), %rax      # 0x10de0
movb $0x53, (%rax)
movl $0x53, %edi
callq 0x2350
leaq 0xac51(%rip), %rax      # 0x10c30
movq (%rax), %rax
movw 0x20(%rax), %ax
shrw $0x8, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x600a
leaq 0xac33(%rip), %rax      # 0x10c30
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x6053
leaq 0xa7d3(%rip), %rax      # 0x107e4
cmpl $0x2, (%rax)
jne 0x602a
leaq 0xadc3(%rip), %rax      # 0x10de0
movb $0x55, (%rax)
movl $0x55, %edi
callq 0x2350
leaq 0xad97(%rip), %rax      # 0x10dc8
movl $0x0, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x6053
leaq 0xab0c(%rip), %rax      # 0x10b54
movl (%rax), %edi
callq 0x5dc0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)