	.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_gencmd_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_vc_vchi_gencmd_init
	.p2align	4, 0x90
_vc_vchi_gencmd_init:                   ## @vc_vchi_gencmd_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_gencmd_client@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	%r12d, 4(%rbx)
	leaq	20(%rbx), %rdi
	leaq	L_.str(%rip), %r12
	movq	%r12, %rsi
	callq	_vcos_mutex_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vcos_assert
	leaq	16(%rbx), %rdi
	movq	%r12, %rsi
	callq	_vcos_event_create
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_vcos_assert
	cmpl	$0, 4(%rbx)
	jle	LBB0_4
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_VC_GENCMD_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VCHI_VERSION
	movl	%eax, -96(%rbp)
	leaq	L_.str.1(%rip), %rdi
	callq	_MAKE_FOURCC
	movl	%eax, -92(%rbp)
	movl	(%r14,%r12,2), %eax
	movl	%eax, -88(%rbp)
	leaq	-80(%rbp), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movl	_gencmd_callback@GOTPCREL(%rip), %eax
	movl	%eax, -64(%rbp)
	leal	16(%rbx), %eax
	movl	%eax, -60(%rbp)
	movq	_VC_FALSE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movl	%eax, -48(%rbp)
	movl	%eax, -44(%rbp)
	movq	8(%rbx), %rdx
	addq	%r12, %rdx
	movl	%r15d, %edi
	leaq	-96(%rbp), %rsi
	callq	_vchi_service_open
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	incq	%r13
	movslq	4(%rbx), %rax
	addq	$4, %r12
	cmpq	%rax, %r13
	jl	LBB0_3
LBB0_4:
	movl	$1, (%rbx)
	xorl	%eax, %eax
	callq	_release_gencmd_service
LBB0_5:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gencmd_client,24,3             ## @gencmd_client
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HGencmd"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.comm	_VC_GENCMD_VER,4,2              ## @VC_GENCMD_VER
L_.str.1:                               ## @.str.1
	.asciz	"GCMD"

	.comm	_gencmd_callback,4,2            ## @gencmd_callback
	.comm	_VC_FALSE,4,2                   ## @VC_FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc_vchi_gencmd_init            ; -- Begin function vc_vchi_gencmd_init
	.p2align	2
_vc_vchi_gencmd_init:                   ; @vc_vchi_gencmd_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x19, _gencmd_client@GOTPAGE
Lloh1:
	ldr	x19, [x19, _gencmd_client@GOTPAGEOFF]
	ldr	w8, [x19]
	cbnz	w8, LBB0_5
; %bb.1:
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w22, [x19, #4]
	add	x0, x19, #20
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
	add	x0, x19, #16
	mov	x1, x22
	bl	_vcos_event_create
	ldr	x8, [x23]
	cmp	x0, x8
	cset	w0, eq
	bl	_vcos_assert
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
	mov	x24, #0
	add	x8, sp, #8
	add	x25, x8, #16
Lloh6:
	adrp	x26, _VC_GENCMD_VER@GOTPAGE
Lloh7:
	ldr	x26, [x26, _VC_GENCMD_VER@GOTPAGEOFF]
Lloh8:
	adrp	x27, _gencmd_callback@GOTPAGE
Lloh9:
	ldr	x27, [x27, _gencmd_callback@GOTPAGEOFF]
Lloh10:
	adrp	x28, _VC_FALSE@GOTPAGE
Lloh11:
	ldr	x28, [x28, _VC_FALSE@GOTPAGEOFF]
Lloh12:
	adrp	x22, l_.str.1@PAGE
Lloh13:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	bl	_VCHI_VERSION
	str	w0, [sp, #8]
	mov	x0, x22
	bl	_MAKE_FOURCC
	ldr	x8, [x20, x24, lsl #3]
	stp	w0, w8, [sp, #12]
	stp	xzr, xzr, [x25]
	add	w8, w19, #16
	stp	w27, w8, [sp, #40]
	ldrsw	x8, [x28]
	str	x8, [sp, #48]
	stp	w8, w8, [sp, #56]
	ldr	x8, [x19, #8]
	add	x2, x8, x23
	add	x1, sp, #8
	mov	x0, x21
	bl	_vchi_service_open
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	add	x24, x24, #1
	ldrsw	x8, [x19, #4]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_4:
	mov	w8, #1
	str	w8, [x19]
	bl	_release_gencmd_service
LBB0_5:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_gencmd_client,24,3             ; @gencmd_client
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HGencmd"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.comm	_VC_GENCMD_VER,4,2              ; @VC_GENCMD_VER
l_.str.1:                               ; @.str.1
	.asciz	"GCMD"

	.comm	_gencmd_callback,4,2            ; @gencmd_callback
	.comm	_VC_FALSE,4,2                   ; @VC_FALSE
.subsections_via_symbols
