	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acl_calc_mask                  ## -- Begin function acl_calc_mask
	.p2align	4, 0x90
_acl_calc_mask:                         ## @acl_calc_mask
	.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
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r13
	movq	(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.3:
	movq	_ACL_BRAND_POSIX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	__acl_brand_may_be
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movq	(%r13), %rdi
	movl	(%rbx), %esi
	callq	__acl_brand_as
	movq	(%r13), %rdi
	movl	(%rdi), %eax
	cmpl	$3, %eax
	jl	LBB0_2
## %bb.5:
	movq	_ACL_MAX_ENTRIES@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %eax
	jg	LBB0_2
## %bb.6:
	callq	_acl_dup
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_38
## %bb.7:
	movq	%rax, %r15
	movslq	(%rax), %r10
	testq	%r10, %r10
	jle	LBB0_8
## %bb.9:
	movl	%r10d, %r9d
	movq	8(%r15), %rcx
	movq	_ACL_PERM_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpl	$1, %r9d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_11
## %bb.10:
	xorl	%esi, %esi
	movl	$-1, %r11d
	xorl	%ecx, %ecx
LBB0_23:
	testb	$1, %r9b
	je	LBB0_29
## %bb.24:
	leaq	(%rsi,%rsi,2), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%rax,4), %edx
	leal	-130(%rdx), %edi
	cmpl	$2, %edi
	jb	LBB0_28
## %bb.25:
	cmpl	$128, %edx
	je	LBB0_28
## %bb.26:
	cmpl	$129, %edx
	jne	LBB0_29
## %bb.27:
	movl	%esi, %r11d
	jmp	LBB0_29
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r14d
LBB0_38:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%ecx, %ecx
	cmpl	(%rbx), %r10d
	jne	LBB0_34
LBB0_32:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_11:
	movl	%r9d, %eax
	andl	$-2, %eax
	leaq	16(%rcx), %rdx
	xorl	%esi, %esi
	movl	$-1, %r11d
	xorl	%ecx, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%rdx), %edi
	andl	%r12d, %edi
	orl	%edi, %ecx
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=1
	addq	$2, %rsi
	addq	$24, %rdx
	cmpq	%rsi, %rax
	je	LBB0_23
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	-16(%rdx), %ebx
	leal	-130(%rbx), %r8d
	cmpl	$2, %r8d
	jb	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$129, %ebx
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$128, %ebx
	jne	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-12(%rdx), %ebx
	andl	%r12d, %ebx
	orl	%ebx, %ecx
	jmp	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%esi, %r11d
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-4(%rdx), %ebx
	leal	-130(%rbx), %edi
	cmpl	$2, %edi
	jb	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$128, %ebx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$129, %ebx
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=1
	leal	1(%rsi), %r11d
	jmp	LBB0_22
LBB0_28:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	andl	4(%rdx,%rax,4), %r12d
	orl	%r12d, %ecx
LBB0_29:
	cmpl	$-1, %r11d
	je	LBB0_30
## %bb.39:
	movq	8(%r15), %rax
	movslq	%r11d, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	movl	%ecx, 4(%rax,%rdx,4)
	jmp	LBB0_35
LBB0_30:
	movq	_ACL_MAX_ENTRIES@GOTPCREL(%rip), %rbx
	cmpl	(%rbx), %r10d
	je	LBB0_32
LBB0_34:
	movq	8(%r15), %rax
	leaq	(%r10,%r10,2), %rdx
	movl	$129, (%rax,%rdx,4)
	movq	_ACL_UNDEFINED_ID@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, 8(%rax,%rdx,4)
	movl	%ecx, 4(%rax,%rdx,4)
	leal	1(%r10), %eax
	movl	%eax, (%r15)
LBB0_35:
	movq	%r15, %rdi
	callq	_acl_valid
	cmpl	$-1, %eax
	je	LBB0_36
## %bb.37:
	movq	(%r13), %rax
	movups	(%r15), %xmm0
	movups	%xmm0, (%rax)
	movq	%r15, %rdi
	callq	_acl_free
	xorl	%r14d, %r14d
	jmp	LBB0_38
