	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReleaseLockIfHeld
_ReleaseLockIfHeld:                     ## @ReleaseLockIfHeld
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_CurrentResourceOwner@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	jmp	LBB0_3
LBB0_1:
	xorl	%r13d, %r13d
LBB0_3:
	movq	16(%r15), %r12
	movl	(%r15), %ebx
	movq	%rbx, %rax
	shlq	$4, %rax
	addq	%r12, %rax
	addq	$-8, %rax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jle	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	decq	%rbx
	leaq	-16(%rax), %rcx
	cmpq	%r13, (%rax)
	movq	%rcx, %rax
	jne	LBB0_4
## %bb.6:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r14d
	shlq	$4, %r14
	leaq	(%r12,%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	cmpl	$0, (%r12,%r14)
	setg	%dil
	callq	_Assert
	movl	4(%r15), %eax
	subl	(%r12,%r14), %eax
	jle	LBB0_11
## %bb.7:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	incq	%rbx
	movl	%eax, 4(%r15)
	movl	(%r15), %eax
	decl	%eax
	movl	%eax, (%r15)
	testq	%r13, %r13
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ResourceOwnerForgetLock
	movl	(%r15), %eax
LBB0_9:
	cmpl	%ebx, %eax
	jl	LBB0_12
## %bb.10:
	cltq
	shlq	$4, %rax
	movups	(%r12,%rax), %xmm0
	movups	%xmm0, (%r14)
	jmp	LBB0_12
LBB0_11:
	sete	%al
	movzbl	%al, %edi
	callq	_Assert
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	$1, 4(%r15)
	movl	8(%r15), %esi
	addq	$12, %r15
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_LockRelease
	testl	%eax, %eax
	je	LBB0_13
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_elog                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CurrentResourceOwner,8,3       ## @CurrentResourceOwner
	.comm	_WARNING,4,2                    ## @WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ReleaseLockIfHeld: failed??"

	.no_dead_strip	_ReleaseLockIfHeld
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReleaseLockIfHeld
_ReleaseLockIfHeld:                     ; @ReleaseLockIfHeld
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CurrentResourceOwner@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CurrentResourceOwner@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	w1, #0
	csel	x21, x8, xzr, eq
	ldr	x22, [x0, #16]
	ldr	w24, [x0]
	add	x8, x22, x24, lsl #4
	sub	x8, x8, #8
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, #1
	b.lt	LBB0_9
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x24, x24, #1
	ldr	x9, [x8], #-16
	cmp	x9, x21
	b.ne	LBB0_1
; %bb.3:
	add	x23, x22, w24, uxtw #4
	ldr	w8, [x23]
	cmp	w8, #0
	cset	w0, gt
	bl	_Assert
	ldr	w8, [x23]
	ldr	w9, [x19, #4]
	subs	w9, w9, w8
	b.le	LBB0_8
; %bb.4:
	add	x20, x24, #1
	ldr	w8, [x19]
	sub	w8, w8, #1
	stp	w8, w9, [x19]
	cbz	x21, LBB0_6
; %bb.5:
	mov	x0, x21
	mov	x1, x19
	bl	_ResourceOwnerForgetLock
	ldr	w8, [x19]
LBB0_6:
	cmp	w8, w20
	b.lt	LBB0_9
; %bb.7:
	ldr	q0, [x22, w8, sxtw #4]
	str	q0, [x23]
	b	LBB0_9
LBB0_8:
	cset	w0, eq
	bl	_Assert
	mov	w8, #1
	str	w8, [x23]
	str	w8, [x19, #4]
	add	x0, x19, #12
	ldr	w1, [x19, #8]
	mov	x2, x20
	bl	_LockRelease
	cbz	w0, LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh3:
	adrp	x8, _WARNING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_elog
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CurrentResourceOwner,8,3       ; @CurrentResourceOwner
	.comm	_WARNING,4,2                    ; @WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ReleaseLockIfHeld: failed??"

	.no_dead_strip	_ReleaseLockIfHeld
.subsections_via_symbols
