	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_texture_color_convert    ## -- Begin function image_texture_color_convert
	.p2align	4, 0x90
_image_texture_color_convert:           ## @image_texture_color_convert
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r9d
	movl	%edx, %r14d
	movl	%esi, %r11d
	movl	%edi, %r10d
	testl	%edx, %edx
	jne	LBB0_4
## %bb.1:
	cmpl	$8, %r11d
	jne	LBB0_4
## %bb.2:
	cmpl	$16, %r10d
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	cmpl	$24, %r9d
	je	LBB0_11
LBB0_4:
	movq	8(%r8), %r15
	imulq	(%r8), %r15
	movl	$1, %eax
	testq	%r15, %r15
	je	LBB0_11
## %bb.5:
	movq	16(%r8), %r8
	cmpq	$4, %r15
	jae	LBB0_8
## %bb.6:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_8:
	movq	%r15, %r12
	andq	$-4, %r12
	movd	%r9d, %xmm0
	movd	%r10d, %xmm1
	movd	%r11d, %xmm2
	movd	%r14d, %xmm3
	xorl	%ecx, %ecx
	pmovzxdq	%xmm0, %xmm8                    ## xmm8 = xmm0[0],zero,xmm0[1],zero
	pmovzxdq	%xmm1, %xmm9                    ## xmm9 = xmm1[0],zero,xmm1[1],zero
	pmovzxdq	%xmm2, %xmm10                   ## xmm10 = xmm2[0],zero,xmm2[1],zero
	pmovzxdq	%xmm3, %xmm11                   ## xmm11 = xmm3[0],zero,xmm3[1],zero
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%r8,%rcx,8), %xmm7
	movdqu	16(%r8,%rcx,8), %xmm0
	movdqa	%xmm7, %xmm4
	psrlq	$24, %xmm4
	movdqa	%xmm0, %xmm5
	psrlq	$24, %xmm5
	pshufd	$232, %xmm4, %xmm1              ## xmm1 = xmm4[0,2,2,3]
	pshufd	$232, %xmm5, %xmm2              ## xmm2 = xmm5[0,2,2,3]
	movdqa	%xmm7, %xmm4
	psrlq	$16, %xmm4
	movdqa	%xmm0, %xmm5
	psrlq	$16, %xmm5
	pshufd	$232, %xmm4, %xmm3              ## xmm3 = xmm4[0,2,2,3]
	pshufd	$232, %xmm5, %xmm5              ## xmm5 = xmm5[0,2,2,3]
	pshufd	$232, %xmm7, %xmm4              ## xmm4 = xmm7[0,2,2,3]
	psrlq	$8, %xmm7
	pshufd	$232, %xmm0, %xmm6              ## xmm6 = xmm0[0,2,2,3]
	psrlq	$8, %xmm0
	pshufd	$232, %xmm7, %xmm7              ## xmm7 = xmm7[0,2,2,3]
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	pslld	%xmm8, %xmm1
	pslld	%xmm8, %xmm2
	pslld	%xmm9, %xmm3
	pslld	%xmm9, %xmm5
	pslld	%xmm10, %xmm7
	pslld	%xmm10, %xmm0
	por	%xmm1, %xmm7
	por	%xmm2, %xmm0
	pslld	%xmm11, %xmm4
	por	%xmm3, %xmm4
	por	%xmm7, %xmm4
	pslld	%xmm11, %xmm6
	por	%xmm5, %xmm6
	por	%xmm0, %xmm6
	pmovzxdq	%xmm4, %xmm0                    ## xmm0 = xmm4[0],zero,xmm4[1],zero
	pmovzxdq	%xmm6, %xmm1                    ## xmm1 = xmm6[0],zero,xmm6[1],zero
	movdqu	%xmm0, (%r8,%rcx,8)
	movdqu	%xmm1, 16(%r8,%rcx,8)
	addq	$4, %rcx
	cmpq	%rcx, %r12
	jne	LBB0_9
	jmp	LBB0_10
