	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ivi_output_plane
LCPI0_0:
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_ivi_output_plane:                      ## @ivi_output_plane
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.1:
	cmpl	$0, (%rdi)
	jle	LBB0_22
## %bb.2:
	movslq	8(%rax), %rax
	movslq	%edx, %rcx
	shlq	$2, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	-72(%rbp), %r12                 ## 8-byte Folded Reload
	addq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	incq	%r14
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	cmpl	(%rdi), %r14d
	jge	LBB0_22
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_15 Depth 2
                                        ##     Child Loop BB0_17 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movl	4(%rdi), %r13d
	testl	%r13d, %r13d
	jle	LBB0_21
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	cmpl	$8, %r13d
	jb	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	imulq	%r14, %rcx
	addq	-48(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	imulq	%r14, %rdx
	addq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	subq	%rcx, %rdx
	movl	$0, %ecx
	cmpq	$32, %rdx
	movdqa	LCPI0_0(%rip), %xmm4            ## xmm4 = [128,128,128,128]
	jb	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r13d, %eax
	andl	$-8, %eax
	leaq	-8(%rax), %rdx
	movq	%rdx, %rcx
	shrq	$3, %rcx
	incq	%rcx
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rsi
	andq	$-2, %rsi
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%r12,%rdx,4), %xmm2
	movdqu	16(%r12,%rdx,4), %xmm3
	paddd	%xmm4, %xmm2
	paddd	%xmm4, %xmm3
	movdqu	%xmm2, (%r15,%rdx,4)
	movdqu	%xmm3, 16(%r15,%rdx,4)
	por	%xmm0, %xmm2
	por	%xmm1, %xmm3
	movdqu	32(%r12,%rdx,4), %xmm0
	movdqu	48(%r12,%rdx,4), %xmm1
	paddd	%xmm4, %xmm0
	paddd	%xmm4, %xmm1
	movdqu	%xmm0, 32(%r15,%rdx,4)
	movdqu	%xmm1, 48(%r15,%rdx,4)
	por	%xmm2, %xmm0
	por	%xmm3, %xmm1
	addq	$16, %rdx
	addq	$-2, %rsi
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %cl
	je	LBB0_13
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movdqu	(%r12,%rdx,4), %xmm2
	movdqu	16(%r12,%rdx,4), %xmm3
	paddd	%xmm4, %xmm2
	paddd	%xmm4, %xmm3
	movdqu	%xmm2, (%r15,%rdx,4)
	movdqu	%xmm3, 16(%r15,%rdx,4)
	por	%xmm2, %xmm0
	por	%xmm3, %xmm1
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	por	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	por	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	por	%xmm1, %xmm0
	movd	%xmm0, %ecx
	cmpq	%r13, %rax
	jne	LBB0_14
	jmp	LBB0_18
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdx
	notq	%rdx
	addq	%r13, %rdx
	movq	%r13, %rsi
	andq	$3, %rsi
	je	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rax,4), %edi
	subl	$-128, %edi
	movl	%edi, (%r15,%rax,4)
	orl	%edi, %ecx
	incq	%rax
	decq	%rsi
	jne	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$3, %rdx
	jb	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rax,4), %edx
	subl	$-128, %edx
	movl	%edx, (%r15,%rax,4)
	orl	%ecx, %edx
	movl	4(%r12,%rax,4), %ecx
	subl	$-128, %ecx
	movl	%ecx, 4(%r15,%rax,4)
	movl	8(%r12,%rax,4), %esi
	subl	$-128, %esi
	movl	%esi, 8(%r15,%rax,4)
	orl	%ecx, %esi
	orl	%edx, %esi
	movl	12(%r12,%rax,4), %ecx
	subl	$-128, %ecx
	movl	%ecx, 12(%r15,%rax,4)
	orl	%esi, %ecx
	addq	$4, %rax
	cmpq	%rax, %r13
	jne	LBB0_17
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$256, %ecx                      ## imm = 0x100
	jb	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	subl	$-128, %edi
	callq	_av_clip_uint8
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_20
	jmp	LBB0_21
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	testb	$1, %cl
	jne	LBB0_12
	jmp	LBB0_13
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ivi_output_plane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivi_output_plane
_ivi_output_plane:                      ; @ivi_output_plane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
                                        ; kill: def $w2 killed $w2 def $x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	cbz	x21, LBB0_14
; %bb.1:
	mov	x20, x0
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.2:
	mov	x22, #0
	ldrsw	x8, [x8, #8]
	sbfiz	x23, x2, #2, #32
	lsl	x24, x8, #2
	mov	x25, x21
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldr	w8, [x20]
	add	x26, x26, x23
	add	x25, x25, x24
	cmp	w22, w8
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	ldr	w27, [x20, #4]
	cmp	w27, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #0
	mov	x8, #0
	cmp	w27, #16
	b.lo	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x10, x24, x22, x21
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
	madd	x11, x23, x22, x11
	sub	x10, x11, x10
	cmp	x10, #64
	b.lo	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x9, #0
	and	x8, x27, #0xfffffff0
	lsl	x10, x27, #2
	and	x10, x10, #0x3ffffffc0
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.4s	v16, #128
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x11, x25, x9
	ldp	q4, q5, [x11]
	ldp	q6, q7, [x11, #32]
	add.4s	v4, v4, v16
	add.4s	v5, v5, v16
	add.4s	v6, v6, v16
	add.4s	v7, v7, v16
	add	x11, x26, x9
	stp	q4, q5, [x11]
	stp	q6, q7, [x11, #32]
	orr.16b	v0, v4, v0
	orr.16b	v1, v5, v1
	orr.16b	v2, v6, v2
	orr.16b	v3, v7, v3
	add	x9, x9, #64
	cmp	x10, x9
	b.ne	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	orr.16b	v0, v1, v0
	orr.16b	v0, v2, v0
	orr.16b	v0, v3, v0
	ext.16b	v1, v0, v0, #8
	orr.8b	v0, v0, v1
	fmov	w9, s0
	mov.s	w10, v0[1]
	orr	w9, w9, w10
	cmp	x8, x27
	b.eq	LBB0_11
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x10, x8, #2
	ldr	w11, [x25, x10]
	add	w11, w11, #128
	str	w11, [x26, x10]
	orr	w9, w11, w9
	add	x8, x8, #1
	cmp	x27, x8
	b.ne	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #256
	b.lo	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x19, x28, #2
	ldr	w8, [x25, x19]
	add	w0, w8, #128
	bl	_av_clip_uint8
	str	w0, [x26, x19]
	add	x28, x28, #1
	cmp	x27, x28
	b.ne	LBB0_13
	b	LBB0_3
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ivi_output_plane
.subsections_via_symbols
