	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stop_pr                        ## -- Begin function stop_pr
	.p2align	4, 0x90
_stop_pr:                               ## @stop_pr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	cmpq	%rdi, (%rbx)
	je	LBB0_3
## %bb.2:
	callq	_close
	movq	(%rbx), %rdi
	movq	(%r14), %rsi
	callq	_dup2
	movq	(%rbx), %rdi
	callq	_close
LBB0_3:
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %r8d
	xorl	%r9d, %r9d
	callq	_kevent
	cmpl	$-1, %eax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_err
LBB0_5:
	movq	8(%rbx), %rdi
	movq	16(%rbx), %rax
	movl	(%rax), %r14d
	callq	_close
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r14d, %edi
	callq	_WEXITSTATUS
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_errx                           ## TAILCALL
LBB0_7:
	movl	%r14d, %edi
	callq	_WIFSIGNALED
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movl	%r14d, %edi
	callq	_WTERMSIG
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_errx                           ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,4,2                     ## @stdout
	.comm	_STDOUT_FILENO,8,3              ## @STDOUT_FILENO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kevent"

L_.str.1:                               ## @.str.1
	.asciz	"pr exited abnormally"

L_.str.2:                               ## @.str.2
	.asciz	"pr killed by signal %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stop_pr                        ; -- Begin function stop_pr
	.p2align	2
_stop_pr:                               ; @stop_pr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _stdout@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_fflush
	ldr	x8, [x19]
Lloh3:
	adrp	x20, _STDOUT_FILENO@GOTPAGE
Lloh4:
	ldr	x20, [x20, _STDOUT_FILENO@GOTPAGEOFF]
	ldr	x0, [x20]
	cmp	x8, x0
	b.eq	LBB0_3
; %bb.2:
	bl	_close
	ldr	x0, [x19]
	ldr	x1, [x20]
	bl	_dup2
	ldr	x0, [x19]
	bl	_close
LBB0_3:
	ldp	x0, x3, [x19, #8]
	mov	x1, #0
	mov	w2, #0
	mov	w4, #1
	mov	x5, #0
	bl	_kevent
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_5:
	ldp	x0, x8, [x19, #8]
	ldr	w20, [x8]
	bl	_close
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_WIFEXITED
	cbz	x0, LBB0_8
; %bb.6:
	mov	x0, x20
	bl	_WEXITSTATUS
	cbz	x0, LBB0_8
; %bb.7:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_errx
LBB0_8:
	mov	x0, x20
	bl	_WIFSIGNALED
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_WTERMSIG
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	bl	_errx
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,4,2                     ; @stdout
	.comm	_STDOUT_FILENO,8,3              ; @STDOUT_FILENO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kevent"

l_.str.1:                               ; @.str.1
	.asciz	"pr exited abnormally"

l_.str.2:                               ; @.str.2
	.asciz	"pr killed by signal %d"

.subsections_via_symbols
