	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2680_power_on
_ov2680_power_on:                       ## @ov2680_power_on
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_ov2680_to_dev
	xorl	%r14d, %r14d
	cmpl	$0, (%rbx)
	je	LBB0_1
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r15
	movq	_OV2680_NUM_SUPPLIES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %esi
	callq	_regulator_bulk_enable
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	cmpl	$0, 8(%rbx)
	je	LBB0_4
## %bb.7:
	movq	%rbx, %rdi
	callq	_ov2680_power_down
	movq	%rbx, %rdi
	callq	_ov2680_power_up
LBB0_8:
	movl	4(%rbx), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_ov2680_stream_enable
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	%rbx, %rdi
	callq	_ov2680_stream_disable
	jmp	LBB0_11
LBB0_2:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %r14d
	jmp	LBB0_11
LBB0_4:
	movq	_OV2680_REG_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_ov2680_write_reg
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %r14d
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r14d
	jmp	LBB0_11
LBB0_6:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_OV2680_NUM_SUPPLIES,4,2        ## @OV2680_NUM_SUPPLIES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable regulators: %d\n"

	.comm	_OV2680_REG_SOFT_RESET,4,2      ## @OV2680_REG_SOFT_RESET
L_.str.1:                               ## @.str.1
	.asciz	"sensor soft reset failed\n"

	.no_dead_strip	_ov2680_power_on
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2680_power_on
_ov2680_power_on:                       ; @ov2680_power_on
	.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	_ov2680_to_dev
	ldr	w8, [x19]
	cbz	w8, LBB0_2
LBB0_1:
	mov	w21, #0
	b	LBB0_12
LBB0_2:
	mov	x20, x0
Lloh0:
	adrp	x8, _OV2680_NUM_SUPPLIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OV2680_NUM_SUPPLIES@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_regulator_bulk_enable
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x0, x19
	bl	_ov2680_power_down
	mov	x0, x19
	bl	_ov2680_power_up
LBB0_5:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	tbnz	w0, #31, LBB0_11
; %bb.6:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_ov2680_stream_enable
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	mov	x0, x19
	bl	_ov2680_stream_disable
	b	LBB0_1
LBB0_7:
	mov	x21, x0
	str	x21, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _OV2680_REG_SOFT_RESET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OV2680_REG_SOFT_RESET@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_ov2680_write_reg
	cbz	w0, LBB0_13
; %bb.9:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_11:
	mov	x21, x0
LBB0_12:
	mov	x0, x21
	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
LBB0_13:
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_OV2680_NUM_SUPPLIES,4,2        ; @OV2680_NUM_SUPPLIES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable regulators: %d\n"

	.comm	_OV2680_REG_SOFT_RESET,4,2      ; @OV2680_REG_SOFT_RESET
l_.str.1:                               ; @.str.1
	.asciz	"sensor soft reset failed\n"

	.no_dead_strip	_ov2680_power_on
.subsections_via_symbols
