	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function watchdog_loop
_watchdog_loop:                         ## @watchdog_loop
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_end_program@GOTPCREL(%rip), %r15
	cmpl	$2, (%r15)
	je	LBB0_16
## %bb.1:
	leaq	-64(%rbp), %rbx
	leaq	-56(%rbp), %r12
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_watchdog_getuptime
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_test_cmd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_system
	jmp	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	-48(%rbp), %rsi
	callq	_stat
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_watchdog_getuptime
	testl	%eax, %eax
	je	LBB0_7
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, (%r15)
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	callq	_watchdog_onoff
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_warnx
	movl	$0, (%r15)
	jmp	LBB0_2
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_WD_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_timeout@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_watchdog_patpat
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_watchdog_check_dogfunction_time
	movq	_nap@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	subq	%rax, %rdi
	jle	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	callq	_sleep
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$0, (%r15)
	jne	LBB0_13
	jmp	LBB0_2
LBB0_15:
	movl	$2, (%r15)
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_end_program,4,2                ## @end_program
	.comm	_test_cmd,8,3                   ## @test_cmd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/etc"

	.comm	_timeout,4,2                    ## @timeout
	.comm	_WD_ACTIVE,4,2                  ## @WD_ACTIVE
	.comm	_nap,8,3                        ## @nap
L_.str.1:                               ## @.str.1
	.asciz	"Could not stop the watchdog, not exiting"

	.no_dead_strip	_watchdog_loop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function watchdog_loop
_watchdog_loop:                         ; @watchdog_loop
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, _end_program@GOTPAGE
Lloh1:
	ldr	x22, [x22, _end_program@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #2
	b.eq	LBB0_16
; %bb.1:
Lloh2:
	adrp	x23, _test_cmd@GOTPAGE
Lloh3:
	ldr	x23, [x23, _test_cmd@GOTPAGEOFF]
Lloh4:
	adrp	x19, l_.str@PAGE
Lloh5:
	add	x19, x19, l_.str@PAGEOFF
Lloh6:
	adrp	x24, _timeout@GOTPAGE
Lloh7:
	ldr	x24, [x24, _timeout@GOTPAGEOFF]
Lloh8:
	adrp	x25, _WD_ACTIVE@GOTPAGE
Lloh9:
	ldr	x25, [x25, _WD_ACTIVE@GOTPAGEOFF]
	mov	w26, #1
Lloh10:
	adrp	x27, _nap@GOTPAGE
Lloh11:
	ldr	x27, [x27, _nap@GOTPAGEOFF]
Lloh12:
	adrp	x20, l_.str.1@PAGE
Lloh13:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #24
	bl	_watchdog_getuptime
	cbnz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x23]
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_system
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_stat
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	add	x0, sp, #16
	bl	_watchdog_getuptime
	cbz	w0, LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	str	w26, [x22]
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #0
	bl	_watchdog_onoff
	cbz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_warnx
	str	wzr, [x22]
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w21, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w0, w9, w8
	bl	_watchdog_patpat
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_watchdog_check_dogfunction_time
	ldr	x8, [x27]
	sub	x0, x8, x0
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	bl	_sleep
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x22]
	cbnz	w8, LBB0_8
	b	LBB0_2
LBB0_15:
	mov	w8, #2
	str	w8, [x22]
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_end_program,4,2                ; @end_program
	.comm	_test_cmd,8,3                   ; @test_cmd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/etc"

	.comm	_timeout,4,2                    ; @timeout
	.comm	_WD_ACTIVE,4,2                  ; @WD_ACTIVE
	.comm	_nap,8,3                        ; @nap
l_.str.1:                               ; @.str.1
	.asciz	"Could not stop the watchdog, not exiting"

	.no_dead_strip	_watchdog_loop
.subsections_via_symbols
