// File: /workspace/github_c_makefile_star2_O2/saltyJeff[P]uClibcpp/extra/config/conf.c
// Function: conf_sym
static int conf_sym(struct menu *menu)
{
	struct symbol *sym = menu->sym;
	int type;
	tristate oldval, newval;
	const char *help;

	while (1) {
		printf("%*s%s ", indent - 1, "", menu->prompt->text);
		if (sym->name)
			printf("(%s) ", sym->name);
		type = sym_get_type(sym);
		putchar('[');
		oldval = sym_get_tristate_value(sym);
		switch (oldval) {
		case no:
			putchar('N');
			break;
		case mod:
			putchar('M');
			break;
		case yes:
			putchar('Y');
			break;
		}
		if (oldval != no && sym_tristate_within_range(sym, no))
			printf("/n");
		if (oldval != mod && sym_tristate_within_range(sym, mod))
			printf("/m");
		if (oldval != yes && sym_tristate_within_range(sym, yes))
			printf("/y");
		if (sym->help)
			printf("/?");
		printf("] ");
		conf_askvalue(sym, sym_get_string_value(sym));
		strip(line);

		switch (line[0]) {
		case 'n':
		case 'N':
			newval = no;
			if (!line[1] || !strcmp(&line[1], "o"))
				break;
			continue;
		case 'm':
		case 'M':
			newval = mod;
			if (!line[1])
				break;
			continue;
		case 'y':
		case 'Y':
			newval = yes;
			if (!line[1] || !strcmp(&line[1], "es"))
				break;
			continue;
		case 0:
			newval = oldval;
			break;
		case '?':
			goto help;
		default:
			continue;
		}
		if (sym_set_tristate_value(sym, newval))
			return 0;
help:
		help = nohelp_text;
		if (sym->help)
			help = sym->help;
		printf("\n%s\n", help);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %r14
pushq $0x5b
popq %rbp
leaq 0x725c(%rip), %r13      # 0xa084
pushq $0x2
popq %r12
movl 0x1137e(%rip), %esi     # 0x141b0
decl %esi
movq 0x20(%rbx), %rax
movq 0x18(%rax), %rcx
leaq 0x7231(%rip), %rdi      # 0xa074
leaq 0xc88d(%rip), %rdx      # 0xf6d7
xorl %eax, %eax
callq 0x2100
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x2e68
leaq 0x721a(%rip), %rdi      # 0xa07b
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
callq 0x95b6
movl %ebp, %edi
callq 0x2050
movl 0x28(%r14), %r15d
testl %r15d, %r15d
je 0x2ebb
pushq $0x4d
popq %rdi
cmpl $0x1, %r15d
je 0x2e92
cmpl $0x2, %r15d
jne 0x2e97
pushq $0x59
popq %rdi
callq 0x2050
movq %r14, %rdi
xorl %esi, %esi
callq 0x9735
testb %al, %al
je 0x2eb3
leaq 0x72a2(%rip), %rdi      # 0xa14e
xorl %eax, %eax
callq 0x2100
cmpl $0x1, %r15d
jne 0x2ec3
jmp 0x2ee6
pushq $0x4e
popq %rdi
callq 0x2050
movq %r14, %rdi
pushq $0x1
popq %rsi
callq 0x9735
testb %al, %al
je 0x2ee0
leaq 0x7278(%rip), %rdi      # 0xa151
xorl %eax, %eax
callq 0x2100
cmpl $0x2, %r15d
je 0x2f03
movq %r14, %rdi
movl %r12d, %esi
callq 0x9735
testb %al, %al
je 0x2f03
leaq 0x7258(%rip), %rdi      # 0xa154
xorl %eax, %eax
callq 0x2100
cmpq $0x0, 0x10(%r14)
je 0x2f18
leaq 0x7246(%rip), %rdi      # 0xa157
xorl %eax, %eax
callq 0x2100
movq %r13, %rdi
xorl %eax, %eax
callq 0x2100
movq %r14, %rdi
callq 0x7c9f
movq %r14, %rdi
movq %rax, %rsi
callq 0x252d
callq 0x3027
movzbl 0x114cf(%rip), %eax     # 0x14410
leal -0x4d(%rax), %ecx
cmpl $0x2c, %ecx
ja 0x2fa8
movabsq $0x100000001, %rdx      # imm = 0x100000001
btq %rcx, %rdx
jb 0x2fd3
movabsq $0x200000002, %rdx      # imm = 0x200000002
btq %rcx, %rdx
jb 0x2fb7
movabsq $0x100000001000, %rdx   # imm = 0x100000001000
btq %rcx, %rdx
jae 0x2fa8
cmpb $0x0, 0x11491(%rip)     # 0x14411
movl %r12d, %r15d
je 0x2fe4
leaq 0x11485(%rip), %rdi     # 0x14411
leaq 0x71c9(%rip), %rsi      # 0xa15c
pushq $0x3
popq %rdx
callq 0x2250
movl %r12d, %r15d
testl %eax, %eax
jne 0x2e2c
jmp 0x2fe4
testl %eax, %eax
je 0x2fe4
cmpl $0x3f, %eax
jne 0x2e2c
jmp 0x2ff3
xorl %r15d, %r15d
cmpb $0x0, 0x11450(%rip)     # 0x14411
je 0x2fe4
cmpw $0x6f, 0x11446(%rip)    # 0x14411
jne 0x2e2c
jmp 0x2fe4
cmpb $0x0, 0x11437(%rip)     # 0x14411
pushq $0x1
popq %r15
jne 0x2e2c
movq %r14, %rdi
movl %r15d, %esi
callq 0x979d
testb %al, %al
jne 0x3018
movq 0x10(%r14), %rsi
testq %rsi, %rsi
leaq 0x111bf(%rip), %rax     # 0x141c0
cmoveq %rax, %rsi
leaq 0xc6d2(%rip), %rdi      # 0xf6de
xorl %eax, %eax
callq 0x2100
jmp 0x2e2c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq