	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function dxt5_rgba_quantize
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_dxt5_rgba_quantize:                    ## @dxt5_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	$200, %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, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -168(%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), %r13
	movq	%r13, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -144(%rbp)                ## 8-byte Spill
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	imulq	%rbx, %r15
	leaq	(,%r15,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdi
	movl	%r14d, -64(%rbp)                ## 4-byte Spill
	cmpl	$3, %r14d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	shll	$2, %r15d
	movl	$-1, %esi
	movl	%r15d, %edx
	callq	_memset
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_2:
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rax,2), %r8
	leaq	(%rdi,%r8,4), %r14
	movq	%rax, %r10
	shlq	$4, %r10
	leaq	(%rdi,%rax,8), %rbx
	movq	%rdi, %r9
	movl	%edx, %edi
	andl	$-8, %edi
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	addq	$-8, %rdi
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	movq	%rdi, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movl	%ecx, %esi
	andl	$3, %esi
	movq	%rcx, %rdi
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	andq	$-4, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movl	%edx, %ecx
	andl	$3, %ecx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	%rsi, -200(%rbp)                ## 8-byte Spill
	shlq	$5, %rsi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	leaq	(%r9,%r8,4), %rdi
	addq	$112, %rdi
	leaq	16(%r9,%r8,4), %rcx
	movq	%r10, %rsi
	leaq	(%r9,%rax,4), %r8
	leaq	112(%r9), %r12
	leaq	112(%r9,%rax,4), %r11
	leaq	16(%r9,%rax,4), %r10
	leaq	112(%r9,%rax,8), %r15
	leaq	(%r9,%rax,8), %rax
	addq	$16, %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movq	%r10, %rax
	xorl	%r10d, %r10d
	movq	%r14, -224(%rbp)                ## 8-byte Spill
	movq	%rbx, -216(%rbp)                ## 8-byte Spill
	movq	%r8, -208(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -232(%rbp)                ## 8-byte Spill
	movq	%r13, -240(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax,%r10,8)
	movq	-240(%rbp), %r13                ## 8-byte Reload
	movq	-232(%rbp), %rsi                ## 8-byte Reload
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	movq	-184(%rbp), %rax                ## 8-byte Reload
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r10
	addq	%rsi, %r12
	addq	%rsi, %r9
	addq	%rsi, %r11
	addq	%rsi, %rax
	addq	%rsi, %r8
	addq	%rsi, %r15
	addq	%rsi, -176(%rbp)                ## 8-byte Folded Spill
	addq	%rsi, %rbx
	addq	%rsi, %rdi
	addq	%rsi, %rcx
	addq	%rsi, %r14
	cmpq	$4, %r10
	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
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, -184(%rbp)                ## 8-byte Spill
	imulq	%r10, %rsi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r10,8), %r13
	cmpl	$8, -64(%rbp)                   ## 4-byte Folded Reload
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	jb	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%rsi, %rax
	subq	%r13, %rax
	cmpq	$32, %rax
	jb	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -120(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_18
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r13,%rcx,4), %xmm0
	movups	16(%r13,%rcx,4), %xmm1
	movaps	%xmm0, -112(%r12,%rcx,4)
	movaps	%xmm1, -96(%r12,%rcx,4)
	movups	32(%r13,%rcx,4), %xmm0
	movups	48(%r13,%rcx,4), %xmm1
	movaps	%xmm0, -80(%r12,%rcx,4)
	movaps	%xmm1, -64(%r12,%rcx,4)
	movups	64(%r13,%rcx,4), %xmm0
	movups	80(%r13,%rcx,4), %xmm1
	movaps	%xmm0, -48(%r12,%rcx,4)
	movaps	%xmm1, -32(%r12,%rcx,4)
	movups	96(%r13,%rcx,4), %xmm0
	movups	112(%r13,%rcx,4), %xmm1
	movaps	%xmm0, -16(%r12,%rcx,4)
	movaps	%xmm1, (%r12,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rsi
	jne	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$0, -200(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	(%r9,%rcx,4), %rdx
	leaq	16(,%rcx,4), %rcx
	addq	%r13, %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rsi), %xmm0
	movups	(%rcx,%rsi), %xmm1
	movaps	%xmm0, (%rdx,%rsi)
	movaps	%xmm1, 16(%rdx,%rsi)
	addq	$32, %rsi
	cmpq	%rsi, %rax
	jne	LBB0_16
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%r13,%rax,4), %r13
	movq	%rax, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	je	LBB0_22
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_20
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	addq	$4, %r13
	movl	%eax, (%r9,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	movl	%eax, (%r9,%rcx,4)
	movl	4(%r13), %eax
	movl	%eax, 4(%r9,%rcx,4)
	movl	8(%r13), %eax
	movl	%eax, 8(%r9,%rcx,4)
	movl	12(%r13), %eax
	addq	$16, %r13
	movl	%eax, 12(%r9,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax,%r10,8)
	cmpl	$8, -64(%rbp)                   ## 4-byte Folded Reload
	movq	%r10, -160(%rbp)                ## 8-byte Spill
	jb	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-208(%rbp), %rax                ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	subq	%r13, %rax
	cmpq	$32, %rax
	jb	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -120(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_28
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_34
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%ecx, %ecx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r13,%rcx,4), %xmm0
	movups	16(%r13,%rcx,4), %xmm1
	movups	%xmm0, -112(%r11,%rcx,4)
	movups	%xmm1, -96(%r11,%rcx,4)
	movups	32(%r13,%rcx,4), %xmm0
	movups	48(%r13,%rcx,4), %xmm1
	movups	%xmm0, -80(%r11,%rcx,4)
	movups	%xmm1, -64(%r11,%rcx,4)
	movups	64(%r13,%rcx,4), %xmm0
	movups	80(%r13,%rcx,4), %xmm1
	movups	%xmm0, -48(%r11,%rcx,4)
	movups	%xmm1, -32(%r11,%rcx,4)
	movups	96(%r13,%rcx,4), %xmm0
	movups	112(%r13,%rcx,4), %xmm1
	movups	%xmm0, -16(%r11,%rcx,4)
	movups	%xmm1, (%r11,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rsi
	jne	LBB0_29
LBB0_30:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	$3, -152(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rdx
	leaq	(%r8,%rcx,4), %rsi
	leaq	16(,%rcx,4), %rcx
	addq	%r13, %rcx
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_32:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%r10), %xmm0
	movups	(%rcx,%r10), %xmm1
	movups	%xmm0, (%rsi,%r10)
	movups	%xmm1, (%rdx,%r10)
	addq	$32, %r10
	cmpq	%r10, %rax
	jne	LBB0_32
LBB0_33:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%r13,%rax,4), %r13
	movq	%rax, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	movq	-160(%rbp), %r10                ## 8-byte Reload
	je	LBB0_39
LBB0_34:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	testb	$3, %dl
	je	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	addq	$4, %r13
	movl	%eax, (%r8,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_36
LBB0_37:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jb	LBB0_39
	.p2align	4, 0x90
LBB0_38:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	movl	%eax, (%r8,%rcx,4)
	movl	4(%r13), %eax
	movl	%eax, 4(%r8,%rcx,4)
	movl	8(%r13), %eax
	movl	%eax, 8(%r8,%rcx,4)
	movl	12(%r13), %eax
	addq	$16, %r13
	movl	%eax, 12(%r8,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_38
LBB0_39:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax,%r10,8)
	cmpl	$8, -64(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_44
## %bb.40:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-216(%rbp), %rax                ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	subq	%r13, %rax
	cmpq	$32, %rax
	jb	LBB0_44
## %bb.41:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -120(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_45
## %bb.42:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_47
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_51
LBB0_45:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_46:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r13,%rcx,4), %xmm0
	movups	16(%r13,%rcx,4), %xmm1
	movups	%xmm0, -112(%r15,%rcx,4)
	movups	%xmm1, -96(%r15,%rcx,4)
	movups	32(%r13,%rcx,4), %xmm0
	movups	48(%r13,%rcx,4), %xmm1
	movups	%xmm0, -80(%r15,%rcx,4)
	movups	%xmm1, -64(%r15,%rcx,4)
	movups	64(%r13,%rcx,4), %xmm0
	movups	80(%r13,%rcx,4), %xmm1
	movups	%xmm0, -48(%r15,%rcx,4)
	movups	%xmm1, -32(%r15,%rcx,4)
	movups	96(%r13,%rcx,4), %xmm0
	movups	112(%r13,%rcx,4), %xmm1
	movups	%xmm0, -16(%r15,%rcx,4)
	movups	%xmm1, (%r15,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rsi
	jne	LBB0_46
LBB0_47:                                ##   in Loop: Header=BB0_5 Depth=1
	testb	$3, -152(%rbp)                  ## 1-byte Folded Reload
	movq	-88(%rbp), %r10                 ## 8-byte Reload
	je	LBB0_50
## %bb.48:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-176(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%rbx,%rcx,4), %rsi
	leaq	16(,%rcx,4), %rcx
	addq	%r13, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_49:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rax), %xmm0
	movups	(%rcx,%rax), %xmm1
	movups	%xmm0, (%rsi,%rax)
	movups	%xmm1, (%rdx,%rax)
	addq	$32, %rax
	cmpq	%rax, %r10
	jne	LBB0_49
LBB0_50:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%r13,%rax,4), %r13
	movq	%rax, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	movq	-160(%rbp), %r10                ## 8-byte Reload
	je	LBB0_56
LBB0_51:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	testb	$3, %dl
	je	LBB0_54
## %bb.52:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_53:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	addq	$4, %r13
	movl	%eax, (%rbx,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_53
LBB0_54:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jb	LBB0_56
	.p2align	4, 0x90
LBB0_55:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	movl	%eax, (%rbx,%rcx,4)
	movl	4(%r13), %eax
	movl	%eax, 4(%rbx,%rcx,4)
	movl	8(%r13), %eax
	movl	%eax, 8(%rbx,%rcx,4)
	movl	12(%r13), %eax
	addq	$16, %r13
	movl	%eax, 12(%rbx,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_55
LBB0_56:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax,%r10,8)
	cmpl	$8, -64(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_61
## %bb.57:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addq	-224(%rbp), %rax                ## 8-byte Folded Reload
	subq	%r13, %rax
	cmpq	$32, %rax
	jb	LBB0_61
## %bb.58:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$24, -120(%rbp)                 ## 8-byte Folded Reload
	jae	LBB0_62
## %bb.59:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_64
	.p2align	4, 0x90
LBB0_61:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_68
LBB0_62:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_63:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	(%r13,%rcx,4), %xmm0
	movups	16(%r13,%rcx,4), %xmm1
	movups	%xmm0, -112(%rdi,%rcx,4)
	movups	%xmm1, -96(%rdi,%rcx,4)
	movups	32(%r13,%rcx,4), %xmm0
	movups	48(%r13,%rcx,4), %xmm1
	movups	%xmm0, -80(%rdi,%rcx,4)
	movups	%xmm1, -64(%rdi,%rcx,4)
	movups	64(%r13,%rcx,4), %xmm0
	movups	80(%r13,%rcx,4), %xmm1
	movups	%xmm0, -48(%rdi,%rcx,4)
	movups	%xmm1, -32(%rdi,%rcx,4)
	movups	96(%r13,%rcx,4), %xmm0
	movups	112(%r13,%rcx,4), %xmm1
	movups	%xmm0, -16(%rdi,%rcx,4)
	movups	%xmm1, (%rdi,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rsi
	jne	LBB0_63
LBB0_64:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rdi, %r10
	testb	$3, -152(%rbp)                  ## 1-byte Folded Reload
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	je	LBB0_67
## %bb.65:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-192(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rdx
	leaq	(%r14,%rcx,4), %rsi
	leaq	16(,%rcx,4), %rcx
	addq	%r13, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_66:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movups	-16(%rcx,%rax), %xmm0
	movups	(%rcx,%rax), %xmm1
	movups	%xmm0, (%rsi,%rax)
	movups	%xmm1, (%rdx,%rax)
	addq	$32, %rax
	cmpq	%rax, %rdi
	jne	LBB0_66
LBB0_67:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%r13,%rax,4), %r13
	movq	%rax, %rcx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rdx, %rax
	movq	%r10, %rdi
	movq	-160(%rbp), %r10                ## 8-byte Reload
	je	LBB0_3
LBB0_68:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rcx, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	testb	$3, %dl
	je	LBB0_71
## %bb.69:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-136(%rbp), %rdx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_70:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	addq	$4, %r13
	movl	%eax, (%r14,%rcx,4)
	incq	%rcx
	decq	%rdx
	jne	LBB0_70
LBB0_71:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpq	$3, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	jb	LBB0_3
	.p2align	4, 0x90
LBB0_72:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %eax
	movl	%eax, (%r14,%rcx,4)
	movl	4(%r13), %eax
	movl	%eax, 4(%r14,%rcx,4)
	movl	8(%r13), %eax
	movl	%eax, 8(%r14,%rcx,4)
	movl	12(%r13), %eax
	addq	$16, %r13
	movl	%eax, 12(%r14,%rcx,4)
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_72
	jmp	LBB0_3
LBB0_73:
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_78
## %bb.74:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_ACOMP@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	xorl	%ebx, %ebx
	movl	$-1, %esi
	movl	$2000, %edi                     ## imm = 0x7D0
	movl	$1, %r10d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r11d, %r11d
	xorl	%r12d, %r12d
	movl	$-1, %r15d
	movl	$2000, %r14d                    ## imm = 0x7D0
	movq	%r13, %r8
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_75:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rcx), %eax
	addl	(%rcx), %eax
	addl	8(%rcx), %eax
	cmpl	%eax, %edi
	cmovgl	%ebx, %edx
	cmovgel	%eax, %edi
	cmpl	%eax, %esi
	cmovll	%ebx, %r13d
	cmovlel	%eax, %esi
	movl	(%rcx,%r9,4), %eax
	cmpl	%eax, %r14d
	cmovgel	%eax, %r14d
	cmpl	%eax, %r15d
	cmovlel	%eax, %r15d
	testl	%eax, %eax
	cmovel	%r10d, %r12d
	cmpl	$255, %eax
	cmovel	%r10d, %r11d
	incq	%rbx
	addq	%r8, %rcx
	cmpq	%rbx, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_75
## %bb.76:
	movslq	%edx, %rcx
	movslq	%r13d, %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	cmpl	%r15d, %r14d
	jne	LBB0_79
## %bb.77:
	movl	%r14d, %eax
	shll	$8, %eax
	orl	%r14d, %eax
	movq	-168(%rbp), %r12                ## 8-byte Reload
	movl	%eax, (%r12)
	movl	$0, 4(%r12)
                                        ## implicit-def: $xmm0
                                        ## kill: killed $xmm0
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_91
LBB0_78:
	movl	$2000, %r14d                    ## imm = 0x7D0
	movl	$-1, %r15d
	xorl	%r11d, %r11d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_80
LBB0_79:
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
LBB0_80:
	testl	%r12d, %r12d
	setne	%al
	testl	%r14d, %r14d
	setne	%cl
	testl	%r15d, %r15d
	setne	%dl
	andb	%al, %cl
	andb	%dl, %cl
	testl	%r11d, %r11d
	setne	%al
	cmpl	$255, %r14d
	setne	%r13b
	cmpl	$255, %r15d
	setne	%dl
	andb	%al, %r13b
	andb	%dl, %r13b
	orb	%cl, %r13b
	cmpl	%r15d, %r14d
	setg	%al
	xorb	%r13b, %al
	movl	%r15d, %edx
	cmovnel	%r14d, %edx
	cmovnel	%r15d, %r14d
	xorl	%eax, %eax
	movl	%r14d, %ecx
	subl	%edx, %ecx
	setl	%al
	leal	5(%rax,%rax), %eax
	cvtsi2ss	%eax, %xmm0
	cvtsi2ss	%ecx, %xmm1
	divss	%xmm1, %xmm0
	movq	_ACOMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	xorps	%xmm1, %xmm1
	cvtsi2ss	%edx, %xmm1
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	movss	%xmm0, (%rcx,%rax,4)
	mulss	%xmm0, %xmm1
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	subss	%xmm1, %xmm0
	movss	%xmm0, -64(%rbp)                ## 4-byte Spill
	xorl	%esi, %esi
	callq	_Q_MOV32
	movq	_N_TEXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	jle	LBB0_90
## %bb.81:
	movzbl	%r13b, %r12d
	incq	%r15
	jmp	LBB0_85
	.p2align	4, 0x90
LBB0_82:                                ##   in Loop: Header=BB0_85 Depth=1
	movq	_ACOMP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	imulq	-104(%rbp), %rax                ## 8-byte Folded Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
LBB0_83:                                ##   in Loop: Header=BB0_85 Depth=1
	leaq	(%rsi,%rax,4), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ssl	(%rax,%rcx,4), %xmm0
	movq	-144(%rbp), %rax                ## 8-byte Reload
	mulss	(%rax,%rcx,4), %xmm0
	addss	-64(%rbp), %xmm0                ## 4-byte Folded Reload
	cvttss2si	%xmm0, %eax
	movq	_dxtn_alpha_tlat@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%r12,8), %rcx
	cltq
	movl	(%rcx,%rax,4), %ebx
LBB0_84:                                ##   in Loop: Header=BB0_85 Depth=1
	movl	$3, %esi
	callq	_Q_SHL
	movl	%ebx, %esi
	callq	_Q_OR32
	decq	%r15
	cmpq	$1, %r15
	jbe	LBB0_90
LBB0_85:                                ## =>This Inner Loop Header: Depth=1
	leaq	-2(%r15), %rax
	testb	%r13b, %r13b
	je	LBB0_82
## %bb.86:                              ##   in Loop: Header=BB0_85 Depth=1
	movl	%eax, %eax
	imulq	-104(%rbp), %rax                ## 8-byte Folded Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rax,4), %rdx
	movq	_ACOMP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rdx,%rcx,4), %edx
	testl	%edx, %edx
	je	LBB0_89
