	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxt3_rgba_quantize
_dxt3_rgba_quantize:                    ## @dxt3_rgba_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, %r14d
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, -104(%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, -216(%rbp)                ## 8-byte Spill
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	imulq	%rbx, %r15
	leaq	(,%r15,4), %rax
	callq	____chkstk_darwin
	movl	%r14d, %ecx
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r14, %rax
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	cmpl	$3, %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	jne	LBB0_2
## %bb.1:
	shll	$2, %r15d
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	%r15d, %edx
	callq	_memset
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
LBB0_2:
	movl	%ecx, %ebx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %r9
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %r13
	leaq	(%rdx,%r9,4), %r14
	movq	%rcx, %r15
	shlq	$4, %r15
	leaq	(%rdx,%rcx,8), %rdi
	movl	%ebx, %esi
	andl	$-8, %esi
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	addq	$-8, %rsi
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movq	%rsi, %rax
	shrq	$3, %rax
	incq	%rax
	movl	%eax, %r8d
	andl	$3, %r8d
	movq	%rax, %rsi
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	andq	$-4, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	%ebx, %eax
	andl	$3, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	%r8, -224(%rbp)                 ## 8-byte Spill
	shlq	$5, %r8
	movq	%r8, -120(%rbp)                 ## 8-byte Spill
	leaq	(%rdx,%r9,4), %r8
	addq	$112, %r8
	leaq	16(%rdx,%r9,4), %rsi
	leaq	(%rdx,%rcx,4), %r9
	leaq	112(%rdx), %r12
	leaq	112(%rdx,%rcx,4), %r11
	leaq	16(%rdx,%rcx,4), %rax
	leaq	112(%rdx,%rcx,8), %r10
	leaq	16(%rdx,%rcx,8), %rcx
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	movq	%rbx, %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	%r14, -248(%rbp)                ## 8-byte Spill
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	movq	%rdi, -240(%rbp)                ## 8-byte Spill
	movq	%r9, -232(%rbp)                 ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -184(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax,%r13,8)
	movq	-184(%rbp), %r15                ## 8-byte Reload
	movq	-208(%rbp), %rsi                ## 8-byte Reload
	movq	-200(%rbp), %rax                ## 8-byte Reload
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r13
	addq	%r15, %r12
	addq	%r15, %rbx
	addq	%r15, %r11
	addq	%r15, %rax
	addq	%r15, %r9
	addq	%r15, %r10
	addq	%r15, -192(%rbp)                ## 8-byte Folded Spill
	addq	%r15, %rdi
	addq	%r15, %r8
	addq	%r15, %rsi
	addq	%r15, %r14
	cmpq	$4, %r13
	je	LBB0_73
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_16 Depth 2
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_21 Depth 2
                                        ##     Child Loop BB0_29 Depth 2
                                        ##     Child Loop BB0_32 Depth 2
                                        ##     Child Loop BB0_36 Depth 2
                                        ##     Child Loop BB0_38 Depth 2
                                        ##     Child Loop BB0_46 Depth 2
                                        ##     Child Loop BB0_49 Depth 2
                                        ##     Child Loop BB0_53 Depth 2
                                        ##     Child Loop BB0_55 Depth 2
                                        ##     Child Loop BB0_63 Depth 2
                                        ##     Child Loop BB0_66 Depth 2
                                        ##     Child Loop BB0_70 Depth 2
                                        ##     Child Loop BB0_72 Depth 2
	testl	%edx, %edx
	jle	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, -200(%rbp)                ## 8-byte Spill
	movq	%r13, %rdx
	movq	%r15, %r13
	imulq	%rdx, %r13
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%rdx,8), %r15
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$8, %eax
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -208(%rbp)                ## 8-byte Spill
	movq	%r13, -176(%rbp)                ## 8-byte Spill
	jb	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%r13, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -128(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_14
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_18
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	movl	%eax, %edx
	jmp	LBB0_18
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%eax, %eax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rax,4), %xmm0
	movups	16(%r15,%rax,4), %xmm1
	movaps	%xmm0, -112(%r12,%rax,4)
	movaps	%xmm1, -96(%r12,%rax,4)
	movups	32(%r15,%rax,4), %xmm0
	movups	48(%r15,%rax,4), %xmm1
	movaps	%xmm0, -80(%r12,%rax,4)
	movaps	%xmm1, -64(%r12,%rax,4)
	movups	64(%r15,%rax,4), %xmm0
	movups	80(%r15,%rax,4), %xmm1
	movaps	%xmm0, -48(%r12,%rax,4)
	movaps	%xmm1, -32(%r12,%rax,4)
	movups	96(%r15,%rax,4), %xmm0
	movups	112(%r15,%rax,4), %xmm1
	movaps	%xmm0, -16(%r12,%rax,4)
	movaps	%xmm1, (%r12,%rax,4)
	addq	$32, %rax
	addq	$-4, %rsi
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, -224(%rbp)                  ## 8-byte Folded Reload
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leaq	(%r15,%rax,4), %rax
	addq	$16, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rcx), %xmm0
	movups	(%rax,%rcx), %xmm1
	movaps	%xmm0, (%rsi,%rcx)
	movaps	%xmm1, 16(%rsi,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %rbx
	jne	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_22
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rsi, %rax
	notq	%rax
	addq	%rcx, %rax
	movq	-144(%rbp), %r13                ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %ecx
	addq	$4, %r15
	movl	%ecx, (%rbx,%rsi,4)
	incq	%rsi
	decq	%r13
	jne	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%rbx,%rsi,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%rbx,%rsi,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%rbx,%rsi,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%rbx,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax,%r13,8)
	cmpl	$8, %edx
	jb	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-232(%rbp), %rax                ## 8-byte Reload
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	addq	%rdx, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -128(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_34
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rax,4), %xmm0
	movups	16(%r15,%rax,4), %xmm1
	movups	%xmm0, -112(%r11,%rax,4)
	movups	%xmm1, -96(%r11,%rax,4)
	movups	32(%r15,%rax,4), %xmm0
	movups	48(%r15,%rax,4), %xmm1
	movups	%xmm0, -80(%r11,%rax,4)
	movups	%xmm1, -64(%r11,%rax,4)
	movups	64(%r15,%rax,4), %xmm0
	movups	80(%r15,%rax,4), %xmm1
	movups	%xmm0, -48(%r11,%rax,4)
	movups	%xmm1, -32(%r11,%rax,4)
	movups	96(%r15,%rax,4), %xmm0
	movups	112(%r15,%rax,4), %xmm1
	movups	%xmm0, -16(%r11,%rax,4)
	movups	%xmm1, (%r11,%rax,4)
	addq	$32, %rax
	addq	$-4, %rsi
	jne	LBB0_29
