	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GrantLock                      ## -- Begin function GrantLock
	.p2align	4, 0x90
_GrantLock:                             ## @GrantLock
	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	incq	(%rdi)
	movq	8(%rdi), %rax
	incq	(%rax,%rdx,8)
	movq	%rdx, %rdi
	callq	_LOCKBIT_ON
	orl	%eax, 36(%rbx)
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rax,%r14,8), %rax
	cmpq	(%rcx,%r14,8), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_LOCKBIT_OFF
	andl	%eax, 32(%rbx)
LBB0_2:
	movq	%r14, %rdi
	callq	_LOCKBIT_ON
	orl	%eax, (%r15)
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_LOCK_PRINT
	cmpq	$0, (%rbx)
	jle	LBB0_3
## %bb.4:
	movq	8(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax,%r14,8)
	setg	%dil
	jmp	LBB0_5
LBB0_3:
	xorl	%edi, %edi
LBB0_5:
	callq	_Assert
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	24(%rbx), %rax
	setle	%dil
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Assert                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GrantLock"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GrantLock                      ; -- Begin function GrantLock
	.p2align	2
_GrantLock:                             ; @GrantLock
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldp	x8, x9, [x0]
	add	x8, x8, #1
	str	x8, [x0]
	lsl	x22, x2, #3
	ldr	x8, [x9, x22]
	add	x8, x8, #1
	str	x8, [x9, x22]
	mov	x0, x2
	bl	_LOCKBIT_ON
	ldr	w8, [x19, #36]
	orr	w8, w8, w0
	str	w8, [x19, #36]
	ldp	x8, x9, [x19, #8]
	ldr	x8, [x8, x22]
	ldr	x9, [x9, x22]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_LOCKBIT_OFF
	ldr	w8, [x19, #32]
	and	w8, w8, w0
	str	w8, [x19, #32]
LBB0_2:
	mov	x0, x20
	bl	_LOCKBIT_ON
	ldr	w8, [x21]
	orr	w8, w8, w0
	str	w8, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_LOCK_PRINT
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x20, lsl #3]
	cmp	x8, #0
	cset	w0, gt
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	bl	_Assert
	ldr	x8, [x19]
	ldr	x9, [x19, #24]
	cmp	x8, x9
	cset	w0, le
	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
	b	_Assert
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GrantLock"

.subsections_via_symbols
