	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_wstatus                   ## -- Begin function proc_wstatus
	.p2align	4, 0x90
_proc_wstatus:                          ## @proc_wstatus
	.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
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	callq	_proc_getpid
	movq	_WUNTRACED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-20(%rbp), %rsi
	movl	%eax, %edi
	callq	_waitpid
	testq	%rax, %rax
	js	LBB0_2
## %bb.4:
	movl	-20(%rbp), %edi
	callq	_WIFSTOPPED
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_PS_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_6:
	movl	-20(%rbp), %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movl	-20(%rbp), %edi
	callq	_WIFSIGNALED
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	movq	_PS_UNDEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, (%rbx)
LBB0_10:
	movl	-20(%rbp), %eax
	movl	%eax, 4(%rbx)
	jmp	LBB0_11
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DPRINTF
LBB0_11:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	(%rbx), %r14d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_WUNTRACED,4,2                  ## @WUNTRACED
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waitpid"

	.comm	_PS_STOP,4,2                    ## @PS_STOP
	.comm	_PS_UNDEAD,4,2                  ## @PS_UNDEAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_wstatus                   ; -- Begin function proc_wstatus
	.p2align	2
_proc_wstatus:                          ; @proc_wstatus
	.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
	bl	_proc_getpid
Lloh0:
	adrp	x8, _WUNTRACED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WUNTRACED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_waitpid
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_WIFSTOPPED
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _PS_STOP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PS_STOP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_4:
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w0, [sp, #12]
	bl	_WIFSIGNALED
	cbz	x0, LBB0_12
LBB0_6:
Lloh6:
	adrp	x8, _PS_UNDEAD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PS_UNDEAD@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x19]
LBB0_7:
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_8:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _EINTR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DPRINTF
LBB0_10:
	mov	w0, #-1
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_12:
	ldr	w0, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_WUNTRACED,4,2                  ; @WUNTRACED
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waitpid"

	.comm	_PS_STOP,4,2                    ; @PS_STOP
	.comm	_PS_UNDEAD,4,2                  ; @PS_UNDEAD
.subsections_via_symbols
