	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aptx_generate_dither
_aptx_generate_dither:                  ## @aptx_generate_dither
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_aptx_update_codeword_history
	movl	(%r14), %ecx
	sarl	$7, %ecx
	imull	$5184443, %ecx, %ebx            ## imm = 0x4F1BBB
	imull	$20737772, %ecx, %ecx           ## imm = 0x13C6EEC
	sarl	$22, %ebx
	addl	%ecx, %ebx
	movq	_NB_SUBBANDS@GOTPCREL(%rip), %rdx
	cmpl	$0, (%rdx)
	jle	LBB0_3
## %bb.1:
	movq	8(%r14), %rsi
	movl	$23, %ecx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	shll	%cl, %eax
	movl	%eax, (%rsi,%rdi,4)
	incq	%rdi
	movslq	(%rdx), %rax
	addl	$-5, %ecx
	cmpq	%rax, %rdi
	jl	LBB0_2
LBB0_3:
	shrl	$25, %ebx
	andl	$1, %ebx
	movl	%ebx, 16(%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_SUBBANDS,4,2                ## @NB_SUBBANDS
	.no_dead_strip	_aptx_generate_dither
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aptx_generate_dither
_aptx_generate_dither:                  ; @aptx_generate_dither
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_aptx_update_codeword_history
	ldr	w8, [x19]
	asr	w8, w8, #7
	mov	w9, #7099
	movk	w9, #79, lsl #16
	mul	w9, w8, w9
	mov	w10, #28396
	movk	w10, #316, lsl #16
	mul	w8, w8, w10
	add	w8, w8, w9, asr #22
Lloh0:
	adrp	x9, _NB_SUBBANDS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NB_SUBBANDS@GOTPAGEOFF]
	ldr	w10, [x9]
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x10, #0
	ldr	x11, [x19, #8]
	mov	w12, #23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w13, w8, w12
	str	w13, [x11, x10, lsl #2]
	add	x10, x10, #1
	ldrsw	x13, [x9]
	sub	w12, w12, #5
	cmp	x10, x13
	b.lt	LBB0_2
LBB0_3:
	ubfx	w8, w8, #25, #1
	str	w8, [x19, #16]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_SUBBANDS,4,2                ; @NB_SUBBANDS
	.no_dead_strip	_aptx_generate_dither
.subsections_via_symbols
