// File: /workspace/github_cpp_makefile_star2_O1/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 0x29a74
cmpb $0x0, (%rdx)
je 0x29a74
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, 0x12f0(%rsi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
cmpb $0x0, (%rdx)
je 0x29a48
movq (%rbx), %r13
movq 0x8(%rbx), %r12
movq 0x12f0(%r14), %rbp
movb (%rbp), %r15b
movsbl %r15b, %edi
callq 0x13070
testl %eax, %eax
je 0x299d4
incq %rbp
movq %rbp, 0x12f0(%r14)
movb (%rbp), %r15b
movsbl %r15b, %edi
callq 0x13070
incq %rbp
testl %eax, %eax
jne 0x299b6
decq %rbp
testb %r15b, %r15b
je 0x29a48
testq %r13, %r13
jne 0x29a48
movzbl (%rbp), %ecx
shll $0x4, %ecx
movq (%r14,%rcx), %rax
movq 0x8(%r14,%rcx), %rsi
addq %r14, %rsi
testb $0x1, %al
je 0x299fd
movq (%rsi), %rcx
movq -0x1(%rcx,%rax), %rax
movq %rsp, %rdi
callq *%rax
movq (%rsp), %r13
movq 0x8(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %r13, (%rbx)
movq %r15, 0x8(%rbx)
testq %r12, %r12
je 0x29a26
movq %r12, %rdi
callq 0x19f34
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x29a35
callq 0x19f34
movq 0x12f0(%r14), %rax
cmpb $0x0, (%rax)
movq %r15, %r12
jne 0x2999b
movq 0x12f0(%r14), %rax
cmpb $0x0, (%rax)
jne 0x29aec
cmpq $0x0, (%rbx)
je 0x29b62
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x60, %edi
callq 0x13110
movq %rax, %rbx
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x40aa(%rip), %rsi      # 0x2db3b
leaq 0x40cd(%rip), %rdx      # 0x2db65
movq %rsp, %rdi
callq 0x19fa4
movb $0x1, %bpl
leaq 0x404e(%rip), %rsi      # 0x2daf8
leaq 0x4084(%rip), %rdx      # 0x2db35
movq %rsp, %r8
movq %rbx, %rdi
movl $0x207, %ecx            # imm = 0x207
callq 0x2c1b8
leaq 0xf2a8(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0xf280(%rip), %rsi      # 0x38d58
leaq -0xf921(%rip), %rdx     # 0x1a1be
movq %rbx, %rdi
callq 0x13410
jmp 0x29bd6
movl $0x60, %edi
callq 0x13110
movq %rax, %r15
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x405c(%rip), %rsi      # 0x2db66
leaq 0x4083(%rip), %rdx      # 0x2db94
movq %rsp, %rdi
callq 0x19fa4
movb $0x1, %bpl
leaq 0x3fd5(%rip), %rsi      # 0x2daf8
leaq 0x400b(%rip), %rdx      # 0x2db35
movq %rsp, %r8
movq %r15, %rdi
movl $0x216, %ecx            # imm = 0x216
callq 0x2c1b8
leaq 0xf22f(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xf207(%rip), %rsi      # 0x38d58
leaq -0xf99a(%rip), %rdx     # 0x1a1be
movq %r15, %rdi
callq 0x13410
jmp 0x29bd6
movl $0x60, %edi
callq 0x13110
movq %rax, %r15
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4015(%rip), %rsi      # 0x2db95
leaq 0x4036(%rip), %rdx      # 0x2dbbd
movq %rsp, %rdi
callq 0x19fa4
movb $0x1, %bpl
leaq 0x3f5f(%rip), %rsi      # 0x2daf8
leaq 0x3f95(%rip), %rdx      # 0x2db35
movq %rsp, %r8
movq %r15, %rdi
movl $0x219, %ecx            # imm = 0x219
callq 0x2c1b8
leaq 0xf1b9(%rip), %rax      # 0x38d70
addq $0x10, %rax
movq %rax, (%r15)
xorl %ebp, %ebp
leaq 0xf191(%rip), %rsi      # 0x38d58
leaq -0xfa10(%rip), %rdx     # 0x1a1be
movq %r15, %rdi
callq 0x13410
jmp 0x29bda
jmp 0x29bf5
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x29bfb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x132a0
jmp 0x29bfb
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x29c3d
movq %r15, %rdi
callq 0x131e0
jmp 0x29c3d
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x29c2b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x132a0
jmp 0x29c2b
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x29c4b
movq %rbx, %rdi
callq 0x131e0
jmp 0x29c4b
movq %rax, %r14
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x29c4b
callq 0x19f34
movq %r14, %rdi
callq 0x13430
nop