// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymosttexcache.c
// Function: PTCacheLoadTile
PTCacheTile * PTCacheLoadTile(const char * filename, int effects, int flags)
{
	PTCacheIndex * pci;
	PTCacheTile * tdef;

	if (cachedisabled) {
		return 0;
	}

	pci = ptcache_findhash(filename, effects, flags);
	if (!pci) {
		return 0;
	}

	tdef = ptcache_load(pci->offset);
	if (tdef) {
		tdef->filename = strdup(filename);
		tdef->effects  = effects;
	}
	return tdef;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpb $0x0, 0x65c72d(%rip)    # 0x6c31a4
jne 0x66ca3
movl %esi, %ebx
movq %rdi, %r14
callq 0x66932
testq %rax, %rax
je 0x66ca3
cmpb $0x0, 0x65c709(%rip)    # 0x6c31a0
jne 0x66cfb
movl 0x10(%rax), %r13d
leaq 0x14632(%rip), %rdi     # 0x7b0da
leaq 0xfb90(%rip), %rsi      # 0x7663f
callq 0x6ce0
testq %rax, %rax
je 0x66ca8
movq %rax, %r15
xorl %r12d, %r12d
movq %rax, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x6c70
leaq 0x1c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66ccc
leaq 0x18(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66cc9
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66cc9
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66cc9
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66cc9
movslq 0x4(%rsp), %rbp
leal (%rbp,%rbp,2), %eax
leal 0x20(,%rax,8), %eax
movslq %eax, %r13
movq %r13, %rdi
callq 0x69a0
movq %rax, %r12
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x62f0
movl %ebp, 0x1c(%r12)
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%r12)
movl 0x18(%rsp), %eax
movl %eax, 0x18(%r12)
movl 0xc(%rsp), %eax
movl %eax, 0xc(%r12)
movl 0x8(%rsp), %eax
movl %eax, 0x10(%r12)
testq %rbp, %rbp
jle 0x66c99
shlq $0x3, %rbp
leaq (,%rbp,2), %rax
addq %rbp, %rax
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movl $0x4, %esi
movl $0x1, %edx
leaq 0x14(%rsp), %rdi
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66ccc
movl $0x4, %esi
movl $0x1, %edx
leaq 0x10(%rsp), %rdi
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66ccc
movl $0x4, %esi
movl $0x1, %edx
movq %rsp, %rdi
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66ccc
movl 0x14(%rsp), %eax
movl %eax, 0x20(%r12,%rbp)
movl 0x10(%rsp), %eax
movl %eax, 0x24(%r12,%rbp)
movslq (%rsp), %r13
movl %r13d, 0x28(%r12,%rbp)
movq %r13, %rdi
callq 0x69a0
movq %rax, 0x30(%r12,%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
movq %r15, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x66ccc
addq $0x18, %rbp
cmpq %rbp, 0x20(%rsp)
jne 0x66be8
movq %r15, %rdi
callq 0x6480
jmp 0x66cfe
xorl %r12d, %r12d
jmp 0x66d14
movb $0x1, 0x65c4f5(%rip)    # 0x6c31a4
leaq 0x142ae(%rip), %rdi     # 0x7af64
leaq 0x1441d(%rip), %rsi     # 0x7b0da
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x24cb4
jmp 0x66cfe
xorl %r12d, %r12d
movb $0x1, 0x65c4cd(%rip)    # 0x6c31a0
leaq 0x14421(%rip), %rdi     # 0x7b0fb
xorl %eax, %eax
callq 0x24cb4
callq 0x668e3
movq %r15, %rdi
callq 0x6480
testq %r12, %r12
je 0x66cfb
movq %r12, %rdi
callq 0x66d47
xorl %r12d, %r12d
testq %r12, %r12
je 0x66d14
movq %r14, %rdi
callq 0x6060
movq %rax, (%r12)
movl %ebx, 0x8(%r12)
movq %r12, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq