	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dxt5_block_internal
_dxt5_block_internal:                   ## @dxt5_block_internal
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, -160(%rbp)                ## 4-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	32(%rdx), %rdi
	callq	_AV_RL16
	movl	%eax, -152(%rbp)                ## 4-byte Spill
	leaq	40(%rbx), %rdi
	callq	_AV_RL16
	movl	%eax, -144(%rbp)                ## 4-byte Spill
	leaq	48(%rbx), %rdi
	callq	_AV_RL32
	movl	%eax, %r12d
	movl	(%rbx), %r13d
	movl	4(%rbx), %eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
	addq	$8, %rbx
	leaq	-128(%rbp), %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_decompress_indices
	leaq	-64(%rbp), %rdi
	xorl	%ebx, %ebx
	movl	-152(%rbp), %esi                ## 4-byte Reload
	movl	-144(%rbp), %edx                ## 4-byte Reload
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_extract_color
	movslq	-160(%rbp), %rax                ## 4-byte Folded Reload
	shlq	$2, %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	incq	%rbx
	addq	$16, %r15
	movq	-160(%rbp), %r14                ## 8-byte Reload
	addq	-144(%rbp), %r14                ## 8-byte Folded Reload
	cmpq	$4, %rbx
	je	LBB0_13
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%rbx, -152(%rbp)                ## 8-byte Spill
	movq	%r14, -160(%rbp)                ## 8-byte Spill
	movq	%r14, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_2
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=2
	movl	$8, %ecx
	subl	%eax, %ecx
	imull	%r13d, %ecx
	decl	%eax
	imull	%edx, %eax
	addl	%ecx, %eax
	movslq	%eax, %rsi
	imulq	$-1840700269, %rsi, %rax        ## imm = 0x92492493
	shrq	$32, %rax
	addl	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	sarl	$2, %esi
	addl	%eax, %esi
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	%r12d, %eax
	andl	$3, %eax
	shll	$24, %esi
	orl	-64(%rbp,%rax,4), %esi
	sarl	$2, %r12d
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_AV_WL32
	incq	%r14
	addq	$16, %rbx
	cmpq	$4, %r14
	je	LBB0_12
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15,%r14,4), %eax
	movl	%r13d, %esi
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	-132(%rbp), %ecx                ## 4-byte Reload
	movl	%ecx, %esi
	cmpl	$1, %eax
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	-132(%rbp), %edx                ## 4-byte Reload
	cmpl	%edx, %r13d
	jg	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$6, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=2
	cmpl	$7, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=2
	movl	$255, %esi
	jmp	LBB0_11
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=2
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	movl	$6, %ecx
	subl	%eax, %ecx
	imull	%r13d, %ecx
	decl	%eax
	imull	%edx, %eax
	addl	%ecx, %eax
	cltq
	imulq	$1717986919, %rax, %rsi         ## imm = 0x66666667
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$33, %rsi
	addl	%eax, %esi
	jmp	LBB0_11
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dxt5_block_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dxt5_block_internal
_dxt5_block_internal:                   ; @dxt5_block_internal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	add	x0, x2, #32
	bl	_AV_RL16
	mov	x23, x0
	add	x0, x21, #40
	bl	_AV_RL16
	mov	x28, x0
	add	x0, x21, #48
	bl	_AV_RL32
	mov	x20, x0
	ldp	w25, w26, [x21]
	add	x1, x21, #8
	add	x24, sp, #8
	add	x0, sp, #8
	bl	_decompress_indices
	add	x27, sp, #72
	add	x0, sp, #72
	mov	x1, x23
	mov	x2, x28
	mov	w3, #1
	mov	w4, #0
	bl	_extract_color
	mov	x23, #0
	sbfiz	x8, x22, #2, #32
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	w28, #9363
	movk	w28, #37449, lsl #16
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #1
	add	x24, x24, #16
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x19, x19, x8
	cmp	x23, #4
	b.eq	LBB0_13
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	mov	x22, #0
	mov	x21, x24
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=2
	mov	w8, #8
	sub	w8, w8, w9
	mul	w9, w10, w26
	madd	w8, w8, w25, w9
	smull	x9, w8, w28
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #2
	add	w8, w9, w8, lsr #31
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	and	w9, w20, #0x3
	ldr	w9, [x27, w9, uxtw #2]
	orr	w1, w9, w8, lsl #24
	asr	w20, w20, #2
	add	x0, x19, x22
	bl	_AV_WL32
	add	x21, x21, #4
	add	x22, x22, #16
	cmp	x22, #64
	b.eq	LBB0_1
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x21]
	mov	x8, x25
	cbz	w9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x8, x26
	subs	w10, w9, #1
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w25, w26
	b.gt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w9, #6
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w9, #7
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=2
	mov	w8, #255
	b	LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	w8, #0
	b	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	w8, #6
	sub	w8, w8, w9
	mul	w9, w10, w26
	madd	w8, w8, w25, w9
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	b	LBB0_4
LBB0_13:
	ldr	x8, [sp, #88]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dxt5_block_internal
.subsections_via_symbols
