	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function planar2x_c
LCPI0_0:
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.long	3                               ## 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_planar2x_c:                            ## @planar2x_c
	.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	%ecx, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movl	(%rdi), %eax
	movl	%eax, (%rsi)
	leal	-1(%rdx), %ebx
	movq	%rdx, %rax
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$2, %edx
	jl	LBB0_10
## %bb.1:
	movl	%ebx, %eax
	cmpl	$4, %ebx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_3:
	leaq	4(%rsi), %rcx
	leaq	(%rdi,%rax,4), %rdx
	addq	$4, %rdx
	cmpq	%rdx, %rcx
	jae	LBB0_6
## %bb.4:
	leaq	(%rsi,%rax,8), %rcx
	addq	$4, %rcx
	cmpq	%rdi, %rcx
	jbe	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %ecx
	andl	$-4, %ecx
	xorl	%edx, %edx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [3,3,3,3]
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdi,%rdx,4), %xmm1
	movdqu	4(%rdi,%rdx,4), %xmm2
	movdqa	%xmm1, %xmm3
	pmulld	%xmm0, %xmm3
	paddd	%xmm2, %xmm3
	psrad	$2, %xmm3
	pmulld	%xmm0, %xmm2
	paddd	%xmm1, %xmm2
	psrad	$2, %xmm2
	movdqa	%xmm3, %xmm1
	punpckldq	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
	punpckhdq	%xmm2, %xmm3            ## xmm3 = xmm3[2],xmm2[2],xmm3[3],xmm2[3]
	movdqu	%xmm3, 20(%rsi,%rdx,8)
	movdqu	%xmm1, 4(%rsi,%rdx,8)
	addq	$4, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_7
## %bb.8:
	cmpq	%rax, %rcx
	je	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rcx,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	4(%rdi,%rcx,4), %edx
	sarl	$2, %edx
	movl	%edx, 4(%rsi,%rcx,8)
	movl	4(%rdi,%rcx,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%rdi,%rcx,4), %edx
	sarl	$2, %edx
	movl	%edx, 8(%rsi,%rcx,8)
	leaq	1(%rcx), %rdx
	movq	%rdx, %rcx
	cmpq	%rdx, %rax
	jne	LBB0_9
LBB0_10:
	movslq	%ebx, %r14
	movl	(%rdi,%r14,4), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %ecx
	movslq	%ecx, %rdx
	movl	%eax, -4(%rsi,%rdx,4)
	decq	%rdx
	movslq	%r9d, %r9
	leaq	(%rsi,%r9,4), %rax
	cmpl	$2, -44(%rbp)                   ## 4-byte Folded Reload
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	jl	LBB0_11
## %bb.12:
	movslq	%r8d, %r13
	leal	(%rbx,%r13), %ecx
	movslq	%ecx, %r8
	leal	(%rdx,%r9), %ecx
	movslq	%ecx, %r15
	leal	(%r9,%r9), %ecx
	movslq	%ecx, %r12
	movl	%ebx, %ebx
	leaq	(%rdi,%r13,4), %r10
	addq	$4, %r10
	shlq	$2, %r13
	shlq	$2, %r12
	leaq	(%rsi,%r9,8), %r11
	addq	$8, %r11
	shlq	$2, %rbx
	movl	$1, %ecx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	(%rdi,%r14,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%rdi,%r8,4), %edx
	sarl	$2, %edx
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%edx, (%rax,%rsi,4)
	movl	(%rdi,%r8,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%rdi,%r14,4), %edx
	leaq	(%rdi,%r13), %rsi
	sarl	$2, %edx
	movl	%edx, (%rax,%r15,4)
	addq	%r12, %rax
	incl	%ecx
	addq	%r13, %r10
	addq	%r12, %r11
	movq	%rsi, %rdi
	cmpl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	je	LBB0_17
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movl	(%rdi), %esi
	leal	(%rsi,%rsi,2), %esi
	addl	(%rdi,%r13), %esi
	sarl	$2, %esi
	movl	%esi, (%rax)
	movl	(%rdi,%r13), %esi
	leal	(%rsi,%rsi,2), %esi
	addl	(%rdi), %esi
	sarl	$2, %esi
	movl	%esi, (%rax,%r9,4)
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi,%rsi), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%r10,%rsi), %edx
	sarl	$2, %edx
	movl	%edx, 4(%rax,%rsi,2)
	movl	(%r10,%rsi), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%rdi,%rsi), %edx
	sarl	$2, %edx
	movl	%edx, (%r11,%rsi,2)
	movl	-4(%r10,%rsi), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	4(%rdi,%rsi), %edx
	sarl	$2, %edx
	movl	%edx, -4(%r11,%rsi,2)
	movl	4(%rdi,%rsi), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	-4(%r10,%rsi), %edx
	sarl	$2, %edx
	movl	%edx, 8(%rax,%rsi,2)
	addq	$4, %rsi
	cmpq	%rsi, %rbx
	jne	LBB0_15
	jmp	LBB0_16
