// File: /workspace/github_c_makefile_star2_O2/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: conf_askvalue
static void conf_askvalue(struct symbol *sym, const char *def)
{
	enum symbol_type type = sym_get_type(sym);
	tristate val;

	if (!sym_has_value(sym))
		printf("(NEW) ");

	line[0] = '\n';
	line[1] = 0;

	if (!sym_is_changable(sym)) {
		printf("%s\n", def);
		line[0] = '\n';
		line[1] = 0;
		return;
	}

	switch (input_mode) {
	case ask_new:
	case ask_silent:
		if (sym_has_value(sym)) {
			printf("%s\n", def);
			return;
		}
		check_stdin();
	case ask_all:
		fflush(stdout);
		fgets(line, 128, stdin);
		return;
	case set_default:
		printf("%s\n", def);
		return;
	default:
		break;
	}

	switch (type) {
	case S_INT:
	case S_HEX:
	case S_STRING:
		printf("%s\n", def);
		return;
	default:
		;
	}
	switch (input_mode) {
	case set_yes:
		if (sym_tristate_within_range(sym, yes)) {
			line[0] = 'y';
			line[1] = '\n';
			line[2] = 0;
			break;
		}
	case set_mod:
		if (type == S_TRISTATE) {
			if (sym_tristate_within_range(sym, mod)) {
				line[0] = 'm';
				line[1] = '\n';
				line[2] = 0;
				break;
			}
		} else {
			if (sym_tristate_within_range(sym, yes)) {
				line[0] = 'y';
				line[1] = '\n';
				line[2] = 0;
				break;
			}
		}
	case set_no:
		if (sym_tristate_within_range(sym, no)) {
			line[0] = 'n';
			line[1] = '\n';
			line[2] = 0;
			break;
		}
	case set_random:
		do {
			val = (tristate)(random() % 3);
		} while (!sym_tristate_within_range(sym, val));
		switch (val) {
		case no: line[0] = 'n'; break;
		case mod: line[0] = 'm'; break;
		case yes: line[0] = 'y'; break;
		}
		line[1] = '\n';
		line[2] = 0;
		break;
	default:
		break;
	}
	printf("%s", line);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
callq 0x95b6
movl %eax, %r14d
testb $0x8, 0x45(%rbx)
je 0x2554
leaq 0x7b89(%rip), %rdi      # 0xa0d6
xorl %eax, %eax
callq 0x2100
movw $0xa, 0x11eb3(%rip)     # 0x14410
movq %rbx, %rdi
callq 0x99b4
testb %al, %al
je 0x25d3
movl 0x11e91(%rip), %eax     # 0x14400
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x25ea
testl %eax, %eax
je 0x2602
cmpl $0x3, %eax
je 0x25f0
leal -0x3(%r14), %ecx
cmpl $0x2, %ecx
jbe 0x25f0
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x2695
leaq 0x7a64(%rip), %rcx      # 0xa004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x9735
movb $0x79, %dl
testb %al, %al
jne 0x2686
cmpl $0x2, %r14d
jne 0x2631
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x9735
movb $0x6d, %dl
jmp 0x263e
movq %r15, %rdi
callq 0x20a0
movw $0xa, 0x11e2c(%rip)     # 0x14410
popq %rbx
popq %r14
popq %r15
retq
testb $0x8, 0x45(%rbx)
jne 0x25fd
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x20a0
callq 0x2dca
movq 0x119c7(%rip), %rax     # 0x13fd0
movq (%rax), %rdi
callq 0x2240
movq 0x119c0(%rip), %rax     # 0x13fd8
movq (%rax), %rdx
leaq 0x11dee(%rip), %rdi     # 0x14410
movl $0x80, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x2170
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x9735
movb $0x79, %dl
testb %al, %al
jne 0x2686
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9735
movb $0x6e, %dl
testb %al, %al
jne 0x2686
pushq $0x3
popq %r15
callq 0x2220
cqto
idivq %r15
movq %rdx, %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x9735
testb %al, %al
je 0x2656
cmpq $0x2, %r14
ja 0x268c
shll $0x3, %r14d
movl $0x796d6e, %edx         # imm = 0x796D6E
movl %r14d, %ecx
shrl %cl, %edx
movb %dl, 0x11d84(%rip)      # 0x14410
movw $0xa, 0x11d7c(%rip)     # 0x14411
leaq 0x7a8e(%rip), %rdi      # 0xa12a
leaq 0x11d6d(%rip), %rsi     # 0x14410
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x2100