LBB0_30:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	$3, -168(%rbp)                  ## 1-byte Folded Reload
	movq	-120(%rbp), %r13                ## 8-byte Reload
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-200(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leaq	(%r9,%rax,4), %rcx
	leaq	(%r15,%rax,4), %rax
	addq	$16, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_32:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rdx), %xmm0
	movups	(%rax,%rdx), %xmm1
	movups	%xmm0, (%rcx,%rdx)
	movups	%xmm1, (%rsi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %r13
	jne	LBB0_32
LBB0_33:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_39
LBB0_34:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rax
	movq	%rsi, %r13
	notq	%r13
	addq	%rcx, %r13
	testb	$3, %al
	je	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-144(%rbp), %rax                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %ecx
	addq	$4, %r15
	movl	%ecx, (%r9,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_36
LBB0_37:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %r13
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jb	LBB0_39
	.p2align	4, 0x90
LBB0_38:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r9,%rsi,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r9,%rsi,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r9,%rsi,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r9,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_38
LBB0_39:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax,%r13,8)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$8, %eax
	jb	LBB0_44
## %bb.40:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-240(%rbp), %rax                ## 8-byte Reload
	movq	-176(%rbp), %rdx                ## 8-byte Reload
	addq	%rdx, %rax
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -128(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_45
## %bb.42:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_47
LBB0_43:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_51
LBB0_44:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	movl	%eax, %edx
	jmp	LBB0_51
LBB0_45:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_46:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rax,4), %xmm0
	movups	16(%r15,%rax,4), %xmm1
	movups	%xmm0, -112(%r10,%rax,4)
	movups	%xmm1, -96(%r10,%rax,4)
	movups	32(%r15,%rax,4), %xmm0
	movups	48(%r15,%rax,4), %xmm1
	movups	%xmm0, -80(%r10,%rax,4)
	movups	%xmm1, -64(%r10,%rax,4)
	movups	64(%r15,%rax,4), %xmm0
	movups	80(%r15,%rax,4), %xmm1
	movups	%xmm0, -48(%r10,%rax,4)
	movups	%xmm1, -32(%r10,%rax,4)
	movups	96(%r15,%rax,4), %xmm0
	movups	112(%r15,%rax,4), %xmm1
	movups	%xmm0, -16(%r10,%rax,4)
	movups	%xmm1, (%r10,%rax,4)
	addq	$32, %rax
	addq	$-4, %rsi
	jne	LBB0_46
LBB0_47:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	$3, -168(%rbp)                  ## 1-byte Folded Reload
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_50
## %bb.48:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leaq	(%rdi,%rax,4), %rcx
	leaq	(%r15,%rax,4), %rax
	addq	$16, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_49:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rdx), %xmm0
	movups	(%rax,%rdx), %xmm1
	movups	%xmm0, (%rcx,%rdx)
	movups	%xmm1, (%rsi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %rbx
	jne	LBB0_49
LBB0_50:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_56
LBB0_51:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rax
	movq	%rsi, %r13
	notq	%r13
	addq	%rcx, %r13
	testb	$3, %al
	je	LBB0_54
## %bb.52:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-144(%rbp), %rax                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_53:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %ecx
	addq	$4, %r15
	movl	%ecx, (%rdi,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_53
LBB0_54:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %r13
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jb	LBB0_56
	.p2align	4, 0x90
LBB0_55:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%rdi,%rsi,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%rdi,%rsi,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%rdi,%rsi,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%rdi,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_55
LBB0_56:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax,%r13,8)
	cmpl	$8, %edx
	jb	LBB0_61
## %bb.57:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-176(%rbp), %rax                ## 8-byte Reload
	addq	-248(%rbp), %rax                ## 8-byte Folded Reload
	subq	%r15, %rax
	cmpq	$32, %rax
	jb	LBB0_61
## %bb.58:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -128(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_62
## %bb.59:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_64
	.p2align	4, 0x90
LBB0_61:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_68
LBB0_62:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_63:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r15,%rax,4), %xmm0
	movups	16(%r15,%rax,4), %xmm1
	movups	%xmm0, -112(%r8,%rax,4)
	movups	%xmm1, -96(%r8,%rax,4)
	movups	32(%r15,%rax,4), %xmm0
	movups	48(%r15,%rax,4), %xmm1
	movups	%xmm0, -80(%r8,%rax,4)
	movups	%xmm1, -64(%r8,%rax,4)
	movups	64(%r15,%rax,4), %xmm0
	movups	80(%r15,%rax,4), %xmm1
	movups	%xmm0, -48(%r8,%rax,4)
	movups	%xmm1, -32(%r8,%rax,4)
	movups	96(%r15,%rax,4), %xmm0
	movups	112(%r15,%rax,4), %xmm1
	movups	%xmm0, -16(%r8,%rax,4)
	movups	%xmm1, (%r8,%rax,4)
	addq	$32, %rax
	addq	$-4, %rsi
	jne	LBB0_63
