	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_best_filter
_find_best_filter:                      ## @find_best_filter
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rcx
	movq	_DCA_ADPCM_COEFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	js	LBB0_6
## %bb.1:
	movl	%edx, %r15d
	addq	$16, %rsi
	xorl	%r13d, %r13d
	movl	$-1, %ebx
	xorl	%r12d, %r12d
	movq	%rsi, -200(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	1(%r12), %ecx
	movl	-180(%rbp), %ebx                ## 4-byte Reload
	incl	%ebx
	cmpl	%eax, %r12d
	movl	%ecx, %r12d
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	jge	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	%eax, %r12d
	movl	%ebx, -180(%rbp)                ## 4-byte Spill
	jg	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %rax
	leaq	-176(,%rax,8), %r14
	addq	%rbp, %r14
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%ebx
	movq	%rsi, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%ebx, %ecx
	callq	_calc_corr
	movq	_DCA_ADPCM_COEFFS@GOTPCREL(%rip), %rcx
	movq	-200(%rbp), %rsi                ## 8-byte Reload
	movq	%rax, (%r14)
	movl	(%rcx), %eax
	addq	$8, %r14
	incl	%r13d
	cmpl	%eax, %ebx
	jl	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	_DCA_ADPCM_VQCODEBOOK_SZ@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.8:
	movl	$-1, %r12d
	movabsq	$4611686018427387904, %r13      ## imm = 0x4000000000000000
	xorl	%ebx, %ebx
	leaq	-176(%rbp), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ff_dca_adpcm_vb@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edi
	movl	(%rcx,%rbx,4), %edx
	movq	%r15, %rsi
	callq	_apply_filter
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	cmpq	%r13, %rax
	cmovll	%ebx, %r12d
	cmovlq	%rax, %r13
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
## %bb.10:
	movslq	%r12d, %rax
	jmp	LBB0_11
LBB0_7:
	movq	$-1, %rax
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_13
## %bb.12:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DCA_ADPCM_COEFFS,4,2           ## @DCA_ADPCM_COEFFS
	.comm	_DCA_ADPCM_VQCODEBOOK_SZ,4,2    ## @DCA_ADPCM_VQCODEBOOK_SZ
	.comm	_ff_dca_adpcm_vb,8,3            ## @ff_dca_adpcm_vb
	.no_dead_strip	_find_best_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_best_filter
_find_best_filter:                      ; @find_best_filter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x23, [x0]
Lloh3:
	adrp	x24, _DCA_ADPCM_COEFFS@GOTPAGE
Lloh4:
	ldr	x24, [x24, _DCA_ADPCM_COEFFS@GOTPAGEOFF]
	ldr	w8, [x24]
	tbnz	w8, #31, LBB0_6
; %bb.1:
	mov	x19, x2
	mov	w25, #0
	mov	w21, #0
	add	x20, x1, #16
	mov	w26, #-1
	mov	x27, sp
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w21, #1
	add	w26, w26, #1
	cmp	w21, w8
	mov	x21, x9
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w21, w8
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x27, w25, sxtw #3
	mov	x22, x26
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w22, w22, #1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	bl	_calc_corr
	str	x0, [x28], #8
	ldr	w8, [x24]
	add	w25, w25, #1
	cmp	w22, w8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_6:
Lloh5:
	adrp	x19, _DCA_ADPCM_VQCODEBOOK_SZ@GOTPAGE
Lloh6:
	ldr	x19, [x19, _DCA_ADPCM_VQCODEBOOK_SZ@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x21, #0
	mov	w20, #-1
	mov	x22, #4611686018427387904
Lloh7:
	adrp	x24, _ff_dca_adpcm_vb@GOTPAGE
Lloh8:
	ldr	x24, [x24, _ff_dca_adpcm_vb@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x21, #2
	ldr	x9, [x24]
	ldr	w0, [x9, x8]
	ldr	w2, [x23, x8]
	mov	x1, sp
	bl	_apply_filter
	cmp	x0, x22
	csel	x22, x0, x22, lt
	csel	w20, w21, w20, lt
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_8
; %bb.9:
	sxtw	x0, w20
	b	LBB0_11
LBB0_10:
	mov	x0, #-1
LBB0_11:
	ldur	x8, [x29, #-88]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DCA_ADPCM_COEFFS,4,2           ; @DCA_ADPCM_COEFFS
	.comm	_DCA_ADPCM_VQCODEBOOK_SZ,4,2    ; @DCA_ADPCM_VQCODEBOOK_SZ
	.comm	_ff_dca_adpcm_vb,8,3            ; @ff_dca_adpcm_vb
	.no_dead_strip	_find_best_filter
.subsections_via_symbols
