// File: 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
movq %rsp, %rbp
subq $0x2f0, %rsp            # imm = 0x2F0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xa8, %edi
callq 0x53e0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x258(%rbp)
callq 0x1abb0
jmp 0xa9e1
movq -0x258(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x6a00
movq -0x268(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6ad0
movb %al, -0x259(%rbp)
jmp 0xaa14
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0xab5d
jmp 0xaa24
jmp 0xaa26
jmp 0xaa28
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5200
leaq -0x50(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5670
movq -0x50(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x52e0
movq %rax, -0x60(%rbp)
movq 0x4056f(%rip), %rax     # 0x4afd0
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movl 0x14(%rax), %edx
addl $0x76c, %edx            # imm = 0x76C
movq -0x60(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movq -0x60(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x60(%rbp), %rax
movl 0x8(%rax), %r9d
movq -0x60(%rbp), %rax
movl 0x4(%rax), %r11d
movq -0x60(%rbp), %rax
movl (%rax), %r10d
movq -0x48(%rbp), %rax
leaq 0x2c5cb(%rip), %rsi     # 0x37070
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x0, %al
callq 0x55b0
jmp 0xaabc
movq 0x4050d(%rip), %rax     # 0x4afd0
movq (%rax), %rdi
leaq 0x2c5c6(%rip), %rsi     # 0x37093
leaq 0x2c5ce(%rip), %rdx     # 0x370a2
movl $0x4a, %ecx
movb $0x0, %al
callq 0x55b0
movq 0x404e9(%rip), %rax     # 0x4afd0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x2c5bf(%rip), %rsi     # 0x370b4
movb $0x0, %al
callq 0x55b0
movq 0x404cd(%rip), %rax     # 0x4afd0
movq (%rax), %rdi
leaq 0x2d2fb(%rip), %rsi     # 0x37e08
movb $0x0, %al
callq 0x55b0
jmp 0xab16
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0xb1f9
movq -0x258(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
movl $0xa8, %esi
callq 0x53f0
jmp 0xb218
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb20f
leaq -0x40(%rbp), %rdi
callq 0x73b0
movq %rax, -0x270(%rbp)
jmp 0xab6f
movq -0x270(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0xab95
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0xb1f9
movq -0x20(%rbp), %rax
movq %rax, -0x280(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x5750
movq -0x278(%rbp), %rdx
leaq 0x2c44f(%rip), %rsi     # 0x37010
leaq -0x90(%rbp), %rdi
callq 0x7a40
jmp 0xabcf
movq -0x280(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x1ad20
jmp 0xabe4
leaq -0x90(%rbp), %rdi
callq 0x5240
leaq -0x91(%rbp), %rdi
callq 0x5460
movq -0x70(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0xbc50
jmp 0xac0e
movq -0x70(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x65d0
jmp 0xac20
leaq -0xf0(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xbc80
movq %rax, -0xf8(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x78b0
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x7880
testb $0x1, %al
jne 0xac70
jmp 0xada2
leaq -0xf8(%rbp), %rdi
callq 0x78e0
movq %rax, -0x108(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x288(%rbp)
movq -0x108(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0xfaf0
jmp 0xacb1
movq -0x288(%rbp), %rsi
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rdx
callq 0xbcb0
jmp 0xaccd
movq -0x290(%rbp), %rdi
movq -0x108(%rbp), %rdx
leaq -0x128(%rbp), %rsi
callq 0x1ada0
jmp 0xace9
leaq -0x128(%rbp), %rdi
callq 0x5240
leaq -0x148(%rbp), %rdi
callq 0x5240
leaq -0xf8(%rbp), %rdi
callq 0x9740
jmp 0xac41
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xad38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5240
leaq -0x91(%rbp), %rdi
callq 0x5460
jmp 0xb20f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb1eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb1df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xad91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x5240
leaq -0x148(%rbp), %rdi
callq 0x5240
jmp 0xb1df
movq -0x70(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x79d0
jmp 0xadb4
leaq -0x190(%rbp), %rdi
callq 0xbd00
leaq -0x160(%rbp), %rdi
callq 0x9b70
movq %rax, -0x198(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x9a00
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xb930
testb $0x1, %al
jne 0xae02
jmp 0xafa7
leaq -0x198(%rbp), %rdi
callq 0xb970
movq (%rax), %rdi
callq 0xb9c0
movb %al, -0x291(%rbp)
jmp 0xae1e
movb -0x291(%rbp), %al
testb $0x1, %al
jne 0xaf94
jmp 0xae2e
leaq -0x198(%rbp), %rdi
callq 0xb970
movq (%rax), %rdi
callq 0xb990
movb %al, -0x292(%rbp)
jmp 0xae4a
movb -0x292(%rbp), %al
testb $0x1, %al
jne 0xaf94
jmp 0xae5a
leaq -0x198(%rbp), %rdi
callq 0xb970
movq (%rax), %rsi
leaq -0x1c8(%rbp), %rdi
callq 0x65d0
jmp 0xae77
leaq -0x190(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0xbd20
movq %rax, -0x2a0(%rbp)
jmp 0xae93
movq -0x2a0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x5240
leaq -0x190(%rbp), %rdi
callq 0xbd80
movq %rax, -0x1d0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0xbd50
testb $0x1, %al
jne 0xaed9
jmp 0xaf21
leaq -0x1a8(%rbp), %rdi
callq 0xbdb0
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
jmp 0xaf92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb1c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x5240
jmp 0xb1c7
leaq -0x198(%rbp), %rdi
callq 0xb970
movq (%rax), %rsi
leaq -0x1f0(%rbp), %rdi
callq 0x65d0
jmp 0xaf3e
leaq -0x190(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0xbdd0
movq %rax, -0x2a8(%rbp)
jmp 0xaf5a
movq -0x2a8(%rbp), %rax
movl $0x1, (%rax)
leaq -0x1f0(%rbp), %rdi
callq 0x5240
jmp 0xaf92
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x1f0(%rbp), %rdi
callq 0x5240
jmp 0xb1c7
jmp 0xaf94
jmp 0xaf96
leaq -0x198(%rbp), %rdi
callq 0xbbb0
jmp 0xadd3
leaq -0x190(%rbp), %rdi
callq 0xbeb0
movq %rax, -0x1f8(%rbp)
leaq -0x190(%rbp), %rdi
callq 0xbd80
movq %rax, -0x200(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xbd50
testb $0x1, %al
jne 0xafe9
jmp 0xb186
leaq -0x1f8(%rbp), %rdi
callq 0xbdb0
cmpl $0x1, 0x20(%rax)
jne 0xb0bc
movq -0x20(%rbp), %rax
movq %rax, -0x2c0(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xbdb0
movq %rax, -0x2b8(%rbp)
leaq -0x221(%rbp), %rdi
movq %rdi, -0x2b0(%rbp)
callq 0x5750
movq -0x2b0(%rbp), %rdx
leaq 0x2ca96(%rip), %rsi     # 0x37ad4
leaq -0x220(%rbp), %rdi
callq 0x7a40
jmp 0xb04c
movq -0x2b8(%rbp), %rsi
movq -0x2c0(%rbp), %rdi
leaq -0x220(%rbp), %rdx
callq 0x1afc0
jmp 0xb068
leaq -0x220(%rbp), %rdi
callq 0x5240
leaq -0x221(%rbp), %rdi
callq 0x5460
jmp 0xb173
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb0ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x5240
leaq -0x221(%rbp), %rdi
callq 0x5460
jmp 0xb1c7
movq -0x20(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0xbdb0
movq %rax, -0x2d0(%rbp)
leaq -0x249(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x5750
movq -0x2c8(%rbp), %rdx
leaq 0x2bfc8(%rip), %rsi     # 0x370c3
leaq -0x248(%rbp), %rdi
callq 0x7a40
jmp 0xb109
movq -0x2d0(%rbp), %rsi
movq -0x2d8(%rbp), %rdi
leaq -0x248(%rbp), %rdx
callq 0x1afc0
jmp 0xb125
leaq -0x248(%rbp), %rdi
callq 0x5240
leaq -0x249(%rbp), %rdi
callq 0x5460
jmp 0xb173
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb165
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x5240
leaq -0x249(%rbp), %rdi
callq 0x5460
jmp 0xb1c7
jmp 0xb175
leaq -0x1f8(%rbp), %rdi
callq 0xbee0
jmp 0xafba
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x190(%rbp), %rdi
callq 0xbf10
leaq -0x160(%rbp), %rdi
callq 0x7680
leaq -0xf0(%rbp), %rdi
callq 0x5240
leaq -0xc8(%rbp), %rdi
callq 0x76e0
jmp 0xb1f9
leaq -0x190(%rbp), %rdi
callq 0xbf10
leaq -0x160(%rbp), %rdi
callq 0x7680
leaq -0xf0(%rbp), %rdi
callq 0x5240
leaq -0xc8(%rbp), %rdi
callq 0x76e0
jmp 0xb20f
leaq -0x40(%rbp), %rdi
callq 0x6a30
movq -0x8(%rbp), %rax
addq $0x2f0, %rsp            # imm = 0x2F0
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x6a30
movq -0x28(%rbp), %rdi
callq 0x5740
nopw %cs:(%rax,%rax)