	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dev_pm_opp_attach_genpd        ## -- Begin function dev_pm_opp_attach_genpd
	.p2align	4, 0x90
_dev_pm_opp_attach_genpd:               ## @dev_pm_opp_attach_genpd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	callq	_dev_pm_opp_get_opp_table
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r13
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movq	%r13, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_18
## %bb.7:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rax
	cmpq	$0, (%rax,%r15,8)
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	%r12, %rdi
	movq	%rdx, %rsi
	callq	_dev_pm_domain_attach_by_name
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rax
	movq	%rbx, (%rax,%r15,8)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax,%r15,8), %rdx
	incq	%r15
	testq	%rdx, %rdx
	jne	LBB0_8
LBB0_18:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_20
## %bb.19:
	movq	8(%r13), %rax
	movq	%rax, (%rcx)
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	%ebx, %edi
	jmp	LBB0_2
LBB0_4:
	movq	_EPROBE_DEFER@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_16:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	%r13, %rdi
	callq	__opp_detach_genpd
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_12:
	movq	%r13, %rdi
	callq	_dev_pm_opp_put_opp_table
	movl	%r14d, %edi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EPROBE_DEFER,4,2               ## @EPROBE_DEFER
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Index can't be greater than required-opp-count - 1, %s (%d : %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"Genpd virtual device already set %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't attach to pm_domain: %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dev_pm_opp_attach_genpd        ; -- Begin function dev_pm_opp_attach_genpd
	.p2align	2
_dev_pm_opp_attach_genpd:               ; @dev_pm_opp_attach_genpd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	bl	_dev_pm_opp_get_opp_table
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_13
; %bb.2:
	neg	w20, w20
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_18
; %bb.3:
	ldr	x1, [x24]
	cbz	x1, LBB0_9
; %bb.4:
	mov	x25, #0
	add	x26, x24, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19]
	cmp	x25, x8
	b.ge	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x25, lsl #3]
	cbnz	x8, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_dev_pm_domain_attach_by_name
	mov	x24, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_16
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	lsl	x9, x25, #3
	str	x24, [x8, x9]
	add	x25, x25, #1
	ldr	x1, [x26, x9]
	cbnz	x1, LBB0_5
LBB0_9:
	cbz	x23, LBB0_11
; %bb.10:
	ldr	x8, [x19, #8]
	str	x8, [x23]
LBB0_11:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_13:
Lloh9:
	adrp	x8, _EPROBE_DEFER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPROBE_DEFER@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_14:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x8, x25, [sp, #8]
	str	x1, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_17
LBB0_15:
	str	x1, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_16:
	mov	x0, x24
	bl	_PTR_ERR
	mov	x20, x0
	str	x20, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_17:
	mov	x0, x22
	bl	_dev_err
	mov	x0, x19
	bl	__opp_detach_genpd
LBB0_18:
	mov	x0, x21
	bl	_mutex_unlock
LBB0_19:
	mov	x0, x19
	bl	_dev_pm_opp_put_opp_table
	mov	x0, x20
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EPROBE_DEFER,4,2               ; @EPROBE_DEFER
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Index can't be greater than required-opp-count - 1, %s (%d : %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"Genpd virtual device already set %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't attach to pm_domain: %d\n"

.subsections_via_symbols
