// File: /workspace/github_c_makefile_star2_O0/saltyJeff[P]uClibcpp/extra/config/./expr.c
// Function: expr_print
void expr_print(struct expr *e, void (*fn)(void *, const char *), void *data, int prevtoken)
{
	if (!e) {
		fn(data, "y");
		return;
	}

	if (expr_compare_type(prevtoken, e->type) > 0)
		fn(data, "(");
	switch (e->type) {
	case E_SYMBOL:
		if (e->left.sym->name)
			fn(data, e->left.sym->name);
		else
			fn(data, "<choice>");
		break;
	case E_NOT:
		fn(data, "!");
		expr_print(e->left.expr, fn, data, E_NOT);
		break;
	case E_EQUAL:
		fn(data, e->left.sym->name);
		fn(data, "=");
		fn(data, e->right.sym->name);
		break;
	case E_UNEQUAL:
		fn(data, e->left.sym->name);
		fn(data, "!=");
		fn(data, e->right.sym->name);
		break;
	case E_OR:
		expr_print(e->left.expr, fn, data, E_OR);
		fn(data, " || ");
		expr_print(e->right.expr, fn, data, E_OR);
		break;
	case E_AND:
		expr_print(e->left.expr, fn, data, E_AND);
		fn(data, " && ");
		expr_print(e->right.expr, fn, data, E_AND);
		break;
	case E_CHOICE:
		fn(data, e->right.sym->name);
		if (e->left.expr) {
			fn(data, " ^ ");
			expr_print(e->left.expr, fn, data, E_CHOICE);
		}
		break;
	case E_RANGE:
		fn(data, "[");
		fn(data, e->left.sym->name);
		fn(data, " ");
		fn(data, e->right.sym->name);
		fn(data, "]");
		break;
	default:
	  {
		char buf[32];
		sprintf(buf, "<unknown type %d>", e->type);
		fn(data, buf);
		break;
	  }
	}
	if (expr_compare_type(prevtoken, e->type) > 0)
		fn(data, ")");
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl %ecx, 0x3c(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0xe597
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x1d4d(%rip), %rsi      # 0x102dd
callq *%rax
jmp 0xe8b7
movl 0x3c(%rsp), %edi
movq 0x50(%rsp), %rax
movl (%rax), %esi
callq 0xe4a0
cmpl $0x0, %eax
jle 0xe5bf
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x77de(%rip), %rsi      # 0x15d9b
callq *%rax
movq 0x50(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x7, %eax
ja 0xe864
movq 0x8(%rsp), %rax
leaq 0x2150(%rip), %rcx      # 0x10734
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xe618
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0xe62b
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x7774(%rip), %rsi      # 0x15d9d
callq *%rax
jmp 0xe88f
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x7765(%rip), %rsi      # 0x15da6
callq *%rax
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x3, %ecx
callq 0xe560
jmp 0xe88f
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x771a(%rip), %rsi      # 0x15da9
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0xe88f
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x76cf(%rip), %rsi      # 0x15da8
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
jmp 0xe88f
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x1, %ecx
callq 0xe560
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x75e8(%rip), %rsi      # 0x15d0f
callq *%rax
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x1, %ecx
callq 0xe560
jmp 0xe88f
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x2, %ecx
callq 0xe560
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x759b(%rip), %rsi      # 0x15d14
callq *%rax
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x2, %ecx
callq 0xe560
jmp 0xe88f
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq 0x50(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0xe7f2
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x75d8(%rip), %rsi      # 0x15dab
callq *%rax
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movl $0x6, %ecx
callq 0xe560
jmp 0xe88f
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x75a7(%rip), %rsi      # 0x15daf
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x708a(%rip), %rsi      # 0x158be
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
callq *%rax
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x7551(%rip), %rsi      # 0x15db1
callq *%rax
jmp 0xe88f
leaq 0x10(%rsp), %rdi
movq 0x50(%rsp), %rax
movl (%rax), %edx
leaq 0x753c(%rip), %rsi      # 0x15db3
movb $0x0, %al
callq 0x22c0
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq *%rax
movl 0x3c(%rsp), %edi
movq 0x50(%rsp), %rax
movl (%rax), %esi
callq 0xe4a0
cmpl $0x0, %eax
jle 0xe8b7
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rdi
leaq 0x707f(%rip), %rsi      # 0x15934
callq *%rax
addq $0x58, %rsp
retq
nopl (%rax)