	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adjust_shared_perm             ## -- Begin function adjust_shared_perm
	.p2align	4, 0x90
_adjust_shared_perm:                    ## @adjust_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_get_shared_repository
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	leaq	-28(%rbp), %rsi
	movq	%r14, %rdi
	callq	_get_st_mode_bits
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movl	-28(%rbp), %edi
	callq	_calc_shared_perm
	movl	%eax, %ebx
	movl	-28(%rbp), %edi
	callq	_S_ISDIR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	%ebx, %eax
	shrl	$2, %eax
	andl	$73, %eax
	orl	%ebx, %eax
	movq	_FORCE_DIR_SET_GID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %ebx
LBB0_5:
	movl	-28(%rbp), %ecx
	xorl	%ebx, %ecx
	movq	_S_IFMT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %ecx
	je	LBB0_8
## %bb.6:
	andl	%eax, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_chmod
	testq	%rax, %rax
	jns	LBB0_8
## %bb.7:
	movl	$-2, %r15d
	jmp	LBB0_8
LBB0_2:
	movl	$-1, %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FORCE_DIR_SET_GID,4,2          ## @FORCE_DIR_SET_GID
	.comm	_S_IFMT,4,2                     ## @S_IFMT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adjust_shared_perm             ; -- Begin function adjust_shared_perm
	.p2align	2
_adjust_shared_perm:                    ; @adjust_shared_perm
	.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	_get_shared_repository
	cbz	w0, LBB0_9
; %bb.1:
	add	x1, sp, #12
	mov	x0, x19
	bl	_get_st_mode_bits
	tbnz	x0, #63, LBB0_7
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_calc_shared_perm
	mov	x20, x0
	ldr	w0, [sp, #12]
	bl	_S_ISDIR
	cbz	x0, LBB0_4
; %bb.3:
	mov	w8, #73
	and	w8, w8, w20, lsr #2
	orr	w8, w8, w20
Lloh0:
	adrp	x9, _FORCE_DIR_SET_GID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FORCE_DIR_SET_GID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	orr	w20, w8, w9
LBB0_4:
	ldr	w8, [sp, #12]
	eor	w9, w8, w20
Lloh3:
	adrp	x8, _S_IFMT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _S_IFMT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bics	wzr, w9, w8
	b.eq	LBB0_6
; %bb.5:
	mvn	w8, w8
	and	w1, w20, w8
	mov	x0, x19
	bl	_chmod
	tbnz	x0, #63, LBB0_8
LBB0_6:
	mov	w0, #0
	b	LBB0_9
LBB0_7:
	mov	w0, #-1
	b	LBB0_9
LBB0_8:
	mov	w0, #-2
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FORCE_DIR_SET_GID,4,2          ; @FORCE_DIR_SET_GID
	.comm	_S_IFMT,4,2                     ; @S_IFMT
.subsections_via_symbols
