	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pipecomm
_pipecomm:                              ## @pipecomm
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_TESTSLEN@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	incl	%r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	-48(%rbp), %rdi
	callq	_rump_sys_pipe
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	xorl	%eax, %eax
	callq	_rumpclient_prefork
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$-1, %eax
	jne	LBB0_13
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
	jmp	LBB0_20
LBB0_7:
	movq	%rbx, %rdi
	callq	_rumpclient_fork_init
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movl	(%r12), %edx
	movq	%r14, %rsi
	callq	_rump_sys_read
	cmpl	(%r12), %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_11:
	movq	_TESTSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_20
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_errx
	jmp	LBB0_20
LBB0_13:
	movl	-44(%rbp), %edi
	movq	_TESTSTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	callq	_rump_sys_write
	cmpl	(%r12), %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_15:
	leaq	-52(%rbp), %rdi
	callq	_wait
	cmpl	$-1, %eax
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_17:
	movl	-52(%rbp), %edi
	callq	_WIFEXITED
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	-52(%rbp), %edi
	callq	_WEXITSTATUS
	testl	%eax, %eax
	je	LBB0_20
LBB0_19:
	movl	-52(%rbp), %edx
	leaq	L_.str.8(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TESTSLEN,4,2                   ## @TESTSLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pipe"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"postfork init failed"

L_.str.4:                               ## @.str.4
	.asciz	"pipe read"

	.comm	_TESTSTR,4,2                    ## @TESTSTR
L_.str.5:                               ## @.str.5
	.asciz	"teststring doesn't match, got %s"

L_.str.6:                               ## @.str.6
	.asciz	"pipe write"

L_.str.7:                               ## @.str.7
	.asciz	"wait failed"

L_.str.8:                               ## @.str.8
	.asciz	"child exited with status %d"

	.no_dead_strip	_pipecomm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pipecomm
_pipecomm:                              ; @pipecomm
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x22, _TESTSLEN@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TESTSLEN@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w20, w8, #1
	mov	x9, x20
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
	sub	x0, x29, #48
	bl	_rump_sys_pipe
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
	bl	_rumpclient_prefork
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.3:
	bl	_fork
	cbz	w0, LBB0_7
LBB0_4:
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.5:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
	b	LBB0_21
LBB0_6:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
	bl	_fork
	cbnz	w0, LBB0_4
LBB0_7:
	mov	x0, x21
	bl	_rumpclient_fork_init
	cmn	w0, #1
	b.ne	LBB0_9
; %bb.8:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	ldur	w0, [x29, #-48]
	ldr	w2, [x22]
	mov	x1, x19
	bl	_rump_sys_read
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_11
; %bb.10:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_11:
Lloh17:
	adrp	x8, _TESTSTR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TESTSTR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_strcmp
	cbz	w0, LBB0_21
; %bb.12:
	str	x19, [sp, #-16]!
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_20
LBB0_13:
	ldur	w0, [x29, #-44]
Lloh22:
	adrp	x8, _TESTSTR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TESTSTR@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [x22]
	bl	_rump_sys_write
	ldr	w8, [x22]
	cmp	w0, w8
	b.eq	LBB0_15
; %bb.14:
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_15:
	sub	x0, x29, #52
	bl	_wait
	cmn	w0, #1
	b.ne	LBB0_17
; %bb.16:
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_17:
	ldur	w0, [x29, #-52]
	bl	_WIFEXITED
	cbz	w0, LBB0_19
; %bb.18:
	ldur	w0, [x29, #-52]
	bl	_WEXITSTATUS
	cbz	w0, LBB0_21
LBB0_19:
	ldur	w8, [x29, #-52]
	str	x8, [sp, #-16]!
Lloh29:
	adrp	x1, l_.str.8@PAGE
Lloh30:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_20:
	mov	w0, #1
	bl	_errx
	add	sp, sp, #16
LBB0_21:
	ldur	x8, [x29, #-40]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.22:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_TESTSLEN,4,2                   ; @TESTSLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pipe"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"postfork init failed"

l_.str.4:                               ; @.str.4
	.asciz	"pipe read"

	.comm	_TESTSTR,4,2                    ; @TESTSTR
l_.str.5:                               ; @.str.5
	.asciz	"teststring doesn't match, got %s"

l_.str.6:                               ; @.str.6
	.asciz	"pipe write"

l_.str.7:                               ; @.str.7
	.asciz	"wait failed"

l_.str.8:                               ; @.str.8
	.asciz	"child exited with status %d"

	.no_dead_strip	_pipecomm
.subsections_via_symbols
