	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_spectral_coeffs
_encode_spectral_coeffs:                ## @encode_spectral_coeffs
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.1:
	movq	%rsi, %r12
	leaq	4(%rdi), %r8
	movl	16(%rsi), %r10d
	xorl	%r9d, %r9d
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %ecx
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12), %rdx
	addl	(%rdx,%r15,4), %r9d
	cmpl	%ecx, %r9d
	jge	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	testl	%r10d, %r10d
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, %ecx
	shll	$4, %ecx
	movslq	%r9d, %r15
	movslq	%ecx, %rax
	movl	%r15d, %ecx
	shll	$7, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r11d, %r11d
	xorl	%edx, %edx
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	24(%r12), %rcx
	addl	(%rcx,%r11,8), %edx
	incq	%r11
	movslq	%r10d, %rcx
	cmpq	%rcx, %r11
	jge	LBB0_11
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	movq	64(%r12), %rcx
	leaq	(%r11,%rax), %rbx
	cmpq	$0, (%rcx,%rbx,8)
	jne	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	8(%r12), %rcx
	cmpl	$0, (%rcx,%r15,4)
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	leal	(%rax,%rdx), %r14d
	movq	%r15, %r13
	movq	%r11, -96(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%rdi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movslq	%r14d, %r14
	leaq	(,%r14,4), %rdx
	addq	56(%r12), %rdx
	movq	24(%r12), %rcx
	movq	32(%r12), %rax
	movq	(%rcx,%r11,8), %r8
	movq	48(%r12), %rcx
	movl	(%rcx,%rbx,4), %r9d
	movq	40(%r12), %rcx
	movl	(%rcx,%rbx,4), %r11d
	movl	(%rdi), %r10d
	movl	(%rax,%r15,4), %eax
	subq	$8, %rsp
	movq	%rdi, %r15
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	pushq	%rax
	pushq	%r10
	pushq	%r11
	movq	-104(%rbp), %rax                ## 8-byte Reload
	callq	*(%rax)
	movq	-96(%rbp), %r11                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	addq	$32, %rsp
	incq	%r13
	movq	8(%r12), %rax
	movslq	(%rax,%r15,4), %rax
	addq	%r15, %rax
	subl	$-128, %r14d
	cmpq	%rax, %r13
	jl	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	16(%r12), %r10d
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r9d, %r15
	jmp	LBB0_12
LBB0_13:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_encode_spectral_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_spectral_coeffs
_encode_spectral_coeffs:                ; @encode_spectral_coeffs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w9, [x1]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w25, #0
	add	x22, x0, #4
	ldr	w8, [x1, #16]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #8]
	ldr	w10, [x10, x26, lsl #2]
	add	w25, w10, w25
	cmp	w25, w9
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	cmp	w8, #0
	b.le	LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, #0
	mov	w12, #0
	lsl	w9, w25, #4
	mov	x10, x25
	sxtw	x26, w10
	sxtw	x10, w9
	lsl	w9, w25, #7
	str	w9, [sp, #12]                   ; 4-byte Folded Spill
	str	x10, [sp, #16]                  ; 8-byte Folded Spill
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldr	x9, [x19, #24]
	ldr	x9, [x9, x24, lsl #3]
	add	w12, w12, w9
	add	x24, x24, #1
	cmp	x24, w8, sxtw
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	x9, [x19, #64]
	add	x28, x24, x10
	ldr	x9, [x9, x28, lsl #3]
	cbnz	x9, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x9, [x19, #8]
	ldr	w9, [x9, x26, lsl #2]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	str	w12, [sp, #28]                  ; 4-byte Folded Spill
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w27, w8, w12
	mov	x23, x26
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x9, [x19, #56]
	ldp	x10, x11, [x19, #24]
	ldr	x4, [x10, x24, lsl #3]
	add	x2, x9, w27, sxtw #2
	lsl	x9, x28, #2
	ldp	x12, x10, [x19, #40]
	ldr	w5, [x10, x9]
	ldr	w6, [x12, x9]
	lsl	x21, x26, #2
	ldr	w7, [x20]
	ldr	w9, [x11, x21]
	str	w9, [sp]
	mov	x0, x20
	mov	x1, x22
	mov	x3, #0
	blr	x8
	add	x23, x23, #1
	ldr	x8, [x19, #8]
	ldrsw	x8, [x8, x21]
	add	x8, x8, w25, sxtw
	add	w27, w27, #128
	cmp	x23, x8
	b.lt	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w8, [x19, #16]
	ldr	w12, [sp, #28]                  ; 4-byte Folded Reload
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	b	LBB0_6
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	sxtw	x26, w25
	b	LBB0_3
LBB0_13:
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_encode_spectral_coeffs
.subsections_via_symbols
