	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flags
_flags:                                 ## @flags
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_FSTEST_ENTER
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	$438, %edx                      ## imm = 0x1B6
	callq	_rump_sys_open
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_2:
	movl	%ebx, %edi
	callq	_rump_sys_close
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.2(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_4:
	leaq	L_.str(%rip), %rdi
	leaq	-24(%rbp), %rsi
	callq	_rump_sys_stat
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_6:
	movq	%r14, %rdi
	callq	_FSTYPE_ZFS
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	callq	_atf_tc_expect_fail
LBB0_8:
	movl	-24(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	callq	_rump_sys_chflags
	cmpl	$-1, %eax
	jne	LBB0_12
## %bb.9:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rdi
	callq	_atf_tc_skip
LBB0_11:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_12:
	movq	_UF_IMMUTABLE@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	orl	-24(%rbp), %ebx
	movq	_RUMP_RFCFDG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_rump_pub_lwproc_rfork
	movl	$1, %edi
	callq	_rump_sys_setuid
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.7(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_14:
	orl	(%r14), %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_rump_sys_chflags
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.15:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EPERM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
LBB0_16:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_17:
	xorl	%eax, %eax
	callq	_rump_pub_lwproc_releaselwp
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_rump_sys_chflags
	cmpl	$-1, %eax
	jne	LBB0_19
## %bb.18:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_19:
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_rump_sys_chflags
	cmpl	$-1, %eax
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.6(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_21:
	leaq	L_.str(%rip), %rdi
	callq	_rump_sys_unlink
	cmpl	$-1, %eax
	jne	LBB0_23
## %bb.22:
	leaq	L_.str.8(%rip), %rdi
	callq	_atf_tc_fail_errno
LBB0_23:
	xorl	%eax, %eax
	callq	_FSTEST_EXIT
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"file.test"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
L_.str.1:                               ## @.str.1
	.asciz	"open"

L_.str.2:                               ## @.str.2
	.asciz	"close"

L_.str.3:                               ## @.str.3
	.asciz	"stat"

L_.str.4:                               ## @.str.4
	.asciz	"PR kern/47656: Test known to be broken"

	.comm	_errno,8,3                      ## @errno
	.comm	_EOPNOTSUPP,8,3                 ## @EOPNOTSUPP
L_.str.5:                               ## @.str.5
	.asciz	"file flags not supported by file system"

L_.str.6:                               ## @.str.6
	.asciz	"chflags"

	.comm	_UF_IMMUTABLE,4,2               ## @UF_IMMUTABLE
	.comm	_RUMP_RFCFDG,4,2                ## @RUMP_RFCFDG
L_.str.7:                               ## @.str.7
	.asciz	"setuid"

	.comm	_EPERM,8,3                      ## @EPERM
L_.str.8:                               ## @.str.8
	.asciz	"unlink"

	.no_dead_strip	_flags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flags
_flags:                                 ; @flags
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_FSTEST_ENTER
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #438
	bl	_rump_sys_open
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_2:
	mov	x0, x20
	bl	_rump_sys_close
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_4:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #8
	bl	_rump_sys_stat
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_6:
	mov	x0, x19
	bl	_FSTYPE_ZFS
	cbz	x0, LBB0_8
; %bb.7:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_atf_tc_expect_fail
LBB0_8:
	ldr	w1, [sp, #8]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rump_sys_chflags
	cmn	w0, #1
	b.ne	LBB0_12
; %bb.9:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _EOPNOTSUPP@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EOPNOTSUPP@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_atf_tc_skip
LBB0_11:
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_12:
Lloh30:
	adrp	x20, _UF_IMMUTABLE@GOTPAGE
Lloh31:
	ldr	x20, [x20, _UF_IMMUTABLE@GOTPAGEOFF]
	ldr	w8, [sp, #8]
	ldr	w9, [x20]
	orr	w19, w9, w8
Lloh32:
	adrp	x8, _RUMP_RFCFDG@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RUMP_RFCFDG@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_rump_pub_lwproc_rfork
	mov	w0, #1
	bl	_rump_sys_setuid
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.13:
Lloh35:
	adrp	x0, l_.str.7@PAGE
Lloh36:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_14:
	ldr	w8, [x20]
	orr	w19, w19, w8
Lloh37:
	adrp	x0, l_.str@PAGE
Lloh38:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_rump_sys_chflags
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.15:
Lloh39:
	adrp	x8, _errno@GOTPAGE
Lloh40:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8]
Lloh42:
	adrp	x9, _EPERM@GOTPAGE
Lloh43:
	ldr	x9, [x9, _EPERM@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_17
LBB0_16:
Lloh45:
	adrp	x0, l_.str.6@PAGE
Lloh46:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_17:
	bl	_rump_pub_lwproc_releaselwp
Lloh47:
	adrp	x0, l_.str@PAGE
Lloh48:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_rump_sys_chflags
	cmn	w0, #1
	b.ne	LBB0_19
; %bb.18:
Lloh49:
	adrp	x0, l_.str.6@PAGE
Lloh50:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_19:
	ldr	w8, [x20]
	bic	w1, w19, w8
Lloh51:
	adrp	x0, l_.str@PAGE
Lloh52:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rump_sys_chflags
	cmn	w0, #1
	b.ne	LBB0_21
; %bb.20:
Lloh53:
	adrp	x0, l_.str.6@PAGE
Lloh54:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_21:
Lloh55:
	adrp	x0, l_.str@PAGE
Lloh56:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rump_sys_unlink
	cmn	w0, #1
	b.ne	LBB0_23
; %bb.22:
Lloh57:
	adrp	x0, l_.str.8@PAGE
Lloh58:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_atf_tc_fail_errno
LBB0_23:
	bl	_FSTEST_EXIT
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"file.test"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
l_.str.1:                               ; @.str.1
	.asciz	"open"

l_.str.2:                               ; @.str.2
	.asciz	"close"

l_.str.3:                               ; @.str.3
	.asciz	"stat"

l_.str.4:                               ; @.str.4
	.asciz	"PR kern/47656: Test known to be broken"

	.comm	_errno,8,3                      ; @errno
	.comm	_EOPNOTSUPP,8,3                 ; @EOPNOTSUPP
l_.str.5:                               ; @.str.5
	.asciz	"file flags not supported by file system"

l_.str.6:                               ; @.str.6
	.asciz	"chflags"

	.comm	_UF_IMMUTABLE,4,2               ; @UF_IMMUTABLE
	.comm	_RUMP_RFCFDG,4,2                ; @RUMP_RFCFDG
l_.str.7:                               ; @.str.7
	.asciz	"setuid"

	.comm	_EPERM,8,3                      ; @EPERM
l_.str.8:                               ; @.str.8
	.asciz	"unlink"

	.no_dead_strip	_flags
.subsections_via_symbols
