	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atf_utils_wait                 ## -- Begin function atf_utils_wait
	.p2align	4, 0x90
_atf_utils_wait:                        ## @atf_utils_wait
	.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	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movl	%esi, %r15d
	movl	%edi, %ebx
	leaq	-52(%rbp), %rsi
	xorl	%edx, %edx
	callq	_waitpid
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	leaq	L_.str(%rip), %rdx
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_init_out_filename
	leaq	L_.str.1(%rip), %rdx
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_init_out_filename
	movq	%r13, %rdi
	callq	_atf_dynstr_cstring
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_atf_utils_cat_file
	movq	%r14, %rdi
	callq	_atf_dynstr_cstring
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_atf_utils_cat_file
	movl	-52(%rbp), %edi
	callq	_WIFEXITED
	movl	%eax, %edi
	callq	_ATF_REQUIRE
	movl	-52(%rbp), %edi
	callq	_WEXITSTATUS
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_ATF_REQUIRE_EQ
	movq	%r12, %rdi
	callq	_strlen
	cmpq	$6, %rax
	jb	LBB0_3
## %bb.1:
	leaq	L_.str.4(%rip), %rsi
	movl	$5, %edx
	movq	%r12, %rdi
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	leaq	-48(%rbp), %rdi
	callq	_atf_dynstr_cstring
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_atf_utils_compare_file
	movl	%eax, %edi
	callq	_ATF_REQUIRE
	jmp	LBB0_4
LBB0_2:
	leaq	-48(%rbp), %rdi
	callq	_atf_dynstr_cstring
	addq	$5, %r12
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_atf_utils_copy_file
LBB0_4:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlen
	cmpq	$6, %rax
	jb	LBB0_7
## %bb.5:
	leaq	L_.str.4(%rip), %rsi
	movl	$5, %edx
	movq	%rbx, %rdi
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	leaq	-44(%rbp), %rdi
	callq	_atf_dynstr_cstring
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_atf_utils_compare_file
	movl	%eax, %edi
	callq	_ATF_REQUIRE
	jmp	LBB0_8
LBB0_6:
	leaq	-44(%rbp), %rdi
	callq	_atf_dynstr_cstring
	addq	$5, %rbx
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_atf_utils_copy_file
LBB0_8:
	leaq	-48(%rbp), %rdi
	callq	_atf_dynstr_cstring
	movl	%eax, %edi
	callq	_unlink
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	leaq	-44(%rbp), %rdi
	callq	_atf_dynstr_cstring
	movl	%eax, %edi
	callq	_unlink
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	callq	_ATF_REQUIRE
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out"

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

L_.str.2:                               ## @.str.2
	.asciz	"subprocess stdout: "

L_.str.3:                               ## @.str.3
	.asciz	"subprocess stderr: "

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atf_utils_wait                 ; -- Begin function atf_utils_wait
	.p2align	2
_atf_utils_wait:                        ; @atf_utils_wait
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	x1, sp, #12
	mov	w2, #0
	bl	_waitpid
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
Lloh0:
	adrp	x2, l_.str@PAGE
Lloh1:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	x1, x22
	mov	w3, #1
	bl	_init_out_filename
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x0, sp, #4
	mov	x1, x22
	mov	w3, #1
	bl	_init_out_filename
	add	x0, sp, #8
	bl	_atf_dynstr_cstring
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_atf_utils_cat_file
	add	x0, sp, #4
	bl	_atf_dynstr_cstring
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_atf_utils_cat_file
	ldr	w0, [sp, #12]
	bl	_WIFEXITED
	bl	_ATF_REQUIRE
	ldr	w0, [sp, #12]
	bl	_WEXITSTATUS
	mov	x1, x0
	mov	x0, x21
	bl	_ATF_REQUIRE_EQ
	mov	x0, x20
	bl	_strlen
	cmp	x0, #6
	b.lo	LBB0_2
; %bb.1:
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	w2, #5
	bl	_strncmp
	cbz	x0, LBB0_3
LBB0_2:
	add	x0, sp, #8
	bl	_atf_dynstr_cstring
	mov	x1, x20
	bl	_atf_utils_compare_file
	bl	_ATF_REQUIRE
	b	LBB0_4
LBB0_3:
	add	x0, sp, #8
	bl	_atf_dynstr_cstring
	add	x1, x20, #5
	bl	_atf_utils_copy_file
LBB0_4:
	mov	x0, x19
	bl	_strlen
	cmp	x0, #6
	b.lo	LBB0_6
; %bb.5:
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w2, #5
	bl	_strncmp
	cbz	x0, LBB0_7
LBB0_6:
	add	x0, sp, #4
	bl	_atf_dynstr_cstring
	mov	x1, x19
	bl	_atf_utils_compare_file
	bl	_ATF_REQUIRE
	b	LBB0_8
LBB0_7:
	add	x0, sp, #4
	bl	_atf_dynstr_cstring
	add	x1, x19, #5
	bl	_atf_utils_copy_file
LBB0_8:
	add	x0, sp, #8
	bl	_atf_dynstr_cstring
	bl	_unlink
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	add	x0, sp, #4
	bl	_atf_dynstr_cstring
	bl	_unlink
	cmn	w0, #1
	cset	w0, ne
	bl	_ATF_REQUIRE
	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
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out"

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

l_.str.2:                               ; @.str.2
	.asciz	"subprocess stdout: "

l_.str.3:                               ; @.str.3
	.asciz	"subprocess stderr: "

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

.subsections_via_symbols
