	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_set_texture_frame
_psp_set_texture_frame:                 ## @psp_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movl	%ecx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	(%rdi), %edi
	movq	_SCEGU_SCR_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SCEGU_SCR_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_psp_set_screen_coords
	movl	(%r14), %edi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_psp_set_tex_coords
	movl	%r13d, %esi
	imull	%r15d, %esi
	addl	%esi, %esi
	movq	%r12, %rdi
	callq	_sceKernelDcacheWritebackRange
	movq	_GU_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r14), %esi
	callq	_sceGuStart
	movq	_GU_PSM_4444@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	4(%r14), %eax
	subq	$8, %rsp
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	pushq	%rax
	pushq	%r13
	pushq	$0
	pushq	$0
	pushq	%r12
	callq	_sceGuCopyImage
	addq	$48, %rsp
	xorl	%eax, %eax
	callq	_sceGuFinish
	movq	_GU_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	callq	_sceGuStart
	movl	(%rbx), %edi
	movq	_GU_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_sceGuTexMode
	movq	_GU_TFX_REPLACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GU_TCC_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sceGuTexFunc
	movq	_GU_LINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	callq	_sceGuTexFilter
	movl	%r13d, %edi
	callq	_next_pow2
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_next_pow2
	movl	4(%r14), %r8d
	xorl	%edi, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r13d, %ecx
	callq	_sceGuTexImage
	movq	_GU_BLEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sceGuEnable
	movq	_GU_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GU_FIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%edx, %esi
	movl	$-252645136, %ecx               ## imm = 0xF0F0F0F0
	movl	$252645135, %r8d                ## imm = 0xF0F0F0F
	callq	_sceGuBlendFunc
	movq	_GU_TEXTURE_32BITF@GOTPCREL(%rip), %rax
	movq	_GU_VERTEX_32BITF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_GU_SPRITES@GOTPCREL(%rip), %rax
	movq	_GU_TRANSFORM_2D@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movl	(%rax), %edi
	movq	_PSP_FRAME_VERTEX_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r14), %r8d
	xorl	%ecx, %ecx
	callq	_sceGuDrawArray
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sceGuFinish                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SCEGU_SCR_WIDTH,4,2            ## @SCEGU_SCR_WIDTH
	.comm	_SCEGU_SCR_HEIGHT,4,2           ## @SCEGU_SCR_HEIGHT
	.comm	_GU_DIRECT,4,2                  ## @GU_DIRECT
	.comm	_GU_PSM_4444,4,2                ## @GU_PSM_4444
	.comm	_GU_SEND,4,2                    ## @GU_SEND
	.comm	_GU_FALSE,4,2                   ## @GU_FALSE
	.comm	_GU_TFX_REPLACE,4,2             ## @GU_TFX_REPLACE
	.comm	_GU_TCC_RGB,4,2                 ## @GU_TCC_RGB
	.comm	_GU_LINEAR,4,2                  ## @GU_LINEAR
	.comm	_GU_BLEND,4,2                   ## @GU_BLEND
	.comm	_GU_ADD,4,2                     ## @GU_ADD
	.comm	_GU_FIX,4,2                     ## @GU_FIX
	.comm	_GU_SPRITES,4,2                 ## @GU_SPRITES
	.comm	_GU_TEXTURE_32BITF,4,2          ## @GU_TEXTURE_32BITF
	.comm	_GU_VERTEX_32BITF,4,2           ## @GU_VERTEX_32BITF
	.comm	_GU_TRANSFORM_2D,4,2            ## @GU_TRANSFORM_2D
	.comm	_PSP_FRAME_VERTEX_COUNT,4,2     ## @PSP_FRAME_VERTEX_COUNT
	.comm	_GU_ONE_MINUS_SRC_ALPHA,4,2     ## @GU_ONE_MINUS_SRC_ALPHA
	.comm	_GU_SRC_ALPHA,4,2               ## @GU_SRC_ALPHA
	.no_dead_strip	_psp_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 psp_set_texture_frame
_psp_set_texture_frame:                 ; @psp_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
	mov	x21, x4
	mov	x20, x3
	mov	x22, x1
	mov	x19, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _SCEGU_SCR_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCEGU_SCR_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _SCEGU_SCR_HEIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCEGU_SCR_HEIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	w5, #0
	bl	_psp_set_screen_coords
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, x21
	bl	_psp_set_tex_coords
	mul	w8, w20, w21
	lsl	w1, w8, #1
	mov	x0, x22
	bl	_sceKernelDcacheWritebackRange
Lloh6:
	adrp	x8, _GU_DIRECT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GU_DIRECT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_sceGuStart
Lloh9:
	adrp	x23, _GU_PSM_4444@GOTPAGE
