	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function adaptive_gain_control
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_adaptive_gain_control:                 ## @adaptive_gain_control
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movss	(%r8), %xmm2                    ## xmm2 = mem[0],zero,zero,zero
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movss	%xmm2, -52(%rbp)                ## 4-byte Spill
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movq	%r13, %rax
	decq	%rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.3:
                                        ## kill: def $r13d killed $r13d killed $r13 def $r13
	andl	$-2, %r13d
	xorps	%xmm1, %xmm1
	xorl	%r14d, %r14d
	xorps	%xmm0, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	movss	(%r12,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_fabsf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movss	(%rbx,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_fabsf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movss	4(%r12,%r14,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	callq	_fabsf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movss	4(%rbx,%r14,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	callq	_fabsf
	xorps	%xmm1, %xmm1
	cvtsi2ss	%rax, %xmm1
	addss	-48(%rbp), %xmm1                ## 4-byte Folded Reload
	addq	$2, %r14
	cmpq	%r14, %r13
	jne	LBB0_4
	jmp	LBB0_5
LBB0_2:
	xorl	%r14d, %r14d
	xorps	%xmm1, %xmm1
	xorps	%xmm0, %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
LBB0_5:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	testb	$1, %r13b
	je	LBB0_7
## %bb.6:
	movss	(%r12,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	callq	_fabsf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	movss	(%rbx,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_fabsf
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	addss	%xmm0, %xmm1
LBB0_7:
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm1
	movss	-56(%rbp), %xmm4                ## 4-byte Reload
                                        ## xmm4 = mem[0],zero,zero,zero
	jne	LBB0_8
	jnp	LBB0_9
LBB0_8:
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	cvtss2sd	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm1
	xorps	%xmm2, %xmm2
	cvtss2sd	%xmm4, %xmm2
	movsd	LCPI0_0(%rip), %xmm3            ## xmm3 = mem[0],zero
	subsd	%xmm2, %xmm3
	mulsd	%xmm0, %xmm3
	divsd	%xmm1, %xmm3
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm3, %xmm0
LBB0_9:
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_10
## %bb.11:
	movl	%r13d, %ecx
	andl	$-2, %ecx
	xorl	%eax, %eax
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	mulss	%xmm4, %xmm1
	addss	%xmm0, %xmm1
	movaps	%xmm4, %xmm2
	mulss	%xmm1, %xmm2
	mulss	(%rbx,%rax,4), %xmm1
	movss	%xmm1, (%r15,%rax,4)
	addss	%xmm0, %xmm2
	movss	4(%rbx,%rax,4), %xmm1           ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm1
	movss	%xmm1, 4(%r15,%rax,4)
	addq	$2, %rax
	movaps	%xmm2, %xmm1
	cmpq	%rax, %rcx
	jne	LBB0_12
## %bb.13:
	testb	$1, %r13b
	je	LBB0_15
LBB0_14:
	mulss	%xmm2, %xmm4
	addss	%xmm0, %xmm4
	movss	(%rbx,%rax,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm4, %xmm0
	movss	%xmm0, (%r15,%rax,4)
	movaps	%xmm4, %xmm2
LBB0_15:
	movss	%xmm2, (%r8)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	xorl	%eax, %eax
	movss	-52(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	testb	$1, %r13b
	jne	LBB0_14
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_adaptive_gain_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adaptive_gain_control
_adaptive_gain_control:                 ; @adaptive_gain_control
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-112]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	mov	x19, x4
	ldr	s9, [x4]
	cmp	w3, #1
	b.lt	LBB0_6
; %bb.1:
	fmov	s8, s0
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	mov	w23, w3
	movi	d10, #0000000000000000
	mov	x24, x23
	mov	x25, x1
	movi	d11, #0000000000000000
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x22], #4
	bl	_fabsf
	scvtf	s0, x0
	fadd	s11, s11, s0
	ldr	s0, [x25], #4
	bl	_fabsf
	scvtf	s0, x0
	fadd	s10, s10, s0
	subs	x24, x24, #1
	b.ne	LBB0_2
; %bb.3:
	movi	d0, #0000000000000000
	fcmp	s10, #0.0
	b.eq	LBB0_5
; %bb.4:
	fcvt	d0, s11
	fcvt	d1, s10
	fcvt	d2, s8
	fmov	d3, #1.00000000
	fsub	d2, d3, d2
	fmul	d0, d2, d0
	fdiv	d0, d0, d1
	fcvt	s0, d0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	fmadd	s9, s8, s9, s0
	ldr	s1, [x20], #4
	fmul	s1, s9, s1
	str	s1, [x21], #4
	subs	x23, x23, #1
	b.ne	LBB0_5
LBB0_6:
	str	s9, [x19]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #112            ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_adaptive_gain_control
.subsections_via_symbols
