	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function convert_l4a4_unorm
LCPI0_0:
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.byte	240                             ## 0xf0
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
	.space	1
LCPI0_1:
	.space	16,240
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_convert_l4a4_unorm:                    ## @convert_l4a4_unorm
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	32(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_20
## %bb.1:
	movl	16(%rbp), %r9d
	movl	%eax, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	leal	-1(%r9), %esi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	2(%rax,%rsi,2), %rcx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	1(%rcx,%rsi), %rdi
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	movq	%rsi, -200(%rbp)                ## 8-byte Spill
	leaq	1(%rsi), %r13
	movq	%r13, -160(%rbp)                ## 8-byte Spill
	andq	$-16, %r13
	movq	%r13, %rsi
	addq	%r13, %rsi
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	addq	$8, %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	addq	$16, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <240,240,240,240,240,240,240,240,u,u,u,u,u,u,u,u>
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [240,240,240,240,240,240,240,240,240,240,240,240,240,240,240,240]
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	incq	%rdi
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	addl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rdi, %rsi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	cmpq	-144(%rbp), %rdi                ## 8-byte Folded Reload
	je	LBB0_20
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_17 Depth 3
	movl	%ecx, %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, 24(%rbp)
	je	LBB0_19
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ecx
	imull	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%eax, %esi
	imull	-48(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%rsi, %rax
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	addq	-136(%rbp), %rsi                ## 8-byte Folded Reload
	movq	%rsi, -184(%rbp)                ## 8-byte Spill
	addq	-128(%rbp), %rcx                ## 8-byte Folded Reload
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	xorl	%r10d, %r10d
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%rdi
	addl	%edx, %r15d
	addl	%r8d, %r10d
	movl	24(%rbp), %eax
	cmpq	%rax, %rdi
	je	LBB0_19
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
                                        ##       Child Loop BB0_17 Depth 3
	testl	%r9d, %r9d
	je	LBB0_18
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%edi, %r12d
	imull	%r8d, %r12d
	movq	-208(%rbp), %rcx                ## 8-byte Reload
	addq	%rcx, %r12
	movl	%edi, %r11d
	imull	%edx, %r11d
	addq	-104(%rbp), %r11                ## 8-byte Folded Reload
	xorl	%r14d, %r14d
	cmpl	$15, -200(%rbp)                 ## 4-byte Folded Reload
	jb	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%edi, %eax
	imull	%r8d, %eax
	leaq	(%rcx,%rax), %rsi
	movl	%edi, %ecx
	imull	%edx, %ecx
	movq	-192(%rbp), %rbx                ## 8-byte Reload
	addq	%rcx, %rbx
	cmpq	%rbx, %rsi
	jae	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	-184(%rbp), %rax                ## 8-byte Folded Reload
	addq	-104(%rbp), %rcx                ## 8-byte Folded Reload
	cmpq	%rax, %rcx
	jb	LBB0_11
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%r15d, %esi
	addq	-176(%rbp), %rsi                ## 8-byte Folded Reload
	movl	%r10d, %eax
	addq	-168(%rbp), %rax                ## 8-byte Folded Reload
	addq	-152(%rbp), %r12                ## 8-byte Folded Reload
	addq	%r13, %r11
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	-8(%rsi,%rcx), %xmm2            ## xmm2 = mem[0],zero
	movq	(%rsi,%rcx), %xmm3              ## xmm3 = mem[0],zero
	movdqa	%xmm2, %xmm4
	pand	%xmm0, %xmm4
	movdqa	%xmm3, %xmm5
	pand	%xmm0, %xmm5
	psllw	$4, %xmm2
	pand	%xmm1, %xmm2
	punpcklbw	%xmm4, %xmm2            ## xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1],xmm2[2],xmm4[2],xmm2[3],xmm4[3],xmm2[4],xmm4[4],xmm2[5],xmm4[5],xmm2[6],xmm4[6],xmm2[7],xmm4[7]
	psllw	$4, %xmm3
	pand	%xmm1, %xmm3
	punpcklbw	%xmm5, %xmm3            ## xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1],xmm3[2],xmm5[2],xmm3[3],xmm5[3],xmm3[4],xmm5[4],xmm3[5],xmm5[5],xmm3[6],xmm5[6],xmm3[7],xmm5[7]
	movdqu	%xmm2, -16(%rax,%rcx,2)
	movdqu	%xmm3, (%rax,%rcx,2)
	addq	$16, %rcx
	cmpq	%rcx, %r13
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%r13d, %r14d
	cmpq	%r13, -160(%rbp)                ## 8-byte Folded Reload
	je	LBB0_18
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	%r9d, %eax
	subl	%r14d, %eax
	movl	%r14d, %esi
	notl	%esi
	addl	%r9d, %esi
	andl	$3, %eax
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%r8d, %edx
	movq	%r9, %r8
	negl	%eax
	xorl	%r9d, %r9d
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movzbl	(%r11), %ecx
	incq	%r11
	movl	%ecx, %ebx
	andb	$-16, %bl
	movb	%bl, 1(%r12)
	shlb	$4, %cl
	movb	%cl, (%r12)
	addq	$2, %r12
	decq	%r9
	cmpl	%r9d, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	subl	%r9d, %r14d
	movq	%r8, %r9
	movl	%edx, %r8d
	movl	-60(%rbp), %edx                 ## 4-byte Reload
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	cmpl	$3, %esi
	jb	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%r9d, %esi
	subl	%r14d, %esi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movzbl	(%r11,%rax), %ebx
	movl	%ebx, %ecx
	andb	$-16, %cl
	movb	%cl, 1(%r12,%rax,2)
	shlb	$4, %bl
	movb	%bl, (%r12,%rax,2)
	movzbl	1(%r11,%rax), %ebx
	movl	%ebx, %ecx
	andb	$-16, %cl
	movb	%cl, 3(%r12,%rax,2)
	shlb	$4, %bl
	movb	%bl, 2(%r12,%rax,2)
	movzbl	2(%r11,%rax), %ebx
	movl	%ebx, %ecx
	andb	$-16, %cl
	movb	%cl, 5(%r12,%rax,2)
	shlb	$4, %bl
	movb	%bl, 4(%r12,%rax,2)
	movzbl	3(%r11,%rax), %ebx
	movl	%ebx, %ecx
	andb	$-16, %cl
	movb	%cl, 7(%r12,%rax,2)
	shlb	$4, %bl
	movb	%bl, 6(%r12,%rax,2)
	addq	$4, %rax
	cmpl	%eax, %esi
	jne	LBB0_17
	jmp	LBB0_18
LBB0_20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_convert_l4a4_unorm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_l4a4_unorm
_convert_l4a4_unorm:                    ; @convert_l4a4_unorm
	.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
	.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
	stp	w7, w3, [sp, #76]               ; 8-byte Folded Spill
	str	w5, [sp, #84]                   ; 4-byte Folded Spill
	stp	x0, x1, [sp, #40]               ; 16-byte Folded Spill
	ldr	w8, [sp, #192]
	str	x8, [sp, #64]                   ; 8-byte Folded Spill
	cbz	w8, LBB0_23
; %bb.1:
	mov	w11, #0
	mov	w8, #0
	mov	x9, #0
	sub	w10, w6, #1
	ldp	x14, x13, [sp, #40]             ; 16-byte Folded Reload
	add	x12, x13, w10, uxtw #1
	add	x12, x12, #2
	str	x12, [sp, #32]                  ; 8-byte Folded Spill
	add	x12, x10, #1
	add	x15, x14, x12
	str	x15, [sp, #24]                  ; 8-byte Folded Spill
	and	x0, x12, #0x1ffffffc0
	lsl	x15, x0, #1
	str	x15, [sp]                       ; 8-byte Folded Spill
	and	x15, x12, #0x38
	str	x15, [sp, #56]                  ; 8-byte Folded Spill
	and	x17, x12, #0x1fffffff8
	lsl	x15, x17, #1
	str	x15, [sp, #88]                  ; 8-byte Folded Spill
	add	x15, x13, #64
	add	x13, x14, #32
	stp	x13, x15, [sp, #8]              ; 16-byte Folded Spill
	movi.8b	v0, #240
	movi.16b	v1, #240
	neg	x22, x17
	ldr	w13, [sp, #76]                  ; 4-byte Folded Reload
	mov	w23, w13
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	ldp	w11, w8, [sp, #80]              ; 8-byte Folded Reload
	add	w8, w25, w8
	add	w11, w24, w11
	ldr	x13, [sp, #64]                  ; 8-byte Folded Reload
	cmp	x9, x13
	b.eq	LBB0_23
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_20 Depth 3
                                        ;       Child Loop BB0_12 Depth 3
	mov	w24, w11
	mov	w25, w8
	ldr	w8, [sp, #76]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w14, #0
	mov	w8, #0
	mov	x26, #0
	ldp	w11, w13, [sp, #80]             ; 8-byte Folded Reload
	mul	w11, w9, w11
	mul	w13, w9, w13
	ldp	x1, x16, [sp, #40]              ; 16-byte Folded Reload
	add	x27, x1, x11
	add	x28, x16, x13
	ldr	x15, [sp, #32]                  ; 8-byte Folded Reload
	add	x30, x15, x13
	ldr	x13, [sp, #24]                  ; 8-byte Folded Reload
	add	x15, x13, x11
	ldp	x13, x11, [sp, #8]              ; 16-byte Folded Reload
	add	x11, x11, x25
	add	x13, x13, x24
	add	x20, x1, x24
	add	x21, x16, x25
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x26, x26, #1
	add	w8, w8, w4
	add	w14, w16, w2
	cmp	x26, x23
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_16 Depth 3
                                        ;       Child Loop BB0_20 Depth 3
                                        ;       Child Loop BB0_12 Depth 3
	mov	w16, w14
	mov	w8, w8
	cbz	w6, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mul	w14, w26, w4
	add	x19, x28, x14
	mul	w14, w26, w2
	add	x7, x27, x14
	cmp	w10, #7
	b.lo	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mul	w14, w26, w4
	add	x5, x28, x14
	mul	w1, w26, w2
	add	x3, x15, x1
	cmp	x5, x3
	b.hs	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x14, x30, x14
	add	x1, x27, x1
	cmp	x1, x14
	b.hs	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w14, #0
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w14, w6, w14
	add	x1, x19, #1
LBB0_12:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrb	w3, [x7], #1
	and	w5, w3, #0xf0
	strb	w5, [x1]
	lsl	w3, w3, #4
	sturb	w3, [x1, #-1]
	add	x1, x1, #2
	subs	w14, w14, #1
	b.ne	LBB0_12
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=2
	cmp	w10, #63
	b.hs	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x5, #0
	b	LBB0_19
LBB0_15:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x5, x11, x8
	add	x1, x13, x16
	mov	x14, x0
LBB0_16:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	q2, q3, [x1, #-32]
	ldp	q4, q5, [x1], #64
	and.16b	v7, v2, v1
	and.16b	v17, v3, v1
	and.16b	v19, v4, v1
	shl.16b	v6, v2, #4
	shl.16b	v16, v3, #4
	sub	x3, x5, #64
	st2.16b	{ v6, v7 }, [x3]
	shl.16b	v18, v4, #4
	sub	x3, x5, #32
	st2.16b	{ v16, v17 }, [x3]
	add	x3, x5, #128
	st2.16b	{ v18, v19 }, [x5], #32
	and.16b	v3, v5, v1
	shl.16b	v2, v5, #4
	st2.16b	{ v2, v3 }, [x5]
	mov	x5, x3
	subs	x14, x14, #64
	b.ne	LBB0_16
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=2
	cmp	x12, x0
	b.eq	LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x5, x0
	ldr	x14, [sp, #56]                  ; 8-byte Folded Reload
	cbz	x14, LBB0_22
LBB0_19:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x14, [sp, #88]                  ; 8-byte Folded Reload
	add	x19, x19, x14
	add	x7, x7, x17
	add	x14, x5, x16
	add	x14, x20, x14
	add	x1, x8, x5, lsl #1
	add	x1, x21, x1
	add	x5, x22, x5
LBB0_20:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	d2, [x14], #8
	and.8b	v4, v2, v0
	shl.8b	v3, v2, #4
	st2.8b	{ v3, v4 }, [x1], #16
	adds	x5, x5, #8
	b.ne	LBB0_20
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x14, x17
	cmp	x12, x17
	b.eq	LBB0_5
	b	LBB0_11
LBB0_22:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x7, x7, x0
	ldr	x14, [sp]                       ; 8-byte Folded Reload
	add	x19, x19, x14
	mov	x14, x0
	b	LBB0_11
LBB0_23:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_convert_l4a4_unorm
.subsections_via_symbols
