	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aio_pty_test
_aio_pty_test:                          ## @aio_pty_test
	.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	%rsi, %r14
	movl	%edi, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_ATF_REQUIRE_KERNEL_MODULE
	xorl	%eax, %eax
	callq	_ATF_REQUIRE_UNSAFE_AIO
	leaq	-40(%rbp), %rdi
	leaq	-36(%rbp), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_openpty
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	movq	_errno@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_ATF_REQUIRE_MSG
	movl	-36(%rbp), %edi
	leaq	-48(%rbp), %rsi
	callq	_tcgetattr
	testq	%rax, %rax
	jns	LBB0_2
## %bb.1:
	movl	(%r12), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	callq	_atf_tc_fail
LBB0_2:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_cfmakeraw
	movl	-36(%rbp), %edi
	movq	_TCSANOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_tcsetattr
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r12), %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_atf_tc_fail
LBB0_4:
	movl	-40(%rbp), %esi
	movl	-36(%rbp), %edx
	movq	_PTY_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_aio_context_init
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_aio_write_test
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_aio_read_test
	movl	-40(%rbp), %edi
	callq	_close
	movl	-36(%rbp), %edi
	callq	_close
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aio"

L_.str.1:                               ## @.str.1
	.asciz	"openpty failed: %s"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"tcgetattr failed: %s"

	.comm	_TCSANOW,4,2                    ## @TCSANOW
L_.str.3:                               ## @.str.3
	.asciz	"tcsetattr failed: %s"

	.comm	_PTY_LEN,4,2                    ## @PTY_LEN
	.no_dead_strip	_aio_pty_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aio_pty_test
_aio_pty_test:                          ; @aio_pty_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ATF_REQUIRE_KERNEL_MODULE
	bl	_ATF_REQUIRE_UNSAFE_AIO
	add	x0, sp, #20
	add	x1, sp, #16
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_openpty
	cmp	x0, #0
	cset	w21, eq
Lloh2:
	adrp	x22, _errno@GOTPAGE
Lloh3:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_strerror
	mov	x2, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_ATF_REQUIRE_MSG
	ldr	w0, [sp, #16]
	add	x1, sp, #8
	bl	_tcgetattr
	tbz	x0, #63, LBB0_2
; %bb.1:
	ldr	w0, [x22]
	bl	_strerror
	mov	x1, x0
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail
LBB0_2:
	add	x0, sp, #8
	bl	_cfmakeraw
	ldr	w0, [sp, #16]
Lloh8:
	adrp	x8, _TCSANOW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TCSANOW@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_tcsetattr
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w0, [x22]
	bl	_strerror
	mov	x1, x0
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail
LBB0_4:
	ldp	w2, w1, [sp, #16]
Lloh13:
	adrp	x8, _PTY_LEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PTY_LEN@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	add	x0, sp, #24
	bl	_aio_context_init
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x19
	bl	_aio_write_test
	add	x0, sp, #24
	mov	x1, x20
	mov	x2, x19
	bl	_aio_read_test
	ldr	w0, [sp, #20]
	bl	_close
	ldr	w0, [sp, #16]
	bl	_close
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aio"

l_.str.1:                               ; @.str.1
	.asciz	"openpty failed: %s"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"tcgetattr failed: %s"

	.comm	_TCSANOW,4,2                    ; @TCSANOW
l_.str.3:                               ; @.str.3
	.asciz	"tcsetattr failed: %s"

	.comm	_PTY_LEN,4,2                    ; @PTY_LEN
	.no_dead_strip	_aio_pty_test
.subsections_via_symbols
