	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function fxt1_quantize_CHROMA
LCPI0_0:
	.long	0x3e000000                      ## float 0.125
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fxt1_quantize_CHROMA:                  ## @fxt1_quantize_CHROMA
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_COMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_MAX_VECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imulq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_N_TEXELS@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%r13, %rdx
	movl	$3, %ecx
	callq	_fxt1_choose
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r12), %r8d
	movq	%rbx, %rdi
	movl	$4, %esi
	movq	%r13, %rdx
	movl	$3, %ecx
	callq	_fxt1_lloyd
LBB0_2:
	movl	$4, %esi
	callq	_Q_MOV32
	leaq	(%r14,%r14,2), %r15
	movl	$5, %esi
	callq	_Q_SHL
	movss	(%rbx,%r15,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	4(%rbx,%r15,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	8(%rbx,%r15,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	(%rbx,%r14,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	4(%rbx,%r14,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	8(%rbx,%r14,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	(%rbx,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	4(%rbx,%r14,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	8(%rbx,%r14,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	LCPI0_0(%rip), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movl	$5, %esi
	callq	_Q_SHL
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	8(%rbx), %xmm0
	cvttss2si	%xmm0, %esi
	callq	_Q_OR32
	movslq	(%r12), %rdi
	leal	-1(%rdi), %esi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	xorl	%r15d, %r15d
	cmpl	%eax, %edi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.9:
	leaq	-1(%rdi), %rax
	imulq	%r14, %rax
	leaq	(,%rax,4), %r12
	addq	%r13, %r12
	leaq	(,%r14,4), %rax
	negq	%rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	shll	$2, %r14d
	movq	%rdx, %rbx
	movq	%rdx, %rdi
	movl	%esi, %r13d
	movl	$4, %esi
	movq	%r12, %rdx
	movl	$3, %ecx
	callq	_fxt1_bestcol
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movq	%rbx, %rdx
	movl	%eax, %r13d
	orl	%r14d, %r13d
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
	decq	%rdi
	addq	-88(%rbp), %r12                 ## 8-byte Folded Reload
	decl	%esi
	movl	%r13d, %r14d
	cmpq	%rax, %rdi
	jg	LBB0_10
	jmp	LBB0_4
LBB0_3:
	xorl	%r13d, %r13d
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_4:
	testl	%esi, %esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	js	LBB0_7
## %bb.5:
	movl	%esi, %eax
	leaq	1(%rax), %r12
	movq	%rcx, %rsi
	imulq	%rcx, %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rbx
	shlq	$2, %rsi
	negq	%rsi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	shll	$2, %r15d
	movq	%rdx, %r14
	movq	%rdx, %rdi
	movl	$4, %esi
	movq	%rbx, %rdx
	movl	$3, %ecx
	callq	_fxt1_bestcol
	movq	%r14, %rdx
	orl	%eax, %r15d
	addq	-56(%rbp), %rbx                 ## 8-byte Folded Reload
	decq	%r12
	jne	LBB0_6
LBB0_7:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 4(%rax)
	movl	%r15d, (%rax)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.11:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_N_TEXELS,4,2                   ## @N_TEXELS
	.comm	_MAX_COMP,4,2                   ## @MAX_COMP
	.comm	_MAX_VECT,4,2                   ## @MAX_VECT
	.no_dead_strip	_fxt1_quantize_CHROMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fxt1_quantize_CHROMA
_fxt1_quantize_CHROMA:                  ; @fxt1_quantize_CHROMA
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #16
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-104]
Lloh3:
	adrp	x8, _MAX_COMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_COMP@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MAX_VECT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_VECT@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
Lloh8:
	ldr	w8, [x9]
	mul	x8, x8, x23
	lsl	x9, x8, #2
	add	x8, x9, #15
	and	x8, x8, #0xfffffffffffffff0
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x20, x9, x8
	mov	sp, x20
Lloh11:
	adrp	x24, _N_TEXELS@GOTPAGE
Lloh12:
	ldr	x24, [x24, _N_TEXELS@GOTPAGEOFF]
	ldr	w4, [x24]
	mov	x0, x20
	mov	w1, #4
	mov	x2, x21
	mov	w3, #3
	bl	_fxt1_choose
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w4, [x24]
	mov	x0, x20
	mov	w1, #4
	mov	x2, x21
	mov	w3, #3
	bl	_fxt1_lloyd
LBB0_2:
	mov	w1, #4
	bl	_Q_MOV32
	mov	w8, #12
	madd	x22, x23, x8, x20
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22]
	fmov	s8, #0.12500000
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #4]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #8]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	add	x22, x20, x23, lsl #3
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #4]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #8]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	add	x22, x20, x23, lsl #2
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #4]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x22, #8]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x20]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x20, #4]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x20, #8]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	ldrsw	x27, [x24]
	sub	w26, w27, #1
	cmp	w27, #0
	cinc	w8, w27, lt
	cmp	w27, w8, asr #1
	b.le	LBB0_6
; %bb.3:
	mov	w25, #0
	sub	x8, x27, #1
	mul	x8, x8, x23
	add	x22, x21, x8, lsl #2
	neg	x28, x23, lsl #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #4
	mov	x2, x22
	mov	w3, #3
	bl	_fxt1_bestcol
	orr	w25, w0, w25, lsl #2
	ldr	w8, [x24]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	x27, x27, #1
	add	x22, x22, x28
	sub	w26, w26, #1
	cmp	x27, w8, sxtw
	b.gt	LBB0_4
; %bb.5:
	mov	w22, #0
	tbz	w26, #31, LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w25, #0
	mov	w22, #0
	tbnz	w26, #31, LBB0_9
LBB0_7:
	mov	w8, w26
	add	x24, x8, #1
	mul	x8, x8, x23
	add	x21, x21, x8, lsl #2
	neg	x23, x23, lsl #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #4
	mov	x2, x21
	mov	w3, #3
	bl	_fxt1_bestcol
	orr	w22, w0, w22, lsl #2
	add	x21, x21, x23
	subs	x24, x24, #1
	b.ne	LBB0_8
LBB0_9:
	stp	w22, w25, [x19]
	ldur	x8, [x29, #-104]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #96
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_N_TEXELS,4,2                   ; @N_TEXELS
	.comm	_MAX_COMP,4,2                   ; @MAX_COMP
	.comm	_MAX_VECT,4,2                   ; @MAX_VECT
	.no_dead_strip	_fxt1_quantize_CHROMA
.subsections_via_symbols
