	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waitdaemon
_waitdaemon:                            ## @waitdaemon
	.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
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.10:
	xorl	%eax, %eax
	callq	_setsid
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.13:
	leaq	L_.str.4(%rip), %rdi
	callq	_chdir
	movq	__PATH_DEVNULL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_16
## %bb.14:
	movl	%eax, %ebx
	movq	_STDIN_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dup2
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_dup2
	movq	_STDERR_FILENO@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_dup2
	cmpl	(%r14), %ebx
	jle	LBB0_16
## %bb.15:
	movl	%ebx, %edi
	callq	_close
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_getppid                        ## TAILCALL
LBB0_11:
	movl	$-1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_SIGALRM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_timedout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movl	%r14d, %edi
	callq	_alarm
	leaq	-44(%rbp), %r14
	leaq	L_.str(%rip), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%ebx, %r13d
	je	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_wait3
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r13d
	movl	-44(%rbp), %edi
	callq	_WIFEXITED
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %edi
	callq	_WEXITSTATUS
	movl	$1, %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_errx
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %edi
	callq	_WIFSIGNALED
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %edi
	callq	_WTERMSIG
	movl	%eax, %r15d
	movl	-44(%rbp), %edi
	callq	_WCOREDUMP
	testl	%eax, %eax
	leaq	L_.str.2(%rip), %r8
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %r8
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_8
LBB0_9:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGALRM,4,2                    ## @SIGALRM
	.comm	_timedout,4,2                   ## @timedout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"child pid %d exited with return code %d"

L_.str.1:                               ## @.str.1
	.asciz	"child pid %d exited on signal %d%s"

L_.str.2:                               ## @.str.2
	.asciz	" (core dumped)"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"/"

	.comm	__PATH_DEVNULL,4,2              ## @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_STDIN_FILENO,4,2               ## @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.no_dead_strip	_waitdaemon
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waitdaemon
_waitdaemon:                            ; @waitdaemon
	.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, x0
	bl	_fork
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.1:
	cbnz	w19, LBB0_9
; %bb.2:
	bl	_setsid
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
Lloh0:
	adrp	x0, l_.str.4@PAGE
Lloh1:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_chdir
Lloh2:
	adrp	x8, __PATH_DEVNULL@GOTPAGE
Lloh3:
	ldr	x8, [x8, __PATH_DEVNULL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.4:
	mov	x19, x0
Lloh8:
	adrp	x8, _STDIN_FILENO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _STDIN_FILENO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_dup2
Lloh11:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dup2
Lloh14:
	adrp	x20, _STDERR_FILENO@GOTPAGE
Lloh15:
	ldr	x20, [x20, _STDERR_FILENO@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_dup2
	ldr	w8, [x20]
	cmp	w19, w8
	b.le	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_close
LBB0_6:
	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
	b	_getppid
LBB0_7:
	mov	w19, #-1
LBB0_8:
	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_9:
Lloh16:
	adrp	x8, _SIGALRM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SIGALRM@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _timedout@GOTPAGE
Lloh20:
	ldr	x8, [x8, _timedout@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	bl	_signal
	mov	x0, x20
	bl	_alarm
Lloh22:
	adrp	x24, l_.str.2@PAGE
Lloh23:
	add	x24, x24, l_.str.2@PAGEOFF
Lloh24:
	adrp	x25, l_.str.3@PAGE
Lloh25:
	add	x25, x25, l_.str.3@PAGEOFF
Lloh26:
	adrp	x20, l_.str.1@PAGE
Lloh27:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh28:
	adrp	x21, l_.str@PAGE
Lloh29:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	w22, w19
	b.eq	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	mov	w1, #0
	mov	x2, #0
	bl	_wait3
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x22, x0
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cbz	w0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	mov	x3, x0
	mov	w0, #1
	mov	x1, x21
	mov	x2, x22
	bl	_errx
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #12]
	bl	_WIFSIGNALED
	cbz	w0, LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [sp, #12]
	bl	_WTERMSIG
	mov	x23, x0
	ldr	w0, [sp, #12]
	bl	_WCOREDUMP
	cmp	w0, #0
	csel	x8, x25, x24, eq
	str	x8, [sp]
	mov	w0, #1
	mov	x1, x20
	mov	x2, x22
	mov	x3, x23
	bl	_errx
	b	LBB0_10
LBB0_16:
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGALRM,4,2                    ; @SIGALRM
	.comm	_timedout,4,2                   ; @timedout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"child pid %d exited with return code %d"

l_.str.1:                               ; @.str.1
	.asciz	"child pid %d exited on signal %d%s"

l_.str.2:                               ; @.str.2
	.asciz	" (core dumped)"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"/"

	.comm	__PATH_DEVNULL,4,2              ; @_PATH_DEVNULL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_STDIN_FILENO,4,2               ; @STDIN_FILENO
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.no_dead_strip	_waitdaemon
.subsections_via_symbols
