	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ovcamchip_detect
_ovcamchip_detect:                      ## @ovcamchip_detect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	callq	_PDEBUG
	movq	%rbx, %rdi
	callq	_init_camchip
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	testb	$1, (%rbx)
	jne	LBB0_3
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edi
	callq	_PDEBUG
	movq	%rbx, %rdi
	callq	_ov6xx0_detect
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_9
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	callq	_ov7xx0_detect
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_9
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	callq	_PERROR
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_8:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Testing for 0V7xx0"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init OV7xx0"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Testing for 0V6xx0"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to init OV6xx0"

	.no_dead_strip	_ovcamchip_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ovcamchip_detect
_ovcamchip_detect:                      ; @ovcamchip_detect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_PDEBUG
	mov	x0, x19
	bl	_init_camchip
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldrb	w8, [x19]
	tbnz	w8, #0, LBB0_5
; %bb.2:
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #3
	bl	_PDEBUG
	mov	x0, x19
	bl	_ov6xx0_detect
	tbz	x0, #63, LBB0_6
; %bb.3:
Lloh4:
	adrp	x0, l_.str.3@PAGE
Lloh5:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_ov7xx0_detect
	tbnz	x0, #63, LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_PERROR
Lloh10:
	adrp	x8, _EIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Testing for 0V7xx0"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init OV7xx0"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Testing for 0V6xx0"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to init OV6xx0"

	.no_dead_strip	_ovcamchip_detect
.subsections_via_symbols
