	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk8xx_syscore_shutdown
_rk8xx_syscore_shutdown:                ## @rk8xx_syscore_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_rk808_i2c_client@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_i2c_get_clientdata
	movq	_system_state@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_SYSTEM_POWER_OFF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.1:
	movq	(%rax), %rcx
	movq	_RK809_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_3
## %bb.2:
	movq	_RK817_ID@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
LBB0_3:
	movl	8(%rax), %r14d
	movl	$3, %edi
	callq	_RK817_SYS_CFG
	movq	_RK817_SLPPIN_FUNC_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_SLPPIN_DN_FUN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rk808_i2c_client,8,3           ## @rk808_i2c_client
	.comm	_system_state,8,3               ## @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ## @SYSTEM_POWER_OFF
	.comm	_RK809_ID,8,3                   ## @RK809_ID
	.comm	_RK817_ID,8,3                   ## @RK817_ID
	.comm	_RK817_SLPPIN_FUNC_MSK,4,2      ## @RK817_SLPPIN_FUNC_MSK
	.comm	_SLPPIN_DN_FUN,4,2              ## @SLPPIN_DN_FUN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot switch to power down function\n"

	.no_dead_strip	_rk8xx_syscore_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk8xx_syscore_shutdown
_rk8xx_syscore_shutdown:                ; @rk8xx_syscore_shutdown
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _rk808_i2c_client@GOTPAGE
Lloh1:
	ldr	x20, [x20, _rk808_i2c_client@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_i2c_get_clientdata
Lloh2:
	adrp	x8, _system_state@GOTPAGE
Lloh3:
	ldr	x8, [x8, _system_state@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _SYSTEM_POWER_OFF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SYSTEM_POWER_OFF@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x0]
Lloh8:
	adrp	x9, _RK809_ID@GOTPAGE
Lloh9:
	ldr	x9, [x9, _RK809_ID@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x10, _RK817_ID@GOTPAGE
Lloh12:
	ldr	x10, [x10, _RK817_ID@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	w19, [x0, #8]
	mov	w0, #3
	bl	_RK817_SYS_CFG
	mov	x1, x0
Lloh14:
	adrp	x8, _RK817_SLPPIN_FUNC_MSK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RK817_SLPPIN_FUNC_MSK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _SLPPIN_DN_FUN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SLPPIN_DN_FUN@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	bl	_regmap_update_bits
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x0, [x20]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_warn
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_rk808_i2c_client,8,3           ; @rk808_i2c_client
	.comm	_system_state,8,3               ; @system_state
	.comm	_SYSTEM_POWER_OFF,8,3           ; @SYSTEM_POWER_OFF
	.comm	_RK809_ID,8,3                   ; @RK809_ID
	.comm	_RK817_ID,8,3                   ; @RK817_ID
	.comm	_RK817_SLPPIN_FUNC_MSK,4,2      ; @RK817_SLPPIN_FUNC_MSK
	.comm	_SLPPIN_DN_FUN,4,2              ; @SLPPIN_DN_FUN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot switch to power down function\n"

	.no_dead_strip	_rk8xx_syscore_shutdown
.subsections_via_symbols
