	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dither_highpass_filter
_dither_highpass_filter:                ## @dither_highpass_filter
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	cmpl	$3, %esi
	jl	LBB0_15
## %bb.1:
	addl	$-2, %esi
	movss	(%rdi), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	4(%rdi), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	cmpl	$8, %esi
	jb	LBB0_2
## %bb.3:
	movq	_SQRT_1_6@GOTPCREL(%rip), %rcx
	leaq	4(%rcx), %rax
	cmpq	%rax, %rdi
	jae	LBB0_6
## %bb.4:
	leaq	(%rdi,%rsi,4), %rax
	addq	$8, %rax
	cmpq	_SQRT_1_6@GOTPCREL(%rip), %rax
	jbe	LBB0_6
LBB0_2:
	xorl	%eax, %eax
LBB0_10:
	movq	%rax, %rcx
	notq	%rcx
	testb	$1, %sil
	jne	LBB0_12
## %bb.11:
	movaps	%xmm0, %xmm2
	movaps	%xmm1, %xmm0
	addq	%rsi, %rcx
	jne	LBB0_13
	jmp	LBB0_15
LBB0_12:
	leaq	(,%rax,4), %rdx
	movaps	%xmm0, %xmm3
	addss	%xmm0, %xmm3
	subss	%xmm1, %xmm3
	orq	$8, %rdx
	movss	(%rdi,%rdx), %xmm2              ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm2, %xmm3
	movq	_SQRT_1_6@GOTPCREL(%rip), %rdx
	mulss	(%rdx), %xmm3
	movss	%xmm3, (%rdi,%rax,4)
	orq	$1, %rax
	addq	%rsi, %rcx
	je	LBB0_15
LBB0_13:
	movq	_SQRT_1_6@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movaps	%xmm2, %xmm1
	addss	%xmm2, %xmm1
	subss	%xmm0, %xmm1
	movss	8(%rdi,%rax,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm3
	addss	%xmm0, %xmm3
	subss	%xmm2, %xmm3
	movss	12(%rdi,%rax,4), %xmm2          ## xmm2 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	mulss	(%rcx), %xmm1
	movss	%xmm1, (%rdi,%rax,4)
	subss	%xmm2, %xmm3
	mulss	(%rcx), %xmm3
	movss	%xmm3, 4(%rdi,%rax,4)
	addq	$2, %rax
	cmpq	%rax, %rsi
	jne	LBB0_14
	jmp	LBB0_15
LBB0_6:
	movl	%esi, %eax
	andl	$-8, %eax
	shufps	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	shufps	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	movss	(%rcx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	shufps	$0, %xmm2, %xmm2                ## xmm2 = xmm2[0,0,0,0]
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movaps	%xmm0, %xmm3
	movups	8(%rdi,%rcx,4), %xmm5
	movups	24(%rdi,%rcx,4), %xmm0
	blendps	$7, %xmm5, %xmm3                ## xmm3 = xmm5[0,1,2],xmm3[3]
	shufps	$147, %xmm3, %xmm3              ## xmm3 = xmm3[3,0,1,2]
	movaps	%xmm0, %xmm4
	blendps	$8, %xmm5, %xmm4                ## xmm4 = xmm4[0,1,2],xmm5[3]
	shufps	$147, %xmm4, %xmm4              ## xmm4 = xmm4[3,0,1,2]
	blendps	$7, %xmm3, %xmm1                ## xmm1 = xmm3[0,1,2],xmm1[3]
	shufps	$147, %xmm1, %xmm1              ## xmm1 = xmm1[3,0,1,2]
	addps	%xmm3, %xmm3
	subps	%xmm1, %xmm3
	subps	%xmm5, %xmm3
	shufps	$78, %xmm0, %xmm5               ## xmm5 = xmm5[2,3],xmm0[0,1]
	movaps	%xmm4, %xmm1
	addps	%xmm4, %xmm4
	subps	%xmm5, %xmm4
	subps	%xmm0, %xmm4
	mulps	%xmm2, %xmm3
	mulps	%xmm2, %xmm4
	movups	%xmm3, (%rdi,%rcx,4)
	movups	%xmm4, 16(%rdi,%rcx,4)
	addq	$8, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_7
## %bb.8:
	cmpq	%rsi, %rax
	jne	LBB0_9
LBB0_15:
	popq	%rbp
	retq
LBB0_9:
	movaps	%xmm0, %xmm2
	shufps	$255, %xmm0, %xmm2              ## xmm2 = xmm2[3,3],xmm0[3,3]
	movhlps	%xmm0, %xmm0                    ## xmm0 = xmm0[1,1]
	movaps	%xmm0, %xmm1
	movaps	%xmm2, %xmm0
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SQRT_1_6,4,2                   ## @SQRT_1_6
	.no_dead_strip	_dither_highpass_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dither_highpass_filter
_dither_highpass_filter:                ; @dither_highpass_filter
	.cfi_startproc
; %bb.0:
	cmp	w1, #3
	b.lt	LBB0_10
; %bb.1:
	sub	w9, w1, #2
	ldp	s0, s1, [x0]
Lloh0:
	adrp	x8, _SQRT_1_6@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQRT_1_6@GOTPAGEOFF]
	cmp	w9, #4
	b.lo	LBB0_7
; %bb.2:
	add	x10, x0, x9, lsl #2
	add	x10, x10, #8
	add	x11, x8, #4
	cmp	x0, x11
	ccmp	x10, x8, #0, lo
	b.hi	LBB0_7
; %bb.3:
	dup.4s	v2, v1[0]
	dup.4s	v3, v0[0]
	and	x10, x9, #0xfffffffc
	ld1r.4s	{ v0 }, [x8]
	add	x11, x0, #8
	movi.4s	v1, #64, lsl #24
	mov	x12, x10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov.16b	v4, v2
	ldr	q2, [x11]
	ext.16b	v4, v4, v2, #12
	ext.16b	v3, v3, v4, #12
	fneg.4s	v3, v3
	fmla.4s	v3, v1, v4
	fsub.4s	v3, v3, v2
	fmul.4s	v3, v3, v0
	stur	q3, [x11, #-8]
	add	x11, x11, #16
	mov.16b	v3, v4
	subs	x12, x12, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x10, x9
	b.eq	LBB0_10
; %bb.6:
	mov	s1, v2[3]
	mov	s0, v2[2]
	b	LBB0_8
LBB0_7:
	mov	x10, #0
LBB0_8:
	add	x11, x0, x10, lsl #2
	add	x11, x11, #8
	sub	x9, x9, x10
	fmov	s2, #2.00000000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $s1 killed $s1 killed $q1
	fnmsub	s3, s1, s2, s0
	fmov	s0, s1
	ldr	s1, [x11]
	fsub	s3, s3, s1
	ldr	s4, [x8]
	fmul	s3, s3, s4
	stur	s3, [x11, #-8]
	add	x11, x11, #4
	subs	x9, x9, #1
	b.ne	LBB0_9
LBB0_10:
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SQRT_1_6,4,2                   ; @SQRT_1_6
	.no_dead_strip	_dither_highpass_filter
.subsections_via_symbols
