	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function detect_repeating_patterns
_detect_repeating_patterns:             ## @detect_repeating_patterns
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_INTERVALS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_26
## %bb.1:
	movq	(%rdi), %rcx
	cmpl	$8, %r8d
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	movl	%r8d, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rax
	shrq	$3, %rax
	incq	%rax
	movl	%eax, %r9d
	andl	$3, %r9d
	cmpq	$24, %rsi
	jae	LBB0_5
## %bb.4:
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rax
	pxor	%xmm0, %xmm0
	xorl	%esi, %esi
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rsi,4), %xmm2
	paddd	%xmm0, %xmm2
	movdqu	16(%rcx,%rsi,4), %xmm0
	paddd	%xmm1, %xmm0
	movdqu	32(%rcx,%rsi,4), %xmm1
	movdqu	48(%rcx,%rsi,4), %xmm3
	movdqu	64(%rcx,%rsi,4), %xmm4
	paddd	%xmm1, %xmm4
	paddd	%xmm2, %xmm4
	movdqu	80(%rcx,%rsi,4), %xmm2
	paddd	%xmm3, %xmm2
	paddd	%xmm0, %xmm2
	movdqu	96(%rcx,%rsi,4), %xmm0
	paddd	%xmm4, %xmm0
	movdqu	112(%rcx,%rsi,4), %xmm1
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	addq	$-4, %rax
	jne	LBB0_6
LBB0_7:
	testq	%r9, %r9
	je	LBB0_10
## %bb.8:
	leaq	(%rcx,%rsi,4), %rax
	addq	$16, %rax
	shlq	$5, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rax,%rsi), %xmm2
	paddd	%xmm2, %xmm0
	movdqu	(%rax,%rsi), %xmm2
	paddd	%xmm2, %xmm1
	addq	$32, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_9
LBB0_10:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	cmpq	%r8, %rdx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rcx,%rdx,4), %eax
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_11
LBB0_12:
	cltd
	idivl	%r8d
	cmpl	8(%rdi), %eax
	jg	LBB0_26
## %bb.13:
	movl	%eax, %r10d
	movq	(%rdi), %rdx
	cmpl	$8, %r8d
	jae	LBB0_15
## %bb.14:
	xorl	%esi, %esi
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_15:
	movl	%r8d, %esi
	andl	$-8, %esi
	movd	%r10d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rsi), %rax
	movq	%rax, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movabsq	$4611686018427387900, %rcx      ## imm = 0x3FFFFFFFFFFFFFFC
	orq	$2, %rcx
	andq	%r9, %rcx
	pxor	%xmm3, %xmm3
	xorl	%eax, %eax
	pxor	%xmm4, %xmm4
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rax,4), %xmm5
	movdqu	16(%rdx,%rax,4), %xmm6
	movdqu	32(%rdx,%rax,4), %xmm1
	movdqu	48(%rdx,%rax,4), %xmm2
	psubd	%xmm0, %xmm5
	psubd	%xmm0, %xmm6
	pmulld	%xmm5, %xmm5
	paddd	%xmm3, %xmm5
	pmulld	%xmm6, %xmm6
	paddd	%xmm4, %xmm6
	psubd	%xmm0, %xmm1
	psubd	%xmm0, %xmm2
	pmulld	%xmm1, %xmm1
	paddd	%xmm5, %xmm1
	pmulld	%xmm2, %xmm2
	paddd	%xmm6, %xmm2
	addq	$16, %rax
	movdqa	%xmm1, %xmm3
	movdqa	%xmm2, %xmm4
	addq	$-2, %rcx
	jne	LBB0_18
## %bb.19:
	testb	$1, %r9b
	je	LBB0_21
LBB0_20:
	movdqu	(%rdx,%rax,4), %xmm3
	movdqu	16(%rdx,%rax,4), %xmm4
	psubd	%xmm0, %xmm3
	psubd	%xmm0, %xmm4
	pmulld	%xmm3, %xmm3
	paddd	%xmm3, %xmm1
	pmulld	%xmm4, %xmm4
	paddd	%xmm4, %xmm2
