	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxt1_to_x1r5g5b5
_dxt1_to_x1r5g5b5:                      ## @dxt1_to_x1r5g5b5
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%ecx, %eax
	movl	%edx, %ecx
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %esi
	movl	%r9d, %edx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%eax, %r8d
	callq	_TRACE
	testl	%r12d, %r12d
	je	LBB0_9
## %bb.1:
	movl	%r12d, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	shlq	$2, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	-72(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	-104(%rbp), %rcx                ## 8-byte Folded Reload
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r14
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, %eax
	shrl	$2, %eax
	imull	-68(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %r15
	movl	%edx, %r13d
	andl	$3, %r13d
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	shrl	$19, %ecx
	andl	$31, %ecx
	movl	%eax, %edx
	shrl	$6, %edx
	andl	$992, %edx                      ## imm = 0x3E0
	orl	%ecx, %edx
	shll	$7, %eax
	andl	$31744, %eax                    ## imm = 0x7C00
	addl	%edx, %eax
	addl	$32768, %eax                    ## imm = 0x8000
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, (%r14,%rbx)
	addq	$4, %rbx
	incl	%r12d
	cmpq	%rbx, -112(%rbp)                ## 8-byte Folded Reload
	je	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %eax
	andl	$-16, %eax
	leaq	(%r15,%rax,4), %rsi
	movl	%r12d, %edx
	andl	$3, %edx
	xorl	%edi, %edi
	movl	%r13d, %ecx
	leaq	-76(%rbp), %r8
	callq	_pfetch_2d_texel_rgba_dxt1
	movl	-76(%rbp), %eax
	movl	%eax, %ecx
	cmpq	$0, 16(%rbp)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	shrl	$16, %ecx
	andl	$32768, %ecx                    ## imm = 0x8000
	movl	%eax, %edx
	shrl	$19, %edx
	andl	$31, %edx
	orl	%ecx, %edx
	movl	%eax, %ecx
	shrl	$6, %ecx
	andl	$992, %ecx                      ## imm = 0x3E0
	orl	%edx, %ecx
	shll	$7, %eax
	andl	$31744, %eax                    ## imm = 0x7C00
	orl	%ecx, %eax
	jmp	LBB0_7
LBB0_9:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$72, %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"

	.comm	_TRUE,8,3                       ## @TRUE
	.no_dead_strip	_dxt1_to_x1r5g5b5
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxt1_to_x1r5g5b5
_dxt1_to_x1r5g5b5:                      ; @dxt1_to_x1r5g5b5
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x6
	mov	x25, x5
	mov	x8, x3
	mov	x3, x2
	stp	x0, x1, [sp]                    ; 16-byte Folded Spill
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	stp	w8, w4, [sp, #20]               ; 8-byte Folded Spill
	mov	x1, x4
	mov	x2, x5
	str	w3, [sp, #16]                   ; 4-byte Folded Spill
	mov	x4, x8
	bl	_TRACE
	cbz	w25, LBB0_6
; %bb.1:
	mov	w26, #0
	mov	x27, #0
	mov	w28, w25
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	mov	w8, w8
	lsl	x23, x8, #2
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x27, x27, #1
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	add	w26, w26, w8
	cmp	x27, x28
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w24, #0
	mov	x22, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x21, x8, w26, uxtw #2
	lsr	w8, w27, #2
	ldr	w9, [sp, #16]                   ; 4-byte Folded Reload
	mul	w8, w8, w9
	ldr	x9, [sp]                        ; 8-byte Folded Reload
	add	x20, x9, w8, uxtw #2
	and	w25, w27, #0x3
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	x8, x22, #0xfffffff0
	add	x1, x20, x8, lsl #2
	and	w2, w24, #0x3
	add	x4, sp, #28
	mov	w0, #0
	mov	x3, x25
	bl	_pfetch_2d_texel_rgba_dxt1
	ldr	w8, [sp, #28]
	lsr	w9, w8, #3
	lsr	w10, w8, #6
	and	w10, w10, #0x3e0
	lsr	w11, w8, #16
	and	w11, w11, #0x8000
	bfxil	w11, w8, #19, #5
	orr	w11, w11, w10
	bfxil	w10, w8, #19, #5
	bfi	w10, w9, #10, #5
	orr	w8, w10, #0x8000
	bfi	w11, w9, #10, #5
	cmp	x19, #0
	csel	w8, w8, w11, eq
	str	w8, [x21, x22]
	add	x22, x22, #4
	add	w24, w24, #1
	cmp	x23, x22
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
Lloh2:
	adrp	x8, _TRUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Converting %ux%u pixels, pitches %u %u\n"

	.comm	_TRUE,8,3                       ; @TRUE
	.no_dead_strip	_dxt1_to_x1r5g5b5
.subsections_via_symbols
