	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vita_get_current_sw_framebuffer
_vita_get_current_sw_framebuffer:       ## @vita_get_current_sw_framebuffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	24(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	cmpq	8(%r14), %rax
	je	LBB0_5
LBB0_3:
	xorl	%eax, %eax
	callq	_vita2d_wait_rendering_done
	movq	24(%rbx), %rdi
	callq	_vita2d_free_texture
	movq	$0, 24(%rbx)
LBB0_4:
	movq	(%r14), %rdi
	movq	%rdi, (%rbx)
	movq	8(%r14), %rsi
	movq	%rsi, 8(%rbx)
	movl	36(%rbx), %edx
	callq	_vita2d_create_empty_texture_format
	movq	%rax, 24(%rbx)
	movl	32(%rbx), %edx
	movq	%rax, %rdi
	movl	%edx, %esi
	callq	_vita2d_texture_set_filters
	movq	24(%rbx), %rdi
LBB0_5:
	callq	_vita2d_texture_get_datap
	movl	%eax, 32(%r14)
	movq	24(%rbx), %rdi
	callq	_vita2d_texture_get_stride
	movl	%eax, 28(%r14)
	cmpq	$0, 16(%rbx)
	jne	LBB0_6
## %bb.7:
	movq	_RETRO_PIXEL_FORMAT_RGB565@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_RETRO_PIXEL_FORMAT_XRGB8888@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movq	$0, 16(%r14)
	movl	$1, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_PIXEL_FORMAT_XRGB8888,4,2 ## @RETRO_PIXEL_FORMAT_XRGB8888
	.comm	_RETRO_PIXEL_FORMAT_RGB565,4,2  ## @RETRO_PIXEL_FORMAT_RGB565
	.no_dead_strip	_vita_get_current_sw_framebuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vita_get_current_sw_framebuffer
_vita_get_current_sw_framebuffer:       ; @vita_get_current_sw_framebuffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x0, #24]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.eq	LBB0_5
LBB0_3:
	bl	_vita2d_wait_rendering_done
	ldr	x0, [x20, #24]
	bl	_vita2d_free_texture
	str	xzr, [x20, #24]
LBB0_4:
	ldp	x0, x1, [x19]
	stp	x0, x1, [x20]
	ldr	w2, [x20, #36]
	bl	_vita2d_create_empty_texture_format
	str	x0, [x20, #24]
	ldr	w1, [x20, #32]
	mov	x2, x1
	bl	_vita2d_texture_set_filters
	ldr	x0, [x20, #24]
LBB0_5:
	bl	_vita2d_texture_get_datap
	str	w0, [x19, #32]
	ldr	x0, [x20, #24]
	bl	_vita2d_texture_get_stride
	str	w0, [x19, #28]
	ldr	x8, [x20, #16]
Lloh0:
	adrp	x9, _RETRO_PIXEL_FORMAT_XRGB8888@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RETRO_PIXEL_FORMAT_XRGB8888@GOTPAGEOFF]
Lloh2:
	adrp	x10, _RETRO_PIXEL_FORMAT_RGB565@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RETRO_PIXEL_FORMAT_RGB565@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	xzr, [x19, #16]
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_PIXEL_FORMAT_XRGB8888,4,2 ; @RETRO_PIXEL_FORMAT_XRGB8888
	.comm	_RETRO_PIXEL_FORMAT_RGB565,4,2  ; @RETRO_PIXEL_FORMAT_RGB565
	.no_dead_strip	_vita_get_current_sw_framebuffer
.subsections_via_symbols
