	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vc032x_probe_sensor
_vc032x_probe_sensor:                   ## @vc032x_probe_sensor
	.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, %r15
	movq	_FL_SAMSUNG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$1, %edx
	movl	$45825, %ecx                    ## imm = 0xB301
	callq	_reg_w
	movq	%r15, %rdi
	movl	$137, %esi
	movl	$61695, %edx                    ## imm = 0xF0FF
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_reg_w
LBB0_2:
	movq	%r15, %rdi
	movl	$161, %esi
	movl	$49103, %edx                    ## imm = 0xBFCF
	movl	$1, %ecx
	callq	_reg_r
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r15), %rax
	movq	_BRIDGE_VC0321@GOTPCREL(%rip), %rbx
	xorl	%ecx, %ecx
	cmpq	(%rbx), %rax
	movq	(%r15), %rax
	setne	%cl
	addl	%ecx, %ecx
	incl	%ecx
	movl	(%rax), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_gspca_dbg
	movq	8(%r15), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_vc0321_probe_data@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_vc0323_probe_data@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %r12d
	movl	$-1, %eax
	testl	%r12d, %r12d
	jle	LBB0_21
## %bb.6:
	addq	$24, %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incl	%r13d
	addq	$28, %rbx
	cmpl	%r13d, %r12d
	je	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$2, %edx
	movl	$45876, %ecx                    ## imm = 0xB334
	callq	_reg_w
	movl	-24(%rbx), %edx
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$45824, %ecx                    ## imm = 0xB300
	callq	_reg_w
	movl	-20(%rbx), %edx
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$45824, %ecx                    ## imm = 0xB300
	callq	_reg_w
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$1, %edx
	movl	$45832, %ecx                    ## imm = 0xB308
	callq	_reg_w
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$12, %edx
	movl	$45833, %ecx                    ## imm = 0xB309
	callq	_reg_w
	movl	-16(%rbx), %edx
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$45877, %ecx                    ## imm = 0xB335
	callq	_reg_w
	movl	-12(%rbx), %edx
	movq	%r15, %rdi
	movl	$160, %esi
	movl	$45825, %ecx                    ## imm = 0xB301
	callq	_reg_w
	movl	-8(%rbx), %esi
	movq	%r15, %rdi
	callq	_read_sensor_register
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_13
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	movq	_D_PROBE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	leaq	L_.str.1(%rip), %rdx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	callq	_gspca_dbg
	cmpl	-4(%rbx), %r14d
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$33347, %r14d                   ## imm = 0x8243
	je	LBB0_17
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$30323, %r14d                   ## imm = 0x7673
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$12592, %r14d                   ## imm = 0x3130
	jne	LBB0_7
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$130, -8(%rbx)
	jne	LBB0_7
## %bb.14:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$131, %esi
	callq	_read_sensor_register
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
	jmp	LBB0_7
LBB0_15:
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_16:
	movl	(%rbx), %eax
	jmp	LBB0_21
LBB0_17:
	movq	_SENSOR_MI0360@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movq	_SENSOR_OV7670@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_19:
	movq	_SENSOR_PO3130NC@GOTPCREL(%rip), %rax
LBB0_20:
	movl	(%rax), %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FL_SAMSUNG,4,2                 ## @FL_SAMSUNG
	.comm	_D_PROBE,4,2                    ## @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vc032%d check sensor header %02x\n"

	.comm	_BRIDGE_VC0321,8,3              ## @BRIDGE_VC0321
	.comm	_vc0321_probe_data,8,3          ## @vc0321_probe_data
	.comm	_vc0323_probe_data,8,3          ## @vc0323_probe_data
L_.str.1:                               ## @.str.1
	.asciz	"Sensor ID %04x (%d)\n"

	.comm	_SENSOR_PO3130NC,4,2            ## @SENSOR_PO3130NC
	.comm	_SENSOR_OV7670,4,2              ## @SENSOR_OV7670
	.comm	_SENSOR_MI0360,4,2              ## @SENSOR_MI0360
	.no_dead_strip	_vc032x_probe_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vc032x_probe_sensor
_vc032x_probe_sensor:                   ; @vc032x_probe_sensor
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _FL_SAMSUNG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FL_SAMSUNG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #160
	mov	w2, #1
	mov	w3, #45825
	bl	_reg_w
	mov	x0, x19
	mov	w1, #137
	mov	w2, #61695
	mov	w3, #65535
	bl	_reg_w
