	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_probe                  ## -- Begin function mt9m111_probe
	.p2align	4, 0x90
_mt9m111_probe:                         ## @mt9m111_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	%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	%rdi, %r14
	movq	$0, -48(%rbp)
	movq	_force_sensor@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_MT9M111_SENSOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.2:
	movq	_mt9m111@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_14:
	movq	_mt9m111_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, 8(%r14)
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_3:
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_gspca_dbg
	movq	_preinit_mt9m111@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	movq	_BRIDGE@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movdqu	16(%rax), %xmm0
	pshufd	$232, %xmm0, %xmm0              ## xmm0 = xmm0[0,2,2,3]
	movq	%xmm0, -48(%rbp)
	movq	8(%rax), %rsi
	movq	%r14, %rdi
	leaq	-48(%rbp), %rdx
	movl	$2, %ecx
	callq	_m5602_write_sensor
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	orl	%eax, %r13d
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rcx
	cmpq	(%r15), %rcx
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rax), %rsi
	movq	16(%rax), %rdx
	movq	%r14, %rdi
	callq	_m5602_write_bridge
	jmp	LBB0_8
LBB0_9:
	testl	%r13d, %r13d
	js	LBB0_15
LBB0_10:
	movq	_MT9M111_SC_CHIPVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$2, %ecx
	callq	_m5602_read_sensor
	testq	%rax, %rax
	je	LBB0_11
LBB0_16:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	cmpl	$20, -48(%rbp)
	jne	LBB0_16
## %bb.12:
	cmpl	$58, -44(%rbp)
	jne	LBB0_16
## %bb.13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_force_sensor,8,3               ## @force_sensor
	.comm	_MT9M111_SENSOR,8,3             ## @MT9M111_SENSOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Forcing a %s sensor\n"

	.comm	_mt9m111,4,2                    ## @mt9m111
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_D_PROBE,4,2                    ## @D_PROBE
L_.str.1:                               ## @.str.1
	.asciz	"Probing for a mt9m111 sensor\n"

	.comm	_preinit_mt9m111,8,3            ## @preinit_mt9m111
	.comm	_BRIDGE,8,3                     ## @BRIDGE
	.comm	_MT9M111_SC_CHIPVER,4,2         ## @MT9M111_SC_CHIPVER
L_.str.2:                               ## @.str.2
	.asciz	"Detected a mt9m111 sensor\n"

	.comm	_mt9m111_modes,8,3              ## @mt9m111_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mt9m111_probe                  ; -- Begin function mt9m111_probe
	.p2align	2
_mt9m111_probe:                         ; @mt9m111_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _force_sensor@GOTPAGE
Lloh1:
	ldr	x8, [x8, _force_sensor@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _MT9M111_SENSOR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MT9M111_SENSOR@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.2:
Lloh6:
	adrp	x8, _mt9m111@GOTPAGE
Lloh7:
	ldr	x8, [x8, _mt9m111@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
LBB0_3:
	bl	_pr_info
Lloh11:
	adrp	x8, _mt9m111_modes@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mt9m111_modes@GOTPAGEOFF]
	ldr	x9, [x8]
	str	x9, [x19]
	ldr	x0, [x8]
	bl	_ARRAY_SIZE
	mov	w20, #0
	str	w0, [x19, #8]
	b	LBB0_13
LBB0_4:
Lloh13:
	adrp	x8, _D_PROBE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _D_PROBE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
Lloh18:
	adrp	x21, _preinit_mt9m111@GOTPAGE
Lloh19:
	ldr	x21, [x21, _preinit_mt9m111@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.5:
	mov	x22, #0
	mov	w20, #0
Lloh20:
	adrp	x23, _BRIDGE@GOTPAGE
Lloh21:
	ldr	x23, [x23, _BRIDGE@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	q0, [x8, #16]
	xtn.2s	v0, v0
	str	d0, [sp, #8]
	ldr	x1, [x8, #8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_write_sensor
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	orr	w20, w0, w20
	add	x22, x22, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x9, [x8]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldp	x1, x2, [x8, #8]
	mov	x0, x19
	bl	_m5602_write_bridge
	b	LBB0_7
LBB0_10:
	tbnz	w20, #31, LBB0_13
LBB0_11:
Lloh22:
	adrp	x8, _MT9M111_SC_CHIPVER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MT9M111_SC_CHIPVER@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #2
	bl	_m5602_read_sensor
	cbz	x0, LBB0_14
LBB0_12:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
	ldr	w8, [sp, #8]
	cmp	w8, #20
	b.ne	LBB0_12
; %bb.15:
	ldr	w8, [sp, #12]
	cmp	w8, #58
	b.ne	LBB0_12
; %bb.16:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_force_sensor,8,3               ; @force_sensor
	.comm	_MT9M111_SENSOR,8,3             ; @MT9M111_SENSOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Forcing a %s sensor\n"

	.comm	_mt9m111,4,2                    ; @mt9m111
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_D_PROBE,4,2                    ; @D_PROBE
l_.str.1:                               ; @.str.1
	.asciz	"Probing for a mt9m111 sensor\n"

	.comm	_preinit_mt9m111,8,3            ; @preinit_mt9m111
	.comm	_BRIDGE,8,3                     ; @BRIDGE
	.comm	_MT9M111_SC_CHIPVER,4,2         ; @MT9M111_SC_CHIPVER
l_.str.2:                               ; @.str.2
	.asciz	"Detected a mt9m111 sensor\n"

	.comm	_mt9m111_modes,8,3              ; @mt9m111_modes
.subsections_via_symbols
