	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_ac3_apply_rematrixing       ## -- Begin function ff_ac3_apply_rematrixing
	.p2align	4, 0x90
_ff_ac3_apply_rematrixing:              ## @ff_ac3_apply_rematrixing
	.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
	cmpl	$0, 16(%rdi)
	je	LBB0_24
## %bb.1:
	cmpl	$0, (%rdi)
	jle	LBB0_24
## %bb.2:
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movslq	(%rdi), %rax
	cmpq	%rax, %rcx
	jge	LBB0_24
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##       Child Loop BB0_18 Depth 3
                                        ##       Child Loop BB0_23 Depth 3
	movq	8(%rdi), %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rcx,4), %rbx
	cmpq	$0, 32(%r14,%rbx,8)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%r14,%rbx,8), %r15
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14,%rbx,8), %rax
	movl	4(%rax), %edi
	movl	8(%rax), %esi
	callq	_FFMIN
	cmpl	$0, 8(%r14,%rbx,8)
	jle	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r13d
	leaq	(%r14,%rbx,8), %r14
	addq	$8, %r14
	xorl	%r12d, %r12d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=2
	incq	%r12
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=2
	movslq	(%r14), %rax
	cmpq	%rax, %r12
	jge	LBB0_3
LBB0_10:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_18 Depth 3
                                        ##       Child Loop BB0_23 Depth 3
	cmpq	$0, (%r15,%r12,8)
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	_ff_ac3_rematrix_band_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rax,%r12,4), %rbx
	movl	4(%rax,%r12,4), %esi
	incq	%r12
	movl	%r13d, %edi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	cmpl	%eax, %ebx
	jge	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	8(%r14), %rdx
	movq	8(%rdx), %rcx
	movq	16(%rdx), %rdx
	movslq	%eax, %r10
	movq	%r10, %r9
	subq	%rbx, %r9
	cmpq	$8, %r9
	jb	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=2
	leaq	(%rcx,%rbx,4), %rsi
	leaq	(%rdx,%r10,4), %rdi
	cmpq	%rdi, %rsi
	jae	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=2
	leaq	(%rcx,%r10,4), %rsi
	leaq	(%rdx,%rbx,4), %rdi
	cmpq	%rsi, %rdi
	jae	LBB0_17
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	%rbx, %r8
LBB0_20:                                ##   in Loop: Header=BB0_10 Depth=2
	subl	%r8d, %eax
	movq	%r8, %rdi
	testb	$1, %al
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	(%rcx,%r8,4), %eax
	movl	(%rdx,%r8,4), %esi
	leal	(%rsi,%rax), %edi
	sarl	%edi
	movl	%edi, (%rcx,%r8,4)
	subl	%esi, %eax
	sarl	%eax
	movl	%eax, (%rdx,%r8,4)
	leaq	1(%r8), %rdi
LBB0_22:                                ##   in Loop: Header=BB0_10 Depth=2
	notq	%r8
	addq	%r10, %r8
	je	LBB0_9
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_10 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rcx,%rdi,4), %eax
	movl	(%rdx,%rdi,4), %esi
	leal	(%rsi,%rax), %ebx
	sarl	%ebx
	movl	%ebx, (%rcx,%rdi,4)
	subl	%esi, %eax
	sarl	%eax
	movl	%eax, (%rdx,%rdi,4)
	movl	4(%rcx,%rdi,4), %eax
	movl	4(%rdx,%rdi,4), %esi
	leal	(%rsi,%rax), %ebx
	sarl	%ebx
	movl	%ebx, 4(%rcx,%rdi,4)
	subl	%esi, %eax
	sarl	%eax
	movl	%eax, 4(%rdx,%rdi,4)
	addq	$2, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_23
	jmp	LBB0_9
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=2
	movq	%r9, %r11
	andq	$-8, %r11
	leaq	(%r11,%rbx), %r8
	leaq	(%rcx,%rbx,4), %rsi
	addq	$16, %rsi
	leaq	(%rdx,%rbx,4), %rbx
	addq	$16, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_10 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movdqu	-16(%rsi,%rdi,4), %xmm0
	movdqu	(%rsi,%rdi,4), %xmm1
	movdqu	-16(%rbx,%rdi,4), %xmm2
	movdqu	(%rbx,%rdi,4), %xmm3
	movdqa	%xmm2, %xmm4
	paddd	%xmm0, %xmm4
	movdqa	%xmm3, %xmm5
	paddd	%xmm1, %xmm5
	psrad	$1, %xmm4
	psrad	$1, %xmm5
	movdqu	%xmm4, -16(%rsi,%rdi,4)
	movdqu	%xmm5, (%rsi,%rdi,4)
	psubd	%xmm2, %xmm0
	psubd	%xmm3, %xmm1
	psrad	$1, %xmm0
	psrad	$1, %xmm1
	movdqu	%xmm0, -16(%rbx,%rdi,4)
	movdqu	%xmm1, (%rbx,%rdi,4)
	addq	$8, %rdi
	cmpq	%rdi, %r11
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpq	%r11, %r9
	je	LBB0_9
	jmp	LBB0_20
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_ac3_rematrix_band_tab,8,3   ## @ff_ac3_rematrix_band_tab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_ac3_apply_rematrixing       ; -- Begin function ff_ac3_apply_rematrixing
	.p2align	2
