	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_shared_perm
_calc_shared_perm:                      ## @calc_shared_perm
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_get_shared_repository
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_get_shared_repository
	movl	%eax, %r12d
	negl	%eax
	testl	%r15d, %r15d
	cmovsl	%eax, %r12d
	movq	_S_IWUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movl	%r12d, %ecx
	andl	$-147, %ecx
	testl	%eax, %eax
	cmovel	%ecx, %r12d
	movq	_S_IXUSR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	movl	%r12d, %ebx
	shrl	$2, %ebx
	andl	$73, %ebx
	testl	%eax, %eax
	cmovel	%eax, %ebx
	xorl	%eax, %eax
	callq	_get_shared_repository
	movl	%r14d, %ecx
	andl	$-512, %ecx                     ## imm = 0xFE00
	testl	%eax, %eax
	cmovnsl	%r14d, %ecx
	orl	%r12d, %ecx
	orl	%ebx, %ecx
	movl	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_S_IXUSR,4,2                    ## @S_IXUSR
	.no_dead_strip	_calc_shared_perm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_shared_perm
_calc_shared_perm:                      ; @calc_shared_perm
	.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
	mov	x19, x0
	bl	_get_shared_repository
	mov	x20, x0
	bl	_get_shared_repository
	cmp	w20, #0
	cneg	w8, w0, lt
Lloh0:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #-147
	and	w10, w8, w10
	tst	w9, w19
Lloh3:
	adrp	x9, _S_IXUSR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S_IXUSR@GOTPAGEOFF]
	csel	w20, w10, w8, eq
Lloh5:
	ldr	w8, [x9]
	mov	w9, #73
	and	w9, w9, w20, lsr #2
	tst	w8, w19
	csel	w21, wzr, w9, eq
	bl	_get_shared_repository
	and	w8, w19, #0xfffffe00
	cmp	w0, #0
	csel	w8, w8, w19, lt
	orr	w8, w8, w20
	orr	w0, w8, w21
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_S_IXUSR,4,2                    ; @S_IXUSR
	.no_dead_strip	_calc_shared_perm
.subsections_via_symbols
