	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5647_sensor_power
_ov5647_sensor_power:                   ## @ov5647_sensor_power
	.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
	movl	%esi, %r13d
	movq	%rdi, %r15
	callq	_to_state
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_v4l2_get_subdevdata
	movq	%rax, %rbx
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r12), %eax
	testl	%r13d, %r13d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.1:
	xorl	%r13d, %r13d
	movl	$1, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
	movl	8(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movq	_sensor_oe_enable_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_ov5647_write_array
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	callq	___sensor_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_15
## %bb.8:
	movl	8(%r12), %edi
	callq	_clk_disable_unprepare
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_4
LBB0_9:
	xorl	%r13d, %r13d
	movl	$-1, %ebx
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
	movq	_sensor_oe_disable_regs@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_ov5647_write_array
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:
	leaq	L_.str.5(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
LBB0_12:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_set_sw_standby
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:
	leaq	L_.str.6(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
LBB0_14:
	movl	8(%r12), %edi
	callq	_clk_disable_unprepare
LBB0_15:
	addl	(%r12), %ebx
	movl	%ebx, (%r12)
	shrl	$31, %ebx
	movl	%ebx, %edi
	callq	_WARN_ON
LBB0_16:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	movl	%eax, %r13d
	movl	8(%r12), %edi
	callq	_clk_disable_unprepare
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OV5647 power on\n"

L_.str.1:                               ## @.str.1
	.asciz	"clk prepare enable failed\n"

	.comm	_sensor_oe_enable_regs,4,2      ## @sensor_oe_enable_regs
L_.str.2:                               ## @.str.2
	.asciz	"write sensor_oe_enable_regs error\n"

L_.str.3:                               ## @.str.3
	.asciz	"Camera not available, check Power\n"

L_.str.4:                               ## @.str.4
	.asciz	"OV5647 power off\n"

	.comm	_sensor_oe_disable_regs,4,2     ## @sensor_oe_disable_regs
L_.str.5:                               ## @.str.5
	.asciz	"disable oe failed\n"

L_.str.6:                               ## @.str.6
	.asciz	"soft stby failed\n"

	.no_dead_strip	_ov5647_sensor_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5647_sensor_power
_ov5647_sensor_power:                   ; @ov5647_sensor_power
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x23, x0
	bl	_to_state
	mov	x20, x0
	mov	x0, x23
	bl	_v4l2_get_subdevdata
	mov	x21, x0
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cbz	w22, LBB0_3
; %bb.1:
	cbz	w8, LBB0_9
; %bb.2:
	mov	w22, #0
	mov	w8, #1
	b	LBB0_15
LBB0_3:
	cmp	w8, #1
	b.ne	LBB0_13
; %bb.4:
Lloh0:
	adrp	x1, l_.str.4@PAGE
Lloh1:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
Lloh2:
	adrp	x8, _sensor_oe_disable_regs@GOTPAGE
Lloh3:
	ldr	x8, [x8, _sensor_oe_disable_regs@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_ov5647_write_array
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh5:
	adrp	x1, l_.str.5@PAGE
Lloh6:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_6:
	mov	x0, x23
	mov	w1, #1
	bl	_set_sw_standby
	mov	x22, x0
	tbz	w0, #31, LBB0_8
; %bb.7:
Lloh7:
	adrp	x1, l_.str.6@PAGE
Lloh8:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_8:
	ldr	w0, [x20, #8]
	bl	_clk_disable_unprepare
	b	LBB0_14
LBB0_9:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	bl	_clk_prepare_enable
	tbnz	w0, #31, LBB0_17
; %bb.10:
Lloh11:
	adrp	x8, _sensor_oe_enable_regs@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sensor_oe_enable_regs@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x23
	mov	x1, x22
	bl	_ov5647_write_array
	tbnz	w0, #31, LBB0_18
; %bb.11:
	mov	x0, x23
	bl	___sensor_init
	mov	x22, x0
	tbnz	w0, #31, LBB0_19
; %bb.12:
	mov	w8, #1
	b	LBB0_15
LBB0_13:
	mov	w22, #0
LBB0_14:
	mov	w8, #-1
LBB0_15:
	ldr	w9, [x20]
	add	w8, w9, w8
	str	w8, [x20]
	lsr	w0, w8, #31
	bl	_WARN_ON
LBB0_16:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_17:
	mov	x22, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_18:
	mov	x22, x0
	ldr	w0, [x20, #8]
	bl	_clk_disable_unprepare
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_19:
	ldr	w0, [x20, #8]
	bl	_clk_disable_unprepare
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_20:
	mov	x0, x21
	bl	_dev_err
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OV5647 power on\n"

l_.str.1:                               ; @.str.1
	.asciz	"clk prepare enable failed\n"

	.comm	_sensor_oe_enable_regs,4,2      ; @sensor_oe_enable_regs
l_.str.2:                               ; @.str.2
	.asciz	"write sensor_oe_enable_regs error\n"

l_.str.3:                               ; @.str.3
	.asciz	"Camera not available, check Power\n"

l_.str.4:                               ; @.str.4
	.asciz	"OV5647 power off\n"

	.comm	_sensor_oe_disable_regs,4,2     ; @sensor_oe_disable_regs
l_.str.5:                               ; @.str.5
	.asciz	"disable oe failed\n"

l_.str.6:                               ; @.str.6
	.asciz	"soft stby failed\n"

	.no_dead_strip	_ov5647_sensor_power
.subsections_via_symbols