_ff_ac3_apply_rematrixing:              ; @ff_ac3_apply_rematrixing
	.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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_19
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.2:
	mov	x21, #0
	mov	x23, #0
	mov	w22, #40
Lloh0:
	adrp	x24, _ff_ac3_rematrix_band_tab@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ff_ac3_rematrix_band_tab@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_19
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;       Child Loop BB0_18 Depth 3
	ldr	x27, [x19, #8]
	madd	x8, x21, x22, x27
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x21, x22, x27
	ldr	x23, [x8, #24]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x25, x21, x22, x27
	ldr	x8, [x25]
	ldp	w0, w1, [x8, #4]
	bl	_FFMIN
	ldr	w8, [x25, #8]!
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	mov	x26, #0
	madd	x8, x21, x22, x27
	add	x27, x8, #16
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x26, x26, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldrsw	x8, [x25]
	cmp	x26, x8
	b.ge	LBB0_3
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_15 Depth 3
                                        ;       Child Loop BB0_18 Depth 3
	ldr	x8, [x23, x26, lsl #3]
	cbz	x8, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x24]
	ldrsw	x28, [x8, x26, lsl #2]
	add	x26, x26, #1
	ldr	w1, [x8, x26, lsl #2]
	mov	x0, x20
	bl	_FFMIN
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w28, w0
	b.ge	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x8, [x27]
	ldp	x10, x8, [x8, #8]
	sxtw	x9, w0
	sub	x11, x9, x28
	cmp	x11, #8
	b.lo	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	lsl	x12, x28, #2
	add	x13, x10, x12
	lsl	x15, x9, #2
	add	x16, x10, x15
	add	x14, x8, x12
	add	x12, x8, x15
	cmp	x13, x12
	ccmp	x14, x16, #2, lo
	b.lo	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	and	x12, x11, #0xfffffffffffffff8
	add	x28, x12, x28
	add	x13, x13, #16
	add	x14, x14, #16
	mov	x15, x12
LBB0_15:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	q0, q1, [x13, #-16]
	ldp	q2, q3, [x14, #-16]
	add.4s	v4, v2, v0
	add.4s	v5, v3, v1
	sshr.4s	v4, v4, #1
	sshr.4s	v5, v5, #1
	stp	q4, q5, [x13, #-16]
	sub.4s	v0, v0, v2
	sub.4s	v1, v1, v3
	sshr.4s	v0, v0, #1
	sshr.4s	v1, v1, #1
	stp	q0, q1, [x14, #-16]
	add	x13, x13, #32
	add	x14, x14, #32
	subs	x15, x15, #8
	b.ne	LBB0_15
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	x11, x12
	b.eq	LBB0_9
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=2
	lsl	x11, x28, #2
	add	x10, x10, x11
	add	x8, x8, x11
	sub	x9, x9, x28
LBB0_18:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_10 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w11, [x10]
	ldr	w12, [x8]
	add	w13, w12, w11
	asr	w13, w13, #1
	str	w13, [x10], #4
	sub	w11, w11, w12
	asr	w11, w11, #1
	str	w11, [x8], #4
	subs	x9, x9, #1
	b.ne	LBB0_18
	b	LBB0_9
LBB0_19:
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_ac3_rematrix_band_tab,8,3   ; @ff_ac3_rematrix_band_tab
.subsections_via_symbols
