	.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_ALPHA0
LCPI0_0:
	.long	0x3e000000                      ## float 0.125
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fxt1_quantize_ALPHA0:                  ## @fxt1_quantize_ALPHA0
	.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
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	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), %r15d
	movq	_MAX_VECT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imulq	%r15, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	(%r15,%r15,2), %rax
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx,%rax,4)
	movq	%rbx, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	movl	$4, %ecx
	movl	%r13d, %r8d
	callq	_fxt1_choose
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$3, %esi
	movq	%r14, %rdx
	movl	$4, %ecx
	movl	%r13d, %r8d
	callq	_fxt1_lloyd
LBB0_2:
	movl	$6, %esi
	callq	_Q_MOV32
	movl	$5, %esi
	callq	_Q_SHL
	leaq	(%rbx,%r15,8), %rax
	movq	_ACOMP@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movss	(%rax,%rcx,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
	leaq	(%rbx,%r15,4), %rax
	movq	(%r14), %rcx
	movss	(%rax,%rcx,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
	movq	(%r14), %rax
	movss	(%rbx,%rax,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,%r15,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,%r15,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,%r15,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,%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), %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
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	leal	-1(%rdi), %esi
	movl	%edi, %eax
	shrl	$31, %eax
	addl	%edi, %eax
	sarl	%eax
	xorl	%r14d, %r14d
	cmpl	%eax, %edi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_3
## %bb.9:
	leaq	-1(%rdi), %rax
	imulq	%r15, %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r12
	leaq	(,%r15,4), %rax
	negq	%rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	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, %r15d
	movq	%rdx, %rbx
	movq	%rdx, %rdi
	movl	%esi, %r13d
	movl	$4, %esi
	movq	%r12, %rdx
	movl	$4, %ecx
	callq	_fxt1_bestcol
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	movq	_N_TEXELS@GOTPCREL(%rip), %rcx
	movl	%r13d, %esi
	movq	%rbx, %rdx
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movl	(%rcx), %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, %r15d
	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	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	shll	$2, %r14d
	movq	%rdx, %r15
	movq	%rdx, %rdi
	movl	$4, %esi
	movq	%rbx, %rdx
	movl	$4, %ecx
	callq	_fxt1_bestcol
	movq	%r15, %rdx
	orl	%eax, %r14d
	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	%r14d, (%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
	.comm	_ACOMP,8,3                      ## @ACOMP
	.no_dead_strip	_fxt1_quantize_ALPHA0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fxt1_quantize_ALPHA0
_fxt1_quantize_ALPHA0:                  ; @fxt1_quantize_ALPHA0
	.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	x22, x3
	mov	x23, x2
	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	w24, [x8]
Lloh8:
	ldr	w8, [x9]
	mul	x8, x8, x24
	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
	mov	w8, #12
	madd	x8, x24, x8, x20
	stp	xzr, xzr, [x8]
	mov	x0, x20
	mov	w1, #3
	mov	w3, #4
	mov	x4, x22
	bl	_fxt1_choose
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #3
	mov	x2, x23
	mov	w3, #4
	mov	x4, x22
	bl	_fxt1_lloyd
LBB0_2:
	mov	w1, #6
	bl	_Q_MOV32
	mov	w1, #5
	bl	_Q_SHL
	add	x23, x20, x24, lsl #3
Lloh11:
	adrp	x25, _ACOMP@GOTPAGE
Lloh12:
	ldr	x25, [x25, _ACOMP@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	s0, [x23, x8, lsl #2]
	fmov	s8, #0.12500000
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	add	x22, x20, x24, lsl #2
	ldr	x8, [x25]
	ldr	s0, [x22, x8, lsl #2]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	x8, [x25]
	ldr	s0, [x20, x8, lsl #2]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x23]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x23, #4]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	mov	w1, #5
	bl	_Q_SHL
	ldr	s0, [x23, #8]
	fmul	s0, s0, s8
	fcvtzs	w1, s0
	bl	_Q_OR32
	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
Lloh13:
	adrp	x26, _N_TEXELS@GOTPAGE
Lloh14:
	ldr	x26, [x26, _N_TEXELS@GOTPAGEOFF]
	ldrsw	x27, [x26]
	sub	w25, w27, #1
	cmp	w27, #0
	cinc	w8, w27, lt
	cmp	w27, w8, asr #1
	b.le	LBB0_6
; %bb.3:
	mov	w23, #0
	sub	x8, x27, #1
	mul	x8, x8, x24
	add	x22, x21, x8, lsl #2
	neg	x28, x24, lsl #2
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #4
	mov	x2, x22
	mov	w3, #4
	bl	_fxt1_bestcol
	orr	w23, w0, w23, lsl #2
	ldr	w8, [x26]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	x27, x27, #1
	add	x22, x22, x28
	sub	w25, w25, #1
	cmp	x27, w8, sxtw
	b.gt	LBB0_4
; %bb.5:
	mov	w22, #0
	tbz	w25, #31, LBB0_7
	b	LBB0_9
LBB0_6:
	mov	w23, #0
	mov	w22, #0
	tbnz	w25, #31, LBB0_9
LBB0_7:
	mov	w8, w25
	add	x25, x8, #1
	mul	x8, x8, x24
	add	x21, x21, x8, lsl #2
	neg	x24, x24, lsl #2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #4
	mov	x2, x21
	mov	w3, #4
	bl	_fxt1_bestcol
	orr	w22, w0, w22, lsl #2
	add	x21, x21, x24
	subs	x25, x25, #1
	b.ne	LBB0_8
LBB0_9:
	stp	w22, w23, [x19]
	ldur	x8, [x29, #-104]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	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	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.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
	.comm	_ACOMP,8,3                      ; @ACOMP
	.no_dead_strip	_fxt1_quantize_ALPHA0
.subsections_via_symbols