Lloh10:
	ldr	x23, [x23, _GU_PSM_4444@GOTPAGEOFF]
	ldr	w0, [x23]
	ldr	w8, [x19, #4]
	stp	w20, w8, [sp, #4]
	str	wzr, [sp]
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	mov	x5, x20
	mov	x6, x22
	mov	w7, #0
	bl	_sceGuCopyImage
	bl	_sceGuFinish
Lloh11:
	adrp	x8, _GU_SEND@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GU_SEND@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_sceGuStart
	ldr	w0, [x23]
Lloh14:
	adrp	x8, _GU_FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GU_FALSE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w2, #0
	bl	_sceGuTexMode
Lloh17:
	adrp	x8, _GU_TFX_REPLACE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GU_TFX_REPLACE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _GU_TCC_RGB@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GU_TCC_RGB@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_sceGuTexFunc
Lloh23:
	adrp	x8, _GU_LINEAR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GU_LINEAR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x0
	bl	_sceGuTexFilter
	mov	x0, x20
	bl	_next_pow2
	mov	x22, x0
	mov	x0, x21
	bl	_next_pow2
	mov	x2, x0
	ldr	w4, [x19, #4]
	mov	w0, #0
	mov	x1, x22
	mov	x3, x20
	bl	_sceGuTexImage
Lloh26:
	adrp	x8, _GU_BLEND@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GU_BLEND@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_sceGuEnable
Lloh29:
	adrp	x8, _GU_ADD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _GU_ADD@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
Lloh32:
	adrp	x8, _GU_FIX@GOTPAGE
Lloh33:
	ldr	x8, [x8, _GU_FIX@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x2, x1
	mov	w3, #-252645136
	mov	w4, #252645135
	bl	_sceGuBlendFunc
Lloh35:
	adrp	x8, _GU_SPRITES@GOTPAGE
Lloh36:
	ldr	x8, [x8, _GU_SPRITES@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x8, _GU_TEXTURE_32BITF@GOTPAGE
Lloh39:
	ldr	x8, [x8, _GU_TEXTURE_32BITF@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _GU_VERTEX_32BITF@GOTPAGE
Lloh42:
	ldr	x9, [x9, _GU_VERTEX_32BITF@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh44:
	adrp	x9, _GU_TRANSFORM_2D@GOTPAGE
Lloh45:
	ldr	x9, [x9, _GU_TRANSFORM_2D@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh47:
	adrp	x8, _PSP_FRAME_VERTEX_COUNT@GOTPAGE
Lloh48:
	ldr	x8, [x8, _PSP_FRAME_VERTEX_COUNT@GOTPAGEOFF]
Lloh49:
	ldr	w2, [x8]
	ldr	w4, [x19]
	mov	x3, #0
	bl	_sceGuDrawArray
	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	_sceGuFinish
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SCEGU_SCR_WIDTH,4,2            ; @SCEGU_SCR_WIDTH
	.comm	_SCEGU_SCR_HEIGHT,4,2           ; @SCEGU_SCR_HEIGHT
	.comm	_GU_DIRECT,4,2                  ; @GU_DIRECT
	.comm	_GU_PSM_4444,4,2                ; @GU_PSM_4444
	.comm	_GU_SEND,4,2                    ; @GU_SEND
	.comm	_GU_FALSE,4,2                   ; @GU_FALSE
	.comm	_GU_TFX_REPLACE,4,2             ; @GU_TFX_REPLACE
	.comm	_GU_TCC_RGB,4,2                 ; @GU_TCC_RGB
	.comm	_GU_LINEAR,4,2                  ; @GU_LINEAR
	.comm	_GU_BLEND,4,2                   ; @GU_BLEND
	.comm	_GU_ADD,4,2                     ; @GU_ADD
	.comm	_GU_FIX,4,2                     ; @GU_FIX
	.comm	_GU_SPRITES,4,2                 ; @GU_SPRITES
	.comm	_GU_TEXTURE_32BITF,4,2          ; @GU_TEXTURE_32BITF
	.comm	_GU_VERTEX_32BITF,4,2           ; @GU_VERTEX_32BITF
	.comm	_GU_TRANSFORM_2D,4,2            ; @GU_TRANSFORM_2D
	.comm	_PSP_FRAME_VERTEX_COUNT,4,2     ; @PSP_FRAME_VERTEX_COUNT
	.comm	_GU_ONE_MINUS_SRC_ALPHA,4,2     ; @GU_ONE_MINUS_SRC_ALPHA
	.comm	_GU_SRC_ALPHA,4,2               ; @GU_SRC_ALPHA
	.no_dead_strip	_psp_set_texture_frame
.subsections_via_symbols
