// File: /workspace/github_cpp_makefile_star2_O2/fffrankkk[P]XmlCode/src/Main.cpp
// Function: CMain::Src(std::vector<CClassDetail*, std::allocator<CClassDetail*>>&, CClassDetail*)
void CMain::Src(vector<CClassDetail *>& vecDetail, CClassDetail* pCRoot)
{
    ofstream ofsWriter;
    ofsWriter.open("Config.cpp");

    CClassCont CContent;
    string strComment = CContent.GetFileComment("Config.cpp");
    ofsWriter << strComment << endl;

    ofsWriter << "#include \"Config.h\"" << endl;
    ofsWriter << endl;
    ofsWriter << "#include <map>" << endl;
    ofsWriter << endl;
    ofsWriter << "#include <stdlib.h>" << endl;
    ofsWriter << endl;
    ofsWriter << "using std::map;" << endl;
    ofsWriter << endl;
    ofsWriter << "CConfig* CConfig::sm_pCInstance = new CConfig;" << endl;
    ofsWriter << endl;

    pCRoot->SetName("Config");

    for (BT_AUTO(iterDetail, vecDetail.begin()); iterDetail != vecDetail.end(); ++iterDetail) {
        pCRoot->AddChild((*iterDetail)->GetName(), *iterDetail);
    }

    stack<pair<CClassDetail*, string> > staClasses;
    staClasses.push(make_pair(pCRoot, ""));
    vector<pair<CClassDetail*, string> > vecClasses;
    while (!staClasses.empty()) {
        pair<CClassDetail*, string> paiClass = staClasses.top();
        staClasses.pop();

        vecClasses.push_back(paiClass);

        vector<CClassDetail *> vecChildren = paiClass.first->GetChildren();

        string strBase = string("C") + NUtility::First2Up(paiClass.first->GetName());
        if (!paiClass.second.empty()) {
            strBase = paiClass.second + "::" + strBase;
        }

        for (size_t zuCount = 0; zuCount < vecChildren.size(); ++zuCount) {
            staClasses.push(make_pair(vecChildren[zuCount], strBase));
        }
    }

    for (BT_AUTO(iterPair, vecClasses.rbegin()); iterPair != vecClasses.rend(); ++iterPair) {

        vector<string> vecStr = iterPair->first->GenerateConstruct(iterPair->second);
        for (size_t zuCount = 0; zuCount < vecStr.size(); ++zuCount) {
            ofsWriter  << vecStr[zuCount] << endl;
        }

        //if (!iterPair->second.empty()) {
        vector<string> vecParse = iterPair->first->GenerateParse(iterPair->second);
        for (size_t zuCount = 0; zuCount < vecParse.size(); ++zuCount) {
            ofsWriter << vecParse[zuCount] << endl;
        }
        ofsWriter << endl;
        //}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x398, %rsp            # imm = 0x398
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x198(%rsp), %r15
movq %r15, %rdi
callq 0x4580
leaq 0xfe7b(%rip), %rsi      # 0x1811d
pushq $0x10
popq %rdx
movq %r15, %rdi
callq 0x4050
leaq 0x120(%rsp), %rdi
callq 0x1082c
leaq 0xfe5c(%rip), %rsi      # 0x1811d
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5480
leaq 0xe0(%rsp), %rdi
leaq 0x120(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x10bac
leaq 0x50(%rsp), %rdi
callq 0x4160
leaq 0x198(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x4270
movq %rax, %rdi
callq 0x4180
leaq 0xfe10(%rip), %rsi      # 0x18128
leaq 0x198(%rsp), %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4180
leaq 0x198(%rsp), %rdi
callq 0x4180
leaq 0xfdfb(%rip), %rsi      # 0x1813c
leaq 0x198(%rsp), %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4180
leaq 0x198(%rsp), %rdi
callq 0x4180
leaq 0xfde1(%rip), %rsi      # 0x1814b
leaq 0x198(%rsp), %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4180
leaq 0x198(%rsp), %rdi
callq 0x4180
leaq 0xfdcc(%rip), %rsi      # 0x1815f
leaq 0x198(%rsp), %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4180
leaq 0x198(%rsp), %rdi
callq 0x4180
leaq 0xfdb3(%rip), %rsi      # 0x1816f
leaq 0x198(%rsp), %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4180
leaq 0x198(%rsp), %rdi
callq 0x4180
leaq 0xfdb9(%rip), %rsi      # 0x1819e
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x5480
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0xac10
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x4160
movq (%r14), %r13
leaq 0x78(%rbx), %r12
cmpq 0x8(%r14), %r13
je 0x8447
movq (%r13), %rsi
movq %r15, %rdi
callq 0xac1a
movq (%r13), %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x6ad6
movq %rbp, (%rax)
movq %r15, %rdi
callq 0x4160
addq $0x8, %r13
jmp 0x8415
leaq 0x50(%rsp), %rdi
callq 0x899a
leaq 0xb8(%rsp), %rsi
movq %rbx, (%rsi)
leaq 0x10087(%rip), %rax     # 0x184ea
movq %rax, 0x8(%rsi)
leaq 0x8(%rsp), %rdi
callq 0x89b6
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x8e68
leaq 0x10(%rsp), %rdi
callq 0x4160
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %r15
leaq 0x8(%rsp), %rbx
leaq 0x50(%rsp), %r13
leaq 0xa0(%rsp), %r12
leaq 0xb8(%rsp), %r14
leaq 0x178(%rsp), %rbp
movq 0x80(%rsp), %rsi
cmpq 0x60(%rsp), %rsi
je 0x8641
cmpq 0x88(%rsp), %rsi
jne 0x84f5
movq 0x98(%rsp), %rax
movq -0x8(%rax), %rsi
movl $0x1e0, %eax            # imm = 0x1E0
addq %rax, %rsi
addq $-0x28, %rsi
movq %rbx, %rdi
callq 0x89d2
movq %r13, %rdi
callq 0x9122
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x89e6
movq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0xaece
movq %r14, %rdi
leaq 0xfe3b(%rip), %rsi      # 0x18368
leaq 0x7(%rsp), %rdx
callq 0x5480
leaq 0x158(%rsp), %rbx
leaq 0x100(%rsp), %r12
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xac1a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7602
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x8a12
movq %r12, %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4160
movq %r14, %rdi
callq 0x4160
cmpq $0x0, 0x18(%rsp)
je 0x85ca
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
leaq 0xfc09(%rip), %rdx      # 0x181a5
callq 0x8a98
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x8a79
movq %rbp, %rdi
movq %r14, %rsi
callq 0x43a0
movq %r14, %rdi
callq 0x4160
movq %r12, %rdi
callq 0x4160
xorl %ebx, %ebx
xorl %r12d, %r12d
movq 0xa0(%rsp), %rsi
movq 0xa8(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
cmpq %rax, %r12
jae 0x8615
addq %rbx, %rsi
movq %r14, %rdi
movq %rbp, %rdx
callq 0x8b14
movq %r13, %rdi
movq %r14, %rsi
callq 0x8e68
movq %r15, %rdi
callq 0x4160
incq %r12
addq $0x8, %rbx
jmp 0x85cf
movq %rbp, %rdi
callq 0x4160
leaq 0xa0(%rsp), %r12
movq %r12, %rdi
callq 0x6ee2
leaq 0x10(%rsp), %rdi
callq 0x4160
leaq 0x8(%rsp), %rbx
jmp 0x84c4
movq 0x38(%rsp), %r13
leaq 0x8(%rsp), %rbx
leaq 0x198(%rsp), %r14
leaq 0xb8(%rsp), %r15
cmpq 0x30(%rsp), %r13
je 0x8721
movq -0x28(%r13), %rsi
leaq -0x20(%r13), %r12
movq %rbx, %rdi
movq %r12, %rdx
callq 0xe938
addq $-0x28, %r13
xorl %ebp, %ebp
xorl %ebx, %ebx
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rbx
jae 0x86b3
addq %rbp, %rsi
movq %r14, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x4180
incq %rbx
addq $0x20, %rbp
jmp 0x8681
movq (%r13), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0xef24
xorl %r12d, %r12d
xorl %ebx, %ebx
movq 0xb8(%rsp), %rsi
movq 0xc0(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rbx
jae 0x86ff
addq %r12, %rsi
movq %r14, %rdi
callq 0x4270
movq %rax, %rdi
callq 0x4180
incq %rbx
addq $0x20, %r12
jmp 0x86c7
movq %r14, %rdi
callq 0x4180
movq %r15, %rdi
callq 0x8ad0
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x8ad0
jmp 0x865b
leaq 0x30(%rsp), %rdi
callq 0x8af2
leaq 0x50(%rsp), %rdi
callq 0x8b26
leaq 0xe0(%rsp), %rdi
callq 0x4160
leaq 0x120(%rsp), %rdi
callq 0x10b82
leaq 0x198(%rsp), %rdi
callq 0x4490
addq $0x398, %rsp            # imm = 0x398
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4160
jmp 0x888b
movq %rax, %r14
jmp 0x888b
jmp 0x8818
jmp 0x881d
jmp 0x8818
movq %rax, %r14
leaq 0x50(%rsp), %rdi
jmp 0x889d
movq %rax, %r14
jmp 0x88a2
jmp 0x87ae
movq %rax, %r14
jmp 0x88af
jmp 0x8818
jmp 0x8839
movq %rax, %r14
leaq 0x100(%rsp), %rdi
jmp 0x8832
jmp 0x8862
jmp 0x8874
jmp 0x87d3
movq %rax, %r14
jmp 0x8881
jmp 0x87dd
movq %rax, %r14
jmp 0x8856
movq %rax, %r14
jmp 0x8849
movq %rax, %r14
jmp 0x880e
movq %rax, %r14
jmp 0x8801
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0x4160
leaq 0x158(%rsp), %rdi
callq 0x4160
leaq 0xb8(%rsp), %rdi
jmp 0x8844
movq %rax, %r14
jmp 0x8895
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x4160
jmp 0x8895
movq %rax, %r14
movq %r15, %rdi
callq 0x4160
jmp 0x883c
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0x4160
leaq 0xa0(%rsp), %rdi
callq 0x6ee2
leaq 0x10(%rsp), %rdi
callq 0x4160
jmp 0x8881
movq %rax, %r14
leaq 0xb8(%rsp), %rdi
callq 0x8ad0
jmp 0x8877
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x8ad0
leaq 0x30(%rsp), %rdi
callq 0x8af2
leaq 0x50(%rsp), %rdi
callq 0x8b26
leaq 0xe0(%rsp), %rdi
callq 0x4160
leaq 0x120(%rsp), %rdi
callq 0x10b82
leaq 0x198(%rsp), %rdi
callq 0x4490
movq %r14, %rdi
callq 0x45c0