	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function index_mb
_index_mb:                              ## @index_mb
	.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	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	%edx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
                                        ## kill: def $eax killed $eax def $rax
	imull	%eax, %eax
	leal	(%rax,%rax,2), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movslq	%r13d, %r13
	leaq	(%r12,%r13,4), %rsi
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_squared_diff_macroblock
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	cmovll	%r14d, %r15d
	incq	%r14
	addl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%r15d, %r15d
LBB0_4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_index_mb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function index_mb
_index_mb:                              ; @index_mb
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	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
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cmp	w2, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, x4
	mov	x22, x1
	mov	x23, x0
	mov	w25, #0
	mov	x26, #0
	mov	w24, #0
	mov	w27, w2
	mul	w8, w4, w4
	add	w28, w8, w8, lsl #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x22, w25, sxtw #2
	mov	x0, x23
	mov	x2, x21
	bl	_squared_diff_macroblock
	cmp	w0, w20
	csel	w20, w0, w20, lt
	csel	w24, w26, w24, lt
	add	x26, x26, #1
	add	w25, w25, w28
	cmp	x27, x26
	b.ne	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w24, #0
LBB0_4:
	str	w24, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	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], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_index_mb
.subsections_via_symbols
