// File: /workspace/github_cpp_makefile_star2_O3/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 $0x38, %rsp
testq %rdx, %rdx
je 0x297c1
movq %rdx, %r13
cmpb $0x0, (%rdx)
je 0x297c1
movq %rsi, %r15
movq %r13, 0x12f0(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movb (%r13), %r12b
testb %r12b, %r12b
je 0x2983d
movq (%rdi), %r14
movq %rdi, 0x30(%rsp)
movq 0x8(%rdi), %rbx
movq $0x0, 0x8(%rsp)
xorl %ebp, %ebp
movsbl %r12b, %edi
callq 0x13070
testl %eax, %eax
je 0x296f2
incq %r13
movq %r13, 0x12f0(%r15)
movb (%r13), %r12b
movsbl %r12b, %edi
callq 0x13070
incq %r13
testl %eax, %eax
jne 0x296d7
testb %r12b, %r12b
je 0x29794
testq %rbp, %rbp
jne 0x29794
movzbl %r12b, %ecx
shll $0x4, %ecx
movq (%r15,%rcx), %rax
movq 0x8(%r15,%rcx), %rsi
addq %r15, %rsi
testb $0x1, %al
je 0x29723
movq (%rsi), %rcx
movq -0x1(%rcx,%rax), %rax
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %rdi
callq *%rax
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
testq %r12, %r12
je 0x2975d
movq %r12, %rdi
callq 0x19f10
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2975d
callq 0x19f10
movq 0x12f0(%r15), %r13
movb (%r13), %r12b
movq %rbx, 0x8(%rsp)
movq %r14, %rbp
testb %r12b, %r12b
jne 0x296c7
movq 0x30(%rsp), %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
movq %rbx, 0x8(%rsp)
testq %r14, %r14
jne 0x297b2
jmp 0x29846
movq 0x30(%rsp), %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
testb %r12b, %r12b
jne 0x298bf
testq %rbp, %rbp
je 0x29846
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x60, %edi
callq 0x13110
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x435d(%rip), %rsi      # 0x2db3b
leaq 0x4380(%rip), %rdx      # 0x2db65
leaq 0x10(%rsp), %rdi
callq 0x19f80
movb $0x1, %bpl
leaq 0x42ff(%rip), %rsi      # 0x2daf8
leaq 0x4335(%rip), %rdx      # 0x2db35
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movl $0x207, %ecx            # imm = 0x207
callq 0x2bf1c
leaq 0xf557(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xf52f(%rip), %rsi      # 0x38d58
leaq -0xf692(%rip), %rdx     # 0x1a19e
movq %rbx, %rdi
callq 0x13410
jmp 0x29936
movq $0x0, 0x8(%rsp)
movl $0x60, %edi
callq 0x13110
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4332(%rip), %rsi      # 0x2db95
leaq 0x4353(%rip), %rdx      # 0x2dbbd
leaq 0x10(%rsp), %rdi
callq 0x19f80
movb $0x1, %bpl
leaq 0x427a(%rip), %rsi      # 0x2daf8
leaq 0x42b0(%rip), %rdx      # 0x2db35
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movl $0x219, %ecx            # imm = 0x219
callq 0x2bf1c
leaq 0xf4d2(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xf4aa(%rip), %rsi      # 0x38d58
leaq -0xf717(%rip), %rdx     # 0x1a19e
movq %rbx, %rdi
callq 0x13410
jmp 0x29936
movl $0x60, %edi
callq 0x13110
movq %rax, %rbx
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x428a(%rip), %rsi      # 0x2db66
leaq 0x42b1(%rip), %rdx      # 0x2db94
leaq 0x10(%rsp), %rdi
callq 0x19f80
movb $0x1, %bpl
leaq 0x4201(%rip), %rsi      # 0x2daf8
leaq 0x4237(%rip), %rdx      # 0x2db35
leaq 0x10(%rsp), %r8
movq %rbx, %rdi
movl $0x216, %ecx            # imm = 0x216
callq 0x2bf1c
leaq 0xf459(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xf431(%rip), %rsi      # 0x38d58
leaq -0xf790(%rip), %rdx     # 0x1a19e
movq %rbx, %rdi
callq 0x13410
jmp 0x2993a
jmp 0x2995b
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x29954
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x132a0
testb %bpl, %bpl
jne 0x2995e
jmp 0x299a5
movq %rax, %r15
movq %rbx, %rdi
callq 0x131e0
jmp 0x299a5
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0x29982
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x132a0
testb %bpl, %bpl
jne 0x2998c
jmp 0x299b7
movq %rax, %r15
movq %rbx, %rdi
callq 0x131e0
jmp 0x299b7
movq %rax, %r15
movq 0x30(%rsp), %rax
movq %r14, (%rax)
movq %rbx, 0x8(%rax)
cmpq $0x0, 0x8(%rsp)
je 0x299b7
movq 0x8(%rsp), %rdi
callq 0x19f10
movq %r15, %rdi
callq 0x13430
nop