	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5647_detect
_ov5647_detect:                         ## @ov5647_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, %rbx
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	_OV5647_SW_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_ov5647_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movq	_OV5647_REG_CHIPID_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov5647_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movl	-28(%rbp), %edx
	cmpl	$86, %edx
	jne	LBB0_3
## %bb.5:
	movq	_OV5647_REG_CHIPID_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_ov5647_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movl	-28(%rbp), %edx
	cmpl	$71, %edx
	jne	LBB0_7
## %bb.8:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_ov5647_write
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OV5647_SW_RESET,4,2            ## @OV5647_SW_RESET
	.comm	_OV5647_REG_CHIPID_H,4,2        ## @OV5647_REG_CHIPID_H
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ID High expected 0x56 got %x"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_OV5647_REG_CHIPID_L,4,2        ## @OV5647_REG_CHIPID_L
L_.str.1:                               ## @.str.1
	.asciz	"ID Low expected 0x47 got %x"

	.no_dead_strip	_ov5647_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5647_detect
_ov5647_detect:                         ; @ov5647_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	x19, x0
	bl	_v4l2_get_subdevdata
	mov	x20, x0
Lloh0:
	adrp	x21, _OV5647_SW_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _OV5647_SW_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_ov5647_write
	tbnz	w0, #31, LBB0_9
; %bb.1:
Lloh2:
	adrp	x8, _OV5647_REG_CHIPID_H@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OV5647_REG_CHIPID_H@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ov5647_read
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	w2, [sp, #12]
	cmp	w2, #86
	b.ne	LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _OV5647_REG_CHIPID_L@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OV5647_REG_CHIPID_L@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_ov5647_read
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w2, [sp, #12]
	cmp	w2, #71
	b.ne	LBB0_7
; %bb.5:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_ov5647_write
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x20
	bl	_dev_err
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OV5647_SW_RESET,4,2            ; @OV5647_SW_RESET
	.comm	_OV5647_REG_CHIPID_H,4,2        ; @OV5647_REG_CHIPID_H
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ID High expected 0x56 got %x"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_OV5647_REG_CHIPID_L,4,2        ; @OV5647_REG_CHIPID_L
l_.str.1:                               ; @.str.1
	.asciz	"ID Low expected 0x47 got %x"

	.no_dead_strip	_ov5647_detect
.subsections_via_symbols
