// File: mhe[P]raytracerframework_cpp/yaml/simplekey.cpp
// Function: YAML::Scanner::VerifySimpleKey(bool)
bool Scanner::VerifySimpleKey(bool force)
	{
		m_isLastKeyValid = false;
		if(m_simpleKeys.empty())
			return m_isLastKeyValid;

		// grab top key
		SimpleKey key = m_simpleKeys.top();

		// only validate if we're in the correct flow level
		if(key.flowLevel != m_flowLevel) {
			if(force)
				m_simpleKeys.pop();
			return false;
		}

		m_simpleKeys.pop();

		bool isValid = true;

		// needs to be followed immediately by a value
		if(m_flowLevel > 0 && !Exp::ValueInFlow.Matches(INPUT))
			isValid = false;
		if(m_flowLevel == 0 && !Exp::Value.Matches(INPUT))
			isValid = false;

		// also needs to be less than 1024 characters and inline
		if(INPUT.line != key.line || INPUT.pos() - key.pos > 1024)
			isValid = false;

		// invalidate key
		if(isValid)
			key.Validate();
		else
			key.Invalidate();

		// In block style, remember that we've pushed an indent for this potential simple key (if it was starting).
		// If it was invalid, then we need to pop it off.
		// Note: we're guaranteed to be popping the right one (i.e., there couldn't have been anything in
		//       between) since keys have to be inline, and will be invalidated immediately on a newline.
		if(!isValid && m_flowLevel == 0)
			m_indents.pop();

		m_isLastKeyValid = isValid;
		return isValid;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movb $0x0, 0x68(%rdi)
addq $0x70, %rdi
callq 0x49d80
testb $0x1, %al
jne 0x49bcf
jmp 0x49be0
movq -0x48(%rbp), %rax
movb 0x68(%rax), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x49cfb
movq -0x48(%rbp), %rdi
addq $0x70, %rdi
callq 0x49da0
movq -0x48(%rbp), %rcx
movq (%rax), %rdx
movq %rdx, -0x38(%rbp)
movq 0x8(%rax), %rdx
movq %rdx, -0x30(%rbp)
movq 0x10(%rax), %rdx
movq %rdx, -0x28(%rbp)
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x64(%rcx), %eax
je 0x49c34
testb $0x1, -0x11(%rbp)
je 0x49c2b
movq -0x48(%rbp), %rdi
addq $0x70, %rdi
callq 0x49dc0
movb $0x0, -0x1(%rbp)
jmp 0x49cfb
movq -0x48(%rbp), %rdi
addq $0x70, %rdi
callq 0x49dc0
movq -0x48(%rbp), %rax
movb $0x1, -0x39(%rbp)
cmpl $0x0, 0x64(%rax)
jle 0x49c67
movq -0x48(%rbp), %rsi
leaq 0x25066(%rip), %rdi     # 0x6ecc0
callq 0x3c550
testb $0x1, %al
jne 0x49c67
movb $0x0, -0x39(%rbp)
movq -0x48(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x49c89
movq -0x48(%rbp), %rsi
leaq 0x25014(%rip), %rdi     # 0x6ec90
callq 0x3c550
testb $0x1, %al
jne 0x49c89
movb $0x0, -0x39(%rbp)
movq -0x48(%rbp), %rax
movl 0x8(%rax), %eax
cmpl -0x34(%rbp), %eax
jne 0x49ca8
movq -0x48(%rbp), %rdi
callq 0x4a810
subl -0x38(%rbp), %eax
cmpl $0x400, %eax            # imm = 0x400
jle 0x49cac
movb $0x0, -0x39(%rbp)
testb $0x1, -0x39(%rbp)
je 0x49cbd
leaq -0x38(%rbp), %rdi
callq 0x49a10
jmp 0x49cc6
leaq -0x38(%rbp), %rdi
callq 0x49a50
testb $0x1, -0x39(%rbp)
jne 0x49ce6
movq -0x48(%rbp), %rax
cmpl $0x0, 0x64(%rax)
jne 0x49ce6
movq -0x48(%rbp), %rdi
addq $0xc0, %rdi
callq 0x410a0
movq -0x48(%rbp), %rax
movb -0x39(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x68(%rax)
movb -0x39(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)