// File: /workspace/github_c_makefile_star2_O1/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 0xacb7
movl %eax, %r14d
testb $0x8, 0x45(%rbx)
je 0x2a61
leaq 0x9688(%rip), %rdi      # 0xc0e2
xorl %eax, %eax
callq 0x2100
movw $0xa, 0x13996(%rip)     # 0x16400
movq %rbx, %rdi
callq 0xb133
testb %al, %al
je 0x2ae4
movl 0x13974(%rip), %eax     # 0x163f0
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2afb
testl %eax, %eax
je 0x2b13
cmpl $0x3, %eax
je 0x2b01
leal -0x3(%r14), %ecx
cmpl $0x2, %ecx
jbe 0x2b01
addl $-0x4, %eax
cmpl $0x3, %eax
ja 0x2bba
leaq 0x9557(%rip), %rcx      # 0xc004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movl $0x2, %esi
callq 0xae6b
movb $0x79, %dl
testb %al, %al
jne 0x2bab
movq %rbx, %rdi
cmpl $0x2, %r14d
jne 0x2b42
movl $0x1, %esi
callq 0xae6b
movb $0x6d, %dl
jmp 0x2b4e
movq %r15, %rdi
callq 0x20a0
movw $0xa, 0x1390b(%rip)     # 0x16400
popq %rbx
popq %r14
popq %r15
retq
testb $0x8, 0x45(%rbx)
jne 0x2b0e
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x20a0
callq 0x332f
movq 0x134b6(%rip), %rax     # 0x15fd0
movq (%rax), %rdi
callq 0x2230
movq 0x134af(%rip), %rax     # 0x15fd8
movq (%rax), %rdx
leaq 0x138cd(%rip), %rdi     # 0x16400
movl $0x80, %esi
popq %rbx
popq %r14
popq %r15
jmp 0x2170
movl $0x2, %esi
callq 0xae6b
movb $0x79, %dl
testb %al, %al
jne 0x2bab
movq %rbx, %rdi
xorl %esi, %esi
callq 0xae6b
movb $0x6e, %dl
testb %al, %al
jne 0x2bab
movabsq $0x5555555555555556, %r15 # imm = 0x5555555555555556
callq 0x2210
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 0xae6b
testb %al, %al
je 0x2b6c
cmpq $0x2, %r14
ja 0x2bb1
shll $0x3, %r14d
movl $0x796d6e, %edx         # imm = 0x796D6E
movl %r14d, %ecx
shrl %cl, %edx
movb %dl, 0x1384f(%rip)      # 0x16400
movw $0xa, 0x13847(%rip)     # 0x16401
leaq 0x9575(%rip), %rdi      # 0xc136
leaq 0x13838(%rip), %rsi     # 0x16400
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x2100