	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7251_s_power
_ov7251_s_power:                        ## @ov7251_s_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_to_ov7251
	movq	%rax, %r12
	leaq	4(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	xorl	%r15d, %r15d
	cmpl	%eax, (%r12)
	je	LBB0_8
## %bb.1:
	movq	%r12, %rdi
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.2:
	callq	_ov7251_set_power_on
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_ov7251_global_init_setting@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ov7251_set_register_array
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	$1, (%r12)
	jmp	LBB0_8
LBB0_7:
	callq	_ov7251_set_power_off
	movl	$0, (%r12)
	jmp	LBB0_8
LBB0_3:
	movl	%eax, %r15d
	jmp	LBB0_8
LBB0_5:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r12, %rdi
	callq	_ov7251_set_power_off
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ov7251_global_init_setting,4,2 ## @ov7251_global_init_setting
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not set init registers\n"

	.no_dead_strip	_ov7251_s_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7251_s_power
_ov7251_s_power:                        ; @ov7251_s_power
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	bl	_to_ov7251
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cmp	w21, #0
	cset	w9, ne
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_9
LBB0_2:
	mov	x0, x20
	cbz	w21, LBB0_6
; %bb.3:
	bl	_ov7251_set_power_on
	tbnz	w0, #31, LBB0_7
; %bb.4:
Lloh0:
	adrp	x8, _ov7251_global_init_setting@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ov7251_global_init_setting@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_ov7251_set_register_array
	mov	x21, x0
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_9
LBB0_6:
	bl	_ov7251_set_power_off
	str	wzr, [x20]
	b	LBB0_9
LBB0_7:
	mov	x21, x0
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	bl	_ov7251_set_power_off
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ov7251_global_init_setting,4,2 ; @ov7251_global_init_setting
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not set init registers\n"

	.no_dead_strip	_ov7251_s_power
.subsections_via_symbols
