	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function x8r8g8b8_to_dxtn
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
LCPI0_1:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
LCPI0_2:
	.byte	2                               ## 0x2
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	6                               ## 0x6
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	10                              ## 0xa
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	14                              ## 0xe
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
	.byte	128                             ## 0x80
LCPI0_3:
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	255                             ## 0xff
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_4:
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.long	4278190080                      ## 0xff000000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_x8r8g8b8_to_dxtn:                      ## @x8r8g8b8_to_dxtn
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movl	%edx, %ecx
	movq	%rsi, %r14
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%r8d, %esi
	movl	%r9d, %edx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, %r8d
	callq	_TRACE
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	imull	%r15d, %ebx
	shll	$2, %ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_HeapAlloc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movl	%r12d, -76(%rbp)                ## 4-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	testl	%r15d, %r15d
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_16
## %bb.2:
	movq	24(%rbp), %r8
	xorl	%eax, %eax
	testq	%r8, %r8
	setne	%al
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	%esi, %r12d
	movl	%r12d, %ecx
	andl	$-8, %ecx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movd	%eax, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	$16, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	$16, %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%r12,4), %r10
	andq	$-32, %r10
	xorl	%r13d, %r13d
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255]
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = [0,0,255,0,0,0,255,0,0,0,255,0,0,0,255,0]
	movdqa	LCPI0_2(%rip), %xmm10           ## xmm10 = [2,128,128,128,6,128,128,128,10,128,128,128,14,128,128,128]
	movdqa	LCPI0_3(%rip), %xmm11           ## xmm11 = [0,255,0,0,0,255,0,0,0,255,0,0,0,255,0,0]
	movdqa	LCPI0_4(%rip), %xmm12           ## xmm12 = [4278190080,4278190080,4278190080,4278190080]
	pslld	$31, %xmm0
	xorl	%r15d, %r15d
	xorl	%r9d, %r9d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r9
	addl	%r14d, %r15d
	addl	%esi, %r13d
	cmpq	-120(%rbp), %r9                 ## 8-byte Folded Reload
	je	LBB0_16
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	testl	%esi, %esi
	je	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	movl	%r15d, %edi
	cmpl	$8, %esi
	jb	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r9d, %ecx
	imull	%r14d, %ecx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rcx,4), %rcx
	movl	%r9d, %edx
	imull	%esi, %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rdx,4), %rdx
	subq	%rcx, %rdx
	movl	$0, %ecx
	cmpq	$32, %rdx
	jb	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rdi,4), %r11
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-16(%r11,%rcx), %xmm2
	movdqu	(%r11,%rcx), %xmm5
	movdqa	%xmm2, %xmm3
	pand	%xmm8, %xmm3
	movdqa	%xmm5, %xmm1
	pand	%xmm8, %xmm1
	movdqa	%xmm2, %xmm4
	pslld	$16, %xmm4
	movdqa	%xmm5, %xmm13
	pslld	$16, %xmm13
	movdqa	%xmm2, %xmm7
	pand	%xmm11, %xmm2
	por	%xmm4, %xmm2
	pand	%xmm9, %xmm4
	movdqa	%xmm5, %xmm6
	pand	%xmm11, %xmm5
	por	%xmm13, %xmm5
	pand	%xmm9, %xmm13
	pshufb	%xmm10, %xmm7
	pshufb	%xmm10, %xmm6
	por	%xmm7, %xmm3
	por	%xmm4, %xmm3
	por	%xmm6, %xmm1
	por	%xmm13, %xmm1
	por	%xmm12, %xmm7
	por	%xmm2, %xmm7
	por	%xmm12, %xmm6
	por	%xmm5, %xmm6
	blendvps	%xmm0, %xmm3, %xmm7
	blendvps	%xmm0, %xmm1, %xmm6
	movups	%xmm7, -16(%r14,%rcx)
	movups	%xmm6, (%r14,%rcx)
	addq	$32, %rcx
	cmpq	%rcx, %r10
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%r12, %rdx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	je	LBB0_15
	jmp	LBB0_10
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %r11
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rdi,4), %rbx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	%eax, %edx
	shll	$16, %edx
	movl	%eax, %edi
	andl	$65280, %edi                    ## imm = 0xFF00
	orl	%edx, %edi
	shrl	$16, %eax
	movzbl	%al, %eax
	orl	%edi, %eax
	orl	$-16777216, %eax                ## imm = 0xFF000000
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	%eax, (%r11,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %r12
	je	LBB0_15
LBB0_11:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx,%rcx,4), %eax
	testq	%r8, %r8
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movl	%eax, %edi
	andl	$-16711936, %edi                ## imm = 0xFF00FF00
	movzbl	%al, %edx
	shll	$16, %edx
	orl	%edi, %edx
	shrl	$16, %eax
	movzbl	%al, %eax
	orl	%edx, %eax
	jmp	LBB0_14
