	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ci_populate_all_memory_levels
_ci_populate_all_memory_levels:         ## @ci_populate_all_memory_levels
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_ci_get_pi
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SMU7_Discrete_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MemoryLevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	movq	%rax, %r15
	movq	_SMU7_MAX_LEVELS_MEMORY@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shlq	$2, %rax
	leaq	(%rax,%rax,4), %r13
	movq	16(%rbx), %rdi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_memset
	leaq	40(%rbx), %r12
	cmpq	$0, 40(%rbx)
	je	LBB0_1
## %bb.2:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%rbx), %rax
	movq	(%rax,%r15,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdx
	addq	%r13, %rdx
	movq	%r14, %rdi
	callq	_ci_populate_single_memory_level
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movq	(%r12), %rcx
	addq	$20, %r13
	cmpq	%rcx, %r15
	jb	LBB0_5
## %bb.7:
	movq	16(%rbx), %rax
	movl	$1, (%rax)
	cmpq	$2, %rcx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jb	LBB0_10
## %bb.8:
	movq	(%r14), %rcx
	movl	(%rcx), %ecx
	andl	$-2, %ecx
	cmpl	$26544, %ecx                    ## imm = 0x67B0
	jne	LBB0_10
## %bb.9:
	movq	12(%rax), %rcx
	movq	%rcx, 32(%rax)
	jmp	LBB0_10
LBB0_1:
	movq	16(%rbx), %rax
	movl	$1, (%rax)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
LBB0_10:
	addq	%rdx, %r15
	movl	$31, %edi
	callq	_cpu_to_be16
	movq	16(%rbx), %rcx
	movl	%eax, 8(%rcx)
	movq	40(%rbx), %rax
	movq	%rax, 24(%rbx)
	movq	%r12, %rdi
	callq	_ci_get_dpm_level_enable_mask_value
	movl	%eax, 32(%rbx)
	movq	_PPSMC_DISPLAY_WATERMARK_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	16(%rbx), %rcx
	movq	40(%rbx), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	movl	%eax, -16(%rcx,%rdx,4)
	movl	8(%rbx), %r8d
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	callq	_ci_copy_bytes_to_smc
	jmp	LBB0_11
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU7_Discrete_DpmTable,4,2     ## @SMU7_Discrete_DpmTable
	.comm	_MemoryLevel,4,2                ## @MemoryLevel
	.comm	_SMU7_MAX_LEVELS_MEMORY,4,2     ## @SMU7_MAX_LEVELS_MEMORY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPSMC_DISPLAY_WATERMARK_HIGH,4,2 ## @PPSMC_DISPLAY_WATERMARK_HIGH
	.no_dead_strip	_ci_populate_all_memory_levels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ci_populate_all_memory_levels
_ci_populate_all_memory_levels:         ; @ci_populate_all_memory_levels
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x0
	bl	_ci_get_pi
	mov	x20, x0
	ldr	x25, [x0]
Lloh0:
	adrp	x8, _SMU7_Discrete_DpmTable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU7_Discrete_DpmTable@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _MemoryLevel@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MemoryLevel@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_offsetof
	mov	x24, x0
Lloh6:
	adrp	x8, _SMU7_MAX_LEVELS_MEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU7_MAX_LEVELS_MEMORY@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	add	x8, x8, x8, lsl #2
	lsl	x21, x8, #2
	ldr	x22, [x20, #16]
	mov	x0, x22
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	mov	x23, x20
	ldr	x8, [x23, #40]!
	cbz	x8, LBB0_8
; %bb.1:
	mov	x26, #0
	mov	x27, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #48]
	ldr	x1, [x8, x27, lsl #3]
	cbz	x1, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, #16]
	add	x2, x8, x26
	mov	x0, x19
	bl	_ci_populate_single_memory_level
	cbnz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	ldr	x9, [x23]
	add	x26, x26, #20
	cmp	x27, x9
	b.lo	LBB0_2
; %bb.5:
	ldr	x8, [x20, #16]
	mov	w10, #1
	str	w10, [x8]
	cmp	x9, #2
	b.lo	LBB0_9
; %bb.6:
	ldr	x9, [x19]
	ldr	w9, [x9]
	mov	w10, #13272
	cmp	w10, w9, lsr #1
	b.ne	LBB0_9
; %bb.7:
	ldur	d0, [x8, #12]
	str	d0, [x8, #32]
	b	LBB0_9
LBB0_8:
	ldr	x8, [x20, #16]
	mov	w9, #1
	str	w9, [x8]
LBB0_9:
	add	x24, x24, x25
	mov	w0, #31
	bl	_cpu_to_be16
	ldr	x8, [x20, #16]
	str	w0, [x8, #8]
	ldr	x8, [x20, #40]
	str	x8, [x20, #24]
	mov	x0, x23
	bl	_ci_get_dpm_level_enable_mask_value
	str	w0, [x20, #32]
Lloh9:
	adrp	x8, _PPSMC_DISPLAY_WATERMARK_HIGH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PPSMC_DISPLAY_WATERMARK_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x20, #16]
	ldr	x10, [x20, #40]
	mov	w11, #20
	madd	x9, x10, x11, x9
	stur	w8, [x9, #-16]
	ldr	w4, [x20, #8]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x22
	mov	x3, x21
	bl	_ci_copy_bytes_to_smc
	b	LBB0_12
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SMU7_Discrete_DpmTable,4,2     ; @SMU7_Discrete_DpmTable
	.comm	_MemoryLevel,4,2                ; @MemoryLevel
	.comm	_SMU7_MAX_LEVELS_MEMORY,4,2     ; @SMU7_MAX_LEVELS_MEMORY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPSMC_DISPLAY_WATERMARK_HIGH,4,2 ; @PPSMC_DISPLAY_WATERMARK_HIGH
	.no_dead_strip	_ci_populate_all_memory_levels
.subsections_via_symbols
