	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fork_with_streams
_fork_with_streams:                     ## @fork_with_streams
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	leaq	-48(%rbp), %rdi
	movq	%rdx, %rsi
	callq	_stream_prepare_init
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	leaq	-44(%rbp), %rdi
	movq	%r13, %rsi
	callq	_stream_prepare_init
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	xorl	%eax, %eax
	callq	_fork
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.3:
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	testl	%eax, %eax
	je	LBB0_9
## %bb.4:
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_do_parent
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_8:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_atf_libc_error
	movl	%eax, %ebx
LBB0_5:
	leaq	-44(%rbp), %rdi
	callq	_stream_prepare_fini
LBB0_6:
	leaq	-48(%rbp), %rdi
	callq	_stream_prepare_fini
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_do_child
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to fork"

	.comm	_UNREACHABLE,4,2                ## @UNREACHABLE
	.no_dead_strip	_fork_with_streams
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fork_with_streams
_fork_with_streams:                     ; @fork_with_streams
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x4
	mov	x23, x3
	mov	x20, x1
	mov	x21, x0
	add	x0, sp, #12
	mov	x1, x2
	bl	_stream_prepare_init
	mov	x22, x0
	bl	_atf_is_error
	cbnz	x0, LBB0_8
; %bb.1:
	add	x0, sp, #8
	mov	x1, x23
	bl	_stream_prepare_init
	mov	x22, x0
	bl	_atf_is_error
	cbnz	x0, LBB0_7
; %bb.2:
	bl	_fork
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.3:
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x1, x0
	cbz	w0, LBB0_9
; %bb.4:
	mov	x0, x21
	bl	_do_parent
	mov	x22, x0
	bl	_atf_is_error
	cbnz	x0, LBB0_6
	b	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_atf_libc_error
	mov	x22, x0
LBB0_6:
	add	x0, sp, #8
	bl	_stream_prepare_fini
LBB0_7:
	add	x0, sp, #12
	bl	_stream_prepare_fini
LBB0_8:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	mov	x0, x20
	mov	x1, x19
	bl	_do_child
	bl	_abort
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to fork"

	.comm	_UNREACHABLE,4,2                ; @UNREACHABLE
	.no_dead_strip	_fork_with_streams
.subsections_via_symbols
