	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aptx_decode_samples
_aptx_decode_samples:                   ## @aptx_decode_samples
	.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
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	_NB_CHANNELS@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	jle	LBB0_6
## %bb.1:
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_AV_RB16
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_aptx_unpack_codeword
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_NB_CHANNELS@GOTPCREL(%rip), %rbx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rdi
	addq	%r15, %rdi
	movl	12(%r13), %esi
	callq	_aptx_invert_quantize_and_prediction
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movslq	(%rbx), %rax
	addq	$3, %r12
	addq	$4, %r15
	addq	$8, %r14
	cmpq	%rax, %rcx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r13), %rdi
	addq	%r15, %rdi
	callq	_aptx_generate_dither
	movq	(%r13), %rbx
	addq	%r15, %rbx
	cmpl	$0, 12(%r13)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r12d, %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	callq	_AV_RB24
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_aptxhd_unpack_codeword
	jmp	LBB0_5
LBB0_6:
	movq	(%r13), %rdi
	leaq	8(%r13), %rsi
	callq	_aptx_check_parity
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%rbx)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_9
## %bb.7:
	movq	%rbx, %r14
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	%r15, %rdi
	movq	%r12, %rsi
	callq	_aptx_decode_channel
	incq	%rbx
	movslq	(%r14), %rax
	addq	$4, %r15
	addq	$16, %r12
	cmpq	%rax, %rbx
	jl	LBB0_8
LBB0_9:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_CHANNELS,4,2                ## @NB_CHANNELS
	.no_dead_strip	_aptx_decode_samples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aptx_decode_samples
_aptx_decode_samples:                   ; @aptx_decode_samples
	.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
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x24, _NB_CHANNELS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NB_CHANNELS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x21, x1
	mov	x25, #0
	mov	x26, #0
	mov	x27, #0
	mov	x22, x1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_AV_RB16
	mov	x1, x0
	mov	x0, x23
	bl	_aptx_unpack_codeword
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	add	x0, x8, x25
	ldr	w1, [x20, #12]
	bl	_aptx_invert_quantize_and_prediction
	add	x27, x27, #1
	ldrsw	x8, [x24]
	add	x26, x26, #3
	add	x25, x25, #4
	add	x22, x22, #8
	cmp	x27, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x0, x8, x25
	bl	_aptx_generate_dither
	ldr	w8, [x20, #12]
	ldr	x9, [x20]
	add	x23, x9, x25
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x21, w26, uxtw #2
	bl	_AV_RB24
	mov	x1, x0
	mov	x0, x23
	bl	_aptxhd_unpack_codeword
	b	LBB0_3
LBB0_6:
	mov	x1, x20
	ldr	x0, [x1], #8
	bl	_aptx_check_parity
	mov	x21, x0
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x22, #0
	mov	x23, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	add	x0, x8, x22
	mov	x1, x19
	bl	_aptx_decode_channel
	add	x23, x23, #1
	ldrsw	x8, [x24]
	add	x22, x22, #4
	add	x19, x19, #16
	cmp	x23, x8
	b.lt	LBB0_8
LBB0_9:
	mov	x0, x21
	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	_NB_CHANNELS,4,2                ; @NB_CHANNELS
	.no_dead_strip	_aptx_decode_samples
.subsections_via_symbols
