	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___thr_spinlock                 ## -- Begin function __thr_spinlock
	.p2align	4, 0x90
___thr_spinlock:                        ## @__thr_spinlock
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	__thr_isthreaded
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_PANIC
LBB0_2:
	movq	_initialized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_PANIC
LBB0_4:
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_init_spinlock
	movq	(%r14), %rbx
LBB0_6:
	xorl	%eax, %eax
	callq	__get_curthread
	movl	%eax, %edi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_THR_UMUTEX_LOCK                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Spinlock called when not threaded."

	.comm	_initialized,4,2                ## @initialized
L_.str.1:                               ## @.str.1
	.asciz	"Spinlocks not initialized."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___thr_spinlock                 ; -- Begin function __thr_spinlock
	.p2align	2
___thr_spinlock:                        ; @__thr_spinlock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	__thr_isthreaded
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_PANIC
LBB0_2:
Lloh2:
	adrp	x8, _initialized@GOTPAGE
Lloh3:
	ldr	x8, [x8, _initialized@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_5
; %bb.3:
	ldr	x20, [x19]
	cbz	x20, LBB0_6
LBB0_4:
	bl	__get_curthread
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_THR_UMUTEX_LOCK
LBB0_5:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_PANIC
	ldr	x20, [x19]
	cbnz	x20, LBB0_4
LBB0_6:
	mov	x0, x19
	bl	_init_spinlock
	ldr	x20, [x19]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Spinlock called when not threaded."

	.comm	_initialized,4,2                ; @initialized
l_.str.1:                               ; @.str.1
	.asciz	"Spinlocks not initialized."

.subsections_via_symbols
