	.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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$666, -20(%rbp)                 ## imm = 0x29A
	leaq	-20(%rbp), %rdi
	callq	_cap_getmode
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$666, -20(%rbp)                 ## imm = 0x29A
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, -20(%rbp)
	sete	%dil
	callq	_CHECK
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	$0, (%rbx)
	xorl	%edi, %edi
	callq	_cap_getmode
	xorl	%edi, %edi
	cmpq	$-1, %rax
	sete	%dil
	callq	_CHECK
	movq	(%rbx), %rax
	movq	_EFAULT@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_CHECK
	movq	$0, (%rbx)
	movl	$3735929054, %edi               ## imm = 0xDEADC0DE
	callq	_cap_getmode
	xorl	%edi, %edi
	cmpq	$-1, %rax
	sete	%dil
	callq	_CHECK
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_CHECK
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_6:
	movl	%eax, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_waitpid
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	callq	_pdfork
	testl	%eax, %eax
	je	LBB0_4
## %bb.9:
	cmpl	$-1, %eax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rsi
LBB0_3:
	movl	$1, %edi
	callq	_err
LBB0_4:
	movl	$666, -20(%rbp)                 ## imm = 0x29A
	leaq	-20(%rbp), %rdi
	callq	_cap_getmode
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$666, -20(%rbp)                 ## imm = 0x29A
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$0, -20(%rbp)
LBB0_5:
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	callq	_exit
LBB0_11:
	movl	-24(%rbp), %edi
	callq	_pdwait
	cmpl	$-1, %eax
	jne	LBB0_13
## %bb.12:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_13:
	movl	-24(%rbp), %edi
	callq	_close
	xorl	%eax, %eax
	callq	_cap_enter
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	movl	$666, -20(%rbp)                 ## imm = 0x29A
	leaq	-20(%rbp), %rdi
	callq	_cap_getmode
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$666, -20(%rbp)                 ## imm = 0x29A
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$1, -20(%rbp)
	sete	%dil
	callq	_CHECK
	movq	$0, (%rbx)
	xorl	%edi, %edi
	callq	_cap_getmode
	xorl	%edi, %edi
	cmpq	$-1, %rax
	sete	%dil
	callq	_CHECK
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_CHECK
	movq	$0, (%rbx)
	movl	$3735929054, %edi               ## imm = 0xDEADC0DE
	callq	_cap_getmode
	xorl	%edi, %edi
	cmpq	$-1, %rax
	sete	%dil
	callq	_CHECK
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_CHECK
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	cmpl	$-1, %eax
	jne	LBB0_18
## %bb.15:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
LBB0_18:
	movl	$1, %edi
	callq	_sleep
	leaq	-24(%rbp), %rdi
	xorl	%esi, %esi
	callq	_pdfork
	testl	%eax, %eax
	je	LBB0_17
## %bb.19:
	cmpl	$-1, %eax
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.3(%rip), %rsi
LBB0_16:
	movl	$1, %edi
	callq	_err
LBB0_17:
	movl	$666, -20(%rbp)                 ## imm = 0x29A
	leaq	-20(%rbp), %rdi
	callq	_cap_getmode
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$666, -20(%rbp)                 ## imm = 0x29A
	setne	%dil
	callq	_CHECK
	xorl	%edi, %edi
	cmpl	$1, -20(%rbp)
	jmp	LBB0_5
LBB0_21:
	movl	-24(%rbp), %edi
	callq	_pdwait
	cmpl	$-1, %eax
	jne	LBB0_23
## %bb.22:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_23:
	movl	-24(%rbp), %edi
	callq	_close
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EFAULT,8,3                     ## @EFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"fork() failed"

L_.str.2:                               ## @.str.2
	.asciz	"waitpid() failed"

L_.str.3:                               ## @.str.3
	.asciz	"pdfork() failed"

L_.str.4:                               ## @.str.4
	.asciz	"pdwait() failed"

L_str:                                  ## @str
	.asciz	"1..27"

.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, #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	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w21, #666
	str	w21, [sp, #12]
	add	x0, sp, #12
	bl	_cap_getmode
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #666
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w0, eq
	bl	_CHECK
Lloh2:
	adrp	x19, _errno@GOTPAGE
Lloh3:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	str	xzr, [x19]
	mov	x0, #0
	bl	_cap_getmode
	cmn	x0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x19]
Lloh4:
	adrp	x20, _EFAULT@GOTPAGE
Lloh5:
	ldr	x20, [x20, _EFAULT@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	str	xzr, [x19]
	mov	w0, #49374
	movk	w0, #57005, lsl #16
	bl	_cap_getmode
	cmn	x0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	bl	_fork
	cbz	w0, LBB0_3
; %bb.1:
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_3:
	str	w21, [sp, #12]
	b	LBB0_10
LBB0_4:
	mov	x1, #0
	mov	w2, #0
	bl	_waitpid
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
	add	x0, sp, #8
	mov	w1, #0
	bl	_pdfork
	cbz	w0, LBB0_9
; %bb.7:
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.8:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
	mov	w8, #666
	str	w8, [sp, #12]
LBB0_10:
	add	x0, sp, #12
	bl	_cap_getmode
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #666
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #0
LBB0_11:
	cset	w0, eq
	bl	_CHECK
	mov	w0, #0
	bl	_exit
LBB0_12:
	ldr	w0, [sp, #8]
	bl	_pdwait
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.13:
Lloh12:
	adrp	x1, l_.str.4@PAGE
Lloh13:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_14:
	ldr	w0, [sp, #8]
	bl	_close
	bl	_cap_enter
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	mov	w21, #666
	str	w21, [sp, #12]
	add	x0, sp, #12
	bl	_cap_getmode
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #666
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #1
	cset	w0, eq
	bl	_CHECK
	str	xzr, [x19]
	mov	x0, #0
	bl	_cap_getmode
	cmn	x0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	str	xzr, [x19]
	mov	w0, #49374
	movk	w0, #57005, lsl #16
	bl	_cap_getmode
	cmn	x0, #1
	cset	w0, eq
	bl	_CHECK
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, eq
	bl	_CHECK
	bl	_fork
	cbz	w0, LBB0_17
; %bb.15:
	cmn	w0, #1
	b.ne	LBB0_18
; %bb.16:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_17:
	str	w21, [sp, #12]
	b	LBB0_22
LBB0_18:
	mov	w0, #1
	bl	_sleep
	add	x0, sp, #8
	mov	w1, #0
	bl	_pdfork
	cbz	w0, LBB0_21
; %bb.19:
	cmn	w0, #1
	b.ne	LBB0_23
; %bb.20:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_21:
	mov	w8, #666
	str	w8, [sp, #12]
LBB0_22:
	add	x0, sp, #12
	bl	_cap_getmode
	cmp	x0, #0
	cset	w0, eq
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #666
	cset	w0, ne
	bl	_CHECK
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b	LBB0_11
LBB0_23:
	ldr	w0, [sp, #8]
	bl	_pdwait
	cmn	w0, #1
	b.ne	LBB0_25
; %bb.24:
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_25:
	ldr	w0, [sp, #8]
	bl	_close
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EFAULT,8,3                     ; @EFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"fork() failed"

l_.str.2:                               ; @.str.2
	.asciz	"waitpid() failed"

l_.str.3:                               ; @.str.3
	.asciz	"pdfork() failed"

l_.str.4:                               ; @.str.4
	.asciz	"pdwait() failed"

l_str:                                  ; @str
	.asciz	"1..27"

.subsections_via_symbols
