	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m001_video_probe
_mt9m001_video_probe:                   ## @mt9m001_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_mt9m001
	movq	%rax, %r14
	movq	_MT9M001_CHIP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_reg_write
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	movq	_MT9M001_CHIP_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movq	_mt9m001_colour_fmts@GOTPCREL(%rip), %rax
	cmpl	$33809, %ebx                    ## imm = 0x8411
	je	LBB0_4
## %bb.1:
	cmpl	$33825, %ebx                    ## imm = 0x8421
	je	LBB0_4
## %bb.2:
	cmpl	$33841, %ebx                    ## imm = 0x8431
	jne	LBB0_7
## %bb.3:
	movq	_mt9m001_monochrome_fmts@GOTPCREL(%rip), %rax
LBB0_4:
	movq	(%rax), %rdi
	movq	%rdi, 8(%r14)
	callq	_ARRAY_SIZE
	movq	%rax, 24(%r14)
	movq	8(%r14), %rax
	movq	%rax, 16(%r14)
	cmpl	$33841, %ebx                    ## imm = 0x8431
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_info
	movq	%r15, %rdi
	callq	_mt9m001_init
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_ctrl_handler_setup        ## TAILCALL
LBB0_5:
	movl	%eax, %r12d
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_8:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9M001_CHIP_ENABLE,4,2        ## @MT9M001_CHIP_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write: %d\n"

	.comm	_MT9M001_CHIP_VERSION,4,2       ## @MT9M001_CHIP_VERSION
	.comm	_mt9m001_colour_fmts,8,3        ## @mt9m001_colour_fmts
	.comm	_mt9m001_monochrome_fmts,8,3    ## @mt9m001_monochrome_fmts
L_.str.1:                               ## @.str.1
	.asciz	"No MT9M001 chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"Detected a MT9M001 chip ID %x (%s)\n"

L_.str.3:                               ## @.str.3
	.asciz	"C12STM"

L_.str.4:                               ## @.str.4
	.asciz	"C12ST"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to initialise the camera\n"

	.no_dead_strip	_mt9m001_video_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m001_video_probe
_mt9m001_video_probe:                   ; @mt9m001_video_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x0
	bl	_to_mt9m001
	mov	x20, x0
Lloh0:
	adrp	x8, _MT9M001_CHIP_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT9M001_CHIP_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_reg_write
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
Lloh5:
	adrp	x8, _MT9M001_CHIP_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MT9M001_CHIP_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_reg_read
	mov	x21, x0
	mov	w8, #33809
	cmp	w0, w8
	mov	w8, #33825
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _mt9m001_colour_fmts@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mt9m001_colour_fmts@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	w8, #33841
	cmp	w21, w8
	b.ne	LBB0_7
; %bb.3:
Lloh10:
	adrp	x8, _mt9m001_monochrome_fmts@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mt9m001_monochrome_fmts@GOTPAGEOFF]
LBB0_4:
	ldr	x0, [x8]
	str	x0, [x20, #8]
	bl	_ARRAY_SIZE
	ldr	x8, [x20, #8]
Lloh12:
	adrp	x9, l_.str.4@PAGE
Lloh13:
	add	x9, x9, l_.str.4@PAGEOFF
	stp	x8, x0, [x20, #16]
Lloh14:
	adrp	x8, l_.str.3@PAGE
Lloh15:
	add	x8, x8, l_.str.3@PAGEOFF
	mov	w10, #33841
	cmp	w21, w10
	csel	x3, x8, x9, eq
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_info
	mov	x0, x19
	bl	_mt9m001_init
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_v4l2_ctrl_handler_setup
LBB0_6:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_7:
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9M001_CHIP_ENABLE,4,2        ; @MT9M001_CHIP_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write: %d\n"

	.comm	_MT9M001_CHIP_VERSION,4,2       ; @MT9M001_CHIP_VERSION
	.comm	_mt9m001_colour_fmts,8,3        ; @mt9m001_colour_fmts
	.comm	_mt9m001_monochrome_fmts,8,3    ; @mt9m001_monochrome_fmts
l_.str.1:                               ; @.str.1
	.asciz	"No MT9M001 chip detected, register read %x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"Detected a MT9M001 chip ID %x (%s)\n"

l_.str.3:                               ; @.str.3
	.asciz	"C12STM"

l_.str.4:                               ; @.str.4
	.asciz	"C12ST"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to initialise the camera\n"

	.no_dead_strip	_mt9m001_video_probe
.subsections_via_symbols