LBB0_21:
	paddd	%xmm2, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %eax
	cmpq	%r8, %rsi
	je	LBB0_23
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%rsi,4), %ecx
	subl	%r10d, %ecx
	imull	%ecx, %ecx
	addl	%ecx, %eax
	incq	%rsi
	cmpq	%rsi, %r8
	jne	LBB0_22
LBB0_23:
	testl	%r10d, %r10d
	je	LBB0_26
## %bb.24:
	cltd
	idivl	%r8d
	movq	_STDDEV_THRESH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_26
## %bb.25:
	movl	%r10d, 12(%rdi)
LBB0_26:
	popq	%rbp
	retq
LBB0_16:
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
	pxor	%xmm2, %xmm2
	testb	$1, %r9b
	jne	LBB0_20
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_INTERVALS,4,2                  ## @INTERVALS
	.comm	_STDDEV_THRESH,4,2              ## @STDDEV_THRESH
	.no_dead_strip	_detect_repeating_patterns
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detect_repeating_patterns
_detect_repeating_patterns:             ; @detect_repeating_patterns
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _INTERVALS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INTERVALS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.1:
	ldr	x9, [x0]
	cmp	w8, #16
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	mov	w11, #0
	b	LBB0_6
LBB0_3:
	and	x10, x8, #0xfffffff0
	add	x11, x9, #32
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	subs	x12, x12, #16
	b.ne	LBB0_4
; %bb.5:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w11, s0
	cmp	x10, x8
	b.eq	LBB0_8
LBB0_6:
	add	x9, x9, x10, lsl #2
	sub	x10, x8, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9], #4
	add	w11, w12, w11
	subs	x10, x10, #1
	b.ne	LBB0_7
LBB0_8:
	sdiv	w9, w11, w8
	ldr	w10, [x0, #8]
	cmp	w9, w10
	b.gt	LBB0_19
; %bb.9:
	ldr	x10, [x0]
	cmp	w8, #16
	b.hs	LBB0_11
; %bb.10:
	mov	x11, #0
	mov	w12, #0
	b	LBB0_14
LBB0_11:
	and	x11, x8, #0xfffffff0
	dup.4s	v0, w9
	add	x12, x10, #32
	movi.2d	v1, #0000000000000000
	mov	x13, x11
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x12, #-32]
	ldp	q7, q16, [x12], #64
	sub.4s	v5, v5, v0
	sub.4s	v6, v6, v0
	sub.4s	v7, v7, v0
	sub.4s	v16, v16, v0
	mla.4s	v1, v5, v5
	mla.4s	v2, v6, v6
	mla.4s	v3, v7, v7
	mla.4s	v4, v16, v16
	subs	x13, x13, #16
	b.ne	LBB0_12
; %bb.13:
	add.4s	v0, v2, v1
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w12, s0
	cmp	x11, x8
	b.eq	LBB0_16
LBB0_14:
	add	x10, x10, x11, lsl #2
	sub	x11, x8, x11
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10], #4
	sub	w13, w13, w9
	madd	w12, w13, w13, w12
	subs	x11, x11, #1
	b.ne	LBB0_15
LBB0_16:
	cbz	w9, LBB0_19
; %bb.17:
	sdiv	w8, w12, w8
Lloh3:
	adrp	x10, _STDDEV_THRESH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _STDDEV_THRESH@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w10
	b.ge	LBB0_19
; %bb.18:
	str	w9, [x0, #12]
LBB0_19:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_INTERVALS,4,2                  ; @INTERVALS
	.comm	_STDDEV_THRESH,4,2              ; @STDDEV_THRESH
	.no_dead_strip	_detect_repeating_patterns
.subsections_via_symbols