LBB0_64:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	$3, -168(%rbp)                  ## 1-byte Folded Reload
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_67
## %bb.65:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-208(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	leaq	(%r14,%rax,4), %rcx
	leaq	(%r15,%rax,4), %rax
	addq	$16, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_66:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rax,%rdx), %xmm0
	movups	(%rax,%rdx), %xmm1
	movups	%xmm0, (%rcx,%rdx)
	movups	%xmm1, (%rsi,%rdx)
	addq	$32, %rdx
	cmpq	%rdx, %rbx
	jne	LBB0_66
LBB0_67:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
	leaq	(%r15,%rax,4), %r15
	movq	%rax, %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	je	LBB0_3
LBB0_68:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rax
	movq	%rsi, %r13
	notq	%r13
	addq	%rcx, %r13
	testb	$3, %al
	je	LBB0_71
## %bb.69:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-144(%rbp), %rax                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_70:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %ecx
	addq	$4, %r15
	movl	%ecx, (%r14,%rsi,4)
	incq	%rsi
	decq	%rax
	jne	LBB0_70
LBB0_71:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %r13
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jb	LBB0_3
	.p2align	4, 0x90
LBB0_72:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %eax
	movl	%eax, (%r14,%rsi,4)
	movl	4(%r15), %eax
	movl	%eax, 4(%r14,%rsi,4)
	movl	8(%r15), %eax
	movl	%eax, 8(%r14,%rsi,4)
	movl	12(%r15), %eax
	addq	$16, %r15
	movl	%eax, 12(%r14,%rsi,4)
	addq	$4, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_72
	jmp	LBB0_3
