// File: /workspace/github_cpp_makefile_star2_O1/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 0xe356(%rip), %rsi      # 0x2e919
leaq 0xe354(%rip), %rdx      # 0x2e91e
leaq 0x38(%rsp), %rdi
callq 0x1a08c
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x19e48
movq %rax, %r15
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x205fb
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
movq %r15, 0xe8(%rsp)
testq %r15, %r15
je 0x20aec
leaq 0xe8(%rsp), %rsi
movq %r14, %rdi
movq 0x8(%rsp), %rdx
callq 0x19edc
testq %rax, %rax
je 0x20b0b
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
leaq 0xe330(%rip), %rdx      # 0x2e969
leaq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x2a974
movq (%r15), %rdi
testq %rdi, %rdi
je 0x20666
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x20666
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x20668
xorl %eax, %eax
testq %rax, %rax
je 0x20b2a
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0x188(%rsp), %rdi
movq %r14, %rsi
callq 0x19d0c
leaq 0xe2e5(%rip), %rdx      # 0x2e980
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2a974
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x206cc
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x206cc
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x206ce
xorl %eax, %eax
testq %rax, %rax
je 0x20b49
leaq 0x38(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
callq 0x19d0c
leaq 0xe2a4(%rip), %rdx      # 0x2e9a5
leaq 0x38(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2a974
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x20735
movq (%rdi), %rax
callq *0x58(%rax)
testq %rax, %rax
je 0x20735
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x58(%rax)
movq %rax, %r15
jmp 0x20738
xorl %r15d, %r15d
testq %r15, %r15
je 0x20b68
leaq 0x38(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0xd0(%rsp), %rdi
movq %r14, %rsi
callq 0x19d0c
leaq 0x38(%rsp), %rdx
movq %r15, (%rdx)
leaq 0x18(%rsp), %rcx
movl $0x0, (%rcx)
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x19d0c
xorps %xmm0, %xmm0
movaps %xmm0, 0xa0(%rsp)
movq $0x0, 0xb0(%rsp)
movq 0xb8(%rsp), %r14
cmpq 0xc0(%rsp), %r14
jae 0x2083b
movq 0xd0(%rsp), %r15
cmpq 0xd8(%rsp), %r15
jae 0x2083b
leaq 0x68(%rsp), %rbx
leaq 0x38(%rsp), %r12
leaq 0xa0(%rsp), %r13
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1f0e4
movq %r13, %rdi
movq %r12, %rsi
callq 0x1f148
movq 0x58(%rsp), %rdi
cmpq %rbx, %rdi
je 0x20808
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2081f
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x20, %r14
cmpq 0xc0(%rsp), %r14
jae 0x2083b
addq $0x20, %r15
cmpq 0xd8(%rsp), %r15
jb 0x207d8
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 0x1a300
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 0x1a300
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 0x1a300
leaq 0x38(%rsp), %rdi
leaq 0x150(%rsp), %rsi
leaq 0x130(%rsp), %rdx
leaq 0x110(%rsp), %rcx
callq 0x1f1aa
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x208f9
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x20916
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x150(%rsp), %rdi
cmpq %r14, %rdi
je 0x20933
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 0x1f260
leaq 0x1b8(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x1f260
leaq 0x1a0(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1f2ea
leaq 0x100(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
addq %rsi, %rdx
leaq 0xf0(%rsp), %rdi
callq 0x1a300
leaq 0x38(%rsp), %rsi
leaq 0x1d0(%rsp), %rdx
leaq 0x1b8(%rsp), %rcx
leaq 0x1a0(%rsp), %r8
leaq 0xf0(%rsp), %r9
movq %r14, %rdi
callq 0x23d38
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x20a05
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x1a0(%rsp), %rdi
callq 0x1f374
leaq 0x1b8(%rsp), %rdi
callq 0x19fe8
leaq 0x1d0(%rsp), %rdi
callq 0x19fe8
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x20a43
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20a64
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20a7f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20a96
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0xa0(%rsp), %rdi
callq 0x1f374
leaq 0xb8(%rsp), %rdi
callq 0x19fe8
leaq 0xd0(%rsp), %rdi
callq 0x19fe8
leaq 0x170(%rsp), %rdi
callq 0x19fe8
leaq 0x188(%rsp), %rdi
callq 0x19fe8
movq %r14, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xde2c(%rip), %rdi      # 0x2e91f
leaq 0xdfe4(%rip), %rsi      # 0x2eade
leaq 0xdff2(%rip), %rcx      # 0x2eaf3
movl $0x12, %edx
callq 0x5210
leaq 0xde47(%rip), %rdi      # 0x2e959
leaq 0xdfc5(%rip), %rsi      # 0x2eade
leaq 0xdfd3(%rip), %rcx      # 0x2eaf3
movl $0x15, %edx
callq 0x5210
leaq 0xde3e(%rip), %rdi      # 0x2e96f
leaq 0xdfa6(%rip), %rsi      # 0x2eade
leaq 0xdfb4(%rip), %rcx      # 0x2eaf3
movl $0x1b, %edx
callq 0x5210
leaq 0xde3d(%rip), %rdi      # 0x2e98d
leaq 0xdf87(%rip), %rsi      # 0x2eade
leaq 0xdf95(%rip), %rcx      # 0x2eaf3
movl $0x1f, %edx
callq 0x5210
leaq 0xde41(%rip), %rdi      # 0x2e9b0
leaq 0xdf68(%rip), %rsi      # 0x2eade
leaq 0xdf76(%rip), %rcx      # 0x2eaf3
movl $0x23, %edx
callq 0x5210
movq %rax, %rbx
movq 0xf0(%rsp), %rdi
cmpq %r12, %rdi
je 0x20bac
movq 0x100(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20bac
movq %rax, %rbx
leaq 0x1a0(%rsp), %rdi
callq 0x1f374
jmp 0x20bbe
movq %rax, %rbx
leaq 0x1b8(%rsp), %rdi
callq 0x19fe8
jmp 0x20bd0
movq %rax, %rbx
leaq 0x1d0(%rsp), %rdi
callq 0x19fe8
jmp 0x20be2
movq %rax, %rbx
movl $0x270, %esi            # imm = 0x270
movq %r14, %rdi
callq 0x5340
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x20c06
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x5340
leaq 0x38(%rsp), %rdi
callq 0x1b88a
jmp 0x20cc8
movq %rax, %rbx
jmp 0x20bef
movq %rax, %rbx
movq 0x110(%rsp), %rdi
cmpq %r12, %rdi
je 0x20c3f
movq 0x120(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20c3f
movq %rax, %rbx
movq 0x130(%rsp), %rdi
cmpq %r15, %rdi
je 0x20c61
movq 0x140(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20c61
movq %rax, %rbx
movq 0x150(%rsp), %rdi
cmpq %r14, %rdi
je 0x20cc8
movq 0x160(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20cc8
jmp 0x20cb6
movq %rax, %rbx
jmp 0x20ce2
jmp 0x20cac
jmp 0x20cb1
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20d09
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x20d09
movq %rax, %rbx
jmp 0x20d09
movq %rax, %rbx
jmp 0x20cef
movq %rax, %rbx
jmp 0x20cfc
movq %rax, %rbx
jmp 0x20cc8
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1f174
leaq 0xa0(%rsp), %rdi
callq 0x1f374
leaq 0xb8(%rsp), %rdi
callq 0x19fe8
leaq 0xd0(%rsp), %rdi
callq 0x19fe8
leaq 0x170(%rsp), %rdi
callq 0x19fe8
leaq 0x188(%rsp), %rdi
callq 0x19fe8
movq %rbx, %rdi
callq 0x55c0
nopl (%rax)