	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DELAY                          ## -- Begin function DELAY
	.p2align	4, 0x90
_DELAY:                                 ## @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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r12d
	movq	_riscv_timer_sc@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	je	LBB0_1
## %bb.6:
	xorl	%eax, %eax
	callq	_TSENTER
	movq	_riscv_timer_timecount@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1125899907, %rax, %rax         ## imm = 0x431BDE83
	movq	%rax, %rcx
	sarq	$50, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %r15d
	incl	%r15d
	movl	$-2147483648, %eax              ## imm = 0x80000000
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
	imull	%r12d, %r15d
	cmpl	%r12d, %eax
	cmovbel	%ecx, %r15d
	movq	(%r14), %rdi
	callq	_get_counts
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.7:
	movq	%rax, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	callq	_get_counts
	subl	%eax, %ebx
	addl	%ebx, %r15d
	movq	%rax, %rbx
	testl	%r15d, %r15d
	jg	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TSEXIT                         ## TAILCALL
LBB0_1:
	testl	%r12d, %r12d
	jle	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	$201, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorl	%eax, %eax
	callq	_cpufunc_nullop
	decl	%ebx
	cmpl	$1, %ebx
	ja	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	leal	-1(%r12), %eax
	cmpl	$1, %r12d
	movl	%eax, %r12d
	jg	LBB0_2
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_riscv_timer_sc,8,3             ## @riscv_timer_sc
	.comm	_riscv_timer_timecount,4,2      ## @riscv_timer_timecount
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_DELAY                          ; -- Begin function DELAY
	.p2align	2
_DELAY:                                 ; @DELAY
	.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	x19, x0
Lloh0:
	adrp	x20, _riscv_timer_sc@GOTPAGE
Lloh1:
	ldr	x20, [x20, _riscv_timer_sc@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.1:
	bl	_TSENTER
Lloh2:
	adrp	x8, _riscv_timer_timecount@GOTPAGE
Lloh3:
	ldr	x8, [x8, _riscv_timer_timecount@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w8, w8, w9
	add	w8, w8, #1
	mov	w9, #-2147483648
	udiv	w9, w9, w8
	sub	w10, w9, #1
	mul	w8, w8, w19
	cmp	w9, w19
	csel	w21, w8, w10, hi
	ldr	x0, [x20]
	bl	_get_counts
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x19, x0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	bl	_get_counts
	sub	w8, w19, w0
	add	w21, w21, w8
	mov	x19, x0
	cmp	w21, #0
	b.gt	LBB0_3
LBB0_4:
	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	_TSEXIT
LBB0_5:
	cmp	w19, #1
	b.lt	LBB0_9
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	w20, #201
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	bl	_cpufunc_nullop
	sub	w20, w20, #1
	cmp	w20, #1
	b.hi	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	subs	w19, w19, #1
	b.gt	LBB0_6
LBB0_9:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_riscv_timer_sc,8,3             ; @riscv_timer_sc
	.comm	_riscv_timer_timecount,4,2      ; @riscv_timer_timecount
.subsections_via_symbols
