	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvservice_wait_for_reply
_tvservice_wait_for_reply:              ## @tvservice_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)
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_vcos_log_trace
	leaq	-48(%rbp), %r12
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_tvservice_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, %ebx
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_tvservice_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.1(%rip), %rdi
	callq	_vcos_log_trace
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	callq	_vcos_log_warn
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%s]"

	.comm	_VCOS_FUNCTION,8,3              ## @VCOS_FUNCTION
	.comm	_tvservice_client,8,3           ## @tvservice_client
	.comm	_VCHI_FLAGS_NONE,4,2            ## @VCHI_FLAGS_NONE
	.comm	_tvservice_message_available_event,4,2 ## @tvservice_message_available_event
	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"TV service got reply %d bytes"

L_.str.2:                               ## @.str.2
	.asciz	"TV service wait for reply failed"

	.no_dead_strip	_tvservice_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 tvservice_wait_for_reply
_tvservice_wait_for_reply:              ; @tvservice_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	x19, x1
	mov	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vcos_log_trace
Lloh5:
	adrp	x23, _tvservice_client@GOTPAGE
Lloh6:
	ldr	x23, [x23, _tvservice_client@GOTPAGEOFF]
Lloh7:
	adrp	x24, _VCHI_FLAGS_NONE@GOTPAGE
Lloh8:
	ldr	x24, [x24, _VCHI_FLAGS_NONE@GOTPAGEOFF]
Lloh9:
	adrp	x22, _tvservice_message_available_event@GOTPAGE
Lloh10:
	ldr	x22, [x22, _tvservice_message_available_event@GOTPAGEOFF]
Lloh11:
	adrp	x25, _VCOS_SUCCESS@GOTPAGE
Lloh12:
	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, x20
	mov	x2, x19
	bl	_vchi_msg_dequeue
	mov	x21, 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:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vcos_log_trace
LBB0_5:
	mov	x0, x21
	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:
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vcos_log_warn
	b	LBB0_5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%s]"

	.comm	_VCOS_FUNCTION,8,3              ; @VCOS_FUNCTION
	.comm	_tvservice_client,8,3           ; @tvservice_client
	.comm	_VCHI_FLAGS_NONE,4,2            ; @VCHI_FLAGS_NONE
	.comm	_tvservice_message_available_event,4,2 ; @tvservice_message_available_event
	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"TV service got reply %d bytes"

l_.str.2:                               ; @.str.2
	.asciz	"TV service wait for reply failed"

	.no_dead_strip	_tvservice_wait_for_reply
.subsections_via_symbols
