	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_remove_acl                     ## -- Begin function remove_acl
	.p2align	4, 0x90
_remove_acl:                            ## @remove_acl
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	leaq	-52(%rbp), %rsi
	callq	_acl_get_brand_np
	movq	(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	callq	_acl_get_brand_np
	movl	-52(%rbp), %edi
	movl	-48(%rbp), %esi
	callq	_branding_mismatch
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	-48(%rbp), %edi
	callq	_brand_name
	movl	%eax, %ebx
	movl	-52(%rbp), %edi
	callq	_brand_name
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_warnx
	movl	$-1, %eax
	jmp	LBB0_14
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rdi
	callq	_acl_dup
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	callq	_err
LBB0_4:
	movq	%r14, %rbx
	movq	_ACL_UNDEFINED_TAG@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	_ACL_FIRST_ENTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_acl_get_entry
	movl	$0, %r15d
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.5:
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_acl_delete_entry
	cmpl	$-1, %eax
	je	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	leaq	-44(%rbp), %rdx
	callq	_acl_get_entry
	cmpl	$1, %eax
	jne	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ACL_NEXT_ENTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-44(%rbp), %edi
	leaq	-64(%rbp), %rsi
	callq	_acl_get_tag_type
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_err
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-64(%rbp), %rax
	movq	_ACL_MASK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_have_mask@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_12
LBB0_13:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_acl_free
	movq	%r12, (%rbx)
	negl	%r15d
	movl	$0, %eax
	sbbl	%eax, %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: branding mismatch; existing ACL is %s, entry to be removed is %s"

L_.str.1:                               ## @.str.1
	.asciz	"%s: acl_dup() failed"

	.comm	_ACL_UNDEFINED_TAG,8,3          ## @ACL_UNDEFINED_TAG
	.comm	_ACL_FIRST_ENTRY,4,2            ## @ACL_FIRST_ENTRY
	.comm	_ACL_NEXT_ENTRY,4,2             ## @ACL_NEXT_ENTRY
L_.str.2:                               ## @.str.2
	.asciz	"%s: acl_get_tag_type() failed"

	.comm	_ACL_MASK,8,3                   ## @ACL_MASK
	.comm	_have_mask,4,2                  ## @have_mask
L_.str.3:                               ## @.str.3
	.asciz	"%s: cannot remove non-existent ACL entry"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_remove_acl                     ; -- Begin function remove_acl
	.p2align	2
_remove_acl:                            ; @remove_acl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x1, sp, #28
	bl	_acl_get_brand_np
	ldr	x0, [x20]
	add	x1, sp, #24
	bl	_acl_get_brand_np
	ldp	w1, w0, [sp, #24]
	bl	_branding_mismatch
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [sp, #24]
	bl	_brand_name
	mov	x20, x0
	ldr	w0, [sp, #28]
	bl	_brand_name
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_warnx
	mov	w0, #-1
	b	LBB0_15
LBB0_2:
	ldr	x0, [x20]
	bl	_acl_dup
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_4:
Lloh4:
	adrp	x8, _ACL_UNDEFINED_TAG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ACL_UNDEFINED_TAG@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	str	x8, [sp, #32]
Lloh7:
	adrp	x8, _ACL_FIRST_ENTRY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ACL_FIRST_ENTRY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #44
	mov	x0, x21
	bl	_acl_get_entry
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.5:
	mov	w26, #0
Lloh10:
	adrp	x27, _ACL_NEXT_ENTRY@GOTPAGE
Lloh11:
	ldr	x27, [x27, _ACL_NEXT_ENTRY@GOTPAGEOFF]
	mov	w28, #1
Lloh12:
	adrp	x23, _ACL_MASK@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ACL_MASK@GOTPAGEOFF]
Lloh14:
	adrp	x24, _have_mask@GOTPAGE
Lloh15:
	ldr	x24, [x24, _have_mask@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [sp, #44]
	mov	x0, x22
	bl	_acl_delete_entry
	cmn	w0, #1
	b.eq	LBB0_12
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x2, sp, #44
	mov	x0, x21
	mov	x1, x25
	bl	_acl_get_entry
	cmp	w0, #1
	b.ne	LBB0_14
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x27]
	ldr	w0, [sp, #44]
	add	x1, sp, #32
	bl	_acl_get_tag_type
	cmn	w0, #1
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #1
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_err
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #32]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	str	w28, [x24]
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w26, w26, #1
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_warnx
	b	LBB0_7
LBB0_13:
	mov	w26, #0
LBB0_14:
	ldr	x0, [x20]
	bl	_acl_free
	str	x22, [x20]
	cmp	w26, #0
	csetm	w0, ne
LBB0_15:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: branding mismatch; existing ACL is %s, entry to be removed is %s"

l_.str.1:                               ; @.str.1
	.asciz	"%s: acl_dup() failed"

	.comm	_ACL_UNDEFINED_TAG,8,3          ; @ACL_UNDEFINED_TAG
	.comm	_ACL_FIRST_ENTRY,4,2            ; @ACL_FIRST_ENTRY
	.comm	_ACL_NEXT_ENTRY,4,2             ; @ACL_NEXT_ENTRY
l_.str.2:                               ; @.str.2
	.asciz	"%s: acl_get_tag_type() failed"

	.comm	_ACL_MASK,8,3                   ; @ACL_MASK
	.comm	_have_mask,4,2                  ; @have_mask
l_.str.3:                               ; @.str.3
	.asciz	"%s: cannot remove non-existent ACL entry"

.subsections_via_symbols
