	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LockHasWaiters                 ## -- Begin function LockHasWaiters
	.p2align	4, 0x90
_LockHasWaiters:                        ## @LockHasWaiters
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	_LockMethods@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_lengthof
	cmpq	%rax, %rbx
	jb	LBB0_3
LBB0_2:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_elog
LBB0_3:
	movq	_LockMethods@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %r13
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	cmpq	%r15, (%r13)
	jae	LBB0_6
LBB0_5:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_elog
LBB0_6:
	leaq	-80(%rbp), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_MemSet
	movups	(%r12), %xmm0
	movups	%xmm0, -72(%rbp)
	movq	%r15, -80(%rbp)
	movq	_LockMethodLocalHash@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HASH_FIND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_hash_search
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %rbx
	cmpq	$0, (%rax)
	jle	LBB0_8
## %bb.9:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	24(%rbx), %edi
	callq	_LockHashPartitionLock
	movq	%rax, %rdi
	movq	_LW_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_LWLockAcquire
	movq	16(%rbx), %r14
	leaq	L_.str.3(%rip), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_LOCK_PRINT
	movq	8(%rbx), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_PROCLOCK_PRINT
	movl	(%r13), %r12d
	movq	%r15, %rdi
	callq	_LOCKBIT_ON
	testl	%r12d, %eax
	je	LBB0_10
## %bb.11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%r14), %ecx
	xorl	%r14d, %r14d
	andl	(%rax,%r15,4), %ecx
	setne	%r14b
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_LWLockRelease
	jmp	LBB0_12
LBB0_8:
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_elog
	jmp	LBB0_12
LBB0_10:
	leaq	L_.str.4(%rip), %rdi
	movq	%r13, %rsi
	callq	_PROCLOCK_PRINT
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_LWLockRelease
	movq	_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax,%r15,8), %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_elog
	movq	%rbx, %rdi
	callq	_RemoveLocalLock
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LockMethods,8,3                ## @LockMethods
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unrecognized lock method: %d"

L_.str.1:                               ## @.str.1
	.asciz	"unrecognized lock mode: %d"

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

	.comm	_LW_SHARED,4,2                  ## @LW_SHARED
L_.str.3:                               ## @.str.3
	.asciz	"LockHasWaiters: found"

L_.str.4:                               ## @.str.4
	.asciz	"LockHasWaiters: WRONGTYPE"

	.comm	_LOG,4,2                        ## @LOG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LockHasWaiters                 ; -- Begin function LockHasWaiters
	.p2align	2
_LockHasWaiters:                        ; @LockHasWaiters
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x23, _LockMethods@GOTPAGE
Lloh1:
	ldr	x23, [x23, _LockMethods@GOTPAGEOFF]
Lloh2:
	adrp	x22, _ERROR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ERROR@GOTPAGEOFF]
	cbz	x21, LBB0_2
; %bb.1:
	ldr	x0, [x23]
	bl	_lengthof
	cmp	x21, x0
	b.lo	LBB0_3
LBB0_2:
	ldr	w0, [x22]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_elog
LBB0_3:
	ldr	x8, [x23]
	ldr	x25, [x8, x21, lsl #3]
	cbz	x19, LBB0_5
; %bb.4:
	ldr	x8, [x25]
	cmp	x8, x19
	b.hs	LBB0_6
LBB0_5:
	ldr	w0, [x22]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_elog
LBB0_6:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_MemSet
	ldr	q0, [x20]
	stur	q0, [sp, #16]
	str	x19, [sp, #8]
Lloh8:
	adrp	x8, _LockMethodLocalHash@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LockMethodLocalHash@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _HASH_FIND@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HASH_FIND@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x3, #0
	bl	_hash_search
	cbz	x0, LBB0_10
; %bb.7:
	mov	x20, x0
	ldr	x8, [x0]
	cmp	x8, #0
	b.le	LBB0_10
; %bb.8:
	ldr	w0, [x20, #24]
	bl	_LockHashPartitionLock
	mov	x21, x0
Lloh14:
	adrp	x8, _LW_SHARED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LW_SHARED@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_LWLockAcquire
	ldr	x22, [x20, #16]
Lloh17:
	adrp	x24, l_.str.3@PAGE
Lloh18:
	add	x24, x24, l_.str.3@PAGEOFF
	mov	x0, x24
	mov	x1, x22
	mov	x2, x19
	bl	_LOCK_PRINT
	ldr	x23, [x20, #8]
	mov	x0, x24
	mov	x1, x23
	bl	_PROCLOCK_PRINT
	ldr	w24, [x23]
	mov	x0, x19
	bl	_LOCKBIT_ON
	tst	w0, w24
	b.eq	LBB0_11
; %bb.9:
	ldr	x8, [x25, #16]
	ldr	w8, [x8, x19, lsl #2]
	ldr	w9, [x22]
	tst	w9, w8
	cset	w19, ne
	mov	x0, x21
	bl	_LWLockRelease
	b	LBB0_13
LBB0_10:
Lloh19:
	adrp	x8, _WARNING@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	x8, [x25, #8]
	ldr	x2, [x8, x19, lsl #3]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
	b	LBB0_12
LBB0_11:
Lloh24:
	adrp	x0, l_.str.4@PAGE
Lloh25:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x23
	bl	_PROCLOCK_PRINT
	mov	x0, x21
	bl	_LWLockRelease
Lloh26:
	adrp	x8, _WARNING@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WARNING@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	x8, [x25, #8]
	ldr	x2, [x8, x19, lsl #3]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_elog
	mov	x0, x20
	bl	_RemoveLocalLock
LBB0_12:
	mov	w19, #0
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_LockMethods,8,3                ; @LockMethods
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unrecognized lock method: %d"

l_.str.1:                               ; @.str.1
	.asciz	"unrecognized lock mode: %d"

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

	.comm	_LW_SHARED,4,2                  ; @LW_SHARED
l_.str.3:                               ; @.str.3
	.asciz	"LockHasWaiters: found"

l_.str.4:                               ; @.str.4
	.asciz	"LockHasWaiters: WRONGTYPE"

	.comm	_LOG,4,2                        ; @LOG
.subsections_via_symbols
