	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp1SwapFrameBuffer     ## -- Begin function VIDSoftVdp1SwapFrameBuffer
	.p2align	4, 0x90
_VIDSoftVdp1SwapFrameBuffer:            ## @VIDSoftVdp1SwapFrameBuffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_Vdp1Regs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$2, (%rax)
	movq	_Vdp1External@GOTPCREL(%rip), %rbx
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_5
LBB0_2:
	movq	_vidsoft_vdp1_thread_enabled@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_VidsoftWaitForVdp1Thread
LBB0_4:
	movq	_vdp1frontframebuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_vdp1backframebuffer@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movq	%rsi, (%rax)
	movq	%rcx, (%rdx)
	movq	$0, (%rbx)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Vdp1Regs,8,3                   ## @Vdp1Regs
	.comm	_Vdp1External,8,3               ## @Vdp1External
	.comm	_vidsoft_vdp1_thread_enabled,8,3 ## @vidsoft_vdp1_thread_enabled
	.comm	_vdp1frontframebuffer,8,3       ## @vdp1frontframebuffer
	.comm	_vdp1backframebuffer,8,3        ## @vdp1backframebuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VIDSoftVdp1SwapFrameBuffer     ; -- Begin function VIDSoftVdp1SwapFrameBuffer
	.p2align	2
_VIDSoftVdp1SwapFrameBuffer:            ; @VIDSoftVdp1SwapFrameBuffer
	.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
Lloh0:
	adrp	x8, _Vdp1Regs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Vdp1Regs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x19, _Vdp1External@GOTPAGE
Lloh4:
	ldr	x19, [x19, _Vdp1External@GOTPAGEOFF]
	ldrb	w8, [x8]
	tbz	w8, #1, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_5
LBB0_2:
Lloh5:
	adrp	x8, _vidsoft_vdp1_thread_enabled@GOTPAGE
Lloh6:
	ldr	x8, [x8, _vidsoft_vdp1_thread_enabled@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	bl	_VidsoftWaitForVdp1Thread
LBB0_4:
Lloh8:
	adrp	x8, _vdp1frontframebuffer@GOTPAGE
Lloh9:
	ldr	x8, [x8, _vdp1frontframebuffer@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh10:
	adrp	x10, _vdp1backframebuffer@GOTPAGE
Lloh11:
	ldr	x10, [x10, _vdp1backframebuffer@GOTPAGEOFF]
	ldr	x11, [x10]
	str	x11, [x8]
	str	x9, [x10]
	str	xzr, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_Vdp1Regs,8,3                   ; @Vdp1Regs
	.comm	_Vdp1External,8,3               ; @Vdp1External
	.comm	_vidsoft_vdp1_thread_enabled,8,3 ; @vidsoft_vdp1_thread_enabled
	.comm	_vdp1frontframebuffer,8,3       ; @vdp1frontframebuffer
	.comm	_vdp1backframebuffer,8,3        ; @vdp1backframebuffer
.subsections_via_symbols
