	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cecservice_wait_for_reply
_cecservice_wait_for_reply:             ## @cecservice_wait_for_reply
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %r12
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_cecservice_client@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movq	_VCHI_FLAGS_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	movq	%r14, %rdx
	movq	%r12, %rcx
	callq	_vchi_msg_dequeue
	movl	%eax, %edi
	callq	_vchi2service_status
	movq	%rax, %rbx
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_cecservice_message_available_event@GOTPCREL(%rip), %rdi
	callq	_vcos_event_wait
	cmpq	(%r13), %rax
	je	LBB0_1
## %bb.3:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_vc_cec_log_info
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_vchi2service_status_string
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_vc_cec_log_warn
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_cecservice_client,8,3          ## @cecservice_client
	.comm	_VCHI_FLAGS_NONE,4,2            ## @VCHI_FLAGS_NONE
	.comm	_cecservice_message_available_event,4,2 ## @cecservice_message_available_event
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CEC service got reply %d bytes"

L_.str.1:                               ## @.str.1
	.asciz	"CEC service wait for reply failed, error: %s"

	.no_dead_strip	_cecservice_wait_for_reply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cecservice_wait_for_reply
_cecservice_wait_for_reply:             ; @cecservice_wait_for_reply
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x21, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x23, _cecservice_client@GOTPAGE
Lloh1:
	ldr	x23, [x23, _cecservice_client@GOTPAGEOFF]
Lloh2:
	adrp	x24, _VCHI_FLAGS_NONE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _VCHI_FLAGS_NONE@GOTPAGEOFF]
Lloh4:
	adrp	x22, _cecservice_message_available_event@GOTPAGE
Lloh5:
	ldr	x22, [x22, _cecservice_message_available_event@GOTPAGEOFF]
Lloh6:
	adrp	x25, _VCOS_SUCCESS@GOTPAGE
Lloh7:
	ldr	x25, [x25, _VCOS_SUCCESS@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	w0, [x8]
	ldr	w4, [x24]
	add	x3, sp, #8
	mov	x1, x21
	mov	x2, x20
	bl	_vchi_msg_dequeue
	bl	_vchi2service_status
	mov	x19, x0
	ldr	x1, [sp, #8]
	cbnz	x1, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x22
	bl	_vcos_event_wait
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_1
; %bb.3:
	ldr	x1, [sp, #8]
	cbz	x1, LBB0_6
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vc_cec_log_info
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	mov	x0, x19
	bl	_vchi2service_status_string
	mov	x1, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vc_cec_log_warn
	b	LBB0_5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_cecservice_client,8,3          ; @cecservice_client
	.comm	_VCHI_FLAGS_NONE,4,2            ; @VCHI_FLAGS_NONE
	.comm	_cecservice_message_available_event,4,2 ; @cecservice_message_available_event
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CEC service got reply %d bytes"

l_.str.1:                               ; @.str.1
	.asciz	"CEC service wait for reply failed, error: %s"

	.no_dead_strip	_cecservice_wait_for_reply
.subsections_via_symbols
