	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov6650_video_probe
_ov6650_video_probe:                    ## @ov6650_video_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_v4l2_get_subdevdata
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_to_ov6650
	movq	%rax, %r15
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_v4l2_clk_get
	movl	%eax, (%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movslq	%eax, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_16
LBB0_2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_ov6650_s_power
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	$20, %edi
	callq	_msleep
	movq	_REG_PIDH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ov6650_reg_read
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	movq	_REG_PIDL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ov6650_reg_read
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movq	_REG_MIDH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ov6650_reg_read
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.7:
	movq	_REG_MIDL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ov6650_reg_read
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_8
LBB0_17:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ov6650_s_power
	jmp	LBB0_15
LBB0_3:
	movl	%eax, %r12d
LBB0_15:
	movl	(%r15), %edi
	callq	_v4l2_clk_put
	movl	%r12d, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-72(%rbp), %rdx
	movq	_OV6650_PIDH@GOTPCREL(%rip), %rax
	movq	-64(%rbp), %rcx
	cmpq	(%rax), %rdx
	jne	LBB0_10
## %bb.9:
	movq	_OV6650_PIDL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_10
## %bb.11:
	movq	-56(%rbp), %r8
	movq	-48(%rbp), %r9
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_info
	movq	%r13, %rdi
	callq	_ov6650_reset
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.12:
	movq	%r13, %rdi
	callq	_ov6650_prog_dflt
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_v4l2_ctrl_handler_setup
	movl	%eax, %r12d
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_14:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ov6650_s_power
	testl	%r12d, %r12d
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"v4l2_clk request err: %d\n"

	.comm	_REG_PIDH,4,2                   ## @REG_PIDH
	.comm	_REG_PIDL,4,2                   ## @REG_PIDL
	.comm	_REG_MIDH,4,2                   ## @REG_MIDH
	.comm	_REG_MIDL,4,2                   ## @REG_MIDL
	.comm	_OV6650_PIDH,8,3                ## @OV6650_PIDH
	.comm	_OV6650_PIDL,8,3                ## @OV6650_PIDL
L_.str.1:                               ## @.str.1
	.asciz	"Product ID error 0x%02x:0x%02x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"ov6650 Product ID 0x%02x:0x%02x Manufacturer ID 0x%02x:0x%02x\n"

	.no_dead_strip	_ov6650_video_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov6650_video_probe
_ov6650_video_probe:                    ; @ov6650_video_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x0
	bl	_v4l2_get_subdevdata
	mov	x21, x0
	bl	_to_ov6650
	mov	x19, x0
	mov	x0, x21
	mov	x1, #0
	bl	_v4l2_clk_get
	str	w0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_PTR_ERR
	mov	x22, x0
	sxtw	x2, w22
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_10
LBB0_2:
	mov	x0, x20
	mov	w1, #1
	bl	_ov6650_s_power
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w0, #20
	bl	_msleep
Lloh2:
	adrp	x8, _REG_PIDH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _REG_PIDH@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #40
	mov	x0, x21
	bl	_ov6650_reg_read
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x8, _REG_PIDL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _REG_PIDL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #32
	mov	x0, x21
	bl	_ov6650_reg_read
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
Lloh8:
	adrp	x8, _REG_MIDH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _REG_MIDH@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	add	x2, sp, #24
	mov	x0, x21
	bl	_ov6650_reg_read
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _REG_MIDL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REG_MIDL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x21
	bl	_ov6650_reg_read
	mov	x22, x0
	cbz	w0, LBB0_11
LBB0_7:
	mov	x0, x20
	mov	w1, #0
	bl	_ov6650_s_power
	b	LBB0_9
LBB0_8:
	mov	x22, x0
LBB0_9:
	ldr	w0, [x19]
	bl	_v4l2_clk_put
LBB0_10:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldp	x3, x2, [sp, #32]
Lloh14:
	adrp	x8, _OV6650_PIDH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OV6650_PIDH@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ne	LBB0_16
; %bb.12:
Lloh17:
	adrp	x8, _OV6650_PIDL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OV6650_PIDL@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ne	LBB0_16
; %bb.13:
	ldp	x5, x4, [sp, #16]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_info
	mov	x0, x21
	bl	_ov6650_reset
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.14:
	mov	x0, x21
	bl	_ov6650_prog_dflt
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.15:
	add	x0, x19, #4
	bl	_v4l2_ctrl_handler_setup
	mov	x22, x0
	b	LBB0_17
LBB0_16:
	str	x3, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_17:
	mov	x0, x20
	mov	w1, #0
	bl	_ov6650_s_power
	cbnz	w22, LBB0_9
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"v4l2_clk request err: %d\n"

	.comm	_REG_PIDH,4,2                   ; @REG_PIDH
	.comm	_REG_PIDL,4,2                   ; @REG_PIDL
	.comm	_REG_MIDH,4,2                   ; @REG_MIDH
	.comm	_REG_MIDL,4,2                   ; @REG_MIDL
	.comm	_OV6650_PIDH,8,3                ; @OV6650_PIDH
	.comm	_OV6650_PIDL,8,3                ; @OV6650_PIDL
l_.str.1:                               ; @.str.1
	.asciz	"Product ID error 0x%02x:0x%02x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"ov6650 Product ID 0x%02x:0x%02x Manufacturer ID 0x%02x:0x%02x\n"

	.no_dead_strip	_ov6650_video_probe
.subsections_via_symbols
