	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ape_unpack_stereo
_ape_unpack_stereo:                     ## @ape_unpack_stereo
	.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
	movq	%rdi, %rbx
	movl	8(%rdi), %eax
	movq	_APE_FRAMECODE_STEREO_SILENCE@GOTPCREL(%rip), %rcx
	notl	%eax
	testl	%eax, (%rcx)
	jne	LBB0_1
## %bb.21:
	movl	40(%rbx), %edi
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
LBB0_1:
	movl	%esi, %r14d
	movq	(%rbx), %rax
	movq	(%rax), %r15
	movq	8(%rax), %r12
	movq	%rbx, %rdi
	callq	*32(%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_2
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*16(%rbx)
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.3:
	leal	-1(%r14), %eax
	cmpl	$3, %eax
	jb	LBB0_14
## %bb.4:
	leaq	(%r12,%rax,4), %rcx
	addq	$4, %rcx
	cmpq	%rcx, %r15
	jae	LBB0_6
## %bb.5:
	leaq	(%r15,%rax,4), %rcx
	addq	$4, %rcx
	cmpq	%rcx, %r12
	jb	LBB0_14
LBB0_6:
	incq	%rax
	movq	%rax, %rcx
	andq	$-4, %rcx
	leaq	-4(%rcx), %rdx
	movq	%rdx, %rsi
	shrq	$2, %rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.8:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rdx,4), %xmm0
	movdqu	(%r15,%rdx,4), %xmm1
	movdqa	%xmm1, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm1, %xmm2
	psrad	$1, %xmm2
	psubd	%xmm2, %xmm0
	paddd	%xmm0, %xmm1
	movdqu	%xmm0, (%r15,%rdx,4)
	movdqu	%xmm1, (%r12,%rdx,4)
	movdqu	16(%r12,%rdx,4), %xmm0
	movdqu	16(%r15,%rdx,4), %xmm1
	movdqa	%xmm1, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm1, %xmm2
	psrad	$1, %xmm2
	psubd	%xmm2, %xmm0
	paddd	%xmm0, %xmm1
	movdqu	%xmm0, 16(%r15,%rdx,4)
	movdqu	%xmm1, 16(%r12,%rdx,4)
	addq	$8, %rdx
	addq	$-2, %rdi
	jne	LBB0_9
	jmp	LBB0_10
LBB0_7:
	xorl	%edx, %edx
LBB0_10:
	testb	$1, %sil
	je	LBB0_12
## %bb.11:
	movdqu	(%r12,%rdx,4), %xmm0
	movdqu	(%r15,%rdx,4), %xmm1
	movdqa	%xmm1, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm1, %xmm2
	psrad	$1, %xmm2
	psubd	%xmm2, %xmm0
	paddd	%xmm0, %xmm1
	movdqu	%xmm0, (%r15,%rdx,4)
	movdqu	%xmm1, (%r12,%rdx,4)
LBB0_12:
	cmpq	%rcx, %rax
	je	LBB0_20
## %bb.13:
	leaq	(%r12,%rcx,4), %r12
	leaq	(%r15,%rcx,4), %r15
	subl	%ecx, %r14d
LBB0_14:
	testb	$1, %r14b
	jne	LBB0_16
## %bb.15:
	movl	%r14d, %eax
	cmpl	$1, %r14d
	je	LBB0_20
	jmp	LBB0_18
LBB0_16:
	leal	-1(%r14), %eax
	movl	(%r12), %ecx
	movl	(%r15), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	subl	%esi, %ecx
	addl	%ecx, %edx
	movl	%ecx, (%r15)
	addq	$4, %r15
	movl	%edx, (%r12)
	addq	$4, %r12
	cmpl	$1, %r14d
	je	LBB0_20
LBB0_18:
	movl	%eax, %eax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rcx,4), %edx
	movl	(%r15,%rcx,4), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	subl	%edi, %edx
	addl	%edx, %esi
	movl	%edx, (%r15,%rcx,4)
	movl	%esi, (%r12,%rcx,4)
	movl	4(%r12,%rcx,4), %edx
	movl	4(%r15,%rcx,4), %esi
	movl	%esi, %edi
	shrl	$31, %edi
	addl	%esi, %edi
	sarl	%edi
	subl	%edi, %edx
	addl	%edx, %esi
	movl	%edx, 4(%r15,%rcx,4)
	movl	%esi, 4(%r12,%rcx,4)
	addq	$2, %rcx
	cmpl	%ecx, %eax
	jne	LBB0_19
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_APE_FRAMECODE_STEREO_SILENCE,4,2 ## @APE_FRAMECODE_STEREO_SILENCE
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pure silence stereo\n"

	.no_dead_strip	_ape_unpack_stereo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ape_unpack_stereo
_ape_unpack_stereo:                     ; @ape_unpack_stereo
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	ldr	w8, [x0, #8]
Lloh0:
	adrp	x9, _APE_FRAMECODE_STEREO_SILENCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _APE_FRAMECODE_STEREO_SILENCE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x20, #40]
Lloh3:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_av_log
LBB0_2:
	mov	x19, x1
	ldr	x8, [x20]
	ldp	x21, x22, [x8]
	ldr	x8, [x20, #32]
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_11
; %bb.3:
	ldr	x8, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	cbz	w19, LBB0_11
; %bb.4:
	sub	w8, w19, #1
	cmp	w8, #7
	b.lo	LBB0_9
; %bb.5:
	lsl	x9, x8, #2
	add	x9, x9, #4
	add	x10, x21, x9
	add	x9, x22, x9
	cmp	x21, x9
	ccmp	x22, x10, #2, lo
	b.lo	LBB0_9
; %bb.6:
	add	x10, x8, #1
	and	x11, x10, #0x1fffffff8
	lsl	x9, x11, #2
	add	x8, x22, x9
	add	x9, x21, x9
	sub	w19, w19, w11
	add	x12, x21, #16
	add	x13, x22, #16
	mov	x14, x11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x13, #-16]
	ldp	q2, q3, [x12, #-16]
	mov.16b	v4, v2
	usra.4s	v4, v2, #31
	sshr.4s	v4, v4, #1
	mov.16b	v5, v3
	usra.4s	v5, v3, #31
	sshr.4s	v5, v5, #1
	sub.4s	v0, v0, v4
	sub.4s	v1, v1, v5
	add.4s	v2, v0, v2
	add.4s	v3, v1, v3
	stp	q0, q1, [x12, #-16]
	stp	q2, q3, [x13, #-16]
	add	x12, x12, #32
	add	x13, x13, #32
	subs	x14, x14, #8
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x11
	b.ne	LBB0_10
	b	LBB0_11
LBB0_9:
	mov	x8, x22
	mov	x9, x21
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8]
	ldr	w11, [x9]
	cmp	w11, #0
	cinc	w12, w11, lt
	sub	w10, w10, w12, asr #1
	add	w11, w10, w11
	str	w10, [x9], #4
	str	w11, [x8], #4
	sub	w19, w19, #1
	cbnz	w19, LBB0_10
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_APE_FRAMECODE_STEREO_SILENCE,4,2 ; @APE_FRAMECODE_STEREO_SILENCE
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pure silence stereo\n"

	.no_dead_strip	_ape_unpack_stereo
.subsections_via_symbols
