	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function runtest
_runtest:                               ## @runtest
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_open
	movl	%eax, %ebx
	xorl	%edi, %edi
	cmpl	$-1, %eax
	setne	%dil
	movq	_errno@GOTPCREL(%rip), %rax
	movslq	(%rax), %r8
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_fdopen
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	xorl	%edi, %edi
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%dil
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_MSG
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fclose                         ## TAILCALL
LBB0_1:
	movl	%ebx, %edi
	callq	_close
	xorl	%edi, %edi
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	sete	%dil
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	movl	%r15d, %ecx
	movq	%r14, %r8
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ATF_REQUIRE_MSG                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open(\"%s\", %#x) failed; errno=%d"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"fdopen(open(\"%s\", %#x), \"%s\") succeeded unexpectedly"

L_.str.2:                               ## @.str.2
	.asciz	"fdopen(open(\"%s\", %#x), \"%s\") failed; errno=%d"

	.no_dead_strip	_runtest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function runtest
_runtest:                               ; @runtest
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_open
	mov	x23, x0
	cmn	w0, #1
	cset	w0, ne
Lloh0:
	adrp	x25, _errno@GOTPAGE
Lloh1:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	ldrsw	x4, [x25]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x20
	bl	_ATF_REQUIRE_MSG
	mov	x0, x23
	mov	x1, x19
	bl	_fdopen
	cbz	x0, LBB0_2
; %bb.1:
	mov	x24, x0
	cmp	w22, #1
	cset	w0, eq
	ldr	w8, [x25]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	str	x8, [sp]
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_ATF_REQUIRE_MSG
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_fclose
LBB0_2:
	mov	x0, x23
	bl	_close
	cmp	w22, #0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	cset	w0, eq
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_ATF_REQUIRE_MSG
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open(\"%s\", %#x) failed; errno=%d"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"fdopen(open(\"%s\", %#x), \"%s\") succeeded unexpectedly"

l_.str.2:                               ; @.str.2
	.asciz	"fdopen(open(\"%s\", %#x), \"%s\") failed; errno=%d"

	.no_dead_strip	_runtest
.subsections_via_symbols
