// File: /workspace/github_c_makefile_star2_O0/saltyJeff[P]uClibcpp/extra/config/./symbol.c
// Function: sym_string_within_range
bool sym_string_within_range(struct symbol *sym, const char *str)
{
	struct property *prop;
	int val;

	switch (sym->type) {
	case S_STRING:
		return sym_string_valid(sym, str);
	case S_INT:
		if (!sym_string_valid(sym, str))
			return false;
		prop = sym_get_range_prop(sym);
		if (!prop)
			return true;
		val = strtol(str, NULL, 10);
		return val >= strtol(prop->expr->left.sym->name, NULL, 10) &&
		       val <= strtol(prop->expr->right.sym->name, NULL, 10);
	case S_HEX:
		if (!sym_string_valid(sym, str))
			return false;
		prop = sym_get_range_prop(sym);
		if (!prop)
			return true;
		val = strtol(str, NULL, 16);
		return val >= strtol(prop->expr->left.sym->name, NULL, 16) &&
		       val <= strtol(prop->expr->right.sym->name, NULL, 16);
	case S_BOOLEAN:
	case S_TRISTATE:
		switch (str[0]) {
		case 'y': case 'Y':
			return sym_tristate_within_range(sym, yes);
		case 'm': case 'M':
			return sym_tristate_within_range(sym, mod);
		case 'n': case 'N':
			return sym_tristate_within_range(sym, no);
		}
		return false;
	default:
		return false;
	}
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movl 0x18(%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x38(%rsp)
subl $0x4, %eax
ja 0xaca0
movq 0x38(%rsp), %rax
leaq 0x5bd4(%rip), %rcx      # 0x10608
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xa200
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xa200
testb $0x1, %al
jne 0xaa74
movb $0x0, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
callq 0xeb80
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0xaa95
movb $0x1, 0x67(%rsp)
jmp 0xaca5
movq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x21c0
movl %eax, 0x44(%rsp)
movslq 0x44(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x21c0
movq 0x28(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x37(%rsp)
jl 0xab23
movslq 0x44(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x21c0
movq %rax, %rcx
movq 0x20(%rsp), %rax
cmpq %rcx, %rax
setle %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xa200
testb $0x1, %al
jne 0xab4f
movb $0x0, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
callq 0xeb80
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0xab70
movb $0x1, 0x67(%rsp)
jmp 0xaca5
movq 0x50(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x21c0
movl %eax, 0x44(%rsp)
movslq 0x44(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x21c0
movq 0x10(%rsp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, 0x1f(%rsp)
jl 0xabfe
movslq 0x44(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movq 0x30(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x10, %edx
callq 0x21c0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
setle %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movq 0x50(%rsp), %rax
movsbl (%rax), %eax
movl %eax, 0x4(%rsp)
subl $0x4d, %eax
je 0xac6e
jmp 0xac20
movl 0x4(%rsp), %eax
subl $0x4e, %eax
je 0xac85
jmp 0xac2b
movl 0x4(%rsp), %eax
subl $0x59, %eax
je 0xac57
jmp 0xac36
movl 0x4(%rsp), %eax
subl $0x6d, %eax
je 0xac6e
jmp 0xac41
movl 0x4(%rsp), %eax
subl $0x6e, %eax
je 0xac85
jmp 0xac4c
movl 0x4(%rsp), %eax
subl $0x79, %eax
jne 0xac99
jmp 0xac57
movq 0x58(%rsp), %rdi
movl $0x2, %esi
callq 0xef40
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
movl $0x1, %esi
callq 0xef40
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0xef40
andb $0x1, %al
movb %al, 0x67(%rsp)
jmp 0xaca5
movb $0x0, 0x67(%rsp)
jmp 0xaca5
movb $0x0, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq