// File: /workspace/github_c_makefile_star2_O2/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 0x1009b
movq 0x10(%r14), %r14
movl (%r14), %eax
decl %eax
cmpl $0xb, %eax
ja 0x10431
leaq 0xdd57(%rip), %rcx      # 0x1de04
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xdf0e(%rip), %rdi      # 0x1dfcb
jmp 0x101ca
leaq 0xdee7(%rip), %rdi      # 0x1dfb0
callq 0xff71
leaq 0xdac0(%rip), %rsi      # 0x1db95
movq %r14, %rdi
callq 0x185d5
movq %rax, %rdi
callq 0xff71
leaq 0xdef5(%rip), %rdi      # 0x1dfe1
callq 0xff71
movq 0x18(%r14), %r13
addq $0x58, %r13
incl %ebp
leaq 0xcb5d(%rip), %r14      # 0x1cc5f
leaq 0xdea9(%rip), %r15      # 0x1dfb2
movq (%r13), %r12
testq %r12, %r12
je 0x1038f
movq (%r12), %rdi
callq 0xff71
movq %r14, %rdi
callq 0xff71
movq %rbx, %rdi
callq 0x92ec
movq (%r12), %rsi
movq %rax, %rdi
callq 0xa68b
movq %rax, %rdi
movl %ebp, %esi
callq 0x10078
leaq 0x18(%r12), %r13
cmpq $0x0, 0x18(%r12)
je 0x10109
movq %r15, %rdi
callq 0xff71
jmp 0x10109
leaq 0xde60(%rip), %rdi      # 0x1dfc3
jmp 0x101ca
movq 0x10(%r14), %rax
cmpl $0xf, (%rax)
jb 0x10172
movq 0x10(%rax), %rax
leaq 0x21e07(%rip), %rcx     # 0x31f80
cmpq (%rcx), %rax
je 0x103bd
leaq 0xde27(%rip), %rdi      # 0x1dfb0
callq 0xff71
leaq 0xda00(%rip), %rsi      # 0x1db95
movq %r14, %rdi
callq 0x185d5
movq %rax, %rdi
callq 0xff71
leaq 0xde2f(%rip), %rdi      # 0x1dfdb
jmp 0x101ca
leaq 0x21e1b(%rip), %rax     # 0x31fd0
cmpq (%rax), %r14
je 0x101c3
leaq 0xf631(%rip), %rdi      # 0x1f7f2
jmp 0x101ca
leaq 0xde12(%rip), %rdi      # 0x1dfdc
callq 0xff71
leaq 0x21dba(%rip), %rax     # 0x31f90
cmpq (%rax), %r14
je 0x10218
movl (%r14), %eax
cmpl $0xf, %eax
jb 0x101e9
movq 0x10(%r14), %rax
movl (%rax), %eax
cmpl $0x2, %eax
jbe 0x1022d
cmpl $0x7, %eax
jb 0x101f8
cmpl $0xd, %eax
jne 0x1022d
movl 0x8(%r14), %eax
leaq 0x21d95(%rip), %rcx     # 0x31f98
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
je 0x1022d
movq %r14, %rdi
callq 0xa287
movq %rax, %rsi
jmp 0x10222
leaq 0x21d69(%rip), %rax     # 0x31f88
movq (%rax), %rsi
movq %rbx, %rdi
callq 0x9912
movq %rax, %rbx
movq 0x8(%rbx), %rsi
movl (%rsi), %eax
pushq $0x25
popq %rdi
cmpl $0xf, %eax
jb 0x10241
movq 0x10(%rsi), %rax
movl (%rax), %eax
cmpl $0x2, %eax
jbe 0x10250
cmpl $0x7, %eax
jb 0x10261
cmpl $0xd, %eax
je 0x10261
movq %rsi, %rdi
callq 0x18b82
movl %eax, %edi
addl $0x20, %edi
movq 0x8(%rbx), %rsi
movq 0x1b870(%rip), %rcx     # 0x2bad8
movq %rbx, %rdx
callq 0x165eb
movq %rax, 0x1b861(%rip)     # 0x2bad8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdd23(%rip), %rdi      # 0x1dfb0
callq 0xff71
leaq 0xd8fc(%rip), %rsi      # 0x1db95
movq %r14, %rdi
callq 0x185d5
movq %rax, %rdi
callq 0xff71
leaq 0xdd34(%rip), %rdi      # 0x1dfe4
jmp 0x103aa
testl %ebp, %ebp
je 0x10398
movq 0x10(%r14), %rax
cmpl $0x0, 0x8(%rax)
jle 0x10398
movq %rbx, %rdi
callq 0xa22f
movq %rax, %rbx
leaq 0xf58c(%rip), %rdi      # 0x1f869
callq 0xff71
incl %ebp
xorl %r15d, %r15d
leaq 0x21caa(%rip), %r12     # 0x31f98
movl 0x8(%r14), %eax
movq 0x10(%r14), %rcx
cltd
idivl 0x8(%rcx)
cmpl %eax, %r15d
jge 0x1038f
leaq 0x17e56(%rip), %rax     # 0x28160
movq 0x158(%rax), %r13
movq (%r12), %rsi
movl %r15d, %edi
callq 0x8726
movl $0x130, %edi            # imm = 0x130
movq %rbx, %rsi
movq %rax, %rdx
callq *%r13
movq 0x8(%rax), %rcx
movl (%rcx), %edx
cmpl $0xf, %edx
jb 0x1033c
movq 0x10(%rcx), %rdx
movl (%rdx), %edx
cmpl $0x7, %edx
jne 0x10361
movq 0x10(%rcx), %rsi
movl (%rsi), %ecx
cmpl $0xf, %ecx
jb 0x10352
movq 0x10(%rsi), %rcx
movl (%rcx), %ecx
cmpl $0xc, %ecx
jne 0x10361
movq %rax, %rdi
callq 0x16727
jmp 0x10369
movq %rax, %rdi
callq 0xa0b9
movq %rax, %r13
testl %r15d, %r15d
je 0x1037d
leaq 0xdc3a(%rip), %rdi      # 0x1dfb2
callq 0xff71
movq %r13, %rdi
movl %ebp, %esi
callq 0x10078
incl %r15d
jmp 0x102ee
leaq 0xdc53(%rip), %rdi      # 0x1dfe9
jmp 0x103aa
leaq 0xd7f6(%rip), %rsi      # 0x1db95
movq %r14, %rdi
callq 0x185d5
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xff71
cmpq $0x0, 0x1b70b(%rip)     # 0x2bad0
jne 0x103da
leaq 0xdc00(%rip), %rdi      # 0x1dfce
callq 0xf25d
movq %rax, 0x1b6f6(%rip)     # 0x2bad0
leaq 0x21bf7(%rip), %rax     # 0x31fd8
movq (%rax), %rsi
xorl %edi, %edi
callq 0x8726
incl %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x10078
leaq 0xdbd7(%rip), %rdi      # 0x1dfd5
callq 0xff71
movq 0x1b6c6(%rip), %rax     # 0x2bad0
movq 0x50(%rax), %rdi
callq 0x93b4
movq %rax, %rdi
callq 0xa22f
movq %rbx, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x892b
movq %rax, %rbx
jmp 0x101cf
leaq 0xbd63(%rip), %rdi      # 0x1c19b
leaq 0xda16(%rip), %rsi      # 0x1de55
leaq 0xdba5(%rip), %rcx      # 0x1dfeb
movl $0x245, %edx            # imm = 0x245
callq 0x30d0