	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fimc_m2m_s_selection
_fimc_m2m_s_selection:                  ## @fimc_m2m_s_selection
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %rbx
	movq	40(%rax), %r15
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_fimc_m2m_try_selection
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	(%r14), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%r12d, %r12d
	cmpq	%rcx, %rax
	setne	%r13b
	jne	LBB0_3
## %bb.2:
	movl	8(%r14), %edx
	movl	12(%r14), %esi
	movl	24(%rbx), %ecx
	movl	(%rbx), %r9d
	movl	20(%rbx), %r8d
	jmp	LBB0_4
LBB0_3:
	movl	8(%rbx), %esi
	movl	(%rbx), %r9d
	movl	4(%rbx), %edx
	movl	8(%r14), %r8d
	movl	12(%r14), %ecx
LBB0_4:
	movq	%rbx, %rdi
	callq	_fimc_check_scaler_ratio
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_6:
	movb	%r13b, %r12b
	shlq	$4, %r12
	leaq	(%r12,%rbx), %rax
	addq	$4, %rax
	movups	8(%r14), %xmm0
	movups	%xmm0, (%rax)
	movq	_FIMC_PARAMS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_fimc_ctx_state_set
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of scaler range\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FIMC_PARAMS,4,2                ## @FIMC_PARAMS
	.no_dead_strip	_fimc_m2m_s_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fimc_m2m_s_selection
_fimc_m2m_s_selection:                  ; @fimc_m2m_s_selection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x0, x1
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x21, [x0, #40]
	mov	x1, x20
	bl	_fimc_m2m_try_selection
	cbnz	w0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
	ldr	x9, [x20]
Lloh2:
	ldr	x8, [x8]
	add	x10, x19, #4
	add	x11, x19, #20
	cmp	x9, x8
	csel	x22, x10, x11, eq
	b.ne	LBB0_3
; %bb.2:
	ldp	w2, w1, [x20, #8]
	ldp	w4, w3, [x19, #20]
	b	LBB0_4
LBB0_3:
	ldp	w2, w1, [x19, #4]
	ldp	w4, w3, [x20, #8]
LBB0_4:
	ldr	w5, [x19]
	mov	x0, x19
	bl	_fimc_check_scaler_ratio
	cbz	w0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_v4l2_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	ldur	q0, [x20, #8]
	str	q0, [x22]
Lloh8:
	adrp	x8, _FIMC_PARAMS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FIMC_PARAMS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_fimc_ctx_state_set
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of scaler range\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FIMC_PARAMS,4,2                ; @FIMC_PARAMS
	.no_dead_strip	_fimc_m2m_s_selection
.subsections_via_symbols
