	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_mode_score
_calculate_mode_score:                  ## @calculate_mode_score
	.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	%rdx, %r10
	movl	%esi, %eax
	movq	(%rdi), %rdx
	movq	_AV_PIX_FMT_RGB24@GOTPCREL(%rip), %rsi
	xorl	%ebx, %ebx
	cmpq	(%rsi), %rdx
	sete	%bl
	addl	%ebx, %ebx
	addl	$4, %ebx
	imull	8(%rdi), %eax
	movq	_MB_AREA@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	movl	%eax, %r14d
	movl	12(%rdi), %r13d
	movq	_CHUNK_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r10), %esi
	movl	%esi, %eax
	imull	%ebx, %eax
	addl	%edx, %eax
	testl	%esi, %esi
	cmovel	%esi, %eax
	movl	4(%r10), %esi
	imull	%esi, %ebx
	addl	%edx, %ebx
	testl	%esi, %esi
	cmovel	%esi, %ebx
	addl	%edx, %eax
	addl	%ebx, %eax
	imull	%r13d, %eax
	shll	$3, %eax
	movl	8(%r10), %edx
	cmpl	$128, %edx
	je	LBB0_10
## %bb.1:
	cmpl	$130, %edx
	je	LBB0_17
## %bb.2:
	cmpl	$129, %edx
	jne	LBB0_36
## %bb.3:
	imull	%r14d, %r13d
	leal	(%rax,%r13,8), %eax
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.4:
	movq	16(%rdi), %r8
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%r14d, %r9d
	cmpl	$1, %r14d
	jne	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	jmp	LBB0_8
LBB0_10:
	testl	%ecx, %ecx
	je	LBB0_11
## %bb.14:
	movl	$0, (%r9)
	movl	$0, (%r8)
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.15:
	movq	16(%rdi), %rcx
	movq	_ENC_V1@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r9
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	movl	%r14d, %ebx
	movl	12(%rdi), %edi
	addq	$16, %rcx
	movl	$9, %r8d
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leaq	-16(%rcx), %rdx
	cmpq	%r9, -8(%rcx)
	cmovneq	%rcx, %rdx
	movl	$33, %esi
	cmovel	%r8d, %esi
	imull	%edi, %esi
	movl	(%rdx), %edx
	imull	%r10d, %edx
	addl	%esi, %edx
	addl	%edx, %eax
	addq	$24, %rcx
	decq	%rbx
	jne	LBB0_16
	jmp	LBB0_36
LBB0_17:
	testl	%ecx, %ecx
	je	LBB0_20
## %bb.18:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_19
## %bb.25:
	movq	16(%rdi), %rcx
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%r13d, %edx
	shll	$5, %edx
	leal	(%rdx,%r13,2), %r10d
	leal	(%r13,%r13), %edx
	leal	(%rdx,%rdx,4), %edx
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, %edx
	shlq	$3, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	xorl	%ebx, %ebx
	movq	_ENC_SKIP@GOTPCREL(%rip), %r12
	movq	_ENC_V1@GOTPCREL(%rip), %r14
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_26
LBB0_33:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	%r9, 8(%rcx,%rbx)
	incl	%r15d
	.p2align	4, 0x90
LBB0_34:                                ##   in Loop: Header=BB0_26 Depth=1
	addl	%r11d, %eax
	addq	$24, %rbx
	cmpq	%rbx, %rdx
	je	LBB0_35
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	20(%rcx,%rbx), %r11d
	imull	%edi, %r11d
	addl	%r13d, %r11d
	movq	8(%rcx,%rbx), %rsi
	movq	(%r12), %r9
	cmpq	%r9, %rsi
	je	LBB0_34
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	cmpq	(%r14), %rsi
	je	LBB0_28
## %bb.31:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	16(%rcx,%rbx), %esi
	imull	%edi, %esi
	addl	%r10d, %esi
	cmpl	%r11d, %esi
	jge	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	%esi, %r11d
	jmp	LBB0_34
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_26 Depth=1
	movl	(%rcx,%rbx), %r8d
	imull	%edi, %r8d
	addl	-48(%rbp), %r8d                 ## 4-byte Folded Reload
	cmpl	%r11d, %r8d
	jge	LBB0_30
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	%r8d, %r11d
	jmp	LBB0_34
