	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compute_mb_distortion
_compute_mb_distortion:                 ## @compute_mb_distortion
	.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
	movq	_MB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	movq	%r8, -160(%rbp)                 ## 8-byte Spill
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movq	%rdi, -120(%rbp)                ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	movq	(%rsi), %r15
	movl	(%rdx), %r12d
	movq	(%rcx), %rax
	movl	(%r8), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %r8
	movl	%ebx, %eax
	andl	$-8, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	addq	$-8, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movq	%rcx, %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	andq	$-2, %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	leaq	48(%r15), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	48(%r8), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	xorl	%r9d, %r9d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	xorl	%r11d, %r11d
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movl	%r12d, -112(%rbp)               ## 4-byte Spill
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r11d
	addl	%r12d, %r14d
	addl	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	cmpl	%ebx, %r11d
	je	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movslq	%r9d, %r10
	movslq	%r14d, %r13
	cmpl	$8, %ebx
	jae	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movd	%eax, %xmm0
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13,4), %r8
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r10,4), %r12
	pxor	%xmm2, %xmm2
	movq	-104(%rbp), %r15                ## 8-byte Reload
	xorl	%eax, %eax
	movdqa	%xmm0, %xmm3
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-48(%r8,%rax,4), %xmm4
	movdqu	-32(%r8,%rax,4), %xmm5
	movdqu	-16(%r8,%rax,4), %xmm0
	movdqu	(%r8,%rax,4), %xmm1
	movdqu	-48(%r12,%rax,4), %xmm6
	psubd	%xmm6, %xmm4
	movdqu	-32(%r12,%rax,4), %xmm6
	psubd	%xmm6, %xmm5
	movdqu	-16(%r12,%rax,4), %xmm6
	psubd	%xmm6, %xmm0
	movdqu	(%r12,%rax,4), %xmm6
	psubd	%xmm6, %xmm1
	pmulld	%xmm4, %xmm4
	paddd	%xmm3, %xmm4
	pmulld	%xmm5, %xmm5
	paddd	%xmm2, %xmm5
	pmulld	%xmm0, %xmm0
	paddd	%xmm4, %xmm0
	pmulld	%xmm1, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rax
	movdqa	%xmm0, %xmm3
	movdqa	%xmm1, %xmm2
	addq	$-2, %r15
	jne	LBB0_8
	jmp	LBB0_9
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, -64(%rbp)                   ## 1-byte Folded Reload
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movl	-112(%rbp), %r12d               ## 4-byte Reload
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %ecx
	imull	%r11d, %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	imull	%r11d, %edx
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	addq	%rax, %rcx
	movdqu	(%r15,%rcx,4), %xmm2
	movdqu	16(%r15,%rcx,4), %xmm3
	addq	%rax, %rdx
	movdqu	(%r8,%rdx,4), %xmm4
	psubd	%xmm4, %xmm2
	movdqu	16(%r8,%rdx,4), %xmm4
	psubd	%xmm4, %xmm3
	pmulld	%xmm2, %xmm2
	paddd	%xmm2, %xmm0
	pmulld	%xmm3, %xmm3
	paddd	%xmm3, %xmm1
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%rbx, %rdx
	je	LBB0_14
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r8,%r10,4), %rdx
	leaq	(%r15,%r13,4), %rsi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rcx,4), %edi
	subl	(%rdx,%rcx,4), %edi
	imull	%edi, %edi
	addl	%edi, %eax
	incq	%rcx
	cmpq	%rcx, %rbx
	jne	LBB0_13
	jmp	LBB0_14
LBB0_1:
	xorl	%eax, %eax
LBB0_15:
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	_AV_PIX_FMT_RGB24@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_43
## %bb.16:
	cmpl	$2, %ebx
	jl	LBB0_43