LBB0_36:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_33:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	callq	_acl_free
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ACL_BRAND_POSIX,4,2            ## @ACL_BRAND_POSIX
	.comm	_ACL_MAX_ENTRIES,4,2            ## @ACL_MAX_ENTRIES
	.comm	_ACL_PERM_BITS,4,2              ## @ACL_PERM_BITS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ACL_UNDEFINED_ID,4,2           ## @ACL_UNDEFINED_ID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acl_calc_mask                  ; -- Begin function acl_calc_mask
	.p2align	2
_acl_calc_mask:                         ; @acl_calc_mask
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x20, _ACL_BRAND_POSIX@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ACL_BRAND_POSIX@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	__acl_brand_may_be
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	ldr	w1, [x20]
	bl	__acl_brand_as
	ldr	x0, [x19]
	ldr	w8, [x0]
Lloh2:
	adrp	x21, _ACL_MAX_ENTRIES@GOTPAGE
Lloh3:
	ldr	x21, [x21, _ACL_MAX_ENTRIES@GOTPAGEOFF]
	ldr	w9, [x21]
	cmp	w8, #3
	ccmp	w8, w9, #0, ge
	b.le	LBB0_7
LBB0_4:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
LBB0_5:
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	_acl_dup
	cbz	x0, LBB0_5
; %bb.8:
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.9:
	mov	x10, #0
	mov	w9, #0
	ldr	x12, [x20, #8]
Lloh10:
	adrp	x11, _ACL_PERM_BITS@GOTPAGE
Lloh11:
	ldr	x11, [x11, _ACL_PERM_BITS@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	add	x12, x12, #4
	mov	w13, #-1
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w14, [x12]
	and	w14, w11, w14
	orr	w9, w14, w9
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x10, x10, #1
	add	x12, x12, #12
	cmp	x8, x10
	b.eq	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x12, #-4]
	sub	w15, w14, #130
	cmp	w15, #2
	b.lo	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w14, #129
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	w14, #128
	b.eq	LBB0_10
	b	LBB0_11
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x13, x10
	b	LBB0_11
LBB0_16:
	cmn	w13, #1
	b.eq	LBB0_19
; %bb.17:
	ldr	x8, [x20, #8]
	mov	w10, #12
	smaddl	x8, w13, w10, x8
	str	w9, [x8, #4]
	b	LBB0_22
LBB0_18:
	mov	w9, #0
LBB0_19:
	sxtw	x10, w8
	ldr	w11, [x21]
	cmp	w10, w11
	b.ne	LBB0_21
; %bb.20:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_25
LBB0_21:
	ldr	x11, [x20, #8]
	mov	w12, #12
	madd	x10, x10, x12, x11
	mov	w11, #129
Lloh15:
	adrp	x12, _ACL_UNDEFINED_ID@GOTPAGE
Lloh16:
	ldr	x12, [x12, _ACL_UNDEFINED_ID@GOTPAGEOFF]
	str	w11, [x10]
Lloh17:
	ldr	w11, [x12]
	stp	w9, w11, [x10, #4]
	add	w8, w8, #1
	str	w8, [x20]
LBB0_22:
	mov	x0, x20
	bl	_acl_valid
	cmn	w0, #1
	b.eq	LBB0_24
; %bb.23:
	ldr	x8, [x19]
	ldr	q0, [x20]
	str	q0, [x8]
	mov	x0, x20
	bl	_acl_free
	mov	w0, #0
	b	LBB0_6
LBB0_24:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_25:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _errno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	mov	x0, x20
	bl	_acl_free
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ACL_BRAND_POSIX,4,2            ; @ACL_BRAND_POSIX
	.comm	_ACL_MAX_ENTRIES,4,2            ; @ACL_MAX_ENTRIES
	.comm	_ACL_PERM_BITS,4,2              ; @ACL_PERM_BITS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ACL_UNDEFINED_ID,4,2           ; @ACL_UNDEFINED_ID
.subsections_via_symbols
