// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1c8, %rsp            # imm = 0x1C8
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x60(%rbp), %r12
movq %r12, %rdi
callq 0x72b2
movq (%r12), %r12
testq %r12, %r12
je 0x5f80
movl %r14d, %eax
shrl $0x10, %eax
movzbl %al, %r13d
movq 0x150(%r12), %rdx
leaq 0x148(%r12), %rax
movq %rax, %rcx
testq %rdx, %rdx
je 0x5eb9
movq %rax, %rcx
xorl %esi, %esi
cmpl %r13d, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x5ea1
movq %rax, %rdx
cmpq %rax, %rcx
je 0x5ecc
cmpl 0x20(%rcx), %r13d
cmovlq %rax, %rcx
movq %rcx, %rdx
cmpq %rax, %rdx
je 0x6042
addq $0x140, %r12            # imm = 0x140
leaq -0x1e8(%rbp), %rsi
movl %r13d, (%rsi)
movq %r12, %rdi
callq 0x533c
movl %r14d, -0x2c(%rbp)
movzwl %r14w, %r14d
movq (%rax), %rax
movq (%rax), %rax
cmpl %r14d, 0xc(%rax)
jbe 0x6104
movq %rbx, -0x38(%rbp)
leaq -0x1e8(%rbp), %rsi
movl %r13d, (%rsi)
movq %r12, %rdi
callq 0x533c
movq %r15, -0x50(%rbp)
movq (%rax), %r12
movq 0x8(%rax), %rbx
cmpq %rbx, %r12
je 0x61ca
movl %r14d, %r14d
movq 0x9096(%rip), %r15      # 0xefd0
movq (%r12), %rax
movq 0x8(%r12), %rdi
testq %rdi, %rdi
je 0x5f57
cmpb $0x0, (%r15)
je 0x5f53
incl 0x8(%rdi)
jmp 0x5f57
lock
incl 0x8(%rdi)
movq 0x60(%rax), %rax
movq (%rax,%r14,8), %r13
testq %rdi, %rdi
je 0x5f69
callq 0x3dfa
testq %r13, %r13
jne 0x61cd
addq $0x10, %r12
cmpq %rbx, %r12
jne 0x5f3a
jmp 0x61cd
leaq -0x1e8(%rbp), %rdi
callq 0x3150
leaq -0x1d8(%rbp), %r15
leaq 0x538d(%rip), %rsi      # 0xb327
movl $0x6, %edx
movq %r15, %rdi
callq 0x3230
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1c0(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c8(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xf7(%rbp,%rax)
jne 0x6006
movq %r12, %rdi
movl $0x20, %esi
callq 0x31f0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3120
leaq 0x51f4(%rip), %rsi      # 0xb215
movl $0x1, %edx
movq %rax, %rdi
callq 0x3230
leaq -0x1d0(%rbp), %rsi
movq %rbx, %rdi
callq 0x32c0
jmp 0x62ec
leaq -0x1e8(%rbp), %rdi
callq 0x3150
leaq -0x1d8(%rbp), %r15
leaq 0x52cb(%rip), %rsi      # 0xb327
movl $0x6, %edx
movq %r15, %rdi
callq 0x3230
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1c0(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c8(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xf7(%rbp,%rax)
jne 0x60c8
movq %r12, %rdi
movl $0x20, %esi
callq 0x31f0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3120
leaq 0x5132(%rip), %rsi      # 0xb215
movl $0x1, %edx
movq %rax, %rdi
callq 0x3230
leaq -0x1d0(%rbp), %rsi
movq %rbx, %rdi
callq 0x32c0
jmp 0x62ec
leaq -0x1e8(%rbp), %rdi
callq 0x3150
leaq -0x1d8(%rbp), %r15
leaq 0x5209(%rip), %rsi      # 0xb327
movl $0x6, %edx
movq %r15, %rdi
callq 0x3230
movl -0x2c(%rbp), %r14d
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1c0(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c8(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xf7(%rbp,%rax)
jne 0x618e
movq %r12, %rdi
movl $0x20, %esi
callq 0x31f0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3120
leaq 0x506c(%rip), %rsi      # 0xb215
movl $0x1, %edx
movq %rax, %rdi
callq 0x3230
leaq -0x1d0(%rbp), %rsi
movq %rbx, %rdi
callq 0x32c0
jmp 0x62ec
xorl %r13d, %r13d
testq %r13, %r13
je 0x6227
leaq -0x1e8(%rbp), %r12
movq %r12, %rdi
movq -0x50(%rbp), %rsi
movl -0x2c(%rbp), %edx
callq 0x72b2
movq (%r12), %rax
movq 0x130(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x138(%rax), %rax
movq %rax, -0x40(%rbp)
testq %rax, %rax
movq -0x38(%rbp), %rbx
je 0x6332
movq 0x8dba(%rip), %rcx      # 0xefd0
cmpb $0x0, (%rcx)
je 0x632e
incl 0x8(%rax)
jmp 0x6332
leaq -0x1e8(%rbp), %rdi
callq 0x3150
movq -0x38(%rbp), %rbx
movl -0x2c(%rbp), %r14d
leaq -0x1d8(%rbp), %r15
leaq 0x50de(%rip), %rsi      # 0xb327
movl $0x6, %edx
movq %r15, %rdi
callq 0x3230
movq -0x1d8(%rbp), %rax
movq -0x18(%rax), %rcx
movl -0x1c0(%rbp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, -0x1c0(%rbp,%rcx)
movq -0x18(%rax), %rcx
movq $0x8, -0x1c8(%rbp,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, -0xf7(%rbp,%rax)
jne 0x62b5
movq %r12, %rdi
movl $0x20, %esi
callq 0x31f0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x30, 0xe0(%r12)
movl %r14d, %esi
movq %r15, %rdi
callq 0x3120
leaq 0x4f45(%rip), %rsi      # 0xb215
movl $0x1, %edx
movq %rax, %rdi
callq 0x3230
leaq -0x1d0(%rbp), %rsi
movq %rbx, %rdi
callq 0x32c0
movq 0x8cb5(%rip), %rsi      # 0xefa8
leaq -0x1e8(%rbp), %rdi
callq 0x3170
leaq -0x168(%rbp), %rdi
callq 0x30b0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x6319
callq 0x3dfa
movq %rbx, %rax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
movl 0x4(%r13), %edx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x6fca
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x6350
callq 0x3dfa
movq -0x1e0(%rbp), %rdi
testq %rdi, %rdi
je 0x630b
callq 0x3dfa
jmp 0x630b
jmp 0x6393
movq %rax, %rbx
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x6376
callq 0x3dfa
movq -0x1e0(%rbp), %rdi
testq %rdi, %rdi
je 0x63be
callq 0x3dfa
jmp 0x63be
jmp 0x6393
jmp 0x6393
jmp 0x6393
jmp 0x639c
jmp 0x6393
movq %rax, %rbx
jmp 0x63be
jmp 0x639c
jmp 0x639c
movq %rax, %rbx
movq 0x8c02(%rip), %rsi      # 0xefa8
leaq -0x1e8(%rbp), %rdi
callq 0x3170
leaq -0x168(%rbp), %rdi
callq 0x30b0
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x63cc
callq 0x3dfa
movq %rbx, %rdi
callq 0x3340