	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iceland_populate_all_graphic_levels
_iceland_populate_all_graphic_levels:   ## @iceland_populate_all_graphic_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), %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	16(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SMU71_Discrete_DpmTable@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GraphicsLevel@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_offsetof
	movq	%rax, %r14
	movq	_SMU71_MAX_LEVELS_GRAPHICS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r13
	movq	8(%r15), %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_memset
	leaq	8(%r12), %rbx
	cmpq	$0, 8(%r12)
	je	LBB0_1
## %bb.2:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movq	(%rbx), %rax
	addq	$24, %r14
	cmpq	%rax, %r13
	jae	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movl	(%rax,%r13,4), %esi
	movq	8(%r15), %rdx
	addq	%r14, %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_iceland_populate_single_graphic_level
	testl	%eax, %eax
	jne	LBB0_25
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$2, %r13
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rax
	movq	$0, 16(%rax,%r14)
	jmp	LBB0_6
LBB0_1:
	movq	8(%r15), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	8(%r15), %rcx
	movl	$1, (%rcx)
	cmpq	$2, %rax
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jb	LBB0_9
## %bb.8:
	movq	_PPSMC_DISPLAY_WATERMARK_HIGH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	leaq	(%rax,%rax,2), %rsi
	movl	%edx, -16(%rcx,%rsi,8)
LBB0_9:
	addq	%rdi, %r14
	movl	%eax, (%r15)
	movq	%rbx, %rdi
	callq	_phm_get_dpm_level_enable_mask_value
	movl	%eax, 4(%r12)
	movl	(%r12), %esi
	movl	$-1, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movl	%esi, %eax
	shrl	%cl, %eax
	testb	$2, %al
	jne	LBB0_10
## %bb.11:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
                                        ## kill: def $eax killed $eax killed $rax def $rax
	btl	%eax, %esi
	leal	1(%rax), %eax
	jae	LBB0_12
## %bb.13:
	xorl	%edx, %edx
	testl	%ecx, %ecx
	je	LBB0_17
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rax,%rdx), %edi
	btl	%edi, %esi
	jb	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incl	%edx
	cmpl	%edx, %ecx
	jne	LBB0_14
## %bb.16:
	movl	%ecx, %edx
LBB0_17:
	addl	%eax, %edx
	decl	%eax
	cmpl	%ecx, %edx
	cmovael	%ecx, %edx
	movq	(%rbx), %rbx
	movq	8(%r15), %r8
	cmpq	$3, %rbx
	jb	LBB0_24
## %bb.18:
	leaq	-2(%rbx), %r10
	addq	$-3, %rbx
	movl	%r10d, %r9d
	andl	$3, %r9d
	movl	$2, %esi
	cmpq	$3, %rbx
	jb	LBB0_21
## %bb.19:
	leaq	124(%r8), %rbx
	andq	$-4, %r10
	negq	%r10
	movl	$2, %esi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, -72(%rbx)
	movl	%ecx, -48(%rbx)
	movl	%ecx, -24(%rbx)
	movl	%ecx, (%rbx)
	addq	$96, %rbx
	leaq	(%r10,%rsi), %rdi
	addq	$4, %rdi
	addq	$4, %rsi
	cmpq	$2, %rdi
	jne	LBB0_20
LBB0_21:
	testq	%r9, %r9
	je	LBB0_24
## %bb.22:
	leaq	(%rsi,%rsi,2), %rsi
	leaq	(%r8,%rsi,8), %rsi
	addq	$4, %rsi
	shlq	$3, %r9
	leaq	(%r9,%r9,2), %rdi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rsi,%rbx)
	addq	$24, %rbx
	cmpq	%rbx, %rdi
	jne	LBB0_23
LBB0_24:
	movl	%eax, 4(%r8)
	movl	%edx, 28(%r8)
	movq	_SMC_RAM_END@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %rcx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_smu7_copy_bytes_to_smc         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SMU71_Discrete_DpmTable,4,2    ## @SMU71_Discrete_DpmTable
	.comm	_GraphicsLevel,4,2              ## @GraphicsLevel
	.comm	_SMU71_MAX_LEVELS_GRAPHICS,4,2  ## @SMU71_MAX_LEVELS_GRAPHICS
	.comm	_PPSMC_DISPLAY_WATERMARK_HIGH,4,2 ## @PPSMC_DISPLAY_WATERMARK_HIGH
	.comm	_SMC_RAM_END,4,2                ## @SMC_RAM_END
	.no_dead_strip	_iceland_populate_all_graphic_levels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iceland_populate_all_graphic_levels
