	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_spin_trylock           ## -- Begin function pthread_spin_trylock
	.p2align	4, 0x90
_pthread_spin_trylock:                  ## @pthread_spin_trylock
	.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
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_11
## %bb.2:
	movq	_PTHREAD_SPINLOCK_INITIALIZER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_3
LBB0_5:
	leaq	4(%r14), %rdi
	movl	$130, %esi
	movl	$129, %edx
	callq	_PTE_ATOMIC_COMPARE_EXCHANGE
	cmpq	$128, %rax
	je	LBB0_10
## %bb.6:
	cmpq	$129, %rax
	je	LBB0_7
## %bb.8:
	cmpq	$130, %rax
	jne	LBB0_11
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
LBB0_13:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	_pte_spinlock_check_need_init
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	(%rbx), %r14
	jmp	LBB0_5
LBB0_10:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pthread_mutex_trylock          ## TAILCALL
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_SPINLOCK_INITIALIZER,8,3 ## @PTHREAD_SPINLOCK_INITIALIZER
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pthread_spin_trylock           ; -- Begin function pthread_spin_trylock
	.p2align	2
_pthread_spin_trylock:                  ; @pthread_spin_trylock
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0]
	cbz	x19, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _PTHREAD_SPINLOCK_INITIALIZER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTHREAD_SPINLOCK_INITIALIZER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x19, x8
	b.eq	LBB0_10
LBB0_3:
	add	x0, x19, #4
	mov	w1, #130
	mov	w2, #129
	bl	_PTE_ATOMIC_COMPARE_EXCHANGE
	cmp	x0, #128
	b.eq	LBB0_12
; %bb.4:
	cmp	x0, #129
	b.eq	LBB0_13
; %bb.5:
	cmp	x0, #130
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	x0, x20
	bl	_pte_spinlock_check_need_init
	cbnz	w0, LBB0_9
; %bb.11:
	ldr	x19, [x20]
	b	LBB0_3
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pthread_mutex_trylock
LBB0_13:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_SPINLOCK_INITIALIZER,8,3 ; @PTHREAD_SPINLOCK_INITIALIZER
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
