	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function rgb16to32_c
LCPI0_0:
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
LCPI0_1:
	.long	2016                            ## 0x7e0
	.long	2016                            ## 0x7e0
	.long	2016                            ## 0x7e0
	.long	2016                            ## 0x7e0
LCPI0_2:
	.long	63488                           ## 0xf800
	.long	63488                           ## 0xf800
	.long	63488                           ## 0xf800
	.long	63488                           ## 0xf800
LCPI0_3:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rgb16to32_c:                           ## @rgb16to32_c
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpl	$2, %edx
	jl	LBB0_9
## %bb.1:
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	cltq
	leaq	(%rdi,%rax,4), %r10
	leaq	4(%rdi), %rax
	cmpq	%rax, %r10
	movq	%rax, %r8
	cmovaq	%r10, %r8
	movq	%rdi, %rcx
	notq	%rcx
	addq	%rcx, %r8
	cmpq	$12, %r8
	jb	LBB0_2
## %bb.3:
	cmpq	%rax, %r10
	cmovaq	%r10, %rax
	leaq	(%rax,%rcx), %rdx
	andq	$-4, %rdx
	addq	%rdi, %rdx
	addq	$4, %rdx
	cmpq	%rsi, %rdx
	jbe	LBB0_5
## %bb.4:
	addq	%rcx, %rax
	addq	$4, %rax
	movabsq	$4611686018427387900, %rcx      ## imm = 0x3FFFFFFFFFFFFFFC
	andq	%rax, %rcx
	leaq	(%rsi,%rcx,4), %rax
	cmpq	%rdi, %rax
	jbe	LBB0_5
LBB0_2:
	movq	%rsi, %rcx
	movq	%rdi, %rdx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %eax
	addq	$4, %rdx
	movl	%eax, %esi
	andl	$31, %esi
	movl	%esi, %edi
	shrl	$2, %edi
	leal	(%rdi,%rsi,8), %esi
	movl	%esi, (%rcx)
	movl	%eax, %esi
	andl	$2016, %esi                     ## imm = 0x7E0
	movl	%esi, %edi
	shrl	$3, %edi
	shrl	$9, %esi
	orl	%edi, %esi
	movl	%esi, 4(%rcx)
	andl	$63488, %eax                    ## imm = 0xF800
	movl	%eax, %esi
	shrl	$8, %esi
	shrl	$13, %eax
	orl	%esi, %eax
	movl	%eax, 8(%rcx)
	movl	$255, 12(%rcx)
	addq	$16, %rcx
	cmpq	%r10, %rdx
	jb	LBB0_8
LBB0_9:
	popq	%rbp
	retq
