	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function run_test
_run_test:                              ## @run_test
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movl	%edx, %r13d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_pipe
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_err
LBB0_2:
	xorl	%eax, %eax
	callq	_fork
	cmpl	$-1, %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	je	LBB0_8
## %bb.3:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movl	-56(%rbp), %edi
	callq	_close
	movl	-52(%rbp), %edi
	movq	_STDERR_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %edi
	je	LBB0_6
## %bb.5:
	callq	_dup2
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.30:
	movl	$2, %edi
	callq	__exit
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	callq	_err
LBB0_9:
	movl	-52(%rbp), %edi
	callq	_close
	movl	$1024, %r15d                    ## imm = 0x400
	movl	$1024, %edi                     ## imm = 0x400
	callq	_malloc
	movq	_EINTR@GOTPCREL(%rip), %r14
	movq	%rax, %rbx
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	addq	%r15, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
	movq	%rbx, %r13
	movl	%r13d, %r12d
	notl	%r12d
	addl	%eax, %r12d
	movq	_errno@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_10 Depth=1
                                        ##     Parent Loop BB0_11 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-56(%rbp), %edi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_read
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_13
## %bb.24:                              ##   in Loop: Header=BB0_12 Depth=3
	movq	(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_12
## %bb.25:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	$2, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_err
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=2
	testl	%r15d, %r15d
	je	LBB0_14
LBB0_26:                                ##   in Loop: Header=BB0_11 Depth=2
	movslq	%r15d, %rax
	leaq	(%rax,%r13), %rbx
	addq	%r13, %rax
	decq	%rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rax, %rcx
	movq	%rcx, %rax
	jne	LBB0_11
## %bb.27:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	addq	%r15, %r15
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_realloc
	testq	%rax, %rax
	jne	LBB0_10
## %bb.28:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$2, %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_14:
	movl	%r13d, %edx
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	subl	%r12d, %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memchr
	testq	%rax, %rax
	jne	LBB0_21
## %bb.15:
	movb	$0, (%r13)
	movl	-56(%rbp), %edi
	callq	_close
	leaq	-72(%rbp), %r15
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_waitpid
	cmpl	$-1, %eax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r14), %rcx
	movq	_errno@GOTPCREL(%rip), %rdx
	cmpq	%rcx, (%rdx)
	je	LBB0_16
LBB0_18:
	cmpl	$-1, %eax
	jne	LBB0_20
## %bb.19:
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edi
	callq	_err
LBB0_20:
	cmpl	$0, -72(%rbp)
	je	LBB0_22
LBB0_21:
	movq	%r12, %rdi
	callq	_free
	xorl	%r12d, %r12d
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.29:
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
LBB0_6:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r9
	callq	_fmtmsg
	movq	_MM_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_31
## %bb.7:
	xorl	%edi, %edi
	callq	__exit
LBB0_31:
	movl	$1, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipe"

L_.str.1:                               ## @.str.1
	.asciz	"fork"

	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
	.comm	_MM_OK,8,3                      ## @MM_OK
	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"read"

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

L_.str.4:                               ## @.str.4
	.asciz	"waitpid"

	.no_dead_strip	_run_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function run_test
_run_test:                              ; @run_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x5
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x0, sp, #16
	bl	_pipe
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_2:
	bl	_fork
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
	cbnz	w19, LBB0_8
; %bb.4:
	ldr	w0, [sp, #16]
	bl	_close
	ldr	w0, [sp, #20]
Lloh5:
	adrp	x8, _STDERR_FILENO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STDERR_FILENO@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	cmp	w0, w1
	b.eq	LBB0_28
; %bb.5:
	bl	_dup2
	cmn	w0, #1
	b.ne	LBB0_28
; %bb.6:
	mov	w0, #2
	bl	__exit
LBB0_7:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_8:
	ldr	w0, [sp, #20]
	bl	_close
	mov	w22, #1024
	mov	w0, #1024
	bl	_malloc
	mov	x20, x0
Lloh10:
	adrp	x27, _errno@GOTPAGE
Lloh11:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
Lloh12:
	adrp	x28, _EINTR@GOTPAGE
Lloh13:
	ldr	x28, [x28, _EINTR@GOTPAGEOFF]
Lloh14:
	adrp	x23, l_.str.2@PAGE
Lloh15:
	add	x23, x23, l_.str.2@PAGEOFF
	mov	x21, x0
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
	add	x24, x20, x22
LBB0_10:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
	mvn	w8, w21
	add	w26, w24, w8
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w0, [sp, #16]
	mov	x1, x21
	mov	x2, x26
	bl	_read
	mov	x25, x0
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=3
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	mov	w0, #2
	mov	x1, x23
	bl	_err
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=2
	cbz	w25, LBB0_18
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=2
	add	x21, x21, w25, sxtw
	sub	x8, x21, #1
	cmp	x24, x8
	b.ne	LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_9 Depth=1
	lsl	x22, x22, #1
	mov	x0, x20
	mov	x1, x22
	bl	_realloc
	mov	x20, x0
	cbnz	x0, LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #2
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
	b	LBB0_9
LBB0_18:
	sub	w2, w21, w20
	mov	x0, x20
	mov	w1, #0
	bl	_memchr
	cbnz	x0, LBB0_24
; %bb.19:
	strb	wzr, [x21]
	ldr	w0, [sp, #16]
	bl	_close
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #0
	bl	_waitpid
	ldr	x8, [x27]
	ldr	x9, [x28]
	cmn	w0, #1
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_20
; %bb.21:
	cmn	w0, #1
	b.ne	LBB0_23
; %bb.22:
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #2
	bl	_err
LBB0_23:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_25
LBB0_24:
	mov	x0, x20
	bl	_free
	mov	x20, #0
LBB0_25:
	ldr	x8, [sp, #24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_27:
	bl	___stack_chk_fail
LBB0_28:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	bl	_fmtmsg
Lloh23:
	adrp	x8, _MM_OK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MM_OK@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_30
; %bb.29:
	mov	w0, #0
	bl	__exit
LBB0_30:
	mov	w0, #1
	bl	__exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipe"

l_.str.1:                               ; @.str.1
	.asciz	"fork"

	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
	.comm	_MM_OK,8,3                      ; @MM_OK
	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"read"

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

l_.str.4:                               ; @.str.4
	.asciz	"waitpid"

	.no_dead_strip	_run_test
.subsections_via_symbols
