	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_PreloadEntireTexture        ## -- Begin function GX_PreloadEntireTexture
	.p2align	4, 0x90
_GX_PreloadEntireTexture:               ## @GX_PreloadEntireTexture
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	$96, %edi
	movl	$24, %esi
	movl	$8, %edx
	callq	__SHIFTL
	andl	$-16777216, %eax                ## imm = 0xFF000000
	movl	$16777215, %r15d                ## imm = 0xFFFFFF
	andl	(%rbx), %r15d
	orl	%eax, %r15d
	movl	$97, %edi
	movl	$24, %esi
	movl	$8, %edx
	callq	__SHIFTL
	andl	$-32768, %eax                   ## imm = 0x8000
	movl	$32767, %ebx                    ## imm = 0x7FFF
	movl	(%r14), %r13d
	andl	%ebx, %r13d
	orl	%eax, %r13d
	movl	$98, %edi
	movl	$24, %esi
	movl	$8, %edx
	callq	__SHIFTL
	andl	$-32768, %eax                   ## imm = 0x8000
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %r12d
	andl	%ebx, %r12d
	orl	%eax, %r12d
	movl	$99, %edi
	movl	$24, %esi
	movl	$8, %edx
	callq	__SHIFTL
	andl	$-131072, %eax                  ## imm = 0xFFFE0000
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	andl	4(%rcx), %ebx
	orl	%eax, %ebx
	movl	8(%rcx), %edi
	movl	$15, %esi
	movl	$2, %edx
	callq	__SHIFTL
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx), %edi
	movl	$20, %esi
	movl	$4, %edx
	callq	__SHIFTR
	movl	%eax, -80(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	___GX_FlushTextureState
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_GX_LOAD_BP_REG
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movl	%r13d, %edi
	callq	_GX_LOAD_BP_REG
	movl	%r12d, %edi
	callq	_GX_LOAD_BP_REG
	movl	%r14d, %edi
	callq	_GX_LOAD_BP_REG
	testb	$1, 16(%rbx)
	je	LBB0_11
## %bb.1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	12(%rax), %edi
	movl	%edi, %ebx
	andl	$1023, %ebx                     ## imm = 0x3FF
	leal	1(%rbx), %r15d
	movl	$10, %esi
	movl	$10, %edx
	callq	__SHIFTR
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %edi
	cmpl	%eax, %ebx
	movl	%r15d, -76(%rbp)                ## 4-byte Spill
	cmovgl	%r15d, %edi
	callq	_cntlzw
	cmpq	$30, %rax
	jg	LBB0_11
## %bb.2:
	movl	$31, %ecx
	subq	%rax, %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	$16777215, %r8d                 ## imm = 0xFFFFFF
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	andl	(%rax), %r8d
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movzwl	4(%rdx), %ecx
	movzwl	(%rdx), %esi
	movl	4(%rax), %ebx
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, -84(%rbp)                 ## 4-byte Spill
	andl	$-16777216, %edi                ## imm = 0xFF000000
	movl	%r8d, %eax
	andl	$16777215, %eax                 ## imm = 0xFFFFFF
	orl	%eax, %edi
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -96(%rbp)                 ## 4-byte Spill
	callq	_GX_LOAD_BP_REG
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	andl	$-32768, %edi                   ## imm = 0x8000
	andl	$32767, %r12d                   ## imm = 0x7FFF
	orl	%r12d, %edi
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	callq	_GX_LOAD_BP_REG
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	andl	$-32768, %r12d                  ## imm = 0x8000
	andl	$32767, %ebx                    ## imm = 0x7FFF
	orl	%ebx, %r12d
	movl	%r12d, %edi
	callq	_GX_LOAD_BP_REG
	movl	$1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	subl	$1, %r13d
	movl	$0, %ecx
	cmovbl	%ecx, %r13d
	addl	%r13d, %eax
	movl	%r15d, %ecx
	sarl	%cl, %eax
	movl	$1, %ebx
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %ebx
	addl	%r13d, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	imull	%eax, %ebx
	andl	$-32768, %r14d                  ## imm = 0x8000
	movl	%ebx, %eax
	andl	$32767, %eax                    ## imm = 0x7FFF
	orl	%eax, %r14d
	movl	%r14d, %edi
	callq	_GX_LOAD_BP_REG
	movl	-96(%rbp), %r8d                 ## 4-byte Reload
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	incq	%rdx
	cmpq	%rdx, -104(%rbp)                ## 8-byte Folded Reload
	movl	-92(%rbp), %ecx                 ## 4-byte Reload
	movl	-88(%rbp), %esi                 ## 4-byte Reload
	je	LBB0_11
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	movq	_GX_TF_RGBA8@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %eax
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%ebx, %esi
	addl	%ebx, %ecx
	addl	%ebx, %ebx
	movl	%edx, %eax
	andl	$1, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %dl
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addl	%ebx, %esi
	xorl	%eax, %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	addl	%ebx, %ecx
	movl	$1, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	addl	%ebx, %r8d
	testl	%eax, %eax
	movl	%ecx, %r12d
	cmovel	%esi, %r12d
	movl	%esi, -88(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	cmovel	%ecx, %ebx
	leal	1(%rdx), %ecx
	movl	-76(%rbp), %r13d                ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %r13d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	20(%rax), %eax
	addl	$-128, %eax
	xorl	%r15d, %r15d
	movl	$0, %ecx
	cmpl	$9, %eax
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	ja	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	cltq
	leaq	l_switch.table.GX_PreloadEntireTexture(%rip), %rcx
	movl	(%rcx,%rax,4), %r15d
	leaq	l_switch.table.GX_PreloadEntireTexture.1(%rip), %rcx
	movl	(%rcx,%rax,4), %ecx
	jmp	LBB0_10
LBB0_11:
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___GX_FlushTextureState         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GX_TF_RGBA8,4,2                ## @GX_TF_RGBA8
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.GX_PreloadEntireTexture
l_switch.table.GX_PreloadEntireTexture:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	2                               ## 0x2

	.p2align	2                               ## @switch.table.GX_PreloadEntireTexture.1
l_switch.table.GX_PreloadEntireTexture.1:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.long	2                               ## 0x2

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_PreloadEntireTexture        ; -- Begin function GX_PreloadEntireTexture
	.p2align	2
_GX_PreloadEntireTexture:               ; @GX_PreloadEntireTexture
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x26, x1
	mov	x20, x0
	mov	w0, #96
	mov	w1, #24
	mov	w2, #8
	bl	__SHIFTL
	mov	x24, x0
	ldr	w8, [x20]
	bfxil	w24, w8, #0, #24
	mov	w0, #97
	mov	w1, #24
	mov	w2, #8
	bl	__SHIFTL
	mov	x21, x0
	ldr	w8, [x26]
	bfxil	w21, w8, #0, #15
	mov	w0, #98
	mov	w1, #24
	mov	w2, #8
	bl	__SHIFTL
	mov	x22, x0
	ldr	w8, [x26, #4]
	bfxil	w22, w8, #0, #15
	mov	w0, #99
	mov	w1, #24
	mov	w2, #8
	bl	__SHIFTL
	and	w19, w0, #0xfffe0000
	ldp	w8, w0, [x20, #4]
	bfxil	w19, w8, #0, #15
	mov	w1, #15
	mov	w2, #2
	bl	__SHIFTL
	orr	w23, w19, w0
	ldr	w0, [x20, #12]
	mov	w1, #20
	mov	w2, #4
	bl	__SHIFTR
	str	w0, [sp, #20]                   ; 4-byte Folded Spill
	bl	___GX_FlushTextureState
	str	w24, [sp, #44]                  ; 4-byte Folded Spill
	mov	x0, x24
	bl	_GX_LOAD_BP_REG
	mov	x0, x21
	bl	_GX_LOAD_BP_REG
	mov	x0, x22
	bl	_GX_LOAD_BP_REG
	mov	x0, x23
	bl	_GX_LOAD_BP_REG
	str	x20, [sp, #24]                  ; 8-byte Folded Spill
	ldrb	w8, [x20, #16]
	tbz	w8, #0, LBB0_10
; %bb.1:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w0, [x8, #12]
	and	w19, w0, #0x3ff
	add	w20, w19, #1
	mov	w1, #10
	mov	w2, #10
	bl	__SHIFTR
	cmp	w19, w0
	str	w20, [sp, #16]                  ; 4-byte Folded Spill
	csinc	w0, w20, w0, gt
	bl	_cntlzw
	cmp	x0, #30
	b.gt	LBB0_10
; %bb.2:
	mov	x27, #0
	mov	w8, #31
	sub	x8, x8, x0
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldp	w8, w19, [x9]
	and	w25, w8, #0xffffff
	ldrh	w11, [x26, #4]
	ldrh	w12, [x26]
	mov	w24, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	sbfiz	x8, x8, #2, #32
Lloh0:
	adrp	x9, l_switch.table.GX_PreloadEntireTexture@PAGE
Lloh1:
	add	x9, x9, l_switch.table.GX_PreloadEntireTexture@PAGEOFF
	ldr	w28, [x9, x8]
Lloh2:
	adrp	x9, l_switch.table.GX_PreloadEntireTexture.1@PAGE
Lloh3:
	add	x9, x9, l_switch.table.GX_PreloadEntireTexture.1@PAGEOFF
	ldr	w20, [x9, x8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w19, w25
	add	w8, w27, #1
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	lsr	w19, w9, w8
	bfxil	w0, w25, #0, #24
	str	w0, [sp, #44]                   ; 4-byte Folded Spill
	bl	_GX_LOAD_BP_REG
	bfxil	w21, w26, #0, #15
	mov	x0, x21
	bl	_GX_LOAD_BP_REG
	bfxil	w22, w24, #0, #15
	mov	x0, x22
	bl	_GX_LOAD_BP_REG
	mov	w10, #1
	lsl	w8, w10, w28
	sub	w9, w19, #1
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	add	w8, w9, w8
	asr	w8, w8, w28
	mov	w24, #1
	lsl	w10, w10, w20
	add	w9, w9, w10
	asr	w9, w9, w20
	mul	w19, w9, w8
	bfxil	w23, w19, #0, #15
	mov	x0, x23
	bl	_GX_LOAD_BP_REG
	add	x27, x27, #1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cmp	x8, x27
	ldp	w12, w11, [sp, #36]             ; 8-byte Folded Reload
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
Lloh4:
	adrp	x8, _GX_TF_RGBA8@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GX_TF_RGBA8@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w9, w8
	b.ne	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w12, w19, w12
	add	w11, w19, w11
	lsl	w19, w19, #1
	and	w8, w27, #0x1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w9, w19, w12
	add	w10, w19, w11
	tst	w27, #0x1
	csel	w8, wzr, w24, eq
	csel	w12, w9, w12, eq
	csel	w11, w11, w10, eq
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w8, #0
	csel	w26, w12, w11, eq
	csel	w24, w11, w12, eq
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w8, [x8, #20]
	sub	w8, w8, #128
	cmp	w8, #9
	stp	w12, w11, [sp, #36]             ; 8-byte Folded Spill
	b.ls	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w28, #0
	mov	w20, #0
	b	LBB0_4
LBB0_10:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	___GX_FlushTextureState
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GX_TF_RGBA8,4,2                ; @GX_TF_RGBA8
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.GX_PreloadEntireTexture
l_switch.table.GX_PreloadEntireTexture:
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	2                               ; 0x2

	.p2align	2                               ; @switch.table.GX_PreloadEntireTexture.1
l_switch.table.GX_PreloadEntireTexture.1:
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.long	2                               ; 0x2

.subsections_via_symbols
