	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxt1_rgb_quantize
_dxt1_rgb_quantize:                     ## @dxt1_rgb_quantize
	.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	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -136(%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), %ebx
	leaq	(,%rbx,4), %rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -176(%rbp)                ## 8-byte Spill
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	imulq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	%r15d, %r8d
	leaq	(%rbx,%rbx,2), %rcx
	leaq	(%r14,%rcx,4), %r13
	movq	%rbx, %rdx
	shlq	$4, %rdx
	leaq	(%r14,%rbx,8), %r9
	movl	%r8d, %esi
	andl	$-8, %esi
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	addq	$-8, %rsi
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %eax
	andl	$3, %eax
	movq	%rdi, %rsi
	movq	%rdi, -144(%rbp)                ## 8-byte Spill
	andq	$-4, %rdi
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r15d
	andl	$3, %r15d
	movq	%rax, -224(%rbp)                ## 8-byte Spill
	shlq	$5, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rcx,4), %rax
	addq	$112, %rax
	leaq	16(%r14,%rcx,4), %rcx
	leaq	(%r14,%rbx,4), %r11
	leaq	112(%r14), %rsi
	movq	%rsi, -184(%rbp)                ## 8-byte Spill
	leaq	112(%r14,%rbx,4), %r12
	leaq	16(%r14,%rbx,4), %rsi
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	leaq	112(%r14,%rbx,8), %r10
	movq	%rbx, -168(%rbp)                ## 8-byte Spill
	leaq	16(%r14,%rbx,8), %rsi
	movq	%rax, %rbx
	movq	%r13, -248(%rbp)                ## 8-byte Spill
	movq	%r9, -240(%rbp)                 ## 8-byte Spill
	movq	%r11, -232(%rbp)                ## 8-byte Spill
	movq	%r14, %rax
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	-120(%rbp), %rax                ## 8-byte Reload
	xorl	%edi, %edi
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r8, -216(%rbp)                 ## 8-byte Spill
	movq	%rdx, -256(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, (%rax,%rdi,8)
	movq	-256(%rbp), %rdx                ## 8-byte Reload
	movq	-200(%rbp), %rcx                ## 8-byte Reload
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-192(%rbp), %rsi                ## 8-byte Reload
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	addq	%rdx, -184(%rbp)                ## 8-byte Folded Spill
	addq	%rdx, %r14
	addq	%rdx, %r12
	addq	%rdx, %rax
	addq	%rdx, %r11
	addq	%rdx, %r10
	addq	%rdx, %rsi
	addq	%rdx, %r9
	addq	%rdx, %rbx
	addq	%rdx, %rcx
	addq	%rdx, %r13
	cmpq	$4, %rdi
	je	LBB0_72
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
                                        ##     Child Loop BB0_28 Depth 2
                                        ##     Child Loop BB0_31 Depth 2
                                        ##     Child Loop BB0_35 Depth 2
                                        ##     Child Loop BB0_37 Depth 2
                                        ##     Child Loop BB0_45 Depth 2
                                        ##     Child Loop BB0_48 Depth 2
                                        ##     Child Loop BB0_52 Depth 2
                                        ##     Child Loop BB0_54 Depth 2
                                        ##     Child Loop BB0_62 Depth 2
                                        ##     Child Loop BB0_65 Depth 2
                                        ##     Child Loop BB0_69 Depth 2
                                        ##     Child Loop BB0_71 Depth 2
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, -192(%rbp)                ## 8-byte Spill
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rdx, %rsi
	imulq	%rdi, %rsi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, %rdx
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	movq	(%rax,%rdi,8), %r15
	cmpl	$8, -52(%rbp)                   ## 4-byte Folded Reload
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	jb	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%rsi, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	movq	%rsi, %rdi
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$24, -104(%rbp)                 ## 8-byte Folded Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jae	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	movq	%rsi, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-184(%rbp), %rax                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rcx,4), %xmm0
	movups	16(%r15,%rcx,4), %xmm1
	movaps	%xmm0, -112(%rax,%rcx,4)
	movaps	%xmm1, -96(%rax,%rcx,4)
	movups	32(%r15,%rcx,4), %xmm0
	movups	48(%r15,%rcx,4), %xmm1
	movaps	%xmm0, -80(%rax,%rcx,4)
	movaps	%xmm1, -64(%rax,%rcx,4)
	movups	64(%r15,%rcx,4), %xmm0
	movups	80(%r15,%rcx,4), %xmm1
	movaps	%xmm0, -48(%rax,%rcx,4)
	movaps	%xmm1, -32(%rax,%rcx,4)
	movups	96(%r15,%rcx,4), %xmm0
	movups	112(%r15,%rcx,4), %xmm1
	movaps	%xmm0, -16(%rax,%rcx,4)
	movaps	%xmm1, (%rax,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdx
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$0, -224(%rbp)                  ## 8-byte Folded Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%rcx,4), %rdx
	leaq	(%r15,%rcx,4), %rax
	addq	$16, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rcx), %xmm0
	movups	(%rax,%rcx), %xmm1
	movaps	%xmm0, (%rdx,%rcx)
	movaps	%xmm1, 16(%rdx,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %rbx
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rcx
	cmpq	%r8, %rax
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rax
	notq	%rax
	addq	%r8, %rax
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %rdx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	addq	$4, %r15
	movl	%esi, (%r14,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_18
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jb	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r14,%rcx,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r14,%rcx,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r14,%rcx,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r14,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%r15, (%rax,%rcx,8)
	cmpl	$8, -52(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-232(%rbp), %rax                ## 8-byte Reload
	addq	%rdi, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_26
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$24, -104(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_33
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rcx,4), %xmm0
	movups	16(%r15,%rcx,4), %xmm1
	movups	%xmm0, -112(%r12,%rcx,4)
	movups	%xmm1, -96(%r12,%rcx,4)
	movups	32(%r15,%rcx,4), %xmm0
	movups	48(%r15,%rcx,4), %xmm1
	movups	%xmm0, -80(%r12,%rcx,4)
	movups	%xmm1, -64(%r12,%rcx,4)
	movups	64(%r15,%rcx,4), %xmm0
	movups	80(%r15,%rcx,4), %xmm1
	movups	%xmm0, -48(%r12,%rcx,4)
	movups	%xmm1, -32(%r12,%rcx,4)
	movups	96(%r15,%rcx,4), %xmm0
	movups	112(%r15,%rcx,4), %xmm1
	movups	%xmm0, -16(%r12,%rcx,4)
	movups	%xmm1, (%r12,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdx
	jne	LBB0_28
LBB0_29:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$3, -144(%rbp)                  ## 1-byte Folded Reload
	movq	-96(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%r11,%rcx,4), %rax
	leaq	(%r15,%rcx,4), %rcx
	addq	$16, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_31:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rsi), %xmm0
	movups	(%rcx,%rsi), %xmm1
	movups	%xmm0, (%rax,%rsi)
	movups	%xmm1, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %r8
	jne	LBB0_31
LBB0_32:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rcx
	movq	-216(%rbp), %r8                 ## 8-byte Reload
	cmpq	%r8, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_38
LBB0_33:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rax
	notq	%rax
	addq	%r8, %rax
	testb	$3, %r8b
	je	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %rdx
	.p2align	4, 0x90
LBB0_35:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	addq	$4, %r15
	movl	%esi, (%r11,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_35
LBB0_36:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jb	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r11,%rcx,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r11,%rcx,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r11,%rcx,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r11,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_37
LBB0_38:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%r15, (%rax,%rcx,8)
	cmpl	$8, -52(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_43
## %bb.39:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-240(%rbp), %rax                ## 8-byte Reload
	addq	%rdi, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_43
## %bb.40:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$24, -104(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_44
## %bb.41:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_46
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_50
LBB0_44:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_45:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rcx,4), %xmm0
	movups	16(%r15,%rcx,4), %xmm1
	movups	%xmm0, -112(%r10,%rcx,4)
	movups	%xmm1, -96(%r10,%rcx,4)
	movups	32(%r15,%rcx,4), %xmm0
	movups	48(%r15,%rcx,4), %xmm1
	movups	%xmm0, -80(%r10,%rcx,4)
	movups	%xmm1, -64(%r10,%rcx,4)
	movups	64(%r15,%rcx,4), %xmm0
	movups	80(%r15,%rcx,4), %xmm1
	movups	%xmm0, -48(%r10,%rcx,4)
	movups	%xmm1, -32(%r10,%rcx,4)
	movups	96(%r15,%rcx,4), %xmm0
	movups	112(%r15,%rcx,4), %xmm1
	movups	%xmm0, -16(%r10,%rcx,4)
	movups	%xmm1, (%r10,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdx
	jne	LBB0_45
LBB0_46:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$3, -144(%rbp)                  ## 1-byte Folded Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_49
## %bb.47:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-192(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%r9,%rcx,4), %rax
	leaq	(%r15,%rcx,4), %rcx
	addq	$16, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_48:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rsi), %xmm0
	movups	(%rcx,%rsi), %xmm1
	movups	%xmm0, (%rax,%rsi)
	movups	%xmm1, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_48
LBB0_49:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rcx
	cmpq	%r8, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_55
LBB0_50:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rax
	notq	%rax
	addq	%r8, %rax
	testb	$3, %r8b
	je	LBB0_53
## %bb.51:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %rdx
	.p2align	4, 0x90
LBB0_52:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	addq	$4, %r15
	movl	%esi, (%r9,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_52
LBB0_53:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jb	LBB0_55
	.p2align	4, 0x90
LBB0_54:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r9,%rcx,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r9,%rcx,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r9,%rcx,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r9,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_54
LBB0_55:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movq	%r15, (%rax,%rcx,8)
	cmpl	$8, -52(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_60
## %bb.56:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	-248(%rbp), %rdi                ## 8-byte Folded Reload
	subq	%r15, %rdi
	cmpq	$32, %rdi
	jb	LBB0_60
## %bb.57:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$24, -104(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_61
## %bb.58:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_63
	.p2align	4, 0x90
LBB0_60:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_67
LBB0_61:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_62:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rcx,4), %xmm0
	movups	16(%r15,%rcx,4), %xmm1
	movups	%xmm0, -112(%rbx,%rcx,4)
	movups	%xmm1, -96(%rbx,%rcx,4)
	movups	32(%r15,%rcx,4), %xmm0
	movups	48(%r15,%rcx,4), %xmm1
	movups	%xmm0, -80(%rbx,%rcx,4)
	movups	%xmm1, -64(%rbx,%rcx,4)
	movups	64(%r15,%rcx,4), %xmm0
	movups	80(%r15,%rcx,4), %xmm1
	movups	%xmm0, -48(%rbx,%rcx,4)
	movups	%xmm1, -32(%rbx,%rcx,4)
	movups	96(%r15,%rcx,4), %xmm0
	movups	112(%r15,%rcx,4), %xmm1
	movups	%xmm0, -16(%rbx,%rcx,4)
	movups	%xmm1, (%rbx,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdx
	jne	LBB0_62
LBB0_63:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$3, -144(%rbp)                  ## 1-byte Folded Reload
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_66
## %bb.64:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	-200(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdx
	leaq	(,%rcx,4), %rax
	addq	%r13, %rax
	leaq	(%r15,%rcx,4), %rcx
	addq	$16, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_65:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rsi), %xmm0
	movups	(%rcx,%rsi), %xmm1
	movups	%xmm0, (%rax,%rsi)
	movups	%xmm1, (%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_65
LBB0_66:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rcx
	cmpq	%r8, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_1
LBB0_67:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rax
	notq	%rax
	addq	%r8, %rax
	testb	$3, %r8b
	je	LBB0_70
## %bb.68:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rsi, %rdx
	.p2align	4, 0x90
LBB0_69:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %esi
	addq	$4, %r15
	movl	%esi, (%r13,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_69
LBB0_70:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rax
	jb	LBB0_1
	.p2align	4, 0x90
LBB0_71:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r13,%rcx,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r13,%rcx,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r13,%rcx,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r13,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_71
	jmp	LBB0_1
LBB0_72:
	movq	-208(%rbp), %r11                ## 8-byte Reload
	testl	%r11d, %r11d
	jle	LBB0_76
## %bb.73:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rax
	movl	$2000, %ecx                     ## imm = 0x7D0
	movl	$-1, %edx
	xorl	%esi, %esi
	movl	$1, %r8d
	xorl	%r9d, %r9d
	xorl	%edi, %edi
	xorl	%r15d, %r15d
	movq	-160(%rbp), %r10                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_74:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rax), %ebx
	addl	-8(%rax), %ebx
	addl	(%rax), %ebx
	cmpl	%ebx, %ecx
	cmovgel	%ebx, %ecx
	cmovgl	%esi, %edi
	cmpl	%ebx, %edx
	cmovlel	%ebx, %edx
	cmovll	%esi, %r9d
	testl	%ebx, %ebx
	cmovel	%r8d, %r15d
	incq	%rsi
	addq	%r10, %rax
	cmpq	%rsi, %r11
	jne	LBB0_74
## %bb.75:
	movslq	%edi, %rcx
	movslq	%r9d, %r12
	jmp	LBB0_77
LBB0_76:
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	xorl	%r12d, %r12d
LBB0_77:
	movq	-168(%rbp), %rbx                ## 8-byte Reload
	imulq	%rbx, %rcx
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %rdi
	addq	%r13, %rdi
	callq	_COLOR565
	movl	%eax, %r14d
	imulq	%rbx, %r12
	leaq	(,%r12,4), %rdi
	addq	%r13, %rdi
	callq	_COLOR565
	cmpl	%eax, %r14d
	jne	LBB0_79
## %bb.78:
	movl	%r14d, %eax
	shll	$16, %eax
	orl	%r14d, %eax
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%ebx, %ebx
	negl	%r15d
	sbbl	%ebx, %ebx
	jmp	LBB0_92
LBB0_79:
	movl	%eax, %r13d
	testl	%r15d, %r15d
	je	LBB0_81
## %bb.80:
	testl	%r14d, %r14d
	sete	%al
	testl	%r13d, %r13d
	sete	%cl
	orb	%al, %cl
	movb	%cl, -52(%rbp)                  ## 1-byte Spill
	movl	%ecx, %eax
	xorb	$1, %al
	movzbl	%al, %r15d
	jmp	LBB0_82
LBB0_81:
	xorl	%r15d, %r15d
	movb	$1, -52(%rbp)                   ## 1-byte Folded Spill
LBB0_82:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%eax, %eax
	cmpl	%r13d, %r14d
	setle	%al
	cmpl	%eax, %r15d
	jne	LBB0_84
## %bb.83:
	movq	%r12, %rax
	movl	%r13d, %ebx
	movl	%r14d, %r13d
	jmp	LBB0_85
LBB0_84:
	movq	%rcx, %rax
	movq	%r12, %rcx
	movl	%r14d, %ebx
LBB0_85:
	xorl	%r14d, %r14d
	cmpl	%ebx, %r13d
	setg	%r14b
	orl	$2, %r14d
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%rcx,4), %rcx
	leaq	(%r12,%rax,4), %r8
	movl	%r14d, %edi
	movl	$3, %esi
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	callq	_MAKEIVEC
	shll	$16, %ebx
	orl	%r13d, %ebx
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	%ebx, (%rax)
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_91
## %bb.86:
	movl	%r15d, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	1(%rax), %r15
	decq	%rax
	imulq	-168(%rbp), %rax                ## 8-byte Folded Reload
	leaq	(%r12,%rax,4), %r12
	movq	-160(%rbp), %r13                ## 8-byte Reload
	negq	%r13
	xorl	%ebx, %ebx
	jmp	LBB0_89
	.p2align	4, 0x90
LBB0_87:                                ##   in Loop: Header=BB0_89 Depth=1
	movl	$3, %edi
	movl	%r14d, %esi
	movl	$3, %edx
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movq	%r12, %r8
	callq	_CALCCDOT
	movq	_dxtn_color_tlat@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movl	12(%rax), %eax
LBB0_88:                                ##   in Loop: Header=BB0_89 Depth=1
	shll	$2, %ebx
	orl	%eax, %ebx
	decq	%r15
	addq	%r13, %r12
	cmpq	$1, %r15
	jbe	LBB0_92
LBB0_89:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_87
## %bb.90:                              ##   in Loop: Header=BB0_89 Depth=1
	movl	4(%r12), %ecx
	addl	(%r12), %ecx
	movl	$3, %eax
	addl	8(%r12), %ecx
	jne	LBB0_87
	jmp	LBB0_88
LBB0_91:
	xorl	%ebx, %ebx
LBB0_92:
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	%ebx, 4(%rax)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_94
## %bb.93:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_94:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_COMP,4,2                   ## @MAX_COMP
	.comm	_N_TEXELS,4,2                   ## @N_TEXELS
	.comm	_dxtn_color_tlat,8,3            ## @dxtn_color_tlat
	.comm	_BCOMP,8,3                      ## @BCOMP
	.comm	_GCOMP,8,3                      ## @GCOMP
	.comm	_RCOMP,8,3                      ## @RCOMP
	.no_dead_strip	_dxt1_rgb_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxt1_rgb_quantize
_dxt1_rgb_quantize:                     ; @dxt1_rgb_quantize
	.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
	sub	sp, sp, #16
	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, #-88]
Lloh3:
	adrp	x8, _MAX_COMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_COMP@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	lsl	x8, x23, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x10, x10, #0x7fffffff0
	sub	x20, x9, x10
	mov	sp, x20
Lloh8:
	adrp	x9, _N_TEXELS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _N_TEXELS@GOTPAGEOFF]
Lloh10:
	ldr	w12, [x9]
	mul	x9, x12, x23
	lsl	x9, x9, #2
	add	x10, x9, #15
	and	x13, x10, #0xfffffffffffffff0
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x22, x9, x13
	mov	sp, x22
	mov	x9, #0
	mov	w10, w2
	add	x11, x23, x23, lsl #1
	lsl	x11, x11, #2
	add	x13, x11, x22
	lsl	x14, x23, #4
	lsl	x15, x23, #3
	add	x16, x15, x22
	add	x17, x8, x22
	and	x0, x10, #0xfffffff0
	add	x3, x22, #32
	add	x4, x17, #32
	add	x5, x16, #32
	add	x6, x13, #32
	mov	x7, x22
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	x21, [x1, x9, lsl #3]
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	x3, x3, x14
	add	x7, x7, x14
	add	x4, x4, x14
	add	x5, x5, x14
	add	x6, x6, x14
	cmp	x9, #4
	b.eq	LBB0_32
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_14 Depth 2
                                        ;     Child Loop BB0_17 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
                                        ;     Child Loop BB0_24 Depth 2
                                        ;     Child Loop BB0_28 Depth 2
                                        ;     Child Loop BB0_31 Depth 2
	cmp	w2, #0
	b.le	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
	ldr	x25, [x1, x9, lsl #3]
	cmp	w2, #16
	b.lo	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	madd	x21, x14, x9, x22
	sub	x21, x21, x25
	cmp	x21, #64
	b.lo	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x25, #32
	mov	x27, x3
	mov	x28, x0
	add	x21, x25, x0, lsl #2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x26, #-32]
	ldp	q2, q3, [x26], #64
	stp	q0, q1, [x27, #-32]
	stp	q2, q3, [x27], #64
	subs	x28, x28, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, x0
	mov	x25, x21
	cmp	x0, x10
	b.eq	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x7, x26, lsl #2
	sub	x26, x10, x26
	mov	x21, x25
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w25, [x21], #4
	str	w25, [x27], #4
	subs	x26, x26, #1
	b.ne	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	str	x21, [x1, x9, lsl #3]
	cmp	w2, #16
	b.lo	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	madd	x26, x14, x9, x17
	sub	x26, x26, x21
	cmp	x26, #64
	b.lo	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x21, #32
	mov	x26, x4
	mov	x27, x0
	add	x21, x21, x0, lsl #2
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x25, #-32]
	ldp	q2, q3, [x25], #64
	stp	q0, q1, [x26, #-32]
	stp	q2, q3, [x26], #64
	subs	x27, x27, #16
	b.ne	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	cmp	x0, x10
	b.eq	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x26, x10, x25
	add	x25, x8, x25, lsl #2
LBB0_17:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w27, [x21], #4
	str	w27, [x7, x25]
	add	x25, x25, #4
	subs	x26, x26, #1
	b.ne	LBB0_17
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	str	x21, [x1, x9, lsl #3]
	cmp	w2, #16
	b.lo	LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_3 Depth=1
	madd	x26, x14, x9, x16
	sub	x26, x26, x21
	cmp	x26, #64
	b.lo	LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x21, #32
	mov	x26, x5
	mov	x27, x0
	add	x21, x21, x0, lsl #2
LBB0_21:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x25, #-32]
	ldp	q2, q3, [x25], #64
	stp	q0, q1, [x26, #-32]
	stp	q2, q3, [x26], #64
	subs	x27, x27, #16
	b.ne	LBB0_21
; %bb.22:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	cmp	x0, x10
	b.eq	LBB0_25
LBB0_23:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x26, x10, x25
	add	x25, x15, x25, lsl #2
LBB0_24:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w27, [x21], #4
	str	w27, [x7, x25]
	add	x25, x25, #4
	subs	x26, x26, #1
	b.ne	LBB0_24
LBB0_25:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, #0
	str	x21, [x1, x9, lsl #3]
	cmp	w2, #16
	b.lo	LBB0_30
; %bb.26:                               ;   in Loop: Header=BB0_3 Depth=1
	madd	x26, x14, x9, x13
	sub	x26, x26, x21
	cmp	x26, #64
	b.lo	LBB0_30
; %bb.27:                               ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x21, #32
	mov	x26, x6
	mov	x27, x0
	add	x21, x21, x0, lsl #2
LBB0_28:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x25, #-32]
	ldp	q2, q3, [x25], #64
	stp	q0, q1, [x26, #-32]
	stp	q2, q3, [x26], #64
	subs	x27, x27, #16
	b.ne	LBB0_28
; %bb.29:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	cmp	x0, x10
	b.eq	LBB0_1
LBB0_30:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x26, x10, x25
	add	x25, x11, x25, lsl #2
LBB0_31:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w27, [x21], #4
	str	w27, [x7, x25]
	add	x25, x25, #4
	subs	x26, x26, #1
	b.ne	LBB0_31
	b	LBB0_1
LBB0_32:
	cmp	w12, #1
	b.lt	LBB0_36
; %bb.33:
	mov	x11, #0
	mov	w9, #0
	mov	w10, #0
	mov	w25, #0
	add	x13, x22, #8
	mov	w14, #2000
	mov	w15, #-1
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	ldp	w16, w17, [x13, #-8]
	ldr	w0, [x13]
	add	w16, w17, w16
	add	w16, w0, w16
	cmp	w14, w16
	csel	w14, w14, w16, lt
	csel	w10, w11, w10, gt
	cmp	w15, w16
	csel	w15, w15, w16, gt
	csel	w9, w11, w9, lt
	cmp	w16, #0
	csinc	w25, w25, wzr, ne
	add	x11, x11, #1
	add	x13, x13, x8
	cmp	x12, x11
	b.ne	LBB0_34
; %bb.35:
	sxtw	x8, w10
	sxtw	x26, w9
	b	LBB0_37
LBB0_36:
	mov	w25, #0
	mov	x8, #0
	mov	x26, #0
LBB0_37:
	mul	x27, x8, x23
	add	x0, x22, x27, lsl #2
	bl	_COLOR565
	mov	x21, x0
	mul	x28, x26, x23
	add	x0, x22, x28, lsl #2
	bl	_COLOR565
	cmp	w21, w0
	b.ne	LBB0_39
; %bb.38:
	orr	w8, w21, w21, lsl #16
	str	w8, [x19]
	cmp	w25, #0
	csetm	w24, ne
	b	LBB0_47
LBB0_39:
	mov	w8, #1
	cmp	w21, #0
	ccmp	w0, #0, #4, ne
	cset	w9, eq
	eor	w10, w9, #0x1
	cmp	w25, #0
	csel	w25, w8, w9, eq
	csel	w26, wzr, w10, eq
	cmp	w21, w0
	cset	w8, le
	cmp	w26, w8
	csel	w24, w0, w21, eq
	csel	x8, x28, x27, eq
	csel	x9, x27, x28, eq
	csel	w27, w21, w0, eq
	cmp	w27, w24
	mov	w10, #2
	cinc	w21, w10, gt
	add	x3, x22, x9, lsl #2
	add	x4, x22, x8, lsl #2
	mov	x0, x21
	mov	w1, #3
	mov	x2, x20
	bl	_MAKEIVEC
	orr	w8, w27, w24, lsl #16
	mov	x9, x19
	str	w8, [x19]
Lloh13:
	adrp	x8, _N_TEXELS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _N_TEXELS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_46
; %bb.40:
	mov	w24, #0
	add	x27, x8, #1
	sub	x8, x8, #1
	mul	x8, x8, x23
	add	x22, x22, x8, lsl #2
	neg	x23, x23, lsl #2
Lloh16:
	adrp	x28, _dxtn_color_tlat@GOTPAGE
Lloh17:
	ldr	x28, [x28, _dxtn_color_tlat@GOTPAGEOFF]
	mov	x19, x9
	b	LBB0_43
LBB0_41:                                ;   in Loop: Header=BB0_43 Depth=1
	mov	w0, #3
	mov	x1, x21
	mov	w2, #3
	mov	x3, x20
	mov	x4, x22
	bl	_CALCCDOT
	ldr	x8, [x28]
	ldr	x8, [x8, x26, lsl #3]
	ldr	w8, [x8, #12]
LBB0_42:                                ;   in Loop: Header=BB0_43 Depth=1
	orr	w24, w8, w24, lsl #2
	sub	x27, x27, #1
	add	x22, x22, x23
	cmp	x27, #1
	b.ls	LBB0_47
LBB0_43:                                ; =>This Inner Loop Header: Depth=1
	tbnz	w25, #0, LBB0_41
; %bb.44:                               ;   in Loop: Header=BB0_43 Depth=1
	ldp	w8, w9, [x22]
	ldr	w10, [x22, #8]
	add	w8, w9, w8
	cmn	w10, w8
	b.ne	LBB0_41
; %bb.45:                               ;   in Loop: Header=BB0_43 Depth=1
	mov	w8, #3
	b	LBB0_42
LBB0_46:
	mov	w24, #0
	mov	x19, x9
LBB0_47:
	str	w24, [x19, #4]
	ldur	x8, [x29, #-88]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_49
; %bb.48:
	sub	sp, x29, #80
	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
LBB0_49:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_COMP,4,2                   ; @MAX_COMP
	.comm	_N_TEXELS,4,2                   ; @N_TEXELS
	.comm	_dxtn_color_tlat,8,3            ; @dxtn_color_tlat
	.comm	_BCOMP,8,3                      ; @BCOMP
	.comm	_GCOMP,8,3                      ; @GCOMP
	.comm	_RCOMP,8,3                      ; @RCOMP
	.no_dead_strip	_dxt1_rgb_quantize
.subsections_via_symbols
