	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function comp_ppf_gains
_comp_ppf_gains:                        ## @comp_ppf_gains
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
                                        ## kill: def $r8d killed $r8d def $r8
	movl	%ecx, %r14d
	movl	%edx, %ecx
	movq	%rsi, %rbx
	movl	%edi, (%rsi)
	movl	%r9d, %eax
	imull	%r14d, %eax
	sarl	%eax
	leal	(%r8,%r8), %edi
	movl	%edi, %edx
	imull	%r8d, %edx
	cmpl	%eax, %edx
	jle	LBB0_7
## %bb.1:
	cmpl	%r9d, %r8d
	jge	LBB0_2
## %bb.3:
	shll	$15, %r8d
	movl	%r8d, %eax
	cltd
	idivl	%r9d
	movl	%eax, %esi
	movq	_ppf_gain_weight@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	imull	(%rax,%rcx,4), %esi
	sarl	$15, %esi
	jmp	LBB0_4
LBB0_7:
	movabsq	$140733193388032, %rax          ## imm = 0x7FFF00000000
	movq	%rax, 4(%rbx)
	xorl	%edi, %edi
	jmp	LBB0_8
LBB0_2:
	movq	_ppf_gain_weight@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ecx, %ecx
	movl	(%rax,%rcx,4), %esi
LBB0_4:
	movl	%esi, 4(%rbx)
	movl	%r14d, %eax
	shll	$15, %eax
	imull	%esi, %edi
	addl	%eax, %edi
	imull	%esi, %esi
	shrl	$15, %esi
	imull	%r9d, %esi
	addl	$32768, %esi                    ## imm = 0x8000
	callq	_av_sat_add32
	movl	%eax, %ecx
	sarl	$16, %ecx
	leal	(%rcx,%rcx), %eax
	movl	$2147418112, %edi               ## imm = 0x7FFF0000
	cmpl	%r14d, %eax
	jle	LBB0_6
## %bb.5:
	shll	$14, %r14d
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %edi
	shll	$16, %edi
LBB0_6:
	callq	_square_root
	movl	%eax, %edi
	movl	%eax, 8(%rbx)
	imull	4(%rbx), %edi
	sarl	$15, %edi
LBB0_8:
	callq	_av_clip_int16
	movl	%eax, 4(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ppf_gain_weight,8,3            ## @ppf_gain_weight
	.no_dead_strip	_comp_ppf_gains
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function comp_ppf_gains
lCPI0_0:
	.long	0                               ; 0x0
	.long	32767                           ; 0x7fff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_comp_ppf_gains:                        ; @comp_ppf_gains
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	str	w0, [x1]
	mul	w9, w5, w3
	lsl	w8, w4, #1
	mul	w10, w8, w4
	cmp	w10, w9, asr #1
	b.le	LBB0_3
; %bb.1:
	mov	x20, x3
	cmp	w4, w5
	b.ge	LBB0_4
; %bb.2:
	lsl	w9, w4, #15
Lloh0:
	adrp	x10, _ppf_gain_weight@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ppf_gain_weight@GOTPAGEOFF]
	sdiv	w9, w9, w5
Lloh2:
	ldr	x10, [x10]
	ldr	w10, [x10, w2, uxtw #2]
	mul	w9, w10, w9
	asr	w9, w9, #15
	b	LBB0_5
LBB0_3:
	mov	w0, #0
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x9, _ppf_gain_weight@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ppf_gain_weight@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	w9, [x9, w2, uxtw #2]
LBB0_5:
	str	w9, [x19, #4]
	mul	w8, w8, w9
	add	w0, w8, w20, lsl #15
	mul	w8, w9, w9
	lsr	w8, w8, #15
	orr	w9, wzr, #0x8000
	madd	w1, w8, w5, w9
	bl	_av_sat_add32
	asr	w8, w0, #16
	cmp	w20, w8, lsl #1
	b.ge	LBB0_7
; %bb.6:
	lsl	w9, w20, #14
	sdiv	w8, w9, w8
	lsl	w0, w8, #16
	b	LBB0_8
LBB0_7:
	mov	w0, #2147418112
LBB0_8:
	bl	_square_root
	str	w0, [x19, #8]
	ldr	w8, [x19, #4]
	mul	w8, w0, w8
	asr	w0, w8, #15
LBB0_9:
	bl	_av_clip_int16
	str	w0, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ppf_gain_weight,8,3            ; @ppf_gain_weight
	.no_dead_strip	_comp_ppf_gains
.subsections_via_symbols
