	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_sc_pd_power
_imx_sc_pd_power:                       ## @imx_sc_pd_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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_to_imx_sc_pd
	movq	%rax, %r12
	movq	_IMX_SC_RPC_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_IMX_SC_RPC_SVC_PM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	_IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	$2, -48(%rbp)
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)
	testl	%r15d, %r15d
	jne	LBB0_1
## %bb.2:
	movq	_IMX_SC_PM_PW_MODE_LP@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IMX_SC_PM_PW_MODE_ON@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_pm_ipc_handle@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	movl	$1, %edx
	callq	_imx_scu_call_rpc
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movl	(%r12), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	callq	_dev_err
LBB0_5:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX_SC_RPC_VERSION,4,2         ## @IMX_SC_RPC_VERSION
	.comm	_IMX_SC_RPC_SVC_PM,4,2          ## @IMX_SC_RPC_SVC_PM
	.comm	_IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE,4,2 ## @IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE
	.comm	_IMX_SC_PM_PW_MODE_ON,4,2       ## @IMX_SC_PM_PW_MODE_ON
	.comm	_IMX_SC_PM_PW_MODE_LP,4,2       ## @IMX_SC_PM_PW_MODE_LP
	.comm	_pm_ipc_handle,4,2              ## @pm_ipc_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to power %s resource %d ret %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"up"

L_.str.2:                               ## @.str.2
	.asciz	"off"

	.no_dead_strip	_imx_sc_pd_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_sc_pd_power
_imx_sc_pd_power:                       ; @imx_sc_pd_power
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	bl	_to_imx_sc_pd
	mov	x21, x0
Lloh0:
	adrp	x8, _IMX_SC_RPC_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMX_SC_RPC_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IMX_SC_RPC_SVC_PM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IMX_SC_RPC_SVC_PM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE@GOTPAGEOFF]
	stp	w9, w8, [sp, #24]
Lloh8:
	ldr	w8, [x10]
	mov	w9, #2
	stp	w9, w8, [sp, #16]
	ldr	w8, [x0]
	str	w8, [sp, #12]
Lloh9:
	adrp	x8, _IMX_SC_PM_PW_MODE_ON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IMX_SC_PM_PW_MODE_ON@GOTPAGEOFF]
Lloh11:
	adrp	x9, _IMX_SC_PM_PW_MODE_LP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IMX_SC_PM_PW_MODE_LP@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh13:
	adrp	x8, _pm_ipc_handle@GOTPAGE
Lloh14:
	ldr	x8, [x8, _pm_ipc_handle@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	add	x1, sp, #8
	mov	w2, #1
	bl	_imx_scu_call_rpc
	mov	x22, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x8, l_.str.1@PAGE
Lloh17:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh18:
	adrp	x9, l_.str.2@PAGE
Lloh19:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x9, x8, eq
	ldr	w3, [x21]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x22
	bl	_dev_err
LBB0_2:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX_SC_RPC_VERSION,4,2         ; @IMX_SC_RPC_VERSION
	.comm	_IMX_SC_RPC_SVC_PM,4,2          ; @IMX_SC_RPC_SVC_PM
	.comm	_IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE,4,2 ; @IMX_SC_PM_FUNC_SET_RESOURCE_POWER_MODE
	.comm	_IMX_SC_PM_PW_MODE_ON,4,2       ; @IMX_SC_PM_PW_MODE_ON
	.comm	_IMX_SC_PM_PW_MODE_LP,4,2       ; @IMX_SC_PM_PW_MODE_LP
	.comm	_pm_ipc_handle,4,2              ; @pm_ipc_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to power %s resource %d ret %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"up"

l_.str.2:                               ; @.str.2
	.asciz	"off"

	.no_dead_strip	_imx_sc_pd_power
.subsections_via_symbols
