	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function perform_spin_delay
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_perform_spin_delay
	.p2align	4, 0x90
_perform_spin_delay:                    ## @perform_spin_delay
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_SPIN_DELAY
	movq	(%rbx), %rax
	incq	%rax
	movq	%rax, (%rbx)
	movq	_spins_per_delay@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_8
## %bb.1:
	movq	8(%rbx), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%rbx)
	movq	_NUM_DELAYS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_3
## %bb.2:
	movl	28(%rbx), %edi
	movl	20(%rbx), %edx
	movl	24(%rbx), %esi
	callq	_s_lock_stuck
LBB0_3:
	movl	16(%rbx), %edi
	testl	%edi, %edi
	jne	LBB0_5
## %bb.4:
	movq	_MIN_DELAY_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 16(%rbx)
LBB0_5:
	callq	_pg_usleep
	cvtsi2sdl	16(%rbx), %xmm0
	movsd	%xmm0, -16(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	callq	_random
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	_MAX_RANDOM_VALUE@GOTPCREL(%rip), %rax
	cvtsi2sdq	(%rax), %xmm1
	divsd	%xmm1, %xmm0
	mulsd	-16(%rbp), %xmm0                ## 8-byte Folded Reload
	addsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %eax
	addl	16(%rbx), %eax
	movl	%eax, 16(%rbx)
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movq	_MAX_DELAY_USEC@GOTPCREL(%rip), %rax
	ucomisd	(%rax), %xmm0
	jbe	LBB0_7
## %bb.6:
	movq	_MIN_DELAY_USEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
LBB0_7:
	movq	$0, (%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_spins_per_delay,8,3            ## @spins_per_delay
	.comm	_NUM_DELAYS,8,3                 ## @NUM_DELAYS
	.comm	_MIN_DELAY_USEC,8,3             ## @MIN_DELAY_USEC
	.comm	_MAX_RANDOM_VALUE,8,3           ## @MAX_RANDOM_VALUE
	.comm	_MAX_DELAY_USEC,8,3             ## @MAX_DELAY_USEC
	.comm	_stdout,4,2                     ## @stdout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_perform_spin_delay             ; -- Begin function perform_spin_delay
	.p2align	2
_perform_spin_delay:                    ; @perform_spin_delay
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	mov	x19, x0
	bl	_SPIN_DELAY
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
Lloh0:
	adrp	x9, _spins_per_delay@GOTPAGE
Lloh1:
	ldr	x9, [x9, _spins_per_delay@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.1:
	ldr	x8, [x19, #8]
	add	x9, x8, #1
	str	x9, [x19, #8]
Lloh3:
	adrp	x9, _NUM_DELAYS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NUM_DELAYS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_3
; %bb.2:
	ldp	w1, w0, [x19, #24]
	ldr	w2, [x19, #20]
	bl	_s_lock_stuck
LBB0_3:
	ldr	w0, [x19, #16]
	cbnz	w0, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _MIN_DELAY_USEC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MIN_DELAY_USEC@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x19, #16]
LBB0_5:
	bl	_pg_usleep
	ldr	s0, [x19, #16]
	sshll.2d	v0, v0, #0
	scvtf	d8, d0
	bl	_random
	scvtf	d0, x0
Lloh9:
	adrp	x8, _MAX_RANDOM_VALUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_RANDOM_VALUE@GOTPAGEOFF]
Lloh11:
	ldr	d1, [x8]
	scvtf	d1, d1
	fdiv	d0, d0, d1
	fmov	d1, #0.50000000
	fmadd	d0, d8, d0, d1
	fcvtzs	w8, d0
	ldr	w9, [x19, #16]
	add	w8, w9, w8
	str	w8, [x19, #16]
	scvtf	d0, w8
Lloh12:
	adrp	x8, _MAX_DELAY_USEC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_DELAY_USEC@GOTPAGEOFF]
Lloh14:
	ldr	d1, [x8]
	fcmp	d1, d0
	b.pl	LBB0_7
; %bb.6:
Lloh15:
	adrp	x8, _MIN_DELAY_USEC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MIN_DELAY_USEC@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	w8, [x19, #16]
LBB0_7:
	str	xzr, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_spins_per_delay,8,3            ; @spins_per_delay
	.comm	_NUM_DELAYS,8,3                 ; @NUM_DELAYS
	.comm	_MIN_DELAY_USEC,8,3             ; @MIN_DELAY_USEC
	.comm	_MAX_RANDOM_VALUE,8,3           ; @MAX_RANDOM_VALUE
	.comm	_MAX_DELAY_USEC,8,3             ; @MAX_DELAY_USEC
	.comm	_stdout,4,2                     ; @stdout
.subsections_via_symbols