LBB0_16:
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movl	$4, %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	movl	16(%rbp), %r8d
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	callq	_ptx_compress_dxtn
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
	movq	_TRUE@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movq	_FALSE@GOTPCREL(%rip), %rax
LBB0_17:
	movq	(%rax), %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Converting %ux%u pixels, pitches %u %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate memory for conversion\n"

	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_TRUE,8,3                       ## @TRUE
	.no_dead_strip	_x8r8g8b8_to_dxtn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x8r8g8b8_to_dxtn
_x8r8g8b8_to_dxtn:                      ; @x8r8g8b8_to_dxtn
	.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
	mov	x24, x7
	mov	x19, x6
	mov	x21, x5
	mov	x23, x4
	mov	x20, x3
	mov	x25, x2
	mov	x22, x1
	mov	x26, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x4
	mov	x2, x5
	mov	x3, x25
	mov	x4, x20
	bl	_TRACE
	bl	_GetProcessHeap
	mul	w8, w23, w21
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x27, x0
	cbz	w21, LBB0_12
; %bb.2:
	mov	w14, #0
	mov	w15, #0
	mov	x8, #0
	cmp	x24, #0
	cset	w11, ne
	mov	w9, w21
	mov	w10, w23
	dup.4h	v3, w11
	and	x11, x10, #0xfffffffc
	movi.2d	v0, #0xff000000ff0000
	movi.2d	v1, #0x0000ff000000ff
	movi.2d	v2, #0x00ff000000ff00
	ushll.4s	v3, v3, #0
	shl.4s	v3, v3, #31
	cmlt.4s	v3, v3, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	add	w15, w13, w25
	add	w14, w12, w23
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	mov	w12, w14
	mov	w13, w15
	cbz	w23, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, #0
	cmp	w23, #4
	b.lo	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mul	w17, w8, w25
	add	x17, x26, w17, uxtw #2
	mul	w0, w8, w23
	add	x0, x27, w0, uxtw #2
	sub	x17, x0, x17
	cmp	x17, #16
	b.lo	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x15, x26, w15, uxtw #2
	mov	x16, x11
	add	x14, x27, w14, uxtw #2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	q4, [x15], #16
	shl.4s	v5, v4, #16
	ushr.4s	v6, v4, #16
	and.16b	v7, v4, v2
	bic.8h	v4, #255
	and.16b	v16, v5, v0
	orr.16b	v4, v16, v4
	and.16b	v6, v6, v1
	orr.16b	v4, v4, v6
	orr.16b	v5, v5, v7
	orr.16b	v5, v5, v6
	orr.4s	v5, #255, lsl #24
	bif.16b	v4, v5, v3
	str	q4, [x14], #16
	subs	x16, x16, #4
	b.ne	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x16, x11
	cmp	x11, x10
	b.eq	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x14, x16, x12
	add	x14, x27, x14, lsl #2
	add	x15, x16, x13
	add	x15, x26, x15, lsl #2
	sub	x16, x10, x16
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x15], #4
	and	w0, w17, #0xff00
	bfi	w0, w17, #16, #16
	bfxil	w0, w17, #16, #8
	orr	w0, w0, #0xff000000
	and	w1, w17, #0xff00ff00
	bfi	w1, w17, #16, #8
	bfxil	w1, w17, #16, #8
	cmp	x24, #0
	csel	w17, w0, w1, eq
	str	w17, [x14], #4
	subs	x16, x16, #1
	b.ne	LBB0_11
	b	LBB0_3
LBB0_12:
	mov	w0, #4
	mov	x1, x23
	mov	x2, x21
	mov	x3, x27
	mov	x4, x19
	mov	x5, x22
	mov	x6, x20
	bl	_ptx_compress_dxtn
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x27
	bl	_HeapFree
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
Lloh6:
	adrp	x8, _FALSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_14:
	ldr	x0, [x8]
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Converting %ux%u pixels, pitches %u %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate memory for conversion\n"

	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_TRUE,8,3                       ; @TRUE
	.no_dead_strip	_x8r8g8b8_to_dxtn
.subsections_via_symbols
