// File: /workspace/github_c_makefile_star2_O3/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 0xa500
movl %eax, %r14d
testb $0x8, 0x45(%rbx)
je 0x29b4
leaq 0x8729(%rip), %rdi      # 0xb0d6
xorl %eax, %eax
callq 0x2100
movw $0xa, 0x12a43(%rip)     # 0x15400
movq %rbx, %rdi
callq 0xa986
testb %al, %al
je 0x2a37
movl 0x12a21(%rip), %eax     # 0x153f0
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2a4e
testl %eax, %eax
je 0x2a66
cmpl $0x3, %eax
je 0x2a54
leal -0x3(%r14), %ecx
cmpl $0x2, %ecx
jbe 0x2a54
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x2b0d
leaq 0x8604(%rip), %rcx      # 0xb004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x2, %esi
callq 0xa6bc
movb $0x79, %dl
testb %al, %al
jne 0x2afe
movq %rbx, %rdi
cmpl $0x2, %r14d
jne 0x2a95
movl $0x1, %esi
callq 0xa6bc
movb $0x6d, %dl
jmp 0x2aa1
movq %r15, %rdi
callq 0x20a0
movw $0xa, 0x129b8(%rip)     # 0x15400
popq %rbx
popq %r14
popq %r15
retq
testb $0x8, 0x45(%rbx)
jne 0x2a61
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x20a0
callq 0x3282
movq 0x12563(%rip), %rax     # 0x14fd0
movq (%rax), %rdi
callq 0x2240
movq 0x1255c(%rip), %rax     # 0x14fd8
movq (%rax), %rdx
leaq 0x1297a(%rip), %rdi     # 0x15400
movl $0x80, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x2170
movl $0x2, %esi
callq 0xa6bc
movb $0x79, %dl
testb %al, %al
jne 0x2afe
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa6bc
movb $0x6e, %dl
testb %al, %al
jne 0x2afe
movabsq $0x5555555555555556, %r15 # imm = 0x5555555555555556
callq 0x2220
movq %rax, %r14
imulq %r15
movq %rdx, %rax
shrq $0x3f, %rax
addq %rdx, %rax
leaq (%rax,%rax,2), %rax
subq %rax, %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0xa6bc
testb %al, %al
je 0x2abf
cmpq $0x2, %r14
ja 0x2b04
shll $0x3, %r14d
movl $0x796d6e, %edx         # imm = 0x796D6E
movl %r14d, %ecx
shrl %cl, %edx
movb %dl, 0x128fc(%rip)      # 0x15400
movw $0xa, 0x128f4(%rip)     # 0x15401
leaq 0x8616(%rip), %rdi      # 0xb12a
leaq 0x128e5(%rip), %rsi     # 0x15400
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x2100