// File: /workspace/github_cpp_makefile_star2_O2/swxlion[P]swxJson/src/swxJsonParser.cpp
// Function: swxJson::JsonParser::parse(char const*)
JsonPtr JsonParser::parse(const char* json)
{
	if (!json || *json == 0)
		throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: content error. Empty content.");

	_pos = (char *)json;
	JsonPtr root;

	while (*_pos != 0)
	{
		while (isspace(*_pos) != 0)
			_pos++;

		if (root || *_pos == 0) break;
		root = (this->*_callMap[(unsigned char)(*_pos)])();
	}

	if (*_pos != 0)
		throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: content error. Maybe multi-jsons.");

	if (root == nullptr)
		throw JSON_ERROR_MSG(JosnInvalidContentError, "Json parser: invalid or incomplete data.");

	return root;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
testq %rdx, %rdx
je 0x2ca90
movq %rdx, %r13
cmpb $0x0, (%rdx)
je 0x2ca90
movq %rsi, %r14
movq %rdi, %rbx
movq %r13, 0x12f0(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movb (%r13), %bpl
testb %bpl, %bpl
je 0x2ca78
incq %r13
movsbl %bpl, %edi
callq 0x1b060
testl %eax, %eax
je 0x2ca24
movq %r13, 0x12f0(%r14)
movb (%r13), %bpl
jmp 0x2ca07
testb %bpl, %bpl
je 0x2ca6f
cmpq $0x0, (%rbx)
jne 0x2ca6f
movzbl %bpl, %ecx
shll $0x4, %ecx
movq (%r14,%rcx), %rax
movq 0x8(%r14,%rcx), %rsi
addq %r14, %rsi
testb $0x1, %al
je 0x2ca4e
movq (%rsi), %rcx
movq -0x1(%rcx,%rax), %rax
movq %r12, %rdi
callq *%rax
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2adfc
movq %r15, %rdi
callq 0x1efec
movq 0x12f0(%r14), %r13
jmp 0x2c9fe
testb %bpl, %bpl
jne 0x2cb4f
cmpq $0x0, (%rbx)
je 0x2caf1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x60
popq %rdi
callq 0x1b110
movq %rax, %rbx
leaq 0x3091(%rip), %rsi      # 0x2fb33
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1d34a
movb $0x1, %bpl
leaq 0x3035(%rip), %rsi      # 0x2faf0
leaq 0x306b(%rip), %rdx      # 0x2fb2d
leaq 0x8(%rsp), %r8
movq %rbx, %rdi
movl $0x207, %ecx            # imm = 0x207
callq 0x2cc64
xorl %ebp, %ebp
leaq 0x1028b(%rip), %rsi     # 0x3cd68
leaq -0xd88e(%rip), %rdx     # 0x1f256
movq %rbx, %rdi
callq 0x1b3f0
jmp 0x2cbab
pushq $0x60
popq %rdi
callq 0x1b110
movq %rax, %r15
leaq 0x308a(%rip), %rsi      # 0x2fb8d
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1d34a
movb $0x1, %bpl
leaq 0x2fd4(%rip), %rsi      # 0x2faf0
leaq 0x300a(%rip), %rdx      # 0x2fb2d
leaq 0x8(%rsp), %r8
movq %r15, %rdi
movl $0x219, %ecx            # imm = 0x219
callq 0x2cc64
xorl %ebp, %ebp
leaq 0x1022a(%rip), %rsi     # 0x3cd68
leaq -0xd8ef(%rip), %rdx     # 0x1f256
movq %r15, %rdi
callq 0x1b3f0
jmp 0x2cbab
pushq $0x60
popq %rdi
callq 0x1b110
movq %rax, %r15
leaq 0x2ffd(%rip), %rsi      # 0x2fb5e
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1d34a
movb $0x1, %bpl
leaq 0x2f76(%rip), %rsi      # 0x2faf0
leaq 0x2fac(%rip), %rdx      # 0x2fb2d
leaq 0x8(%rsp), %r8
movq %r15, %rdi
movl $0x216, %ecx            # imm = 0x216
callq 0x2cc64
xorl %ebp, %ebp
leaq 0x101cc(%rip), %rsi     # 0x3cd68
leaq -0xd94d(%rip), %rdx     # 0x1f256
movq %r15, %rdi
callq 0x1b3f0
jmp 0x2cbaf
jmp 0x2cbc3
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1b458
testb %bpl, %bpl
jne 0x2cbc6
jmp 0x2cbf4
movq %rax, %r14
movq %r15, %rdi
callq 0x1b1c0
jmp 0x2cbf4
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1b458
testb %bpl, %bpl
jne 0x2cbe7
jmp 0x2cc00
movq %rax, %r14
movq %rbx, %rdi
callq 0x1b1c0
jmp 0x2cc00
movq %rax, %r14
addq $0x8, %rbx
movq %rbx, %rdi
callq 0x1efec
movq %r14, %rdi
callq 0x1b410