	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_skip_errors
_calculate_skip_errors:                 ## @calculate_skip_errors
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%esi, -152(%rbp)                ## 4-byte Spill
	testl	%esi, %esi
	jle	LBB0_8
## %bb.1:
	movq	%r8, %r14
	movq	%rcx, %r8
	movq	%rdx, %rcx
	movq	%rdi, %r13
	movl	(%rdi), %eax
	xorl	%esi, %esi
	movq	_MB_SIZE@GOTPCREL(%rip), %rbx
	xorl	%r11d, %r11d
	movq	%r8, -184(%rbp)                 ## 8-byte Spill
	movq	%rdx, -176(%rbp)                ## 8-byte Spill
	movq	%r9, -168(%rbp)                 ## 8-byte Spill
	movq	%r14, -160(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rdx
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	%edx, %r11d
	cmpl	-152(%rbp), %r11d               ## 4-byte Folded Reload
	jge	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%esi, %rsi
	movl	%r11d, -148(%rbp)               ## 4-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsi, -192(%rbp)                ## 8-byte Spill
	leaq	-128(%rbp), %r14
	movq	%r14, (%rsp)
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	-148(%rbp), %ebx                ## 4-byte Reload
	movl	%ebx, %edx
	leaq	-80(%rbp), %r14
	movq	%r14, %r9
	callq	_get_sub_picture
	leaq	-144(%rbp), %r12
	movq	%r12, (%rsp)
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	movq	-168(%rbp), %r8                 ## 8-byte Reload
	leaq	-112(%rbp), %rbx
	movq	%rbx, %r9
	callq	_get_sub_picture
	movq	%r13, %rdi
	movq	%r14, %rsi
	leaq	-128(%rbp), %rdx
	movq	%rbx, %rcx
	movq	%r12, %r8
	callq	_compute_mb_distortion
	movq	-192(%rbp), %rsi                ## 8-byte Reload
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movq	_MB_SIZE@GOTPCREL(%rip), %rbx
	movq	-184(%rbp), %r8                 ## 8-byte Reload
	movq	8(%r13), %rdx
	movl	%eax, (%rdx,%rsi,4)
	movq	(%rbx), %rdx
	addl	%edx, %r15d
	incq	%rsi
	movl	(%r13), %eax
	cmpl	%eax, %r15d
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-148(%rbp), %r11d               ## 4-byte Reload
	jmp	LBB0_7
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_SIZE,8,3                    ## @MB_SIZE
	.no_dead_strip	_calculate_skip_errors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_skip_errors
_calculate_skip_errors:                 ; @calculate_skip_errors
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	str	w1, [sp, #4]                    ; 4-byte Folded Spill
	cmp	w1, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x24, x0
	mov	w27, #0
	mov	w25, #0
	ldr	w8, [x0]
Lloh3:
	adrp	x28, _MB_SIZE@GOTPAGE
Lloh4:
	ldr	x28, [x28, _MB_SIZE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, w9
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w25, w9
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w8, #0
	b.le	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
	sbfiz	x23, x27, #2, #32
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x5, sp, #72
	add	x6, sp, #24
	mov	x0, x24
	mov	x1, x26
	mov	x2, x25
	mov	x3, x22
	mov	x4, x21
	bl	_get_sub_picture
	add	x5, sp, #40
	add	x6, sp, #8
	mov	x0, x24
	mov	x1, x26
	mov	x2, x25
	mov	x3, x20
	mov	x4, x19
	bl	_get_sub_picture
	add	x1, sp, #72
	add	x2, sp, #24
	add	x3, sp, #40
	add	x4, sp, #8
	mov	x0, x24
	bl	_compute_mb_distortion
	ldr	x8, [x24, #8]
	str	w0, [x8, x23]
	ldr	x9, [x28]
	ldr	w8, [x24]
	add	x23, x23, #4
	add	w27, w27, #1
	add	w26, w26, w9
	cmp	w26, w8
	b.lt	LBB0_6
	b	LBB0_3
LBB0_7:
	ldur	x8, [x29, #-88]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_SIZE,8,3                    ; @MB_SIZE
	.no_dead_strip	_calculate_skip_errors
.subsections_via_symbols
