	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scmi_perf_protocol_init
_scmi_perf_protocol_init:               ## @scmi_perf_protocol_init
	.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	%rdi, %rbx
	movq	_SCMI_PROTOCOL_PERF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_scmi_version_get
	movl	16(%rbx), %r15d
	movl	-44(%rbp), %edi
	callq	_PROTOCOL_REV_MAJOR
	movl	%eax, %r14d
	movl	-44(%rbp), %edi
	callq	_PROTOCOL_REV_MINOR
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_dbg
	movl	16(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_scmi_perf_attributes_get
	movl	16(%rbx), %edi
	movl	(%r15), %esi
	movl	(%r14), %ecx
	movl	$16, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r15)
	jle	LBB0_9
## %bb.4:
	movq	%rax, %r12
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r12,%r14), %r13
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_scmi_perf_domain_attributes_get
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_scmi_perf_describe_levels_get
	cmpq	$0, 8(%r12,%r14)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_scmi_perf_domain_init_fc
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r15), %r12
	addq	$16, %r14
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_9:
	movq	_perf_ops@GOTPCREL(%rip), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 8(%rcx)
	movq	%r15, (%rcx)
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCMI_PROTOCOL_PERF,4,2         ## @SCMI_PROTOCOL_PERF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Performance Version %d.%d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_perf_ops,4,2                   ## @perf_ops
	.no_dead_strip	_scmi_perf_protocol_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scmi_perf_protocol_init
_scmi_perf_protocol_init:               ; @scmi_perf_protocol_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _SCMI_PROTOCOL_PERF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCMI_PROTOCOL_PERF@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_scmi_version_get
	ldr	w20, [x19, #16]
	ldr	w0, [sp, #12]
	bl	_PROTOCOL_REV_MAJOR
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_PROTOCOL_REV_MINOR
	mov	x3, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_dbg
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_scmi_perf_attributes_get
	ldr	w0, [x19, #16]
	ldr	w1, [x20]
	ldr	w3, [x21]
	mov	w2, #16
	bl	_devm_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x23, #0
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x0, x23
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_scmi_perf_domain_attributes_get
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_scmi_perf_describe_levels_get
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_scmi_perf_domain_init_fc
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #8]
	add	x23, x23, #16
	b	LBB0_4
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
Lloh10:
	adrp	x8, _perf_ops@GOTPAGE
Lloh11:
	ldr	x8, [x8, _perf_ops@GOTPAGEOFF]
	stp	x20, x8, [x19]
LBB0_10:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SCMI_PROTOCOL_PERF,4,2         ; @SCMI_PROTOCOL_PERF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Performance Version %d.%d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_perf_ops,4,2                   ; @perf_ops
	.no_dead_strip	_scmi_perf_protocol_init
.subsections_via_symbols
