	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m111_video_probe
_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	%rdi, %r15
	callq	_to_mt9m111
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_mt9m111_s_power
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_CHIP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_reg_read
	cmpl	$5260, %eax                     ## imm = 0x148C
	je	LBB0_6
## %bb.3:
	cmpl	$5178, %eax                     ## imm = 0x143A
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	$5178, %edx                     ## imm = 0x143A
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	$5260, %edx                     ## imm = 0x148C
LBB0_7:
	callq	_dev_info
	movq	%r14, %rdi
	callq	_mt9m111_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_v4l2_ctrl_handler_setup
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mt9m111_s_power
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_VERSION,4,2               ## @CHIP_VERSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Detected a MT9M111/MT9M131 chip ID %x\n"

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"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.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	x20, x0
	bl	_to_mt9m111
	mov	x19, x0
	mov	w1, #1
	bl	_mt9m111_s_power
	tbnz	w0, #31, LBB0_4
; %bb.1:
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_5
; %bb.2:
	mov	x2, x0
	mov	w8, #5178
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	w2, #5178
	b	LBB0_6
LBB0_4:
	mov	x21, x0
	b	LBB0_10
LBB0_5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	w2, #5260
LBB0_6:
	bl	_dev_info
	mov	x0, x19
	bl	_mt9m111_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.7:
	add	x0, x19, #4
	bl	_v4l2_ctrl_handler_setup
	mov	x21, x0
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	bl	_mt9m111_s_power
LBB0_10:
	mov	x0, x21
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_VERSION,4,2               ; @CHIP_VERSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Detected a MT9M111/MT9M131 chip ID %x\n"

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"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_mt9m111_video_probe
.subsections_via_symbols
