	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7xx0_detect
_ov7xx0_detect:                         ## @ov7xx0_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_i2c_get_clientdata
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movl	$4, %edi
	callq	_PDEBUG
	movq	_GENERIC_REG_COM_I@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-25(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ov_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movzbl	-25(%rbp), %esi
	andl	$3, %esi
	je	LBB0_9
## %bb.3:
	cmpb	$3, %sil
	je	LBB0_4
## %bb.5:
	cmpb	$1, %sil
	jne	LBB0_8
## %bb.6:
	leaq	-25(%rbp), %rdx
	movq	%r15, %rdi
	movl	$21, %esi
	callq	_ov_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.7:
	testb	$1, -25(%rbp)
	leaq	L_.str.4(%rip), %rax
	leaq	L_.str.3(%rip), %rdi
	cmoveq	%rax, %rdi
	movq	_CC_OV7620@GOTPCREL(%rip), %rbx
	cmoveq	_CC_OV76BE@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_PERROR
	jmp	LBB0_16
LBB0_9:
	movq	_CC_OV7620@GOTPCREL(%rip), %rbx
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_10
LBB0_4:
	movq	_CC_OV7610@GOTPCREL(%rip), %rbx
	leaq	L_.str.2(%rip), %rdi
LBB0_10:
	callq	_PINFO
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movq	_CC_OV76BE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	_ov76be_ops@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_12:
	movq	_CC_OV7620@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movq	_ov7x20_ops@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str.6(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_PERROR
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_14:
	movq	_ov7x10_ops@GOTPCREL(%rip), %rax
LBB0_15:
	movq	%rax, 8(%r14)
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_GENERIC_REG_COM_I,4,2          ## @GENERIC_REG_COM_I
L_.str.1:                               ## @.str.1
	.asciz	"Error detecting ov7xx0 type"

L_.str.2:                               ## @.str.2
	.asciz	"Camera chip is an OV7610"

	.comm	_CC_OV7610,8,3                  ## @CC_OV7610
L_.str.3:                               ## @.str.3
	.asciz	"Camera chip is an OV7620AE"

	.comm	_CC_OV7620,8,3                  ## @CC_OV7620
L_.str.4:                               ## @.str.4
	.asciz	"Camera chip is an OV76BE"

	.comm	_CC_OV76BE,8,3                  ## @CC_OV76BE
L_.str.5:                               ## @.str.5
	.asciz	"Camera chip is an OV7620"

L_.str.6:                               ## @.str.6
	.asciz	"Unknown camera chip version: %d"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_ov76be_ops,4,2                 ## @ov76be_ops
	.comm	_ov7x20_ops,4,2                 ## @ov7x20_ops
	.comm	_ov7x10_ops,4,2                 ## @ov7x10_ops
	.no_dead_strip	_ov7xx0_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7xx0_detect
_ov7xx0_detect:                         ; @ov7xx0_detect
	.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	x21, x0
	bl	_i2c_get_clientdata
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
Lloh2:
	adrp	x8, _GENERIC_REG_COM_I@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GENERIC_REG_COM_I@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #15
	mov	x0, x21
	bl	_ov_read
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldrb	w8, [sp, #15]
	ands	w9, w8, #0x3
	b.eq	LBB0_7
; %bb.2:
	cmp	w9, #3
	b.eq	LBB0_8
; %bb.3:
	cmp	w9, #1
	b.ne	LBB0_13
; %bb.4:
	add	x2, sp, #15
	mov	x0, x21
	mov	w1, #21
	bl	_ov_read
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldrb	w8, [sp, #15]
Lloh5:
	adrp	x9, l_.str.3@PAGE
Lloh6:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh7:
	adrp	x10, l_.str.4@PAGE
Lloh8:
	add	x10, x10, l_.str.4@PAGEOFF
	tst	w8, #0x1
	csel	x0, x10, x9, eq
Lloh9:
	adrp	x8, _CC_OV7620@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CC_OV7620@GOTPAGEOFF]
Lloh11:
	adrp	x9, _CC_OV76BE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CC_OV76BE@GOTPAGEOFF]
	csel	x20, x9, x8, eq
	b	LBB0_9
LBB0_6:
	mov	x20, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_PERROR
	b	LBB0_16
LBB0_7:
Lloh15:
	adrp	x20, _CC_OV7620@GOTPAGE
Lloh16:
	ldr	x20, [x20, _CC_OV7620@GOTPAGEOFF]
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh19:
	adrp	x20, _CC_OV7610@GOTPAGE
Lloh20:
	ldr	x20, [x20, _CC_OV7610@GOTPAGEOFF]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	bl	_PINFO
	ldr	x8, [x20]
	str	x8, [x19]
Lloh23:
	adrp	x9, _CC_OV76BE@GOTPAGE
Lloh24:
	ldr	x9, [x9, _CC_OV76BE@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	w20, #0
Lloh26:
	adrp	x8, _ov76be_ops@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ov76be_ops@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
Lloh28:
	adrp	x9, _CC_OV7620@GOTPAGE
Lloh29:
	ldr	x9, [x9, _CC_OV7620@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	mov	w20, #0
Lloh31:
	adrp	x8, _ov7x20_ops@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ov7x20_ops@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
	and	w8, w8, #0x3
	str	x8, [sp]
Lloh33:
	adrp	x0, l_.str.6@PAGE
Lloh34:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_PERROR
Lloh35:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_14:
	mov	w20, #0
Lloh38:
	adrp	x8, _ov7x10_ops@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ov7x10_ops@GOTPAGEOFF]
LBB0_15:
	str	x8, [x19, #8]
LBB0_16:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_GENERIC_REG_COM_I,4,2          ; @GENERIC_REG_COM_I
l_.str.1:                               ; @.str.1
	.asciz	"Error detecting ov7xx0 type"

l_.str.2:                               ; @.str.2
	.asciz	"Camera chip is an OV7610"

	.comm	_CC_OV7610,8,3                  ; @CC_OV7610
l_.str.3:                               ; @.str.3
	.asciz	"Camera chip is an OV7620AE"

	.comm	_CC_OV7620,8,3                  ; @CC_OV7620
l_.str.4:                               ; @.str.4
	.asciz	"Camera chip is an OV76BE"

	.comm	_CC_OV76BE,8,3                  ; @CC_OV76BE
l_.str.5:                               ; @.str.5
	.asciz	"Camera chip is an OV7620"

l_.str.6:                               ; @.str.6
	.asciz	"Unknown camera chip version: %d"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_ov76be_ops,4,2                 ; @ov76be_ops
	.comm	_ov7x20_ops,4,2                 ; @ov7x20_ops
	.comm	_ov7x10_ops,4,2                 ; @ov7x10_ops
	.no_dead_strip	_ov7xx0_detect
.subsections_via_symbols
