	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mt9m111_video_probe
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mt9m111_video_probe:                   ## @mt9m111_video_probe
	.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
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_mt9m111
	movl	8(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	movq	%rax, %r14
	callq	_to_soc_camera_host
	movq	(%rax), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_2
## %bb.3:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1,1,1]
	movups	%xmm0, (%r14)
	movq	_CHIP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_reg_read
	cmpl	$5260, %eax                     ## imm = 0x148C
	je	LBB0_6
## %bb.4:
	cmpl	$5178, %eax                     ## imm = 0x143A
	jne	LBB0_8
## %bb.5:
	movq	_V4L2_IDENT_MT9M111@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$5178, %edx                     ## imm = 0x143A
	jmp	LBB0_7
LBB0_2:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_V4L2_IDENT_MT9M112@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r14)
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$5260, %edx                     ## imm = 0x148C
LBB0_7:
	callq	_dev_info
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt9m111_init                   ## TAILCALL
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_CHIP_VERSION,4,2               ## @CHIP_VERSION
	.comm	_V4L2_IDENT_MT9M111,4,2         ## @V4L2_IDENT_MT9M111
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Detected a MT9M111/MT9M131 chip ID %x\n"

	.comm	_V4L2_IDENT_MT9M112,4,2         ## @V4L2_IDENT_MT9M112
L_.str.1:                               ## @.str.1
	.asciz	"Detected a MT9M112 chip ID %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"No MT9M111/MT9M112/MT9M131 chip detected register read %x\n"

	.no_dead_strip	_mt9m111_video_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m111_video_probe
_mt9m111_video_probe:                   ; @mt9m111_video_probe
	.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	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_to_mt9m111
	mov	x20, x0
	ldr	w0, [x21, #8]
	cbz	w0, LBB0_5
; %bb.1:
	bl	_to_soc_camera_host
	ldr	x8, [x0]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	movi.4s	v0, #1
	str	q0, [x20]
Lloh0:
	adrp	x8, _CHIP_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CHIP_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_reg_read
	mov	w8, #5260
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.3:
	mov	x2, x0
	mov	w8, #5178
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.4:
Lloh3:
	adrp	x8, _V4L2_IDENT_MT9M111@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_IDENT_MT9M111@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #16]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #5178
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	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
LBB0_7:
Lloh11:
	adrp	x8, _V4L2_IDENT_MT9M112@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_IDENT_MT9M112@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x20, #16]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #5260
LBB0_8:
	bl	_dev_info
	mov	x0, x19
	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
	b	_mt9m111_init
LBB0_9:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w20, w8
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_CHIP_VERSION,4,2               ; @CHIP_VERSION
	.comm	_V4L2_IDENT_MT9M111,4,2         ; @V4L2_IDENT_MT9M111
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Detected a MT9M111/MT9M131 chip ID %x\n"

	.comm	_V4L2_IDENT_MT9M112,4,2         ; @V4L2_IDENT_MT9M112
l_.str.1:                               ; @.str.1
	.asciz	"Detected a MT9M112 chip ID %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"No MT9M111/MT9M112/MT9M131 chip detected register read %x\n"

	.no_dead_strip	_mt9m111_video_probe
.subsections_via_symbols
