// File: /workspace/github_cpp_makefile_star2_O2/fffrankkk[P]XmlCode/src/XMLParser.cpp
// Function: CXMLParser::ParseRoot(char const*)
CClassDetail* CXMLParser::ParseRoot(const char* pszFile)
{
    CClassDetail* pCClass = new CClassDetail;
    CXMLTree CParser;
    if (!CParser.Create(pszFile)) {
        ERROR_OUT("create [%s].", pszFile);
        return pCClass;
    }

    CXMLNode* pCRoot = CParser.GetRoot();
    if (PTR_NULL(pCRoot)) {
        return pCClass;
    }
    pCClass->SetType("s");

    BT_AUTO(mapAttribute, pCRoot->GetAttribute());
    const string& strName = pCRoot->GetName();
    for (BT_AUTO(iterAttr, mapAttribute.begin()); iterAttr != mapAttribute.end(); ++iterAttr) {
        const string& strAttr = iterAttr->first;
        pCClass->AddAttribute(strName + NUtility::First2Up(strAttr), strAttr);
    }

    vector<CXMLNode *> vecChildren = pCRoot->GetChildren();
    map<string, unsigned int> mapMember;
    for (vector<CXMLNode *>::iterator iterNode = vecChildren.begin(); iterNode != vecChildren.end(); ++iterNode) {
        if (!(*iterNode)->HasChildren() && !(*iterNode)->HasAttribute()) {
            map<string, unsigned int>::iterator iterFind = mapMember.find((*iterNode)->GetName());
            if (iterFind != mapMember.end()) {
                ++ (iterFind->second);
            } else {
                mapMember[(*iterNode)->GetName()] = 1;
            }
        }
    }
    for (map<string, unsigned int>::iterator iterMem = mapMember.begin(); iterMem != mapMember.end(); ++iterMem) {
        if (iterMem->second == 1) {
            pCClass->AddMember(iterMem->first, "c");
        } else {
            pCClass->AddMember(iterMem->first, "c+");
        }
    }
    return pCClass;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
movl $0xa8, %edi
callq 0x42f0
movq %rax, 0x8(%rsp)
movq %rax, %rdi
callq 0xab50
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x4dd4
movq %r15, %rdi
movq %r14, %rsi
callq 0x4e30
testb %al, %al
je 0x626b
leaq 0x38(%rsp), %rdi
callq 0x5256
movq %rax, %rbx
testq %rax, %rax
je 0x624a
leaq 0x11fe2(%rip), %rsi     # 0x1800a
leaq 0x60(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x5480
leaq 0x60(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0xac2c
leaq 0x60(%rsp), %rdi
callq 0x4160
leaq 0x48(%rbx), %rsi
leaq 0x60(%rsp), %rdi
callq 0x682c
leaq 0xc8(%rsp), %rdi
movq %rbx, 0x10(%rsp)
movq %rbx, %rsi
callq 0x4b8a
leaq 0x68(%rsp), %rbx
movq 0x10(%rbx), %rbp
leaq 0x18(%rsp), %r15
leaq 0x98(%rsp), %r12
leaq 0xc8(%rsp), %r13
cmpq %rbx, %rbp
je 0x60e3
leaq 0x20(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x7602
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x673d
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xac4e
movq %r12, %rdi
callq 0x4160
movq %r15, %rdi
callq 0x4160
movq %rbp, %rdi
callq 0x41f0
movq %rax, %rbp
jmp 0x6094
movq 0x10(%rsp), %rsi
addq $0x78, %rsi
leaq 0x48(%rsp), %rdi
callq 0x5536
leaq 0xa0(%rsp), %rbp
andl $0x0, (%rbp)
andq $0x0, 0x8(%rbp)
movq %rbp, 0x10(%rbp)
movq %rbp, 0x18(%rbp)
andq $0x0, 0x20(%rbp)
movq 0x48(%rsp), %r13
leaq 0x18(%rsp), %r14
leaq 0x98(%rsp), %r15
cmpq 0x50(%rsp), %r13
je 0x619a
movq (%r13), %rsi
movq 0x78(%rsi), %rax
cmpq 0x80(%rsi), %rax
jne 0x6194
cmpq $0x0, 0x70(%rsi)
jne 0x6194
movq %r14, %rdi
callq 0x4b8a
movq %r15, %rdi
movq %r14, %rsi
callq 0x7160
movq %rax, %r12
movq %r14, %rdi
callq 0x4160
cmpq %rbp, %r12
je 0x616f
incl 0x40(%r12)
jmp 0x6194
movq (%r13), %rsi
movq %r14, %rdi
callq 0x4b8a
movq %r15, %rdi
movq %r14, %rsi
callq 0x6762
movl $0x1, (%rax)
movq %r14, %rdi
callq 0x4160
addq $0x8, %r13
jmp 0x6126
movq 0xb0(%rsp), %r12
leaq 0x1290b(%rip), %rbx     # 0x18ab4
leaq 0x18(%rsp), %r15
leaq 0x7(%rsp), %r13
cmpq %rbp, %r12
je 0x621c
leaq 0x20(%r12), %r14
cmpl $0x1, 0x40(%r12)
jne 0x61e5
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x5480
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xad54
jmp 0x6207
movq %r15, %rdi
leaq 0x11ece(%rip), %rsi     # 0x180bd
movq %r13, %rdx
callq 0x5480
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xad54
movq %r15, %rdi
callq 0x4160
movq %r12, %rdi
callq 0x41f0
movq %rax, %r12
jmp 0x61b3
leaq 0x98(%rsp), %rdi
callq 0x6a72
leaq 0x48(%rsp), %rdi
callq 0x5584
leaq 0xc8(%rsp), %rdi
callq 0x4160
leaq 0x60(%rsp), %rdi
callq 0x54bc
leaq 0x38(%rsp), %rdi
callq 0x4de4
movq 0x8(%rsp), %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r15
movaps %xmm0, (%r15)
movq %r15, %rdi
xorl %esi, %esi
callq 0x4530
movq (%r15), %rax
leaq 0x98(%rsp), %rdi
movq %rax, (%rdi)
callq 0x4230
movq 0x1bd35(%rip), %rbx     # 0x21fd0
movq (%rbx), %rdi
movl $0x76c, %edx            # imm = 0x76C
addl 0x14(%rax), %edx
movl 0x10(%rax), %ecx
incl %ecx
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r9d
movl (%rax), %r10d
movl 0x4(%rax), %r11d
subq $0x8, %rsp
leaq 0x11da5(%rip), %rsi     # 0x1806a
xorl %eax, %eax
pushq 0x8(%r15)
pushq %r10
pushq %r11
callq 0x4460
addq $0x20, %rsp
movq (%rbx), %rdi
leaq 0x11dab(%rip), %rsi     # 0x1808d
leaq 0x11db3(%rip), %rdx     # 0x1809c
pushq $0x4a
popq %rcx
xorl %eax, %eax
callq 0x4460
movq (%rbx), %rdi
leaq 0x11db1(%rip), %rsi     # 0x180ae
movq %r14, %rdx
xorl %eax, %eax
callq 0x4460
movq (%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x43c0
jmp 0x624a
jmp 0x638c
movq %rax, %r14
jmp 0x63bd
jmp 0x633d
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x4160
jmp 0x63c7
jmp 0x633d
jmp 0x633d
jmp 0x6366
jmp 0x635f
movq %rax, %r14
jmp 0x63c7
movq %rax, %r14
movl $0xa8, %esi
movq 0x8(%rsp), %rdi
callq 0x4300
jmp 0x63d1
jmp 0x6366
jmp 0x635f
jmp 0x635f
movq %rax, %r14
jmp 0x6373
jmp 0x6366
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x4160
leaq 0x98(%rsp), %rdi
callq 0x6a72
leaq 0x48(%rsp), %rdi
callq 0x5584
jmp 0x63b0
movq %rax, %r14
jmp 0x63b0
movq %rax, %r14
jmp 0x63a6
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0x4160
leaq 0x18(%rsp), %rdi
callq 0x4160
leaq 0xc8(%rsp), %rdi
callq 0x4160
leaq 0x60(%rsp), %rdi
callq 0x54bc
leaq 0x38(%rsp), %rdi
callq 0x4de4
movq %r14, %rdi
callq 0x45c0
nop