// File: /workspace/github_cpp_makefile_star2_O3/rcolomina[P]the_charmed_house/src/factory.cpp
// Function: FactoryGame::buildScenarioById(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
pScene FactoryGame::buildScenarioById(string scenId){

     string mainNode("scenes");
     string attrib("title");
     string childrenNode("descriptions");
     string childrenNode2("image");

     // getting element item
     pElem elem_Scenes = this->getGameElement(mainNode.c_str());	  	  
     pElem elem_Scene  = this->searchForElementId(elem_Scenes,scenId.c_str());

     if(elem_Scenes==NULL){
	  cout<<"Handle returned a Null at elem_Scenes"<<endl;
	  exit(0);
     }
	  
     if(elem_Scene==NULL){
	  cout<<"Handle returned a Null at elem_Scen"<<endl;
	  exit(0);
     }

     const string& scen_title = elem_Scene->Attribute(attrib.c_str());

     //cout<<"title scenary:"<<scen_title<<endl;
	  
     // handler
     TiXmlHandle itemHandle(elem_Scene);	  	  
     pElem scen_descrips=itemHandle.FirstChild(childrenNode.c_str()).ToElement();
	  
     if(scen_descrips==NULL){
	  // TODO: Add an asscertion
	  cout<<"Handle returned a Null value"<<endl;
	  exit(0);
     }
	  
     vector<string> descripts = getTextListFromNode(scen_descrips);

     pElem scen_image = itemHandle.FirstChild(childrenNode2.c_str()).ToElement();	  
     string pathText  = scen_image->GetText();

     const Entidad& ent = Entidad(scenId,scen_title,descripts[0]);
	  
     pScene scene = new Escenario(ent,descripts[1],pathText);
			 
     return scene;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xfdba(%rip), %rsi      # 0x2d9df
leaq 0xfdb9(%rip), %rdx      # 0x2d9e5
leaq 0x10(%rsp), %rdi
callq 0x19e74
leaq 0x108(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0xfd9d(%rip), %rsi      # 0x2d9e6
leaq 0xfd9b(%rip), %rdx      # 0x2d9eb
leaq 0xf8(%rsp), %rdi
callq 0x19e74
leaq 0xe8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xfd10(%rip), %rsi      # 0x2d980
leaq 0xfd15(%rip), %rdx      # 0x2d98c
leaq 0xd8(%rsp), %rdi
callq 0x19e74
leaq 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xfd2e(%rip), %rsi      # 0x2d9c6
leaq 0xfd2c(%rip), %rdx      # 0x2d9cb
leaq 0xb8(%rsp), %rdi
callq 0x19e74
movq 0x10(%rsp), %rsi
leaq 0x170(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x19e2c
leaq 0x170(%rsp), %rsi
movq %r14, %rdi
callq 0x1ec8e
movq %rax, %r14
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1dcfa
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x5340
movq (%rbx), %rsi
leaq 0x150(%rsp), %rdi
leaq 0x190(%rsp), %rdx
callq 0x19e2c
leaq 0x150(%rsp), %rdx
movq %r14, %rsi
callq 0x1ed22
movq %rax, %r15
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1dd46
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
testq %r14, %r14
je 0x1e09a
testq %r15, %r15
je 0x1e0c0
movq 0xf8(%rsp), %rsi
movq %r15, %rdi
callq 0x288ba
leaq 0x98(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %rax, %rsi
callq 0x19e2c
leaq 0x30(%rsp), %rsi
movq %r15, (%rsi)
movq 0xd8(%rsp), %rdx
leaq 0x190(%rsp), %rdi
callq 0x2a67c
movq 0x190(%rsp), %rdi
testq %rdi, %rdi
je 0x1e074
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e074
movq 0x190(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e074
leaq 0x118(%rsp), %rdi
movq %rax, %rdx
callq 0x1ebbc
movq 0xb8(%rsp), %rdx
leaq 0x190(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x2a67c
movq 0x190(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq 0x190(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %rdi
callq 0x2911a
leaq 0x130(%rsp), %rdi
leaq 0x190(%rsp), %rdx
movq %rax, %rsi
callq 0x19e2c
leaq 0x88(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x78(%rsp), %rdi
callq 0x1a0b6
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x58(%rsp), %rdi
callq 0x1a0b6
movq 0x118(%rsp), %rax
leaq 0x48(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x38(%rsp), %rdi
callq 0x1a0b6
leaq 0x190(%rsp), %rdi
leaq 0x78(%rsp), %rsi
leaq 0x58(%rsp), %rdx
leaq 0x38(%rsp), %rcx
callq 0x1ef68
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1ded8
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x1deef
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x1df09
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x5340
movl $0x168, %edi            # imm = 0x168
callq 0x5330
movq %rax, %r14
movq 0x118(%rsp), %rdx
addq $0x20, %rdx
leaq 0x190(%rsp), %rsi
leaq 0x130(%rsp), %rcx
movq %rax, %rdi
callq 0x1ab7a
leaq 0x1e8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1df5b
movq 0x1e8(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1c8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1df7c
movq 0x1c8(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1a0(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1df9d
movq 0x1a0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1dfbe
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x118(%rsp), %rdi
callq 0x19dce
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1dfec
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e009
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xd8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e026
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1e043
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1e05f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5340
movq %r14, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1bf45(%rip), %rdi     # 0x39fc0
leaq 0xf9b4(%rip), %rsi      # 0x2da36
movl $0x1c, %edx
callq 0x53a0
movq 0x1bf2d(%rip), %rdi     # 0x39fc0
callq 0x51a0
jmp 0x1e0e4
movq 0x1bf1f(%rip), %rdi     # 0x39fc0
leaq 0xf944(%rip), %rsi      # 0x2d9ec
movl $0x25, %edx
callq 0x53a0
movq 0x1bf07(%rip), %rdi     # 0x39fc0
callq 0x51a0
jmp 0x1e0e4
movq 0x1bef9(%rip), %rdi     # 0x39fc0
leaq 0xf944(%rip), %rsi      # 0x2da12
movl $0x23, %edx
callq 0x53a0
movq 0x1bee1(%rip), %rdi     # 0x39fc0
callq 0x51a0
xorl %edi, %edi
callq 0x53e0
movq %rax, 0x8(%rsp)
movl $0x168, %esi            # imm = 0x168
movq %r14, %rdi
callq 0x5340
jmp 0x1e104
movq %rax, 0x8(%rsp)
leaq 0x190(%rsp), %rdi
callq 0x1b638
jmp 0x1e175
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e136
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e136
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e154
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e154
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e175
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e175
movq %rax, 0x8(%rsp)
leaq 0x140(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e21a
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e21a
jmp 0x1e215
jmp 0x1e215
jmp 0x1e229
jmp 0x1e20c
jmp 0x1e20c
movq %rax, 0x8(%rsp)
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e24f
movq 0x160(%rsp), %rsi
jmp 0x1e247
jmp 0x1e20c
movq %rax, 0x8(%rsp)
leaq 0x180(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e24f
movq 0x180(%rsp), %rsi
jmp 0x1e247
jmp 0x1e20c
movq %rax, 0x8(%rsp)
jmp 0x1e26c
movq %rax, 0x8(%rsp)
jmp 0x1e289
movq %rax, 0x8(%rsp)
jmp 0x1e2a6
movq %rax, 0x8(%rsp)
jmp 0x1e24f
jmp 0x1e229
movq %rax, 0x8(%rsp)
leaq 0x118(%rsp), %rdi
callq 0x19dce
jmp 0x1e22e
movq %rax, 0x8(%rsp)
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e24f
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e26c
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xd8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e289
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0xf8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1e2a6
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x1e2c2
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x8(%rsp), %rdi
callq 0x55c0