	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetTexCopyDst               ## -- Begin function GX_SetTexCopyDst
	.p2align	4, 0x90
_GX_SetTexCopyDst:                      ## @GX_SetTexCopyDst
	.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
	movl	%ecx, %ebx
	movl	%edx, %r15d
	movl	%esi, %edx
	movl	%edi, %esi
	leaq	-48(%rbp), %rcx
	leaq	-52(%rbp), %r8
	leaq	-44(%rbp), %r9
	movl	%r15d, %edi
	callq	___GetImageTileCount
	movq	___gx@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movl	$-1024, %ecx                    ## imm = 0xFC00
	andl	(%rax), %ecx
	movl	-44(%rbp), %edx
	imull	-48(%rbp), %edx
	andl	$1023, %edx                     ## imm = 0x3FF
	orl	%ecx, %edx
	movl	%edx, (%rax)
	movq	_GX_TF_Z16@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_GX_CTF_YUVA8@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	je	LBB0_3
## %bb.1:
	movq	_GX_TF_I4@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	jg	LBB0_4
## %bb.2:
	movq	_GX_TF_RGB565@GOTPCREL(%rip), %rdx
	cmpl	%r15d, (%rdx)
	jle	LBB0_4
LBB0_3:
	movl	$98304, %edx                    ## imm = 0x18000
	orl	4(%rax), %edx
	jmp	LBB0_5
LBB0_4:
	movl	$-98305, %edx                   ## imm = 0xFFFE7FFF
	andl	4(%rax), %edx
	orl	$65536, %edx                    ## imm = 0x10000
LBB0_5:
	movl	%r15d, %esi
	andl	$15, %esi
	cmpl	%r15d, %ecx
	movl	$11, %r14d
	cmovnel	%esi, %r14d
	andl	$-9, %edx
	movl	%r14d, %r12d
	andl	$-8, %r12d
	orl	%edx, %r12d
	movl	%r12d, 4(%rax)
	andl	$-513, %r12d                    ## imm = 0xFDFF
	movl	%ebx, %edi
	movl	$9, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movq	(%r13), %rax
	movl	%ebx, 4(%rax)
	andl	$-113, %ebx
	movl	%r14d, %edi
	movl	$4, %esi
	movl	$3, %edx
	callq	__SHIFTL
	orl	%ebx, %eax
	movq	(%r13), %rcx
	movl	%eax, 4(%rcx)
	movl	$16777215, %ebx                 ## imm = 0xFFFFFF
	andl	(%rcx), %ebx
	movl	$77, %edi
	movl	$24, %esi
	movl	$8, %edx
	callq	__SHIFTL
	orl	%ebx, %eax
	movq	(%r13), %rcx
	movl	%eax, (%rcx)
	movq	__GX_TF_ZTF@GOTPCREL(%rip), %rax
	notl	%r15d
	xorl	%edx, %edx
	andl	(%rax), %r15d
	sete	%dl
	movl	%edx, 8(%rcx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___gx,8,3                       ## @__gx
	.comm	_GX_TF_Z16,4,2                  ## @GX_TF_Z16
	.comm	_GX_CTF_YUVA8,4,2               ## @GX_CTF_YUVA8
	.comm	_GX_TF_I4,4,2                   ## @GX_TF_I4
	.comm	_GX_TF_RGB565,4,2               ## @GX_TF_RGB565
	.comm	__GX_TF_ZTF,4,2                 ## @_GX_TF_ZTF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetTexCopyDst               ; -- Begin function GX_SetTexCopyDst
	.p2align	2
_GX_SetTexCopyDst:                      ; @GX_SetTexCopyDst
	.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
	mov	x20, x3
	mov	x19, x2
	mov	x2, x1
	mov	x1, x0
	add	x3, sp, #12
	add	x4, sp, #8
	add	x5, sp, #4
	mov	x0, x19
	bl	___GetImageTileCount
Lloh0:
	adrp	x22, ___gx@GOTPAGE
Lloh1:
	ldr	x22, [x22, ___gx@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	w9, [x8]
	ldr	w10, [sp, #12]
	ldr	w11, [sp, #4]
	mul	w10, w11, w10
	bfxil	w9, w10, #0, #10
Lloh2:
	adrp	x10, _GX_TF_Z16@GOTPAGE
Lloh3:
	ldr	x10, [x10, _GX_TF_Z16@GOTPAGEOFF]
	str	w9, [x8]
Lloh4:
	ldr	w9, [x10]
Lloh5:
	adrp	x10, _GX_CTF_YUVA8@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GX_CTF_YUVA8@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w10, w19
	b.eq	LBB0_3
; %bb.1:
Lloh8:
	adrp	x10, _GX_TF_I4@GOTPAGE
Lloh9:
	ldr	x10, [x10, _GX_TF_I4@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
Lloh11:
	adrp	x11, _GX_TF_RGB565@GOTPAGE
Lloh12:
	ldr	x11, [x11, _GX_TF_RGB565@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	cmp	w10, w19
	ccmp	w11, w19, #4, le
	b.gt	LBB0_3
; %bb.2:
	ldr	w10, [x8, #4]
	and	w10, w10, #0xfffe7fff
	orr	w10, w10, #0x10000
	b	LBB0_4
LBB0_3:
	ldr	w10, [x8, #4]
	orr	w10, w10, #0x18000
LBB0_4:
	and	w11, w19, #0xf
	mov	w12, #11
	cmp	w9, w19
	csel	w21, w12, w11, eq
	lsr	w9, w21, #3
	bfi	w10, w9, #3, #1
	str	w10, [x8, #4]
	and	w23, w10, #0xfffffdff
	mov	x0, x20
	mov	w1, #9
	mov	w2, #1
	bl	__SHIFTL
	orr	w8, w23, w0
	ldr	x9, [x22]
	str	w8, [x9, #4]
	and	w20, w8, #0xffffff8f
	mov	x0, x21
	mov	w1, #4
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w20, w0
	ldr	x9, [x22]
	str	w8, [x9, #4]
	ldr	w8, [x9]
	and	w20, w8, #0xffffff
	mov	w0, #77
	mov	w1, #24
	mov	w2, #8
	bl	__SHIFTL
	orr	w8, w20, w0
	ldr	x9, [x22]
	str	w8, [x9]
Lloh14:
	adrp	x8, __GX_TF_ZTF@GOTPAGE
Lloh15:
	ldr	x8, [x8, __GX_TF_ZTF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bics	wzr, w8, w19
	cset	w8, eq
	str	w8, [x9, #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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	___gx,8,3                       ; @__gx
	.comm	_GX_TF_Z16,4,2                  ; @GX_TF_Z16
	.comm	_GX_CTF_YUVA8,4,2               ; @GX_CTF_YUVA8
	.comm	_GX_TF_I4,4,2                   ; @GX_TF_I4
	.comm	_GX_TF_RGB565,4,2               ; @GX_TF_RGB565
	.comm	__GX_TF_ZTF,4,2                 ; @_GX_TF_ZTF
.subsections_via_symbols
