	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aptx_encode_channel
_aptx_encode_channel:                   ## @aptx_encode_channel
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	addq	$32, %rdi
	leaq	-80(%rbp), %rdx
	callq	_aptx_qmf_tree_analysis
	movq	%r12, %rdi
	callq	_aptx_generate_dither
	movq	_NB_SUBBANDS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_3
## %bb.1:
	movslq	%r14d, %r14
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp,%rbx,2), %rdi
	movq	24(%r12), %rax
	subq	(%rax,%rbx,2), %rdi
	movl	$23, %esi
	callq	_av_clip_intp2
	movq	16(%r12), %rdi
	addq	%rbx, %rdi
	movq	(%r12), %rcx
	movq	8(%r12), %rdx
	movl	(%rdx,%rbx), %edx
	movl	(%rcx,%rbx), %ecx
	movq	_tables@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rsi,%r14,8), %r8
	addq	%rbx, %r8
	movq	%rax, %rsi
	callq	_aptx_quantize_difference
	incq	%r15
	movslq	(%r13), %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_2
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_SUBBANDS,4,2                ## @NB_SUBBANDS
	.comm	_tables,8,3                     ## @tables
	.no_dead_strip	_aptx_encode_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aptx_encode_channel
_aptx_encode_channel:                   ; @aptx_encode_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	add	x0, x0, #32
	add	x21, sp, #8
	add	x2, sp, #8
	bl	_aptx_qmf_tree_analysis
	mov	x0, x19
	bl	_aptx_generate_dither
Lloh3:
	adrp	x22, _NB_SUBBANDS@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NB_SUBBANDS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	x25, #0
	sxtw	x20, w20
Lloh5:
	adrp	x26, _tables@GOTPAGE
Lloh6:
	ldr	x26, [x26, _tables@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, x23]
	ldr	x9, [x19, #24]
	ldr	x9, [x9, x23]
	sub	x0, x8, x9
	mov	w1, #23
	bl	_av_clip_intp2
	mov	x1, x0
	ldr	x8, [x19, #16]
	add	x0, x8, x24
	ldp	x9, x8, [x19]
	ldr	w2, [x8, x24]
	ldr	w3, [x9, x24]
	ldr	x8, [x26]
	ldr	x8, [x8, x20, lsl #3]
	add	x4, x8, x24
	bl	_aptx_quantize_difference
	add	x25, x25, #1
	ldrsw	x8, [x22]
	add	x24, x24, #4
	add	x23, x23, #8
	cmp	x25, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	x8, [sp, #40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	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
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_SUBBANDS,4,2                ; @NB_SUBBANDS
	.comm	_tables,8,3                     ; @tables
	.no_dead_strip	_aptx_encode_channel
.subsections_via_symbols
