	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_g729_adaptive_gain_control  ## -- Begin function ff_g729_adaptive_gain_control
	.p2align	4, 0x90
_ff_g729_adaptive_gain_control:         ## @ff_g729_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movl	%edi, %r13d
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	je	LBB0_12
LBB0_2:
	testl	%r13d, %r13d
	je	LBB0_3
## %bb.4:
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, -56(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_av_log2
	movl	$14, %ebx
	movl	$14, %r15d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	subl	%eax, %r15d
	movl	%r13d, %edi
	movl	%r15d, %esi
	callq	_bidir_sal
	movl	%eax, %r13d
	movl	%r14d, %edi
	callq	_av_log2
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	subl	%eax, %ebx
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_bidir_sal
	movl	%eax, %ecx
	movl	%r13d, %eax
	subl	%ecx, %eax
	jge	LBB0_6
## %bb.5:
	shll	$15, %r13d
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	notl	%ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	addl	%ecx, %esi
	movl	%eax, %edi
	jmp	LBB0_7
LBB0_3:
	xorl	%r13d, %r13d
	testl	%ecx, %ecx
	jg	LBB0_10
LBB0_9:
	movl	%r8d, %ebx
	jmp	LBB0_12
LBB0_6:
	shll	$14, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $eax killed $eax def $rax
	leal	16384(%rax), %edi
	subl	%r15d, %ebx
	movl	%ebx, %esi
LBB0_7:
	callq	_bidir_sal
	movl	%eax, %r13d
	movq	_G729_AGC_FAC1@GOTPCREL(%rip), %rax
	imull	(%rax), %r13d
	addl	$16384, %r13d                   ## imm = 0x4000
	sarl	$15, %r13d
	movl	-56(%rbp), %r8d                 ## 4-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jle	LBB0_9
LBB0_10:
	movl	%ecx, %r14d
	xorl	%r15d, %r15d
	movl	%r8d, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	_G729_AGC_FACTOR@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	addl	$16384, %ebx                    ## imm = 0x4000
	sarl	$15, %ebx
	addl	%r13d, %ebx
	movl	%ebx, %edi
	callq	_av_clip_int16
	movl	%eax, %ebx
	imull	(%r12,%r15,4), %eax
	leal	8192(%rax), %edi
	sarl	$14, %edi
	callq	_av_clip_int16
	movl	%eax, (%r12,%r15,4)
	incq	%r15
	cmpq	%r15, %r14
	jne	LBB0_11
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_G729_AGC_FAC1,4,2              ## @G729_AGC_FAC1
	.comm	_G729_AGC_FACTOR,4,2            ## @G729_AGC_FACTOR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_g729_adaptive_gain_control  ; -- Begin function ff_g729_adaptive_gain_control
	.p2align	2
_ff_g729_adaptive_gain_control:         ; @ff_g729_adaptive_gain_control
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x25, x0
	cbz	w0, LBB0_3
; %bb.1:
	cbnz	w22, LBB0_3
; %bb.2:
	mov	w19, #0
	b	LBB0_11
LBB0_3:
	cbz	w25, LBB0_6
; %bb.4:
	mov	x0, x25
	bl	_av_log2
	mov	x23, x0
	mov	w27, #14
	sub	w24, w27, w0
	mov	x0, x25
	mov	x1, x24
	bl	_bidir_sal
	mov	x25, x0
	mov	x0, x22
	bl	_av_log2
	mov	x26, x0
	sub	w27, w27, w0
	mov	x0, x22
	mov	x1, x27
	bl	_bidir_sal
	subs	w8, w25, w0
	b.ge	LBB0_7
; %bb.5:
	lsl	w8, w25, #15
	mvn	w9, w26
	add	w1, w23, w9
	sdiv	w0, w8, w0
	b	LBB0_8
LBB0_6:
	mov	w22, #0
	cmp	w21, #1
	b.ge	LBB0_9
	b	LBB0_11
LBB0_7:
	lsl	w8, w8, #14
	sdiv	w8, w8, w0
	add	w0, w8, #4, lsl #12             ; =16384
	sub	w1, w27, w24
LBB0_8:
	bl	_bidir_sal
Lloh0:
	adrp	x8, _G729_AGC_FAC1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _G729_AGC_FAC1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w9, wzr, #0x4000
	madd	w8, w8, w0, w9
	asr	w22, w8, #15
	cmp	w21, #1
	b.lt	LBB0_11
LBB0_9:
Lloh3:
	adrp	x23, _G729_AGC_FACTOR@GOTPAGE
Lloh4:
	ldr	x23, [x23, _G729_AGC_FACTOR@GOTPAGEOFF]
	orr	w24, wzr, #0x4000
	orr	w25, wzr, #0x2000
	mov	w21, w21
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	madd	w8, w8, w19, w24
	add	w0, w22, w8, asr #15
	bl	_av_clip_int16
	mov	x19, x0
	ldr	w8, [x20]
	madd	w8, w8, w0, w25
	asr	w0, w8, #14
	bl	_av_clip_int16
	str	w0, [x20], #4
	subs	x21, x21, #1
	b.ne	LBB0_10
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_G729_AGC_FAC1,4,2              ; @G729_AGC_FAC1
	.comm	_G729_AGC_FACTOR,4,2            ; @G729_AGC_FACTOR
.subsections_via_symbols
