	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function start_monitor
_start_monitor:                         ## @start_monitor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_quit_event@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_vcos_event_create
	movq	_VCOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	_SIGINT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_control_c@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_signal
	movq	_SIGTERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_signal
	movq	_tvservice_callback@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_vc_tv_register_callback
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERR
	movl	$-1, %ebx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_quit_event,4,2                 ## @quit_event
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tvservice"

	.comm	_VCOS_SUCCESS,8,3               ## @VCOS_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"Failed to create quit event"

	.comm	_SIGINT,4,2                     ## @SIGINT
	.comm	_control_c,4,2                  ## @control_c
	.comm	_SIGTERM,4,2                    ## @SIGTERM
	.comm	_tvservice_callback,4,2         ## @tvservice_callback
	.no_dead_strip	_start_monitor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function start_monitor
_start_monitor:                         ; @start_monitor
	.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
Lloh0:
	adrp	x0, _quit_event@GOTPAGE
Lloh1:
	ldr	x0, [x0, _quit_event@GOTPAGEOFF]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_vcos_event_create
Lloh4:
	adrp	x8, _VCOS_SUCCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VCOS_SUCCESS@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _SIGINT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIGINT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x19, _control_c@GOTPAGE
Lloh11:
	ldr	x19, [x19, _control_c@GOTPAGEOFF]
	ldr	w1, [x19]
	bl	_signal
Lloh12:
	adrp	x8, _SIGTERM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SIGTERM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19]
	bl	_signal
Lloh15:
	adrp	x0, _tvservice_callback@GOTPAGE
Lloh16:
	ldr	x0, [x0, _tvservice_callback@GOTPAGEOFF]
	mov	x1, #0
	bl	_vc_tv_register_callback
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERR
	mov	w0, #-1
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_quit_event,4,2                 ; @quit_event
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tvservice"

	.comm	_VCOS_SUCCESS,8,3               ; @VCOS_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"Failed to create quit event"

	.comm	_SIGINT,4,2                     ; @SIGINT
	.comm	_control_c,4,2                  ; @control_c
	.comm	_SIGTERM,4,2                    ; @SIGTERM
	.comm	_tvservice_callback,4,2         ; @tvservice_callback
	.no_dead_strip	_start_monitor
.subsections_via_symbols
