	.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_r5g5_snorm_l6_unorm
LCPI0_0:
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
	.short	31                              ## 0x1f
LCPI0_1:
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
	.short	65504                           ## 0xffe0
LCPI0_2:
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
	.short	16                              ## 0x10
LCPI0_3:
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.short	32768                           ## 0x8000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_convert_r5g5_snorm_l6_unorm:           ## @convert_r5g5_snorm_l6_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
	.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_18
## %bb.1:
	movl	16(%rbp), %ecx
	movl	%eax, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movl	24(%rbp), %r14d
	leal	-1(%rcx), %eax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	incq	%rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	andq	$-16, %rax
                                        ## kill: def $ecx killed $ecx killed $rcx
	negl	%ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	addq	$16, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	addq	$16, %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	xorl	%ecx, %ecx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [31,31,31,31,31,31,31,31]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [65504,65504,65504,65504,65504,65504,65504,65504]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [16,16,16,16,16,16,16,16]
	movdqa	LCPI0_3(%rip), %xmm3            ## xmm3 = [32768,32768,32768,32768,32768,32768,32768,32768]
	xorl	%esi, %esi
	xorl	%edi, %edi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	addl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	addl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	movq	%rbx, %rdi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpq	-120(%rbp), %rbx                ## 8-byte Folded Reload
	je	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
                                        ##       Child Loop BB0_15 Depth 3
	movl	%esi, %esi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movl	%ecx, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, 24(%rbp)
	je	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%esi, %ecx
	imull	-44(%rbp), %ecx                 ## 4-byte Folded Reload
                                        ## kill: def $esi killed $esi killed $rsi def $rsi
	imull	-48(%rbp), %esi                 ## 4-byte Folded Reload
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	leaq	(%rdi,%rsi,4), %rsi
	movq	%rsi, -168(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rcx
	movq	%rcx, -160(%rbp)                ## 8-byte Spill
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rcx,%rsi,4), %rcx
	movq	%rcx, -144(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rcx,%rsi,4), %rcx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	xorl	%r9d, %r9d
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=2
	incq	%r12
	addl	%edx, %r15d
	addl	%r8d, %r9d
	cmpq	%r14, %r12
	je	LBB0_17
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
                                        ##       Child Loop BB0_15 Depth 3
	movl	16(%rbp), %ecx
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%r12d, %ecx
	imull	%edx, %ecx
	movq	-160(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %r10
	movl	%r12d, %ecx
	imull	%r8d, %ecx
	movq	-168(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %r11
	xorl	%r13d, %r13d
	cmpl	$15, -152(%rbp)                 ## 4-byte Folded Reload
	jb	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r11, %rcx
	subq	%r10, %rcx
	cmpq	$32, %rcx
	jb	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%r15d, %ecx
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rdi
	movl	%r9d, %ecx
	movq	-136(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rsi,%rcx,4), %rbx
	leaq	(%r11,%rax,2), %r11
	leaq	(%r10,%rax,2), %r10
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movdqu	-16(%rdi,%rcx,2), %xmm4
	movdqu	(%rdi,%rcx,2), %xmm5
	movdqa	%xmm4, %xmm6
	psrlw	$5, %xmm6
	movdqa	%xmm5, %xmm7
	psrlw	$5, %xmm7
	psllw	$11, %xmm4
	por	%xmm6, %xmm4
	pand	%xmm0, %xmm6
	pand	%xmm1, %xmm4
	psllw	$11, %xmm5
	por	%xmm7, %xmm5
	pand	%xmm0, %xmm7
	pand	%xmm1, %xmm5
	paddw	%xmm2, %xmm6
	por	%xmm4, %xmm6
	paddw	%xmm2, %xmm7
	por	%xmm5, %xmm7
	pxor	%xmm3, %xmm6
	pxor	%xmm3, %xmm7
	movdqu	%xmm6, -16(%rbx,%rcx,2)
	movdqu	%xmm7, (%rbx,%rcx,2)
	addq	$16, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, %r13d
	cmpq	%rax, -128(%rbp)                ## 8-byte Folded Reload
	je	LBB0_16
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	16(%rbp), %ecx
                                        ## kill: def $ecx killed $ecx killed $rcx
	subl	%r13d, %ecx
	testb	$1, %cl
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	%r13d, %ecx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	movzwl	(%r10), %ecx
	movl	%ecx, %edi
	shrl	$5, %edi
	andl	$31, %edi
	rolw	$11, %cx
	andl	$-32, %ecx
	addl	$16, %edi
	orl	%ecx, %edi
	xorl	$32768, %edi                    ## imm = 0x8000
	movw	%di, (%r11)
	addq	$2, %r11
	addq	$2, %r10
	leal	1(%r13), %ecx
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	notl	%r13d
	cmpl	-60(%rbp), %r13d                ## 4-byte Folded Reload
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	16(%rbp), %edi
                                        ## kill: def $edi killed $edi killed $rdi def $rdi
	subl	%ecx, %edi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movzwl	(%r10,%rbx,2), %esi
	movl	%esi, %ecx
	shrl	$5, %ecx
	andl	$31, %ecx
	rolw	$11, %si
	andl	$-32, %esi
	addl	$16, %ecx
	orl	%esi, %ecx
	xorl	$32768, %ecx                    ## imm = 0x8000
	movw	%cx, (%r11,%rbx,2)
	movzwl	2(%r10,%rbx,2), %ecx
	movl	%ecx, %esi
	shrl	$5, %esi
	rolw	$11, %cx
	andl	$31, %esi
	andl	$-32, %ecx
	addl	$16, %esi
	orl	%ecx, %esi
	xorl	$32768, %esi                    ## imm = 0x8000
	movw	%si, 2(%r11,%rbx,2)
	addq	$2, %rbx
	cmpl	%ebx, %edi
	jne	LBB0_15
	jmp	LBB0_16
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_convert_r5g5_snorm_l6_unorm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_r5g5_snorm_l6_unorm
_convert_r5g5_snorm_l6_unorm:           ; @convert_r5g5_snorm_l6_unorm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.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
	.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
	ldr	w8, [sp, #112]
	cbz	w8, LBB0_14
; %bb.1:
	mov	w14, #0
	mov	w16, #0
	mov	x9, #0
	mov	w10, w7
	sub	w11, w6, #1
	add	x12, x11, #1
	and	x13, x12, #0x1ffffffe0
	add	x15, x1, #32
	str	x15, [sp, #8]                   ; 8-byte Folded Spill
	add	x15, x0, #32
	str	x15, [sp]                       ; 8-byte Folded Spill
	movi.8h	v0, #31
	movi.8h	v1, #16
	movi.8h	v2, #128, lsl #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #1
	add	w16, w16, w5
	add	w14, w17, w3
	cmp	x9, x8
	b.eq	LBB0_14
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	mov	w16, w16
	mov	w17, w14
	cbz	w7, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w19, #0
	mov	w20, #0
	mov	x21, #0
	mul	w14, w9, w5
	add	x22, x1, w14, uxtw #2
	mul	w14, w9, w3
	add	x23, x0, w14, uxtw #2
	ldr	x14, [sp, #8]                   ; 8-byte Folded Reload
	add	x24, x14, x16, lsl #2
	ldr	x14, [sp]                       ; 8-byte Folded Reload
	add	x25, x14, x17, lsl #2
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	x21, x21, #1
	add	w20, w20, w4
	add	w19, w19, w2
	cmp	x21, x10
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	cbz	w6, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	w14, #0
	mul	w26, w21, w2
	lsl	x26, x26, #2
	add	x26, x23, x26
	mul	w27, w21, w4
	lsl	x27, x27, #2
	add	x27, x22, x27
	cmp	w11, #31
	b.lo	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	x28, x27, x26
	cmp	x28, #64
	b.lo	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x28, x24, w20, uxtw #2
	lsl	x14, x13, #1
	add	x27, x27, x14
	add	x26, x26, x14
	mov	x30, x13
	add	x14, x25, w19, uxtw #2
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	q3, q4, [x14, #-32]
	ldp	q5, q6, [x14], #64
	ushr.8h	v7, v3, #5
	ushr.8h	v16, v4, #5
	ushr.8h	v17, v5, #5
	ushr.8h	v18, v6, #5
	and.16b	v19, v7, v0
	and.16b	v20, v16, v0
	and.16b	v21, v17, v0
	and.16b	v22, v18, v0
	shl.8h	v3, v3, #11
	orr.16b	v3, v3, v7
	bic.8h	v3, #31
	shl.8h	v4, v4, #11
	orr.16b	v4, v4, v16
	bic.8h	v4, #31
	shl.8h	v5, v5, #11
	orr.16b	v5, v5, v17
	bic.8h	v5, #31
	shl.8h	v6, v6, #11
	orr.16b	v6, v6, v18
	bic.8h	v6, #31
	add.8h	v7, v19, v1
	add.8h	v16, v20, v1
	add.8h	v17, v21, v1
	add.8h	v18, v22, v1
	orr.16b	v3, v3, v7
	orr.16b	v4, v4, v16
	orr.16b	v5, v5, v17
	orr.16b	v6, v6, v18
	eor.16b	v3, v3, v2
	eor.16b	v4, v4, v2
	eor.16b	v5, v5, v2
	stp	q3, q4, [x28, #-32]
	eor.16b	v3, v6, v2
	stp	q5, q3, [x28], #64
	subs	x30, x30, #32
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x14, x13
	cmp	x12, x13
	b.eq	LBB0_5
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	sub	w14, w6, w14
LBB0_13:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldrh	w28, [x26], #2
	lsr	w30, w28, #5
	ubfx	w15, w28, #5, #5
	bfi	w30, w28, #11, #16
	and	w28, w30, #0xffe0
	add	w15, w15, #16
	orr	w15, w28, w15
	eor	w15, w15, #0x8000
	strh	w15, [x27], #2
	subs	w14, w14, #1
	b.ne	LBB0_13
	b	LBB0_5
LBB0_14:
	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
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_convert_r5g5_snorm_l6_unorm
.subsections_via_symbols
