	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scaling_goodness
_scaling_goodness:                      ## @scaling_goodness
	.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	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	callq	_to_smiapp_sensor
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_v4l2_get_subdevdata
	movl	%r12d, %ebx
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	andl	$-2, %r15d
	andl	$-2, %ebx
	andl	$-2, %esi
	andl	$-2, %r14d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_V4L2_SEL_FLAG_GE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_SCALING_GOODNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r13d
	negl	%r13d
	xorl	%ecx, %ecx
	cmpl	%ebx, %r15d
	cmovgel	%ecx, %r13d
	cmpl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	cmovll	%eax, %ecx
	subl	%ecx, %r13d
	jmp	LBB0_3
LBB0_1:
	xorl	%r13d, %r13d
LBB0_3:
	movq	_V4L2_SEL_FLAG_LE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	cmpl	%ebx, %r15d
	movq	_SCALING_GOODNESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, %edx
	cmovgl	%ecx, %edx
	cmpl	-44(%rbp), %esi                 ## 4-byte Folded Reload
	cmovgl	%ecx, %eax
	addl	%edx, %eax
	subl	%eax, %r13d
LBB0_5:
	movl	%esi, %r12d
	movl	%r15d, %edi
	subl	%ebx, %edi
	callq	_abs
	movq	%rax, %r14
	movl	%r12d, %edi
	subl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_abs
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rdx
	movq	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	xorl	%ecx, %ecx
	cmpl	(%rdx,%rsi,4), %r15d
	jge	LBB0_7
## %bb.6:
	movq	_SCALING_GOODNESS_EXTREME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_7:
	addl	%eax, %r14d
	addl	%ecx, %r14d
	subl	%r14d, %r13d
	movl	%r13d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movl	%r12d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_dev_dbg
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_SEL_FLAG_GE,4,2           ## @V4L2_SEL_FLAG_GE
	.comm	_SCALING_GOODNESS,8,3           ## @SCALING_GOODNESS
	.comm	_V4L2_SEL_FLAG_LE,4,2           ## @V4L2_SEL_FLAG_LE
	.comm	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE,8,3 ## @SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE
	.comm	_SCALING_GOODNESS_EXTREME,8,3   ## @SCALING_GOODNESS_EXTREME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w %d ask_w %d h %d ask_h %d goodness %d\n"

	.no_dead_strip	_scaling_goodness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scaling_goodness
_scaling_goodness:                      ; @scaling_goodness
	.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	x25, x5
	mov	x22, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	bl	_to_smiapp_sensor
	mov	x24, x0
	mov	x0, x23
	bl	_v4l2_get_subdevdata
	mov	x23, x0
	and	w19, w19, #0xfffffffe
	and	w20, w20, #0xfffffffe
	and	w21, w21, #0xfffffffe
	and	w22, w22, #0xfffffffe
Lloh0:
	adrp	x8, _V4L2_SEL_FLAG_GE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_SEL_FLAG_GE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _SCALING_GOODNESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCALING_GOODNESS@GOTPAGEOFF]
	tst	w9, w25
	b.eq	LBB0_2
; %bb.1:
	ldr	w9, [x8]
	cmp	w19, w20
	csneg	w10, wzr, w9, ge
	cmp	w21, w22
	csel	w9, w9, wzr, lt
	sub	w26, w10, w9
	b	LBB0_3
LBB0_2:
	mov	w26, #0
LBB0_3:
Lloh5:
	adrp	x9, _V4L2_SEL_FLAG_LE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_SEL_FLAG_LE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w25
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x8]
	cmp	w19, w20
	csel	w9, w8, wzr, gt
	cmp	w21, w22
	csel	w8, w8, wzr, gt
	add	w8, w8, w9
	sub	w26, w26, w8
LBB0_5:
	sub	w0, w19, w20
	bl	_abs
	mov	x25, x0
	sub	w0, w21, w22
	bl	_abs
Lloh8:
	adrp	x8, _SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE@GOTPAGEOFF]
	ldr	x9, [x24]
Lloh10:
	ldr	x8, [x8]
	ldr	w8, [x9, x8, lsl #2]
Lloh11:
	adrp	x9, _SCALING_GOODNESS_EXTREME@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SCALING_GOODNESS_EXTREME@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w19, w8
	csel	w8, w9, wzr, lt
	add	w9, w25, w0
	add	w8, w9, w8
	sub	w24, w26, w8
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x19
	mov	x3, x20
	mov	x4, x21
	mov	x5, x22
	mov	x6, x24
	bl	_dev_dbg
	mov	x0, x24
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_SEL_FLAG_GE,4,2           ; @V4L2_SEL_FLAG_GE
	.comm	_SCALING_GOODNESS,8,3           ; @SCALING_GOODNESS
	.comm	_V4L2_SEL_FLAG_LE,4,2           ; @V4L2_SEL_FLAG_LE
	.comm	_SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE,8,3 ; @SMIAPP_LIMIT_MIN_X_OUTPUT_SIZE
	.comm	_SCALING_GOODNESS_EXTREME,8,3   ; @SCALING_GOODNESS_EXTREME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w %d ask_w %d h %d ask_h %d goodness %d\n"

	.no_dead_strip	_scaling_goodness
.subsections_via_symbols
