	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TPL_GetTextureCI               ## -- Begin function TPL_GetTextureCI
	.p2align	4, 0x90
_TPL_GetTextureCI:                      ## @TPL_GetTextureCI
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
	movl	$-1, %ebx
	testl	%esi, %esi
	js	LBB0_15
## %bb.1:
	movq	%rdi, %r15
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.2:
	movq	%rdx, %r12
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.3:
	movq	%rcx, %r13
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.4:
	cmpl	%esi, (%r15)
	jle	LBB0_15
## %bb.5:
	movq	24(%r15), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movl	%esi, %ecx
	shlq	$4, %rcx
	movq	8(%rax,%rcx), %r14
	testq	%r14, %r14
	je	LBB0_15
## %bb.7:
	movq	(%rax,%rcx), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	_GX_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	44(%r14), %edi
	movl	36(%r14), %edx
	movl	40(%r14), %esi
	callq	_TPL_GetTextureSize
	movl	%eax, %esi
	movq	8(%r15), %rax
	movq	_TPL_FILE_TYPE_DISC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.9:
	movq	16(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	48(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PPC_CACHE_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%esi, %r15d
	callq	_memalign
	movq	%rax, 48(%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_fseek
	movq	48(%r14), %rdi
	movl	$1, %esi
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	%r15d, %edx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_fread
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_PPC_CACHE_ALIGNMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	shll	$2, %esi
	callq	_memalign
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_fseek
	movq	8(%r15), %rdi
	movl	(%r15), %edx
	shll	$2, %edx
	movl	$1, %esi
	movq	%rbx, %rcx
	callq	_fread
	movl	-48(%rbp), %esi                 ## 4-byte Reload
LBB0_13:
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setg	%bl
	movss	8(%r14), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movq	_GX_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	48(%r14), %rdi
	callq	_DCFlushRange
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r15), %rdi
	movl	(%r15), %esi
	shll	$2, %esi
	callq	_DCFlushRange
	movq	8(%r15), %rsi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	movq	%r13, %rdi
	callq	_GX_InitTlutObj
	movq	48(%r14), %rsi
	movl	44(%r14), %edx
	movl	40(%r14), %ecx
	movl	36(%r14), %r8d
	movl	28(%r14), %eax
	movl	32(%r14), %r9d
	subq	$8, %rsp
	movq	%r12, %rdi
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	%rbx
	pushq	%rax
	callq	_GX_InitTexObjCI
	addq	$32, %rsp
	xorl	%ebx, %ebx
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jle	LBB0_15
## %bb.14:
	xorps	%xmm0, %xmm0
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	cmoval	-64(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	24(%r14), %esi
	movl	20(%r14), %edx
	movl	16(%r14), %ecx
	movq	(%r14), %r8
	movss	8(%r14), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movl	12(%r14), %eax
	movq	%r12, %rdi
	pushq	%rax
	pushq	%r9
	callq	_GX_InitTexObjLOD
	addq	$16, %rsp
	jmp	LBB0_15
LBB0_11:
	movq	48(%r14), %rdi
	callq	_free
LBB0_15:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GX_DISABLE,4,2                 ## @GX_DISABLE
	.comm	_TPL_FILE_TYPE_DISC,8,3         ## @TPL_FILE_TYPE_DISC
	.comm	_PPC_CACHE_ALIGNMENT,4,2        ## @PPC_CACHE_ALIGNMENT
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_GX_ENABLE,4,2                  ## @GX_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TPL_GetTextureCI               ; -- Begin function TPL_GetTextureCI
	.p2align	2
_TPL_GetTextureCI:                      ; @TPL_GetTextureCI
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x23, x0
	mov	w0, #-1
	tbnz	w1, #31, LBB0_17
; %bb.1:
	cbz	x23, LBB0_17
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_17
; %bb.3:
	mov	x21, x3
	cbz	x3, LBB0_17
; %bb.4:
	ldr	w8, [x23]
	cmp	w8, w1
	b.le	LBB0_16
; %bb.5:
	ldr	x8, [x23, #24]
	cbz	x8, LBB0_16
; %bb.6:
	add	x9, x8, w1, uxtw #4
	ldr	x25, [x9, #8]
	cbz	x25, LBB0_16
; %bb.7:
	mov	w9, w1
	lsl	x9, x9, #4
	ldr	x27, [x8, x9]
	cbz	x27, LBB0_16
; %bb.8:
	mov	x20, x4
Lloh0:
	adrp	x8, _GX_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GX_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldp	w1, w0, [x25, #40]
	ldr	w2, [x25, #36]
	bl	_TPL_GetTextureSize
	mov	x22, x0
	ldr	x8, [x23, #8]
Lloh3:
	adrp	x9, _TPL_FILE_TYPE_DISC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TPL_FILE_TYPE_DISC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	ldr	x23, [x23, #16]
	ldr	x24, [x25, #48]
Lloh6:
	adrp	x28, _PPC_CACHE_ALIGNMENT@GOTPAGE
Lloh7:
	ldr	x28, [x28, _PPC_CACHE_ALIGNMENT@GOTPAGEOFF]
	ldr	w0, [x28]
	mov	x1, x22
	bl	_memalign
	str	x0, [x25, #48]
	cbz	x0, LBB0_16
; %bb.10:
Lloh8:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_fseek
	ldr	x0, [x25, #48]
	mov	w1, #1
	mov	x2, x22
	mov	x3, x23
	bl	_fread
	ldr	x24, [x27, #8]
	ldr	w0, [x28]
	ldr	w8, [x27]
	lsl	w1, w8, #2
	bl	_memalign
	str	x0, [x27, #8]
	cbz	x0, LBB0_15
; %bb.11:
Lloh11:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_fseek
	ldr	x0, [x27, #8]
	ldr	w8, [x27]
	lsl	w2, w8, #2
	mov	w1, #1
	mov	x3, x23
	bl	_fread
LBB0_12:
	ldr	x28, [x25]
	cmp	x28, #0
	cset	w23, gt
	ldr	s8, [x25, #8]
Lloh14:
	adrp	x8, _GX_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GX_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w24, [x8]
	ldr	x0, [x25, #48]
	mov	x1, x22
	bl	_DCFlushRange
	ldr	x0, [x27, #8]
	ldr	w8, [x27]
	lsl	w1, w8, #2
	bl	_DCFlushRange
	ldr	x1, [x27, #8]
	ldp	w3, w2, [x27]
	mov	x0, x21
	bl	_GX_InitTlutObj
	ldr	x1, [x25, #48]
	ldp	w3, w2, [x25, #40]
	ldp	w5, w4, [x25, #32]
	ldr	w6, [x25, #28]
	str	w20, [sp]
	mov	x0, x19
	mov	x7, x23
	bl	_GX_InitTexObjCI
	cmp	x28, #1
	b.lt	LBB0_14
; %bb.13:
	fcmp	s8, #0.0
	csel	w5, w24, w26, gt
	ldp	w2, w1, [x25, #20]
	ldr	x4, [x25]
	ldr	s0, [x25, #8]
	ldp	w7, w3, [x25, #12]
	mov	x0, x19
	mov	x6, x5
	bl	_GX_InitTexObjLOD
LBB0_14:
	mov	w0, #0
	b	LBB0_17
LBB0_15:
	ldr	x0, [x25, #48]
	bl	_free
LBB0_16:
	mov	w0, #-1
LBB0_17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GX_DISABLE,4,2                 ; @GX_DISABLE
	.comm	_TPL_FILE_TYPE_DISC,8,3         ; @TPL_FILE_TYPE_DISC
	.comm	_PPC_CACHE_ALIGNMENT,4,2        ; @PPC_CACHE_ALIGNMENT
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_GX_ENABLE,4,2                  ; @GX_ENABLE
.subsections_via_symbols