## %bb.87:                              ##   in Loop: Header=BB0_85 Depth=1
	cmpl	$255, %edx
	jne	LBB0_83
## %bb.88:                              ##   in Loop: Header=BB0_85 Depth=1
	movl	$7, %ebx
	jmp	LBB0_84
LBB0_89:                                ##   in Loop: Header=BB0_85 Depth=1
	movl	$6, %ebx
	jmp	LBB0_84
LBB0_90:
	movl	$16, %esi
	callq	_Q_SHL
	shll	$8, %r14d
	orl	-96(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, %esi
	callq	_Q_OR32
	movq	-168(%rbp), %r12                ## 8-byte Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
LBB0_91:
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	imulq	%rbx, %rcx
	leaq	(%rax,%rcx,4), %r14
	movq	%r14, %rdi
	movq	%rax, %r15
	callq	_COLOR565
	movl	%eax, %r13d
	movq	-80(%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_93
## %bb.92:
	movl	$3, %edi
	movl	$3, %esi
	movq	-144(%rbp), %rdx                ## 8-byte Reload
	movss	-64(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_MAKEIVEC
LBB0_93:
	movl	$0, 12(%r12)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_95
## %bb.94:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_95:
	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_alpha_tlat,8,3            ## @dxtn_alpha_tlat
	.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	_dxt5_rgba_quantize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxt5_rgba_quantize
_dxt5_rgba_quantize:                    ; @dxt5_rgba_quantize
	.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, #32
	mov	x23, x2
	mov	x24, x1
	mov	x26, 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:
	ldr	w25, [x8]
	lsl	x22, x25, #2
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #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	x21, x9, x12
	mov	sp, x21
	cmp	w2, #3
	b.ne	LBB0_2
; %bb.1:
	lsl	w2, w8, #2
	mov	x0, x21
	mov	w1, #-1
	bl	_memset
LBB0_2:
	mov	x8, #0
	mov	w9, w23
	add	x10, x25, x25, lsl #1
	lsl	x10, x10, #2
	add	x11, x10, x21
	lsl	x12, x25, #4
	lsl	x13, x25, #3
	add	x14, x13, x21
	add	x15, x22, x21
	and	x16, x9, #0xfffffff0
	add	x17, x21, #32
	add	x0, x15, #32
	add	x1, x14, #32
	add	x2, x11, #32
	mov	x3, x21
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	x4, [x24, x8, lsl #3]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x8, x8, #1
	add	x17, x17, x12
	add	x3, x3, 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	w23, #0
	b.le	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x6, #0
	ldr	x5, [x24, x8, lsl #3]
	cmp	w23, #16
	b.lo	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	madd	x4, x12, x8, x21
	sub	x4, x4, x5
	cmp	x4, #64
	b.lo	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x6, x5, #32
	mov	x7, x17
	mov	x19, x16
	add	x4, x5, x16, lsl #2
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x6, #-32]
	ldp	q2, q3, [x6], #64
	stp	q0, q1, [x7, #-32]
	stp	q2, q3, [x7], #64
	subs	x19, x19, #16
	b.ne	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x6, x16
	mov	x5, x4
	cmp	x16, x9
	b.eq	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x7, x3, x6, lsl #2
	sub	x6, x9, x6
	mov	x4, x5
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w5, [x4], #4
	str	w5, [x7], #4
	subs	x6, x6, #1
	b.ne	LBB0_12
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, #0
	str	x4, [x24, x8, lsl #3]
	cmp	w23, #16
	b.lo	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x6, x12, x8, x15
	sub	x6, x6, x4
	cmp	x6, #64
	b.lo	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x5, x4, #32
	mov	x6, x0
	mov	x7, x16
	add	x4, x4, x16, lsl #2
LBB0_16:                                ;   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_16
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, x16
	cmp	x16, x9
	b.eq	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x6, x9, x5
	add	x5, x22, x5, lsl #2
LBB0_19:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w7, [x4], #4
	str	w7, [x3, x5]
	add	x5, x5, #4
	subs	x6, x6, #1
	b.ne	LBB0_19
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, #0
	str	x4, [x24, x8, lsl #3]
	cmp	w23, #16
	b.lo	LBB0_25
; %bb.21:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x6, x12, x8, x14
	sub	x6, x6, x4
	cmp	x6, #64
	b.lo	LBB0_25
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x5, x4, #32
	mov	x6, x1
	mov	x7, x16
	add	x4, x4, x16, lsl #2
LBB0_23:                                ;   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_23
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, x16
	cmp	x16, x9
	b.eq	LBB0_27
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x6, x9, x5
	add	x5, x13, x5, lsl #2
LBB0_26:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w7, [x4], #4
	str	w7, [x3, x5]
	add	x5, x5, #4
	subs	x6, x6, #1
	b.ne	LBB0_26
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, #0
	str	x4, [x24, x8, lsl #3]
	cmp	w23, #16
	b.lo	LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_5 Depth=1
	madd	x6, x12, x8, x11
	sub	x6, x6, x4
	cmp	x6, #64
	b.lo	LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x5, x4, #32
	mov	x6, x2
	mov	x7, x16
	add	x4, x4, x16, lsl #2
LBB0_30:                                ;   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_30
; %bb.31:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x5, x16
	cmp	x16, x9
	b.eq	LBB0_3
LBB0_32:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x6, x9, x5
	add	x5, x10, x5, lsl #2
LBB0_33:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w7, [x4], #4
	str	w7, [x3, x5]
	add	x5, x5, #4
	subs	x6, x6, #1
	b.ne	LBB0_33
	b	LBB0_3
LBB0_34:
	ldr	w12, [x27]
Lloh12:
	adrp	x23, _ACOMP@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ACOMP@GOTPAGEOFF]
	cmp	w12, #1
	b.lt	LBB0_39
; %bb.35:
	mov	x15, #0
	mov	w8, #0
	mov	w9, #0
	mov	w13, #0
	mov	w14, #0
	ldr	x16, [x23]
	mov	w17, #-1
	mov	w0, #2000
	mov	x1, x21
	mov	w11, #-1
	mov	w10, #2000
LBB0_36:                                ; =>This Inner Loop Header: Depth=1
	ldp	w2, w3, [x1]
	ldr	w4, [x1, #8]
	add	w2, w3, w2
	add	w2, w4, w2
	cmp	w0, w2
	csel	w14, w15, w14, gt
	csel	w0, w0, w2, lt
	cmp	w17, w2
	csel	w13, w15, w13, lt
	ldr	w3, [x1, x16, lsl #2]
	csel	w17, w17, w2, gt
	cmp	w10, w3
	csel	w10, w10, w3, lt
	cmp	w11, w3
	csel	w11, w11, w3, gt
	cmp	w3, #0
	csinc	w9, w9, wzr, ne
	cmp	w3, #255
	csinc	w8, w8, wzr, ne
	add	x15, x15, #1
	add	x1, x1, x22
	cmp	x12, x15
	b.ne	LBB0_36
; %bb.37:
	sxtw	x12, w14
	sxtw	x19, w13
	cmp	w10, w11
	b.ne	LBB0_40
; %bb.38:
	orr	w8, w10, w10, lsl #8
	stp	w8, wzr, [x26]
                                        ; implicit-def: $s8
	b	LBB0_52
LBB0_39:
	stp	xzr, x26, [x29, #-120]          ; 16-byte Folded Spill
	mov	w8, #0
	mov	w9, #0
	stur	xzr, [x29, #-128]               ; 8-byte Folded Spill
	mov	w10, #2000
	mov	w11, #-1
	b	LBB0_41
LBB0_40:
	stp	x12, x19, [x29, #-128]          ; 16-byte Folded Spill
	stur	x26, [x29, #-112]               ; 8-byte Folded Spill
LBB0_41:
	cmp	w9, #0
	ccmp	w10, #0, #4, ne
	ccmp	w11, #0, #4, ne
	cset	w9, ne
	cmp	w8, #0
	mov	w8, #255
	ccmp	w10, w8, #4, ne
	ccmp	w11, w8, #4, ne
	cset	w8, ne
	orr	w19, w9, w8
	cmp	w10, w11
	cset	w8, gt
	eor	w8, w8, w19
	cmp	w8, #0
	csel	w28, w10, w11, ne
	csel	w26, w11, w10, ne
	subs	w8, w26, w28
	mov	w9, #5
	mov	w10, #7
	csel	w9, w10, w9, lt
	scvtf	s0, w9
	scvtf	s1, w8
	fdiv	s0, s0, s1
	ldr	x8, [x23]
	str	s0, [x20, x8, lsl #2]
	scvtf	s1, w28
	fmov	s2, #0.50000000
	fmsub	s8, s0, s1, s2
	mov	w1, #0
	bl	_Q_MOV32
	ldr	w8, [x27]
	cmp	w8, #1
	b.lt	LBB0_51
; %bb.42:
	add	x24, x8, #1
Lloh14:
	adrp	x27, _dxtn_alpha_tlat@GOTPAGE
Lloh15:
	ldr	x27, [x27, _dxtn_alpha_tlat@GOTPAGEOFF]
	b	LBB0_46
LBB0_43:                                ;   in Loop: Header=BB0_46 Depth=1
	ldr	x8, [x23]
	and	x9, x9, #0xffffffff
	mul	x9, x9, x25
LBB0_44:                                ;   in Loop: Header=BB0_46 Depth=1
	add	x9, x21, x9, lsl #2
	lsl	x8, x8, #2
	ldr	s0, [x9, x8]
	scvtf	s0, s0
	ldr	s1, [x20, x8]
	fmul	s0, s1, s0
	fadd	s0, s8, s0
	fcvtzs	w8, s0
	ldr	x9, [x27]
	ldr	x9, [x9, x19, lsl #3]
	ldr	w22, [x9, w8, sxtw #2]
LBB0_45:                                ;   in Loop: Header=BB0_46 Depth=1
	mov	w1, #3
	bl	_Q_SHL
	mov	x1, x22
	bl	_Q_OR32
	sub	x24, x24, #1
	cmp	x24, #1
	b.ls	LBB0_51
LBB0_46:                                ; =>This Inner Loop Header: Depth=1
	sub	x9, x24, #2
	tbz	w19, #0, LBB0_43
; %bb.47:                               ;   in Loop: Header=BB0_46 Depth=1
	and	x8, x9, #0xffffffff
	mul	x9, x8, x25
	add	x10, x21, x9, lsl #2
	ldr	x8, [x23]
	ldr	w10, [x10, x8, lsl #2]
	cbz	w10, LBB0_50
; %bb.48:                               ;   in Loop: Header=BB0_46 Depth=1
	cmp	w10, #255
	b.ne	LBB0_44
; %bb.49:                               ;   in Loop: Header=BB0_46 Depth=1
	mov	w22, #7
	b	LBB0_45
LBB0_50:                                ;   in Loop: Header=BB0_46 Depth=1
	mov	w22, #6
	b	LBB0_45
LBB0_51:
	mov	w1, #16
	bl	_Q_SHL
	orr	w1, w28, w26, lsl #8
	bl	_Q_OR32
	ldp	x19, x26, [x29, #-120]          ; 16-byte Folded Reload
	ldur	x12, [x29, #-128]               ; 8-byte Folded Reload
LBB0_52:
	mul	x8, x12, x25
	add	x22, x21, x8, lsl #2
	mov	x0, x22
	bl	_COLOR565
	mov	x23, x0
	mul	x8, x19, x25
	add	x21, x21, x8, lsl #2
	mov	x0, x21
	bl	_COLOR565
	orr	w8, w23, w0, lsl #16
	str	w8, [x26, #8]
	cmp	w23, w0
	b.eq	LBB0_54
; %bb.53:
	mov	w0, #3
	mov	w1, #3
	mov	x2, x20
	fmov	s0, s8
	mov	x3, x22
	mov	x4, x21
	bl	_MAKEIVEC
LBB0_54:
	str	wzr, [x26, #12]
	ldur	x8, [x29, #-104]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_56
; %bb.55:
	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_56:
	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 AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.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_alpha_tlat,8,3            ; @dxtn_alpha_tlat
	.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	_dxt5_rgba_quantize
.subsections_via_symbols
