	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_scale_factors
_encode_scale_factors:                  ## @encode_scale_factors
	.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	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	24(%rdx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.1:
	movq	%rdx, %r13
	movq	(%rdx), %rax
	movl	(%rax), %edx
	movq	_NOISE_OFFSET@GOTPCREL(%rip), %rax
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	subl	(%rax), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	28(%r13), %eax
	movl	$1, %edx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	xorl	%r8d, %r8d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	24(%r13), %ecx
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%r13), %rdx
	movslq	%edi, %rsi
	addl	(%rdx,%rsi,8), %edi
	cmpl	%ecx, %edi
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%eax, %eax
	jle	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%edi, %eax
	shll	$4, %eax
	movslq	%eax, %r15
	xorl	%r12d, %r12d
	jmp	LBB0_4
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %r14d
	subl	%r8d, %r14d
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	_SCALE_DIFF_ZERO@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	xorl	%edi, %edi
	cmpl	$121, %r14d
	setb	%dil
	callq	_av_assert0
	movq	_ff_aac_scalefactor_bits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r14d, %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_ff_aac_scalefactor_code@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_put_bits
	movl	%ebx, %r8d
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	movslq	28(%r13), %rax
	incq	%r15
	cmpq	%rax, %r12
	jge	LBB0_15
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rax
	cmpl	$0, (%rax,%r15,4)
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%r13), %rax
	movq	(%rax,%r15,8), %rax
	movq	_NOISE_BT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r13), %rax
	movl	(%rax,%r15,4), %ebx
	movl	%ebx, %r14d
	subl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %ecx
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_NOISE_PRE_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	%r14d, %rdx
	movq	_NOISE_PRE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r8d, %r14d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	callq	_put_bits
	movl	%r14d, %r8d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	-56(%rbp), %eax                 ## 4-byte Reload
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	(%r13), %rcx
	movl	(%rcx,%r15,4), %ebx
	movq	_INTENSITY_BT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_INTENSITY_BT2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, %r14d
	subl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_17:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NOISE_OFFSET,4,2               ## @NOISE_OFFSET
	.comm	_NOISE_BT,8,3                   ## @NOISE_BT
	.comm	_NOISE_PRE_BITS,4,2             ## @NOISE_PRE_BITS
	.comm	_NOISE_PRE,8,3                  ## @NOISE_PRE
	.comm	_INTENSITY_BT,8,3               ## @INTENSITY_BT
	.comm	_INTENSITY_BT2,8,3              ## @INTENSITY_BT2
	.comm	_SCALE_DIFF_ZERO,8,3            ## @SCALE_DIFF_ZERO
	.comm	_ff_aac_scalefactor_bits,8,3    ## @ff_aac_scalefactor_bits
	.comm	_ff_aac_scalefactor_code,8,3    ## @ff_aac_scalefactor_code
	.no_dead_strip	_encode_scale_factors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_scale_factors
_encode_scale_factors:                  ; @encode_scale_factors
	.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
	ldr	w9, [x2, #24]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	w21, #0
	mov	w22, #0
	ldr	x8, [x2]
	ldr	w23, [x8]
Lloh0:
	adrp	x8, _NOISE_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NOISE_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w25, w23, w8
	ldr	w8, [x2, #28]
	mov	w24, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x19, #24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x19, #32]
	ldr	x10, [x10, w21, sxtw #3]
	add	w21, w21, w10
	cmp	w21, w9
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, #0
	lsl	w8, w21, #4
	sxtw	x27, w8
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_9 Depth=2
Lloh3:
	adrp	x9, _INTENSITY_BT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _INTENSITY_BT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _INTENSITY_BT2@GOTPAGE
Lloh7:
	ldr	x10, [x10, _INTENSITY_BT2@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	ldr	x11, [x19]
	ldr	w11, [x11, x27, lsl #2]
	sub	w12, w11, w23
	sub	w13, w11, w22
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	csel	w8, w12, w13, ne
	csel	w23, w11, w23, ne
	csel	w22, w22, w11, ne
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
Lloh9:
	adrp	x9, _SCALE_DIFF_ZERO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SCALE_DIFF_ZERO@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w28, w8, w9
	cmp	w28, #121
	cset	w0, lo
	bl	_av_assert0
Lloh12:
	adrp	x8, _ff_aac_scalefactor_bits@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ff_aac_scalefactor_bits@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	w1, [x8, w28, sxtw #2]
Lloh15:
	adrp	x8, _ff_aac_scalefactor_code@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ff_aac_scalefactor_code@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x2, [x8, w28, sxtw #3]
	mov	x0, x20
	bl	_put_bits
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	x26, x26, #1
	ldrsw	x8, [x19, #28]
	add	x27, x27, #1
	cmp	x26, x8
	b.ge	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldr	w8, [x8, x27, lsl #2]
	cbnz	w8, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x27, lsl #3]
Lloh18:
	adrp	x9, _NOISE_BT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _NOISE_BT@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	x8, [x19]
	ldr	w28, [x8, x27, lsl #2]
	sub	w8, w28, w25
	subs	w24, w24, #1
	b.lt	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
Lloh21:
	adrp	x9, _NOISE_PRE_BITS@GOTPAGE
Lloh22:
	ldr	x9, [x9, _NOISE_PRE_BITS@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x9]
Lloh24:
	adrp	x9, _NOISE_PRE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _NOISE_PRE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x2, x9, w8, sxtw
	mov	x0, x20
	bl	_put_bits
	mov	x25, x28
	b	LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	x25, x28
	b	LBB0_7
LBB0_14:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NOISE_OFFSET,4,2               ; @NOISE_OFFSET
	.comm	_NOISE_BT,8,3                   ; @NOISE_BT
	.comm	_NOISE_PRE_BITS,4,2             ; @NOISE_PRE_BITS
	.comm	_NOISE_PRE,8,3                  ; @NOISE_PRE
	.comm	_INTENSITY_BT,8,3               ; @INTENSITY_BT
	.comm	_INTENSITY_BT2,8,3              ; @INTENSITY_BT2
	.comm	_SCALE_DIFF_ZERO,8,3            ; @SCALE_DIFF_ZERO
	.comm	_ff_aac_scalefactor_bits,8,3    ; @ff_aac_scalefactor_bits
	.comm	_ff_aac_scalefactor_code,8,3    ; @ff_aac_scalefactor_code
	.no_dead_strip	_encode_scale_factors
.subsections_via_symbols
