	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LockRefindAndRelease
_LockRefindAndRelease:                  ## @LockRefindAndRelease
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rdi
	callq	_LockTagHashCode
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_LockHashPartitionLock
	movq	%rax, %rdi
	movq	_LW_EXCLUSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_LWLockAcquire
	movq	_LockMethodLockHash@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HASH_FIND@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	%r13, %rdx
	xorl	%r8d, %r8d
	callq	_hash_search_with_hash_value
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_2:
	movq	%r12, -88(%rbp)
	movq	%r14, -96(%rbp)
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ProcLockHashCode
	movq	_LockMethodProcLockHash@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	(%r15), %ecx
	movq	%rbx, %rsi
	movq	%rax, %rdx
	xorl	%r8d, %r8d
	callq	_hash_search_with_hash_value
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_PANIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_4:
	movl	(%rbx), %r14d
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_LOCKBIT_ON
	testl	%r14d, %eax
	je	LBB0_5
## %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	callq	_UnGrantLock
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	movl	%eax, %r8d
	callq	_CleanUpLock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_LWLockRelease
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.7:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_ConflictsWithRelationFastPath
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	callq	_FastPathStrongLockHashPartition
	movq	%rax, %rbx
	movq	_FastPathStrongRelationLocks@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	$8, %rdi
	callq	_SpinLockAcquire
	movq	(%r14), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%rbx,8)
	setg	%dil
	callq	_Assert
	movq	(%r14), %rdi
	movq	(%rdi), %rax
	decq	(%rax,%rbx,8)
	addq	$8, %rdi
	callq	_SpinLockRelease
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_PROCLOCK_PRINT
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_LWLockRelease
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	(%rax,%r15,4), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
LBB0_9:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LW_EXCLUSIVE,4,2               ## @LW_EXCLUSIVE
	.comm	_LockMethodLockHash,4,2         ## @LockMethodLockHash
	.comm	_HASH_FIND,4,2                  ## @HASH_FIND
	.comm	_PANIC,4,2                      ## @PANIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to re-find shared lock object"

	.comm	_LockMethodProcLockHash,4,2     ## @LockMethodProcLockHash
L_.str.1:                               ## @.str.1
	.asciz	"failed to re-find shared proclock object"

L_.str.2:                               ## @.str.2
	.asciz	"lock_twophase_postcommit: WRONGTYPE"

	.comm	_WARNING,4,2                    ## @WARNING
L_.str.3:                               ## @.str.3
	.asciz	"you don't own a lock of type %s"

	.comm	_FastPathStrongRelationLocks,8,3 ## @FastPathStrongRelationLocks
	.no_dead_strip	_LockRefindAndRelease
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LockRefindAndRelease
_LockRefindAndRelease:                  ; @LockRefindAndRelease
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x19, x3
	mov	x21, x2
	mov	x26, x1
	mov	x22, x0
	mov	x0, x2
	bl	_LockTagHashCode
	mov	x20, x0
	bl	_LockHashPartitionLock
	mov	x24, x0
Lloh0:
	adrp	x8, _LW_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LW_EXCLUSIVE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_LWLockAcquire
Lloh3:
	adrp	x8, _LockMethodLockHash@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LockMethodLockHash@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x27, _HASH_FIND@GOTPAGE
Lloh7:
	ldr	x27, [x27, _HASH_FIND@GOTPAGEOFF]
	ldr	w3, [x27]
	mov	x1, x21
	mov	x2, x20
	mov	x4, #0
	bl	_hash_search_with_hash_value
	mov	x25, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _PANIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elog
LBB0_2:
	stp	x26, x25, [sp, #16]
	add	x0, sp, #16
	mov	x1, x20
	bl	_ProcLockHashCode
	mov	x2, x0
Lloh13:
	adrp	x8, _LockMethodProcLockHash@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LockMethodProcLockHash@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	w3, [x27]
	add	x1, sp, #16
	mov	x4, #0
	bl	_hash_search_with_hash_value
	mov	x26, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh16:
	adrp	x8, _PANIC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PANIC@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_elog
LBB0_4:
	ldr	w27, [x26]
	mov	x0, x19
	bl	_LOCKBIT_ON
	tst	w0, w27
	b.eq	LBB0_8
; %bb.5:
	mov	x0, x25
	mov	x1, x19
	mov	x2, x26
	mov	x3, x22
	bl	_UnGrantLock
	mov	x4, x0
	mov	x0, x25
	mov	x1, x26
	mov	x2, x22
	mov	x3, x20
	bl	_CleanUpLock
	mov	x0, x24
	bl	_LWLockRelease
	cbz	w23, LBB0_9
; %bb.6:
	mov	x0, x21
	mov	x1, x19
	bl	_ConflictsWithRelationFastPath
	cbz	x0, LBB0_9
; %bb.7:
	mov	x0, x20
	bl	_FastPathStrongLockHashPartition
	mov	x19, x0
Lloh21:
	adrp	x20, _FastPathStrongRelationLocks@GOTPAGE
Lloh22:
	ldr	x20, [x20, _FastPathStrongRelationLocks@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_SpinLockAcquire
	ldr	x8, [x20]
	ldr	x8, [x8]
	lsl	x19, x19, #3
	ldr	x8, [x8, x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_Assert
	ldr	x0, [x20]
	ldr	x8, [x0], #8
	ldr	x9, [x8, x19]
	sub	x9, x9, #1
	str	x9, [x8, x19]
	bl	_SpinLockRelease
	b	LBB0_9
LBB0_8:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x26
	bl	_PROCLOCK_PRINT
	mov	x0, x24
	bl	_LWLockRelease
Lloh25:
	adrp	x8, _WARNING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	ldr	x8, [x22]
	ldr	w8, [x8, x19, lsl #2]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_elog
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_LW_EXCLUSIVE,4,2               ; @LW_EXCLUSIVE
	.comm	_LockMethodLockHash,4,2         ; @LockMethodLockHash
	.comm	_HASH_FIND,4,2                  ; @HASH_FIND
	.comm	_PANIC,4,2                      ; @PANIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to re-find shared lock object"

	.comm	_LockMethodProcLockHash,4,2     ; @LockMethodProcLockHash
l_.str.1:                               ; @.str.1
	.asciz	"failed to re-find shared proclock object"

l_.str.2:                               ; @.str.2
	.asciz	"lock_twophase_postcommit: WRONGTYPE"

	.comm	_WARNING,4,2                    ; @WARNING
l_.str.3:                               ; @.str.3
	.asciz	"you don't own a lock of type %s"

	.comm	_FastPathStrongRelationLocks,8,3 ; @FastPathStrongRelationLocks
	.no_dead_strip	_LockRefindAndRelease
.subsections_via_symbols
