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

     // getting element item
     pElem elem_Items=this->getGameElement(string("items"));
     assert(elem_Items!=NULL);
	  
     pElem elem_Item=this->searchForElementId(elem_Items,itemId);
     assert(elem_Item!=NULL);
	  
     // handler over xml
     TiXmlHandle itemHandle(elem_Item);
	  
     pElem elem_names=itemHandle.FirstChild("names").ToElement();
     assert(elem_names!=NULL);
     vector<string> names=getTextListFromNode(elem_names);
	  			 
     pElem elem_descriptions=itemHandle.FirstChild("descriptions").ToElement();
     assert(elem_descriptions!=NULL);
     vector<string> descrip=getTextListFromNode(elem_descriptions);	  

     pElem elem_properties=itemHandle.FirstChild("properties").ToElement();
     assert(elem_properties!=NULL);
	  
     // Getting the properties
     vector<string> prop=getTextListFromNode(elem_properties);	  
     vector<string> propN=getNameListFromNode(elem_properties);
     vector<pair<string,string> > props;	  
     vector<string>::iterator it1;
     vector<string>::iterator it2;
     for(it1 = propN.begin(),it2 = prop.begin();
	 it1 < propN.end() && it2 < prop.end();
	 it1++,it2++)
     {			 					
	  pair<string,string> pa(*it1,*it2);
	  props.push_back(pa);			 
     }

     // Getting path file to image
     // pElem elem_image = itemHandle.FirstChild("images").ToElement();

     TiXmlHandle itemHandle2(elem_Item);	  	  
     pElem elem_image=itemHandle.FirstChild("image").ToElement();	  
     assert(elem_image != NULL);
     string pathFileText = elem_image->GetText();
					
     // vector<string> v_pathFileText = getTextListFromNode(elem_image);	  
     // string pathFileText=v_pathFileText[0];
	  
     const Entidad& ent =  Entidad(itemId,names[0],descrip[0]);	  	  
     pItem item=new Item(ent,names,descrip,props,pathFileText);
	
     return item;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0x1d0(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xf620(%rip), %rsi      # 0x2d919
leaq 0xf61e(%rip), %rdx      # 0x2d91e
leaq 0x1c0(%rsp), %r15
movq %r15, %rdi
callq 0x19e74
movq %r14, %rdi
movq %r15, %rsi
callq 0x1ec8e
movq %rax, %r14
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e33b
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5340
testq %r14, %r14
je 0x1e902
leaq 0x1b0(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x1a0(%rsp), %r15
movq %r15, %rdi
callq 0x1a0b6
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ed22
movq %rax, %r14
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e39b
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x5340
testq %r14, %r14
je 0x1e921
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
leaq 0xf5b6(%rip), %rdx      # 0x2d969
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x2a67c
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1e886
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e886
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e886
leaq 0x188(%rsp), %rdi
movq %rax, %rdx
callq 0x1ebbc
leaq 0xf57a(%rip), %rdx      # 0x2d980
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a67c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e8a5
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e8a5
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e8a5
leaq 0x170(%rsp), %rdi
movq %rax, %rdx
callq 0x1ebbc
leaq 0xf548(%rip), %rdx      # 0x2d9a5
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a67c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e8c4
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e8c4
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %r14
testq %rax, %rax
je 0x1e8c4
leaq 0xb8(%rsp), %rdi
movq %r14, %rdx
callq 0x1ebbc
leaq 0xa0(%rsp), %rdi
movq %r14, %rdx
callq 0x1eafa
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq 0xa0(%rsp), %r14
cmpq 0xa8(%rsp), %r14
jae 0x1e579
movq 0xb8(%rsp), %r15
cmpq 0xc0(%rsp), %r15
jae 0x1e579
leaq 0x48(%rsp), %rbp
leaq 0x28(%rsp), %rbx
leaq 0x18(%rsp), %r12
leaq 0x80(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1eea2
movq %r13, %rdi
movq %r12, %rsi
callq 0x1ef06
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e546
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e55d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x20, %r14
cmpq 0xa8(%rsp), %r14
jae 0x1e579
addq $0x20, %r15
cmpq 0xc0(%rsp), %r15
jb 0x1e516
leaq 0xf446(%rip), %rdx      # 0x2d9c6
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a67c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e8e3
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e8e3
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e8e3
movq %rax, %rdi
callq 0x2911a
leaq 0x150(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %rax, %rsi
callq 0x19e2c
leaq 0x140(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x130(%rsp), %rdi
callq 0x1a0b6
movq 0x188(%rsp), %rax
leaq 0x120(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x110(%rsp), %rdi
callq 0x1a0b6
movq 0x170(%rsp), %rax
leaq 0x100(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x1a0b6
leaq 0x18(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x110(%rsp), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x1ef68
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e69b
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e6b8
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e6d5
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
movl $0x270, %edi            # imm = 0x270
callq 0x5330
movq %rax, %r14
leaq 0x210(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x1f01e
leaq 0x1f8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x1f01e
leaq 0x1e0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1f0a8
leaq 0xe0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x1a0b6
leaq 0x18(%rsp), %rsi
leaq 0x210(%rsp), %rdx
leaq 0x1f8(%rsp), %rcx
leaq 0x1e0(%rsp), %r8
leaq 0xd0(%rsp), %r9
movq %r14, %rdi
callq 0x23ac8
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e797
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1e0(%rsp), %rdi
callq 0x1f132
leaq 0x1f8(%rsp), %rdi
callq 0x19dce
leaq 0x210(%rsp), %rdi
callq 0x19dce
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e7d9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e7f4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e80f
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e830
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x80(%rsp), %rdi
callq 0x1f132
leaq 0xa0(%rsp), %rdi
callq 0x19dce
leaq 0xb8(%rsp), %rdi
callq 0x19dce
leaq 0x170(%rsp), %rdi
callq 0x19dce
leaq 0x188(%rsp), %rdi
callq 0x19dce
movq %r14, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xf0e2(%rip), %rdi      # 0x2d96f
leaq 0xf04b(%rip), %rsi      # 0x2d8df
leaq 0xf095(%rip), %rcx      # 0x2d930
movl $0xb8, %edx
callq 0x5210
leaq 0xf0e1(%rip), %rdi      # 0x2d98d
leaq 0xf02c(%rip), %rsi      # 0x2d8df
leaq 0xf076(%rip), %rcx      # 0x2d930
movl $0xbc, %edx
callq 0x5210
leaq 0xf0e5(%rip), %rdi      # 0x2d9b0
leaq 0xf00d(%rip), %rsi      # 0x2d8df
leaq 0xf057(%rip), %rcx      # 0x2d930
movl $0xc0, %edx
callq 0x5210
leaq 0xf0e2(%rip), %rdi      # 0x2d9cc
leaq 0xefee(%rip), %rsi      # 0x2d8df
leaq 0xf038(%rip), %rcx      # 0x2d930
movl $0xd5, %edx
callq 0x5210
leaq 0xf016(%rip), %rdi      # 0x2d91f
leaq 0xefcf(%rip), %rsi      # 0x2d8df
leaq 0xf019(%rip), %rcx      # 0x2d930
movl $0xaf, %edx
callq 0x5210
leaq 0xf031(%rip), %rdi      # 0x2d959
leaq 0xefb0(%rip), %rsi      # 0x2d8df
leaq 0xeffa(%rip), %rcx      # 0x2d930
movl $0xb2, %edx
callq 0x5210
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e965
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e965
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x1f132
jmp 0x1e977
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
callq 0x19dce
jmp 0x1e989
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x19dce
jmp 0x1e99b
movq %rax, %rbx
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdi
callq 0x5340
leaq 0x18(%rsp), %rdi
callq 0x1b638
jmp 0x1ea22
movq %rax, %rbx
jmp 0x1e9a8
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e9de
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1e9de
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ea00
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ea00
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ea22
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ea22
movq %rax, %rbx
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1eab0
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1eab0
jmp 0x1ea9e
jmp 0x1ea9e
movq %rax, %rbx
jmp 0x1eaca
jmp 0x1ea94
jmp 0x1ea99
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1eaf1
movq 0x1b0(%rsp), %rsi
jmp 0x1ea88
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1eaf1
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1eaf1
jmp 0x1ea9e
movq %rax, %rbx
jmp 0x1ead7
movq %rax, %rbx
jmp 0x1eae4
movq %rax, %rbx
jmp 0x1eab0
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1ef32
leaq 0x80(%rsp), %rdi
callq 0x1f132
leaq 0xa0(%rsp), %rdi
callq 0x19dce
leaq 0xb8(%rsp), %rdi
callq 0x19dce
leaq 0x170(%rsp), %rdi
callq 0x19dce
leaq 0x188(%rsp), %rdi
callq 0x19dce
movq %rbx, %rdi
callq 0x55c0
nop