LBB0_11:
	movq	%rdi, %rsi
LBB0_17:
	movl	(%rsi), %ecx
	movl	%ecx, (%rax)
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_27
## %bb.18:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, %ecx
	cmpl	$4, %edx
	jae	LBB0_20
## %bb.19:
	xorl	%edi, %edi
	jmp	LBB0_26
LBB0_20:
	leaq	4(%rax), %rdx
	leaq	(%rsi,%rcx,4), %rdi
	addq	$4, %rdi
	cmpq	%rdi, %rdx
	jae	LBB0_23
## %bb.21:
	leaq	(%rax,%rcx,8), %rdx
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jae	LBB0_23
## %bb.22:
	xorl	%edi, %edi
	jmp	LBB0_26
LBB0_23:
	movl	%ecx, %edi
	andl	$-4, %edi
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [3,3,3,3]
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rbx,4), %xmm1
	movdqu	4(%rsi,%rbx,4), %xmm2
	movdqa	%xmm1, %xmm3
	pmulld	%xmm0, %xmm3
	paddd	%xmm2, %xmm3
	psrad	$2, %xmm3
	pmulld	%xmm0, %xmm2
	paddd	%xmm1, %xmm2
	psrad	$2, %xmm2
	movdqa	%xmm3, %xmm1
	punpckldq	%xmm2, %xmm1            ## xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
	punpckhdq	%xmm2, %xmm3            ## xmm3 = xmm3[2],xmm2[2],xmm3[3],xmm2[3]
	movdqu	%xmm3, 20(%rax,%rbx,8)
	movdqu	%xmm1, 4(%rax,%rbx,8)
	addq	$4, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_24
## %bb.25:
	cmpq	%rcx, %rdi
	je	LBB0_27
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rdi,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	4(%rsi,%rdi,4), %edx
	sarl	$2, %edx
	movl	%edx, 4(%rax,%rdi,8)
	movl	4(%rsi,%rdi,4), %edx
	leal	(%rdx,%rdx,2), %edx
	addl	(%rsi,%rdi,4), %edx
	sarl	$2, %edx
	movl	%edx, 8(%rax,%rdi,8)
	leaq	1(%rdi), %rdx
	movq	%rdx, %rdi
	cmpq	%rdx, %rcx
	jne	LBB0_26
LBB0_27:
	movl	(%rsi,%r14,4), %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, (%rax,%rdx,4)
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_planar2x_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function planar2x_c
_planar2x_c:                            ; @planar2x_c
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	.cfi_offset w25, -56
	.cfi_offset w26, -64
                                        ; kill: def $w5 killed $w5 def $x5
                                        ; kill: def $w4 killed $w4 def $x4
	ldr	w8, [x0]
	str	w8, [x1]
	sub	w8, w2, #1
	cmp	w2, #2
	b.lt	LBB0_9
; %bb.1:
	cmp	w8, #8
	b.lo	LBB0_6
