// File: /workspace/github_c_makefile_star2_O3/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, 0x65b9de(%rip)    # 0x6c4194
jne 0x68a2b
movl %esi, %ebp
movq %rdi, %r14
callq 0x68676
testq %rax, %rax
je 0x68a2b
cmpb $0x0, 0x65b9ba(%rip)    # 0x6c4190
jne 0x68a2b
movl 0x10(%rax), %r12d
leaq 0x13de3(%rip), %rdi     # 0x7c5ca
leaq 0xefbc(%rip), %rsi      # 0x777aa
callq 0x6ce0
testq %rax, %rax
je 0x689db
movq %rax, %rbx
xorl %r15d, %r15d
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x6c70
leaq 0x1c(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689fc
leaq 0x18(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689f9
leaq 0xc(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689f9
leaq 0x8(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689f9
leaq 0x4(%rsp), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689f9
movslq 0x4(%rsp), %r12
leal (%r12,%r12,2), %eax
leal 0x20(,%rax,8), %eax
movslq %eax, %rsi
movl $0x1, %edi
callq 0x6930
movq %rax, %r15
movl %r12d, 0x1c(%rax)
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%r15)
movl 0x18(%rsp), %eax
movl %eax, 0x18(%r15)
movl 0xc(%rsp), %eax
movl %eax, 0xc(%r15)
movl 0x8(%rsp), %eax
movl %eax, 0x10(%r15)
testq %r12, %r12
jle 0x689c2
shlq $0x3, %r12
leaq (%r12,%r12,2), %rax
movq %rax, 0x20(%rsp)
xorl %r13d, %r13d
movl $0x4, %esi
movl $0x1, %edx
leaq 0x14(%rsp), %rdi
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689fc
movl $0x4, %esi
movl $0x1, %edx
leaq 0x10(%rsp), %rdi
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689fc
movl $0x4, %esi
movl $0x1, %edx
movq %rsp, %rdi
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689fc
movl 0x14(%rsp), %eax
movl %eax, 0x20(%r15,%r13)
movl 0x10(%rsp), %eax
movl %eax, 0x24(%r15,%r13)
movslq (%rsp), %r12
movl %r12d, 0x28(%r15,%r13)
movq %r12, %rdi
callq 0x69a0
movq %rax, 0x30(%r15,%r13)
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x6550
cmpq $0x1, %rax
jne 0x689fc
addq $0x18, %r13
cmpq %r13, 0x20(%rsp)
jne 0x68911
movq %rbx, %rdi
callq 0x6480
movq %r14, %rdi
callq 0x6060
movq %rax, (%r15)
movl %ebp, 0x8(%r15)
jmp 0x68a2e
movb $0x1, 0x65b7b2(%rip)    # 0x6c4194
leaq 0x13a6b(%rip), %rdi     # 0x7c454
leaq 0x13bda(%rip), %rsi     # 0x7c5ca
xorl %eax, %eax
callq 0x25221
jmp 0x68a2b
xorl %r15d, %r15d
movb $0x1, 0x65b78d(%rip)    # 0x6c4190
leaq 0x13be1(%rip), %rdi     # 0x7c5eb
xorl %eax, %eax
callq 0x25221
callq 0x68627
movq %rbx, %rdi
callq 0x6480
testq %r15, %r15
je 0x68a2b
movq %r15, %rdi
callq 0x68a61
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq