	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_for_process
_wait_for_process:                      ## @wait_for_process
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	_WUNTRACED@GOTPCREL(%rip), %rax
	movq	_WEXITED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-4(%rbp), %rsi
	callq	_waitpid
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.1:
	movl	-4(%rbp), %edi
	callq	_WIFEXITED
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	-4(%rbp), %edi
	callq	_WEXITSTATUS
	jmp	LBB0_5
LBB0_3:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_pjdlog_errno
LBB0_4:
	movl	$1, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WUNTRACED,4,2                  ## @WUNTRACED
	.comm	_WEXITED,4,2                    ## @WEXITED
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to wait for a child process"

	.no_dead_strip	_wait_for_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_for_process
_wait_for_process:                      ; @wait_for_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _WUNTRACED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WUNTRACED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _WEXITED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WEXITED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
	sub	x1, x29, #4
	bl	_waitpid
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	ldur	w0, [x29, #-4]
	bl	_WIFEXITED
	cbz	x0, LBB0_4
; %bb.2:
	ldur	w0, [x29, #-4]
	bl	_WEXITSTATUS
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_pjdlog_errno
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WUNTRACED,4,2                  ; @WUNTRACED
	.comm	_WEXITED,4,2                    ; @WEXITED
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to wait for a child process"

	.no_dead_strip	_wait_for_process
.subsections_via_symbols