LBB0_30:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	%r9, 8(%rcx,%rbx)
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	jmp	LBB0_34
LBB0_11:
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.12:
	movq	16(%rdi), %rcx
	leal	(%r13,%r13,8), %r8d
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	movl	%r13d, %r11d
	shll	$5, %r11d
	addl	%r13d, %r11d
	movl	%r14d, %edx
	shlq	$3, %rdx
	leaq	(%rdx,%rdx,2), %r14
	xorl	%edx, %edx
	movq	_ENC_V1@GOTPCREL(%rip), %r9
	movq	_ENC_V4@GOTPCREL(%rip), %r10
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdx), %ebx
	imull	%edi, %ebx
	addl	%r8d, %ebx
	movl	16(%rcx,%rdx), %esi
	imull	%edi, %esi
	addl	%r11d, %esi
	cmpl	%esi, %ebx
	cmovll	%ebx, %esi
	movq	%r9, %rbx
	cmovgq	%r10, %rbx
	movq	(%rbx), %rbx
	movq	%rbx, 8(%rcx,%rdx)
	addl	%esi, %eax
	addq	$24, %rdx
	cmpq	%rdx, %r14
	jne	LBB0_13
	jmp	LBB0_36
LBB0_20:
	testl	%r14d, %r14d
	jle	LBB0_36
## %bb.21:
	movq	16(%rdi), %rcx
	movq	_FF_LAMBDA_SCALE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	leal	(%r13,%r13), %edx
	leal	(%rdx,%rdx,4), %r8d
	movl	%r13d, %edx
	shll	$5, %edx
	leal	(%rdx,%r13,2), %r9d
	movl	%r14d, %edx
	shlq	$3, %rdx
	leaq	(%rdx,%rdx,2), %r15
	xorl	%edx, %edx
	movq	_ENC_V4@GOTPCREL(%rip), %r11
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	addl	%ebx, %eax
	movq	(%rdi), %rsi
	movq	%rsi, 8(%rcx,%rdx)
	addq	$24, %rdx
	cmpq	%rdx, %r15
	je	LBB0_36
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movl	20(%rcx,%rdx), %esi
	imull	%r12d, %esi
	addl	%r13d, %esi
	movl	(%rcx,%rdx), %edi
	imull	%r12d, %edi
	addl	%r8d, %edi
	movl	16(%rcx,%rdx), %ebx
	imull	%r12d, %ebx
	addl	%r9d, %ebx
	cmpl	%edi, %esi
	setg	%r14b
	cmpl	%ebx, %esi
	setg	%r10b
	orb	%r14b, %r10b
	cmpl	%ebx, %edi
	cmovll	%edi, %ebx
	movq	_ENC_V1@GOTPCREL(%rip), %rdi
	cmovgq	%r11, %rdi
	testb	%r10b, %r10b
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	movl	%esi, %ebx
	movq	_ENC_SKIP@GOTPCREL(%rip), %rdi
	jmp	LBB0_24
LBB0_6:
	movl	%r9d, %r10d
	andl	$-2, %r10d
	leaq	32(%r8), %rcx
	xorl	%edi, %edi
	movq	_ENC_V1@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	-32(%rcx), %edx
	imull	%esi, %edx
	addl	%eax, %edx
	movq	(%rbx), %rax
	movq	%rax, -24(%rcx)
	movl	-8(%rcx), %eax
	imull	%esi, %eax
	addl	%edx, %eax
	movq	(%rbx), %rdx
	movq	%rdx, (%rcx)
	addq	$2, %rdi
	addq	$48, %rcx
	cmpq	%rdi, %r10
	jne	LBB0_7
LBB0_8:
	testb	$1, %r9b
	je	LBB0_36