LBB0_73:
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%r8d, %r8d
	testl	%r9d, %r9d
	jle	LBB0_77
## %bb.74:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rsi
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$-1, %ebx
	xorl	%ecx, %ecx
	xorl	%r10d, %r10d
	xorl	%edx, %edx
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	-160(%rbp), %r11                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_75:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rsi), %eax
	addl	-8(%rsi), %eax
	addl	(%rsi), %eax
	cmpl	%eax, %edi
	cmovgel	%eax, %edi
	cmovgl	%ecx, %edx
	cmpl	%eax, %ebx
	cmovlel	%eax, %ebx
	cmovll	%ecx, %r10d
	incq	%rcx
	addq	%r11, %rsi
	cmpq	%rcx, %r9
	jne	LBB0_75
## %bb.76:
	movslq	%edx, %r13
	movslq	%r10d, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_78
LBB0_77:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	-104(%rbp), %r12                ## 8-byte Reload
LBB0_78:
	movl	%r9d, %ecx
	shrl	$31, %ecx
	addl	%r9d, %ecx
	sarl	%ecx
	cmpl	%ecx, %r9d
	jle	LBB0_81
## %bb.79:
	movq	_ACOMP@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movslq	%r9d, %rax
	leaq	-1(%rax), %r9
	movslq	%ecx, %rcx
	movq	%rax, %r11
	subq	%rcx, %r11
	notq	%rcx
	addq	%rax, %rcx
	movl	%r11d, %r10d
	andl	$3, %r10d
	cmpq	$3, %rcx
	jae	LBB0_82
## %bb.80:
	xorl	%r8d, %r8d
	testq	%r10, %r10
	jne	LBB0_85
	jmp	LBB0_88
LBB0_81:
	decl	%r9d
	jmp	LBB0_88
LBB0_82:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	andq	$-4, %r11
	leaq	-4(%rax), %rcx
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	imulq	%rdx, %rcx
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	leaq	(%r8,%rcx,4), %rsi
	movq	%r15, %r12
	negq	%r12
	leaq	-3(%rax), %rcx
	imulq	%rdx, %rcx
	leaq	(%r8,%rcx,4), %rdi
	movq	%r9, %rcx
	imulq	%rdx, %rcx
	leaq	(%r8,%rcx,4), %rbx
	addq	$-2, %rax
	imulq	%rdx, %rax
	leaq	(%r8,%rax,4), %rcx
	xorl	%r8d, %r8d
	movl	$268435440, %r13d               ## imm = 0xFFFFFF0
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_83:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14,4), %eax
	shll	$12, %r8d
	shll	$4, %eax
	andl	$268435200, %eax                ## imm = 0xFFFFF00
	movl	(%rcx,%r14,4), %edx
	andl	%r13d, %edx
	orl	%r8d, %edx
	orl	%eax, %edx
	movl	(%rdi,%r14,4), %eax
	shll	$4, %edx
	andl	$-16, %eax
	movl	(%rsi,%r14,4), %r8d
	sarl	$4, %r8d
	orl	%eax, %r8d
	orl	%edx, %r8d
	addq	$4, %r15
	addq	%r12, %rsi
	addq	%r12, %rdi
	addq	%r12, %rbx
	addq	%r12, %rcx
	cmpq	%r15, %r11
	jne	LBB0_83
## %bb.84:
	subq	%r15, %r9
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	-184(%rbp), %r15                ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	testq	%r10, %r10
	je	LBB0_88
LBB0_85:
	movq	%r9, %rax
	imulq	-96(%rbp), %rax                 ## 8-byte Folded Reload
	addq	%rax, %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14,4), %rax
	movq	-160(%rbp), %rdx                ## 8-byte Reload
	negq	%rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_86:                                ## =>This Inner Loop Header: Depth=1
	movl	%r8d, %esi
	shll	$4, %esi
	movl	(%rax), %r8d
	sarl	$4, %r8d
	orl	%esi, %r8d
	incq	%rcx
	addq	%rdx, %rax
	cmpq	%rcx, %r10
	jne	LBB0_86
