	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_scu_add_pm_domain
_imx_scu_add_pm_domain:                 ## @imx_scu_add_pm_domain
	.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
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movslq	%r12d, %r8
	movq	(%r15), %rax
	addq	%r8, %rax
	movq	%rax, (%rbx)
	movq	_imx_sc_pd_power_off@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_imx_sc_pd_power_on@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	cmpq	$0, 24(%r15)
	movl	8(%rbx), %edi
	movq	8(%r15), %rcx
	je	LBB0_3
## %bb.2:
	addq	16(%r15), %r8
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_4
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_3:
	leaq	L_.str.1(%rip), %rdx
	movl	$4, %esi
	xorl	%eax, %eax
	callq	_snprintf
LBB0_4:
	movl	8(%rbx), %edx
	movl	%edx, 12(%rbx)
	movq	(%rbx), %rcx
	movq	_IMX_SC_R_LAST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jge	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	addq	$12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_pm_genpd_init
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	8(%rbx), %edx
	movq	(%rbx), %rcx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	callq	_dev_warn
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_devm_kfree
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_imx_sc_pd_power_off,4,2        ## @imx_sc_pd_power_off
	.comm	_imx_sc_pd_power_on,4,2         ## @imx_sc_pd_power_on
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%i"

L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_IMX_SC_R_LAST,8,3              ## @IMX_SC_R_LAST
L_.str.2:                               ## @.str.2
	.asciz	"invalid pd %s rsrc id %d found"

L_.str.3:                               ## @.str.3
	.asciz	"failed to init pd %s rsrc id %d"

	.no_dead_strip	_imx_scu_add_pm_domain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_scu_add_pm_domain
_imx_scu_add_pm_domain:                 ; @imx_scu_add_pm_domain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	sxtw	x8, w22
	ldp	x9, x3, [x21]
	add	x9, x9, x8
	str	x9, [x0]
Lloh3:
	adrp	x9, _imx_sc_pd_power_off@GOTPAGE
Lloh4:
	ldr	x9, [x9, _imx_sc_pd_power_off@GOTPAGEOFF]
Lloh5:
	adrp	x10, _imx_sc_pd_power_on@GOTPAGE
Lloh6:
	ldr	x10, [x10, _imx_sc_pd_power_on@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	ldr	w10, [x10]
	stp	w10, w9, [x0, #16]
	ldr	x9, [x21, #24]
	ldr	w0, [x0, #8]
	cbz	x9, LBB0_4
; %bb.2:
	ldr	x9, [x21, #16]
	add	x8, x9, x8
	str	x8, [sp]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_4:
Lloh14:
	adrp	x2, l_.str.1@PAGE
Lloh15:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_5:
	mov	w1, #4
	bl	_snprintf
	ldr	w2, [x20, #8]
	str	w2, [x20, #12]
	ldr	x3, [x20]
Lloh16:
	adrp	x8, _IMX_SC_R_LAST@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IMX_SC_R_LAST@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x3, x8
	b.ge	LBB0_8
; %bb.6:
	add	x0, x20, #12
	mov	x1, #0
	mov	w2, #1
	bl	_pm_genpd_init
	cbz	w0, LBB0_10
; %bb.7:
	ldr	w2, [x20, #8]
	ldr	x3, [x20]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_warn
	mov	x0, x19
	mov	x1, x20
	bl	_devm_kfree
	mov	x20, #0
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_imx_sc_pd_power_off,4,2        ; @imx_sc_pd_power_off
	.comm	_imx_sc_pd_power_on,4,2         ; @imx_sc_pd_power_on
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%i"

l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_IMX_SC_R_LAST,8,3              ; @IMX_SC_R_LAST
l_.str.2:                               ; @.str.2
	.asciz	"invalid pd %s rsrc id %d found"

l_.str.3:                               ; @.str.3
	.asciz	"failed to init pd %s rsrc id %d"

	.no_dead_strip	_imx_scu_add_pm_domain
.subsections_via_symbols
