// File: /workspace/github_cpp_makefile_star2_O3/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 0x17409
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
cmpq %rax, %rdx
jne 0x17a75
leaq 0x50(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x8a3c(%rip), %rdx      # 0x20474
leaq 0x40(%rsp), %rdi
movq %rdx, %rsi
callq 0x16fe4
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1cd0e
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x17a6b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
cmpq %rdx, %rax
je 0x17b93
leaq 0x70(%rsp), %r13
xorl %ebx, %ebx
leaq 0x68(%rsp), %rbp
xorl %r15d, %r15d
testq %r15, %r15
je 0x17ab8
movq (%rsp), %rsi
addq %rbx, %rdx
movq %rbp, %rdi
callq 0x175ae
movq 0x68(%rsp), %rax
testq %rax, %rax
jne 0x17ad0
movq (%rsp), %rcx
jmp 0x17b22
movq %rbp, %rdi
movq %r14, %rsi
callq 0x175ae
movq 0x68(%rsp), %rax
movq %r14, %rcx
testq %rax, %rax
je 0x17b22
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x1cb6c
xorl %r12d, %r12d
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x17af3
callq 0x16c72
testl %r12d, %r12d
jne 0x17b7d
incq %r15
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
movq %rax, %rcx
subq %rdx, %rcx
sarq $0x5, %rcx
addq $0x20, %rbx
cmpq %rcx, %r15
jb 0x17a94
jmp 0x17b99
movl (%rcx), %eax
movl $0x2, %r12d
testl %eax, %eax
je 0x17ae4
cmpl $0x8, %eax
jne 0x17b5c
movq 0x28(%rsp), %rax
subq 0x20(%rsp), %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r15
jae 0x17ae4
movq %r14, %rdi
testq %r15, %r15
je 0x17b55
movq (%rsp), %rdi
callq 0x17e68
jmp 0x17ae4
cmpb $0x0, 0x3c(%rsp)
jne 0x17d39
movq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x1, %r12d
jmp 0x17ae4
cmpl $0x2, %r12d
jne 0x17d09
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
jmp 0x17b99
xorl %r15d, %r15d
movq %rdx, %rax
subq %rdx, %rax
sarq $0x5, %rax
decq %rax
cmpq %rax, %r15
jae 0x17c03
movq %r15, %rbx
shlq $0x5, %rbx
leaq 0x40(%rsp), %r12
movq %r14, %rsi
testq %r15, %r15
je 0x17bc0
movq (%rsp), %rsi
addq %rbx, %rdx
movq %r12, %rdi
callq 0x17eb8
movq 0x8(%rsp), %rdi
movaps 0x40(%rsp), %xmm0
movaps %xmm0, (%rsp)
testq %rdi, %rdi
je 0x17be3
callq 0x16c72
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rax
incq %r15
subq %rdx, %rax
sarq $0x5, %rax
decq %rax
addq $0x20, %rbx
cmpq %rax, %r15
jb 0x17bb4
cmpq %rax, %r15
jne 0x17c7b
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 0x16778
testq %r15, %r15
je 0x17c94
movq (%rsp), %rdi
shlq $0x5, %r15
addq 0x20(%rsp), %r15
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x88(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x17ccc
movq 0x1035f(%rip), %rcx     # 0x27fd0
cmpb $0x0, (%rcx)
je 0x17cc8
incl 0x8(%rax)
jmp 0x17ccc
movaps (%rsp), %xmm0
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rcx
movups %xmm0, (%rcx)
movq %rax, (%rsp)
jmp 0x17d09
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rcx
movq (%rcx), %rax
movq %rax, 0x78(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0x17cea
movq 0x10312(%rip), %rcx     # 0x27fd0
cmpb $0x0, (%rcx)
je 0x17ce6
incl 0x8(%rax)
jmp 0x17cea
lock
incl 0x8(%rax)
leaq 0x88(%rsp), %rdx
movq %r15, %rsi
callq 0x17fd4
movq 0x90(%rsp), %rdi
jmp 0x17cff
lock
incl 0x8(%rax)
leaq 0x78(%rsp), %rdx
movq %r14, %rdi
callq 0x17fd4
movq 0x80(%rsp), %rdi
testq %rdi, %rdi
je 0x17d09
callq 0x16c72
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17d18
callq 0x16c72
leaq 0x20(%rsp), %rdi
callq 0x161bc
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 0x896b(%rip), %rsi      # 0x206c1
leaq 0x40(%rsp), %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x1ed8e
movb $0x1, %bpl
leaq 0x893b(%rip), %rsi      # 0x206aa
leaq 0x8940(%rip), %rdx      # 0x206b6
leaq 0x40(%rsp), %r8
movq %r14, %rdi
movl $0x18e, %ecx            # imm = 0x18E
callq 0x1eb2c
leaq 0xff71(%rip), %rax      # 0x27d00
addq $0x10, %rax
movq %rax, (%r14)
xorl %ebp, %ebp
leaq 0xff19(%rip), %rsi      # 0x27cb8
leaq 0x47f8(%rip), %rdx      # 0x1c59e
movq %r14, %rdi
callq 0xb390
movq %rax, %rbx
movq 0x80(%rsp), %rdi
jmp 0x17dc6
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x17dd0
callq 0x16c72
movq (%r12), %rdi
jmp 0x17e2e
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0x17e55
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
jmp 0x17e55
jmp 0x17e3c
movq %rax, %rbx
jmp 0x17e29
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x17e17
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb260
testb %bpl, %bpl
jne 0x17e21
jmp 0x17e29
movq %rax, %rbx
movq %r14, %rdi
callq 0xb1c0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x17e46
callq 0x16c72
jmp 0x17e46
jmp 0x17e43
movq %rax, %rbx
jmp 0x17e55
jmp 0x17e43
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17e55
callq 0x16c72
leaq 0x20(%rsp), %rdi
callq 0x161bc
movq %rbx, %rdi
callq 0xb3b0
nop