	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function downgradeAllSharedCacheTableLocks
_downgradeAllSharedCacheTableLocks:     ## @downgradeAllSharedCacheTableLocks
	.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), %rax
	cmpq	%rdi, 16(%rax)
	je	LBB0_1
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	$0, 16(%rax)
	movq	_BTS_EXCLUSIVE@GOTPCREL(%rip), %rcx
	movq	_BTS_PENDING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%edx
	andl	%edx, (%rax)
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.2:
	movq	%rdi, %r14
	movq	_READ_LOCK@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	16(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rcx
	movb	$1, %al
	cmpq	(%r15), %rcx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r14, 8(%rbx)
	sete	%al
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BTS_EXCLUSIVE,4,2              ## @BTS_EXCLUSIVE
	.comm	_BTS_PENDING,4,2                ## @BTS_PENDING
	.comm	_READ_LOCK,8,3                  ## @READ_LOCK
	.no_dead_strip	_downgradeAllSharedCacheTableLocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function downgradeAllSharedCacheTableLocks
_downgradeAllSharedCacheTableLocks:     ; @downgradeAllSharedCacheTableLocks
	.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
	ldr	x8, [x0]
	ldr	x9, [x8, #16]
	cmp	x9, x0
	b.eq	LBB0_2
LBB0_1:
	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_2:
	str	xzr, [x8, #16]
Lloh0:
	adrp	x9, _BTS_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BTS_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _BTS_PENDING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _BTS_PENDING@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	w10, [x8]
	bic	w9, w10, w9
	str	w9, [x8]
	ldr	x20, [x8, #8]
	cbz	x20, LBB0_1
; %bb.3:
	mov	x19, x0
Lloh6:
	adrp	x21, _READ_LOCK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _READ_LOCK@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x20, #8]
	cmp	x8, x19
	cset	w0, eq
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_assert
	ldr	x8, [x21]
	str	x8, [x20]
	ldr	x20, [x20, #16]
	cbz	x20, LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BTS_EXCLUSIVE,4,2              ; @BTS_EXCLUSIVE
	.comm	_BTS_PENDING,4,2                ; @BTS_PENDING
	.comm	_READ_LOCK,8,3                  ; @READ_LOCK
	.no_dead_strip	_downgradeAllSharedCacheTableLocks
.subsections_via_symbols
