	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function celt_stereo_ms_decouple
_celt_stereo_ms_decouple:               ## @celt_stereo_ms_decouple
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	jle	LBB0_11
## %bb.1:
	movl	%edx, %eax
	cmpl	$4, %edx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_3:
	leaq	(%rsi,%rax,4), %rcx
	cmpq	%rdi, %rcx
	seta	%r14b
	leaq	(%rdi,%rax,4), %rbx
	cmpq	%rsi, %rbx
	seta	%r15b
	movq	_M_SQRT1_2@GOTPCREL(%rip), %r8
	leaq	4(%r8), %rdx
	cmpq	%rdx, %rdi
	setb	%r12b
	cmpq	%r8, %rbx
	seta	%r10b
	cmpq	%rdx, %rsi
	setb	%r9b
	cmpq	%r8, %rcx
	seta	%r11b
	xorl	%ecx, %ecx
	testb	%r15b, %r14b
	jne	LBB0_9
## %bb.4:
	andb	%r10b, %r12b
	jne	LBB0_9
## %bb.5:
	andb	%r11b, %r9b
	jne	LBB0_9
## %bb.6:
	movl	%eax, %ecx
	andl	$-4, %ecx
	movss	(%r8), %xmm0                    ## xmm0 = mem[0],zero,zero,zero
	shufps	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	(,%rax,4), %r8
	andq	$-16, %r8
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rdi,%rdx), %xmm1
	movups	(%rsi,%rdx), %xmm2
	addps	%xmm1, %xmm2
	mulps	%xmm0, %xmm2
	movups	%xmm2, (%rdi,%rdx)
	movups	(%rsi,%rdx), %xmm2
	subps	%xmm1, %xmm2
	mulps	%xmm0, %xmm2
	movups	%xmm2, (%rsi,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_7
## %bb.8:
	cmpq	%rax, %rcx
	je	LBB0_11
LBB0_9:
	movq	_M_SQRT1_2@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rdi,%rcx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	(%rsi,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	mulss	(%rdx), %xmm1
	movss	%xmm1, (%rdi,%rcx,4)
	movss	(%rsi,%rcx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	mulss	(%rdx), %xmm1
	movss	%xmm1, (%rsi,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_10
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_SQRT1_2,4,2                  ## @M_SQRT1_2
	.no_dead_strip	_celt_stereo_ms_decouple
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function celt_stereo_ms_decouple
_celt_stereo_ms_decouple:               ; @celt_stereo_ms_decouple
	.cfi_startproc
; %bb.0:
	cmp	w2, #1
	b.lt	LBB0_11
; %bb.1:
	mov	w9, w2
Lloh0:
	adrp	x8, _M_SQRT1_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_SQRT1_2@GOTPAGEOFF]
	cmp	w2, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_9
LBB0_3:
	mov	x10, #0
	lsl	x11, x9, #2
	add	x13, x1, x11
	add	x12, x8, #4
	cmp	x0, x12
	add	x14, x0, x11
	ccmp	x14, x8, #0, lo
	cset	w11, hi
	cmp	x1, x12
	ccmp	x13, x8, #0, lo
	cset	w12, hi
	cmp	x14, x1
	ccmp	x13, x0, #0, hi
	b.hi	LBB0_9
; %bb.4:
	tbnz	w11, #0, LBB0_9
; %bb.5:
	tbnz	w12, #0, LBB0_9
; %bb.6:
	and	x10, x9, #0xfffffff8
	ld1r.4s	{ v0 }, [x8]
	add	x11, x0, #16
	add	x12, x1, #16
	mov	x13, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x11, #-16]
	ldp	q3, q4, [x12, #-16]
	fadd.4s	v5, v1, v3
	fadd.4s	v6, v2, v4
	fmul.4s	v5, v5, v0
	fmul.4s	v6, v6, v0
	stp	q5, q6, [x11, #-16]
	fsub.4s	v1, v3, v1
	fsub.4s	v2, v4, v2
	fmul.4s	v1, v1, v0
	fmul.4s	v2, v2, v0
	stp	q1, q2, [x12, #-16]
	add	x11, x11, #32
	add	x12, x12, #32
	subs	x13, x13, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x9
	b.eq	LBB0_11
LBB0_9:
	lsl	x12, x10, #2
	add	x11, x1, x12
	add	x12, x0, x12
	sub	x9, x9, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x12]
	ldr	s1, [x11]
	fadd	s1, s0, s1
	ldr	s2, [x8]
	fmul	s1, s1, s2
	str	s1, [x12], #4
	ldr	s1, [x11]
	fsub	s0, s1, s0
	ldr	s1, [x8]
	fmul	s0, s0, s1
	str	s0, [x11], #4
	subs	x9, x9, #1
	b.ne	LBB0_10
LBB0_11:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_M_SQRT1_2,4,2                  ; @M_SQRT1_2
	.no_dead_strip	_celt_stereo_ms_decouple
.subsections_via_symbols
