	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UnGrantLock
_UnGrantLock:                           ## @UnGrantLock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorl	%r13d, %r13d
	cmpq	$0, (%rdi)
	movl	$0, %edi
	jle	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%r12,8)
	setg	%dil
LBB0_2:
	callq	_Assert
	cmpq	$0, 16(%rbx)
	jle	LBB0_4
## %bb.3:
	movq	24(%rbx), %rax
	xorl	%r13d, %r13d
	cmpq	$0, (%rax,%r12,8)
	setg	%r13b
LBB0_4:
	movl	%r13d, %edi
	callq	_Assert
	movq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setle	%dil
	callq	_Assert
	decq	(%rbx)
	movq	8(%rbx), %rax
	decq	(%rax,%r12,8)
	decq	16(%rbx)
	movq	24(%rbx), %rax
	decq	(%rax,%r12,8)
	jne	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_LOCKBIT_OFF
	andl	%eax, 36(%rbx)
LBB0_6:
	leaq	L_.str(%rip), %r13
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_LOCK_PRINT
	movq	(%r15), %rax
	movl	32(%rbx), %ecx
	xorl	%ebx, %ebx
	andl	(%rax,%r12,4), %ecx
	setne	%bl
	movq	%r12, %rdi
	callq	_LOCKBIT_OFF
	andl	%eax, (%r14)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_PROCLOCK_PRINT
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UnGrantLock: updated"

	.no_dead_strip	_UnGrantLock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UnGrantLock
_UnGrantLock:                           ; @UnGrantLock
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x8, #0
	cset	w0, gt
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_Assert
	ldr	x8, [x22, #16]
	cmp	x8, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	x8, [x22, #24]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x8, #0
	cset	w0, gt
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	bl	_Assert
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, le
	bl	_Assert
	ldp	x8, x9, [x22]
	sub	x8, x8, #1
	str	x8, [x22]
	lsl	x8, x20, #3
	ldr	x10, [x9, x8]
	sub	x10, x10, #1
	str	x10, [x9, x8]
	ldp	x9, x10, [x22, #16]
	sub	x9, x9, #1
	str	x9, [x22, #16]
	ldr	x9, [x10, x8]
	subs	x9, x9, #1
	str	x9, [x10, x8]
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_LOCKBIT_OFF
	ldr	w8, [x22, #36]
	and	w8, w8, w0
	str	w8, [x22, #36]
LBB0_8:
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_LOCK_PRINT
	ldr	x8, [x21]
	ldr	w8, [x8, x20, lsl #2]
	ldr	w9, [x22, #32]
	tst	w9, w8
	cset	w21, ne
	mov	x0, x20
	bl	_LOCKBIT_OFF
	ldr	w8, [x19]
	and	w8, w8, w0
	str	w8, [x19]
	mov	x0, x23
	mov	x1, x19
	bl	_PROCLOCK_PRINT
	mov	x0, x21
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UnGrantLock: updated"

	.no_dead_strip	_UnGrantLock
.subsections_via_symbols
