	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_preserve_fd_acls               ## -- Begin function preserve_fd_acls
	.p2align	4, 0x90
_preserve_fd_acls:                      ## @preserve_fd_acls
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	movq	__PC_ACL_NFS4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fpathconf
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	_ACL_TYPE_NFS4@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	jns	LBB0_8
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_8:
	movq	__PC_ACL_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_fpathconf
	testl	%eax, %eax
	jle	LBB0_10
## %bb.9:
	movq	_ACL_TYPE_ACCESS@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %r15d
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_acl_get_fd_np
	testq	%rax, %rax
	je	LBB0_3
## %bb.13:
	movq	%rax, %rbx
	leaq	-28(%rbp), %rsi
	movq	%rax, %rdi
	callq	_acl_is_trivial_np
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	callq	_warn
	movq	%rbx, %rdi
	callq	_acl_free
	movl	$1, %eax
	jmp	LBB0_20
LBB0_3:
	movq	_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	callq	_warn
	movl	$1, %eax
	jmp	LBB0_20
LBB0_16:
	cmpl	$0, -28(%rbp)
	jne	LBB0_19
## %bb.17:
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_acl_set_fd_np
	testq	%rax, %rax
	js	LBB0_18
LBB0_19:
	movq	%rbx, %rdi
	callq	_acl_free
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_10:
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_20
## %bb.11:
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_12
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_18:
	movq	_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_15
LBB0_12:
	movq	_to@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	__PC_ACL_NFS4,4,2               ## @_PC_ACL_NFS4
	.comm	_ACL_TYPE_NFS4,4,2              ## @ACL_TYPE_NFS4
	.comm	_errno,8,3                      ## @errno
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fpathconf(..., _PC_ACL_NFS4) failed for %s"

	.comm	_to,4,2                         ## @to
	.comm	__PC_ACL_EXTENDED,4,2           ## @_PC_ACL_EXTENDED
	.comm	_ACL_TYPE_ACCESS,4,2            ## @ACL_TYPE_ACCESS
L_.str.1:                               ## @.str.1
	.asciz	"fpathconf(..., _PC_ACL_EXTENDED) failed for %s"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get acl entries while setting %s"

L_.str.3:                               ## @.str.3
	.asciz	"acl_is_trivial() failed for %s"

L_.str.4:                               ## @.str.4
	.asciz	"failed to set acl entries for %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_preserve_fd_acls               ; -- Begin function preserve_fd_acls
	.p2align	2
_preserve_fd_acls:                      ; @preserve_fd_acls
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, __PC_ACL_NFS4@GOTPAGE
Lloh1:
	ldr	x8, [x8, __PC_ACL_NFS4@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_fpathconf
	cmp	w0, #0
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ACL_TYPE_NFS4@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACL_TYPE_NFS4@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	tbz	w0, #31, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _EINVAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
LBB0_4:
Lloh11:
	adrp	x8, __PC_ACL_EXTENDED@GOTPAGE
Lloh12:
	ldr	x8, [x8, __PC_ACL_EXTENDED@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_fpathconf
	cmp	w0, #0
	b.le	LBB0_15
; %bb.5:
Lloh14:
	adrp	x8, _ACL_TYPE_ACCESS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ACL_TYPE_ACCESS@GOTPAGEOFF]
LBB0_6:
	ldr	w21, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_acl_get_fd_np
	cbz	x0, LBB0_10
; %bb.7:
	mov	x20, x0
	add	x1, sp, #12
	bl	_acl_is_trivial_np
	cbz	x0, LBB0_12
; %bb.8:
Lloh16:
	adrp	x8, _to@GOTPAGE
Lloh17:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_warn
	mov	x0, x20
	bl	_acl_free
	mov	w0, #1
	b	LBB0_18
LBB0_10:
Lloh21:
	adrp	x8, _to@GOTPAGE
Lloh22:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_warn
	mov	w0, #1
	b	LBB0_18
LBB0_12:
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_acl_set_fd_np
	tbnz	x0, #63, LBB0_20
LBB0_14:
	mov	x0, x20
	bl	_acl_free
	b	LBB0_17
LBB0_15:
	tbz	w0, #31, LBB0_17
; %bb.16:
Lloh26:
	adrp	x8, _errno@GOTPAGE
Lloh27:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x9, _EINVAL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_21
LBB0_17:
	mov	w0, #0
LBB0_18:
	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
LBB0_19:
Lloh32:
	adrp	x8, _to@GOTPAGE
Lloh33:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_20:
Lloh37:
	adrp	x8, _to@GOTPAGE
Lloh38:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x0, l_.str.4@PAGE
Lloh41:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_9
LBB0_21:
Lloh42:
	adrp	x8, _to@GOTPAGE
Lloh43:
	ldr	x8, [x8, _to@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x0, l_.str.1@PAGE
Lloh46:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	__PC_ACL_NFS4,4,2               ; @_PC_ACL_NFS4
	.comm	_ACL_TYPE_NFS4,4,2              ; @ACL_TYPE_NFS4
	.comm	_errno,8,3                      ; @errno
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fpathconf(..., _PC_ACL_NFS4) failed for %s"

	.comm	_to,4,2                         ; @to
	.comm	__PC_ACL_EXTENDED,4,2           ; @_PC_ACL_EXTENDED
	.comm	_ACL_TYPE_ACCESS,4,2            ; @ACL_TYPE_ACCESS
l_.str.1:                               ; @.str.1
	.asciz	"fpathconf(..., _PC_ACL_EXTENDED) failed for %s"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get acl entries while setting %s"

l_.str.3:                               ; @.str.3
	.asciz	"acl_is_trivial() failed for %s"

l_.str.4:                               ; @.str.4
	.asciz	"failed to set acl entries for %s"

.subsections_via_symbols
