	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psp_frame
_psp_frame:                             ## @psp_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
	xorl	%ebx, %ebx
	testl	%edx, %edx
	je	LBB0_26
## %bb.1:
	movl	%ecx, %r15d
	testl	%ecx, %ecx
	je	LBB0_26
## %bb.2:
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	16(%rbp), %rbx
	testl	$67108864, %r13d                ## imm = 0x4000000
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_4
## %bb.3:
	movq	_RETRO_HW_FRAME_BUFFER_VALID@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	je	LBB0_4
## %bb.5:
	testq	%r13, %r13
	je	LBB0_7
## %bb.6:
	movl	$0, (%r12)
LBB0_8:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_sceGuSync
	jmp	LBB0_9
LBB0_4:
	movl	$1, (%r12)
LBB0_9:
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movl	72(%r12), %edi
	callq	_pspDebugScreenSetBase
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_pspDebugScreenSetXY
	movq	%rbx, %rdi
	callq	_pspDebugScreenPuts
LBB0_11:
	cmpq	$0, 80(%r12)
	je	LBB0_14
## %bb.12:
	cmpl	$0, 4(%r12)
	je	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	_sceDisplayWaitVblankStart
LBB0_14:
	movl	$1, 4(%r12)
	xorl	%eax, %eax
	callq	_sceGuSwapBuffers
	movl	%eax, %edi
	callq	_FROM_GU_POINTER
	movl	%eax, 72(%r12)
	cmpq	$0, 64(%r12)
	je	LBB0_16
## %bb.15:
	movq	24(%rbp), %rsi
	movq	%r12, %rdi
	callq	_psp_update_viewport
LBB0_16:
	movq	48(%r12), %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_psp_set_tex_coords
	movq	_GU_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	60(%r12), %esi
	callq	_sceGuStart
	movl	56(%r12), %edi
	movl	%edi, %esi
	callq	_sceGuTexFilter
	movq	_GU_COLOR_BUFFER_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sceGuClear
	cmpl	$0, (%r12)
	je	LBB0_18
## %bb.17:
	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
	movq	48(%r12), %r8
	xorl	%ecx, %ecx
	callq	_sceGuDrawArray
	jmp	LBB0_24
LBB0_18:
	testq	%r13, %r13
	je	LBB0_23
## %bb.19:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	imull	%r15d, %esi
	movq	%r13, %rdi
	callq	_sceKernelDcacheWritebackRange
	cmpq	$0, 40(%r12)
	jne	LBB0_20
## %bb.21:
	movq	_GU_PSM_5650@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_7:
	cmpl	$0, (%r12)
	jne	LBB0_9
	jmp	LBB0_8
LBB0_20:
	movq	_GU_PSM_8888@GOTPCREL(%rip), %rax
LBB0_22:
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movl	%r13d, %esi
	andl	$15, %esi
	movb	8(%r12), %cl
	shrl	%cl, %esi
	shrl	%cl, %r9d
	movl	(%rax), %edi
	movslq	%r13d, %rax
	andq	$-16, %rax
	movl	36(%r12), %ebx
	subq	$8, %rsp
	xorl	%edx, %edx
	movl	%r14d, %ecx
	movl	%r15d, %r8d
	pushq	%rbx
	pushq	%r14
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_sceGuCopyImage
	addq	$48, %rsp
LBB0_23:
	movl	%r14d, %edi
	callq	_next_pow2
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_next_pow2
	movl	36(%r12), %r8d
	xorl	%edi, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_sceGuTexImage
	movl	32(%r12), %edi
	callq	_sceGuCallList
LBB0_24:
	xorl	%eax, %eax
	callq	_sceGuFinish
	movl	$1, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_26
## %bb.25:
	movq	_GU_TAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r12), %esi
	addq	$16, %r12
	movq	%r12, %rdx
	callq	_sceGuSendList
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_sceGuSync
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_HW_FRAME_BUFFER_VALID,8,3 ## @RETRO_HW_FRAME_BUFFER_VALID
	.comm	_GU_DIRECT,4,2                  ## @GU_DIRECT
	.comm	_GU_COLOR_BUFFER_BIT,4,2        ## @GU_COLOR_BUFFER_BIT
	.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_PSM_8888,4,2                ## @GU_PSM_8888
	.comm	_GU_PSM_5650,4,2                ## @GU_PSM_5650
	.comm	_GU_TAIL,4,2                    ## @GU_TAIL
	.no_dead_strip	_psp_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psp_frame
_psp_frame:                             ; @psp_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	mov	w0, #0
	cbz	w2, LBB0_24
; %bb.1:
	mov	x21, x3
	cbz	w3, LBB0_24
; %bb.2:
	mov	x24, x7
	mov	x25, x6
	mov	x22, x5
	mov	x20, x2
	mov	x23, x1
	tbnz	w23, #26, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _RETRO_HW_FRAME_BUFFER_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RETRO_HW_FRAME_BUFFER_VALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	b.eq	LBB0_6
