	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_init_simplified_leakage_table
_si_init_simplified_leakage_table:      ## @si_init_simplified_leakage_table
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	callq	_si_get_pi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_si_get_smc_power_scaling_factor
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %r13
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jae	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $eax killed $eax killed $rax
	imull	-52(%rbp), %eax                 ## 4-byte Folded Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	subl	%eax, %ecx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rsi
	movl	(%rsi), %edx
	addq	$4, %rsi
	movl	(%rax), %r8d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-56(%rbp), %r9
	callq	_si_calculate_leakage_for_v
	movl	-56(%rbp), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_si_scale_power_for_smc
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$2, %r15d
	cmpl	$65535, %r15d                   ## imm = 0xFFFF
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovgel	%eax, %r15d
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r12d
	notl	%r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	callq	_cpu_to_be16
	movq	(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	addl	%r12d, %edx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r14
	movl	(%r13), %eax
	cmpq	%rax, %r14
	jb	LBB0_4
	jmp	LBB0_5
LBB0_6:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,4,2 ## @SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES,4,2 ## @SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.no_dead_strip	_si_init_simplified_leakage_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si_init_simplified_leakage_table
_si_init_simplified_leakage_table:      ; @si_init_simplified_leakage_table
	.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
	stp	w2, w4, [sp, #20]               ; 8-byte Folded Spill
	mov	x21, x1
	mov	x19, x0
	bl	_si_get_pi
	mov	x23, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x19
	bl	_si_get_smc_power_scaling_factor
Lloh0:
	adrp	x26, _SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x26]
	cbz	w8, LBB0_6
; %bb.1:
	mov	x24, x0
	mov	w27, #0
	mov	w28, #65535
Lloh2:
	adrp	x19, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGE
Lloh3:
	ldr	x19, [x19, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w27, w27, #1
	ldr	w8, [x26]
	cmp	w27, w8
	b.hs	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldp	w9, w8, [sp, #20]               ; 8-byte Folded Reload
	msub	w3, w27, w8, w9
	ldr	x1, [x23, #8]
	ldr	w2, [x1], #4
	ldr	w4, [x23]
	add	x5, sp, #28
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_si_calculate_leakage_for_v
	ldr	w0, [sp, #28]
	mov	x1, x24
	bl	_si_scale_power_for_smc
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	cmp	w8, w28
	csel	w25, w8, w28, lt
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x20, #0
	mvn	w22, w27
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x25
	bl	_cpu_to_be16
	ldr	x8, [x21]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w9, [x26]
	add	w9, w9, w22
	str	w0, [x8, w9, uxtw #2]
	add	x20, x20, #1
	ldr	w8, [x19]
	cmp	x20, x8
	b.lo	LBB0_5
	b	LBB0_2
LBB0_6:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,4,2 ; @SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES,4,2 ; @SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.no_dead_strip	_si_init_simplified_leakage_table
.subsections_via_symbols
