	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function child_connect
_child_connect:                         ## @child_connect
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_atf_process_stream_type
	movq	_atf_process_stream_type_capture@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_close
	movq	(%rbx), %rax
	movl	4(%rax), %edi
LBB0_8:
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_safe_dup                       ## TAILCALL
LBB0_2:
	movq	_atf_process_stream_type_connect@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.3:
	movq	8(%rbx), %rax
	movl	8(%rax), %esi
	movl	12(%rax), %edi
	callq	_dup2
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rax
	movl	8(%rax), %ecx
	movl	12(%rax), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atf_libc_error                 ## TAILCALL
LBB0_5:
	movq	_atf_process_stream_type_inherit@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atf_no_error                   ## TAILCALL
LBB0_6:
	movq	_atf_process_stream_type_redirect_fd@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.7:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	jmp	LBB0_8
LBB0_9:
	movq	_atf_process_stream_type_redirect_path@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.10:
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_atf_fs_path_cstring
	movq	_O_WRONLY@GOTPCREL(%rip), %rcx
	movq	_O_CREAT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movl	%eax, %edi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_15
## %bb.11:
	movl	%eax, %r15d
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_safe_dup
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_atf_is_error
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	%r15d, %edi
	callq	_close
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_atf_fs_path_cstring
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atf_libc_error                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_atf_process_stream_type_capture,4,2 ## @atf_process_stream_type_capture
	.comm	_atf_process_stream_type_connect,4,2 ## @atf_process_stream_type_connect
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot connect descriptor %d to %d"

	.comm	_atf_process_stream_type_inherit,4,2 ## @atf_process_stream_type_inherit
	.comm	_atf_process_stream_type_redirect_fd,4,2 ## @atf_process_stream_type_redirect_fd
	.comm	_atf_process_stream_type_redirect_path,4,2 ## @atf_process_stream_type_redirect_path
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
L_.str.1:                               ## @.str.1
	.asciz	"Could not create %s"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function child_connect
_child_connect:                         ; @child_connect
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_atf_process_stream_type
Lloh0:
	adrp	x8, _atf_process_stream_type_capture@GOTPAGE
Lloh1:
	ldr	x8, [x8, _atf_process_stream_type_capture@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_close
	ldr	x8, [x19]
	ldr	w0, [x8, #4]
LBB0_2:
	mov	x1, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_safe_dup
LBB0_3:
Lloh3:
	adrp	x8, _atf_process_stream_type_connect@GOTPAGE
Lloh4:
	ldr	x8, [x8, _atf_process_stream_type_connect@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x19, #8]
	ldp	w1, w0, [x8, #8]
	bl	_dup2
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.5:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldp	w8, w2, [x8, #8]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_atf_libc_error
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
Lloh11:
	adrp	x8, _atf_process_stream_type_inherit@GOTPAGE
Lloh12:
	ldr	x8, [x8, _atf_process_stream_type_inherit@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_atf_no_error
LBB0_9:
Lloh14:
	adrp	x8, _atf_process_stream_type_redirect_fd@GOTPAGE
Lloh15:
	ldr	x8, [x8, _atf_process_stream_type_redirect_fd@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	b	LBB0_2
LBB0_11:
Lloh17:
	adrp	x8, _atf_process_stream_type_redirect_path@GOTPAGE
Lloh18:
	ldr	x8, [x8, _atf_process_stream_type_redirect_path@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.12:
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_atf_fs_path_cstring
Lloh20:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh24:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh26:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh27:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #420
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_16
; %bb.13:
	mov	x21, x0
	mov	x1, x20
	bl	_safe_dup
	mov	x19, x0
	bl	_atf_is_error
	cbz	x0, LBB0_15
; %bb.14:
	mov	x0, x21
	bl	_close
LBB0_15:
	mov	x0, x19
	b	LBB0_6
LBB0_16:
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	w20, [x8]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_atf_fs_path_cstring
	mov	x2, x0
Lloh32:
	adrp	x1, l_.str.1@PAGE
Lloh33:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_atf_libc_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_atf_process_stream_type_capture,4,2 ; @atf_process_stream_type_capture
	.comm	_atf_process_stream_type_connect,4,2 ; @atf_process_stream_type_connect
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot connect descriptor %d to %d"

	.comm	_atf_process_stream_type_inherit,4,2 ; @atf_process_stream_type_inherit
	.comm	_atf_process_stream_type_redirect_fd,4,2 ; @atf_process_stream_type_redirect_fd
	.comm	_atf_process_stream_type_redirect_path,4,2 ; @atf_process_stream_type_redirect_path
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
l_.str.1:                               ; @.str.1
	.asciz	"Could not create %s"

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