	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function predictor_calc_error
_predictor_calc_error:                  ## @predictor_calc_error
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movslq	%edx, %rbx
	movl	-4(%rsi,%rbx,4), %edi
	imull	-4(%r14,%rbx,4), %edi
	movq	_LATTICE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shift_down
	subl	%eax, %r13d
	cmpl	$2, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	jl	LBB0_3
## %bb.1:
	leal	-2(%r15), %eax
	leaq	(%r12,%rax,4), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	leaq	(%r14,%rax,4), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %eax
	subl	%r15d, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %ebx
	movl	(%r12,%r15,4), %r14d
	movl	%r14d, %edi
	imull	%ebx, %edi
	movq	_LATTICE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_shift_down
	subl	%eax, %r13d
	imull	%r13d, %ebx
	movq	_LATTICE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_shift_down
	addl	%r14d, %eax
	movl	%eax, 4(%r12,%r15,4)
	decq	%r15
	cmpl	%r15d, -64(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_2
LBB0_3:
	movq	_SAMPLE_FACTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$16, %eax
	cmpl	%eax, %r13d
	cmovgel	%eax, %r13d
	negl	%eax
	cmpl	%eax, %r13d
	cmovgl	%r13d, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LATTICE_SHIFT,4,2              ## @LATTICE_SHIFT
	.comm	_SAMPLE_FACTOR,4,2              ## @SAMPLE_FACTOR
	.no_dead_strip	_predictor_calc_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function predictor_calc_error
_predictor_calc_error:                  ; @predictor_calc_error
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	sub	w23, w2, #1
	sbfiz	x8, x23, #2, #32
	ldr	w9, [x0, x8]
	ldr	w8, [x1, x8]
	mul	w0, w8, w9
Lloh0:
	adrp	x24, _LATTICE_SHIFT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _LATTICE_SHIFT@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_shift_down
	sub	w21, w21, w0
	subs	w8, w22, #2
	b.lt	LBB0_3
; %bb.1:
	lsl	x8, x8, #2
	add	x22, x19, x8
	add	x20, x20, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x20], #-4
	ldr	w26, [x22]
	mul	w0, w26, w25
	ldr	w1, [x24]
	bl	_shift_down
	sub	w21, w21, w0
	mul	w0, w21, w25
	ldr	w1, [x24]
	bl	_shift_down
	add	w8, w0, w26
	str	w8, [x22, #4]
	sub	x22, x22, #4
	sub	w23, w23, #1
	cbnz	w23, LBB0_2
LBB0_3:
Lloh2:
	adrp	x8, _SAMPLE_FACTOR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SAMPLE_FACTOR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	lsl	w8, w8, #16
	cmp	w21, w8
	csel	w9, w21, w8, lt
	neg	w10, w8
	cmp	w9, w10
	csneg	w0, w9, w8, gt
	str	w0, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LATTICE_SHIFT,4,2              ; @LATTICE_SHIFT
	.comm	_SAMPLE_FACTOR,4,2              ; @SAMPLE_FACTOR
	.no_dead_strip	_predictor_calc_error
.subsections_via_symbols
