	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2_set_texture_frame
_ps2_set_texture_frame:                 ## @ps2_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
	movl	%r8d, %r14d
	movl	%ecx, %r15d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_GS_PSM_CT16@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_GS_PSM_CT32@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r13d
	movl	8(%rbx), %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	callq	_texture_need_prepare
	movl	%eax, %r12d
	movl	4(%rbx), %r9d
	movl	8(%rbx), %edi
	movl	$0, (%rsp)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_transfer_texture
	xorl	%eax, %eax
	orl	(%rbx), %r12d
	setne	%al
	movl	%eax, (%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GS_PSM_CT32,4,2                ## @GS_PSM_CT32
	.comm	_GS_PSM_CT16,4,2                ## @GS_PSM_CT16
	.no_dead_strip	_ps2_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 ps2_set_texture_frame
_ps2_set_texture_frame:                 ; @ps2_set_texture_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x4
	mov	x20, x3
	mov	x21, x1
	mov	x22, x0
	cmp	w2, #0
Lloh0:
	adrp	x8, _GS_PSM_CT32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GS_PSM_CT32@GOTPAGEOFF]
Lloh2:
	adrp	x9, _GS_PSM_CT16@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GS_PSM_CT16@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w23, [x8]
	ldr	w0, [x0, #8]
	mov	x1, x3
	mov	x2, x4
	mov	x3, x23
	bl	_texture_need_prepare
	mov	x24, x0
	ldp	w5, w0, [x22, #4]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	mov	x4, x23
	mov	w6, #0
	bl	_transfer_texture
	ldr	w8, [x22]
	orr	w8, w8, w24
	cmp	w8, #0
	cset	w8, ne
	str	w8, [x22]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GS_PSM_CT32,4,2                ; @GS_PSM_CT32
	.comm	_GS_PSM_CT16,4,2                ; @GS_PSM_CT16
	.no_dead_strip	_ps2_set_texture_frame
.subsections_via_symbols