LBB0_2:
	mov	x0, x19
	mov	w1, #161
	mov	w2, #49103
	mov	w3, #1
	bl	_reg_r
Lloh3:
	adrp	x24, _D_PROBE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _D_PROBE@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh5:
	adrp	x20, _BRIDGE_VC0321@GOTPAGE
Lloh6:
	ldr	x20, [x20, _BRIDGE_VC0321@GOTPAGEOFF]
	ldr	x8, [x20]
	ldp	x10, x9, [x19]
	cmp	x9, x8
	mov	w8, #3
	csinc	w3, w8, wzr, ne
	ldr	w4, [x10]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_gspca_dbg
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _vc0323_probe_data@GOTPAGE
Lloh10:
	ldr	x9, [x9, _vc0323_probe_data@GOTPAGEOFF]
	ldr	x10, [x20]
Lloh11:
	adrp	x11, _vc0321_probe_data@GOTPAGE
Lloh12:
	ldr	x11, [x11, _vc0321_probe_data@GOTPAGEOFF]
	cmp	x8, x10
	csel	x8, x11, x9, eq
	ldr	x22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.3:
	mov	x20, x0
	mov	w21, #0
	add	x25, x22, #12
	mov	w26, #33347
	mov	w27, #30323
	mov	w28, #12592
Lloh13:
	adrp	x22, l_.str.1@PAGE
Lloh14:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w21, w21, #1
	add	x25, x25, #28
	cmp	w20, w21
	b.eq	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #160
	mov	w2, #2
	mov	w3, #45876
	bl	_reg_w
	ldur	w2, [x25, #-12]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45824
	bl	_reg_w
	ldur	w2, [x25, #-8]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45824
	bl	_reg_w
	mov	x0, x19
	mov	w1, #160
	mov	w2, #1
	mov	w3, #45832
	bl	_reg_w
	mov	x0, x19
	mov	w1, #160
	mov	w2, #12
	mov	w3, #45833
	bl	_reg_w
	ldur	w2, [x25, #-4]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45877
	bl	_reg_w
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #160
	mov	w3, #45825
	bl	_reg_w
	ldr	w1, [x25, #4]
	mov	x0, x19
	bl	_read_sensor_register
	mov	x23, x0
	cbz	w0, LBB0_10
LBB0_6:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x23
	mov	x4, x21
	bl	_gspca_dbg
	ldr	w8, [x25, #8]
	cmp	w23, w8
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, w26
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, w27
	b.eq	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w23, w28
	b.ne	LBB0_4
	b	LBB0_17
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25, #4]
	cmp	w8, #130
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	w1, #131
	bl	_read_sensor_register
	mov	x23, x0
	cbnz	w0, LBB0_6
	b	LBB0_4
LBB0_12:
	mov	w0, #-1
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	w0, [x25, #12]
	b	LBB0_13
LBB0_15:
Lloh15:
	adrp	x8, _SENSOR_MI0360@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SENSOR_MI0360@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_16:
Lloh18:
	adrp	x8, _SENSOR_OV7670@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SENSOR_OV7670@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	b	LBB0_13
LBB0_17:
Lloh21:
	adrp	x8, _SENSOR_PO3130NC@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SENSOR_PO3130NC@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_FL_SAMSUNG,4,2                 ; @FL_SAMSUNG
	.comm	_D_PROBE,4,2                    ; @D_PROBE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vc032%d check sensor header %02x\n"

	.comm	_BRIDGE_VC0321,8,3              ; @BRIDGE_VC0321
	.comm	_vc0321_probe_data,8,3          ; @vc0321_probe_data
	.comm	_vc0323_probe_data,8,3          ; @vc0323_probe_data
l_.str.1:                               ; @.str.1
	.asciz	"Sensor ID %04x (%d)\n"

	.comm	_SENSOR_PO3130NC,4,2            ; @SENSOR_PO3130NC
	.comm	_SENSOR_OV7670,4,2              ; @SENSOR_OV7670
	.comm	_SENSOR_MI0360,4,2              ; @SENSOR_MI0360
	.no_dead_strip	_vc032x_probe_sensor
.subsections_via_symbols
