	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function WALInsertLockAcquire
_WALInsertLockAcquire:                  ## @WALInsertLockAcquire
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	_WALInsertLockAcquire.lockToTry(%rip), %edx
	cmpl	$-1, %edx
	jne	LBB0_2
## %bb.1:
	movq	_MyProc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movq	_NUM_XLOGINSERT_LOCKS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, _WALInsertLockAcquire.lockToTry(%rip)
LBB0_2:
	movslq	%edx, %rdi
	movq	_MyLockNo@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	movq	_WALInsertLocks@GOTPCREL(%rip), %rax
	shlq	$2, %rdi
	addq	(%rax), %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_LWLockAcquire
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	popq	%rbp
	retq
LBB0_3:
	movl	_WALInsertLockAcquire.lockToTry(%rip), %eax
	incl	%eax
	movq	_NUM_XLOGINSERT_LOCKS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%edx, _WALInsertLockAcquire.lockToTry(%rip)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	2                               ## @WALInsertLockAcquire.lockToTry
_WALInsertLockAcquire.lockToTry:
	.long	4294967295                      ## 0xffffffff

	.comm	_MyProc,8,3                     ## @MyProc
	.comm	_NUM_XLOGINSERT_LOCKS,4,2       ## @NUM_XLOGINSERT_LOCKS
	.comm	_MyLockNo,8,3                   ## @MyLockNo
	.comm	_WALInsertLocks,8,3             ## @WALInsertLocks
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.no_dead_strip	_WALInsertLockAcquire
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function WALInsertLockAcquire
_WALInsertLockAcquire:                  ; @WALInsertLockAcquire
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	adrp	x19, _WALInsertLockAcquire.lockToTry@PAGE
	ldr	w8, [x19, _WALInsertLockAcquire.lockToTry@PAGEOFF]
	cmn	w8, #1
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _MyProc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MyProc@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NUM_XLOGINSERT_LOCKS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NUM_XLOGINSERT_LOCKS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19, _WALInsertLockAcquire.lockToTry@PAGEOFF]
LBB0_2:
	sxtw	x9, w8
Lloh6:
	adrp	x10, _MyLockNo@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MyLockNo@GOTPAGEOFF]
Lloh8:
	adrp	x11, _WALInsertLocks@GOTPAGE
Lloh9:
	ldr	x11, [x11, _WALInsertLocks@GOTPAGEOFF]
Lloh10:
	str	x9, [x10]
Lloh11:
	ldr	x9, [x11]
	add	x0, x9, w8, sxtw #2
Lloh12:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w8, [x19, _WALInsertLockAcquire.lockToTry@PAGEOFF]
	add	w8, w8, #1
Lloh15:
	adrp	x9, _NUM_XLOGINSERT_LOCKS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NUM_XLOGINSERT_LOCKS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [x19, _WALInsertLockAcquire.lockToTry@PAGEOFF]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @WALInsertLockAcquire.lockToTry
_WALInsertLockAcquire.lockToTry:
	.long	4294967295                      ; 0xffffffff

	.comm	_MyProc,8,3                     ; @MyProc
	.comm	_NUM_XLOGINSERT_LOCKS,4,2       ; @NUM_XLOGINSERT_LOCKS
	.comm	_MyLockNo,8,3                   ; @MyLockNo
	.comm	_WALInsertLocks,8,3             ; @WALInsertLocks
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.no_dead_strip	_WALInsertLockAcquire
.subsections_via_symbols
