	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun6i_csi_set_power            ## -- Begin function sun6i_csi_set_power
	.p2align	4, 0x90
_sun6i_csi_set_power:                   ## @sun6i_csi_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, %ebx
	callq	_sun6i_csi_to_dev
	movq	%rax, %r12
	movq	8(%rax), %r13
	movq	24(%rax), %r15
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.4:
	movl	(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_15
LBB0_1:
	movq	_CSI_EN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CSI_EN_CSI_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	4(%r12), %edi
	callq	_clk_disable_unprepare
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r12), %edi
	callq	_clk_rate_exclusive_put
LBB0_3:
	movl	(%r12), %edi
	callq	_clk_disable_unprepare
	movl	16(%r12), %edi
	callq	_reset_control_assert
	jmp	LBB0_15
LBB0_6:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	(%r12), %edi
	movl	$300000000, %esi                ## imm = 0x11E1A300
	callq	_clk_set_rate_exclusive
LBB0_8:
	movl	4(%r12), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_12
LBB0_10:
	movl	16(%r12), %edi
	callq	_reset_control_deassert
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:
	movl	%eax, %r14d
	movq	8(%r12), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	4(%r12), %edi
	callq	_clk_disable_unprepare
LBB0_12:
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_of_device_is_compatible
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	(%r12), %edi
	callq	_clk_rate_exclusive_put
LBB0_14:
	movl	(%r12), %edi
	callq	_clk_disable_unprepare
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	_CSI_EN_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CSI_EN_CSI_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%ecx, %edx
	callq	_regmap_update_bits
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_CSI_EN_REG,4,2                 ## @CSI_EN_REG
	.comm	_CSI_EN_CSI_EN,4,2              ## @CSI_EN_CSI_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"allwinner,sun50i-a64-csi"

L_.str.1:                               ## @.str.1
	.asciz	"Enable csi clk err %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Enable clk_dram_csi clk err %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"reset err %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun6i_csi_set_power            ; -- Begin function sun6i_csi_set_power
	.p2align	2
_sun6i_csi_set_power:                   ; @sun6i_csi_set_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	x20, x1
	bl	_sun6i_csi_to_dev
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	x21, [x0, #24]
	cbz	w20, LBB0_3
; %bb.1:
	ldr	w0, [x19]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_15
LBB0_3:
Lloh2:
	adrp	x8, _CSI_EN_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CSI_EN_REG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _CSI_EN_CSI_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CSI_EN_CSI_EN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #0
	bl	_regmap_update_bits
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
	ldr	w0, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_device_is_compatible
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19]
	bl	_clk_rate_exclusive_put
LBB0_5:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	ldr	w0, [x19, #16]
	bl	_reset_control_assert
	mov	w20, #0
	b	LBB0_15
LBB0_6:
	ldr	w0, [x22]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_device_is_compatible
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19]
	mov	w1, #41728
	movk	w1, #4577, lsl #16
	bl	_clk_set_rate_exclusive
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_10
; %bb.9:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_12
LBB0_10:
	ldr	w0, [x19, #16]
	bl	_reset_control_deassert
	mov	x20, x0
	cbz	w0, LBB0_16
; %bb.11:
	ldr	x0, [x19, #8]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
LBB0_12:
	ldr	w0, [x22]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_of_device_is_compatible
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x19]
	bl	_clk_rate_exclusive_put
LBB0_14:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
LBB0_15:
	mov	x0, x20
	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
LBB0_16:
Lloh18:
	adrp	x8, _CSI_EN_REG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CSI_EN_REG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _CSI_EN_CSI_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CSI_EN_CSI_EN@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x3, x2
	bl	_regmap_update_bits
	b	LBB0_15
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_CSI_EN_REG,4,2                 ; @CSI_EN_REG
	.comm	_CSI_EN_CSI_EN,4,2              ; @CSI_EN_CSI_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"allwinner,sun50i-a64-csi"

l_.str.1:                               ; @.str.1
	.asciz	"Enable csi clk err %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Enable clk_dram_csi clk err %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"reset err %d\n"

.subsections_via_symbols