LBB0_5:
	shrq	$2, %r8
	incq	%r8
	movq	%r8, %r9
	andq	$-4, %r9
	movq	%r9, %rcx
	shlq	$4, %rcx
	addq	%rsi, %rcx
	leaq	(%rdi,%r9,4), %rdx
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [31,31,31,31]
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = [2016,2016,2016,2016]
	movdqa	LCPI0_2(%rip), %xmm10           ## xmm10 = [63488,63488,63488,63488]
	movdqa	LCPI0_3(%rip), %xmm2            ## xmm2 = [255,255,255,255]
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rax,4), %xmm5
	movdqa	%xmm5, %xmm4
	pand	%xmm8, %xmm4
	movdqa	%xmm4, %xmm6
	pslld	$3, %xmm6
	psrld	$2, %xmm4
	por	%xmm6, %xmm4
	movdqa	%xmm5, %xmm6
	pand	%xmm9, %xmm6
	movdqa	%xmm6, %xmm7
	psrld	$3, %xmm7
	psrld	$9, %xmm6
	por	%xmm7, %xmm6
	pand	%xmm10, %xmm5
	movdqa	%xmm5, %xmm7
	psrld	$8, %xmm7
	psrld	$13, %xmm5
	por	%xmm7, %xmm5
	movdqa	%xmm6, %xmm7
	shufps	$0, %xmm5, %xmm7                ## xmm7 = xmm7[0,0],xmm5[0,0]
	movdqa	%xmm4, %xmm0
	pblendw	$240, %xmm2, %xmm0              ## xmm0 = xmm0[0,1,2,3],xmm2[4,5,6,7]
	pblendw	$60, %xmm7, %xmm0               ## xmm0 = xmm0[0,1],xmm7[2,3,4,5],xmm0[6,7]
	movdqa	%xmm6, %xmm7
	insertps	$105, %xmm5, %xmm7              ## xmm7 = zero,xmm7[1],xmm5[1],zero
	movdqa	%xmm2, %xmm3
	insertps	$70, %xmm4, %xmm3               ## xmm3 = xmm4[1],zero,zero,xmm3[3]
	orps	%xmm7, %xmm3
	movaps	%xmm5, %xmm7
	insertps	$153, %xmm6, %xmm7              ## xmm7 = zero,xmm6[2],xmm7[2],zero
	movdqa	%xmm2, %xmm1
	insertps	$198, %xmm4, %xmm1              ## xmm1 = xmm4[3],zero,zero,xmm1[3]
	punpckhqdq	%xmm2, %xmm4            ## xmm4 = xmm4[1],xmm2[1]
	pblendw	$60, %xmm7, %xmm4               ## xmm4 = xmm4[0,1],xmm7[2,3,4,5],xmm4[6,7]
	shufps	$255, %xmm5, %xmm6              ## xmm6 = xmm6[3,3],xmm5[3,3]
	blendps	$9, %xmm1, %xmm6                ## xmm6 = xmm1[0],xmm6[1,2],xmm1[3]
	movups	%xmm6, 48(%rsi)
	movdqu	%xmm4, 32(%rsi)
	movups	%xmm3, 16(%rsi)
	movdqu	%xmm0, (%rsi)
	addq	$4, %rax
	addq	$64, %rsi
	cmpq	%rax, %r9
	jne	LBB0_6
## %bb.7:
	cmpq	%r9, %r8
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rgb16to32_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function rgb16to32_c
lCPI0_0:
	.long	31                              ; 0x1f
	.long	2016                            ; 0x7e0
lCPI0_1:
	.long	4294967294                      ; 0xfffffffe
	.long	4294967293                      ; 0xfffffffd
lCPI0_2:
	.long	3                               ; 0x3
	.long	9                               ; 0x9
lCPI0_3:
	.long	4294967293                      ; 0xfffffffd
	.long	4294967287                      ; 0xfffffff7
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rgb16to32_c:                           ; @rgb16to32_c
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	.cfi_offset b8, -8
	.cfi_offset b9, -16
	.cfi_offset b10, -24
	.cfi_offset b11, -32
	cmp	w2, #0
	cinc	w10, w2, lt
	cmp	w2, #2
	b.lt	LBB0_9
; %bb.1:
	sbfx	x8, x10, #1, #31
	add	x9, x0, x8, lsl #2
	add	x11, x0, #4
	cmp	x9, x11
	csel	x8, x9, x11, hi
	mvn	x12, x0
	add	x8, x8, x12
	cmp	x8, #60
	b.lo	LBB0_6
; %bb.2:
	cmp	x9, x11
	csel	x9, x9, x11, hi
	add	x9, x9, x12
	and	x11, x9, #0xfffffffffffffffc
	add	x9, x9, #4
	and	x9, x9, #0x3ffffffffffffffc
	add	x9, x1, x9, lsl #2
	add	x11, x11, x0
	add	x11, x11, #4
	cmp	x11, x1
	ccmp	x9, x0, #0, hi
	b.hi	LBB0_6
