// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x488, %rsp            # imm = 0x488
movq %rdi, 0x478(%rsp)
movq $0x0, 0x470(%rsp)
movl $0x0, 0x5c(%rsp)
cmpq $0x0, 0x478(%rsp)
je 0x98c5
movq 0x478(%rsp), %rdi
callq 0x94f0
movq %rax, 0x470(%rsp)
jmp 0x9944
leaq 0xf934(%rip), %rax      # 0x19200
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x30(%rsp)
movq (%rax), %rax
movq %rax, 0x478(%rsp)
cmpq $0x0, %rax
je 0x9942
movq 0x478(%rsp), %rdi
callq 0x96f0
movq %rax, 0x478(%rsp)
movq 0x478(%rsp), %rdi
callq 0x94f0
movq %rax, 0x470(%rsp)
cmpq $0x0, 0x470(%rsp)
je 0x9940
movq 0x478(%rsp), %rsi
leaq 0xc0ef(%rip), %rdi      # 0x15a26
movb $0x0, %al
callq 0x20f0
jmp 0x9942
jmp 0x98d1
jmp 0x9944
cmpq $0x0, 0x470(%rsp)
jne 0x995f
movl $0x1, 0x484(%rsp)
jmp 0xa0a0
movl $0x0, 0x3c(%rsp)
cmpl $0x101, 0x3c(%rsp)      # imm = 0x101
jge 0x9a32
movslq 0x3c(%rsp), %rcx
leaq 0xfb8f(%rip), %rax      # 0x19510
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x9a20
movq 0x50(%rsp), %rax
cmpl $0x6, 0x18(%rax)
je 0x9a0c
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movl %ecx, 0x44(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xffffff7f, %ecx       # imm = 0xFFFFFF7F
movl %ecx, 0x44(%rax)
movq 0x50(%rsp), %rax
movl 0x18(%rax), %eax
addl $-0x3, %eax
subl $0x2, %eax
ja 0x99f1
jmp 0x99d5
movq 0x50(%rsp), %rax
cmpq $0x0, 0x30(%rax)
je 0x99ef
movq 0x50(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x2040
jmp 0x99f1
movq 0x50(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x50(%rsp), %rax
movl $0x0, 0x38(%rax)
jmp 0x9a0c
jmp 0x9a0e
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x998a
jmp 0x9a22
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x9967
jmp 0x9a34
leaq 0x70(%rsp), %rdi
movq 0x470(%rsp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x2170
cmpq $0x0, %rax
je 0x9f19
movl 0x5c(%rsp), %eax
incl %eax
movl %eax, 0x5c(%rsp)
movq $0x0, 0x50(%rsp)
movsbl 0x70(%rsp), %eax
movl %eax, 0x24(%rsp)
subl $0xa, %eax
je 0x9e3d
jmp 0x9a7c
movl 0x24(%rsp), %eax
subl $0x23, %eax
je 0x9a9c
jmp 0x9a87
movl 0x24(%rsp), %eax
addl $-0x41, %eax
subl $0x1a, %eax
jb 0x9b85
jmp 0x9e3f
movsbl 0x71(%rsp), %eax
cmpl $0x20, %eax
je 0x9aa8
jmp 0x9a34
leaq 0x70(%rsp), %rdi
addq $0x2, %rdi
movl $0x20, %esi
callq 0x20e0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x9acd
jmp 0x9a34
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rsp)
movb $0x0, (%rax)
movq 0x68(%rsp), %rdi
leaq 0xbf5b(%rip), %rsi      # 0x15a48
movl $0xa, %edx
callq 0x2080
cmpl $0x0, %eax
je 0x9b01
jmp 0x9a34
leaq 0x70(%rsp), %rdi
addq $0x2, %rdi
callq 0xa0b0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x9b4e
movq 0xf4d5(%rip), %rax      # 0x18ff8
movq (%rax), %rdi
movq 0x478(%rsp), %rdx
movl 0x5c(%rsp), %ecx
leaq 0x70(%rsp), %r8
addq $0x2, %r8
leaq 0xbf11(%rip), %rsi      # 0x15a53
movb $0x0, %al
callq 0x21a0
jmp 0x9e44
movq 0x50(%rsp), %rax
movl 0x18(%rax), %eax
decl %eax
subl $0x1, %eax
ja 0x9b7e
jmp 0x9b5f
movq 0x50(%rsp), %rax
movl $0x0, 0x38(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9b80
jmp 0x9b80
jmp 0x9e44
leaq 0x70(%rsp), %rdi
movl $0x3d, %esi
callq 0x20e0
movq %rax, 0x68(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x9ba6
jmp 0x9a34
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rsp)
movb $0x0, (%rax)
movq 0x68(%rsp), %rdi
movl $0xa, %esi
callq 0x20e0
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x9bde
movq 0x60(%rsp), %rax
movb $0x0, (%rax)
leaq 0x70(%rsp), %rdi
callq 0xa0b0
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x9c23
movq 0xf3fc(%rip), %rax      # 0x18ff8
movq (%rax), %rdi
movq 0x478(%rsp), %rdx
movl 0x5c(%rsp), %ecx
leaq 0x70(%rsp), %r8
leaq 0xbe3c(%rip), %rsi      # 0x15a53
movb $0x0, %al
callq 0x21a0
jmp 0x9e44
movq 0x50(%rsp), %rax
movl 0x18(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x4, %eax
ja 0x9e39
movq 0x18(%rsp), %rax
leaq 0x6997(%rip), %rcx      # 0x105e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x6d, %eax
jne 0x9c81
movq 0x50(%rsp), %rax
movl $0x1, 0x38(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9e3b
jmp 0x9c83
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x79, %eax
jne 0x9cb2
movq 0x50(%rsp), %rax
movl $0x2, 0x38(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9e3b
movq 0x68(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x6e, %eax
jne 0x9ce1
movq 0x50(%rsp), %rax
movl $0x0, 0x38(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9e3b
jmp 0x9e3b
movq 0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x68(%rsp)
movsbl (%rax), %eax
cmpl $0x22, %eax
je 0x9d04
jmp 0x9e3b
movq 0x68(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rdi
leaq 0xbd68(%rip), %rsi      # 0x15a82
callq 0x2240
movq %rax, 0x60(%rsp)
cmpq $0x0, %rax
je 0x9d85
movq 0x60(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x9d41
movq 0x60(%rsp), %rax
movb $0x0, (%rax)
jmp 0x9d85
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x20d0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x2260
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0x9d0e
cmpq $0x0, 0x60(%rsp)
jne 0x9dbb
movq 0xf264(%rip), %rax      # 0x18ff8
movq (%rax), %rdi
movq 0x478(%rsp), %rdx
movl 0x5c(%rsp), %ecx
leaq 0xbcdb(%rip), %rsi      # 0x15a85
movb $0x0, %al
callq 0x21a0
movl $0x1, %edi
callq 0x22d0
jmp 0x9dbd
movq 0x50(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0xa200
testb $0x1, %al
jne 0x9dd2
jmp 0x9dfb
movq 0x68(%rsp), %rdi
callq 0x22f0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9e37
movq 0xf1f6(%rip), %rax      # 0x18ff8
movq (%rax), %rdi
movq 0x478(%rsp), %rdx
movl 0x5c(%rsp), %ecx
movq 0x68(%rsp), %r8
movq 0x50(%rsp), %rax
movq 0x8(%rax), %r9
leaq 0xbc7c(%rip), %rsi      # 0x15aa2
movb $0x0, %al
callq 0x21a0
movl $0x1, %edi
callq 0x22d0
jmp 0x9e3b
jmp 0x9e3b
jmp 0x9e44
jmp 0x9e44
jmp 0x9a34
cmpq $0x0, 0x50(%rsp)
je 0x9f14
movq 0x50(%rsp), %rdi
callq 0xa410
testb $0x1, %al
jne 0x9e63
jmp 0x9f14
movq 0x50(%rsp), %rdi
callq 0xa490
movq %rax, %rdi
callq 0xa440
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, 0x4(%rsp)
testl %eax, %eax
je 0x9ea2
jmp 0x9e8c
movl 0x4(%rsp), %eax
subl $0x1, %eax
je 0x9ea4
jmp 0x9e97
movl 0x4(%rsp), %eax
subl $0x2, %eax
je 0x9eb3
jmp 0x9ece
jmp 0x9ece
movq 0x28(%rsp), %rax
cmpl $0x2, 0x38(%rax)
jne 0x9eb1
jmp 0x9eb1
jmp 0x9ece
movq 0x28(%rsp), %rax
cmpl $0x0, 0x38(%rax)
je 0x9ec0
jmp 0x9ec0
movq 0x50(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rax
movl 0x38(%rax), %eax
movq 0x50(%rsp), %rcx
cmpl 0x38(%rcx), %eax
jbe 0x9eed
movq 0x28(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, (%rsp)
jmp 0x9ef8
movq 0x50(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, (%rsp)
movl (%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x38(%rax)
movq 0x28(%rsp), %rax
movl 0x44(%rax), %ecx
andl $0xfffff7ff, %ecx       # imm = 0xFFFFF7FF
movl %ecx, 0x44(%rax)
jmp 0x9a34
movq 0x470(%rsp), %rdi
callq 0x20c0
movl $0x0, 0x3c(%rsp)
cmpl $0x101, 0x3c(%rsp)      # imm = 0x101
jge 0xa08b
movslq 0x3c(%rsp), %rcx
leaq 0xf5c8(%rip), %rax      # 0x19510
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0xa079
movq 0x50(%rsp), %rax
cmpl $0x6, 0x18(%rax)
je 0xa065
movq 0x50(%rsp), %rdi
callq 0xa4f0
movq 0x50(%rsp), %rdi
callq 0xa9d0
testb $0x1, %al
jne 0x9f86
jmp 0x9ff0
movq 0x50(%rsp), %rdi
callq 0xa410
testb $0x1, %al
jne 0x9ff0
movq 0x50(%rsp), %rax
cmpl $0x0, 0x40(%rax)
jne 0x9fb0
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x44(%rax)
movq 0x50(%rsp), %rax
movl 0x18(%rax), %eax
addl $-0x3, %eax
subl $0x2, %eax
ja 0x9fec
jmp 0x9fc2
movq 0x50(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x30(%rax), %rsi
callq 0xaa00
testb $0x1, %al
jne 0x9fea
movq 0x50(%rsp), %rax
movl 0x44(%rax), %ecx
orl $0x800, %ecx            # imm = 0x800
movl %ecx, 0x44(%rax)
jmp 0x9fec
jmp 0x9fee
jmp 0x9ff0
movq 0x50(%rsp), %rdi
callq 0x7da0
testb $0x1, %al
jne 0xa000
jmp 0xa067
movq 0x50(%rsp), %rdi
callq 0xa490
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0xa063
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
cmpl $0x0, 0x40(%rax)
je 0xa051
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x44(%rax), %ecx
andl $0x800, %ecx            # imm = 0x800
movq 0x50(%rsp), %rax
orl 0x44(%rax), %ecx
movl %ecx, 0x44(%rax)
jmp 0xa053
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0xa01d
jmp 0xa065
jmp 0xa067
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x50(%rsp)
jmp 0x9f51
jmp 0xa07b
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x9f2e
movl $0x1, 0xfc83(%rip)      # 0x19d18
movl $0x0, 0x484(%rsp)
movl 0x484(%rsp), %eax
addq $0x488, %rsp            # imm = 0x488
retq
nop