	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si_init_dte_leakage_table
_si_init_dte_leakage_table:             ## @si_init_dte_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	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	callq	_si_get_pi
	movq	%rax, %r14
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_si_get_smc_power_scaling_factor
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.1:
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	incq	%rdi
	movl	%ecx, %edx
	movq	%rdi, %rsi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	cmpq	%rdx, %rdi
	jae	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%eax, %eax
	movl	$0, %eax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	imull	16(%rbp), %eax
	addl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	imull	$1000, %eax, %r12d              ## imm = 0x3E8
	xorl	%ebx, %ebx
	movl	$-1, %r15d
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	callq	_cpu_to_be16
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movq	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edx
	addl	%r15d, %edx
	movl	%eax, (%rcx,%rdx,4)
	incl	%ebx
	movl	(%rsi), %eax
	subl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	decl	%r15d
	cmpl	%eax, %ebx
	jae	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rsi
	movl	(%r14), %r8d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %edx
	movl	%r12d, %ecx
	leaq	-68(%rbp), %r9
	callq	_si_calculate_leakage_for_v_and_t
	movl	-68(%rbp), %edi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	callq	_si_scale_power_for_smc
                                        ## kill: def $eax killed $eax def $rax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	cmpl	$65535, %edi                    ## imm = 0xFFFF
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	$65535, %edi                    ## imm = 0xFFFF
	jmp	LBB0_6
LBB0_9:
	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_TEMP_ENTRIES,4,2 ## @SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,4,2 ## @SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.no_dead_strip	_si_init_dte_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_dte_leakage_table
_si_init_dte_leakage_table:             ; @si_init_dte_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	w5, w6, [sp, #4]                ; 8-byte Folded Spill
	mov	x21, x4
	str	w2, [sp]                        ; 4-byte Folded Spill
	mov	x26, x1
	mov	x20, x0
	bl	_si_get_pi
	mov	x25, x0
	mov	x0, x20
	bl	_si_get_smc_power_scaling_factor
Lloh0:
	adrp	x8, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cbz	w9, LBB0_7
; %bb.1:
	mov	x22, x0
	mov	x11, #0
Lloh3:
	adrp	x19, _SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGE
Lloh4:
	ldr	x19, [x19, _SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGEOFF]
	ldr	w8, [x19]
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	str	w21, [sp, #12]                  ; 4-byte Folded Spill
	mov	w24, #65535
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	cmp	x11, w9, uxtw
	b.hs	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cbz	w8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
	ldp	w9, w8, [sp, #4]                ; 8-byte Folded Reload
	madd	w8, w11, w8, w9
	mov	w9, #1000
	mul	w27, w8, w9
	mov	w23, #-1
	ldr	w28, [sp]                       ; 4-byte Folded Reload
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x25, #8]
	ldr	w4, [x25]
	add	x5, sp, #28
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	mov	x2, x28
	mov	x3, x27
	mov	x20, x11
	bl	_si_calculate_leakage_for_v_and_t
	ldr	w0, [sp, #28]
	mov	x1, x22
	bl	_si_scale_power_for_smc
	add	w8, w0, #3
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #2
	cmp	w8, w24
	csel	w0, w8, w24, lt
	bl	_cpu_to_be16
	mov	x11, x20
	ldr	x8, [x26]
	ldr	x8, [x8, x20, lsl #3]
	ldr	w9, [x19]
	add	w9, w23, w9
	str	w0, [x8, w9, uxtw #2]
	add	w21, w21, #1
	ldr	w8, [x19]
	ldr	w9, [sp, #12]                   ; 4-byte Folded Reload
	sub	w28, w28, w9
	sub	w23, w23, #1
	cmp	w21, w8
	b.lo	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh5:
	adrp	x9, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	b	LBB0_2
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES,4,2 ; @SMC_SISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.comm	_SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,4,2 ; @SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.no_dead_strip	_si_init_dte_leakage_table
.subsections_via_symbols
