// File: /workspace/github_cpp_makefile_star2_O3/bluesky466[P]ResourcesParser/ResourcesParser.cpp
// Function: ResourcesParser::getNameForId[abi:cxx11](unsigned int) const
string ResourcesParser::getNameForId(uint32_t id) const {
	PackageResourcePtr pPackage = getPackageResouceForId(id);
	if(pPackage == nullptr) {
		RETURN_UNKNOWN_ID(id);
	}
	uint32_t typeId = TYPE_ID(id);
	if(pPackage->resTablePtrs.find(typeId)==pPackage->resTablePtrs.end()) {
		RETURN_UNKNOWN_ID(id);
	}

	uint32_t entryId = ENTRY_ID(id);

	if(pPackage->resTablePtrs[typeId][0]->header.entryCount<=(entryId)){
		RETURN_UNKNOWN_ID(id);
	}

	const ResTable_entry* pEntry = nullptr;
	for(ResTableTypePtr  pResTableType : pPackage->resTablePtrs[typeId]) {
		pEntry = pResTableType->entries[entryId];
		if(pEntry) {
			break;
		}
	}

	if(pEntry == nullptr) {
		RETURN_UNKNOWN_ID(id);
	}
	return getStringFromResStringPool(getPackageResouceForId(id)->pKeys, pEntry->key.index);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x58(%rbp), %r12
movq %r12, %rdi
callq 0x719c
movq (%r12), %rax
testq %rax, %rax
je 0x5f53
movq 0x150(%rax), %rcx
testq %rcx, %rcx
je 0x5e99
movl %r14d, %edx
shrl $0x10, %edx
movzbl %dl, %r13d
leaq 0x140(%rax), %r12
addq $0x148, %rax            # imm = 0x148
movq %rax, %rdx
xorl %esi, %esi
cmpl %r13d, 0x20(%rcx)
setl %sil
cmovgeq %rcx, %rdx
movq 0x10(%rcx,%rsi,8), %rcx
testq %rcx, %rcx
jne 0x5e72
cmpq %rax, %rdx
je 0x5e99
cmpl 0x20(%rdx), %r13d
jge 0x604a
leaq -0x1e0(%rbp), %rdi
callq 0x3140
leaq -0x1d0(%rbp), %r15
leaq 0x5464(%rip), %rsi      # 0xb317
movl $0x6, %edx
movq %r15, %rdi
callq 0x3220
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1b8(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1b8(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xef(%rbp,%rax)
jne 0x5f17
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3110
leaq 0x52d3(%rip), %rsi      # 0xb205
movl $0x1, %edx
movq %rax, %rdi
callq 0x3220
leaq -0x1c8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32b0
jmp 0x6008
leaq -0x1e0(%rbp), %rdi
callq 0x3140
leaq -0x1d0(%rbp), %r15
leaq 0x53aa(%rip), %rsi      # 0xb317
movl $0x6, %edx
movq %r15, %rdi
callq 0x3220
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1b8(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1b8(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xef(%rbp,%rax)
jne 0x5fd1
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3110
leaq 0x5219(%rip), %rsi      # 0xb205
movl $0x1, %edx
movq %rax, %rdi
callq 0x3220
leaq -0x1c8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32b0
movq 0x8f99(%rip), %rsi      # 0xefa8
leaq -0x1e0(%rbp), %rdi
callq 0x3160
leaq -0x160(%rbp), %rdi
callq 0x30b0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x6035
callq 0x3ddc
movq %rbx, %rax
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, -0x30(%rbp)
leaq -0x1e0(%rbp), %rsi
movl %r13d, (%rsi)
movq %r12, %rdi
callq 0x533a
movzwl %r14w, %ebx
movq (%rax), %rax
movq (%rax), %rax
cmpl %ebx, 0xc(%rax)
jbe 0x61a9
leaq -0x1e0(%rbp), %rsi
movl %r13d, (%rsi)
movq %r12, %rdi
callq 0x533a
movq (%rax), %r12
movq 0x8(%rax), %r13
cmpq %r13, %r12
je 0x60eb
movl %ebx, %eax
movq %rax, -0x38(%rbp)
movq (%r12), %rax
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x60b6
movq 0x8f24(%rip), %rcx      # 0xefd0
cmpb $0x0, (%rcx)
je 0x60c4
incl 0x8(%rdi)
jmp 0x60c8
movq 0x60(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rbx
jmp 0x60d9
lock
incl 0x8(%rdi)
movq 0x60(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rbx
callq 0x3ddc
testq %rbx, %rbx
jne 0x6267
addq $0x10, %r12
cmpq %r13, %r12
jne 0x6097
leaq -0x1e0(%rbp), %rdi
callq 0x3140
leaq -0x1d0(%rbp), %r15
leaq 0x5212(%rip), %rsi      # 0xb317
movl $0x6, %edx
movq %r15, %rdi
callq 0x3220
movq -0x30(%rbp), %rbx
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1b8(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1b8(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xef(%rbp,%rax)
jne 0x616d
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3110
leaq 0x507d(%rip), %rsi      # 0xb205
movl $0x1, %edx
movq %rax, %rdi
callq 0x3220
leaq -0x1c8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32b0
jmp 0x6008
leaq -0x1e0(%rbp), %rdi
callq 0x3140
leaq -0x1d0(%rbp), %r15
leaq 0x5154(%rip), %rsi      # 0xb317
movl $0x6, %edx
movq %r15, %rdi
callq 0x3220
movq -0x30(%rbp), %rbx
movq -0x1d0(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1b8(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1b8(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xef(%rbp,%rax)
jne 0x622b
movq %r12, %rdi
movl $0x20, %esi
callq 0x31e0
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3110
leaq 0x4fbf(%rip), %rsi      # 0xb205
movl $0x1, %edx
movq %rax, %rdi
callq 0x3220
leaq -0x1c8(%rbp), %rsi
movq %rbx, %rdi
callq 0x32b0
jmp 0x6008
leaq -0x1e0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x719c
movq (%r12), %rax
movq 0x130(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x138(%rax), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
je 0x62b0
movq 0x8d2e(%rip), %rcx      # 0xefd0
cmpb $0x0, (%rcx)
je 0x62ac
incl 0x8(%rax)
jmp 0x62b0
lock
incl 0x8(%rax)
movl 0x4(%rbx), %edx
leaq -0x48(%rbp), %rsi
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x6f0a
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x62d1
callq 0x3ddc
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x6027
callq 0x3ddc
jmp 0x6027
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x62fc
callq 0x3ddc
movq -0x1d8(%rbp), %rdi
testq %rdi, %rdi
je 0x6346
callq 0x3ddc
jmp 0x6346
jmp 0x631d
jmp 0x631d
jmp 0x631d
jmp 0x631d
jmp 0x6324
jmp 0x6324
jmp 0x631d
movq %rax, %rbx
jmp 0x6346
jmp 0x6324
movq %rax, %rbx
movq 0x8c7a(%rip), %rsi      # 0xefa8
leaq -0x1e0(%rbp), %rdi
callq 0x3160
leaq -0x160(%rbp), %rdi
callq 0x30b0
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x6354
callq 0x3ddc
movq %rbx, %rdi
callq 0x3330