	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function png_setup_sub_row
LCPI0_0:
	.long	128                             ## 0x80
	.long	128                             ## 0x80
	.space	4
	.space	4
LCPI0_1:
	.long	256                             ## 0x100
	.long	256                             ## 0x100
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_png_setup_sub_row:                     ## @png_setup_sub_row
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PNG_FILTER_VALUE_SUB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %r11
	movl	%eax, (%r11)
	movq	8(%rdi), %rbx
	leaq	4(%r11), %r9
	leaq	4(%rbx), %r8
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	cmpq	$4, %rsi
	jb	LBB0_3
## %bb.4:
	movq	%r11, %rdi
	subq	%rbx, %rdi
	cmpq	$16, %rdi
	jb	LBB0_3
## %bb.5:
	movq	%rsi, %r10
	andq	$-4, %r10
	leaq	(%r8,%r10,4), %r14
	leaq	(%r9,%r10,4), %r9
	pxor	%xmm2, %xmm2
	xorl	%eax, %eax
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = <128,128,u,u>
	movdqa	LCPI0_1(%rip), %xmm9            ## xmm9 = <256,256,u,u>
	pxor	%xmm3, %xmm3
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	4(%rbx,%rax,4), %xmm6           ## xmm6 = mem[0],zero
	movq	12(%rbx,%rax,4), %xmm7          ## xmm7 = mem[0],zero
	movups	4(%rbx,%rax,4), %xmm0
	movups	%xmm0, 4(%r11,%rax,4)
	movdqa	%xmm6, %xmm0
	pmaxud	%xmm8, %xmm0
	pcmpeqd	%xmm6, %xmm0
	movdqa	%xmm7, %xmm1
	pmaxud	%xmm8, %xmm1
	pcmpeqd	%xmm7, %xmm1
	movdqa	%xmm9, %xmm5
	psubd	%xmm6, %xmm5
	movdqa	%xmm9, %xmm4
	psubd	%xmm7, %xmm4
	blendvps	%xmm0, %xmm5, %xmm6
	movdqa	%xmm1, %xmm0
	blendvps	%xmm0, %xmm4, %xmm7
	pmovzxdq	%xmm6, %xmm0                    ## xmm0 = xmm6[0],zero,xmm6[1],zero
	paddq	%xmm0, %xmm2
	pmovzxdq	%xmm7, %xmm0                    ## xmm0 = xmm7[0],zero,xmm7[1],zero
	paddq	%xmm0, %xmm3
	addq	$4, %rax
	cmpq	%rax, %r10
	jne	LBB0_6
## %bb.7:
	paddq	%xmm2, %xmm3
	pshufd	$238, %xmm3, %xmm0              ## xmm0 = xmm3[2,3,2,3]
	paddq	%xmm3, %xmm0
	movq	%xmm0, %rax
	cmpq	%rsi, %r10
	jne	LBB0_8
	jmp	LBB0_14
LBB0_1:
	movq	%r8, %r14
	jmp	LBB0_14
LBB0_3:
	movq	%r8, %r14
	xorl	%r10d, %r10d
LBB0_8:
	movq	%r10, %r11
	notq	%r11
	testb	$1, %sil
	je	LBB0_10
## %bb.9:
	movl	(%r14), %edi
	movl	%edi, (%r9)
	movl	$256, %ebx                      ## imm = 0x100
	subl	%edi, %ebx
	cmpl	$128, %edi
	cmovbl	%edi, %ebx
	addq	%rbx, %rax
	orq	$1, %r10
	addq	$4, %r9
	addq	$4, %r14
LBB0_10:
	addq	%rsi, %r11
	je	LBB0_14
## %bb.11:
	movq	%rsi, %r11
	subq	%r10, %r11
	xorl	%edi, %edi
	xorl	%r10d, %r10d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rdi,4), %r15d
	movl	%r15d, (%r9,%rdi,4)
	movl	$256, %ebx                      ## imm = 0x100
	subl	%r15d, %ebx
	cmpl	$128, %r15d
	cmovbl	%r15d, %ebx
	addq	%rax, %rbx
	movl	4(%r14,%rdi,4), %r15d
	movl	%r15d, 4(%r9,%rdi,4)
	movl	$256, %eax                      ## imm = 0x100
	subl	%r15d, %eax
	cmpl	$128, %r15d
	cmovbl	%r15d, %eax
	addq	%rbx, %rax
	addq	$-8, %r10
	addq	$2, %rdi
	cmpq	%rdi, %r11
	jne	LBB0_12
