	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiiu_gfx_set_texture_frame
_wiiu_gfx_set_texture_frame:            ## @wiiu_gfx_set_texture_frame
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	movl	%ecx, %r14d
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.3:
	testl	%r8d, %r8d
	je	LBB0_8
## %bb.4:
	movq	%rdi, %r12
	movl	16(%rdi), %eax
	cmpl	%r14d, %eax
	cmovbl	%eax, %r14d
	movl	20(%rdi), %eax
	cmpl	%r8d, %eax
	cmovbl	%eax, %r8d
	movl	%r14d, (%rdi)
	movl	%r8d, 4(%rdi)
	movl	%r14d, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	testl	%r8d, %r8d
	je	LBB0_7
## %bb.5:
	movq	32(%r12), %rbx
	shll	$2, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movslq	40(%r12), %rax
	leaq	(%rbx,%rax,4), %rbx
	addq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	decl	%r15d
	jne	LBB0_6
LBB0_7:
	movq	_GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%r12), %rsi
	movl	24(%r12), %edx
	callq	_GX2Invalidate
	movq	8(%r12), %rsi
	movups	48(%r12), %xmm0
	movups	%xmm0, 16(%rsi)
	movq	$0, (%rsi)
	xorps	%xmm0, %xmm0
	cvtsi2ssq	-56(%rbp), %xmm0        ## 8-byte Folded Reload
	movl	16(%r12), %eax
	cvtsi2ss	%rax, %xmm1
	divss	%xmm1, %xmm0
	movss	%xmm0, 8(%rsi)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movl	20(%r12), %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%rax, %xmm1
	divss	%xmm1, %xmm0
	movss	%xmm0, 12(%rsi)
	movq	_GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$128, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_GX2Invalidate                  ## TAILCALL
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GX2_INVALIDATE_MODE_CPU_TEXTURE,4,2 ## @GX2_INVALIDATE_MODE_CPU_TEXTURE
	.comm	_GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER,4,2 ## @GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER
	.no_dead_strip	_wiiu_gfx_set_texture_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiiu_gfx_set_texture_frame
_wiiu_gfx_set_texture_frame:            ; @wiiu_gfx_set_texture_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_8
; %bb.2:
	cbz	w3, LBB0_8
; %bb.3:
	cbz	w4, LBB0_8
; %bb.4:
	mov	x19, x0
	ldr	d0, [x0, #16]
	fmov	s1, w3
	mov.s	v1[1], w4
	umin.2s	v0, v0, v1
	str	d0, [x0]
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov.s	w23, v0[1]
	cbz	w23, LBB0_7
; %bb.5:
	ldr	x21, [x19, #32]
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	fmov	w8, s0
	lsl	w22, w8, #2
	lsl	x24, x8, #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_memcpy
	ldrsw	x8, [x19, #40]
	add	x21, x21, x8, lsl #2
	add	x20, x20, x24
	subs	w23, w23, #1
	b.ne	LBB0_6
LBB0_7:
Lloh0:
	adrp	x8, _GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GX2_INVALIDATE_MODE_CPU_TEXTURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	x1, [x19, #32]
	ldr	w2, [x19, #24]
	bl	_GX2Invalidate
	ldr	x1, [x19, #8]
	ldr	q0, [x19, #48]
	str	q0, [x1, #16]
	str	xzr, [x1]
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	ucvtf.2s	v0, v0
	ldr	d1, [x19, #16]
	ucvtf.2s	v1, v1
	fdiv.2s	v0, v0, v1
	str	d0, [x1, #8]
Lloh3:
	adrp	x8, _GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w2, #128
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_GX2Invalidate
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_GX2_INVALIDATE_MODE_CPU_TEXTURE,4,2 ; @GX2_INVALIDATE_MODE_CPU_TEXTURE
	.comm	_GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER,4,2 ; @GX2_INVALIDATE_MODE_CPU_ATTRIBUTE_BUFFER
	.no_dead_strip	_wiiu_gfx_set_texture_frame
.subsections_via_symbols
