	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_ac_coeffs
_encode_ac_coeffs:                      ## @encode_ac_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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	shlq	$6, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	$2, %ebx
	movl	$4, %r13d
	movl	$1, %ecx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, %eax
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movl	%eax, %r14d
	cmpq	$64, %rcx
	je	LBB0_9
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rcx,4), %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	incl	%r14d
	movl	%r14d, %eax
	movl	%r13d, %r14d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%r14d, %r13d
	addq	$64, %r12
	movl	%eax, %r14d
	cmpq	%r12, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	leal	(%rsi,%r12), %eax
	cltq
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edx
	movq	-104(%rbp), %rdi                ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_QSCALE
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, %r15d
	movq	_run_to_cb@GOTPCREL(%rip), %rax
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	(%rax), %rbx
	movl	%r13d, %edi
	movl	$15, %esi
	callq	_FFMIN
	movl	(%rbx,%rax,4), %edx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_encode_codeword
	movl	%r15d, %edi
	callq	_get_level
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	decl	%eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_lev_to_cb@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	movl	$9, %esi
	callq	_FFMIN
	movl	(%r13,%rax,4), %edx
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_encode_codeword
	movl	%r15d, %edi
	callq	_IS_NEGATIVE
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	callq	_put_bits
	xorl	%eax, %eax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	%ecx, %ebx
	jmp	LBB0_7
LBB0_9:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_run_to_cb,8,3                  ## @run_to_cb
	.comm	_lev_to_cb,8,3                  ## @lev_to_cb
	.no_dead_strip	_encode_ac_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_ac_coeffs
_encode_ac_coeffs:                      ; @encode_ac_coeffs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	x4, [sp, #8]                    ; 8-byte Folded Spill
	stp	x1, x3, [sp, #32]               ; 16-byte Folded Spill
	mov	x23, x0
	mov	w24, #0
	str	w2, [sp, #20]                   ; 4-byte Folded Spill
	mov	w8, w2
	lsl	x21, x8, #6
	mov	w25, #2
	mov	w27, #4
	mov	w9, #1
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x24
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	add	x9, x9, #1
	mov	x24, x8
	cmp	x9, #64
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cmp	w8, #1
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	b.lt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w26, [x8, x9, lsl #2]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w8, w24, #1
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x20, x20, #64
	mov	x24, x8
	cmp	x21, x20
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w26, w20
	ldp	x9, x0, [sp, #32]               ; 16-byte Folded Reload
	ldr	w2, [x9, w8, sxtw #2]
	mov	x1, x26
	bl	_QSCALE
	cbz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x28, x0
Lloh0:
	adrp	x8, _run_to_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _run_to_cb@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	x0, x27
	mov	w1, #15
	bl	_FFMIN
	ldr	w2, [x19, x0, lsl #2]
	mov	x0, x23
	mov	x1, x24
	bl	_encode_codeword
	mov	x0, x28
	bl	_get_level
	mov	x27, x0
	sub	w19, w0, #1
Lloh3:
	adrp	x8, _lev_to_cb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lev_to_cb@GOTPAGEOFF]
Lloh5:
	ldr	x22, [x8]
	mov	x0, x25
	mov	w1, #9
	bl	_FFMIN
	ldr	w2, [x22, x0, lsl #2]
	mov	x0, x23
	mov	x1, x19
	bl	_encode_codeword
	mov	x0, x28
	bl	_IS_NEGATIVE
	mov	x2, x0
	mov	x0, x23
	mov	w1, #1
	bl	_put_bits
	mov	w8, #0
	mov	x25, x27
	mov	x27, x24
	b	LBB0_6
LBB0_9:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_run_to_cb,8,3                  ; @run_to_cb
	.comm	_lev_to_cb,8,3                  ; @lev_to_cb
	.no_dead_strip	_encode_ac_coeffs
.subsections_via_symbols