## %bb.13:
	subq	%r10, %r14
	subq	%r10, %r9
LBB0_14:
	cmpq	%rdx, %rsi
	jae	LBB0_18
## %bb.15:
	incq	%rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r10
	movl	(%r14,%rdi,4), %eax
	subl	(%r8,%rdi,4), %eax
	movzbl	%al, %ebx
	movl	%ebx, (%r9,%rdi,4)
	movl	$256, %eax                      ## imm = 0x100
	subl	%ebx, %eax
	cmpl	$128, %ebx
	cmovbl	%ebx, %eax
	addq	%r10, %rax
	cmpq	%rcx, %rax
	ja	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	leaq	(%rsi,%rdi), %rbx
	incq	%rdi
	cmpq	%rdx, %rbx
	jb	LBB0_16
LBB0_18:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_FILTER_VALUE_SUB,4,2       ## @PNG_FILTER_VALUE_SUB
	.no_dead_strip	_png_setup_sub_row
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function png_setup_sub_row
_png_setup_sub_row:                     ; @png_setup_sub_row
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PNG_FILTER_VALUE_SUB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_FILTER_VALUE_SUB@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldp	x12, x13, [x0]
	mov	x8, x12
	str	w9, [x8], #4
	add	x9, x13, #4
	mov	x0, #0
	cbz	x1, LBB0_6
; %bb.1:
	cmp	x1, #8
	b.lo	LBB0_7
; %bb.2:
	sub	x14, x12, x13
	mov	x10, x9
	mov	x11, x0
	cmp	x14, #32
	b.lo	LBB0_8
; %bb.3:
	and	x11, x1, #0xfffffffffffffff8
	lsl	x14, x11, #2
	add	x10, x9, x14
	add	x8, x8, x14
	add	x12, x12, #20
	add	x13, x13, #20
	movi.2d	v0, #0000000000000000
	movi.2s	v1, #128
	movi.2s	v2, #1, lsl #8
	mov	x14, x11
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v5, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	d6, d7, [x13, #-16]
	ldp	d16, d17, [x13], #32
	stp	d6, d7, [x12, #-16]
	stp	d16, d17, [x12], #32
	cmhi.2s	v18, v1, v6
	cmhi.2s	v19, v1, v7
	cmhi.2s	v20, v1, v16
	cmhi.2s	v21, v1, v17
	sub.2s	v22, v2, v6
	sub.2s	v23, v2, v7
	sub.2s	v24, v2, v16
	sub.2s	v25, v2, v17
	bif.8b	v6, v22, v18
	bif.8b	v7, v23, v19
	bif.8b	v16, v24, v20
	bif.8b	v17, v25, v21
	uaddw.2d	v0, v0, v6
	uaddw.2d	v3, v3, v7
	uaddw.2d	v4, v4, v16
	uaddw.2d	v5, v5, v17
	subs	x14, x14, #8
	b.ne	LBB0_4
; %bb.5:
	add.2d	v0, v3, v0
	add.2d	v0, v4, v0
	add.2d	v0, v5, v0
	addp.2d	d0, v0
	fmov	x0, d0
	cmp	x11, x1
	b.ne	LBB0_8
	b	LBB0_10
LBB0_6:
	mov	x10, x9
	b	LBB0_10
LBB0_7:
	mov	x10, x9
	mov	x11, x0
LBB0_8:
	sub	x11, x1, x11
	mov	w12, #256
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10], #4
	str	w13, [x8], #4
	sub	w14, w12, w13
	cmp	w13, #128
	csel	w13, w13, w14, lo
	add	x0, x0, x13
	subs	x11, x11, #1
	b.ne	LBB0_9
LBB0_10:
	cmp	x1, x2
	b.hs	LBB0_13
; %bb.11:
	add	x11, x1, #1
	mov	w12, #256
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10], #4
	ldr	w14, [x9], #4
	sub	w13, w13, w14
	and	w13, w13, #0xff
	str	w13, [x8], #4
	sub	w14, w12, w13
	cmp	w13, #128
	csel	w13, w13, w14, lo
	add	x0, x0, x13
	cmp	x0, x3
	ccmp	x11, x2, #2, ls
	add	x11, x11, #1
	b.lo	LBB0_12
LBB0_13:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_FILTER_VALUE_SUB,4,2       ; @PNG_FILTER_VALUE_SUB
	.no_dead_strip	_png_setup_sub_row
.subsections_via_symbols
