// File: /workspace/github_cpp_makefile_star2_O1/swxlion[P]swxJson/src/swxJson.cpp
// Function: swxJson::Json::createNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
JsonPtr Json::createNode(const std::string& path, const std::string& delim, bool throwable)
{
	std::vector<std::string> sections;
	pathSplit(path, delim, sections);

	if (sections.empty())
		sections.push_back("");

	JsonPtr node;
	size_t i = 0;
	for (; i < sections.size(); i++)
	{
		JsonPtr next = (i>0) ? node->getNodeByKey(sections[i]) : getNodeByKey(sections[0]);
		if (next == nullptr)
		{
			enum ElementType nodeType = (i>0) ? node->type() : type();
			if (nodeType == JSON_Object)
				break;				//-- not found
			else if (nodeType == JSON_Uninit)
			{
				if (i < sections.size() - 1)
				{
					if (i > 0)
						node->setDict();
					else
						setDict();
				}
				break;
			}
			else
			{
				if (throwable)
					throw JSON_ERROR_FMT(JsonNodeTypeMissMatchError, "Section %d (%s)(base 0) in path is not object.", (int)i, sections[i].c_str());

				return nullptr;
			}
		}
		else
			node = next;
	}

	for (; i < sections.size() - 1; i++)
	{
		node = (i > 0) ? node->dictAddObject(sections[i]) : dictAddObject(sections[0]);
	}

	if (i == sections.size() - 1)
	{
		JsonPtr n(new Json());
		if (i > 0)
			node->addNode(sections[i], n);
		else
			addNode(sections[0], n);

		return n;
	}

	return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, 0x3c(%rsp)
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, 0x18(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rax, %rdi
movq %rcx, %rsi
callq 0x17687
movq 0x20(%rsp), %rax
cmpq 0x28(%rsp), %rax
jne 0x17ce0
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x97c7(%rip), %rdx      # 0x21474
leaq 0x40(%rsp), %rdi
movq %rdx, %rsi
callq 0x17258
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1d038
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x17ce0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq 0x20(%rsp), %rdx
cmpq %rdx, 0x28(%rsp)
je 0x17df0
leaq 0x90(%rsp), %r13
xorl %ebx, %ebx
leaq 0x88(%rsp), %rbp
xorl %r15d, %r15d
movq %r14, %rsi
testq %r15, %r15
je 0x17d18
movq (%rsp), %rsi
addq %rbx, %rdx
movq %rbp, %rdi
callq 0x17824
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x17d7e
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1ce9a
xorl %r12d, %r12d
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x17d56
callq 0x16eec
testl %r12d, %r12d
jne 0x17de5
incq %r15
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rdx, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r15
jb 0x17d0c
jmp 0x17df3
movq %r14, %rax
testq %r15, %r15
je 0x17d8a
movq (%rsp), %rax
movl (%rax), %eax
movl $0x2, %r12d
testl %eax, %eax
je 0x17d44
cmpl $0x8, %eax
jne 0x17dc4
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r15
jae 0x17d44
movq %r14, %rdi
testq %r15, %r15
je 0x17dbd
movq (%rsp), %rdi
callq 0x180de
jmp 0x17d44
cmpb $0x0, 0x3c(%rsp)
jne 0x17fac
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x1, %r12d
jmp 0x17d44
cmpl $0x2, %r12d
je 0x17df3
jmp 0x17f7c
xorl %r15d, %r15d
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rdx, %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r15
jae 0x17e7e
movq %r15, %rbx
shlq $0x5, %rbx
leaq 0x40(%rsp), %r12
movq %r14, %rsi
testq %r15, %r15
je 0x17e24
movq (%rsp), %rsi
addq %rbx, %rdx
movq %r12, %rdi
callq 0x18132
movaps 0x40(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x40(%rsp)
movq 0x8(%rsp), %rdi
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x17e4f
callq 0x16eec
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x17e5e
callq 0x16eec
incq %r15
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
subq %rdx, %rax
sarq $0x5, %rax
decq %rax
addq $0x20, %rbx
cmpq %rax, %r15
jb 0x17e18
cmpq %rax, %r15
jne 0x17ef3
movl $0x10, %edi
callq 0xb250
movl $0x8, (%rax)
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x8(%rcx), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x169ea
testq %r15, %r15
je 0x17f10
movq (%rsp), %rdi
shlq $0x5, %r15
addq 0x20(%rsp), %r15
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x78(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0x17f45
movq 0x110e7(%rip), %rcx     # 0x28fd0
cmpb $0x0, (%rcx)
je 0x17f41
incl 0x8(%rax)
jmp 0x17f45
xorl %eax, %eax
movq 0x18(%rsp), %rcx
movq %rax, 0x8(%rcx)
movaps (%rsp), %xmm0
movq %rax, 0x8(%rsp)
movups %xmm0, (%rcx)
movq %rax, (%rsp)
jmp 0x17f7c
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x68(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x70(%rsp)
testq %rax, %rax
je 0x17f60
movq 0x11099(%rip), %rcx     # 0x28fd0
cmpb $0x0, (%rcx)
je 0x17f5c
incl 0x8(%rax)
jmp 0x17f60
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %rdx
movq %r15, %rsi
callq 0x1824e
movq 0x80(%rsp), %rdi
jmp 0x17f72
lock
incl 0x8(%rax)
leaq 0x68(%rsp), %rdx
movq %r14, %rdi
callq 0x1824e
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x17f7c
callq 0x16eec
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17f8b
callq 0x16eec
leaq 0x20(%rsp), %rdi
callq 0x16430
movq 0x18(%rsp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x60, %edi
callq 0xb0f0
movq %rax, %r14
movq 0x20(%rsp), %rax
movq (%rax,%rbx), %rcx
leaq 0x96f8(%rip), %rsi      # 0x216c1
leaq 0x40(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1f0de
movb $0x1, %bpl
leaq 0x96c8(%rip), %rsi      # 0x216aa
leaq 0x96cd(%rip), %rdx      # 0x216b6
leaq 0x40(%rsp), %r8
movq %r14, %rdi
movl $0x18e, %ecx            # imm = 0x18E
callq 0x1ee7c
leaq 0x10cfe(%rip), %rax     # 0x28d00
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0x10ca6(%rip), %rsi     # 0x28cb8
leaq 0x48bf(%rip), %rdx      # 0x1c8d8
movq %r14, %rdi
callq 0xb390
movq %rax, %rbx
movq 0x70(%rsp), %rdi
jmp 0x18036
movq %rax, %rbx
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x18040
callq 0x16eec
movq (%r12), %rdi
jmp 0x180a4
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x180cb
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
jmp 0x180cb
jmp 0x180b2
movq %rax, %rbx
jmp 0x1809c
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1808f
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
jmp 0x1808f
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x1809c
movq %r14, %rdi
callq 0xb1c0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x180bc
callq 0x16eec
jmp 0x180bc
jmp 0x180b9
movq %rax, %rbx
jmp 0x180cb
jmp 0x180b9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x180cb
callq 0x16eec
leaq 0x20(%rsp), %rdi
callq 0x16430
movq %rbx, %rdi
callq 0xb3b0
nop