// File: /workspace/github_cpp_makefile_star2_O1/fffrankkk[P]XmlCode/src/XMLTree.cpp
// Function: CXMLTree::ParseNode(void*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, CXMLNode*)
void CXMLTree::ParseNode(void* pvNode, const std::string& strName, CXMLNode* pCParent)
{
	xmlNodePtr pstNode = (xmlNodePtr)(pvNode);
	CXMLNode* pCNode = new CXMLNode;
	pCNode->SetName(strName);
	if (pCParent == NULL) {
		m_pCTree = new CXMLNode;
		m_pCTree->AddChild(pCNode);
	} else {
		pCParent->AddChild(pCNode);
	}

	//get name-value
	if ((pstNode->children != NULL && pstNode->children == pstNode->last) || pstNode->children == NULL) {
		char* pszCont = (char *) xmlNodeGetContent(pstNode);
		if (pszCont != NULL) {
			pCNode->SetValue(pszCont);
			xmlFree(pszCont);
		}
	}

	//get attribute
	xmlAttrPtr pstAttr = pstNode->properties;
	while (pstAttr != NULL) {
		char* pszCont = (char *)xmlGetProp(pstNode, pstAttr->name);
		if (pszCont != NULL) {
			pCNode->SetAttribute((char *)(pstAttr->name), pszCont);
			xmlFree(pszCont);
		}
		pstAttr = pstAttr->next;
	}

	//children
	xmlNodePtr pstChild = pstNode->children;
	while (pstChild != NULL) {
		if (pstChild->type == XML_ELEMENT_NODE) {
			ParseNode(pstChild, (char *)pstChild->name, pCNode);
		}
		pstChild = pstChild->next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
movl $0x90, %edi
callq 0x42e0
movq %rax, %r13
leaq 0x2a70c(%rip), %r14     # 0x2fa20
movq %r14, (%rax)
leaq 0x8(%rax), %rdi
addq $0x18, %rax
movq %rax, 0x8(%r13)
xorl %eax, %eax
movq %rax, 0x10(%r13)
movb %al, 0x18(%r13)
leaq 0x38(%r13), %rcx
movq %rcx, 0x28(%r13)
movq %rax, 0x30(%r13)
movb %al, 0x38(%r13)
leaq 0x50(%r13), %rcx
movl $0x0, 0x50(%r13)
movq %rax, 0x58(%r13)
movq %rcx, 0x60(%r13)
movq %rcx, 0x68(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r13)
movups %xmm0, 0x80(%r13)
movq %r12, %rsi
callq 0x41a0
testq %rbx, %rbx
jne 0x53cb
movl $0x90, %edi
callq 0x42e0
movq %rax, %rbx
movq %r14, (%rax)
addq $0x18, %rax
movq %rax, 0x8(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movb %al, 0x18(%rbx)
leaq 0x38(%rbx), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x30(%rbx)
movb %al, 0x38(%rbx)
leaq 0x50(%rbx), %rcx
movl $0x0, 0x50(%rbx)
movq %rax, 0x58(%rbx)
movq %rcx, 0x60(%rbx)
movq %rcx, 0x68(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x80(%rbx)
movq %rbx, 0x8(%r15)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4e24
movq 0x18(%rbp), %rax
testq %rax, %rax
je 0x53e7
je 0x53e7
cmpq 0x20(%rbp), %rax
jne 0x544c
movq %rbp, %rdi
callq 0x4330
testq %rax, %rax
je 0x544c
movq %rax, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, %rdi
callq 0x4140
movq %rbx, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x618a
leaq 0x28(%r13), %rdi
leaq 0x8(%rsp), %rsi
callq 0x41a0
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x5440
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x2ab91(%rip), %rax     # 0x2ffd8
movq %rbx, %rdi
callq *(%rax)
movq %r13, 0x28(%rsp)
movq %r15, 0x50(%rsp)
movq 0x58(%rbp), %r14
testq %r14, %r14
je 0x552f
movq 0x28(%rsp), %r12
addq $0x48, %r12
leaq 0x8(%rsp), %r13
leaq 0x30(%rsp), %rbx
movq 0x10(%r14), %rsi
movq %rbp, %r15
movq %rbp, %rdi
callq 0x4450
testq %rax, %rax
je 0x551f
movq %rax, %rbp
movq 0x10(%r14), %rsi
movq %r13, %rdi
leaq 0x7(%rsp), %rdx
callq 0x5aaa
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq %rbp, %rdi
callq 0x4140
movq %rbp, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x618a
movq %r12, %rdi
movq %r13, %rsi
callq 0x5a22
movq %rax, %rdi
movq %rbx, %rsi
callq 0x41a0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x54f7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5513
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq %rbp, %rdi
movq 0x2aabb(%rip), %rax     # 0x2ffd8
callq *(%rax)
movq 0x30(%r14), %r14
testq %r14, %r14
movq %r15, %rbp
jne 0x5476
movq 0x18(%rbp), %rbx
testq %rbx, %rbx
movq 0x50(%rsp), %r13
movq 0x28(%rsp), %rbp
je 0x5597
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r15
leaq 0x30(%rsp), %r12
cmpl $0x1, 0x8(%rbx)
jne 0x558e
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x5aaa
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %rbp, %rcx
callq 0x52e6
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x558e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x30(%rbx), %rbx
testq %rbx, %rbx
jne 0x5551
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x55ac
jmp 0x55bb
jmp 0x55bb
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
jne 0x55f3
jmp 0x5600
movq %rax, %rbx
jmp 0x5600
movq %rax, %rbx
jmp 0x55e4
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x55e4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x42f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5600
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42f0
movq %rbx, %rdi
callq 0x45a0