	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function detect_peak
LCPI0_0:
	.quad	0x7fffffffffffffff              ## double NaN
	.quad	0x7fffffffffffffff              ## double NaN
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_detect_peak:                           ## @detect_peak
	.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
	subq	$160, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movl	%ecx, %ebx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movl	$-1, (%r8)
	movq	(%rdi), %r9
	movsd	8(%rdi), %xmm0                  ## xmm0 = mem[0],zero
	movl	16(%rdi), %r15d
	leal	1920(%rsi), %ecx
	imull	%ebx, %ecx
	addl	%r15d, %ecx
	movslq	20(%rdi), %rax
	xorl	%r14d, %r14d
	cmpl	%eax, %ecx
	cmovgel	%eax, %r14d
	subl	%r14d, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	24(%rdi), %rcx
	movq	_FIRST_FRAME@GOTPCREL(%rip), %rdx
	movl	%ebx, %r11d
	cmpq	(%rdx), %rcx
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	jne	LBB0_9
## %bb.1:
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.2:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %r13d
	subl	%ebx, %r13d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx), %r8
	movl	%r11d, %r12d
	cmpl	$4, %ebx
	jae	LBB0_32
LBB0_3:
	xorl	%edx, %edx
LBB0_4:
	movq	%rdx, %rdi
	notq	%rdi
	testb	$1, %r12b
	je	LBB0_6
## %bb.5:
	addl	%edx, %r13d
	movslq	%r13d, %rcx
	movsd	(%r9,%rcx,8), %xmm1             ## xmm1 = mem[0],zero
	andpd	LCPI0_0(%rip), %xmm1
	movlpd	%xmm1, (%r8,%rdx,8)
	orq	$1, %rdx
LBB0_6:
	negq	%r12
	cmpq	%r12, %rdi
	je	LBB0_9
## %bb.7:
	leaq	1(%rdx), %rdi
	addl	$1919, %esi                     ## imm = 0x77F
	imull	%ebx, %esi
	addl	%esi, %r15d
	addl	%r15d, %edx
	subl	%r14d, %edx
	movapd	LCPI0_0(%rip), %xmm1            ## xmm1 = [NaN,NaN]
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%edx, %rdx
	movsd	(%r9,%rdx,8), %xmm2             ## xmm2 = mem[0],zero
	andpd	%xmm1, %xmm2
	movlpd	%xmm2, -8(%r8,%rdi,8)
	leal	1(%rdx), %ecx
	movslq	%ecx, %rcx
	movsd	(%r9,%rcx,8), %xmm2             ## xmm2 = mem[0],zero
	andpd	%xmm1, %xmm2
	movlpd	%xmm2, (%r8,%rdi,8)
	leaq	(%r12,%rdi), %rcx
	addq	$2, %rcx
	addq	$2, %rdi
	addl	$2, %edx
	cmpq	$1, %rcx
	jne	LBB0_8