## %bb.87:
	subq	%rcx, %r9
LBB0_88:
	movl	%r8d, 4(%r12)
	testl	%r9d, %r9d
	js	LBB0_91
## %bb.89:
	movq	_ACOMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r9d, %r11d
	leaq	1(%r11), %r14
	movl	%r14d, %edx
	andl	$3, %edx
	cmpl	$3, %r9d
	jae	LBB0_92
## %bb.90:
	xorl	%ecx, %ecx
	jmp	LBB0_95
LBB0_91:
	xorl	%ecx, %ecx
	jmp	LBB0_98
LBB0_92:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rsi,4), %rdi
	andq	$-4, %r14
	leaq	-3(%r11), %r9
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	imulq	%rax, %r9
	negq	%r15
	movq	%r15, %r10
	leaq	-2(%r11), %r15
	imulq	%rax, %r15
	movq	%r11, %r8
	imulq	%rax, %r8
	leaq	-1(%r11), %r13
	imulq	%rax, %r13
	xorl	%ecx, %ecx
	movl	$268435440, %r12d               ## imm = 0xFFFFFF0
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_93:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%r8,4), %ebx
	shll	$12, %ecx
	shll	$4, %ebx
	andl	$268435200, %ebx                ## imm = 0xFFFFF00
	movl	(%rdi,%r13,4), %esi
	andl	%r12d, %esi
	orl	%ecx, %esi
	orl	%ebx, %esi
	movl	(%rdi,%r15,4), %ebx
	shll	$4, %esi
	andl	$-16, %ebx
	movl	(%rdi,%r9,4), %ecx
	sarl	$4, %ecx
	orl	%ebx, %ecx
	orl	%esi, %ecx
	addq	$4, %rax
	addq	%r10, %rdi
	cmpq	%rax, %r14
	jne	LBB0_93
## %bb.94:
	subq	%rax, %r11
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
LBB0_95:
	testq	%rdx, %rdx
	movq	-160(%rbp), %rdi                ## 8-byte Reload
	je	LBB0_98
## %bb.96:
	imulq	-96(%rbp), %r11                 ## 8-byte Folded Reload
	addq	%r11, %rsi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rsi,4), %rax
	negq	%rdi
	.p2align	4, 0x90
LBB0_97:                                ## =>This Inner Loop Header: Depth=1
	shll	$4, %ecx
	movl	(%rax), %esi
	sarl	$4, %esi
	orl	%esi, %ecx
	addq	%rdi, %rax
	decq	%rdx
	jne	LBB0_97
LBB0_98:
	movl	%ecx, (%r12)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	imulq	%rbx, %r13
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	leaq	(%r15,%r13,4), %r14
	movq	%r14, %rdi
	callq	_COLOR565
	movl	%eax, %r13d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	imulq	%rbx, %rax
	leaq	(%r15,%rax,4), %r15
	movq	%r15, %rdi
	callq	_COLOR565
	movl	%eax, %ecx
	shll	$16, %ecx
	orl	%r13d, %ecx
	movl	%ecx, 8(%r12)
	cmpl	%eax, %r13d
	je	LBB0_100
## %bb.99:
	movl	$3, %edi
	movl	$3, %esi
	movq	-216(%rbp), %rdx                ## 8-byte Reload
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_MAKEIVEC
LBB0_100:
	movl	$0, 12(%r12)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_102
## %bb.101:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_102:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_COMP,4,2                   ## @MAX_COMP
	.comm	_N_TEXELS,4,2                   ## @N_TEXELS
	.comm	_ACOMP,8,3                      ## @ACOMP
	.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	_dxt3_rgba_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxt3_rgba_quantize
_dxt3_rgba_quantize:                    ; @dxt3_rgba_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	x22, x2
	mov	x23, 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, #-88]
Lloh3:
	adrp	x8, _MAX_COMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_COMP@GOTPAGEOFF]
Lloh5:
	ldr	w25, [x8]
	lsl	x21, x25, #2
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x7fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh8:
	adrp	x27, _N_TEXELS@GOTPAGE