LBB0_7:
	movq	(%r8,%r12,8), %rdx
	movq	%rdx, %rbx
	shrq	$24, %rbx
	movq	%rdx, %rsi
	shrq	$16, %rsi
	movq	%rdx, %rdi
	movl	%r9d, %ecx
	shll	%cl, %ebx
	shrq	$8, %rdi
	movl	%r10d, %ecx
	shll	%cl, %esi
	movl	%r11d, %ecx
	shll	%cl, %edi
	orl	%ebx, %edi
	movl	%r14d, %ecx
	shll	%cl, %edx
	orl	%esi, %edx
	orl	%edi, %edx
	movq	%rdx, (%r8,%r12,8)
	incq	%r12
LBB0_10:
	cmpq	%r12, %r15
	jne	LBB0_7
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_image_texture_color_convert    ; -- Begin function image_texture_color_convert
	.p2align	2
_image_texture_color_convert:           ; @image_texture_color_convert
	.cfi_startproc
; %bb.0:
	cbnz	w2, LBB0_5
; %bb.1:
	cmp	w1, #8
	b.ne	LBB0_5
; %bb.2:
	cmp	w0, #16
	b.ne	LBB0_5
; %bb.3:
	cmp	w3, #24
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	ret
LBB0_5:
	ldp	x8, x9, [x4]
	mul	x8, x9, x8
	cbz	x8, LBB0_13
; %bb.6:
	ldr	x9, [x4, #16]
	cmp	x8, #8
	b.hs	LBB0_8
; %bb.7:
	mov	x10, #0
	b	LBB0_11
LBB0_8:
	and	x10, x8, #0xfffffffffffffff8
	dup.2s	v0, w3
	dup.2s	v1, w0
	dup.2s	v2, w1
	dup.2s	v3, w2
	add	x11, x9, #32
	mov	x12, x10
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	shrn.2s	v6, v4, #24
	shrn.2s	v7, v5, #24
	ldp	q16, q17, [x11]
	shrn.2s	v18, v16, #24
	shrn.2s	v19, v17, #24
	shrn.2s	v20, v4, #16
	shrn.2s	v21, v5, #16
	shrn.2s	v22, v16, #16
	shrn.2s	v23, v17, #16
	shrn.2s	v24, v4, #8
	shrn.2s	v25, v5, #8
	shrn.2s	v26, v16, #8
	shrn.2s	v27, v17, #8
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v16, v16
	xtn.2s	v17, v17
	ushl.2s	v6, v6, v0
	ushl.2s	v7, v7, v0
	ushl.2s	v18, v18, v0
	ushl.2s	v19, v19, v0
	ushl.2s	v20, v20, v1
	ushl.2s	v21, v21, v1
	ushl.2s	v22, v22, v1
	ushl.2s	v23, v23, v1
	ushl.2s	v24, v24, v2
	ushl.2s	v25, v25, v2
	ushl.2s	v26, v26, v2
	ushl.2s	v27, v27, v2
	ushl.2s	v4, v4, v3
	ushl.2s	v5, v5, v3
	ushl.2s	v16, v16, v3
	ushl.2s	v17, v17, v3
	orr.8b	v4, v20, v4
	orr.8b	v5, v21, v5
	orr.8b	v16, v22, v16
	orr.8b	v17, v23, v17
	orr.8b	v4, v4, v6
	orr.8b	v5, v5, v7
	orr.8b	v6, v16, v18
	orr.8b	v7, v17, v19
	orr.8b	v4, v4, v24
	orr.8b	v5, v5, v25
	orr.8b	v6, v6, v26
	orr.8b	v7, v7, v27
	ushll.2d	v4, v4, #0
	ushll.2d	v5, v5, #0
	ushll.2d	v6, v6, #0
	stp	q4, q5, [x11, #-32]
	ushll.2d	v4, v7, #0
	stp	q6, q4, [x11], #64
	subs	x12, x12, #8
	b.ne	LBB0_9
; %bb.10:
	cmp	x8, x10
	b.eq	LBB0_13
LBB0_11:
	sub	x8, x8, x10
	add	x9, x9, x10, lsl #3
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	lsr	x11, x10, #24
	lsr	x12, x10, #16
	lsr	x13, x10, #8
	lsl	w11, w11, w3
	lsl	w12, w12, w0
	lsl	w13, w13, w1
	lsl	w10, w10, w2
	orr	w10, w12, w10
	orr	w10, w10, w11
	orr	w10, w10, w13
	str	x10, [x9], #8
	subs	x8, x8, #1
	b.ne	LBB0_12
LBB0_13:
	mov	w0, #1
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
