	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reap_child                     ## -- Begin function reap_child
	.p2align	4, 0x90
_reap_child:                            ## @reap_child
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_user_opts@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpl	$2, (%rax)
	jl	LBB0_10
## %bb.1:
	movq	_parallel_jobs@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	je	LBB0_10
## %bb.2:
	xorl	%ebx, %ebx
	movl	$0, %edx
	testl	%edi, %edi
	jne	LBB0_4
## %bb.3:
	movq	_WNOHANG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_4:
	leaq	-20(%rbp), %rsi
	movl	$-1, %edi
	callq	_waitpid
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	cmpq	$-1, %rax
	jne	LBB0_7
## %bb.6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pg_fatal
LBB0_7:
	movl	-20(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_pg_fatal
LBB0_9:
	decl	(%r14)
	movl	$1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_user_opts,4,2                  ## @user_opts
	.comm	_parallel_jobs,4,2              ## @parallel_jobs
	.comm	_WNOHANG,4,2                    ## @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waitpid() failed: %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"child process exited abnormally: status %d\n"

	.comm	_INFINITE,4,2                   ## @INFINITE
	.comm	_WAIT_FAILED,4,2                ## @WAIT_FAILED
	.comm	_WAIT_OBJECT_0,8,3              ## @WAIT_OBJECT_0
	.comm	_WAIT_TIMEOUT,4,2               ## @WAIT_TIMEOUT
	.comm	_cur_thread_args,8,3            ## @cur_thread_args
	.comm	_thread_handles,8,3             ## @thread_handles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_reap_child                     ; -- Begin function reap_child
	.p2align	2
_reap_child:                            ; @reap_child
	.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
Lloh0:
	adrp	x8, _user_opts@GOTPAGE
Lloh1:
	ldr	x8, [x8, _user_opts@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x19, _parallel_jobs@GOTPAGE
Lloh4:
	ldr	x19, [x19, _parallel_jobs@GOTPAGEOFF]
	ldr	w9, [x19]
	cmp	w8, #2
	ccmp	w9, #0, #4, ge
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_8
LBB0_2:
Lloh5:
	adrp	x8, _WNOHANG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WNOHANG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w2, w8, wzr, eq
	add	x1, sp, #12
	mov	w0, #-1
	bl	_waitpid
	cbz	x0, LBB0_8
; %bb.3:
	cmn	x0, #1
	b.ne	LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pg_fatal
LBB0_5:
	ldr	w1, [sp, #12]
	cbz	w1, LBB0_7
; %bb.6:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pg_fatal
LBB0_7:
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	mov	w0, #1
LBB0_8:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_user_opts,4,2                  ; @user_opts
	.comm	_parallel_jobs,4,2              ; @parallel_jobs
	.comm	_WNOHANG,4,2                    ; @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waitpid() failed: %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"child process exited abnormally: status %d\n"

	.comm	_INFINITE,4,2                   ; @INFINITE
	.comm	_WAIT_FAILED,4,2                ; @WAIT_FAILED
	.comm	_WAIT_OBJECT_0,8,3              ; @WAIT_OBJECT_0
	.comm	_WAIT_TIMEOUT,4,2               ; @WAIT_TIMEOUT
	.comm	_cur_thread_args,8,3            ; @cur_thread_args
	.comm	_thread_handles,8,3             ; @thread_handles
.subsections_via_symbols
