	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function rgb15tobgr24_c
LCPI0_0:
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
	.long	31                              ## 0x1f
LCPI0_1:
	.long	992                             ## 0x3e0
	.long	992                             ## 0x3e0
	.long	992                             ## 0x3e0
	.long	992                             ## 0x3e0
LCPI0_2:
	.long	31744                           ## 0x7c00
	.long	31744                           ## 0x7c00
	.long	31744                           ## 0x7c00
	.long	31744                           ## 0x7c00
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_rgb15tobgr24_c:                        ## @rgb15tobgr24_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
	addq	%rcx, %rax
	shrq	$2, %rax
	leaq	(%rdi,%rax,4), %rcx
	addq	$4, %rcx
	cmpq	%rsi, %rcx
	jbe	LBB0_5
## %bb.4:
	leaq	(%rax,%rax,2), %rax
	leaq	(%rsi,%rax,4), %rax
	addq	$12, %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	$992, %esi                      ## imm = 0x3E0
	movl	%esi, %edi
	shrl	$2, %edi
	shrl	$7, %esi
	orl	%edi, %esi
	movl	%esi, 4(%rcx)
	andl	$31744, %eax                    ## imm = 0x7C00
	movl	%eax, %esi
	shrl	$7, %esi
	shrl	$12, %eax
	orl	%esi, %eax
	movl	%eax, 8(%rcx)
	addq	$12, %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
	leaq	(%r9,%r9,2), %rax
	leaq	(%rsi,%rax,4), %rcx
	leaq	(%rdi,%r9,4), %rdx
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [31,31,31,31]
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [992,992,992,992]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [31744,31744,31744,31744]
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rax,4), %xmm4
	movdqa	%xmm4, %xmm3
	pand	%xmm0, %xmm3
	movdqa	%xmm3, %xmm5
	pslld	$3, %xmm5
	psrld	$2, %xmm3
	por	%xmm5, %xmm3
	movdqa	%xmm4, %xmm5
	pand	%xmm1, %xmm5
	movdqa	%xmm5, %xmm6
	psrld	$2, %xmm6
	psrld	$7, %xmm5
	por	%xmm6, %xmm5
	pand	%xmm2, %xmm4
	movdqa	%xmm4, %xmm6
	psrld	$7, %xmm6
	psrld	$12, %xmm4
	por	%xmm6, %xmm4
	pshufd	$80, %xmm5, %xmm6               ## xmm6 = xmm5[0,0,1,1]
	pshufd	$68, %xmm3, %xmm7               ## xmm7 = xmm3[0,1,0,1]
	pblendw	$12, %xmm6, %xmm7               ## xmm7 = xmm7[0,1],xmm6[2,3],xmm7[4,5,6,7]
	pshufd	$68, %xmm4, %xmm6               ## xmm6 = xmm4[0,1,0,1]
	pblendw	$207, %xmm7, %xmm6              ## xmm6 = xmm7[0,1,2,3],xmm6[4,5],xmm7[6,7]
	pshufd	$165, %xmm5, %xmm7              ## xmm7 = xmm5[1,1,2,2]
	pblendw	$48, %xmm3, %xmm7               ## xmm7 = xmm7[0,1,2,3],xmm3[4,5],xmm7[6,7]
	pblendw	$12, %xmm4, %xmm7               ## xmm7 = xmm7[0,1],xmm4[2,3],xmm7[4,5,6,7]
	shufps	$255, %xmm5, %xmm3              ## xmm3 = xmm3[3,3],xmm5[3,3]
	pshufd	$238, %xmm4, %xmm4              ## xmm4 = xmm4[2,3,2,3]
	pblendw	$60, %xmm3, %xmm4               ## xmm4 = xmm4[0,1],xmm3[2,3,4,5],xmm4[6,7]
	movdqu	%xmm4, 32(%rsi)
	movdqu	%xmm7, 16(%rsi)
	movdqu	%xmm6, (%rsi)
	addq	$4, %rax
	addq	$48, %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	_rgb15tobgr24_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 rgb15tobgr24_c
lCPI0_0:
	.long	31                              ; 0x1f
	.long	992                             ; 0x3e0
lCPI0_1:
	.long	3                               ; 0x3
	.long	2                               ; 0x2
lCPI0_2:
	.long	4294967293                      ; 0xfffffffd
	.long	4294967294                      ; 0xfffffffe
lCPI0_3:
	.long	4294967294                      ; 0xfffffffe
	.long	4294967289                      ; 0xfffffff9
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_rgb15tobgr24_c:                        ; @rgb15tobgr24_c
	.cfi_startproc
