	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_add_png_paeth_prediction    ## -- Begin function ff_add_png_paeth_prediction
	.p2align	4, 0x90
_ff_add_png_paeth_prediction:           ## @ff_add_png_paeth_prediction
	.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	%ecx, %ecx
	jle	LBB0_17
## %bb.1:
	movslq	%r8d, %r8
	movl	%ecx, %r14d
	cmpl	$4, %ecx
	jae	LBB0_3
## %bb.2:
	xorl	%r9d, %r9d
	jmp	LBB0_13
LBB0_3:
	leaq	(,%r8,4), %r15
	movq	%r15, %rcx
	subq	%rdx, %rcx
	addq	%rdi, %rcx
	xorl	%r9d, %r9d
	cmpq	$16, %rcx
	jb	LBB0_13
## %bb.4:
	movq	%rdi, %rax
	subq	%rdx, %rax
	cmpq	$16, %rax
	jb	LBB0_13
## %bb.5:
	movq	%rdi, %rbx
	subq	%rsi, %rbx
	cmpq	$16, %rbx
	jb	LBB0_13
## %bb.6:
	cmpq	$16, %r15
	jb	LBB0_13
## %bb.7:
	cmpq	$16, %rax
	jb	LBB0_13
## %bb.8:
	cmpq	$16, %rcx
	jb	LBB0_13
## %bb.9:
	cmpq	$16, %rbx
	jb	LBB0_13
## %bb.10:
	movl	%r14d, %r9d
	andl	$-4, %r9d
	movq	%rdx, %r10
	subq	%r15, %r10
	movq	%rdi, %r11
	subq	%r15, %r11
	leaq	(,%r14,4), %rcx
	andq	$-16, %rcx
	xorl	%eax, %eax
	pcmpeqd	%xmm8, %xmm8
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r11,%rax), %xmm3
	movdqu	(%rdx,%rax), %xmm5
	movdqu	(%r10,%rax), %xmm4
	movdqa	%xmm5, %xmm0
	psubd	%xmm4, %xmm0
	movdqa	%xmm3, %xmm1
	psubd	%xmm4, %xmm1
	pabsd	%xmm0, %xmm2
	pabsd	%xmm1, %xmm7
	paddd	%xmm0, %xmm1
	pabsd	%xmm1, %xmm0
	movdqa	%xmm2, %xmm6
	pminud	%xmm7, %xmm6
	pcmpeqd	%xmm2, %xmm6
	pxor	%xmm8, %xmm6
	movdqa	%xmm2, %xmm1
	pminud	%xmm0, %xmm1
	pcmpeqd	%xmm2, %xmm1
	pxor	%xmm8, %xmm1
	pminud	%xmm7, %xmm0
	pcmpeqd	%xmm7, %xmm0
	blendvps	%xmm0, %xmm5, %xmm4
	por	%xmm6, %xmm1
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm4, %xmm3
	movdqu	(%rsi,%rax), %xmm0
	paddd	%xmm3, %xmm0
	movdqu	%xmm0, (%rdi,%rax)
	addq	$16, %rax
	cmpq	%rax, %rcx
	jne	LBB0_11
## %bb.12:
	cmpq	%r14, %r9
	jne	LBB0_13
LBB0_17:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r9, %rax
	subq	%r8, %rax
	leaq	(%rdi,%rax,4), %r8
	leaq	(%rdx,%rax,4), %r10
	leaq	(%rdi,%r9,4), %r11
	leaq	(%rsi,%r9,4), %r15
	leaq	(%rdx,%r9,4), %r12
	subq	%r9, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	cmpl	%edi, %esi
	cmoval	%r13d, %ecx
	cmpl	%eax, %esi
	cmoval	%r13d, %ecx
	addl	(%r15,%rbx,4), %ecx
	movl	%ecx, (%r11,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r8,%rbx,4), %ecx
	movl	(%r12,%rbx,4), %r9d
	movl	(%r10,%rbx,4), %r13d
	movl	%r9d, %edi
	subl	%r13d, %edi
	movl	%ecx, %edx
	subl	%r13d, %edx
	movl	%edi, %esi
	negl	%esi
	cmovsl	%edi, %esi
	movl	%edx, %eax
	negl	%eax
	cmovsl	%edx, %eax
	addl	%edi, %edx
	movl	%edx, %edi
	negl	%edi
	cmovsl	%edx, %edi
	cmpl	%edi, %eax
	ja	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movl	%r9d, %r13d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_add_png_paeth_prediction    ; -- Begin function ff_add_png_paeth_prediction
	.p2align	2
_ff_add_png_paeth_prediction:           ; @ff_add_png_paeth_prediction
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w4 killed $w4 def $x4
	cmp	w3, #1
	b.lt	LBB0_6
; %bb.1:
	sxtw	x9, w4
	mov	w8, w3
	cmp	w3, #4
	b.lo	LBB0_3
; %bb.2:
	lsl	x10, x9, #2
	sub	x11, x10, x2
	add	x11, x0, x11
	sub	x12, x0, x2
	sub	x13, x0, x1
	cmp	x11, #16
	ccmp	x12, #16, #0, hs
	ccmp	x13, #16, #0, hs
	ccmp	x10, #16, #0, hs
	ccmp	x12, #16, #0, hs
	ccmp	x11, #16, #0, hs
	ccmp	x13, #16, #0, hs
	b.hs	LBB0_7
LBB0_3:
	mov	x10, #0
LBB0_4:
	mov	x11, #0
	sub	x9, x10, x9
	lsl	x12, x9, #2
	add	x9, x0, x12
	add	x12, x2, x12
	lsl	x15, x10, #2
	add	x13, x0, x15
	add	x14, x1, x15
	add	x15, x2, x15
	sub	x8, x8, x10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x10, x11, #2
	ldr	w16, [x9, x10]
	ldr	w17, [x15, x10]
	ldr	w0, [x12, x10]
	subs	w1, w17, w0
	cneg	w2, w1, mi
	sub	w3, w16, w0
	cmp	w3, #0
	cneg	w4, w3, mi
	adds	w1, w1, w3
	cneg	w1, w1, mi
	cmp	w4, w1
	csel	w17, w0, w17, hi
	cmp	w2, w1
	ccmp	w2, w4, #2, ls
	ldr	w0, [x14, x10]
	csel	w16, w17, w16, hi
	add	w16, w16, w0
	str	w16, [x13, x10]
	add	x11, x11, #1
	cmp	x8, x11
	b.ne	LBB0_5
LBB0_6:
	ret
LBB0_7:
	neg	x11, x9, lsl #2
	and	x10, x8, #0xfffffffc
	mov	x12, x10
	mov	x13, x1
	mov	x14, x0
	mov	x15, x2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	q0, [x14, x11]
	ldr	q1, [x15]
	ldr	q2, [x15, x11]
	sub.4s	v3, v1, v2
	sub.4s	v4, v0, v2
	abs.4s	v5, v3
	abs.4s	v6, v4
	add.4s	v3, v3, v4
	abs.4s	v3, v3
	cmhi.4s	v4, v5, v6
	cmhi.4s	v5, v5, v3
	orr.16b	v4, v4, v5
	cmhi.4s	v3, v6, v3
	bit.16b	v1, v2, v3
	ldr	q2, [x13], #16
	bit.16b	v0, v1, v4
	add.4s	v0, v0, v2
	str	q0, [x14], #16
	add	x15, x15, #16
	subs	x12, x12, #4
	b.ne	LBB0_8
; %bb.9:
	cmp	x10, x8
	b.eq	LBB0_6
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
