	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_child_status
_check_child_status:                    ## @check_child_status
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_child_pid@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	testl	%edi, %edi
	je	LBB0_10
## %bb.1:
	movl	$0, -36(%rbp)
	movq	_WNOHANG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rsi
	callq	_waitpid
	movl	(%r12), %esi
	cmpl	%esi, %eax
	jne	LBB0_5
## %bb.2:
	movl	-36(%rbp), %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	-36(%rbp), %edi
	callq	_WIFSIGNALED
	testq	%rax, %rax
	je	LBB0_10
LBB0_4:
	movl	(%r12), %r14d
	movl	-36(%rbp), %edi
	callq	_WIFEXITED
	xorl	%r15d, %r15d
	testq	%rax, %rax
	setne	%r15b
	movl	-36(%rbp), %edi
	callq	_WIFSIGNALED
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
	movl	-36(%rbp), %edi
	callq	_WEXITSTATUS
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	callq	_vkprintf
	movl	$0, (%r12)
	jmp	LBB0_10
LBB0_5:
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
	movl	$0, (%r12)
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_kprintf
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_child_pid,4,2                  ## @child_pid
	.comm	_WNOHANG,4,2                    ## @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"child process %d terminated: exited = %d, signaled = %d, exit code = %d\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.1:                               ## @.str.1
	.asciz	"waitpid (%d): %m\n"

L_.str.2:                               ## @.str.2
	.asciz	"waitpid (%d) returned %d???\n"

	.no_dead_strip	_check_child_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_child_status
_check_child_status:                    ; @check_child_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x22, _child_pid@GOTPAGE
Lloh1:
	ldr	x22, [x22, _child_pid@GOTPAGEOFF]
	ldr	w0, [x22]
	cbz	w0, LBB0_10
; %bb.1:
	str	wzr, [sp, #12]
Lloh2:
	adrp	x8, _WNOHANG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WNOHANG@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_waitpid
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w1, [x22]
	cmp	w0, w1
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	w0, [sp, #12]
	bl	_WIFSIGNALED
	cbz	x0, LBB0_10
LBB0_4:
	ldr	w19, [x22]
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cmp	x0, #0
	cset	w20, ne
	ldr	w0, [sp, #12]
	bl	_WIFSIGNALED
	cmp	x0, #0
	cset	w21, ne
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	mov	x5, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x3, x20
	mov	x4, x21
	bl	_vkprintf
	str	wzr, [x22]
	b	LBB0_10
LBB0_5:
	cbz	w0, LBB0_10
; %bb.6:
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.7:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _EINTR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.8:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_kprintf
	str	wzr, [x22]
	b	LBB0_10
LBB0_9:
	str	x0, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_kprintf
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_child_pid,4,2                  ; @child_pid
	.comm	_WNOHANG,4,2                    ; @WNOHANG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"child process %d terminated: exited = %d, signaled = %d, exit code = %d\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.1:                               ; @.str.1
	.asciz	"waitpid (%d): %m\n"

l_.str.2:                               ; @.str.2
	.asciz	"waitpid (%d) returned %d???\n"

	.no_dead_strip	_check_child_status
.subsections_via_symbols