## %bb.17:
	movl	%ebx, %r10d
	shrl	$31, %r10d
	addl	%ebx, %r10d
	sarl	%r10d
	movabsq	$4611686018427387902, %rcx      ## imm = 0x3FFFFFFFFFFFFFFE
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx), %r9
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	movl	4(%rcx), %r14d
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movq	8(%rcx), %r15
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	movl	4(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%r10d, %edi
	movl	%edi, %ecx
	andl	$-8, %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	addq	$-8, %rcx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rcx, %rdx
	shrq	$3, %rdx
	incq	%rdx
	movq	%rdx, %rcx
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	andq	$-2, %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	leaq	48(%r9), %rcx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	leaq	48(%r15), %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	xorl	%r8d, %r8d
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r14d, -80(%rbp)                ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_18 Depth=1
	incl	%r12d
	addl	%r14d, %r13d
	addl	-44(%rbp), %r8d                 ## 4-byte Folded Reload
	cmpl	%r10d, %r12d
	je	LBB0_30
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_28 Depth 2
	movslq	%r8d, %rcx
	movslq	%r13d, %r11
	cmpl	$8, %r10d
	jae	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	movd	%eax, %xmm0
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%r11,4), %r14
	movq	-120(%rbp), %rax                ## 8-byte Reload
	leaq	(%rax,%rcx,4), %r9
	pxor	%xmm2, %xmm2
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	xorl	%eax, %eax
	movdqa	%xmm0, %xmm3
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-48(%r14,%rax,4), %xmm4
	movdqu	-32(%r14,%rax,4), %xmm5
	movdqu	-16(%r14,%rax,4), %xmm0
	movdqu	(%r14,%rax,4), %xmm1
	movdqu	-48(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm4
	movdqu	-32(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm5
	movdqu	-16(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm0
	movdqu	(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm1
	pmulld	%xmm4, %xmm4
	paddd	%xmm3, %xmm4
	pmulld	%xmm5, %xmm5
	paddd	%xmm2, %xmm5
	pmulld	%xmm0, %xmm0
	paddd	%xmm4, %xmm0
	pmulld	%xmm1, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rax
	movdqa	%xmm0, %xmm3
	movdqa	%xmm1, %xmm2
	addq	$-2, %r15
	jne	LBB0_23
	jmp	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=1
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
LBB0_24:                                ##   in Loop: Header=BB0_18 Depth=1
	testb	$1, -96(%rbp)                   ## 1-byte Folded Reload
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	movl	-80(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	%r14d, %edx
	imull	%r12d, %edx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	imull	%r12d, %ebx
	movslq	%edx, %rdx
	movslq	%ebx, %rbx
	addq	%rax, %rdx
	movdqu	(%r9,%rdx,4), %xmm2
	movdqu	16(%r9,%rdx,4), %xmm3
	addq	%rax, %rbx
	movdqu	(%r15,%rbx,4), %xmm4
	psubd	%xmm4, %xmm2
	movdqu	16(%r15,%rbx,4), %xmm4
	psubd	%xmm4, %xmm3
	pmulld	%xmm2, %xmm2
	paddd	%xmm2, %xmm0
	pmulld	%xmm3, %xmm3
	paddd	%xmm3, %xmm1
LBB0_26:                                ##   in Loop: Header=BB0_18 Depth=1
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rbx
	cmpq	%rdi, %rdx
	je	LBB0_29
LBB0_27:                                ##   in Loop: Header=BB0_18 Depth=1
	leaq	(%r15,%rcx,4), %rcx
	leaq	(%r9,%r11,4), %rdx
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx,%rbx,4), %esi
	subl	(%rcx,%rbx,4), %esi
	imull	%esi, %esi
	addl	%esi, %eax
	incq	%rbx
	cmpq	%rbx, %rdi
	jne	LBB0_28
	jmp	LBB0_29
LBB0_30:
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	movq	16(%rcx), %r9
	movq	-144(%rbp), %rcx                ## 8-byte Reload
	movl	8(%rcx), %r13d
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movq	16(%rcx), %r14
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	movl	8(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, %ecx
	andl	$-8, %ecx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	andq	%rcx, -104(%rbp)                ## 8-byte Folded Spill
	leaq	48(%r9), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leaq	48(%r14), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r8d, %r8d
	xorl	%r11d, %r11d
	xorl	%r15d, %r15d
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movl	%r13d, -80(%rbp)                ## 4-byte Spill
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_31 Depth=1
	incl	%r15d
	addl	%r13d, %r11d
	addl	-44(%rbp), %r8d                 ## 4-byte Folded Reload
	cmpl	%r10d, %r15d
	je	LBB0_43
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_36 Depth 2
                                        ##     Child Loop BB0_41 Depth 2
	movslq	%r8d, %rbx
	movslq	%r11d, %r12
	cmpl	$8, %r10d
	jae	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_40
	.p2align	4, 0x90
LBB0_33:                                ##   in Loop: Header=BB0_31 Depth=1
	movd	%eax, %xmm0
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_34
## %bb.35:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,4), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,4), %r9
	pxor	%xmm2, %xmm2
	movq	-104(%rbp), %r13                ## 8-byte Reload
	xorl	%eax, %eax
	movdqa	%xmm0, %xmm3
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-48(%rcx,%rax,4), %xmm4
	movdqu	-32(%rcx,%rax,4), %xmm5
	movdqu	-16(%rcx,%rax,4), %xmm0
	movdqu	(%rcx,%rax,4), %xmm1
	movdqu	-48(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm4
	movdqu	-32(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm5
	movdqu	-16(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm0
	movdqu	(%r9,%rax,4), %xmm6
	psubd	%xmm6, %xmm1
	pmulld	%xmm4, %xmm4
	paddd	%xmm3, %xmm4
	pmulld	%xmm5, %xmm5
	paddd	%xmm2, %xmm5
	pmulld	%xmm0, %xmm0
	paddd	%xmm4, %xmm0
	pmulld	%xmm1, %xmm1
	paddd	%xmm5, %xmm1
	addq	$16, %rax
	movdqa	%xmm0, %xmm3
	movdqa	%xmm1, %xmm2
	addq	$-2, %r13
	jne	LBB0_36
	jmp	LBB0_37
LBB0_34:                                ##   in Loop: Header=BB0_31 Depth=1
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
LBB0_37:                                ##   in Loop: Header=BB0_31 Depth=1
	testb	$1, -96(%rbp)                   ## 1-byte Folded Reload
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	movl	-80(%rbp), %r13d                ## 4-byte Reload
	je	LBB0_39
## %bb.38:                              ##   in Loop: Header=BB0_31 Depth=1
	movl	%r13d, %ecx
	imull	%r15d, %ecx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	imull	%r15d, %edx
	movslq	%ecx, %rcx
	movslq	%edx, %rdx
	addq	%rax, %rcx
	movdqu	(%r9,%rcx,4), %xmm2
	movdqu	16(%r9,%rcx,4), %xmm3
	addq	%rax, %rdx
	movdqu	(%r14,%rdx,4), %xmm4
	psubd	%xmm4, %xmm2
	movdqu	16(%r14,%rdx,4), %xmm4
	psubd	%xmm4, %xmm3
	pmulld	%xmm2, %xmm2
	paddd	%xmm2, %xmm0
	pmulld	%xmm3, %xmm3
	paddd	%xmm3, %xmm1
LBB0_39:                                ##   in Loop: Header=BB0_31 Depth=1
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, %rcx
	cmpq	%rdi, %rdx
	je	LBB0_42
LBB0_40:                                ##   in Loop: Header=BB0_31 Depth=1
	leaq	(%r14,%rbx,4), %rbx
	leaq	(%r9,%r12,4), %rdx
	.p2align	4, 0x90
LBB0_41:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx,%rcx,4), %esi
	subl	(%rbx,%rcx,4), %esi
	imull	%esi, %esi
	addl	%esi, %eax
	incq	%rcx
	cmpq	%rcx, %rdi
	jne	LBB0_41
	jmp	LBB0_42
LBB0_43:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_SIZE,4,2                    ## @MB_SIZE
	.comm	_AV_PIX_FMT_RGB24,8,3           ## @AV_PIX_FMT_RGB24
	.no_dead_strip	_compute_mb_distortion
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compute_mb_distortion
_compute_mb_distortion:                 ; @compute_mb_distortion
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	mov	x8, x0
Lloh0:
	adrp	x9, _MB_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MB_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.1:
	mov	w19, #0
	mov	w7, #0
	mov	w0, #0
	mov	w10, #0
	ldr	x11, [x1]
	ldr	w12, [x2]
	ldr	x13, [x3]
	ldr	w14, [x4]
	and	x15, x9, #0xfffffff0
	add	x16, x13, #32
	add	x17, x11, #32
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w10, w10, #1
	add	w7, w5, w14
	add	w19, w6, w12
	cmp	w10, w9
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_9 Depth 2
	sxtw	x5, w7
	sxtw	x6, w19
	cmp	w9, #16
	b.hs	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, #0
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x7, x16, w7, sxtw #2
	add	x19, x17, w19, sxtw #2
	movi.2d	v0, #0000000000000000
	mov.s	v0[0], w0
	movi.2d	v1, #0000000000000000
	mov	x0, x15
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q4, q5, [x19, #-32]
	ldp	q6, q7, [x19], #64
	ldp	q16, q17, [x7, #-32]
	ldp	q18, q19, [x7], #64
	sub.4s	v4, v4, v16
	sub.4s	v5, v5, v17
	sub.4s	v6, v6, v18
	sub.4s	v7, v7, v19
	mla.4s	v0, v4, v4
	mla.4s	v1, v5, v5
	mla.4s	v2, v6, v6
	mla.4s	v3, v7, v7
	subs	x0, x0, #16
	b.ne	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w0, s0
	mov	x20, x15
	cmp	x15, x9
	b.eq	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x7, x20, x5
	add	x7, x13, x7, lsl #2
	add	x19, x20, x6
	add	x19, x11, x19, lsl #2
	sub	x20, x9, x20
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w21, [x19], #4
	ldr	w22, [x7], #4
	sub	w21, w21, w22
	madd	w0, w21, w21, w0
	subs	x20, x20, #1
	b.ne	LBB0_9
	b	LBB0_2
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _AV_PIX_FMT_RGB24@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_PIX_FMT_RGB24@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_31
; %bb.12:
	cmp	w9, #0
	cinc	w8, w9, lt
	cmp	w9, #2
	b.lt	LBB0_31
; %bb.13:
	mov	w7, #0
	mov	w6, #0
	mov	w9, #0
	asr	w8, w8, #1
	ldr	x10, [x1, #8]
	ldr	w11, [x2, #4]
	ldr	x12, [x3, #8]
	ldr	w13, [x4, #4]
	and	x14, x8, #0xfffffff0
	add	x15, x12, #32
	add	x16, x10, #32
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w9, w9, #1
	add	w6, w17, w13
	add	w7, w5, w11
	cmp	w9, w8
	b.eq	LBB0_22
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	sxtw	x17, w6
	sxtw	x5, w7
	cmp	w8, #16
	b.hs	LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x19, #0
	b	LBB0_20
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x6, x15, w6, sxtw #2
	add	x7, x16, w7, sxtw #2
	movi.2d	v0, #0000000000000000
	mov.s	v0[0], w0
	movi.2d	v1, #0000000000000000
	mov	x0, x14
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_18:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q4, q5, [x7, #-32]
	ldp	q6, q7, [x7], #64
	ldp	q16, q17, [x6, #-32]
	ldp	q18, q19, [x6], #64
	sub.4s	v4, v4, v16
	sub.4s	v5, v5, v17
	sub.4s	v6, v6, v18
	sub.4s	v7, v7, v19
	mla.4s	v0, v4, v4
	mla.4s	v1, v5, v5
	mla.4s	v2, v6, v6
	mla.4s	v3, v7, v7
	subs	x0, x0, #16
	b.ne	LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w0, s0
	mov	x19, x14
	cmp	x14, x8
	b.eq	LBB0_14
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x6, x19, x17
	add	x6, x12, x6, lsl #2
	add	x7, x19, x5
	add	x7, x10, x7, lsl #2
	sub	x19, x8, x19
LBB0_21:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w20, [x7], #4
	ldr	w21, [x6], #4
	sub	w20, w20, w21
	madd	w0, w20, w20, w0
	subs	x19, x19, #1
	b.ne	LBB0_21
	b	LBB0_14
LBB0_22:
	mov	w5, #0
	mov	w6, #0
	mov	w9, #0
	ldr	x10, [x1, #16]
	ldr	w11, [x2, #8]
	ldr	x12, [x3, #16]
	ldr	w13, [x4, #8]
	and	x14, x8, #0xfffffff0
	add	x15, x12, #32
	add	x16, x10, #32
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	w9, w9, #1
	add	w6, w17, w13
	add	w5, w1, w11
	cmp	w9, w8
	b.eq	LBB0_31
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_27 Depth 2
                                        ;     Child Loop BB0_30 Depth 2
	sxtw	x17, w6
	sxtw	x1, w5
	cmp	w8, #16
	b.hs	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	x4, #0
	b	LBB0_29
LBB0_26:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x2, x15, w6, sxtw #2
	add	x3, x16, w5, sxtw #2
	movi.2d	v0, #0000000000000000
	mov.s	v0[0], w0
	movi.2d	v1, #0000000000000000
	mov	x0, x14
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_27:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q4, q5, [x3, #-32]
	ldp	q6, q7, [x3], #64
	ldp	q16, q17, [x2, #-32]
	ldp	q18, q19, [x2], #64
	sub.4s	v4, v4, v16
	sub.4s	v5, v5, v17
	sub.4s	v6, v6, v18
	sub.4s	v7, v7, v19
	mla.4s	v0, v4, v4
	mla.4s	v1, v5, v5
	mla.4s	v2, v6, v6
	mla.4s	v3, v7, v7
	subs	x0, x0, #16
	b.ne	LBB0_27
; %bb.28:                               ;   in Loop: Header=BB0_24 Depth=1
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w0, s0
	mov	x4, x14
	cmp	x14, x8
	b.eq	LBB0_23
LBB0_29:                                ;   in Loop: Header=BB0_24 Depth=1
	sub	x2, x8, x4
	add	x3, x4, x17
	add	x3, x12, x3, lsl #2
	add	x4, x4, x1
	add	x4, x10, x4, lsl #2
LBB0_30:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w5, [x4], #4
	ldr	w6, [x3], #4
	sub	w5, w5, w6
	madd	w0, w5, w5, w0
	subs	x2, x2, #1
	b.ne	LBB0_30
	b	LBB0_23
LBB0_31:
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_SIZE,4,2                    ; @MB_SIZE
	.comm	_AV_PIX_FMT_RGB24,8,3           ; @AV_PIX_FMT_RGB24
	.no_dead_strip	_compute_mb_distortion
.subsections_via_symbols
