// File: /workspace/github_c_makefile_star2_O1/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
cmpl $0xf, (%r14)
jb 0x1121d
movq 0x10(%r14), %r14
movl (%r14), %eax
decl %eax
cmpl $0xb, %eax
ja 0x115fd
leaq 0xeb22(%rip), %rcx      # 0x1fd54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xed03(%rip), %rdi      # 0x1ff45
jmp 0x11353
leaq 0xecdc(%rip), %rdi      # 0x1ff2a
callq 0x110e5
leaq 0xe8eb(%rip), %rsi      # 0x1fb45
movq %r14, %rdi
callq 0x19db1
movq %rax, %rdi
callq 0x110e5
leaq 0xecea(%rip), %rdi      # 0x1ff5b
callq 0x110e5
movq 0x18(%r14), %rax
movq 0x58(%rax), %r12
testq %r12, %r12
je 0x1155b
incl %ebp
leaq 0xd9b6(%rip), %r14      # 0x1ec46
leaq 0xec95(%rip), %r15      # 0x1ff2c
movq (%r12), %rdi
callq 0x110e5
movq %r14, %rdi
callq 0x110e5
movq %rbx, %rdi
callq 0x9c98
movq (%r12), %rsi
movq %rax, %rdi
callq 0xb14d
movq %rax, %rdi
movl %ebp, %esi
callq 0x111ff
cmpq $0x0, 0x18(%r12)
je 0x112d6
movq %r15, %rdi
callq 0x110e5
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x11297
jmp 0x1155b
leaq 0xec51(%rip), %rdi      # 0x1ff3d
jmp 0x11353
movq 0x10(%r14), %rax
cmpl $0xf, (%rax)
jb 0x112fb
movq 0x10(%rax), %rax
leaq 0x20c7e(%rip), %rcx     # 0x31f80
cmpq (%rcx), %rax
je 0x11589
leaq 0xec18(%rip), %rdi      # 0x1ff2a
callq 0x110e5
leaq 0xe827(%rip), %rsi      # 0x1fb45
movq %r14, %rdi
callq 0x19db1
movq %rax, %rdi
callq 0x110e5
leaq 0xec20(%rip), %rdi      # 0x1ff55
jmp 0x11353
leaq 0x20c92(%rip), %rax     # 0x31fd0
cmpq (%rax), %r14
je 0x1134c
leaq 0x10428(%rip), %rdi     # 0x21772
jmp 0x11353
leaq 0xec03(%rip), %rdi      # 0x1ff56
callq 0x110e5
leaq 0x20c31(%rip), %rax     # 0x31f90
cmpq (%rax), %r14
je 0x113ba
movl (%r14), %eax
movq %r14, %rcx
cmpl $0xf, %eax
jb 0x11373
movq 0x10(%r14), %rcx
cmpl $0x3, (%rcx)
jb 0x11389
movq %r14, %rcx
cmpl $0xf, %eax
jb 0x11384
movq 0x10(%r14), %rcx
cmpl $0x7, (%rcx)
jb 0x1139a
movq %r14, %rcx
cmpl $0xf, %eax
jb 0x11395
movq 0x10(%r14), %rcx
cmpl $0xd, (%rcx)
jne 0x113cf
movl 0x8(%r14), %eax
leaq 0x20bf3(%rip), %rcx     # 0x31f98
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
je 0x113cf
movq %r14, %rdi
callq 0xacd9
movq %rax, %rsi
jmp 0x113c4
leaq 0x20bc7(%rip), %rax     # 0x31f88
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xa341
movq %rax, %rbx
movq 0x8(%rbx), %rdi
movl (%rdi), %ecx
movq %rdi, %rax
cmpl $0xf, %ecx
jb 0x113e1
movq 0x10(%rdi), %rax
cmpl $0x3, (%rax)
jb 0x113fc
movq %rdi, %rdx
cmpl $0xf, %ecx
jb 0x113f2
movq 0x10(%rdi), %rdx
movl $0x25, %eax
cmpl $0x7, (%rdx)
jb 0x1141a
movq %rdi, %rdx
cmpl $0xf, %ecx
jb 0x11408
movq 0x10(%rdi), %rdx
movl $0x25, %eax
cmpl $0xd, (%rdx)
je 0x1141a
callq 0x1a3e6
addl $0x20, %eax
movq 0x8(%rbx), %rsi
movq 0x1a6b3(%rip), %rcx     # 0x2bad8
movl %eax, %edi
movq %rbx, %rdx
callq 0x17b61
movq %rax, 0x1a6a2(%rip)     # 0x2bad8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xeade(%rip), %rdi      # 0x1ff2a
callq 0x110e5
leaq 0xe6ed(%rip), %rsi      # 0x1fb45
movq %r14, %rdi
callq 0x19db1
movq %rax, %rdi
callq 0x110e5
leaq 0xeaef(%rip), %rdi      # 0x1ff5e
jmp 0x11576
testl %ebp, %ebp
je 0x11564
movq 0x10(%r14), %rax
cmpl $0x0, 0x8(%rax)
jle 0x11564
movq %rbx, %rdi
callq 0xac81
movq %rax, %rbx
leaq 0x1034d(%rip), %rdi     # 0x217e9
callq 0x110e5
movl 0x8(%r14), %eax
movq 0x10(%r14), %rcx
cltd
idivl 0x8(%rcx)
testl %eax, %eax
jle 0x1155b
incl %ebp
xorl %r15d, %r15d
leaq 0x20ad7(%rip), %r12     # 0x31f98
leaq 0x16c98(%rip), %rax     # 0x28160
movq 0x158(%rax), %r13
movq (%r12), %rsi
movl %r15d, %edi
callq 0x9044
movl $0x130, %edi            # imm = 0x130
movq %rbx, %rsi
movq %rax, %rdx
callq *%r13
movq 0x8(%rax), %rcx
cmpl $0xf, (%rcx)
movq %rcx, %rdx
jb 0x114f9
movq 0x10(%rcx), %rdx
cmpl $0x7, (%rdx)
jne 0x1151d
movq 0x10(%rcx), %rsi
cmpl $0xf, (%rsi)
movq %rsi, %rcx
jb 0x1150e
movq 0x10(%rsi), %rcx
cmpl $0xc, (%rcx)
jne 0x1151d
movq %rax, %rdi
callq 0x17ca2
jmp 0x11525
movq %rax, %rdi
callq 0xab00
movq %rax, %r13
testl %r15d, %r15d
je 0x11539
leaq 0xe9f8(%rip), %rdi      # 0x1ff2c
callq 0x110e5
movq %r13, %rdi
movl %ebp, %esi
callq 0x111ff
incl %r15d
movl 0x8(%r14), %eax
movq 0x10(%r14), %rcx
cltd
idivl 0x8(%rcx)
cmpl %eax, %r15d
jl 0x114c1
leaq 0xea01(%rip), %rdi      # 0x1ff63
jmp 0x11576
leaq 0xe5da(%rip), %rsi      # 0x1fb45
movq %r14, %rdi
callq 0x19db1
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x110e5
cmpq $0x0, 0x1a53f(%rip)     # 0x2bad0
jne 0x115a6
leaq 0xe9ae(%rip), %rdi      # 0x1ff48
callq 0x1034f
movq %rax, 0x1a52a(%rip)     # 0x2bad0
leaq 0x20a2b(%rip), %rax     # 0x31fd8
movq (%rax), %rsi
xorl %edi, %edi
callq 0x9044
incl %ebp
movq %rax, %rdi
movl %ebp, %esi
callq 0x111ff
leaq 0xe985(%rip), %rdi      # 0x1ff4f
callq 0x110e5
movq 0x1a4fa(%rip), %rax     # 0x2bad0
movq 0x50(%rax), %rdi
callq 0x9d77
movq %rax, %rdi
callq 0xac81
movq %rbx, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9290
movq %rax, %rbx
jmp 0x11358
leaq 0xcb97(%rip), %rdi      # 0x1e19b
leaq 0xe79a(%rip), %rsi      # 0x1fda5
leaq 0xe953(%rip), %rcx      # 0x1ff65
movl $0x245, %edx            # imm = 0x245
callq 0x30d0