	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispmanx_surface_update
_dispmanx_surface_update:               ## @dispmanx_surface_update
	.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	%rdx, %r14
	movq	%rsi, %rcx
	movq	%rdi, %rbx
	movq	(%rdx), %rax
	movl	(%rax), %edi
	movl	20(%rdx), %esi
	movl	16(%rdx), %edx
	leaq	12(%r14), %r8
	callq	_vc_dispmanx_resource_write_data
	movl	12(%rbx), %edi
	callq	_slock_lock
	cmpq	$0, (%rbx)
	jle	LBB0_2
## %bb.1:
	movl	12(%rbx), %esi
	movl	16(%rbx), %edi
	callq	_scond_wait
LBB0_2:
	movl	12(%rbx), %edi
	callq	_slock_unlock
	xorl	%edi, %edi
	callq	_vc_dispmanx_update_start
	movl	%eax, 8(%rbx)
	movl	8(%r14), %esi
	movq	(%r14), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	callq	_vc_dispmanx_element_change_source
	movl	12(%rbx), %edi
	callq	_slock_lock
	incq	(%rbx)
	movl	12(%rbx), %edi
	callq	_slock_unlock
	movl	8(%rbx), %edi
	movq	_dispmanx_vsync_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rdx
	callq	_vc_dispmanx_update_submit
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dispmanx_get_free_page
	movq	%rax, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dispmanx_vsync_callback,4,2    ## @dispmanx_vsync_callback
	.no_dead_strip	_dispmanx_surface_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispmanx_surface_update
_dispmanx_surface_update:               ; @dispmanx_surface_update
	.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, x2
	mov	x3, x1
	mov	x20, x0
	ldr	x8, [x2]
	ldr	w0, [x8]
	ldp	w2, w1, [x2, #16]
	add	x4, x19, #12
	bl	_vc_dispmanx_resource_write_data
	ldr	w0, [x20, #12]
	bl	_slock_lock
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	ldp	w1, w0, [x20, #12]
	bl	_scond_wait
LBB0_2:
	ldr	w0, [x20, #12]
	bl	_slock_unlock
	mov	w0, #0
	bl	_vc_dispmanx_update_start
	str	w0, [x20, #8]
	ldr	w1, [x19, #8]
	ldr	x8, [x19]
	ldr	w2, [x8]
	bl	_vc_dispmanx_element_change_source
	ldr	w0, [x20, #12]
	bl	_slock_lock
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	ldr	w0, [x20, #12]
	bl	_slock_unlock
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _dispmanx_vsync_callback@GOTPAGE
Lloh1:
	ldr	x8, [x8, _dispmanx_vsync_callback@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x19]
	bl	_vc_dispmanx_update_submit
	mov	x0, x20
	mov	x1, x19
	bl	_dispmanx_get_free_page
	str	x0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_dispmanx_vsync_callback,4,2    ; @dispmanx_vsync_callback
	.no_dead_strip	_dispmanx_surface_update
.subsections_via_symbols