## %bb.9:
	leaq	(%rdi,%rdi,2), %rcx
	imull	(%r8,%rcx,8), %esi
	addl	%eax, %esi
	movq	_ENC_V1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r8,%rcx,8)
	movl	%esi, %eax
	jmp	LBB0_36
LBB0_19:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r15d, %r15d
LBB0_35:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rcx)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, (%rcx)
LBB0_36:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_RGB24,8,3           ## @AV_PIX_FMT_RGB24
	.comm	_MB_AREA,4,2                    ## @MB_AREA
	.comm	_CHUNK_HEADER_SIZE,4,2          ## @CHUNK_HEADER_SIZE
	.comm	_FF_LAMBDA_SCALE,4,2            ## @FF_LAMBDA_SCALE
	.comm	_ENC_V1,8,3                     ## @ENC_V1
	.comm	_ENC_V4,8,3                     ## @ENC_V4
	.comm	_ENC_SKIP,8,3                   ## @ENC_SKIP
	.no_dead_strip	_calculate_mode_score
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_mode_score
_calculate_mode_score:                  ; @calculate_mode_score
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	.cfi_offset w23, -40
	.cfi_offset w24, -48
	.cfi_offset w25, -56
	.cfi_offset w26, -64
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	mov	x8, x0
Lloh0:
	adrp	x9, _AV_PIX_FMT_RGB24@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_RGB24@GOTPAGEOFF]
	ldr	x10, [x0]
