	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ispif_set_power
_ispif_set_power:                       ## @ispif_set_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, %r12d
	callq	_v4l2_get_subdevdata
	movq	%rax, %r13
	movq	8(%rax), %rbx
	movq	%rbx, %rdi
	callq	_to_device
	movq	%rax, %r15
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.1:
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	incl	%eax
	jmp	LBB0_15
LBB0_10:
	cmpl	$1, %eax
	je	LBB0_13
## %bb.11:
	testl	%eax, %eax
	jne	LBB0_14
## %bb.12:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_16
LBB0_3:
	movq	%r15, %rdi
	callq	_pm_runtime_get_sync
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	movq	%r15, %rdx
	callq	_camss_enable_clocks
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%rbx, %rdi
	callq	_ispif_reset
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movq	_CMD_ALL_NO_CHANGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	16(%rbx), %rdx
	movq	(%r13), %rsi
	shlq	$4, %rsi
	movq	%rcx, 8(%rdx,%rsi)
	movq	(%rax), %rax
	movq	%rax, (%rdx,%rsi)
	incl	(%rbx)
	jmp	LBB0_17
LBB0_13:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_camss_disable_clocks
	movq	%r15, %rdi
	callq	_pm_runtime_put_sync
	movl	(%rbx), %eax
LBB0_14:
	decl	%eax
LBB0_15:
	movl	%eax, (%rbx)
LBB0_16:
	xorl	%r12d, %r12d
LBB0_17:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%eax, %r12d
	jmp	LBB0_17
LBB0_6:
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_pm_runtime_put_sync
	jmp	LBB0_17
LBB0_8:
	movq	%r15, %rdi
	callq	_pm_runtime_put_sync
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_camss_disable_clocks
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_ALL_NO_CHANGE,8,3          ## @CMD_ALL_NO_CHANGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ispif power off on power_count == 0\n"

	.no_dead_strip	_ispif_set_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ispif_set_power
_ispif_set_power:                       ; @ispif_set_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	x21, x1
	bl	_v4l2_get_subdevdata
	mov	x23, x0
	ldr	x20, [x0, #8]
	mov	x0, x20
	bl	_to_device
	mov	x22, x0
	add	x19, x20, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cbz	w21, LBB0_3
; %bb.1:
	cbz	w8, LBB0_6
; %bb.2:
	mov	w21, #0
	add	w8, w8, #1
	b	LBB0_12
LBB0_3:
	cmp	w8, #1
	b.eq	LBB0_10
; %bb.4:
	cbnz	w8, LBB0_11
; %bb.5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	mov	w21, #0
	b	LBB0_13
LBB0_6:
	mov	x0, x22
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldp	w1, w0, [x20, #8]
	mov	x2, x22
	bl	_camss_enable_clocks
	tbnz	w0, #31, LBB0_15
; %bb.8:
	mov	x0, x20
	bl	_ispif_reset
	mov	x21, x0
	tbnz	w0, #31, LBB0_16
; %bb.9:
Lloh2:
	adrp	x8, _CMD_ALL_NO_CHANGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_ALL_NO_CHANGE@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	x10, [x20, #16]
	ldr	x11, [x23]
	add	x10, x10, x11, lsl #4
	str	x9, [x10, #8]
	ldr	x8, [x8]
	str	x8, [x10]
	ldr	w8, [x20]
	add	w8, w8, #1
	b	LBB0_12
LBB0_10:
	ldp	w1, w0, [x20, #8]
	bl	_camss_disable_clocks
	mov	x0, x22
	bl	_pm_runtime_put_sync
	ldr	w8, [x20]
LBB0_11:
	mov	w21, #0
	sub	w8, w8, #1
LBB0_12:
	str	w8, [x20]
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	x21, x0
	b	LBB0_13
LBB0_15:
	mov	x21, x0
	mov	x0, x22
	bl	_pm_runtime_put_sync
	b	LBB0_13
LBB0_16:
	mov	x0, x22
	bl	_pm_runtime_put_sync
	ldp	w1, w0, [x20, #8]
	bl	_camss_disable_clocks
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_ALL_NO_CHANGE,8,3          ; @CMD_ALL_NO_CHANGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ispif power off on power_count == 0\n"

	.no_dead_strip	_ispif_set_power
.subsections_via_symbols