Lloh9:
	ldr	x27, [x27, _N_TEXELS@GOTPAGEOFF]
	ldr	w8, [x27]
	mul	x8, x8, x25
	lsl	x9, x8, #2
	add	x10, x9, #15
	and	x12, x10, #0xfffffffffffffff0
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x26, x9, x12
	mov	sp, x26
	mov	x24, x26
	cmp	w2, #3
	b.ne	LBB0_2
; %bb.1:
	lsl	w2, w8, #2
	mov	x0, x24
	mov	w1, #-1
	bl	_memset
LBB0_2:
	mov	x8, #0
	mov	w9, w22
	add	x10, x25, x25, lsl #1
	lsl	x10, x10, #2
	add	x11, x10, x26
	lsl	x12, x25, #4
	lsl	x13, x25, #3
	add	x14, x13, x26
	add	x15, x21, x26
	and	x16, x9, #0xfffffff0
	add	x17, x26, #32
	add	x0, x15, #32
	add	x1, x14, #32
	add	x2, x11, #32
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x3, [x23, x8, lsl #3]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	add	x17, x17, x12
	add	x24, x24, x12
	add	x0, x0, x12
	add	x1, x1, x12
	add	x2, x2, x12
	cmp	x8, #4
	b.eq	LBB0_34
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_19 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
                                        ;     Child Loop BB0_30 Depth 2
                                        ;     Child Loop BB0_33 Depth 2
	cmp	w22, #0
	b.le	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, #0
	ldr	x4, [x23, x8, lsl #3]
	cmp	w22, #16
	b.lo	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	madd	x3, x12, x8, x26
	sub	x3, x3, x4
	cmp	x3, #64
	b.lo	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x5, x4, #32
	mov	x6, x17
	mov	x7, x16
	add	x3, x4, x16, lsl #2
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x5, #-32]
	ldp	q2, q3, [x5], #64
	stp	q0, q1, [x6, #-32]
	stp	q2, q3, [x6], #64
	subs	x7, x7, #16
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, x16
	mov	x4, x3
	cmp	x16, x9
	b.eq	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x6, x24, x5, lsl #2
	sub	x5, x9, x5
	mov	x3, x4
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w4, [x3], #4
	str	w4, [x6], #4
	subs	x5, x5, #1
	b.ne	LBB0_12
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, #0
	str	x3, [x23, x8, lsl #3]
	cmp	w22, #16
	b.lo	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x5, x12, x8, x15
	sub	x5, x5, x3
	cmp	x5, #64
	b.lo	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x4, x3, #32
	mov	x5, x0
	mov	x6, x16
	add	x3, x3, x16, lsl #2
LBB0_16:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x4, #-32]
	ldp	q2, q3, [x4], #64
	stp	q0, q1, [x5, #-32]
	stp	q2, q3, [x5], #64
	subs	x6, x6, #16
	b.ne	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, x16
	cmp	x16, x9
	b.eq	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x5, x9, x4
	add	x4, x21, x4, lsl #2
LBB0_19:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w6, [x3], #4
	str	w6, [x24, x4]
	add	x4, x4, #4
	subs	x5, x5, #1
	b.ne	LBB0_19
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, #0
	str	x3, [x23, x8, lsl #3]
	cmp	w22, #16
	b.lo	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x5, x12, x8, x14
	sub	x5, x5, x3
	cmp	x5, #64
	b.lo	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x4, x3, #32
	mov	x5, x1
	mov	x6, x16
	add	x3, x3, x16, lsl #2
LBB0_23:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x4, #-32]
	ldp	q2, q3, [x4], #64
	stp	q0, q1, [x5, #-32]
	stp	q2, q3, [x5], #64
	subs	x6, x6, #16
	b.ne	LBB0_23
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, x16
	cmp	x16, x9
	b.eq	LBB0_27
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x5, x9, x4
	add	x4, x13, x4, lsl #2
LBB0_26:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w6, [x3], #4
	str	w6, [x24, x4]
	add	x4, x4, #4
	subs	x5, x5, #1
	b.ne	LBB0_26
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, #0
	str	x3, [x23, x8, lsl #3]
	cmp	w22, #16
	b.lo	LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x5, x12, x8, x11
	sub	x5, x5, x3
	cmp	x5, #64
	b.lo	LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x4, x3, #32
	mov	x5, x2
	mov	x6, x16
	add	x3, x3, x16, lsl #2
LBB0_30:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x4, #-32]
	ldp	q2, q3, [x4], #64
	stp	q0, q1, [x5, #-32]
	stp	q2, q3, [x5], #64
	subs	x6, x6, #16
	b.ne	LBB0_30
; %bb.31:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, x16
	cmp	x16, x9
	b.eq	LBB0_3
LBB0_32:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x5, x9, x4
	add	x4, x10, x4, lsl #2
LBB0_33:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w6, [x3], #4
	str	w6, [x24, x4]
	add	x4, x4, #4
	subs	x5, x5, #1
	b.ne	LBB0_33
	b	LBB0_3
LBB0_34:
	ldr	w9, [x27]
	cmp	w9, #1
	b.lt	LBB0_38
; %bb.35:
	mov	x11, #0
	mov	w10, #0
	mov	w8, #0
	add	x12, x26, #8
	mov	w13, #2000
	mov	w14, #-1
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldp	w15, w16, [x12, #-8]
	ldr	w17, [x12]
	add	w15, w16, w15
	add	w15, w17, w15
	cmp	w13, w15
	csel	w13, w13, w15, lt
	csel	w8, w11, w8, gt
	cmp	w14, w15
	csel	w14, w14, w15, gt
	csel	w10, w11, w10, lt
	add	x11, x11, #1
	add	x12, x12, x21
	cmp	x9, x11
	b.ne	LBB0_36
; %bb.37:
	sxtw	x8, w8
	sxtw	x22, w10
	b	LBB0_39
LBB0_38:
	mov	x8, #0
	mov	x22, #0
LBB0_39:
	cmp	w9, #0
	cinc	w10, w9, lt
	asr	w13, w10, #1
	sub	w10, w9, #1
Lloh12:
	adrp	x11, _ACOMP@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ACOMP@GOTPAGEOFF]
	cmp	w9, w13
	b.le	LBB0_42
; %bb.40:
	mov	w12, #0
	ldr	x14, [x11]
	sxtw	x9, w9
	sub	x15, x9, #1
	sxtw	x13, w13
	madd	x14, x15, x25, x14
	add	x14, x26, x14, lsl #2
	neg	x15, x25, lsl #2
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	w16, [x14]
	asr	w16, w16, #4
	orr	w12, w16, w12, lsl #4
	sub	x9, x9, #1
	add	x14, x14, x15
	sub	w10, w10, #1
	cmp	x9, x13
	b.gt	LBB0_41
	b	LBB0_43
LBB0_42:
	mov	w12, #0
LBB0_43:
	str	w12, [x19, #4]
	mov	w9, #0
	tbnz	w10, #31, LBB0_46
; %bb.44:
	ldr	x11, [x11]
	mov	w12, w10
	add	x10, x12, #1
	madd	x11, x12, x25, x11
	add	x11, x26, x11, lsl #2
	neg	x12, x25, lsl #2
LBB0_45:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x11]
	asr	w13, w13, #4
	orr	w9, w13, w9, lsl #4
	add	x11, x11, x12
	subs	x10, x10, #1
	b.ne	LBB0_45
LBB0_46:
	str	w9, [x19]
	mul	x8, x8, x25
	add	x21, x26, x8, lsl #2
	mov	x0, x21
	bl	_COLOR565
	mov	x23, x0
	mul	x8, x22, x25
	add	x22, x26, x8, lsl #2
	mov	x0, x22
	bl	_COLOR565
	orr	w8, w23, w0, lsl #16
	str	w8, [x19, #8]
	cmp	w23, w0
	b.eq	LBB0_48
; %bb.47:
	mov	w0, #3
	mov	w1, #3
	mov	x2, x20
	mov	x3, x21
	mov	x4, x22
	bl	_MAKEIVEC
LBB0_48:
	str	wzr, [x19, #12]
	ldur	x8, [x29, #-88]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_50
; %bb.49:
	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_50:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_COMP,4,2                   ; @MAX_COMP
	.comm	_N_TEXELS,4,2                   ; @N_TEXELS
	.comm	_ACOMP,8,3                      ; @ACOMP
	.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	_dxt3_rgba_quantize
.subsections_via_symbols
