	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_rematrixing_strategy
_compute_rematrixing_strategy:          ## @compute_rematrixing_strategy
	.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	$56, %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), %rax
	movq	_AC3_CHMODE_STEREO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.1:
	movq	%rdi, %r14
	cmpl	$0, 8(%rdi)
	jle	LBB0_15
## %bb.2:
	xorl	%edi, %edi
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	incq	%rdi
	movq	%r12, %r14
	movslq	8(%r12), %rax
	cmpq	%rax, %rdi
	jge	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	32(%r14), %r15
	leaq	(%rdi,%rdi,4), %rbx
	leaq	(%r15,%rbx,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	testq	%rdi, %rdi
	sete	%al
	movl	%eax, (%r15,%rbx,8)
	movl	$4, 4(%r15,%rbx,8)
	cmpq	$0, 32(%r15,%rbx,8)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r14), %r8
	movq	_CPL_CH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	xorl	%esi, %esi
	cmpl	$62, (%r8,%rdx,4)
	setl	%sil
	movl	$4, %eax
	subl	%esi, %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	xorl	%esi, %esi
	cmpl	$37, (%r8,%rdx,4)
	sete	%sil
	subl	%esi, %eax
	movl	%eax, 4(%rcx)
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	cmpl	4(%rcx), %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	8(%r15,%rbx,8), %rax
	movl	4(%rax), %edi
	movl	8(%rax), %esi
	callq	_FFMIN
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, %r12
	cmpl	$0, 24(%r14)
	je	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 4(%rax)
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r15,%rbx,8), %r15
	addq	$24, %r15
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movslq	4(%rax), %rax
	cmpq	%rax, %r14
	jge	LBB0_14
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %r13
	movq	_ff_ac3_rematrix_band_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r14,4), %rbx
	incq	%r14
	movl	4(%rax,%r13,4), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FFMIN
	movq	(%r15), %rsi
	movq	8(%rsi), %rdx
	addq	%rbx, %rdx
	movq	%rbx, %rcx
	addq	16(%rsi), %rcx
	subl	%ebx, %eax
	movq	%r12, %rdi
	leaq	-64(%rbp), %rsi
	movl	%eax, %r8d
	callq	_sum_square_butterfly
	movl	-56(%rbp), %edi
	movl	-52(%rbp), %esi
	callq	_FFMIN
	movq	%rax, %rbx
	movl	-64(%rbp), %edi
	movl	-60(%rbp), %esi
	callq	_FFMIN
	xorl	%ecx, %ecx
	cmpq	%rax, %rbx
	setl	%cl
	movq	-8(%r15), %rax
	movl	%ecx, (%rax,%r13,4)
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	cmpl	%ecx, (%rax,%r13,4)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	jmp	LBB0_13
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AC3_CHMODE_STEREO,8,3          ## @AC3_CHMODE_STEREO
	.comm	_CPL_CH,8,3                     ## @CPL_CH
	.comm	_ff_ac3_rematrix_band_tab,8,3   ## @ff_ac3_rematrix_band_tab
	.no_dead_strip	_compute_rematrixing_strategy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_rematrixing_strategy
_compute_rematrixing_strategy:          ; @compute_rematrixing_strategy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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]
	str	x8, [sp, #24]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _AC3_CHMODE_STEREO@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AC3_CHMODE_STEREO@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #8]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.2:
	mov	x22, #0
	str	xzr, [sp]                       ; 8-byte Folded Spill
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19, #8]
	cmp	x22, x8
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	x24, [sp]                       ; 8-byte Folded Reload
	ldr	x21, [x19, #32]
	mov	w8, #40
	madd	x9, x22, x8, x21
	cmp	x22, #0
	cset	w8, eq
	str	w8, [x9]
	mov	x28, x9
	mov	w8, #4
	str	w8, [x28, #4]!
	str	x9, [sp]                        ; 8-byte Folded Spill
	ldr	x8, [x9, #32]
	cbz	x8, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
Lloh6:
	adrp	x9, _CPL_CH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CPL_CH@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	lsl	x9, x9, #2
	ldr	w10, [x8, x9]
	cmp	w10, #62
	mov	w10, #3
	cinc	w10, w10, ge
	str	w10, [x28]
	ldr	w8, [x8, x9]
	cmp	w8, #37
	cset	w8, eq
	sub	w8, w10, w8
	str	w8, [x28]
	cbz	x22, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x24, #4]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	mov	w9, #1
	str	w9, [x8]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #40
	madd	x8, x22, x8, x21
	ldr	x8, [x8, #8]
	ldp	w0, w1, [x8, #4]
	bl	_FFMIN
	ldr	w8, [x19, #24]
	cbz	w8, LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	mov	x23, #0
	mov	w8, #40
	madd	x8, x22, x8, x21
	add	x27, x8, #24
	add	x26, x8, #16
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	x23, x23, #1
	ldrsw	x8, [x28]
	cmp	x23, x8
	b.ge	LBB0_3
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh9:
	adrp	x8, _ff_ac3_rematrix_band_tab@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ff_ac3_rematrix_band_tab@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	lsl	x25, x23, #2
	add	x8, x8, x25
	ldp	w21, w1, [x8]
                                        ; kill: def $w21 killed $w21 def $x21
	sxtw	x21, w21
	mov	x0, x20
	bl	_FFMIN
	ldr	x8, [x27]
	ldp	x9, x8, [x8, #8]
	add	x2, x9, x21
	add	x3, x8, x21
	sub	w4, w0, w21
	add	x1, sp, #8
	mov	x0, x19
	bl	_sum_square_butterfly
	ldp	w0, w1, [sp, #16]
	bl	_FFMIN
	mov	x21, x0
	ldp	w0, w1, [sp, #8]
	bl	_FFMIN
	cmp	x21, x0
	cset	w8, lt
	ldr	x9, [x26]
	str	w8, [x9, x25]
	cbz	x22, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x9, [x24, #16]
	ldr	w9, [x9, x23, lsl #2]
	cmp	w9, w8
	b.eq	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_11
LBB0_15:
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AC3_CHMODE_STEREO,8,3          ; @AC3_CHMODE_STEREO
	.comm	_CPL_CH,8,3                     ; @CPL_CH
	.comm	_ff_ac3_rematrix_band_tab,8,3   ; @ff_ac3_rematrix_band_tab
	.no_dead_strip	_compute_rematrixing_strategy
.subsections_via_symbols
