	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9v022_try_fmt
_mt9v022_try_fmt:                       ## @mt9v022_try_fmt
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_v4l2_get_subdevdata
	movq	%rax, %rdi
	callq	_to_mt9v022
	movq	%rax, %r14
	movl	4(%r15), %eax
	movq	_V4L2_MBUS_FMT_SBGGR8_1X8@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_V4L2_MBUS_FMT_SBGGR10_1X10@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %ecx
	leaq	12(%r15), %rdi
	movq	_MT9V022_MIN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MT9V022_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	8(%r15), %r8
	movq	_MT9V022_MIN_HEIGHT@GOTPCREL(%rip), %r9
	movq	16(%r14), %rax
	movq	(%r9), %r9
	addq	%rax, %r9
	movq	_MT9V022_MAX_HEIGHT@GOTPCREL(%rip), %rbx
	addq	(%rbx), %rax
	subq	$8, %rsp
	pushq	$0
	pushq	%rcx
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	4(%r15), %edi
	movl	8(%r14), %edx
	movl	12(%r14), %esi
	callq	_mt9v022_find_datafmt
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	(%r14), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 4(%r15)
LBB0_2:
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MBUS_FMT_SBGGR8_1X8,4,2   ## @V4L2_MBUS_FMT_SBGGR8_1X8
	.comm	_V4L2_MBUS_FMT_SBGGR10_1X10,4,2 ## @V4L2_MBUS_FMT_SBGGR10_1X10
	.comm	_MT9V022_MIN_WIDTH,4,2          ## @MT9V022_MIN_WIDTH
	.comm	_MT9V022_MAX_WIDTH,4,2          ## @MT9V022_MAX_WIDTH
	.comm	_MT9V022_MIN_HEIGHT,8,3         ## @MT9V022_MIN_HEIGHT
	.comm	_MT9V022_MAX_HEIGHT,8,3         ## @MT9V022_MAX_HEIGHT
	.no_dead_strip	_mt9v022_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9v022_try_fmt
_mt9v022_try_fmt:                       ; @mt9v022_try_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	bl	_v4l2_get_subdevdata
	bl	_to_mt9v022
	mov	x20, x0
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x9, _V4L2_MBUS_FMT_SBGGR8_1X8@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MBUS_FMT_SBGGR8_1X8@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
Lloh3:
	adrp	x9, _V4L2_MBUS_FMT_SBGGR10_1X10@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MBUS_FMT_SBGGR10_1X10@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ccmp	w8, w9, #4, ne
	cset	w3, eq
	add	x0, x19, #12
Lloh6:
	adrp	x8, _MT9V022_MIN_WIDTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MT9V022_MIN_WIDTH@GOTPAGEOFF]
Lloh8:
	adrp	x9, _MT9V022_MAX_WIDTH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MT9V022_MAX_WIDTH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	ldr	w2, [x9]
	add	x4, x19, #8
Lloh12:
	adrp	x8, _MT9V022_MIN_HEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT9V022_MIN_HEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	add	x5, x9, x8
Lloh15:
	adrp	x8, _MT9V022_MAX_HEIGHT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MT9V022_MAX_HEIGHT@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	add	x6, x8, x9
	str	wzr, [sp]
	mov	x7, x3
	bl	_v4l_bound_align_image
	ldr	w0, [x19, #4]
	ldp	w2, w1, [x20, #8]
	bl	_mt9v022_find_datafmt
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x0, [x20]
	ldr	w8, [x0, #4]
	str	w8, [x19, #4]
LBB0_2:
	ldr	w8, [x0]
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MBUS_FMT_SBGGR8_1X8,4,2   ; @V4L2_MBUS_FMT_SBGGR8_1X8
	.comm	_V4L2_MBUS_FMT_SBGGR10_1X10,4,2 ; @V4L2_MBUS_FMT_SBGGR10_1X10
	.comm	_MT9V022_MIN_WIDTH,4,2          ; @MT9V022_MIN_WIDTH
	.comm	_MT9V022_MAX_WIDTH,4,2          ; @MT9V022_MAX_WIDTH
	.comm	_MT9V022_MIN_HEIGHT,8,3         ; @MT9V022_MIN_HEIGHT
	.comm	_MT9V022_MAX_HEIGHT,8,3         ; @MT9V022_MAX_HEIGHT
	.no_dead_strip	_mt9v022_try_fmt
.subsections_via_symbols