; %bb.4:
	cbz	x23, LBB0_7
; %bb.5:
	str	wzr, [x19]
	b	LBB0_8
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_9
LBB0_7:
	ldr	w8, [x19]
	cbnz	w8, LBB0_9
LBB0_8:
	mov	w0, #0
	mov	w1, #0
	bl	_sceGuSync
LBB0_9:
	cbz	x25, LBB0_11
; %bb.10:
	ldr	w0, [x19, #72]
	bl	_pspDebugScreenSetBase
	mov	w0, #0
	mov	w1, #0
	bl	_pspDebugScreenSetXY
	mov	x0, x25
	bl	_pspDebugScreenPuts
LBB0_11:
	ldr	x8, [x19, #80]
	cbz	x8, LBB0_14
; %bb.12:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_14
; %bb.13:
	bl	_sceDisplayWaitVblankStart
LBB0_14:
	mov	w8, #1
	str	w8, [x19, #4]
	bl	_sceGuSwapBuffers
	bl	_FROM_GU_POINTER
	str	w0, [x19, #72]
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x19
	mov	x1, x24
	bl	_psp_update_viewport
LBB0_16:
	ldr	x0, [x19, #48]
	mov	x1, x20
	mov	x2, x21
	bl	_psp_set_tex_coords
Lloh3:
	adrp	x8, _GU_DIRECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GU_DIRECT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x19, #60]
	bl	_sceGuStart
	ldr	w0, [x19, #56]
	mov	x1, x0
	bl	_sceGuTexFilter
Lloh6:
	adrp	x8, _GU_COLOR_BUFFER_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GU_COLOR_BUFFER_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_sceGuClear
	ldr	w8, [x19]
	cbz	w8, LBB0_18
; %bb.17:
Lloh9:
	adrp	x8, _GU_SPRITES@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GU_SPRITES@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _GU_TEXTURE_32BITF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GU_TEXTURE_32BITF@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _GU_VERTEX_32BITF@GOTPAGE
Lloh16:
	ldr	x9, [x9, _GU_VERTEX_32BITF@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _GU_TRANSFORM_2D@GOTPAGE
Lloh19:
	ldr	x9, [x9, _GU_TRANSFORM_2D@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w1, w8, w9
Lloh21:
	adrp	x8, _PSP_FRAME_VERTEX_COUNT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PSP_FRAME_VERTEX_COUNT@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	ldr	x4, [x19, #48]
	mov	x3, #0
	bl	_sceGuDrawArray
	b	LBB0_21
LBB0_18:
	cbz	x23, LBB0_20
; %bb.19:
	mul	w1, w22, w21
	mov	x0, x23
	bl	_sceKernelDcacheWritebackRange
	ldr	x8, [x19, #40]
Lloh24:
	adrp	x9, _GU_PSM_8888@GOTPAGE
Lloh25:
	ldr	x9, [x9, _GU_PSM_8888@GOTPAGEOFF]
Lloh26:
	adrp	x10, _GU_PSM_5650@GOTPAGE
Lloh27:
	ldr	x10, [x10, _GU_PSM_5650@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w0, [x8]
	and	w8, w23, #0xf
	ldr	w9, [x19, #8]
	lsr	w1, w8, w9
	lsr	w5, w22, w9
	sxtw	x8, w23
	and	x6, x8, #0xfffffffffffffff0
	ldr	w8, [x19, #36]
	stp	w20, w8, [sp, #4]
	str	wzr, [sp]
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	mov	w7, #0
	bl	_sceGuCopyImage
LBB0_20:
	mov	x0, x20
	bl	_next_pow2
	mov	x22, x0
	mov	x0, x21
	bl	_next_pow2
	mov	x2, x0
	ldr	w4, [x19, #36]
	mov	w0, #0
	mov	x1, x22
	mov	x3, x20
	bl	_sceGuTexImage
	ldr	w0, [x19, #32]
	bl	_sceGuCallList
LBB0_21:
	bl	_sceGuFinish
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_23
; %bb.22:
	add	x2, x19, #16
Lloh28:
	adrp	x8, _GU_TAIL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GU_TAIL@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w1, [x19, #20]
	bl	_sceGuSendList
	mov	w0, #0
	mov	w1, #0
	bl	_sceGuSync
LBB0_23:
	mov	w0, #1
LBB0_24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_HW_FRAME_BUFFER_VALID,8,3 ; @RETRO_HW_FRAME_BUFFER_VALID
	.comm	_GU_DIRECT,4,2                  ; @GU_DIRECT
	.comm	_GU_COLOR_BUFFER_BIT,4,2        ; @GU_COLOR_BUFFER_BIT
	.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_PSM_8888,4,2                ; @GU_PSM_8888
	.comm	_GU_PSM_5650,4,2                ; @GU_PSM_5650
	.comm	_GU_TAIL,4,2                    ; @GU_TAIL
	.no_dead_strip	_psp_frame
.subsections_via_symbols
