// File: /workspace/github_c_makefile_star2_O3/saltyJeff[P]uClibcpp/extra/config/./confdata.c
// Function: conf_read
int conf_read(const char *name)
{
	FILE *in = NULL;
	char line[1024];
	char *p, *p2;
	int lineno = 0;
	struct symbol *sym;
	struct property *prop;
	struct expr *e;
	int i;

	if (name) {
		in = zconf_fopen(name);
	} else {
		const char **names = conf_confnames;
		while ((name = *names++)) {
			name = conf_expand_value(name);
			in = zconf_fopen(name);
			if (in) {
				printf("#\n"
				       "# using defaults found in %s\n"
				       "#\n", name);
				break;
			}
		}
	}

	if (!in)
		return 1;

	for_all_symbols(i, sym) {
		sym->flags |= SYMBOL_NEW | SYMBOL_CHANGED;
		sym->flags &= ~SYMBOL_VALID;
		switch (sym->type) {
		case S_INT:
		case S_HEX:
		case S_STRING:
			if (sym->user.val)
				free(sym->user.val);
		default:
			sym->user.val = NULL;
			sym->user.tri = no;
		}
	}

	while (fgets(line, sizeof(line), in)) {
		lineno++;
		sym = NULL;
		switch (line[0]) {
		case '#':
			if (line[1]!=' ')
				continue;
			p = strchr(line + 2, ' ');
			if (!p)
				continue;
			*p++ = 0;
			if (strncmp(p, "is not set", 10))
				continue;
			sym = sym_find(line + 2);
			if (!sym) {
				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line + 2);
				break;
			}
			switch (sym->type) {
			case S_BOOLEAN:
			case S_TRISTATE:
				sym->user.tri = no;
				sym->flags &= ~SYMBOL_NEW;
				break;
			default:
				;
			}
			break;

		case 'A' ... 'Z':
			p = strchr(line, '=');
			if (!p)
				continue;
			*p++ = 0;
			p2 = strchr(p, '\n');
			if (p2)
				*p2 = 0;
			sym = sym_find(line);
			if (!sym) {
				fprintf(stderr, "%s:%d: trying to assign nonexistent symbol %s\n", name, lineno, line);
				break;
			}
			switch (sym->type) {
			case S_TRISTATE:
				if (p[0] == 'm') {
					sym->user.tri = mod;
					sym->flags &= ~SYMBOL_NEW;
					break;
				}
			case S_BOOLEAN:
				if (p[0] == 'y') {
					sym->user.tri = yes;
					sym->flags &= ~SYMBOL_NEW;
					break;
				}
				if (p[0] == 'n') {
					sym->user.tri = no;
					sym->flags &= ~SYMBOL_NEW;
					break;
				}
				break;
			case S_STRING:
				if (*p++ != '"')
					break;
				for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
					if (*p2 == '"') {
						*p2 = 0;
						break;
					}
					memmove(p2, p2 + 1, strlen(p2));
				}
				if (!p2) {
					fprintf(stderr, "%s:%d: invalid string found\n", name, lineno);
					exit(1);
				}
			case S_INT:
			case S_HEX:
				if (sym_string_valid(sym, p)) {
					sym->user.val = strdup(p);
					sym->flags &= ~SYMBOL_NEW;
				} else {
					fprintf(stderr, "%s:%d: symbol value '%s' invalid for %s\n", name, lineno, p, sym->name);
					exit(1);
				}
				break;
			default:
				;
			}
			break;
		case '\n':
			break;
		default:
			continue;
		}
		if (sym && sym_is_choice_value(sym)) {
			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
			switch (sym->user.tri) {
			case no:
				break;
			case mod:
				if (cs->user.tri == yes)
					/* warn? */;
				break;
			case yes:
				if (cs->user.tri != no)
					/* warn? */;
				cs->user.val = sym;
				break;
			}
			cs->user.tri = E_OR(cs->user.tri, sym->user.tri);
			cs->flags &= ~SYMBOL_NEW;
		}
	}
	fclose(in);

	for_all_symbols(i, sym) {
		sym_calc_value(sym);
		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
			if (sym->visible == no)
				sym->flags |= SYMBOL_NEW;
			switch (sym->type) {
			case S_STRING:
			case S_INT:
			case S_HEX:
				if (!sym_string_within_range(sym, sym->user.val))
					sym->flags |= SYMBOL_NEW;
			default:
				break;
			}
		}
		if (!sym_is_choice(sym))
			continue;
		prop = sym_get_choice_prop(sym);
		for (e = prop->expr; e; e = e->left.expr)
			if (e->right.sym->visible != no)
				sym->flags |= e->right.sym->flags & SYMBOL_NEW;
	}

	sym_change_count = 1;

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
testq %rdi, %rdi
je 0x7584
movq %rdi, %r15
callq 0x72fd
movq %rax, %r14
testq %rax, %rax
jne 0x75c4
movl $0x1, %eax
jmp 0x79cb
leaq 0xdc75(%rip), %rbx      # 0x15200
leaq 0xf84e(%rip), %r15      # 0x16de0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x757a
addq $0x8, %rbx
callq 0x7434
movq %r15, %rdi
callq 0x72fd
testq %rax, %rax
je 0x7592
movq %rax, %r14
leaq 0x92bb(%rip), %rdi      # 0x10875
movq %r15, %rsi
xorl %eax, %eax
callq 0x2100
movq %r15, 0x8(%rsp)
xorl %ebx, %ebx
leaq 0xdf3e(%rip), %r12      # 0x15510
movl $0xfffff37f, %ebp       # imm = 0xFFFFF37F
movq (%r12,%rbx,8), %r15
testq %r15, %r15
je 0x7624
movl 0x18(%r15), %eax
cmpl $0x6, %eax
je 0x761f
movl 0x44(%r15), %ecx
andl %ebp, %ecx
orl $0xc00, %ecx            # imm = 0xC00
movl %ecx, 0x44(%r15)
addl $-0x3, %eax
cmpl $0x2, %eax
ja 0x760f
movq 0x30(%r15), %rdi
testq %rdi, %rdi
je 0x760f
callq 0x2040
movq $0x0, 0x30(%r15)
movl $0x0, 0x38(%r15)
movq (%r15), %r15
jmp 0x75db
incq %rbx
cmpq $0x101, %rbx            # imm = 0x101
jne 0x75d7
leaq 0x10(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x2170
testq %rax, %rax
je 0x7904
leaq 0x10(%rsp), %r15
xorl %ebp, %ebp
incl %ebp
movzbl 0x10(%rsp), %eax
leal -0x41(%rax), %ecx
cmpl $0x1a, %ecx
jae 0x77bb
movq %r15, %rdi
movl $0x3d, %esi
callq 0x20f0
testq %rax, %rax
je 0x7882
movq %rax, %rbx
movl %ebp, 0x4(%rsp)
movq %r15, %rbp
leaq 0x1(%rax), %r15
movb $0x0, (%rax)
movq %r15, %rdi
movl $0xa, %esi
callq 0x20f0
testq %rax, %rax
je 0x76a1
movb $0x0, (%rax)
movq %rbp, %rdi
callq 0x7a1d
testq %rax, %rax
je 0x78ba
movq %rax, %r13
movl 0x18(%rax), %eax
decl %eax
cmpl $0x4, %eax
ja 0x776b
leaq 0x3e22(%rip), %rcx      # 0xb4ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r15, %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7ab5
testb %al, %al
je 0x79eb
movq %rbp, %r15
movq %rbx, %rdi
callq 0x2300
movq %rax, 0x30(%r13)
movl 0x4(%rsp), %ebp
andb $-0x9, 0x45(%r13)
jmp 0x7832
cmpb $0x22, 0x1(%rbx)
jne 0x776b
addq $0x2, %rbx
movq %rbx, %rdi
leaq 0x91b7(%rip), %rsi      # 0x108d1
callq 0x2250
testq %rax, %rax
je 0x79dd
movq %rax, %r15
cmpb $0x22, (%r15)
je 0x78aa
leaq 0x1(%r15), %r12
movq %r15, %rdi
callq 0x20e0
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2270
movq %r12, %rdi
leaq 0x9178(%rip), %rsi      # 0x108d1
callq 0x2250
movq %rax, %r15
testq %rax, %rax
jne 0x772b
jmp 0x79dd
movq %rbp, %r15
movl 0x4(%rsp), %ebp
jmp 0x7832
movb (%r15), %al
jmp 0x7793
movb (%r15), %al
cmpb $0x6d, %al
jne 0x7793
movl $0x1, 0x38(%r13)
movq %rbp, %r15
jmp 0x76f8
cmpb $0x6e, %al
movq %rbp, %r15
je 0x789d
movzbl %al, %eax
cmpl $0x79, %eax
movl 0x4(%rsp), %ebp
jne 0x7832
movl $0x2, 0x38(%r13)
jmp 0x76fc
cmpl $0x23, %eax
jne 0x7882
cmpb $0x20, 0x11(%rsp)
jne 0x7882
leaq 0x12(%rsp), %rdi
movl $0x20, %esi
callq 0x20f0
testq %rax, %rax
je 0x7882
movq %rax, %rdi
incq %rdi
movb $0x0, (%rax)
movl $0xa, %edx
leaq 0x909b(%rip), %rsi      # 0x10897
callq 0x2080
testl %eax, %eax
jne 0x7882
leaq 0x12(%rsp), %rdi
callq 0x7a1d
testq %rax, %rax
je 0x78e5
movq %rax, %r13
movl 0x18(%rax), %eax
decl %eax
cmpl $0x1, %eax
ja 0x7832
movl $0x0, 0x38(%r13)
jmp 0x76fc
testb $0x20, 0x44(%r13)
je 0x7882
leaq 0x48(%r13), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x784b
cmpl $0x5, 0x10(%rax)
jne 0x783d
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x7864
movl (%rax), %ecx
andl $-0x2, %ecx
cmpl $0x6, %ecx
jne 0x7864
movq 0x8(%rax), %rax
jmp 0x7866
xorl %eax, %eax
movl 0x38(%r13), %ecx
cmpl $0x2, %ecx
jne 0x7873
movq %r13, 0x30(%rax)
movl 0x38(%rax), %edx
cmpl %ecx, %edx
cmoval %edx, %ecx
movl %ecx, 0x38(%rax)
andb $-0x9, 0x45(%rax)
movq %r15, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x2170
testq %rax, %rax
jne 0x7652
jmp 0x7904
movl $0x0, 0x38(%r13)
jmp 0x76f8
movb $0x0, (%r15)
leaq 0xdc5b(%rip), %r12      # 0x15510
jmp 0x76d6
movq 0xd737(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x8fd7(%rip), %rsi      # 0x108a2
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq %rbp, %r15
movl %ecx, %ebp
movq %r15, %r8
xorl %eax, %eax
callq 0x21b0
jmp 0x7882
movq 0xd70c(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
leaq 0x8fac(%rip), %rsi      # 0x108a2
movq 0x8(%rsp), %rdx
movl %ebp, %ecx
leaq 0x12(%rsp), %r8
jmp 0x78dc
movq %r14, %rdi
callq 0x20d0
xorl %r14d, %r14d
movl $0x800, %ebp            # imm = 0x800
movq (%r12,%r14,8), %rbx
testq %rbx, %rbx
je 0x79af
cmpl $0x6, 0x18(%rbx)
je 0x7975
movq %rbx, %rdi
callq 0x7bd5
movl 0x44(%rbx), %ecx
testl $0x820, %ecx            # imm = 0x820
jne 0x7970
cmpl $0x0, 0x40(%rbx)
jne 0x7949
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x44(%rbx)
movl 0x18(%rbx), %eax
addl $-0x3, %eax
cmpl $0x2, %eax
ja 0x7970
movq 0x30(%rbx), %rsi
movq %rbx, %rdi
callq 0x7f6f
movl 0x44(%rbx), %ecx
testb %al, %al
jne 0x7970
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x44(%rbx)
testb $0x10, %cl
jne 0x797a
movq (%rbx), %rbx
jmp 0x7918
leaq 0x48(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x798c
cmpl $0x5, 0x10(%rax)
jne 0x797e
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x7975
movq 0x10(%rax), %rdx
cmpl $0x0, 0x40(%rdx)
je 0x79a9
movl 0x44(%rdx), %edx
andl %ebp, %edx
orl %edx, %ecx
movl %ecx, 0x44(%rbx)
movq 0x8(%rax), %rax
jmp 0x7990
incq %r14
cmpq $0x101, %r14            # imm = 0x101
jne 0x7914
movl $0x1, 0xe34f(%rip)      # 0x15d18
xorl %eax, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %esi
callq 0x276b
movq 0xd606(%rip), %rax      # 0x14ff8
movq (%rax), %rdi
movq 0x8(%r13), %r9
leaq 0x8ef1(%rip), %rsi      # 0x108f1
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0x21b0
movl $0x1, %edi
callq 0x22e0