// File: /workspace/github_c_makefile_star2_O3/Oric4ever[P]lcc65/6502/build/../src/main.c
// Function: tracevalue
static void tracevalue(Tree e, int lev) {
	Type ty = unqual(e->type);

	switch (ty->op) {
	case CHAR:
		appendstr("'\\x%2x'");
		break;
	case SHORT:
		if (ty == unsignedshort)
			appendstr("0x%x");
		else /* fall thru */
	case INT:
			appendstr("%d");
		break;
	case UNSIGNED:
		appendstr("0x%x");
		break;
	case FLOAT: case DOUBLE:
		appendstr("%g");
		break;
	case POINTER:
		if (unqual(ty->type) == chartype) {
			static Symbol null;
			if (null == 0)
				null = mkstr("(null)");
			tracevalue(constnode(0, unsignedtype), lev + 1);
			appendstr(" \"%s\"");
			e = condnode(e, e, pointer(idnode(null->u.c.loc)));
		} else {
			appendstr("("); appendstr(typestring(ty, "")); appendstr(")0x%x");
		}
		break;
	case STRUCT: {
		Field q;
		appendstr("("); appendstr(typestring(ty, "")); appendstr("){");
		for (q = ty->u.sym->u.s.flist; q; q = q->link) {
			appendstr(q->name); appendstr("=");
			tracevalue(field(addrof(e), q->name), lev + 1);
			if (q->link)
				appendstr(",");
		}
		appendstr("}");
		return;
		}
	case UNION:
		appendstr("("); appendstr(typestring(ty, "")); appendstr("){...}");
		return;
	case ARRAY:
		if (lev && ty->type->size > 0) {
			int i;
			e = pointer(e);
			appendstr("{");
			for (i = 0; i < ty->size/ty->type->size; i++) {
				Tree p = (*opnode['+'])(ADD, e, constnode(i, inttype));
				if (isptr(p->type) && isarray(p->type->type))
					p = retype(p, p->type->type);
				else
					p = rvalue(p);
				if (i)
					appendstr(",");
				tracevalue(p, lev + 1);
			}
			appendstr("}");
		} else
			appendstr(typestring(ty, ""));
		return;
	default:
		assert(0);
	}
	if (ty == floattype)
		e = cast(e, doubletype);
	else if ((isint(ty) || isenum(ty)) && ty->size != inttype->size)
		e = cast(e, promote(ty));
	args = tree(ARG + widen(e->type), e->type, e, args);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %r14
movl (%r14), %eax
cmpl $0xf, %eax
jb 0x11101
movq 0x10(%r14), %r14
movl (%r14), %eax
decl %eax
cmpl $0xb, %eax
ja 0x114b0
leaq 0xecf1(%rip), %rcx      # 0x1fe04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xeea8(%rip), %rdi      # 0x1ffcb
jmp 0x11238
leaq 0xee81(%rip), %rdi      # 0x1ffb0
callq 0x10fd4
leaq 0xea5a(%rip), %rsi      # 0x1fb95
movq %r14, %rdi
callq 0x19ba4
movq %rax, %rdi
callq 0x10fd4
leaq 0xee8f(%rip), %rdi      # 0x1ffe1
callq 0x10fd4
movq 0x18(%r14), %rax
movq 0x58(%rax), %r12
testq %r12, %r12
je 0x1140e
incl %ebp
leaq 0xdaee(%rip), %r14      # 0x1ec5f
leaq 0xee3a(%rip), %r15      # 0x1ffb2
movq (%r12), %rdi
callq 0x10fd4
movq %r14, %rdi
callq 0x10fd4
movq %rbx, %rdi
callq 0x9cb4
movq (%r12), %rsi
movq %rax, %rdi
callq 0xb122
movq %rax, %rdi
movl %ebp, %esi
callq 0x110de
cmpq $0x0, 0x18(%r12)
je 0x1140e
movq %r15, %rdi
callq 0x10fd4
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x11178
jmp 0x1140e
leaq 0xedf2(%rip), %rdi      # 0x1ffc3
jmp 0x11238
movq 0x10(%r14), %rax
cmpl $0xf, (%rax)
jb 0x111e0
movq 0x10(%rax), %rax
leaq 0x21d99(%rip), %rcx     # 0x32f80
cmpq (%rcx), %rax
je 0x1143c
leaq 0xedb9(%rip), %rdi      # 0x1ffb0
callq 0x10fd4
leaq 0xe992(%rip), %rsi      # 0x1fb95
movq %r14, %rdi
callq 0x19ba4
movq %rax, %rdi
callq 0x10fd4
leaq 0xedc1(%rip), %rdi      # 0x1ffdb
jmp 0x11238
leaq 0x21dad(%rip), %rax     # 0x32fd0
cmpq (%rax), %r14
je 0x11231
leaq 0x105c3(%rip), %rdi     # 0x217f2
jmp 0x11238
leaq 0xeda4(%rip), %rdi      # 0x1ffdc
callq 0x10fd4
leaq 0x21d4c(%rip), %rax     # 0x32f90
cmpq (%rax), %r14
je 0x11286
movl (%r14), %eax
cmpl $0xf, %eax
jb 0x11257
movq 0x10(%r14), %rax
movl (%rax), %eax
cmpl $0x2, %eax
jbe 0x1129b
cmpl $0x7, %eax
jb 0x11266
cmpl $0xd, %eax
jne 0x1129b
movl 0x8(%r14), %eax
leaq 0x21d27(%rip), %rcx     # 0x32f98
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
je 0x1129b
movq %r14, %rdi
callq 0xac7b
movq %rax, %rsi
jmp 0x11290
leaq 0x21cfb(%rip), %rax     # 0x32f88
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xa2f7
movq %rax, %rbx
movq 0x8(%rbx), %rsi
movl (%rsi), %eax
cmpl $0xf, %eax
jb 0x112ac
movq 0x10(%rsi), %rax
movl (%rax), %eax
cmpl $0x2, %eax
jbe 0x112c0
movl $0x25, %edi
cmpl $0x7, %eax
jb 0x112d1
cmpl $0xd, %eax
je 0x112d1
movq %rsi, %rdi
callq 0x1a1c9
movl %eax, %edi
addl $0x20, %edi
movq 0x8(%rbx), %rsi
movq 0x1b800(%rip), %rcx     # 0x2cad8
movq %rbx, %rdx
callq 0x179e5
movq %rax, 0x1b7f1(%rip)     # 0x2cad8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xecb3(%rip), %rdi      # 0x1ffb0
callq 0x10fd4
leaq 0xe88c(%rip), %rsi      # 0x1fb95
movq %r14, %rdi
callq 0x19ba4
movq %rax, %rdi
callq 0x10fd4
leaq 0xecc4(%rip), %rdi      # 0x1ffe4
jmp 0x11429
testl %ebp, %ebp
je 0x11417
movq 0x10(%r14), %rax
cmpl $0x0, 0x8(%rax)
jle 0x11417
movq %rbx, %rdi
callq 0xac23
movq %rax, %rbx
leaq 0x1051c(%rip), %rdi     # 0x21869
callq 0x10fd4
movl 0x8(%r14), %eax
movq 0x10(%r14), %rcx
cltd
idivl 0x8(%rcx)
testl %eax, %eax
jle 0x1140e
incl %ebp
xorl %r15d, %r15d
leaq 0x21c26(%rip), %r12     # 0x32f98
leaq 0x17de7(%rip), %rax     # 0x29160
movq 0x158(%rax), %r13
movq (%r12), %rsi
movl %r15d, %edi
callq 0x908f
movl $0x130, %edi            # imm = 0x130
movq %rbx, %rsi
movq %rax, %rdx
callq *%r13
movq 0x8(%rax), %rcx
movl (%rcx), %edx
cmpl $0xf, %edx
jb 0x113ab
movq 0x10(%rcx), %rdx
movl (%rdx), %edx
cmpl $0x7, %edx
jne 0x113d0
movq 0x10(%rcx), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x113c1
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xc, %ecx
jne 0x113d0
movq %rax, %rdi
callq 0x17b29
jmp 0x113d8
movq %rax, %rdi
callq 0xaaaa
movq %rax, %r13
testl %r15d, %r15d
je 0x113ec
leaq 0xebcb(%rip), %rdi      # 0x1ffb2
callq 0x10fd4
movq %r13, %rdi
movl %ebp, %esi
callq 0x110de
incl %r15d
movl 0x8(%r14), %eax
movq 0x10(%r14), %rcx
cltd
idivl 0x8(%rcx)
cmpl %eax, %r15d
jl 0x11372
leaq 0xebd4(%rip), %rdi      # 0x1ffe9
jmp 0x11429
leaq 0xe777(%rip), %rsi      # 0x1fb95
movq %r14, %rdi
callq 0x19ba4
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10fd4
cmpq $0x0, 0x1b68c(%rip)     # 0x2cad0
jne 0x11459
leaq 0xeb81(%rip), %rdi      # 0x1ffce
callq 0x10272
movq %rax, 0x1b677(%rip)     # 0x2cad0
leaq 0x21b78(%rip), %rax     # 0x32fd8
movq (%rax), %rsi
xorl %edi, %edi
callq 0x908f
incl %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x110de
leaq 0xeb58(%rip), %rdi      # 0x1ffd5
callq 0x10fd4
movq 0x1b647(%rip), %rax     # 0x2cad0
movq 0x50(%rax), %rdi
callq 0x9d8b
movq %rax, %rdi
callq 0xac23
movq %rbx, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9298
movq %rax, %rbx
jmp 0x1123d
leaq 0xcce4(%rip), %rdi      # 0x1e19b
leaq 0xe997(%rip), %rsi      # 0x1fe55
leaq 0xeb26(%rip), %rcx      # 0x1ffeb
movl $0x245, %edx            # imm = 0x245
callq 0x30d0