Lloh2:
	ldr	x9, [x9]
	cmp	x10, x9
	mov	w9, #4
	mov	w10, #6
	csel	w11, w10, w9, eq
	ldp	w9, w10, [x0, #8]
	mul	w9, w9, w1
Lloh3:
	adrp	x12, _MB_AREA@GOTPAGE
Lloh4:
	ldr	x12, [x12, _MB_AREA@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	sdiv	w9, w9, w12
Lloh6:
	adrp	x12, _CHUNK_HEADER_SIZE@GOTPAGE
Lloh7:
	ldr	x12, [x12, _CHUNK_HEADER_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	ldp	w13, w14, [x2]
	madd	w15, w13, w11, w12
	cmp	w13, #0
	csel	w13, wzr, w15, eq
	madd	w11, w14, w11, w12
	cmp	w14, #0
	csel	w11, wzr, w11, eq
	add	w12, w13, w12
	add	w11, w12, w11
	mul	w11, w10, w11
	lsl	w0, w11, #3
	ldr	w11, [x2, #8]
	cmp	w11, #128
	b.eq	LBB0_6
; %bb.1:
	cmp	w11, #130
	b.eq	LBB0_10
; %bb.2:
	cmp	w11, #129
	b.ne	LBB0_34
; %bb.3:
	mul	w10, w9, w10
	add	w0, w0, w10, lsl #3
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.4:
	ldr	x10, [x8, #16]
Lloh9:
	adrp	x8, _FF_LAMBDA_SCALE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FF_LAMBDA_SCALE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	add	x10, x10, #8
Lloh12:
	adrp	x11, _ENC_V1@GOTPAGE
Lloh13:
	ldr	x11, [x11, _ENC_V1@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x10, #-8]
	madd	w0, w12, w8, w0
	ldr	x12, [x11]
	str	x12, [x10], #24
	subs	x9, x9, #1
	b.ne	LBB0_5
	b	LBB0_34
LBB0_6:
	cbz	w3, LBB0_21
; %bb.7:
	str	wzr, [x5]
	str	wzr, [x4]
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.8:
Lloh14:
	adrp	x10, _ENC_V1@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ENC_V1@GOTPAGEOFF]
	ldr	x12, [x8, #16]
Lloh16:
	ldr	x10, [x10]
Lloh17:
	adrp	x11, _FF_LAMBDA_SCALE@GOTPAGE
Lloh18:
	ldr	x11, [x11, _FF_LAMBDA_SCALE@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	cmp	w9, #4
	b.hs	LBB0_29
; %bb.9:
	mov	x13, #0
	b	LBB0_32
LBB0_10:
	cmp	w9, #1
	cbz	w3, LBB0_24
; %bb.11:
	b.lt	LBB0_27
; %bb.12:
	mov	w11, #0
	mov	w12, #0
	ldr	x15, [x8, #16]
Lloh20:
	adrp	x8, _FF_LAMBDA_SCALE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FF_LAMBDA_SCALE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	add	w13, w10, w10, lsl #4
	lsl	w13, w13, #1
	add	w14, w10, w10, lsl #2
	lsl	w14, w14, #1
	add	x15, x15, #16
Lloh23:
	adrp	x16, _ENC_SKIP@GOTPAGE
Lloh24:
	ldr	x16, [x16, _ENC_SKIP@GOTPAGEOFF]
Lloh25:
	adrp	x17, _ENC_V1@GOTPAGE
Lloh26:
	ldr	x17, [x17, _ENC_V1@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x3
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w0, w1, w0
	add	x15, x15, #24
	subs	x9, x9, #1
	b.eq	LBB0_28
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x15, #4]
	madd	w1, w1, w8, w10
	ldur	x3, [x15, #-8]
	ldr	x2, [x16]
	cmp	x3, x2
	b.eq	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x6, [x17]
	cmp	x3, x6
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w3, [x15]
	madd	w3, w3, w8, w13
	cmp	w3, w1
	b.lt	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	stur	x2, [x15, #-8]
	add	w11, w11, #1
	b	LBB0_14
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	ldur	w3, [x15, #-16]
	madd	w3, w3, w8, w14
	cmp	w3, w1
	b.lt	LBB0_13
; %bb.20:                               ;   in Loop: Header=BB0_15 Depth=1
	stur	x2, [x15, #-8]
	add	w12, w12, #1
	b	LBB0_14
LBB0_21:
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.22:
	ldr	x12, [x8, #16]
	add	w8, w10, w10, lsl #3
Lloh27:
	adrp	x11, _FF_LAMBDA_SCALE@GOTPAGE
Lloh28:
	ldr	x11, [x11, _FF_LAMBDA_SCALE@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	add	w10, w10, w10, lsl #5
	add	x12, x12, #8
Lloh30:
	adrp	x13, _ENC_V4@GOTPAGE
Lloh31:
	ldr	x13, [x13, _ENC_V4@GOTPAGEOFF]
Lloh32:
	adrp	x14, _ENC_V1@GOTPAGE
Lloh33:
	ldr	x14, [x14, _ENC_V1@GOTPAGEOFF]
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldur	w15, [x12, #-8]
	madd	w15, w15, w11, w8
	ldr	w16, [x12, #8]
	madd	w16, w16, w11, w10
	cmp	w15, w16
	csel	w15, w15, w16, lt
	csel	x16, x13, x14, gt
	ldr	x16, [x16]
	str	x16, [x12], #24
	add	w0, w15, w0
	subs	x9, x9, #1
	b.ne	LBB0_23
	b	LBB0_34
LBB0_24:
	b.lt	LBB0_34
; %bb.25:
	ldr	x13, [x8, #16]
Lloh34:
	adrp	x8, _FF_LAMBDA_SCALE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _FF_LAMBDA_SCALE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	add	w11, w10, w10, lsl #2
	lsl	w11, w11, #1
	add	w12, w10, w10, lsl #4
	lsl	w12, w12, #1
	add	x13, x13, #16
Lloh37:
	adrp	x14, _ENC_V4@GOTPAGE
Lloh38:
	ldr	x14, [x14, _ENC_V4@GOTPAGEOFF]
Lloh39:
	adrp	x15, _ENC_V1@GOTPAGE
Lloh40:
	ldr	x15, [x15, _ENC_V1@GOTPAGEOFF]
Lloh41:
	adrp	x16, _ENC_SKIP@GOTPAGE
Lloh42:
	ldr	x16, [x16, _ENC_SKIP@GOTPAGEOFF]
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	ldp	w1, w17, [x13]
	madd	w17, w17, w8, w10
	ldur	w2, [x13, #-16]
	madd	w2, w2, w8, w11
	madd	w1, w1, w8, w12
	cmp	w17, w2
	ccmp	w17, w1, #0, le
	cset	w3, gt
	cmp	w2, w1
	csel	w1, w2, w1, lt
	csel	x2, x14, x15, gt
	cmp	w3, #0
	csel	w17, w1, w17, ne
	csel	x1, x2, x16, ne
	ldr	x1, [x1]
	stur	x1, [x13, #-8]
	add	w0, w17, w0
	add	x13, x13, #24
	subs	x9, x9, #1
	b.ne	LBB0_26
	b	LBB0_34
LBB0_27:
	mov	w12, #0
	mov	w11, #0
LBB0_28:
	str	w12, [x4]
	str	w11, [x5]
	b	LBB0_34
LBB0_29:
	mov	x17, #0
	mov	w16, #0
	mov	w15, #0
	mov	w14, #0
	and	x13, x9, #0xfffffffc
	ldr	w1, [x8, #12]
	lsr	x2, x9, #2
	add	x2, x2, x2, lsl #1
	lsl	x2, x2, #5
	mov	w3, #33
	mov	w4, #9
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	add	x5, x12, x17
	ldr	x6, [x5, #8]
	ldr	x7, [x5, #32]
	ldr	x19, [x5, #56]
	ldr	x20, [x5, #80]
	add	x21, x5, #16
	add	x22, x5, #40
	add	x23, x5, #64
	add	x24, x5, #88
	add	x25, x5, #24
	add	x26, x5, #48
	add	x27, x5, #72
	cmp	x6, x10
	csel	x5, x5, x21, eq
	csel	w6, w4, w3, eq
	cmp	x7, x10
	csel	x7, x25, x22, eq
	csel	w21, w4, w3, eq
	cmp	x19, x10
	csel	x19, x26, x23, eq
	csel	w22, w4, w3, eq
	cmp	x20, x10
	csel	x20, x27, x24, eq
	csel	w23, w4, w3, eq
	mul	w6, w1, w6
	mul	w21, w1, w21
	mul	w22, w1, w22
	mul	w23, w1, w23
	ldr	w5, [x5]
	ldr	w7, [x7]
	ldr	w19, [x19]
	ldr	w20, [x20]
	madd	w5, w5, w11, w6
	madd	w6, w7, w11, w21
	madd	w7, w19, w11, w22
	madd	w19, w20, w11, w23
	add	w0, w5, w0
	add	w16, w6, w16
	add	w15, w7, w15
	add	w14, w19, w14
	add	x17, x17, #96
	cmp	x2, x17
	b.ne	LBB0_30
; %bb.31:
	add	w16, w16, w0
	add	w15, w15, w16
	add	w0, w14, w15
	cmp	x13, x9
	b.eq	LBB0_34
LBB0_32:
	mov	w14, #24
	madd	x12, x13, x14, x12
	ldr	w8, [x8, #12]
	add	x12, x12, #16
	sub	x9, x9, x13
	mov	w13, #33
	mov	w14, #9
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldur	x15, [x12, #-8]
	sub	x16, x12, #16
	cmp	x15, x10
	csel	x15, x16, x12, eq
	csel	w16, w14, w13, eq
	mul	w16, w8, w16
	ldr	w15, [x15]
	madd	w15, w15, w11, w16
	add	w0, w15, w0
	add	x12, x12, #24
	subs	x9, x9, #1
	b.ne	LBB0_33
LBB0_34:
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_RGB24,8,3           ; @AV_PIX_FMT_RGB24
	.comm	_MB_AREA,4,2                    ; @MB_AREA
	.comm	_CHUNK_HEADER_SIZE,4,2          ; @CHUNK_HEADER_SIZE
	.comm	_FF_LAMBDA_SCALE,4,2            ; @FF_LAMBDA_SCALE
	.comm	_ENC_V1,8,3                     ; @ENC_V1
	.comm	_ENC_V4,8,3                     ; @ENC_V4
	.comm	_ENC_SKIP,8,3                   ; @ENC_SKIP
	.no_dead_strip	_calculate_mode_score
.subsections_via_symbols
