	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function vc_vchi_dispmanx_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_vc_vchi_dispmanx_init
	.p2align	4, 0x90
_vc_vchi_dispmanx_init:                 ## @vc_vchi_dispmanx_init
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	_dispmanx_client@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jne	LBB0_4
## %bb.1:
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%rbx, 8(%r15)
	leaq	32(%r15), %rdi
	leaq	L_.str(%rip), %r14
	movq	%r14, %rsi
	callq	_vcos_mutex_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rbx
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movq	_dispmanx_message_available_event@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_vcos_event_create
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movq	_dispmanx_notify_available_event@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_vcos_event_create
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movl	$1, (%r15)
	cmpq	$0, 8(%r15)
	je	LBB0_4
## %bb.2:
	xorl	%r14d, %r14d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_VC_DISPMANX_VERSION@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_VCHI_VERSION
	movl	%eax, -176(%rbp)
	movq	_DISPMANX_CLIENT_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -172(%rbp)
	movl	(%r13,%r14,8), %eax
	movl	%eax, -168(%rbp)
	leaq	-160(%rbp), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	_dispmanx_client_callback@GOTPCREL(%rip), %eax
	movl	%eax, -144(%rbp)
	movl	_dispmanx_message_available_event@GOTPCREL(%rip), %eax
	movl	%eax, -140(%rbp)
	movq	_VC_FALSE@GOTPCREL(%rip), %r12
	movslq	(%r12), %rax
	movq	%rax, -136(%rbp)
	movl	%eax, -128(%rbp)
	movl	%eax, -124(%rbp)
	movl	(%rbx), %edi
	callq	_VCHI_VERSION
	movl	%eax, -120(%rbp)
	movq	_DISPMANX_NOTIFY_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -116(%rbp)
	movl	(%r13,%r14,8), %eax
	movl	%eax, -112(%rbp)
	leaq	-104(%rbp), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	_dispmanx_notify_callback@GOTPCREL(%rip), %eax
	movl	%eax, -88(%rbp)
	movl	_dispmanx_notify_available_event@GOTPCREL(%rip), %eax
	movl	%eax, -84(%rbp)
	movslq	(%r12), %rax
	movq	%rax, -80(%rbp)
	movl	%eax, -72(%rbp)
	movl	%eax, -68(%rbp)
	leaq	(,%r14,4), %r13
	movq	24(%r15), %rdx
	addq	%r13, %rdx
	movq	%r15, %r12
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	leaq	-176(%rbp), %rsi
	callq	_vchi_service_open
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_vcos_assert
	addq	16(%r12), %r13
	movl	%r15d, %edi
	movq	%r12, %r15
	leaq	-120(%rbp), %rsi
	movq	%r13, %rdx
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	callq	_vchi_service_open
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_vcos_assert
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_vcos_thread_attr_init
	movq	%rbx, %rdi
	movl	$2048, %esi                     ## imm = 0x800
	callq	_vcos_thread_attr_setstacksize
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_vcos_thread_attr_settimeslice
	movq	_dispmanx_notify_func@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_dispmanx_notify_task@GOTPCREL(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	callq	_vcos_thread_create
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	sete	%dil
	callq	_vcos_assert
	movq	24(%r15), %rax
	movl	(%rax,%r14,4), %edi
	callq	_vchi_service_release
	movq	16(%r15), %rax
	movl	(%rax,%r14,4), %edi
	callq	_vchi_service_release
	incq	%r14
	cmpq	8(%r15), %r14
	jb	LBB0_3
LBB0_4:
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dispmanx_client,40,3           ## @dispmanx_client
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDispmanx"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_dispmanx_message_available_event,4,2 ## @dispmanx_message_available_event
	.comm	_dispmanx_notify_available_event,4,2 ## @dispmanx_notify_available_event
	.comm	_VC_DISPMANX_VERSION,4,2        ## @VC_DISPMANX_VERSION
	.comm	_DISPMANX_CLIENT_NAME,4,2       ## @DISPMANX_CLIENT_NAME
	.comm	_dispmanx_client_callback,4,2   ## @dispmanx_client_callback
	.comm	_VC_FALSE,4,2                   ## @VC_FALSE
	.comm	_DISPMANX_NOTIFY_NAME,4,2       ## @DISPMANX_NOTIFY_NAME
	.comm	_dispmanx_notify_callback,4,2   ## @dispmanx_notify_callback
	.comm	_dispmanx_notify_task,4,2       ## @dispmanx_notify_task
L_.str.1:                               ## @.str.1
	.asciz	"HDispmanx Notify"

	.comm	_dispmanx_notify_func,4,2       ## @dispmanx_notify_func
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_vchi_dispmanx_init          ; -- Begin function vc_vchi_dispmanx_init
	.p2align	2
_vc_vchi_dispmanx_init:                 ; @vc_vchi_dispmanx_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x21, _dispmanx_client@GOTPAGE
Lloh1:
	ldr	x21, [x21, _dispmanx_client@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_4
; %bb.1:
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x21
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	x22, [x21, #8]
	add	x0, x21, #32
Lloh2:
	adrp	x22, l_.str@PAGE
Lloh3:
	add	x22, x22, l_.str@PAGEOFF
	mov	x1, x22
	bl	_vcos_mutex_create
Lloh4:
	adrp	x23, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x23, [x23, _VCOS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
Lloh6:
	adrp	x0, _dispmanx_message_available_event@GOTPAGE
Lloh7:
	ldr	x0, [x0, _dispmanx_message_available_event@GOTPAGEOFF]
	mov	x1, x22
	bl	_vcos_event_create
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
Lloh8:
	adrp	x0, _dispmanx_notify_available_event@GOTPAGE
Lloh9:
	ldr	x0, [x0, _dispmanx_notify_available_event@GOTPAGEOFF]
	mov	x1, x22
	bl	_vcos_event_create
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	mov	w8, #1
	str	w8, [x21]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x25, #0
	mov	x26, #0
	add	x8, sp, #64
	add	x27, x8, #16
	add	x8, sp, #8
	add	x28, x8, #16
Lloh10:
	adrp	x24, _VC_DISPMANX_VERSION@GOTPAGE
Lloh11:
	ldr	x24, [x24, _VC_DISPMANX_VERSION@GOTPAGEOFF]
Lloh12:
	adrp	x22, _VC_FALSE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _VC_FALSE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_VCHI_VERSION
Lloh14:
	adrp	x8, _DISPMANX_CLIENT_NAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DISPMANX_CLIENT_NAME@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	w0, w8, [sp, #64]
	lsl	x23, x26, #3
	ldr	x8, [x19, x23]
	stp	xzr, xzr, [x27]
	str	w8, [sp, #72]
Lloh17:
	adrp	x8, _dispmanx_client_callback@GOTPAGE
Lloh18:
	ldr	x8, [x8, _dispmanx_client_callback@GOTPAGEOFF]
	str	w8, [sp, #96]
Lloh19:
	adrp	x8, _dispmanx_message_available_event@GOTPAGE
Lloh20:
	ldr	x8, [x8, _dispmanx_message_available_event@GOTPAGEOFF]
	str	w8, [sp, #100]
	ldrsw	x8, [x22]
	str	x8, [sp, #104]
	stp	w8, w8, [sp, #112]
	ldr	w0, [x24]
	bl	_VCHI_VERSION
Lloh21:
	adrp	x8, _DISPMANX_NOTIFY_NAME@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DISPMANX_NOTIFY_NAME@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	ldr	x9, [x19, x23]
	stp	w0, w8, [sp, #8]
	stp	xzr, xzr, [x28]
	str	w9, [sp, #16]
Lloh24:
	adrp	x8, _dispmanx_notify_callback@GOTPAGE
Lloh25:
	ldr	x8, [x8, _dispmanx_notify_callback@GOTPAGEOFF]
	str	w8, [sp, #40]
Lloh26:
	adrp	x8, _dispmanx_notify_available_event@GOTPAGE
Lloh27:
	ldr	x8, [x8, _dispmanx_notify_available_event@GOTPAGEOFF]
	str	w8, [sp, #44]
	ldrsw	x8, [x22]
	str	x8, [sp, #48]
	ldr	x9, [x21, #24]
	add	x2, x9, x25
	stp	w8, w8, [sp, #56]
	add	x1, sp, #64
	mov	x0, x20
	bl	_vchi_service_open
	cmp	x0, #0
	cset	w0, eq
	bl	_vcos_assert
	ldr	x8, [x21, #16]
	add	x2, x8, x25
	add	x1, sp, #8
	mov	x0, x20
	bl	_vchi_service_open
	cmp	x0, #0
	cset	w0, eq
	bl	_vcos_assert
	sub	x0, x29, #84
	bl	_vcos_thread_attr_init
	sub	x0, x29, #84
	mov	w1, #2048
	bl	_vcos_thread_attr_setstacksize
	sub	x0, x29, #84
	mov	w1, #1
	bl	_vcos_thread_attr_settimeslice
Lloh28:
	adrp	x8, _dispmanx_notify_func@GOTPAGE
Lloh29:
	ldr	x8, [x8, _dispmanx_notify_func@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	sub	x2, x29, #84
Lloh31:
	adrp	x0, _dispmanx_notify_task@GOTPAGE
Lloh32:
	ldr	x0, [x0, _dispmanx_notify_task@GOTPAGEOFF]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x4, #0
	bl	_vcos_thread_create
Lloh35:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	ldr	x8, [x21, #24]
	lsl	x23, x26, #2
	ldr	w0, [x8, x23]
	bl	_vchi_service_release
	ldr	x8, [x21, #16]
	ldr	w0, [x8, x23]
	bl	_vchi_service_release
	add	x26, x26, #1
	ldr	x8, [x21, #8]
	add	x25, x25, #4
	cmp	x26, x8
	b.lo	LBB0_3
LBB0_4:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_dispmanx_client,40,3           ; @dispmanx_client
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDispmanx"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_dispmanx_message_available_event,4,2 ; @dispmanx_message_available_event
	.comm	_dispmanx_notify_available_event,4,2 ; @dispmanx_notify_available_event
	.comm	_VC_DISPMANX_VERSION,4,2        ; @VC_DISPMANX_VERSION
	.comm	_DISPMANX_CLIENT_NAME,4,2       ; @DISPMANX_CLIENT_NAME
	.comm	_dispmanx_client_callback,4,2   ; @dispmanx_client_callback
	.comm	_VC_FALSE,4,2                   ; @VC_FALSE
	.comm	_DISPMANX_NOTIFY_NAME,4,2       ; @DISPMANX_NOTIFY_NAME
	.comm	_dispmanx_notify_callback,4,2   ; @dispmanx_notify_callback
	.comm	_dispmanx_notify_task,4,2       ; @dispmanx_notify_task
l_.str.1:                               ; @.str.1
	.asciz	"HDispmanx Notify"

	.comm	_dispmanx_notify_func,4,2       ; @dispmanx_notify_func
.subsections_via_symbols
