// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x220, %rsp            # imm = 0x220
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xbd38(%rip), %rsi      # 0x21931
leaq 0x1e0(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0x12230
leaq 0x1e0(%rsp), %rsi
movq %r14, %rdi
callq 0x162bc
movq %rax, %r14
leaq 0x1e0(%rsp), %rdi
callq 0x5638
testq %r14, %r14
je 0x15f7a
leaq 0x200(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x5430
movq %r14, %rsi
movq %r15, %rdx
callq 0x16338
movq %rax, %r14
leaq 0x200(%rsp), %rdi
callq 0x5638
testq %r14, %r14
je 0x15f99
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
leaq 0xbd04(%rip), %rdx      # 0x21981
leaq 0xd8(%rsp), %r14
movq %r14, %rdi
callq 0x1edb8
movq %r14, %rdi
callq 0x1220a
testq %rax, %rax
je 0x15fb8
leaq 0x58(%rsp), %rdi
movq %rax, %rdx
callq 0x16210
leaq 0xbce6(%rip), %rdx      # 0x21998
leaq 0xd8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1edb8
leaq 0xd8(%rsp), %rdi
callq 0x1220a
testq %rax, %rax
je 0x15fd7
leaq 0x40(%rsp), %rdi
movq %rax, %rdx
callq 0x16210
leaq 0xbccf(%rip), %rdx      # 0x219bd
leaq 0xd8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1edb8
leaq 0xd8(%rsp), %rdi
callq 0x1220a
movq %rax, %r14
testq %rax, %rax
je 0x15ff6
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x16210
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x16174
xorps %xmm0, %xmm0
leaq 0x70(%rsp), %r14
andq $0x0, 0x10(%r14)
movaps %xmm0, (%r14)
movq 0x10(%rsp), %r15
movq 0x28(%rsp), %r12
leaq 0xd8(%rsp), %r13
cmpq 0x18(%rsp), %r15
jae 0x15d8f
cmpq 0x30(%rsp), %r12
jae 0x15d8f
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x1644e
movq %r14, %rdi
movq %r13, %rsi
callq 0x16484
movq %r13, %rdi
callq 0x164b0
addq $0x20, %r15
addq $0x20, %r12
jmp 0x15d56
leaq 0xbc48(%rip), %rdx      # 0x219de
leaq 0xd8(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1edb8
leaq 0xd8(%rsp), %rdi
callq 0x1220a
testq %rax, %rax
je 0x16015
movq %rax, %rdi
callq 0x1de4a
leaq 0x1c0(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
movq %rax, %rsi
callq 0x12230
leaq 0x1a0(%rsp), %rdi
movq %rbx, %rsi
callq 0x5430
movq 0x58(%rsp), %rsi
leaq 0x180(%rsp), %rdi
callq 0x5430
movq 0x40(%rsp), %rsi
leaq 0x160(%rsp), %rdi
callq 0x5430
leaq 0xd8(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
leaq 0x180(%rsp), %rdx
leaq 0x160(%rsp), %rcx
callq 0x164c6
leaq 0x160(%rsp), %rdi
callq 0x5638
leaq 0x180(%rsp), %rdi
callq 0x5638
leaq 0x1a0(%rsp), %rdi
callq 0x5638
movl $0x270, %edi            # imm = 0x270
callq 0x5330
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1652a
leaq 0xa8(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x1652a
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1657e
leaq 0x140(%rsp), %rdi
leaq 0x1c0(%rsp), %rsi
callq 0x5430
leaq 0xd8(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
leaq 0xa8(%rsp), %rcx
leaq 0x90(%rsp), %r8
leaq 0x140(%rsp), %r9
movq %r14, %rdi
callq 0x19d84
leaq 0x140(%rsp), %rdi
callq 0x5638
leaq 0x90(%rsp), %rdi
callq 0x165d2
leaq 0xa8(%rsp), %rdi
callq 0x121e8
leaq 0xc0(%rsp), %rdi
callq 0x121e8
leaq 0xd8(%rsp), %rdi
callq 0x13630
leaq 0x1c0(%rsp), %rdi
callq 0x5638
leaq 0x70(%rsp), %rdi
callq 0x165d2
leaq 0x10(%rsp), %rdi
callq 0x121e8
leaq 0x28(%rsp), %rdi
callq 0x121e8
leaq 0x40(%rsp), %rdi
callq 0x121e8
leaq 0x58(%rsp), %rdi
callq 0x121e8
movq %r14, %rax
addq $0x220, %rsp            # imm = 0x220
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xb9b6(%rip), %rdi      # 0x21937
leaq 0xb96f(%rip), %rsi      # 0x218f7
leaq 0xb9b9(%rip), %rcx      # 0x21948
movl $0xaf, %edx
callq 0x5210
leaq 0xb9d1(%rip), %rdi      # 0x21971
leaq 0xb950(%rip), %rsi      # 0x218f7
leaq 0xb99a(%rip), %rcx      # 0x21948
movl $0xb2, %edx
callq 0x5210
leaq 0xb9c8(%rip), %rdi      # 0x21987
leaq 0xb931(%rip), %rsi      # 0x218f7
leaq 0xb97b(%rip), %rcx      # 0x21948
movl $0xb8, %edx
callq 0x5210
leaq 0xb9c7(%rip), %rdi      # 0x219a5
leaq 0xb912(%rip), %rsi      # 0x218f7
leaq 0xb95c(%rip), %rcx      # 0x21948
movl $0xbc, %edx
callq 0x5210
leaq 0xb9cb(%rip), %rdi      # 0x219c8
leaq 0xb8f3(%rip), %rsi      # 0x218f7
leaq 0xb93d(%rip), %rcx      # 0x21948
movl $0xc0, %edx
callq 0x5210
leaq 0xb9c8(%rip), %rdi      # 0x219e4
leaq 0xb8d4(%rip), %rsi      # 0x218f7
leaq 0xb91e(%rip), %rcx      # 0x21948
movl $0xd5, %edx
callq 0x5210
movq %rax, %rbx
leaq 0x140(%rsp), %rdi
callq 0x5638
jmp 0x16049
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x165d2
jmp 0x1605b
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x121e8
jmp 0x1606d
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x121e8
jmp 0x1607f
movq %rax, %rbx
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdi
callq 0x5340
leaq 0xd8(%rsp), %rdi
callq 0x13630
jmp 0x160d9
movq %rax, %rbx
jmp 0x1608c
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x5638
jmp 0x160b5
movq %rax, %rbx
leaq 0x180(%rsp), %rdi
callq 0x5638
jmp 0x160c7
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
callq 0x5638
jmp 0x160d9
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x5638
jmp 0x1613a
jmp 0x16137
jmp 0x16137
movq %rax, %rbx
jmp 0x1614e
jmp 0x1611b
jmp 0x16120
movq %rax, %rbx
leaq 0x200(%rsp), %rdi
jmp 0x1610d
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x5638
jmp 0x1616c
movq %rax, %rbx
jmp 0x1616c
jmp 0x16137
movq %rax, %rbx
jmp 0x16158
movq %rax, %rbx
jmp 0x16162
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x164b0
jmp 0x1613a
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x165d2
leaq 0x10(%rsp), %rdi
callq 0x121e8
leaq 0x28(%rsp), %rdi
callq 0x121e8
leaq 0x40(%rsp), %rdi
callq 0x121e8
leaq 0x58(%rsp), %rdi
callq 0x121e8
movq %rbx, %rdi
callq 0x55a0