	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scmi_perf_describe_levels_get
_scmi_perf_describe_levels_get:         ## @scmi_perf_describe_levels_get
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_PERF_DESCRIBE_LEVELS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCMI_PROTOCOL_PERF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %r9
	movl	$16, %ecx
	xorl	%r8d, %r8d
	callq	_scmi_xfer_get_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movq	(%rax), %r13
	movq	8(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%ecx, %ecx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%r14, %r15
	movq	%rcx, %r14
	movq	%rbx, %rdi
	callq	_cpu_to_le32
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_cpu_to_le32
	movq	%rax, (%rbx)
	movq	-48(%rbp), %rsi
	movq	%r15, %r12
	movq	%r15, %rdi
	callq	_scmi_do_xfer
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %rbx
	movl	8(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %rsi
	leaq	(%rbx,%r14), %rcx
	movq	_MAX_OPPS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	movq	%r14, %rdx
	jg	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	leaq	L_.str.1(%rip), %r14
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	leaq	(%rdx,%rdx,2), %rcx
	leaq	(%rax,%rcx,8), %r15
	addq	$16, %r15
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r13), %rax
	movl	8(%rax,%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, (%r15,%r12,2)
	movq	(%r13), %rax
	movl	4(%rax,%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, -8(%r15,%r12,2)
	movq	(%r13), %rax
	movl	(%rax,%r12), %edi
	callq	_le16_to_cpu
	movq	%rax, -16(%r15,%r12,2)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %edi
	movq	-8(%r15,%r12,2), %rcx
	movq	(%r15,%r12,2), %rdx
	movq	%r14, %rsi
	movq	%rax, %r8
	callq	_dev_dbg
	addq	$12, %r12
	decq	%rbx
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	xorl	%r15d, %r15d
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rcx
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_2
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %r15d
	movq	%r14, %rax
	movq	%r12, %r14
	jmp	LBB0_12
LBB0_5:
	movq	%rdx, %rbx
	movq	%r12, %r14
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	xorl	%r15d, %r15d
	movq	%rbx, %rax
	jmp	LBB0_12
LBB0_10:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_12:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movq	%rax, %r12
	movq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_scmi_xfer_put
	movq	(%rbx), %rdi
	movq	_opp_cmp_func@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rsi
	movl	$24, %edx
	xorl	%r8d, %r8d
	callq	_sort
LBB0_13:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PERF_DESCRIBE_LEVELS,4,2       ## @PERF_DESCRIBE_LEVELS
	.comm	_SCMI_PROTOCOL_PERF,4,2         ## @SCMI_PROTOCOL_PERF
	.comm	_MAX_OPPS,8,3                   ## @MAX_OPPS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No. of OPPs exceeded MAX_OPPS"

L_.str.1:                               ## @.str.1
	.asciz	"Level %d Power %d Latency %dus\n"

	.comm	_opp_cmp_func,4,2               ## @opp_cmp_func
	.no_dead_strip	_scmi_perf_describe_levels_get
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scmi_perf_describe_levels_get
_scmi_perf_describe_levels_get:         ; @scmi_perf_describe_levels_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x28, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PERF_DESCRIBE_LEVELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PERF_DESCRIBE_LEVELS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _SCMI_PROTOCOL_PERF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCMI_PROTOCOL_PERF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x5, sp, #24
	mov	w3, #16
	mov	w4, #0
	bl	_scmi_xfer_get_init
	mov	x27, x0
	cbnz	w0, LBB0_13
; %bb.1:
	mov	x26, #0
	ldr	x8, [sp, #24]
	ldr	x9, [x8, #8]
	stp	x19, x9, [sp, #8]               ; 16-byte Folded Spill
	ldr	x19, [x8]
Lloh6:
	adrp	x22, l_.str.1@PAGE
Lloh7:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, x28
	bl	_cpu_to_le32
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	str	x0, [x21, #8]
	mov	x0, x26
	bl	_cpu_to_le32
	str	x0, [x21]
	ldr	x1, [sp, #24]
	mov	x0, x20
	bl	_scmi_do_xfer
	cbnz	w0, LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x19, #12]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
Lloh8:
	adrp	x8, _MAX_OPPS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_OPPS@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x23, x21, x26
	cmp	x23, x8
	b.gt	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x0
	cmp	x21, #1
	b.lt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x8]
	mov	w9, #24
	madd	x8, x26, x9, x8
	add	x26, x8, #16
	mov	x24, x21
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19]
	add	x8, x8, x27
	ldr	w0, [x8, #8]
	bl	_le32_to_cpu
	str	x0, [x26]
	ldr	x8, [x19]
	add	x8, x8, x27
	ldr	w0, [x8, #4]
	bl	_le32_to_cpu
	stur	x0, [x26, #-8]
	ldr	x8, [x19]
	ldr	w0, [x8, x27]
	bl	_le16_to_cpu
	mov	x4, x0
	stur	x0, [x26, #-16]
	ldr	w0, [x20]
	ldp	x3, x2, [x26, #-8]
	mov	x1, x22
	bl	_dev_dbg
	add	x27, x27, #12
	add	x26, x26, #24
	subs	x24, x24, #1
	b.ne	LBB0_6
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w27, #0
	cbz	x21, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x26, x23
	cbnz	x25, LBB0_2
	b	LBB0_12
LBB0_9:
	mov	x27, x0
	b	LBB0_11
LBB0_10:
	ldr	w0, [x20]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	w27, #0
LBB0_11:
	mov	x23, x26
LBB0_12:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	str	x23, [x19, #8]
	ldr	x1, [sp, #24]
	mov	x0, x20
	bl	_scmi_xfer_put
	ldr	x0, [x19]
Lloh13:
	adrp	x8, _opp_cmp_func@GOTPAGE
Lloh14:
	ldr	x8, [x8, _opp_cmp_func@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	mov	x1, x23
	mov	w2, #24
	mov	x4, #0
	bl	_sort
LBB0_13:
	mov	x0, x27
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PERF_DESCRIBE_LEVELS,4,2       ; @PERF_DESCRIBE_LEVELS
	.comm	_SCMI_PROTOCOL_PERF,4,2         ; @SCMI_PROTOCOL_PERF
	.comm	_MAX_OPPS,8,3                   ; @MAX_OPPS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No. of OPPs exceeded MAX_OPPS"

l_.str.1:                               ; @.str.1
	.asciz	"Level %d Power %d Latency %dus\n"

	.comm	_opp_cmp_func,4,2               ; @opp_cmp_func
	.no_dead_strip	_scmi_perf_describe_levels_get
.subsections_via_symbols