_iceland_populate_all_graphic_levels:   ; @iceland_populate_all_graphic_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
	ldp	x24, x25, [x0]
	ldr	x26, [x24, #16]
Lloh0:
	adrp	x8, _SMU71_Discrete_DpmTable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMU71_Discrete_DpmTable@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _GraphicsLevel@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GraphicsLevel@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_offsetof
	mov	x22, x0
Lloh6:
	adrp	x8, _SMU71_MAX_LEVELS_GRAPHICS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMU71_MAX_LEVELS_GRAPHICS@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	add	x8, x8, x8, lsl #1
	lsl	x20, x8, #3
	ldr	x21, [x24, #8]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_memset
	mov	x23, x25
	ldr	x8, [x23, #8]!
	cbz	x8, LBB0_6
; %bb.1:
	mov	x27, #0
	mov	x28, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x28, x28, #1
	ldr	x8, [x23]
	add	x27, x27, #24
	cmp	x28, x8
	b.hs	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25, #16]
	ldr	w1, [x8, x28, lsl #2]
	ldr	x8, [x24, #8]
	add	x2, x8, x27
	mov	x0, x19
	bl	_iceland_populate_single_graphic_level
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x28, #2
	b.lo	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24, #8]
	add	x8, x8, x27
	str	xzr, [x8, #16]
	b	LBB0_2
LBB0_6:
	ldr	x9, [x24, #8]
	mov	w10, #1
	str	w10, [x9]
	b	LBB0_10
LBB0_7:
	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
LBB0_8:
	ldr	x9, [x24, #8]
	mov	w10, #1
	str	w10, [x9]
	cmp	x8, #2
	b.lo	LBB0_10
; %bb.9:
Lloh9:
	adrp	x10, _PPSMC_DISPLAY_WATERMARK_HIGH@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PPSMC_DISPLAY_WATERMARK_HIGH@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	mov	w11, #24
	madd	x9, x8, x11, x9
	stur	w10, [x9, #-16]
LBB0_10:
	add	x22, x22, x26
	str	w8, [x24]
	mov	x0, x23
	bl	_phm_get_dpm_level_enable_mask_value
	str	w0, [x25, #4]
	ldr	w9, [x25]
	mov	w8, #-1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w8, w8, #1
	lsr	w10, w9, w8
	tbnz	w10, #1, LBB0_11
; %bb.12:
	mov	w11, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w11, #1
	lsr	w12, w9, w11
	mov	x11, x10
	tbz	w12, #0, LBB0_13
; %bb.14:
	mov	w11, #0
	cbz	w8, LBB0_18
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w12, w10, w11
	lsr	w12, w9, w12
	tbnz	w12, #0, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w11, w11, #1
	cmp	w8, w11
	b.ne	LBB0_15
; %bb.17:
	mov	x11, x8
LBB0_18:
	sub	w9, w10, #1
	add	w10, w11, w10
	cmp	w10, w8
	csel	w10, w10, w8, lo
	ldr	x12, [x23]
	ldr	x11, [x24, #8]
	cmp	x12, #3
	b.lo	LBB0_26
; %bb.19:
	sub	x14, x12, #2
	cmp	x14, #4
	b.hs	LBB0_21
; %bb.20:
	mov	w13, #2
	b	LBB0_24
LBB0_21:
	and	x15, x14, #0xfffffffffffffffc
	orr	x13, x15, #0x2
	add	x16, x11, #76
	mov	x17, x15
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	stur	w8, [x16, #-24]
	str	w8, [x16]
	str	w8, [x16, #24]
	str	w8, [x16, #48]
	add	x16, x16, #96
	subs	x17, x17, #4
	b.ne	LBB0_22
; %bb.23:
	cmp	x14, x15
	b.eq	LBB0_26
LBB0_24:
	sub	x12, x12, x13
	mov	w14, #24
	madd	x13, x13, x14, x11
	add	x13, x13, #4
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	str	w8, [x13], #24
	subs	x12, x12, #1
	b.ne	LBB0_25
LBB0_26:
	str	w9, [x11, #4]
	str	w10, [x11, #28]
Lloh12:
	adrp	x8, _SMC_RAM_END@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SMC_RAM_END@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	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
	b	_smu7_copy_bytes_to_smc
	.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	_SMU71_Discrete_DpmTable,4,2    ; @SMU71_Discrete_DpmTable
	.comm	_GraphicsLevel,4,2              ; @GraphicsLevel
	.comm	_SMU71_MAX_LEVELS_GRAPHICS,4,2  ; @SMU71_MAX_LEVELS_GRAPHICS
	.comm	_PPSMC_DISPLAY_WATERMARK_HIGH,4,2 ; @PPSMC_DISPLAY_WATERMARK_HIGH
	.comm	_SMC_RAM_END,4,2                ; @SMC_RAM_END
	.no_dead_strip	_iceland_populate_all_graphic_levels
.subsections_via_symbols
