	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	_SIGUSR1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_catch@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	xorl	%eax, %eax
	callq	_getpid
	movq	_ppid@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_filetype@GOTPCREL(%rip), %r13
	movl	$0, (%r13)
	movq	_FT_END@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_19
## %bb.1:
	movl	$1, %ebx
	movq	_state@GOTPCREL(%rip), %r12
	movq	_cpid@GOTPCREL(%rip), %r14
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_err
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %edi
	callq	_close
	movl	-56(%rbp), %edi
	movl	%ebx, %esi
	callq	_child
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	xorl	%ecx, %ecx
	cmpl	$130, %eax
	sete	%cl
	leal	(%rbx,%rcx,8), %ebx
	addl	$4, %ebx
	incl	%eax
	movl	%eax, (%r13)
	cmpl	(%r15), %eax
	jge	LBB0_19
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$128, %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %eax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$130, %eax
	jne	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_FIFONAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$438, %esi                      ## imm = 0x1B6
	callq	_mkfifo
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$-1, -56(%rbp)
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	-56(%rbp), %rdi
	callq	_pipe
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_AF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %rcx
	callq	_socketpair
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	callq	_err
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, (%r12)
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
	callq	_parent
	jmp	LBB0_18
LBB0_19:
	movq	_FIFONAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_unlink
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_stdout,4,2                     ## @stdout
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_catch,4,2                      ## @catch
	.comm	_ppid,4,2                       ## @ppid
	.comm	_filetype,4,2                   ## @filetype
	.comm	_FT_END,4,2                     ## @FT_END
	.comm	_FIFONAME,4,2                   ## @FIFONAME
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"mkfifo"

	.comm	_AF_UNIX,4,2                    ## @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_AF_UNSPEC,4,2                  ## @AF_UNSPEC
L_.str.2:                               ## @.str.2
	.asciz	"socketpair"

L_.str.3:                               ## @.str.3
	.asciz	"pipe"

	.comm	_state,8,3                      ## @state
	.comm	_cpid,4,2                       ## @cpid
L_.str.4:                               ## @.str.4
	.asciz	"fork"

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

.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, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x0, l_str@PAGE
Lloh1:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh2:
	adrp	x8, _stdout@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_fflush
Lloh5:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _catch@GOTPAGE
Lloh9:
	ldr	x8, [x8, _catch@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_signal
	bl	_getpid
Lloh11:
	adrp	x8, _ppid@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ppid@GOTPAGEOFF]
Lloh13:
	str	w0, [x8]
Lloh14:
	adrp	x24, _filetype@GOTPAGE
Lloh15:
	ldr	x24, [x24, _filetype@GOTPAGEOFF]
	str	wzr, [x24]
Lloh16:
	adrp	x25, _FT_END@GOTPAGE
Lloh17:
	ldr	x25, [x25, _FT_END@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh18:
	adrp	x26, _FIFONAME@GOTPAGE
Lloh19:
	ldr	x26, [x26, _FIFONAME@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	mov	w8, #0
Lloh20:
	adrp	x19, _AF_UNSPEC@GOTPAGE
Lloh21:
	ldr	x19, [x19, _AF_UNSPEC@GOTPAGEOFF]
Lloh22:
	adrp	x22, _state@GOTPAGE
Lloh23:
	ldr	x22, [x22, _state@GOTPAGEOFF]
	mov	w20, #1
Lloh24:
	adrp	x23, _cpid@GOTPAGE
Lloh25:
	ldr	x23, [x23, _cpid@GOTPAGEOFF]
	mov	w27, #4
Lloh26:
	adrp	x21, l_.str.4@PAGE
Lloh27:
	add	x21, x21, l_.str.4@PAGEOFF
	mov	w28, #12
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	mov	x1, x21
	bl	_err
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #12]
	bl	_close
	ldr	w0, [sp, #8]
	mov	x1, x20
	bl	_child
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	cmp	w8, #130
	csel	w9, w28, w27, eq
	add	w20, w9, w20
	add	w8, w8, #1
	str	w8, [x24]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ge	LBB0_19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #128
	b.eq	LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #129
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w8, #130
	b.ne	LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x26]
	mov	w1, #438
	bl	_mkfifo
	cbz	w0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [sp, #8]
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #8
	bl	_pipe
	cbz	w0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh32:
	adrp	x8, _AF_UNIX@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AF_UNIX@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w2, [x19]
	add	x3, sp, #8
	bl	_socketpair
	cbz	w0, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_err
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	str	xzr, [x22]
	bl	_fork
	str	w0, [x23]
	cbz	w0, LBB0_3
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #8]
	bl	_close
	ldr	w0, [sp, #12]
	bl	_parent
	b	LBB0_4
LBB0_19:
	ldr	w0, [x26]
	bl	_unlink
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_stdout,4,2                     ; @stdout
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_catch,4,2                      ; @catch
	.comm	_ppid,4,2                       ; @ppid
	.comm	_filetype,4,2                   ; @filetype
	.comm	_FT_END,4,2                     ; @FT_END
	.comm	_FIFONAME,4,2                   ; @FIFONAME
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"mkfifo"

	.comm	_AF_UNIX,4,2                    ; @AF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_AF_UNSPEC,4,2                  ; @AF_UNSPEC
l_.str.2:                               ; @.str.2
	.asciz	"socketpair"

l_.str.3:                               ; @.str.3
	.asciz	"pipe"

	.comm	_state,8,3                      ; @state
	.comm	_cpid,4,2                       ; @cpid
l_.str.4:                               ; @.str.4
	.asciz	"fork"

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

.subsections_via_symbols