; %bb.3:
	lsr	x8, x8, #2
	add	x11, x8, #1
	and	x12, x11, #0x7ffffffffffffff0
	add	x8, x1, x12, lsl #4
	add	x9, x0, x12, lsl #2
	add	x14, x1, #128
	add	x13, x0, #32
	movi.4s	v0, #31
	mov	w15, #2016
	dup.4s	v1, w15
	movi.4s	v2, #248, lsl #8
	movi.2d	v6, #0x0000ff000000ff
	mov	x15, x12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q7, q16, [x13, #-32]
	and.16b	v17, v7, v0
	and.16b	v18, v16, v0
	ldp	q19, q20, [x13], #64
	and.16b	v21, v19, v0
	and.16b	v22, v20, v0
	shl.4s	v23, v17, #3
	shl.4s	v24, v18, #3
	shl.4s	v25, v21, #3
	shl.4s	v26, v22, #3
	ushr.4s	v17, v17, #2
	ushr.4s	v18, v18, #2
	ushr.4s	v21, v21, #2
	ushr.4s	v22, v22, #2
	orr.16b	v3, v23, v17
	and.16b	v17, v7, v1
	ushr.4s	v23, v17, #3
	ushr.4s	v17, v17, #9
	orr.16b	v4, v23, v17
	and.16b	v7, v7, v2
	ushr.4s	v17, v7, #8
	ushr.4s	v7, v7, #13
	orr.16b	v5, v17, v7
	orr.16b	v27, v24, v18
	and.16b	v7, v16, v1
	ushr.4s	v17, v7, #3
	ushr.4s	v7, v7, #9
	orr.16b	v28, v17, v7
	and.16b	v7, v16, v2
	ushr.4s	v16, v7, #8
	ushr.4s	v7, v7, #13
	orr.16b	v29, v16, v7
	mov.16b	v30, v6
	orr.16b	v7, v25, v21
	and.16b	v16, v19, v1
	ushr.4s	v17, v16, #3
	ushr.4s	v16, v16, #9
	orr.16b	v8, v17, v16
	and.16b	v16, v19, v2
	ushr.4s	v17, v16, #8
	ushr.4s	v16, v16, #13
	orr.16b	v9, v17, v16
	mov.16b	v10, v6
	orr.16b	v16, v26, v22
	and.16b	v21, v20, v1
	ushr.4s	v22, v21, #3
	ushr.4s	v21, v21, #9
	orr.16b	v17, v22, v21
	and.16b	v20, v20, v2
	sub	x16, x14, #128
	sub	x17, x14, #64
	st4.4s	{ v3, v4, v5, v6 }, [x16]
	st4.4s	{ v27, v28, v29, v30 }, [x17]
	ushr.4s	v21, v20, #8
	ushr.4s	v20, v20, #13
	orr.16b	v18, v21, v20
	mov.16b	v19, v6
	add	x16, x14, #256
	st4.4s	{ v7, v8, v9, v10 }, [x14], #64
	st4.4s	{ v16, v17, v18, v19 }, [x14]
	mov	x14, x16
	subs	x15, x15, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x12
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x8, x1
	mov	x9, x0
LBB0_7:
	asr	w10, w10, #1
	add	x10, x0, w10, sxtw #2
Lloh0:
	adrp	x11, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x11, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x11, lCPI0_1@PAGE
Lloh3:
	ldr	d1, [x11, lCPI0_1@PAGEOFF]
Lloh4:
	adrp	x11, lCPI0_2@PAGE
Lloh5:
	ldr	d2, [x11, lCPI0_2@PAGEOFF]
Lloh6:
	adrp	x11, lCPI0_3@PAGE
Lloh7:
	ldr	d3, [x11, lCPI0_3@PAGEOFF]
	mov	w11, #255
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9], #4
	dup.2s	v4, w12
	and.8b	v4, v4, v0
	ushl.2s	v5, v4, v1
	ushl.2s	v6, v4, v2
	ushl.2s	v4, v4, v3
	mov.s	v6[1], v4[1]
	orr.8b	v4, v6, v5
	str	d4, [x8]
	and	w13, w12, #0xf800
	lsr	w13, w13, #8
	bfxil	w13, w12, #13, #3
	stp	w13, w11, [x8, #8]
	add	x8, x8, #16
	cmp	x9, x10
	b.lo	LBB0_8
LBB0_9:
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpAdrp	Lloh4, Lloh6
	.loh AdrpLdr	Lloh4, Lloh5
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rgb16to32_c
.subsections_via_symbols