; %bb.0:
	cmp	w2, #0
	cinc	w9, w2, lt
	cmp	w2, #2
	b.lt	LBB0_9
; %bb.1:
	sbfx	x8, x9, #1, #31
	add	x10, x0, x8, lsl #2
	add	x11, x0, #4
	cmp	x10, x11
	csel	x8, x10, x11, hi
	mvn	x12, x0
	add	x8, x8, x12
	cmp	x8, #60
	b.lo	LBB0_6
; %bb.2:
	cmp	x10, x11
	csel	x10, x10, x11, hi
	add	x10, x10, x12
	lsr	x10, x10, #2
	mov	w11, #12
	madd	x11, x10, x11, x1
	add	x11, x11, #12
	add	x10, x0, x10, lsl #2
	add	x10, x10, #4
	cmp	x10, x1
	ccmp	x11, x0, #0, hi
	b.hi	LBB0_6
; %bb.3:
	lsr	x8, x8, #2
	add	x11, x8, #1
	and	x12, x11, #0x7ffffffffffffff0
	mov	w8, #12
	madd	x8, x12, x8, x1
	add	x10, x0, x12, lsl #2
	add	x14, x1, #96
	add	x13, x0, #32
	movi.4s	v0, #31
	mov	w15, #992
	dup.4s	v1, w15
	movi.4s	v2, #124, lsl #8
	mov	x15, x12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q3, q4, [x13, #-32]
	and.16b	v5, v3, v0
	and.16b	v6, v4, v0
	ldp	q7, q16, [x13], #64
	and.16b	v17, v7, v0
	and.16b	v18, v16, v0
	shl.4s	v19, v5, #3
	shl.4s	v20, v6, #3
	shl.4s	v21, v17, #3
	shl.4s	v22, v18, #3
	ushr.4s	v5, v5, #2
	ushr.4s	v6, v6, #2
	ushr.4s	v17, v17, #2
	ushr.4s	v18, v18, #2
	orr.16b	v23, v19, v5
	and.16b	v5, v3, v1
	ushr.4s	v19, v5, #2
	ushr.4s	v5, v5, #7
	orr.16b	v24, v19, v5
	and.16b	v3, v3, v2
	ushr.4s	v5, v3, #7
	ushr.4s	v3, v3, #12
	orr.16b	v25, v5, v3
	orr.16b	v26, v20, v6
	and.16b	v3, v4, v1
	ushr.4s	v5, v3, #2
	ushr.4s	v3, v3, #7
	orr.16b	v27, v5, v3
	and.16b	v3, v4, v2
	ushr.4s	v4, v3, #7
	ushr.4s	v3, v3, #12
	orr.16b	v28, v4, v3
	orr.16b	v3, v21, v17
	and.16b	v6, v7, v1
	ushr.4s	v17, v6, #2
	ushr.4s	v6, v6, #7
	orr.16b	v4, v17, v6
	and.16b	v6, v7, v2
	ushr.4s	v7, v6, #7
	ushr.4s	v6, v6, #12
	orr.16b	v5, v7, v6
	orr.16b	v17, v22, v18
	and.16b	v6, v16, v1
	sub	x16, x14, #96
	sub	x17, x14, #48
	ushr.4s	v7, v6, #2
	ushr.4s	v6, v6, #7
	orr.16b	v18, v7, v6
	st3.4s	{ v23, v24, v25 }, [x16]
	st3.4s	{ v26, v27, v28 }, [x17]
	add	x16, x14, #192
	and.16b	v6, v16, v2
	ushr.4s	v7, v6, #7
	ushr.4s	v6, v6, #12
	orr.16b	v19, v7, v6
	st3.4s	{ v3, v4, v5 }, [x14], #48
	st3.4s	{ 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	x10, x0
LBB0_7:
	asr	w9, w9, #1
	add	x9, x0, w9, 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]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10], #4
	dup.2s	v4, w11
	and.8b	v4, v4, v0
	ushl.2s	v5, v4, v1
	ushl.2s	v6, v4, v2
	mov.s	v5[1], v6[1]
	ushl.2s	v4, v4, v3
	orr.8b	v4, v5, v4
	str	d4, [x8]
	and	w12, w11, #0x7c00
	lsr	w12, w12, #7
	bfxil	w12, w11, #12, #3
	str	w12, [x8, #8]
	add	x8, x8, #12
	cmp	x10, x9
	b.lo	LBB0_8
LBB0_9:
	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	_rgb15tobgr24_c
.subsections_via_symbols
