// File: /workspace/github_cpp_makefile_star2_O3/rcolomina[P]the_charmed_house/src/item_creator.cpp
// Function: ItemGameCreator::createById(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Entidad* ItemGameCreator::createById(std::string itemId){

    // getting element item
    pElem elem_Items=this->searchForGame(string("items"));
    assert(elem_Items!=NULL);
	  
    pElem elem_Item=this->searchForId(elem_Items,itemId);
    assert(elem_Item!=NULL);
	  
    // handler
    TiXmlHandle itemHandle(elem_Item);
	  
    pElem elem_names=itemHandle.FirstChild("names").ToElement();
    assert(elem_names!=NULL);
    vector<std::string> names=getInfoList(elem_names,Name);
	  			 
    pElem elem_descriptions=itemHandle.FirstChild("descriptions").ToElement();
    assert(elem_descriptions!=NULL);
    vector<string> descrip=getInfoList(elem_descriptions,Text);	  

    pElem elem_properties=itemHandle.FirstChild("properties").ToElement();
    assert(elem_properties!=NULL);
	  
    vector<string> prop=getInfoList(elem_properties,Text);	  
    vector<string> propN=getInfoList(elem_properties,Name);

    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++)
    {
/*			 cout<<"it1:"<<*it1<<" it2:"<<*it2<<endl;		 
			 bool boolvalue=false;
			 if(*it2==string("true"))
                         boolvalue=true;
*/					
//			 pair<string,bool> pa(*it1,boolvalue);
//			 props.push_back(pa);
        pair<string,string> pa(*it1,*it2);
        props.push_back(pa);			 
    }

    const Entidad& ent=Entidad(itemId,names[0],descrip[0]);

    string pathFileText; //TODO: connect with XML
    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 $0x1e8, %rsp            # imm = 0x1E8
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x48(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xd5c6(%rip), %rsi      # 0x2d919
leaq 0xd5c4(%rip), %rdx      # 0x2d91e
leaq 0x38(%rsp), %rdi
callq 0x19e74
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x19c38
movq %rax, %r15
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2038b
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
movq %r15, 0xe8(%rsp)
testq %r15, %r15
je 0x208e4
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
movq 0x8(%rsp), %rdx
callq 0x19ccc
testq %rax, %rax
je 0x20903
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xd5a0(%rip), %rdx      # 0x2d969
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x2a67c
movq (%r15), %rdi
testq %rdi, %rdi
je 0x20887
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x20887
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x20887
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x188(%rsp), %rdi
movq %r14, %rsi
callq 0x19afc
leaq 0xd551(%rip), %rdx      # 0x2d980
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2a67c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x208a6
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x208a6
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x208a6
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
callq 0x19afc
leaq 0xd50c(%rip), %rdx      # 0x2d9a5
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2a67c
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x208c5
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x208c5
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %r15
testq %rax, %rax
je 0x208c5
leaq 0x38(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x19afc
leaq 0x38(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x19afc
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb8(%rsp), %r14
cmpq 0xc0(%rsp), %r14
jae 0x205d6
movq 0xd0(%rsp), %r15
cmpq 0xd8(%rsp), %r15
jae 0x205d6
leaq 0x68(%rsp), %rbx
leaq 0x38(%rsp), %r12
leaq 0xa0(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1eea2
movq %r13, %rdi
movq %r12, %rsi
callq 0x1ef06
movq 0x58(%rsp), %rdi
cmpq %rbx, %rdi
je 0x205a3
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x205ba
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x20, %r14
cmpq 0xc0(%rsp), %r14
jae 0x205d6
addq $0x20, %r15
cmpq 0xd8(%rsp), %r15
jb 0x20573
leaq 0x160(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x8(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x150(%rsp), %rdi
callq 0x1a0b6
movq 0x188(%rsp), %rax
leaq 0x140(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x130(%rsp), %rdi
callq 0x1a0b6
movq 0x170(%rsp), %rax
leaq 0x120(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x110(%rsp), %rdi
callq 0x1a0b6
leaq 0x38(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x130(%rsp), %rdx
leaq 0x110(%rsp), %rcx
callq 0x1ef68
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x20694
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x206b1
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x150(%rsp), %rdi
cmpq %r14, %rdi
je 0x206ce
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0x270, %edi            # imm = 0x270
callq 0x5330
movq %rax, %r14
leaq 0x1d0(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x1f01e
leaq 0x1b8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x1f01e
leaq 0x1a0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1f0a8
leaq 0x100(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x1a0b6
leaq 0x38(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
leaq 0x1a0(%rsp), %r8
leaq 0xf0(%rsp), %r9
movq %r14, %rdi
callq 0x23ac8
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x207a0
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1a0(%rsp), %rdi
callq 0x1f132
leaq 0x1b8(%rsp), %rdi
callq 0x19dce
leaq 0x1d0(%rsp), %rdi
callq 0x19dce
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x207de
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x207ff
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2081a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20831
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xa0(%rsp), %rdi
callq 0x1f132
leaq 0xb8(%rsp), %rdi
callq 0x19dce
leaq 0xd0(%rsp), %rdi
callq 0x19dce
leaq 0x170(%rsp), %rdi
callq 0x19dce
leaq 0x188(%rsp), %rdi
callq 0x19dce
movq %r14, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd0e1(%rip), %rdi      # 0x2d96f
leaq 0xd249(%rip), %rsi      # 0x2dade
leaq 0xd257(%rip), %rcx      # 0x2daf3
movl $0x1b, %edx
callq 0x5210
leaq 0xd0e0(%rip), %rdi      # 0x2d98d
leaq 0xd22a(%rip), %rsi      # 0x2dade
leaq 0xd238(%rip), %rcx      # 0x2daf3
movl $0x1f, %edx
callq 0x5210
leaq 0xd0e4(%rip), %rdi      # 0x2d9b0
leaq 0xd20b(%rip), %rsi      # 0x2dade
leaq 0xd219(%rip), %rcx      # 0x2daf3
movl $0x23, %edx
callq 0x5210
leaq 0xd034(%rip), %rdi      # 0x2d91f
leaq 0xd1ec(%rip), %rsi      # 0x2dade
leaq 0xd1fa(%rip), %rcx      # 0x2daf3
movl $0x12, %edx
callq 0x5210
leaq 0xd04f(%rip), %rdi      # 0x2d959
leaq 0xd1cd(%rip), %rsi      # 0x2dade
leaq 0xd1db(%rip), %rcx      # 0x2daf3
movl $0x15, %edx
callq 0x5210
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x20947
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20947
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
callq 0x1f132
jmp 0x20959
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x19dce
jmp 0x2096b
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
callq 0x19dce
jmp 0x2097d
movq %rax, %rbx
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdi
callq 0x5340
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x209a6
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x209a6
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1b638
jmp 0x20a63
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x209da
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x209da
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x209fc
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x209fc
movq %rax, %rbx
movq 0x150(%rsp), %rdi
cmpq %r14, %rdi
je 0x20a63
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20a63
jmp 0x20a51
movq %rax, %rbx
jmp 0x20a7d
jmp 0x20a47
jmp 0x20a4c
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20aa4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20aa4
movq %rax, %rbx
jmp 0x20aa4
movq %rax, %rbx
jmp 0x20a8a
movq %rax, %rbx
jmp 0x20a97
movq %rax, %rbx
jmp 0x20a63
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1ef32
leaq 0xa0(%rsp), %rdi
callq 0x1f132
leaq 0xb8(%rsp), %rdi
callq 0x19dce
leaq 0xd0(%rsp), %rdi
callq 0x19dce
leaq 0x170(%rsp), %rdi
callq 0x19dce
leaq 0x188(%rsp), %rdi
callq 0x19dce
movq %rbx, %rdi
callq 0x55c0