// File: /workspace/github_cpp_makefile_star2_O1/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 0x103d8(%rip), %rsi     # 0x2e919
leaq 0x103d6(%rip), %rdx     # 0x2e91e
leaq 0x1c0(%rsp), %r15
movq %r15, %rdi
callq 0x1a08c
movq %r14, %rdi
movq %r15, %rsi
callq 0x1eec6
movq %rax, %r14
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e583
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5340
testq %r14, %r14
je 0x1eabf
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 0x1a300
movq %r14, %rsi
movq %r15, %rdx
callq 0x1ef5a
movq %rax, %r14
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e5e3
movq 0x1b0(%rsp), %rsi
incq %rsi
callq 0x5340
testq %r14, %r14
je 0x1eade
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
leaq 0x1036e(%rip), %rdx     # 0x2e969
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x2a974
movq (%r14), %rdi
testq %rdi, %rdi
je 0x1e62b
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e62b
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %rdx
jmp 0x1e62d
xorl %edx, %edx
testq %rdx, %rdx
je 0x1eafd
leaq 0x188(%rsp), %rdi
callq 0x1edf4
leaq 0x10336(%rip), %rdx     # 0x2e980
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a974
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e67e
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e67e
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %rdx
jmp 0x1e680
xorl %edx, %edx
testq %rdx, %rdx
je 0x1eb1c
leaq 0x170(%rsp), %rdi
callq 0x1edf4
leaq 0x10308(%rip), %rdx     # 0x2e9a5
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a974
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e6d1
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e6d1
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %r14
jmp 0x1e6d4
xorl %r14d, %r14d
testq %r14, %r14
je 0x1eb3b
leaq 0xb8(%rsp), %rdi
movq %r14, %rdx
callq 0x1edf4
leaq 0xa0(%rsp), %rdi
movq %r14, %rdx
callq 0x1ed32
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq 0xa0(%rsp), %r14
cmpq 0xa8(%rsp), %r14
jae 0x1e7b6
movq 0xb8(%rsp), %r15
cmpq 0xc0(%rsp), %r15
jae 0x1e7b6
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 0x1f0e4
movq %r13, %rdi
movq %r12, %rsi
callq 0x1f148
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1e783
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x18(%rsp), %rdi
cmpq %rbx, %rdi
je 0x1e79a
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x20, %r14
cmpq 0xa8(%rsp), %r14
jae 0x1e7b6
addq $0x20, %r15
cmpq 0xc0(%rsp), %r15
jb 0x1e753
leaq 0x10209(%rip), %rdx     # 0x2e9c6
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2a974
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1e7f1
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x1e7f1
movq 0x18(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %rdi
jmp 0x1e7f3
xorl %edi, %edi
testq %rdi, %rdi
je 0x1eb5a
callq 0x293d2
leaq 0x150(%rsp), %rdi
leaq 0x18(%rsp), %rdx
movq %rax, %rsi
callq 0x1a044
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 0x1a300
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 0x1a300
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 0x1a300
leaq 0x18(%rsp), %rdi
leaq 0x130(%rsp), %rsi
leaq 0x110(%rsp), %rdx
leaq 0xf0(%rsp), %rcx
callq 0x1f1aa
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1e8d4
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e8f1
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x1e90e
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 0x1f260
leaq 0x1f8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x1f260
leaq 0x1e0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x1f2ea
leaq 0xe0(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x150(%rsp), %rsi
movq 0x158(%rsp), %rdx
addq %rsi, %rdx
leaq 0xd0(%rsp), %rdi
callq 0x1a300
leaq 0x18(%rsp), %rsi
leaq 0x210(%rsp), %rdx
leaq 0x1f8(%rsp), %rcx
leaq 0x1e0(%rsp), %r8
leaq 0xd0(%rsp), %r9
movq %r14, %rdi
callq 0x23d38
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1e9d0
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1e0(%rsp), %rdi
callq 0x1f374
leaq 0x1f8(%rsp), %rdi
callq 0x19fe8
leaq 0x210(%rsp), %rdi
callq 0x19fe8
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ea12
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ea2d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ea48
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ea69
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x80(%rsp), %rdi
callq 0x1f374
leaq 0xa0(%rsp), %rdi
callq 0x19fe8
leaq 0xb8(%rsp), %rdi
callq 0x19fe8
leaq 0x170(%rsp), %rdi
callq 0x19fe8
leaq 0x188(%rsp), %rdi
callq 0x19fe8
movq %r14, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xfe59(%rip), %rdi      # 0x2e91f
leaq 0xfe12(%rip), %rsi      # 0x2e8df
leaq 0xfe5c(%rip), %rcx      # 0x2e930
movl $0xaf, %edx
callq 0x5210
leaq 0xfe74(%rip), %rdi      # 0x2e959
leaq 0xfdf3(%rip), %rsi      # 0x2e8df
leaq 0xfe3d(%rip), %rcx      # 0x2e930
movl $0xb2, %edx
callq 0x5210
leaq 0xfe6b(%rip), %rdi      # 0x2e96f
leaq 0xfdd4(%rip), %rsi      # 0x2e8df
leaq 0xfe1e(%rip), %rcx      # 0x2e930
movl $0xb8, %edx
callq 0x5210
leaq 0xfe6a(%rip), %rdi      # 0x2e98d
leaq 0xfdb5(%rip), %rsi      # 0x2e8df
leaq 0xfdff(%rip), %rcx      # 0x2e930
movl $0xbc, %edx
callq 0x5210
leaq 0xfe6e(%rip), %rdi      # 0x2e9b0
leaq 0xfd96(%rip), %rsi      # 0x2e8df
leaq 0xfde0(%rip), %rcx      # 0x2e930
movl $0xc0, %edx
callq 0x5210
leaq 0xfe6b(%rip), %rdi      # 0x2e9cc
leaq 0xfd77(%rip), %rsi      # 0x2e8df
leaq 0xfdc1(%rip), %rcx      # 0x2e930
movl $0xd5, %edx
callq 0x5210
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
cmpq %r15, %rdi
je 0x1eb9e
movq 0xe0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1eb9e
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x1f374
jmp 0x1ebb0
movq %rax, %rbx
leaq 0x1f8(%rsp), %rdi
callq 0x19fe8
jmp 0x1ebc2
movq %rax, %rbx
leaq 0x210(%rsp), %rdi
callq 0x19fe8
jmp 0x1ebd4
movq %rax, %rbx
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdi
callq 0x5340
leaq 0x18(%rsp), %rdi
callq 0x1b88a
jmp 0x1ec5b
movq %rax, %rbx
jmp 0x1ebe1
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ec17
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ec17
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r15, %rdi
je 0x1ec39
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ec39
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ec5b
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ec5b
movq %rax, %rbx
leaq 0x160(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ece9
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ece9
jmp 0x1ecd7
jmp 0x1ecd7
movq %rax, %rbx
jmp 0x1ed03
jmp 0x1eccd
jmp 0x1ecd2
movq %rax, %rbx
movq 0x1a0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ed2a
movq 0x1b0(%rsp), %rsi
jmp 0x1ecc1
movq %rax, %rbx
movq 0x1c0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1ed2a
movq 0x1d0(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x1ed2a
jmp 0x1ecd7
movq %rax, %rbx
jmp 0x1ed10
movq %rax, %rbx
jmp 0x1ed1d
movq %rax, %rbx
jmp 0x1ece9
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x1f174
leaq 0x80(%rsp), %rdi
callq 0x1f374
leaq 0xa0(%rsp), %rdi
callq 0x19fe8
leaq 0xb8(%rsp), %rdi
callq 0x19fe8
leaq 0x170(%rsp), %rdi
callq 0x19fe8
leaq 0x188(%rsp), %rdi
callq 0x19fe8
movq %rbx, %rdi
callq 0x55c0