	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function gate_update
LCPI0_0:
	.space	8
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
LCPI0_1:
	.quad	0x3d719799812dea11              ## double 9.9999999999999998E-13
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_gate_update:                           ## @gate_update
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movaps	%xmm0, -48(%rbp)                ## 16-byte Spill
	movq	%rdi, %rbx
	movaps	%xmm1, %xmm0
	callq	_HIST_POS
	movq	_HIST_SIZE@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	decq	%rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_av_clip
	movq	24(%rbx), %rcx
	cltq
	incl	(%rcx,%rax,4)
	movupd	(%rbx), %xmm0
	movapd	-48(%rbp), %xmm1                ## 16-byte Reload
	blendpd	$2, LCPI0_0(%rip), %xmm1        ## xmm1 = xmm1[0],mem[1]
	addpd	%xmm0, %xmm1
	movupd	%xmm1, (%rbx)
	movapd	%xmm1, %xmm0
	unpckhpd	%xmm1, %xmm0                    ## xmm0 = xmm0[1],xmm1[1]
	divsd	%xmm0, %xmm1
	xorpd	%xmm0, %xmm0
	cmpneqsd	%xmm1, %xmm0
	andpd	%xmm0, %xmm1
	movapd	%xmm1, %xmm2
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	andnpd	%xmm1, %xmm0
	orpd	%xmm2, %xmm0
	callq	_LOUDNESS
	xorps	%xmm1, %xmm1
	cvtsi2sd	%r14d, %xmm1
	addsd	%xmm1, %xmm0
	movsd	%xmm0, 16(%rbx)
	callq	_HIST_POS
	movq	(%r15), %rdx
	decq	%rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_clip                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HIST_SIZE,8,3                  ## @HIST_SIZE
	.no_dead_strip	_gate_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gate_update
_gate_update:                           ; @gate_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov	x20, x0
	fmov	d0, d1
	bl	_HIST_POS
Lloh0:
	adrp	x21, _HIST_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HIST_SIZE@GOTPAGEOFF]
	ldr	x8, [x21]
	sub	x2, x8, #1
	mov	w1, #0
	bl	_av_clip
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [x20, #24]
	sbfiz	x9, x0, #2, #32
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
	ldr	q0, [x20]
	fmov.2d	v1, #1.00000000
	ldr	q2, [sp]                        ; 16-byte Folded Reload
	mov.d	v1[0], v2[0]
	fadd.2d	v0, v0, v1
	dup.2d	v1, v0[1]
	str	q0, [x20]
	fdiv.2d	v0, v0, v1
	fcmp	d0, #0.0
	mov	x8, #59921
	movk	x8, #33069, lsl #16
	movk	x8, #38809, lsl #32
	movk	x8, #15729, lsl #48
	fmov	d1, x8
	fcsel	d0, d0, d1, ne
	bl	_LOUDNESS
	scvtf	d1, w19
	fadd	d0, d0, d1
	str	d0, [x20, #16]
	bl	_HIST_POS
	ldr	x8, [x21]
	sub	x2, x8, #1
	mov	w1, #0
	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
	add	sp, sp, #64
	b	_av_clip
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_HIST_SIZE,8,3                  ; @HIST_SIZE
	.no_dead_strip	_gate_update
.subsections_via_symbols
