	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_dc_coeffs
_encode_dc_coeffs:                      ## @encode_dc_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	$-16384, %rax                   ## imm = 0xC000
	movq	(%rsi), %rdx
	addq	%rax, %rdx
	xorl	%r12d, %r12d
	movq	%rcx, %rdi
	xorl	%esi, %esi
	callq	_QSCALE
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_TO_GOLOMB
	movq	_FIRST_DC_CB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_encode_codeword
	cmpl	$2, %ebx
	jl	LBB0_3
## %bb.1:
	addq	$512, %r15                      ## imm = 0x200
	decl	%ebx
	movl	$5, %r14d
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rdx
	movq	$-16384, %rax                   ## imm = 0xC000
	addq	%rax, %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_QSCALE
	movl	%eax, %r13d
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	subl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	movl	%r13d, %edi
	movl	%r12d, %esi
	callq	_DIFF_SIGN
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_get_level
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_TO_GOLOMB2
	movl	%eax, %r12d
	movq	_dc_codebook@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%r14d, %edi
	movl	$6, %esi
	callq	_FFMIN
	movl	(%rbx,%rax,4), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_encode_codeword
	sarl	$31, %r13d
	addq	$512, %r15                      ## imm = 0x200
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r14d
	movl	%r13d, %r12d
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	decl	%ebx
	jne	LBB0_2
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRST_DC_CB,4,2                ## @FIRST_DC_CB
	.comm	_dc_codebook,8,3                ## @dc_codebook
	.no_dead_strip	_encode_dc_coeffs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_dc_coeffs
_encode_dc_coeffs:                      ; @encode_dc_coeffs
	.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, x3
	mov	x22, x2
	mov	x24, x1
	mov	x20, x0
	ldr	x8, [x1]
	sub	x2, x8, #4, lsl #12             ; =16384
	mov	x0, x3
	mov	w1, #0
	bl	_QSCALE
	mov	x21, x0
	bl	_TO_GOLOMB
	mov	x1, x0
Lloh0:
	adrp	x8, _FIRST_DC_CB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRST_DC_CB@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_encode_codeword
	cmp	w22, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w23, #0
	add	x26, x24, #512
	sub	w27, w22, #1
	mov	w22, #5
Lloh3:
	adrp	x28, _dc_codebook@GOTPAGE
Lloh4:
	ldr	x28, [x28, _dc_codebook@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	sub	x2, x8, #4, lsl #12             ; =16384
	mov	x0, x19
	mov	w1, #0
	bl	_QSCALE
	mov	x24, x0
	sub	w21, w0, w21
	mov	x0, x21
	mov	x1, x23
	bl	_DIFF_SIGN
	mov	x23, x0
	mov	x0, x21
	bl	_get_level
	mov	x1, x23
	bl	_TO_GOLOMB2
	mov	x25, x0
	ldr	x23, [x28]
	mov	x0, x22
	mov	w1, #6
	bl	_FFMIN
	ldr	w2, [x23, x0, lsl #2]
	mov	x0, x20
	mov	x1, x25
	bl	_encode_codeword
	asr	w23, w21, #31
	add	x26, x26, #512
	mov	x21, x24
	mov	x22, x25
	subs	w27, w27, #1
	b.ne	LBB0_2
LBB0_3:
	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 AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRST_DC_CB,4,2                ; @FIRST_DC_CB
	.comm	_dc_codebook,8,3                ; @dc_codebook
	.no_dead_strip	_encode_dc_coeffs
.subsections_via_symbols
