	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function subtests
_subtests:                              ## @subtests
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_open
	movl	%eax, %r14d
	movq	_testnum@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leal	1(%rsi), %eax
	cmpl	$-1, %r14d
	movl	%eax, (%r13)
	leaq	L_.str(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	xorl	%eax, %eax
	callq	_printf
	movq	_F_GETFL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	movl	%eax, %r15d
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movq	_CORRECT_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	andl	%r15d, %eax
	movl	(%r13), %esi
	leal	1(%rsi), %edx
	movl	%edx, (%r13)
	cmpl	%r12d, %eax
	jne	LBB0_5
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_1:
	movl	(%r13), %esi
	leal	1(%rsi), %eax
	movl	%eax, (%r13)
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %edx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_printf
LBB0_6:
	movq	_F_SETFL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	%r14d, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_fcntl
	movl	(%r13), %esi
	leal	1(%rsi), %ecx
	cmpl	$-1, %eax
	movl	%ecx, (%r13)
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.6(%rip), %rdi
	cmoveq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	movl	(%rbx), %esi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	movl	%eax, %ebx
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	movl	(%r13), %esi
	leal	1(%rsi), %eax
	movl	%eax, (%r13)
	cmpl	%r15d, %ebx
	jne	LBB0_11
## %bb.9:
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_10
LBB0_7:
	movl	(%r13), %esi
	leal	1(%rsi), %eax
	movl	%eax, (%r13)
	leaq	L_.str.2(%rip), %rdi
LBB0_10:
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.8(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_printf
LBB0_12:
	movl	(%r12), %esi
	movq	_O_NONBLOCK@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	orl	%ebx, %edx
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	movl	(%r13), %esi
	leal	1(%rsi), %ecx
	cmpl	$-1, %eax
	movl	%ecx, (%r13)
	leaq	L_.str.9(%rip), %rax
	leaq	L_.str.10(%rip), %rdi
	cmoveq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%eax, %eax
	callq	_fcntl
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.14:
	movl	(%r15), %ecx
	orl	%ebx, %ecx
	movl	(%r13), %esi
	leal	1(%rsi), %edx
	movl	%edx, (%r13)
	cmpl	%ecx, %eax
	jne	LBB0_17
## %bb.15:
	leaq	L_.str.11(%rip), %rdi
	jmp	LBB0_16
LBB0_13:
	movl	(%r13), %esi
	leal	1(%rsi), %eax
	movl	%eax, (%r13)
	leaq	L_.str.2(%rip), %rdi
LBB0_16:
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_18
LBB0_17:
	leaq	L_.str.12(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
LBB0_18:
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not ok %d - open(\"%s\", %s) failed\n"

	.comm	_testnum,4,2                    ## @testnum
L_.str.1:                               ## @.str.1
	.asciz	"ok %d - open(\"%s\", %s) succeeded\n"

	.comm	_F_GETFL,4,2                    ## @F_GETFL
L_.str.2:                               ## @.str.2
	.asciz	"not ok %d - fcntl(F_GETFL) failed\n"

	.comm	_CORRECT_O_ACCMODE,4,2          ## @CORRECT_O_ACCMODE
L_.str.3:                               ## @.str.3
	.asciz	"ok %d - fcntl(F_GETFL) gave correct result\n"

L_.str.4:                               ## @.str.4
	.asciz	"not ok %d - fcntl(F_GETFL) gave incorrect result (%#x & %#x != %#x)\n"

	.comm	_F_SETFL,4,2                    ## @F_SETFL
L_.str.5:                               ## @.str.5
	.asciz	"not ok %d - fcntl(F_SETFL) same flags failed\n"

L_.str.6:                               ## @.str.6
	.asciz	"ok %d - fcntl(F_SETFL) same flags succeeded\n"

L_.str.7:                               ## @.str.7
	.asciz	"ok %d - fcntl(F_GETFL) gave same result\n"

L_.str.8:                               ## @.str.8
	.asciz	"not ok %d - fcntl(F_SETFL) caused fcntl(F_GETFL) to change from %#x to %#x\n"

	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
L_.str.9:                               ## @.str.9
	.asciz	"not ok %d - fcntl(F_SETFL) O_NONBLOCK failed\n"

L_.str.10:                              ## @.str.10
	.asciz	"ok %d - fcntl(F_SETFL) O_NONBLOCK succeeded\n"

L_.str.11:                              ## @.str.11
	.asciz	"ok %d - fcntl(F_GETFL) gave expected result\n"

L_.str.12:                              ## @.str.12
	.asciz	"not ok %d - fcntl(F_SETFL) gave unexpected result (%#x != %#x)\n"

	.no_dead_strip	_subtests
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function subtests
_subtests:                              ; @subtests
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_open
	mov	x19, x0
Lloh0:
	adrp	x23, _testnum@GOTPAGE
Lloh1:
	ldr	x23, [x23, _testnum@GOTPAGEOFF]
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str@PAGE
Lloh5:
	add	x9, x9, l_.str@PAGEOFF
	cmn	w0, #1
	csel	x0, x9, x8, eq
	stp	x22, x20, [sp]
	bl	_printf
Lloh6:
	adrp	x22, _F_GETFL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _F_GETFL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_fcntl
	mov	x20, x0
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _CORRECT_O_ACCMODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CORRECT_O_ACCMODE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	and	w9, w8, w20
	ldr	w1, [x23]
	add	w10, w1, #1
	str	w10, [x23]
	cmp	w9, w21
	b.ne	LBB0_4
; %bb.2:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_3:
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
	stp	x8, x21, [sp, #8]
	mov	x9, x20
	str	x9, [sp]
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_5:
	bl	_printf
Lloh17:
	adrp	x24, _F_SETFL@GOTPAGE
Lloh18:
	ldr	x24, [x24, _F_SETFL@GOTPAGEOFF]
	ldr	w1, [x24]
	str	x20, [sp]
	mov	x0, x19
	bl	_fcntl
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh19:
	adrp	x8, l_.str.6@PAGE
Lloh20:
	add	x8, x8, l_.str.6@PAGEOFF
Lloh21:
	adrp	x9, l_.str.5@PAGE
Lloh22:
	add	x9, x9, l_.str.5@PAGEOFF
	cmn	w0, #1
	csel	x0, x9, x8, eq
	bl	_printf
	ldr	w1, [x22]
	mov	x0, x19
	bl	_fcntl
	mov	x21, x0
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.6:
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
	cmp	w21, w20
	b.ne	LBB0_9
; %bb.7:
Lloh23:
	adrp	x0, l_.str.7@PAGE
Lloh24:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_10
LBB0_8:
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x20, x21, [sp]
Lloh27:
	adrp	x0, l_.str.8@PAGE
Lloh28:
	add	x0, x0, l_.str.8@PAGEOFF
LBB0_10:
	bl	_printf
	ldr	w1, [x24]
Lloh29:
	adrp	x20, _O_NONBLOCK@GOTPAGE
Lloh30:
	ldr	x20, [x20, _O_NONBLOCK@GOTPAGEOFF]
	ldr	w8, [x20]
	orr	w8, w8, w21
	str	x8, [sp]
	mov	x0, x19
	bl	_fcntl
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh31:
	adrp	x8, l_.str.10@PAGE
Lloh32:
	add	x8, x8, l_.str.10@PAGEOFF
Lloh33:
	adrp	x9, l_.str.9@PAGE
Lloh34:
	add	x9, x9, l_.str.9@PAGEOFF
	cmn	w0, #1
	csel	x0, x9, x8, eq
	bl	_printf
	ldr	w1, [x22]
	mov	x0, x19
	bl	_fcntl
                                        ; kill: def $w0 killed $w0 def $x0
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.11:
	ldr	w8, [x20]
	orr	w8, w8, w21
	ldr	w1, [x23]
	add	w9, w1, #1
	str	w9, [x23]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.12:
Lloh35:
	adrp	x0, l_.str.11@PAGE
Lloh36:
	add	x0, x0, l_.str.11@PAGEOFF
	b	LBB0_15
LBB0_13:
	ldr	w1, [x23]
	add	w8, w1, #1
	str	w8, [x23]
Lloh37:
	adrp	x0, l_.str.2@PAGE
Lloh38:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:
	stp	x0, x8, [sp]
Lloh39:
	adrp	x0, l_.str.12@PAGE
Lloh40:
	add	x0, x0, l_.str.12@PAGEOFF
LBB0_15:
	bl	_printf
	mov	x0, 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
	add	sp, sp, #96
	b	_close
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not ok %d - open(\"%s\", %s) failed\n"

	.comm	_testnum,4,2                    ; @testnum
l_.str.1:                               ; @.str.1
	.asciz	"ok %d - open(\"%s\", %s) succeeded\n"

	.comm	_F_GETFL,4,2                    ; @F_GETFL
l_.str.2:                               ; @.str.2
	.asciz	"not ok %d - fcntl(F_GETFL) failed\n"

	.comm	_CORRECT_O_ACCMODE,4,2          ; @CORRECT_O_ACCMODE
l_.str.3:                               ; @.str.3
	.asciz	"ok %d - fcntl(F_GETFL) gave correct result\n"

l_.str.4:                               ; @.str.4
	.asciz	"not ok %d - fcntl(F_GETFL) gave incorrect result (%#x & %#x != %#x)\n"

	.comm	_F_SETFL,4,2                    ; @F_SETFL
l_.str.5:                               ; @.str.5
	.asciz	"not ok %d - fcntl(F_SETFL) same flags failed\n"

l_.str.6:                               ; @.str.6
	.asciz	"ok %d - fcntl(F_SETFL) same flags succeeded\n"

l_.str.7:                               ; @.str.7
	.asciz	"ok %d - fcntl(F_GETFL) gave same result\n"

l_.str.8:                               ; @.str.8
	.asciz	"not ok %d - fcntl(F_SETFL) caused fcntl(F_GETFL) to change from %#x to %#x\n"

	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
l_.str.9:                               ; @.str.9
	.asciz	"not ok %d - fcntl(F_SETFL) O_NONBLOCK failed\n"

l_.str.10:                              ; @.str.10
	.asciz	"ok %d - fcntl(F_SETFL) O_NONBLOCK succeeded\n"

l_.str.11:                              ; @.str.11
	.asciz	"ok %d - fcntl(F_GETFL) gave expected result\n"

l_.str.12:                              ; @.str.12
	.asciz	"not ok %d - fcntl(F_SETFL) gave unexpected result (%#x != %#x)\n"

	.no_dead_strip	_subtests
.subsections_via_symbols
