	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function luma_abs_diff
_luma_abs_diff:                         ## @luma_abs_diff
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	12(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_1
## %bb.2:
	movl	8(%rdi), %r12d
	movq	(%rsi), %rax
	movq	16(%rsi), %rcx
	movslq	(%rax), %r9
	movq	(%rdi), %rax
	movslq	(%rax), %r11
	movq	(%rcx), %rsi
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	movl	%r12d, %r10d
	andl	$-4, %r10d
	shlq	$3, %r11
	shlq	$3, %r9
	leaq	(,%r12,8), %r15
	andq	$-32, %r15
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	addq	%r11, %rdi
	addq	%r9, %rsi
	cmpl	%r8d, %r14d
	je	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, %r12d
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movd	%eax, %xmm4
	pxor	%xmm3, %xmm3
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	(%rdi,%rax), %xmm1
	movdqu	16(%rdi,%rax), %xmm2
	movdqu	(%rsi,%rax), %xmm0
	psubq	%xmm0, %xmm1
	movdqu	16(%rsi,%rax), %xmm0
	psubq	%xmm0, %xmm2
	pxor	%xmm5, %xmm5
	psubq	%xmm1, %xmm5
	movdqa	%xmm1, %xmm0
	blendvpd	%xmm0, %xmm5, %xmm1
	pxor	%xmm5, %xmm5
	psubq	%xmm2, %xmm5
	movdqa	%xmm2, %xmm0
	blendvpd	%xmm0, %xmm5, %xmm2
	pshufd	$232, %xmm1, %xmm0              ## xmm0 = xmm1[0,2,2,3]
	paddd	%xmm0, %xmm4
	pshufd	$232, %xmm2, %xmm0              ## xmm0 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm3
	addq	$32, %rax
	cmpq	%rax, %r15
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	paddd	%xmm4, %xmm3
	pshufd	$85, %xmm3, %xmm0               ## xmm0 = xmm3[1,1,1,1]
	paddd	%xmm3, %xmm0
	movd	%xmm0, %eax
	movq	%r10, %rbx
	cmpq	%r12, %r10
	je	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdi,%rbx,8), %rdx
	subq	(%rsi,%rbx,8), %rdx
	movq	%rdx, %rcx
	negq	%rcx
	cmovsq	%rdx, %rcx
	addl	%ecx, %eax
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_9
	jmp	LBB0_10
LBB0_1:
	xorl	%eax, %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_luma_abs_diff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function luma_abs_diff
_luma_abs_diff:                         ; @luma_abs_diff
	.cfi_startproc
; %bb.0:
	ldr	w9, [x0, #12]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x8, x0
	mov	w0, #0
	mov	w10, #0
	ldr	w11, [x8, #8]
	ldr	x12, [x1]
	ldrsw	x15, [x12]
	ldr	x12, [x8]
	ldrsw	x16, [x12]
	ldr	x12, [x1, #16]
	ldr	x12, [x12]
	ldr	x8, [x8, #16]
	lsl	x14, x11, #3
	ldr	x8, [x8]
	and	x13, x11, #0xfffffff8
	and	x14, x14, #0x7ffffffc0
	lsl	x15, x15, #3
	lsl	x16, x16, #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w10, w10, #1
	add	x12, x12, x15
	add	x8, x8, x16
	cmp	w10, w9
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w11, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w11, #8
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, #0
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x17, #0
	movi	d0, #0000000000000000
	mov.s	v0[0], w0
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, x8, x17
	ldp	q4, q5, [x0]
	ldp	q6, q7, [x0, #32]
	add	x0, x12, x17
	ldp	q16, q17, [x0]
	ldp	q18, q19, [x0, #32]
	sub.2d	v4, v4, v16
	sub.2d	v5, v5, v17
	sub.2d	v6, v6, v18
	sub.2d	v7, v7, v19
	abs.2d	v4, v4
	abs.2d	v5, v5
	abs.2d	v6, v6
	abs.2d	v7, v7
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	add	x17, x17, #64
	cmp	x14, x17
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w0, s0
	mov	x17, x13
	cmp	x13, x11
	b.eq	LBB0_2
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x1, x17, #3
	ldr	x2, [x8, x1]
	ldr	x1, [x12, x1]
	subs	x1, x2, x1
	cneg	x1, x1, mi
	add	w0, w0, w1
	add	x17, x17, #1
	cmp	x11, x17
	b.ne	LBB0_9
	b	LBB0_2
LBB0_10:
	ret
LBB0_11:
	mov	w0, #0
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_luma_abs_diff
.subsections_via_symbols