LBB0_9:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_47
## %bb.10:
	movslq	%ebx, %rcx
	movq	%rcx, -232(%rbp)                ## 8-byte Spill
	leal	(%rbx,%rbx), %ecx
	movslq	%ecx, %rdx
	leal	(%rbx,%rbx,2), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -216(%rbp)                ## 8-byte Spill
	leal	(,%rbx,4), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -208(%rbp)                ## 8-byte Spill
	leal	(%rbx,%rbx,4), %ecx
	movslq	%ecx, %rsi
	leal	(%rdx,%rdx,2), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	leal	(,%rbx,8), %ecx
	movslq	%ecx, %rdi
	movq	%rdi, -184(%rbp)                ## 8-byte Spill
	subl	%ebx, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -176(%rbp)                ## 8-byte Spill
	leal	(%rbx,%rbx,8), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -168(%rbp)                ## 8-byte Spill
	movq	%rdx, -224(%rbp)                ## 8-byte Spill
	leal	(%rdx,%rdx,4), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -160(%rbp)                ## 8-byte Spill
	movq	%rsi, -200(%rbp)                ## 8-byte Spill
	leal	(%rbx,%rsi,2), %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	movapd	LCPI0_0(%rip), %xmm1            ## xmm1 = [NaN,NaN]
	xorl	%r12d, %r12d
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	addl	%ebx, %edx
	cmpl	%eax, %edx
	movl	%eax, %ecx
	movl	$0, %esi
	cmovll	%esi, %ecx
	subl	%ecx, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	incl	%r12d
	cmpl	-68(%rbp), %r12d                ## 4-byte Folded Reload
	je	LBB0_47
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	testl	%ebx, %ebx
	jle	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx), %rbx
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rsi), %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	-160(%rbp), %rdx                ## 8-byte Reload
	addq	%rsi, %rdx
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -248(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -240(%rbp)                ## 8-byte Spill
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -264(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -256(%rbp)                ## 8-byte Spill
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -280(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -272(%rbp)                ## 8-byte Spill
	movq	-192(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -296(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -288(%rbp)                ## 8-byte Spill
	movq	-200(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -312(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -304(%rbp)                ## 8-byte Spill
	movq	-208(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -328(%rbp)                ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -320(%rbp)                ## 8-byte Spill
	movq	-216(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rdx,8), %rdx
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rsi,8), %r9
	movq	-224(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %r10
	leaq	(%rcx,%r10,8), %r14
	movq	-232(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rsi), %r8
	leaq	(%rcx,%r8,8), %r13
	xorl	%edx, %edx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_16 Depth=2
	movsd	%xmm2, (%rbx,%rdx,8)
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=2
	incq	%rdx
	cmpq	%rdx, %r11
	je	LBB0_11
LBB0_16:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	(%rsi,%rdx), %r15
	cmpq	%rax, %r15
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	%r9, %rdi
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	andpd	%xmm1, %xmm2
	ucomisd	(%rbx,%rdx,8), %xmm2
	jb	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=2
	leaq	(%r8,%rdx), %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	%r13, %rdi
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm3, %xmm2
	jb	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	ucomisd	%xmm0, %xmm2
	jbe	LBB0_14
## %bb.19:                              ##   in Loop: Header=BB0_16 Depth=2
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=2
	leaq	(%r10,%rdx), %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	%r14, %rdi
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.21:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-328(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-320(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.23:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-312(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-304(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-296(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-288(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.25:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-280(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-272(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.26:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-264(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-256(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.27:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-248(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-240(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.28:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.29:                              ##   in Loop: Header=BB0_16 Depth=2
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	addq	%rdx, %rcx
	cmpq	%rax, %rcx
	movl	$0, %ecx
	cmovgeq	%rax, %rcx
	shlq	$3, %rcx
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	subq	%rcx, %rdi
	movsd	(%rdi,%rdx,8), %xmm3            ## xmm3 = mem[0],zero
	andpd	%xmm1, %xmm3
	ucomisd	%xmm2, %xmm3
	ja	LBB0_15
## %bb.30:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movsd	(%rdi,%rsi,8), %xmm1            ## xmm1 = mem[0],zero
	movapd	LCPI0_0(%rip), %xmm0            ## xmm0 = [NaN,NaN]
	andpd	%xmm0, %xmm1
	xorl	%ecx, %ecx
	cmpl	%eax, %esi
	cmovgel	%eax, %ecx
	movslq	%ecx, %rcx
	movq	%rsi, %rdx
	subq	%rcx, %rdx
	movsd	(%rdi,%rdx,8), %xmm2            ## xmm2 = mem[0],zero
	andpd	%xmm0, %xmm2
	movlpd	%xmm2, (%rbx)
	cmpl	$1, -96(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_44
## %bb.31:
	movapd	%xmm1, %xmm2
	jmp	LBB0_46
LBB0_32:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	leaq	-1(%r12), %r13
	leal	1919(%rsi), %edi
	imull	%ebx, %edi
	addl	%r15d, %edi
	movl	%edi, %r10d
	subl	%r14d, %r10d
	leal	(%r10,%r13), %r9d
	xorl	%edx, %edx
	cmpl	%r10d, %r9d
	jl	LBB0_36
## %bb.33:
	shrq	$32, %r13
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_4
## %bb.34:
	subl	%r14d, %edi
	movslq	%edi, %rdx
	leaq	(%r9,%rdx,8), %rdx
	movq	%r8, %rdi
	subq	%rdx, %rdi
	cmpq	$32, %rdi
	jb	LBB0_3
## %bb.37:
	movl	%r12d, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rdi
	movq	%rdi, %r13
	shrq	$2, %r13
	incq	%r13
	testq	%rdi, %rdi
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_40
## %bb.38:
	andq	$-2, %r13
	xorl	%edi, %edi
	movapd	LCPI0_0(%rip), %xmm1            ## xmm1 = [NaN,NaN]
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	.p2align	4, 0x90
LBB0_39:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r10d, %r10
	movupd	(%r9,%r10,8), %xmm2
	movupd	16(%r9,%r10,8), %xmm3
	andpd	%xmm1, %xmm2
	andpd	%xmm1, %xmm3
	movupd	%xmm2, (%r8,%rdi,8)
	movupd	%xmm3, 16(%r8,%rdi,8)
	leal	4(%r10), %ecx
	movslq	%ecx, %rcx
	movupd	(%r9,%rcx,8), %xmm2
	movupd	16(%r9,%rcx,8), %xmm3
	andpd	%xmm1, %xmm2
	andpd	%xmm1, %xmm3
	movupd	%xmm2, 32(%r8,%rdi,8)
	movupd	%xmm3, 48(%r8,%rdi,8)
	addq	$8, %rdi
	addl	$8, %r10d
	addq	$-2, %r13
	jne	LBB0_39
	jmp	LBB0_41
LBB0_36:
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_4
LBB0_40:
	xorl	%edi, %edi
	movq	-56(%rbp), %r9                  ## 8-byte Reload
LBB0_41:
	testb	$1, -88(%rbp)                   ## 1-byte Folded Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_43
## %bb.42:
	leal	(%rdi,%r13), %ecx
	movslq	%ecx, %rcx
	movupd	(%r9,%rcx,8), %xmm1
	movupd	16(%r9,%rcx,8), %xmm2
	movapd	LCPI0_0(%rip), %xmm3            ## xmm3 = [NaN,NaN]
	andpd	%xmm3, %xmm1
	andpd	%xmm3, %xmm2
	movupd	%xmm1, (%r8,%rdi,8)
	movupd	%xmm2, 16(%r8,%rdi,8)
LBB0_43:
	cmpq	%r12, %rdx
	jne	LBB0_4
	jmp	LBB0_9
LBB0_44:
	movl	$1, %ecx
	xorl	%r8d, %r8d
LBB0_45:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rsi,%rcx), %rdi
	movsd	(%r9,%rcx,8), %xmm2             ## xmm2 = mem[0],zero
	andpd	%xmm0, %xmm2
	cmpq	%rax, %rdi
	movq	%rax, %rdi
	cmovlq	%r8, %rdi
	maxsd	%xmm1, %xmm2
	shlq	$3, %rdi
	movq	%r9, %rdx
	subq	%rdi, %rdx
	movsd	(%rdx,%rcx,8), %xmm1            ## xmm1 = mem[0],zero
	andpd	%xmm0, %xmm1
	movlpd	%xmm1, (%rbx,%rcx,8)
	incq	%rcx
	movapd	%xmm2, %xmm1
	cmpq	%rcx, %r11
	jne	LBB0_45
LBB0_46:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	%r12d, (%rax)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 40(%rax)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movsd	%xmm2, (%rax)
LBB0_47:
	addq	$160, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRST_FRAME,8,3                ## @FIRST_FRAME
	.no_dead_strip	_detect_peak
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detect_peak
_detect_peak:                           ; @detect_peak
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	stp	x4, x5, [sp, #16]               ; 16-byte Folded Spill
                                        ; kill: def $w3 killed $w3 def $x3
	str	w2, [sp, #172]                  ; 4-byte Folded Spill
	mov	w8, #-1
	str	w8, [x4]
	ldr	x8, [x0]
	ldr	d0, [x0, #8]
	add	w11, w1, #1920
	ldp	w10, w9, [x0, #16]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	madd	w11, w11, w3, w10
	cmp	w11, w9
	csel	w12, wzr, w9, lt
	str	x0, [sp, #144]                  ; 8-byte Folded Spill
	ldr	x13, [x0, #24]
Lloh0:
	adrp	x14, _FIRST_FRAME@GOTPAGE
Lloh1:
	ldr	x14, [x14, _FIRST_FRAME@GOTPAGEOFF]
Lloh2:
	ldr	x14, [x14]
	cmp	x13, x14
	ccmp	w3, #1, #8, eq
	b.lt	LBB0_7
; %bb.1:
	ldr	x13, [sp, #144]                 ; 8-byte Folded Reload
	ldr	x14, [x13, #32]
	mov	w13, w3
	cmp	w3, #8
	b.lo	LBB0_4
; %bb.2:
	sub	x15, x13, #1
	add	w16, w1, #1919
	madd	w16, w16, w3, w10
	sub	w16, w16, w12
	add	w17, w16, w15
	cmp	w17, w16
	lsr	x15, x15, #32
	ccmp	x15, #0, #0, ge
	b.ne	LBB0_4
; %bb.3:
	add	x15, x8, w16, sxtw #3
	sub	x15, x14, x15
	cmp	x15, #64
	b.hs	LBB0_31
LBB0_4:
	mov	x15, #0
LBB0_5:
	add	x14, x14, x15, lsl #3
	add	w16, w1, #1919
	madd	w10, w3, w16, w10
	add	w10, w10, w15
	sub	w10, w10, w12
	sub	x13, x13, x15
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x8, w10, sxtw #3]
	fabs	d1, d1
	str	d1, [x14], #8
	add	w10, w10, #1
	subs	x13, x13, #1
	b.ne	LBB0_6
LBB0_7:
	ldr	w10, [sp, #172]                 ; 4-byte Folded Reload
	cmp	w10, #1
	b.lt	LBB0_30
; %bb.8:
	mov	w10, #0
	sxtw	x14, w3
	lsl	w13, w3, #1
	sub	w11, w11, w12
	sxtw	x12, w13
	stp	x12, x14, [sp, #120]            ; 16-byte Folded Spill
	add	w12, w13, w3
	sxtw	x15, w12
	lsl	w13, w3, #2
	sxtw	x14, w13
	stp	x14, x15, [sp, #104]            ; 16-byte Folded Spill
	add	w13, w13, w3
	sxtw	x14, w13
	lsl	w12, w12, #1
	sxtw	x12, w12
	stp	x12, x14, [sp, #88]             ; 16-byte Folded Spill
	lsl	w12, w3, #3
	sub	w14, w12, w3
	sxtw	x15, w14
	sxtw	x14, w12
	stp	x14, x15, [sp, #72]             ; 16-byte Folded Spill
	add	w12, w12, w3
	sxtw	x14, w12
	lsl	w12, w13, #1
	sxtw	x12, w12
	stp	x12, x14, [sp, #56]             ; 16-byte Folded Spill
	mov	w12, #11
	mul	w12, w3, w12
	sxtw	x12, w12
	str	x12, [sp, #48]                  ; 8-byte Folded Spill
	mov	w16, w3
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w11, w11, w3
	cmp	w11, w9
	csel	w12, wzr, w9, lt
	sub	w11, w11, w12
	add	w10, w10, #1
	ldr	w12, [sp, #172]                 ; 4-byte Folded Reload
	cmp	w10, w12
	b.eq	LBB0_30
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	cmp	w3, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x24, #0
	sxtw	x23, w11
	ldr	x12, [sp, #144]                 ; 8-byte Folded Reload
	ldr	x22, [x12, #32]
	ldr	x12, [sp, #48]                  ; 8-byte Folded Reload
	add	x25, x12, x23
	add	x13, x8, x25, lsl #3
	ldr	x12, [sp, #56]                  ; 8-byte Folded Reload
	add	x27, x12, x23
	add	x12, x8, x27, lsl #3
	stp	x13, x12, [sp, #32]             ; 16-byte Folded Spill
	ldr	x12, [sp, #64]                  ; 8-byte Folded Reload
	add	x30, x12, x23
	add	x12, x8, x30, lsl #3
	str	x12, [sp, #136]                 ; 8-byte Folded Spill
	ldr	x12, [sp, #72]                  ; 8-byte Folded Reload
	add	x5, x12, x23
	add	x13, x8, x5, lsl #3
	ldr	x12, [sp, #80]                  ; 8-byte Folded Reload
	add	x0, x12, x23
	add	x12, x8, x0, lsl #3
	stp	x13, x12, [sp, #152]            ; 16-byte Folded Spill
	ldr	x12, [sp, #88]                  ; 8-byte Folded Reload
	add	x14, x12, x23
	add	x15, x8, x14, lsl #3
	ldr	x12, [sp, #96]                  ; 8-byte Folded Reload
	add	x17, x12, x23
	add	x1, x8, x17, lsl #3
	ldr	x12, [sp, #104]                 ; 8-byte Folded Reload
	add	x6, x12, x23
	add	x7, x8, x6, lsl #3
	ldr	x12, [sp, #112]                 ; 8-byte Folded Reload
	add	x2, x12, x23
	add	x19, x8, x2, lsl #3
	add	x20, x8, w11, sxtw #3
	ldr	x12, [sp, #120]                 ; 8-byte Folded Reload
	add	x21, x12, x23
	add	x26, x8, x21, lsl #3
	ldr	x12, [sp, #128]                 ; 8-byte Folded Reload
	add	x28, x12, x23
	add	x12, x8, x28, lsl #3
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=2
	str	d1, [x22, x24, lsl #3]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x24, x24, #1
	cmp	x16, x24
	b.eq	LBB0_9
LBB0_14:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x4, x23, x24
	cmp	x4, x9
	csel	x4, xzr, x9, lt
	sub	x4, x20, x4, lsl #3
	lsl	x13, x24, #3
	ldr	d1, [x4, x13]
	fabs	d1, d1
	ldr	d2, [x22, x13]
	fcmp	d2, d1
	b.hi	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x28, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x12, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	fccmp	d1, d0, #4, ls
	ccmp	w10, #0, #4, gt
	b.eq	LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x21, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x26, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x2, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x19, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x6, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x7, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x17, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x1, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x14, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	sub	x13, x15, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.21:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x0, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	ldr	x4, [sp, #160]                  ; 8-byte Folded Reload
	sub	x13, x4, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.22:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x5, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	ldr	x4, [sp, #152]                  ; 8-byte Folded Reload
	sub	x13, x4, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.23:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x30, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	ldr	x4, [sp, #136]                  ; 8-byte Folded Reload
	sub	x13, x4, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.24:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x27, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	ldr	x4, [sp, #40]                   ; 8-byte Folded Reload
	sub	x13, x4, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.25:                               ;   in Loop: Header=BB0_14 Depth=2
	add	x13, x25, x24
	cmp	x13, x9
	csel	x13, xzr, x9, lt
	ldr	x4, [sp, #32]                   ; 8-byte Folded Reload
	sub	x13, x4, x13, lsl #3
	ldr	d2, [x13, x24, lsl #3]
	fabs	d2, d2
	fcmp	d2, d1
	b.gt	LBB0_13
; %bb.26:
	ldr	d0, [x8, x23, lsl #3]
	fabs	d0, d0
	cmp	w11, w9
	csel	w12, wzr, w9, lt
	sub	x12, x23, w12, sxtw
	ldr	d1, [x8, x12, lsl #3]
	fabs	d1, d1
	str	d1, [x22]
	cmp	w3, #1
	b.eq	LBB0_29
; %bb.27:
	mov	x12, x11
	sxtw	x12, w12
	add	x12, x12, #1
	add	x13, x22, #8
	sub	x14, x16, #1
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	lsl	x15, x12, #3
	ldr	d1, [x8, x15]
	fabs	d1, d1
	fcmp	d1, d0
	fcsel	d0, d1, d0, gt
	cmp	x12, x9
	csel	x16, xzr, x9, lt
	sub	x16, x8, x16, lsl #3
	ldr	d1, [x16, x15]
	fabs	d1, d1
	str	d1, [x13], #8
	add	x12, x12, #1
	subs	x14, x14, #1
	b.ne	LBB0_28
LBB0_29:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	w10, [x8]
	ldr	x8, [sp, #144]                  ; 8-byte Folded Reload
	str	w11, [x8, #40]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	d0, [x8]
LBB0_30:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_31:
	and	x15, x13, #0xfffffff8
	add	x17, x14, #32
	mov	x0, x15
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	add	x2, x8, w16, sxtw #3
	ldp	q1, q2, [x2]
	ldp	q3, q4, [x2, #32]
	fabs.2d	v1, v1
	fabs.2d	v2, v2
	fabs.2d	v3, v3
	fabs.2d	v4, v4
	stp	q1, q2, [x17, #-32]
	stp	q3, q4, [x17], #64
	add	w16, w16, #8
	subs	x0, x0, #8
	b.ne	LBB0_32
; %bb.33:
	cmp	x15, x13
	b.eq	LBB0_7
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRST_FRAME,8,3                ; @FIRST_FRAME
	.no_dead_strip	_detect_peak
.subsections_via_symbols