; %bb.2:
	add	x9, x1, #4
	add	x10, x1, x8, lsl #3
	add	x10, x10, #4
	add	x11, x0, x8, lsl #2
	add	x11, x11, #4
	cmp	x9, x11
	ccmp	x10, x0, #0, lo
	b.hi	LBB0_6
; %bb.3:
	and	x9, x8, #0xfffffff8
	add	x10, x1, #36
	add	x11, x0, #20
	movi.4s	v0, #3
	mov	x12, x9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	q1, [x11, #-20]
	ldur	q2, [x11, #-4]
	ldp	q3, q4, [x11, #-16]
	mov.16b	v5, v3
	mla.4s	v5, v1, v0
	mov.16b	v6, v4
	mla.4s	v6, v2, v0
	sshr.4s	v16, v5, #2
	mla.4s	v1, v3, v0
	sshr.4s	v17, v1, #2
	sshr.4s	v5, v6, #2
	sub	x13, x10, #32
	st2.4s	{ v16, v17 }, [x13]
	mla.4s	v2, v4, v0
	sshr.4s	v6, v2, #2
	st2.4s	{ v5, v6 }, [x10]
	add	x10, x10, #64
	add	x11, x11, #32
	subs	x12, x12, #8
	b.ne	LBB0_4
; %bb.5:
	cmp	x9, x8
	b.ne	LBB0_7
	b	LBB0_9
LBB0_6:
	mov	x9, #0
LBB0_7:
	add	x10, x0, x9, lsl #2
	add	x10, x10, #4
	sub	x11, x8, x9
	add	x9, x1, x9, lsl #3
	add	x9, x9, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w12, w13, [x10, #-4]
	add	w12, w12, w12, lsl #1
	add	w12, w12, w13
	asr	w12, w12, #2
	stur	w12, [x9, #-4]
	ldp	w12, w13, [x10, #-4]
	add	w13, w13, w13, lsl #1
	add	w12, w13, w12
	asr	w12, w12, #2
	str	w12, [x9], #8
	add	x10, x10, #4
	subs	x11, x11, #1
	b.ne	LBB0_8
LBB0_9:
	mov	x9, x8
	sxtw	x9, w9
	ldr	w11, [x0, w8, sxtw #2]
	lsl	w10, w2, #1
	sub	w12, w10, #1
	sxtw	x10, w12
	str	w11, [x1, w12, sxtw #2]
	add	x11, x1, w5, sxtw #2
	cmp	w3, #2
	b.lt	LBB0_15
; %bb.10:
	sxtw	x13, w5
	sxtw	x14, w4
	add	w12, w8, w4
	sxtw	x12, w12
	add	w15, w10, w5
	sxtw	x15, w15
	lsl	w5, w5, #1
	lsl	x16, x8, #3
	sbfiz	x17, x4, #2, #32
	add	x4, x0, #4
	add	x1, x1, x13, lsl #3
	add	x1, x1, #4
	sbfiz	x5, x5, #2, #32
	mov	w6, #1
	lsl	x7, x12, #2
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	lsl	x19, x9, #2
	ldr	w20, [x0, x19]
	add	w20, w20, w20, lsl #1
	ldr	w21, [x0, x7]
	add	w20, w20, w21
	asr	w20, w20, #2
	str	w20, [x11, x10, lsl #2]
	ldr	w19, [x0, x19]
	ldr	w0, [x0, x7]
	add	w0, w0, w0, lsl #1
	add	w0, w0, w19
	asr	w0, w0, #2
	str	w0, [x11, x15, lsl #2]
	add	x11, x11, x5
	add	w6, w6, #1
	add	x4, x4, x17
	add	x1, x1, x5
	mov	x0, x12
	cmp	w6, w3
	b.eq	LBB0_16
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	w12, [x0]
	add	w19, w12, w12, lsl #1
	add	x12, x0, x14, lsl #2
	ldr	w20, [x12]
	add	w19, w19, w20
	asr	w19, w19, #2
	str	w19, [x11]
	ldr	w19, [x0]
	ldr	w20, [x12]
	add	w20, w20, w20, lsl #1
	add	w19, w20, w19
	asr	w19, w19, #2
	str	w19, [x11, x13, lsl #2]
	cmp	w2, #2
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x19, #0
	mov	x20, x4
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w21, [x20, #-4]
	add	w21, w21, w21, lsl #1
	add	x22, x20, x17
	ldr	w23, [x22]
	add	w21, w21, w23
	asr	w21, w21, #2
	add	x23, x11, x19
	str	w21, [x23, #4]
	ldur	w21, [x20, #-4]
	ldr	w24, [x22]
	add	w24, w24, w24, lsl #1
	add	w21, w24, w21
	asr	w21, w21, #2
	add	x24, x1, x19
	str	w21, [x24, #4]
	ldr	w21, [x20]
	ldur	w25, [x22, #-4]
	add	w25, w25, w25, lsl #1
	add	w21, w25, w21
	asr	w21, w21, #2
	str	w21, [x24]
	ldr	w21, [x20], #4
	add	w21, w21, w21, lsl #1
	ldur	w22, [x22, #-4]
	add	w21, w21, w22
	asr	w21, w21, #2
	str	w21, [x23, #8]
	add	x19, x19, #8
	cmp	x16, x19
	b.ne	LBB0_14
	b	LBB0_11
LBB0_15:
	mov	x12, x0
LBB0_16:
	ldr	w13, [x12]
	str	w13, [x11]
	cmp	w2, #2
	b.lt	LBB0_23
; %bb.17:
	cmp	w8, #8
	b.lo	LBB0_20
; %bb.18:
	add	x13, x11, #4
	add	x14, x12, x8, lsl #2
	add	x14, x14, #4
	cmp	x13, x14
	b.hs	LBB0_24
; %bb.19:
	add	x13, x11, x8, lsl #3
	add	x13, x13, #4
	cmp	x12, x13
	b.hs	LBB0_24
LBB0_20:
	mov	x13, #0
LBB0_21:
	add	x14, x12, x13, lsl #2
	add	x14, x14, #4
	sub	x8, x8, x13
	add	x13, x11, x13, lsl #3
	add	x13, x13, #8
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldp	w15, w16, [x14, #-4]
	add	w15, w15, w15, lsl #1
	add	w15, w15, w16
	asr	w15, w15, #2
	stur	w15, [x13, #-4]
	ldp	w15, w16, [x14, #-4]
	add	w16, w16, w16, lsl #1
	add	w15, w16, w15
	asr	w15, w15, #2
	str	w15, [x13], #8
	add	x14, x14, #4
	subs	x8, x8, #1
	b.ne	LBB0_22
LBB0_23:
	ldr	w8, [x12, x9, lsl #2]
	str	w8, [x11, x10, lsl #2]
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_24:
	and	x13, x8, #0xfffffff8
	add	x14, x11, #36
	add	x15, x12, #20
	movi.4s	v0, #3
	mov	x16, x13
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldur	q1, [x15, #-20]
	ldur	q2, [x15, #-4]
	ldp	q3, q4, [x15, #-16]
	mov.16b	v5, v3
	mla.4s	v5, v1, v0
	mov.16b	v6, v4
	mla.4s	v6, v2, v0
	sshr.4s	v16, v5, #2
	mla.4s	v1, v3, v0
	sshr.4s	v17, v1, #2
	sshr.4s	v5, v6, #2
	sub	x17, x14, #32
	st2.4s	{ v16, v17 }, [x17]
	mla.4s	v2, v4, v0
	sshr.4s	v6, v2, #2
	st2.4s	{ v5, v6 }, [x14]
	add	x14, x14, #64
	add	x15, x15, #32
	subs	x16, x16, #8
	b.ne	LBB0_25
; %bb.26:
	cmp	x13, x8
	b.eq	LBB0_23
	b	LBB0_21
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_planar2x_c
.subsections_via_symbols
