// File: /workspace/github_cpp_makefile_star2_O2/bluesky466[P]ResourcesParser/ResourcesParserInterpreter.cpp
// Function: ResourcesParserInterpreter::parserId(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ResourcesParserInterpreter::parserId(const string& id) {
	uint32_t uid;
	if(0 == strncmp(id.c_str(), "0x", 2)) {
		istringstream(id)>>hex>>uid;
	} else {
		istringstream(id)>>uid;
	}
	vector<ResourcesParser::ResTableTypePtr> resTableTypePtrs = mParser->getResTableTypesForId(uid);
	if(resTableTypePtrs.empty()) {
		cout <<"can't find resource for " <<id <<endl;
	} else {
		ResourcesParser::PackageResourcePtr pPackage = mParser->getPackageResouceForId(uid);
		uint32_t typeId = TYPE_ID(uid);
		uint32_t entryId = ENTRY_ID(uid);
		string type = ResourcesParser::getStringFromResStringPool(pPackage->pTypes, typeId-1);
		for(ResourcesParser::ResTableTypePtr pResTableType : resTableTypePtrs) {
			ResTable_entry* pEntry = pResTableType->entries[entryId];
			Res_value* pValue = pResTableType->values[entryId];
			if(nullptr != pEntry) {
				cout <<getConfigDirectory(pResTableType->header.config, type) << " : ";
				parserEntry(uid, pPackage->pKeys, pEntry, pValue, type, "");
				cout <<endl;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
movq %rdi, %r15
movq (%rsi), %rax
cmpb $0x30, (%rax)
jne 0x457c
cmpb $0x78, 0x1(%rax)
jne 0x457c
leaq -0x248(%rbp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3310
movq (%r14), %rax
movq -0x18(%rax), %rax
movl -0x230(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, -0x230(%rbp,%rax)
leaq -0x2c(%rbp), %rsi
movq %r14, %rdi
callq 0x3330
jmp 0x459d
leaq -0x248(%rbp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3310
leaq -0x2c(%rbp), %rsi
movq %r14, %rdi
callq 0x3330
leaq -0x248(%rbp), %rdi
callq 0x30c0
movq (%r15), %rsi
movl -0x2c(%rbp), %edx
leaq -0x88(%rbp), %r14
movq %r14, %rdi
callq 0x5fe4
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x475d
movq (%r15), %rsi
movl -0x2c(%rbp), %edx
leaq -0x48(%rbp), %rdi
callq 0x5f94
movq %r15, -0x50(%rbp)
movl -0x2c(%rbp), %r15d
movl %r15d, %eax
shrl $0x10, %eax
movzbl %al, %ebx
movl $0x120, %esi            # imm = 0x120
addq -0x48(%rbp), %rsi
leaq -0xa8(%rbp), %r14
movq %r14, %rdi
callq 0x49cc
decl %ebx
leaq -0x248(%rbp), %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x5dde
movzwl %r15w, %ebx
leaq -0xa0(%rbp), %rdi
callq 0x3ac4
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rax
movq %rax, -0x58(%rbp)
shll $0x3, %ebx
movq %rbx, -0x38(%rbp)
leaq -0xc8(%rbp), %r12
leaq -0x248(%rbp), %r14
cmpq -0x58(%rbp), %rsi
je 0x4746
leaq -0x70(%rbp), %rdi
movq %rsi, -0x60(%rbp)
callq 0x4a22
movq -0x70(%rbp), %rsi
movq 0x60(%rsi), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx), %rbx
testq %rbx, %rbx
je 0x4730
movq 0x78(%rsi), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx), %r15
addq $0x14, %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x48d4
movq %r12, %rsi
movq 0xa939(%rip), %rdi      # 0xefd8
callq 0x31b0
movq %rax, %rdi
leaq 0x5aa0(%rip), %rsi      # 0xa14e
callq 0x31e0
movq %r12, %rdi
callq 0x3378
movl -0x2c(%rbp), %r13d
movq -0x48(%rbp), %rsi
movl $0x130, %eax            # imm = 0x130
addq %rax, %rsi
leaq -0x98(%rbp), %r14
movq %r14, %rdi
callq 0x49cc
movq %r12, %rdi
leaq 0x5a41(%rip), %rsi      # 0xa125
leaq -0x2d(%rbp), %rdx
callq 0x3090
movq %r12, (%rsp)
movq -0x50(%rbp), %rdi
movl %r13d, %esi
movq %r14, %rdx
movq %rbx, %rcx
movq %r15, %r8
leaq -0x248(%rbp), %r14
movq %r14, %r9
callq 0x3fde
movq %r12, %rdi
callq 0x3378
leaq -0x90(%rbp), %rdi
callq 0x3ac4
movq 0xa8ad(%rip), %rdi      # 0xefd8
callq 0x30d0
leaq -0x68(%rbp), %rdi
callq 0x3ac4
movq -0x60(%rbp), %rsi
addq $0x10, %rsi
jmp 0x464a
leaq -0x248(%rbp), %rdi
callq 0x3378
leaq -0x40(%rbp), %rdi
callq 0x3ac4
jmp 0x4783
movq 0xa874(%rip), %rdi      # 0xefd8
leaq 0x59ca(%rip), %rsi      # 0xa135
callq 0x31e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x31b0
movq %rax, %rdi
callq 0x30d0
leaq -0x88(%rbp), %rdi
callq 0x49a0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x47b6
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x3ac4
jmp 0x4819
jmp 0x47c7
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
callq 0x30c0
jmp 0x482e
movq %rax, %rbx
jmp 0x4822
jmp 0x47d3
movq %rax, %rbx
jmp 0x47e7
movq %rax, %rbx
jmp 0x4804
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x3378
leaq -0x90(%rbp), %rdi
callq 0x3ac4
jmp 0x4804
movq %rax, %rbx
leaq -0xc8(%rbp), %rdi
callq 0x3378
leaq -0x68(%rbp), %rdi
callq 0x3ac4
leaq -0x248(%rbp), %rdi
callq 0x3378
leaq -0x40(%rbp), %rdi
callq 0x3ac4
leaq -0x88(%rbp), %rdi
callq 0x49a0
movq %rbx, %rdi
callq 0x3340