	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	-32(%rbp), %rdi
	xorl	%esi, %esi
	callq	_pdfork
	movl	%eax, %ebx
	movl	%eax, -28(%rbp)
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	je	LBB0_9
## %bb.2:
	movq	_stderr@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%ebx, %edx
	movl	-32(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$2, %edi
	callq	_sleep
	movq	_WNOHANG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rsi
	movl	$-1, %edi
	callq	_waitpid
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %ebx
	js	LBB0_5
## %bb.6:
	leaq	L_.str.4(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_7
LBB0_3:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_7
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movl	%r14d, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_9:
	movl	$1, %edi
	callq	_sleep
	movl	$123, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pdfork() failed rc=%d errno=%d %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"pdfork()ed child pid=%ld procfd=%d\n"

	.comm	_WNOHANG,4,2                    ## @WNOHANG
L_.str.2:                               ## @.str.2
	.asciz	"waitpid(): no completed child found\n"

L_.str.3:                               ## @.str.3
	.asciz	"waitpid(): failed errno=%d %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"waitpid(): found completed child %ld\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x0, sp, #28
	mov	w1, #0
	bl	_pdfork
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [sp, #24]
	tbnz	w0, #31, LBB0_9
; %bb.1:
	cbz	w0, LBB0_10
; %bb.2:
Lloh0:
	adrp	x19, _stderr@GOTPAGE
Lloh1:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w8, [x19]
	mov	w9, w0
	ldr	w10, [sp, #28]
	stp	x9, x10, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_fprintf
	mov	w0, #2
	bl	_sleep
Lloh4:
	adrp	x8, _WNOHANG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WNOHANG@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	add	x1, sp, #24
	mov	w0, #-1
	bl	_waitpid
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w19, [x19]
	tbnz	x0, #63, LBB0_6
; %bb.4:
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str.4@PAGE
Lloh8:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_5:
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _errno@GOTPAGE
Lloh12:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_7:
	mov	x0, x19
LBB0_8:
	bl	_fprintf
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w19, [x8]
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w20, [x8]
	mov	x21, x0
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp, #8]
	str	x21, [sp]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_10:
	mov	w0, #1
	bl	_sleep
	mov	w0, #123
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pdfork() failed rc=%d errno=%d %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"pdfork()ed child pid=%ld procfd=%d\n"

	.comm	_WNOHANG,4,2                    ; @WNOHANG
l_.str.2:                               ; @.str.2
	.asciz	"waitpid(): no completed child found\n"

l_.str.3:                               ; @.str.3
	.asciz	"waitpid(): failed errno=%d %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"waitpid(): found completed child %ld\n"

.subsections_via_symbols
