	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_moving_average
_calc_moving_average:                   ## @calc_moving_average
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%rdi)
	cmpq	8(%rdi), %rax
	jge	LBB0_1
## %bb.9:
	movq	_qdiffsample_zone@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_M_NOWAIT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_uma_zalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%rax, %rsi
	movq	8(%rbx), %rdi
	movq	40(%rbx), %rcx
	movq	%r15, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_11
## %bb.12:
	movq	%r15, %rax
	cqto
	idivq	%rdi
	jmp	LBB0_13
LBB0_1:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	leaq	32(%rbx), %r12
	movq	%r12, %rdi
	callq	_STAILQ_FIRST
	movq	%rax, %r13
	movq	8(%rbx), %rsi
	movq	40(%rbx), %rcx
	movq	%r15, %rax
	subq	(%r13), %rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_2
## %bb.3:
	cqto
	idivq	%rsi
	jmp	LBB0_4
LBB0_2:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_4:
	addq	%rcx, %rax
	movq	%rax, 40(%rbx)
	movq	_qdiff_lnk@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_STAILQ_REMOVE_HEAD
	movq	%r15, (%r13)
	movl	(%r14), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_STAILQ_INSERT_TAIL
	leaq	16(%rbx), %r15
	movq	%r15, %rdi
	callq	_STAILQ_FIRST
	movq	%rax, %r12
	movq	8(%rbx), %rsi
	movq	24(%rbx), %rcx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rax
	subq	(%r12), %rax
	movq	%rax, %rdx
	orq	%rsi, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:
	cqto
	idivq	%rsi
	jmp	LBB0_7
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
LBB0_7:
	addq	%rcx, %rax
	movq	%rax, 24(%rbx)
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_STAILQ_REMOVE_HEAD
	movq	%r13, (%r12)
	movl	(%r14), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_STAILQ_INSERT_TAIL
	decq	(%rbx)
	jmp	LBB0_8
LBB0_11:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
LBB0_13:
	addq	%rcx, %rax
	movq	%rax, 40(%rbx)
	movq	%r15, (%rsi)
	leaq	32(%rbx), %rdi
	movq	_qdiff_lnk@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_STAILQ_INSERT_TAIL
LBB0_14:
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_uma_zalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.15:
	movq	%rax, %rsi
	movq	8(%rbx), %rdi
	movq	24(%rbx), %rcx
	movq	%r13, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.17:
	movq	%r13, %rax
	cqto
	idivq	%rdi
	jmp	LBB0_18
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $eax killed $eax def $rax
LBB0_18:
	addq	%rcx, %rax
	movq	%rax, 24(%rbx)
	movq	%r13, (%rsi)
	addq	$16, %rbx
	movq	_qdiff_lnk@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_STAILQ_INSERT_TAIL             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_qdiff_lnk,4,2                  ## @qdiff_lnk
	.comm	_qdiffsample_zone,4,2           ## @qdiffsample_zone
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.no_dead_strip	_calc_moving_average
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_moving_average
_calc_moving_average:                   ; @calc_moving_average
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldp	x8, x9, [x0]
	add	x10, x8, #1
	str	x10, [x0]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.1:
Lloh0:
	adrp	x22, _qdiffsample_zone@GOTPAGE
Lloh1:
	ldr	x22, [x22, _qdiffsample_zone@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x23, _M_NOWAIT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _M_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_uma_zalloc
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x0
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #8]
	sdiv	x9, x21, x9
	add	x8, x9, x8
	str	x8, [x19, #40]
	str	x21, [x0]
	add	x0, x19, #32
Lloh4:
	adrp	x8, _qdiff_lnk@GOTPAGE
Lloh5:
	ldr	x8, [x8, _qdiff_lnk@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	bl	_STAILQ_INSERT_TAIL
LBB0_3:
	ldr	w0, [x22]
	ldr	w1, [x23]
	bl	_uma_zalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, x0
	ldr	x8, [x19, #24]
	ldr	x9, [x19, #8]
	sdiv	x9, x20, x9
	add	x8, x9, x8
	str	x8, [x19, #24]
	str	x20, [x0]
	add	x0, x19, #16
Lloh7:
	adrp	x8, _qdiff_lnk@GOTPAGE
Lloh8:
	ldr	x8, [x8, _qdiff_lnk@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_STAILQ_INSERT_TAIL
LBB0_5:
	add	x22, x19, #32
	mov	x0, x22
	bl	_STAILQ_FIRST
	mov	x23, x0
	ldr	x8, [x19, #40]
	ldr	x9, [x0]
	sub	x9, x21, x9
	ldr	x10, [x19, #8]
	sdiv	x9, x9, x10
	add	x8, x9, x8
	str	x8, [x19, #40]
Lloh10:
	adrp	x24, _qdiff_lnk@GOTPAGE
Lloh11:
	ldr	x24, [x24, _qdiff_lnk@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_STAILQ_REMOVE_HEAD
	str	x21, [x23]
	ldr	w2, [x24]
	mov	x0, x22
	mov	x1, x23
	bl	_STAILQ_INSERT_TAIL
	add	x21, x19, #16
	mov	x0, x21
	bl	_STAILQ_FIRST
	mov	x22, x0
	ldr	x8, [x19, #24]
	ldr	x9, [x0]
	sub	x9, x20, x9
	ldr	x10, [x19, #8]
	sdiv	x9, x9, x10
	add	x8, x9, x8
	str	x8, [x19, #24]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_STAILQ_REMOVE_HEAD
	str	x20, [x22]
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x22
	bl	_STAILQ_INSERT_TAIL
	ldr	x8, [x19]
	sub	x8, x8, #1
	str	x8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_qdiff_lnk,4,2                  ; @qdiff_lnk
	.comm	_qdiffsample_zone,4,2           ; @qdiffsample_zone
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.no_dead_strip	_calc_moving_average
.subsections_via_symbols
