	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgb565_to_uyvy                 ## -- Begin function rgb565_to_uyvy
	.p2align	4, 0x90
_rgb565_to_uyvy:                        ## @rgb565_to_uyvy
	.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
	testl	%edx, %edx
	jle	LBB0_3
## %bb.1:
	movq	_yuv_u@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_yuv_v@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_yuv_ry@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	movq	_yuv_gy@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	movq	_yuv_by@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	addl	$2, %edx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzwl	(%rsi,%r15), %ebx
	movq	%rbx, %r12
	shrq	$11, %r12
	movzwl	2(%rsi,%r15), %eax
	movq	%rax, %r8
	shrq	$11, %r8
	movl	%eax, %r13d
	shrq	$4, %rax
	andl	$124, %eax
	movl	(%r11,%rax), %ecx
	addl	(%r10,%r8,4), %ecx
	movl	%ebx, %eax
	andl	$31, %eax
	andl	$31, %r13d
	shrq	$4, %rbx
	andl	$124, %ebx
	movl	(%r11,%rbx), %ebx
	addl	(%r10,%r12,4), %ebx
	addl	(%r14,%rax,4), %ebx
	sarl	$16, %ebx
	addl	(%r14,%r13,4), %ecx
	sarl	$16, %ecx
	subl	%ebx, %eax
	subl	%ebx, %r12d
	imull	$219, %ebx, %ebx
	movslq	%ebx, %rbx
	movq	%rdi, %r8
	imulq	$-2078209981, %rbx, %rdi        ## imm = 0x84210843
	shrq	$32, %rdi
	addl	%edi, %ebx
	movl	%ebx, %edi
	shrl	$31, %edi
	shrl	$4, %ebx
	addl	%edi, %ebx
	imull	$219, %ecx, %ecx
	movslq	%ecx, %rcx
	imulq	$-2078209981, %rcx, %rdi        ## imm = 0x84210843
	shrq	$32, %rdi
	addl	%edi, %ecx
	movl	%ecx, %edi
	shrl	$31, %edi
	shrl	$4, %ecx
	addl	%edi, %ecx
	movslq	%r12d, %rdi
	movzbl	32(%r9,%rdi), %edi
	shll	$24, %ecx
	shll	$16, %edi
	leal	(%rcx,%rdi), %r12d
	addl	$268435456, %r12d               ## imm = 0x10000000
	movq	%r8, %rdi
	cltq
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movzbl	32(%rcx,%rax), %eax
	shll	$8, %ebx
	addl	%ebx, %eax
	addl	$4096, %eax                     ## imm = 0x1000
	orl	%r12d, %eax
	movl	%eax, (%r8,%r15)
	addl	$-2, %edx
	addq	$4, %r15
	cmpl	$2, %edx
	ja	LBB0_2
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_yuv_u,8,3                      ## @yuv_u
	.comm	_yuv_v,8,3                      ## @yuv_v
	.comm	_yuv_ry,8,3                     ## @yuv_ry
	.comm	_yuv_gy,8,3                     ## @yuv_gy
	.comm	_yuv_by,8,3                     ## @yuv_by
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rgb565_to_uyvy                 ; -- Begin function rgb565_to_uyvy
	.p2align	2
_rgb565_to_uyvy:                        ; @rgb565_to_uyvy
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	cmp	w2, #1
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _yuv_u@GOTPAGE
Lloh1:
	ldr	x8, [x8, _yuv_u@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, #32
Lloh3:
	adrp	x9, _yuv_v@GOTPAGE
Lloh4:
	ldr	x9, [x9, _yuv_v@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _yuv_ry@GOTPAGE
Lloh7:
	ldr	x10, [x10, _yuv_ry@GOTPAGEOFF]
	add	x9, x9, #32
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x11, _yuv_gy@GOTPAGE
Lloh10:
	ldr	x11, [x11, _yuv_gy@GOTPAGEOFF]
Lloh11:
	adrp	x12, _yuv_by@GOTPAGE
Lloh12:
	ldr	x12, [x12, _yuv_by@GOTPAGEOFF]
Lloh13:
	ldr	x11, [x11]
Lloh14:
	ldr	x12, [x12]
	add	w13, w2, #2
	mov	w14, #219
	mov	w15, #2115
	movk	w15, #33825, lsl #16
	mov	w16, #268435456
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrh	w17, [x1]
	lsr	x2, x17, #11
	ubfx	x3, x17, #6, #5
	and	x17, x17, #0x1f
	ldrh	w4, [x1, #2]
	lsr	x5, x4, #9
	and	x5, x5, #0x7c
	ubfx	x6, x4, #6, #5
	and	x4, x4, #0x1f
	ldr	w7, [x10, x2, lsl #2]
	ldr	w3, [x11, x3, lsl #2]
	ldr	w19, [x12, x17, lsl #2]
	add	w3, w3, w7
	add	w3, w3, w19
	ldr	w5, [x10, x5]
	ldr	w6, [x11, x6, lsl #2]
	asr	w7, w3, #16
	ldr	w4, [x12, x4, lsl #2]
	add	w5, w6, w5
	add	w4, w5, w4
	sbfx	x3, x3, #16, #16
	sub	x17, x17, x3
	ldrb	w17, [x8, x17]
	sub	x2, x2, x3
	ldrb	w2, [x9, x2]
	asr	w3, w4, #16
	mul	w4, w7, w14
	smull	x5, w4, w15
	lsr	x5, x5, #32
	add	w4, w5, w4
	lsr	w5, w4, #4
	add	w4, w5, w4, lsr #31
	mul	w3, w3, w14
	smull	x5, w3, w15
	lsr	x5, x5, #32
	add	w3, w5, w3
	lsr	w5, w3, #4
	add	w3, w5, w3, lsr #31
	lsl	w2, w2, #16
	bfi	w2, w3, #24, #8
	bfi	w17, w4, #8, #24
	add	w17, w17, #1, lsl #12           ; =4096
	add	w2, w2, w16
	orr	w17, w17, w2
	str	w17, [x0], #4
	sub	w13, w13, #2
	add	x1, x1, #4
	cmp	w13, #2
	b.hi	LBB0_2
LBB0_3:
	ldp	x20, x19, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_yuv_u,8,3                      ; @yuv_u
	.comm	_yuv_v,8,3                      ; @yuv_v
	.comm	_yuv_ry,8,3                     ; @yuv_ry
	.comm	_yuv_gy,8,3                     ; @yuv_gy
	.comm	_yuv_by,8,3                     ; @yuv_by
.subsections_via_symbols
