	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_sbad
_get_sbad:                              ## @get_sbad
	.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	$72, %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
	movl	%ecx, %r12d
	movl	%edx, %r14d
	movl	%esi, %eax
	movq	%rdi, %r15
	movq	64(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	56(%rdi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	48(%rdi), %rsi
	movq	40(%rdi), %rdx
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movl	%eax, %edi
	callq	_av_clip
	movl	%eax, %ebx
	movq	24(%r15), %rdx
	movq	32(%r15), %rsi
	movl	%r14d, -72(%rbp)                ## 4-byte Spill
	movl	%r14d, %edi
	callq	_av_clip
	movl	%eax, %r13d
	movl	%r12d, -80(%rbp)                ## 4-byte Spill
	subl	%ebx, %r12d
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rbx
	movq	%rbx, %rdi
	subq	48(%r15), %rdi
	movq	40(%r15), %rsi
	subq	%rbx, %rsi
	callq	_FFMIN
	movq	%rax, %r14
	negq	%r14
	movq	%rbx, %rdi
	subq	48(%r15), %rdi
	movq	40(%r15), %rsi
	subq	%rbx, %rsi
	callq	_FFMIN
	movl	%r12d, %edi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_av_clip
	movl	%eax, %r12d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	subl	%r13d, %r14d
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	movslq	%r13d, %rbx
	movq	%rbx, %rdi
	subq	32(%r15), %rdi
	movq	24(%r15), %rsi
	subq	%rbx, %rsi
	callq	_FFMIN
	movq	%rax, %r13
	negq	%r13
	movq	%rbx, %rdi
	subq	32(%r15), %rdi
	movq	24(%r15), %rsi
	subq	%rbx, %rsi
	callq	_FFMIN
	movl	%r14d, %edi
	movq	%r13, %rsi
	movq	%rax, %rdx
	callq	_av_clip
	movq	%r15, %r11
                                        ## kill: def $eax killed $eax def $rax
	movl	4(%r15), %edi
	xorl	%r10d, %r10d
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	-96(%rbp), %r9                  ## 8-byte Reload
	leal	(%rax,%r9), %edx
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	imull	%r8d, %edx
	movslq	%edx, %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rdx,8), %r15
	subl	%eax, %r9d
	imull	%r8d, %r9d
	movslq	%r9d, %rax
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,8), %rcx
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	subl	%r12d, %r14d
	addl	%eax, %r12d
	xorl	%ebx, %ebx
	movq	%r8, %rax
	movq	%r12, %r13
	movq	%r11, -104(%rbp)                ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r10d
	addq	%rax, %r14
	addq	%rax, %r13
	cmpl	%edi, %r10d
	jge	LBB0_8
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%edi, %edi
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r10, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leal	(%r12,%r13), %eax
	cltq
	movq	(%r15,%rax,8), %rdi
	leal	(%r14,%r12), %eax
	cltq
	subq	(%rcx,%rax,8), %rdi
	movq	%rcx, %rbx
	callq	_FFABS
	movq	%rbx, %rcx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	-104(%rbp), %r11                ## 8-byte Reload
	cltq
	addq	%rax, %rbx
	incq	%r12
	movslq	4(%r11), %rdi
	cmpq	%rdi, %r12
	jl	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %r10                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
LBB0_8:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	subl	-72(%rbp), %r15d                ## 4-byte Folded Reload
	movl	-80(%rbp), %eax                 ## 4-byte Reload
	subl	-76(%rbp), %eax                 ## 4-byte Folded Reload
	movslq	%eax, %rdi
	subq	16(%r11), %rdi
	movq	%r11, %r12
	callq	_FFABS
	movl	%eax, %r14d
	movslq	%r15d, %rdi
	subq	8(%r12), %rdi
	callq	_FFABS
	addl	%r14d, %eax
	movq	_COST_PRED_SCALE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cltq
	imulq	%rcx, %rax
	addq	%rbx, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COST_PRED_SCALE,4,2            ## @COST_PRED_SCALE
	.no_dead_strip	_get_sbad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_sbad
_get_sbad:                              ; @get_sbad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x8, x1
	mov	x19, x0
	ldr	x10, [x0, #64]
	ldp	x1, x9, [x0, #48]
	stp	x10, x9, [sp]                   ; 16-byte Folded Spill
	ldr	w20, [x0]
	ldr	x2, [x0, #40]
	str	w8, [sp, #20]                   ; 4-byte Folded Spill
	mov	x0, x8
	bl	_av_clip
	mov	x24, x0
	ldp	x2, x1, [x19, #24]
	mov	x0, x23
	bl	_av_clip
	mov	x25, x0
	str	w21, [sp, #28]                  ; 4-byte Folded Spill
	sub	w26, w21, w24
	sxtw	x21, w24
	ldp	x9, x8, [x19, #40]
	sub	x0, x21, x8
	sub	x1, x9, x21
	bl	_FFMIN
	neg	x27, x0
	ldp	x9, x8, [x19, #40]
	sub	x0, x21, x8
	sub	x1, x9, x21
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x26
	mov	x1, x27
	bl	_av_clip
	mov	x26, x0
	str	w22, [sp, #24]                  ; 4-byte Folded Spill
	sub	w27, w22, w25
	sxtw	x21, w25
	ldp	x9, x8, [x19, #24]
	sub	x0, x21, x8
	sub	x1, x9, x21
	bl	_FFMIN
	neg	x28, x0
	ldp	x9, x8, [x19, #24]
	sub	x0, x21, x8
	sub	x1, x9, x21
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x27
	mov	x1, x28
	bl	_av_clip
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x27, #0
	mov	w28, #0
	add	w9, w0, w25
	mul	w9, w9, w20
	ldr	x10, [sp]                       ; 8-byte Folded Reload
	add	x21, x10, w9, sxtw #3
	sub	w9, w25, w0
	mul	w9, w9, w20
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	add	x25, x10, w9, sxtw #3
	sub	w22, w24, w26
	add	w24, w26, w24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w28, w28, #1
	add	x22, x22, x20
	add	x24, x24, x20
	cmp	w28, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x26, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w8, w24, w26
	ldr	x8, [x21, w8, sxtw #3]
	add	w9, w22, w26
	ldr	x9, [x25, w9, sxtw #3]
	sub	x0, x8, x9
	bl	_FFABS
	add	x27, x27, w0, sxtw
	add	x26, x26, #1
	ldrsw	x8, [x19, #4]
	cmp	x26, x8
	b.lt	LBB0_5
	b	LBB0_2
LBB0_6:
	mov	x27, #0
LBB0_7:
	ldp	w9, w8, [sp, #20]               ; 8-byte Folded Reload
	sub	w21, w8, w23
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	sub	w8, w8, w9
	sxtw	x8, w8
	ldr	x9, [x19, #16]
	sub	x0, x8, x9
	bl	_FFABS
	mov	x20, x0
	sxtw	x8, w21
	ldr	x9, [x19, #8]
	sub	x0, x8, x9
	bl	_FFABS
	add	w8, w0, w20
Lloh0:
	adrp	x9, _COST_PRED_SCALE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _COST_PRED_SCALE@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	sxtw	x8, w8
	madd	x0, x8, x9, x27
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_COST_PRED_SCALE,4,2            ; @COST_PRED_SCALE
	.no_dead_strip	_get_sbad
.subsections_via_symbols
