	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waitchildren
_waitchildren:                          ## @waitchildren
	.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
	movl	%esi, %r12d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	-44(%rbp), %rbx
	movq	_childerr@GOTPCREL(%rip), %r13
	movq	_rval@GOTPCREL(%rip), %r14
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movb	$1, %al
	testl	%r12d, %r12d
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_pids_full
	testq	%rax, %rax
	setne	%al
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movzbl	%al, %edi
	movq	%rbx, %rsi
	callq	_xwait
	testl	%eax, %eax
	jle	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%r15d, %r15d
	je	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi
	callq	_WIFSIGNALED
	movl	-44(%rbp), %edi
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_1 Depth=1
	callq	_WEXITSTATUS
	cmpl	$255, %eax
	je	LBB0_10
## %bb.12:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %edi
	callq	_WEXITSTATUS
	testl	%eax, %eax
	je	LBB0_1
## %bb.13:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, (%r14)
	jmp	LBB0_1
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	$1, (%rcx)
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$127, %r15d
	sbbl	$0, %r15d
	leaq	L_.str(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_warn
	movl	$1, %r12d
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	callq	_WTERMSIG
	leaq	L_.str.1(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_warnx
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r12d
	movl	$1, %r15d
	jmp	LBB0_1
LBB0_14:
	testl	%r15d, %r15d
	jne	LBB0_19
## %bb.15:
	cmpl	$-1, %eax
	jne	LBB0_18
## %bb.16:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ECHILD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	%r15d, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_childerr,8,3                   ## @childerr
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"%s: terminated with signal %d; aborting"

L_.str.2:                               ## @.str.2
	.asciz	"%s: exited with status 255; aborting"

	.comm	_rval,4,2                       ## @rval
	.comm	_ECHILD,8,3                     ## @ECHILD
L_.str.3:                               ## @.str.3
	.asciz	"waitpid"

	.no_dead_strip	_waitchildren
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waitchildren
_waitchildren:                          ; @waitchildren
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x24, x1
	mov	x19, x0
	mov	w23, #0
Lloh0:
	adrp	x26, _childerr@GOTPAGE
Lloh1:
	ldr	x26, [x26, _childerr@GOTPAGEOFF]
Lloh2:
	adrp	x27, _rval@GOTPAGE
Lloh3:
	ldr	x27, [x27, _rval@GOTPAGEOFF]
Lloh4:
	adrp	x25, _errno@GOTPAGE
Lloh5:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	mov	w28, #1
Lloh6:
	adrp	x20, _ENOENT@GOTPAGE
Lloh7:
	ldr	x20, [x20, _ENOENT@GOTPAGEOFF]
	mov	w21, #126
Lloh8:
	adrp	x22, l_.str@PAGE
Lloh9:
	add	x22, x22, l_.str@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w24, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	bl	_pids_full
	cmp	x0, #0
	cset	w0, ne
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	add	x1, sp, #12
	bl	_xwait
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x26]
	cmp	x8, #0
	ccmp	w23, #0, #0, ne
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [sp, #12]
	bl	_WIFSIGNALED
	mov	x8, x0
	ldr	w0, [sp, #12]
	cbnz	x8, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_WEXITSTATUS
	cmp	w0, #255
	b.eq	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	cbz	w0, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w28, [x27]
	b	LBB0_1
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	str	x8, [x25]
	ldr	x8, [x20]
	cmp	x8, #0
	cinc	w23, w21, ne
	mov	x0, x22
	mov	x1, x19
	bl	_warn
	mov	w24, #1
	b	LBB0_1
LBB0_11:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_WTERMSIG
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_1 Depth=1
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_13:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x1, x19
	bl	_warnx
	mov	w24, #1
	mov	w23, #1
	b	LBB0_1
LBB0_14:
	cbnz	w23, LBB0_19
; %bb.15:
	cmn	w0, #1
	b.ne	LBB0_18
; %bb.16:
	ldr	x8, [x25]
Lloh14:
	adrp	x9, _ECHILD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ECHILD@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
; %bb.17:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	mov	x0, x23
	bl	_exit
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_childerr,8,3                   ; @childerr
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"%s: terminated with signal %d; aborting"

l_.str.2:                               ; @.str.2
	.asciz	"%s: exited with status 255; aborting"

	.comm	_rval,4,2                       ; @rval
	.comm	_ECHILD,8,3                     ; @ECHILD
l_.str.3:                               ; @.str.3
	.asciz	"waitpid"

	.no_dead_strip	_waitchildren
.subsections_via_symbols
