	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ni_init_simplified_leakage_table
_ni_init_simplified_leakage_table:      ## @ni_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_evergreen_get_pi
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	(%r15), %rcx
	movq	(%rax), %rbx
	cmpq	%rcx, %rbx
	cmovaeq	%rcx, %rbx
	cmoveq	%rcx, %rbx
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rbx, %rax
	cmovbq	%rax, %rbx
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_ni_get_smc_power_scaling_factor
	movq	%rax, %r13
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	xorl	%esi, %esi
	xorl	%r15d, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%eax, %eax
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	cmpq	%r12, %r15
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_6
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movq	(%rcx,%r15,8), %rbx
	cmpq	%rsi, %rbx
	cmovaq	%rbx, %rsi
	testq	%rax, %rax
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ni_scale_power_for_smc
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %rdx
	movq	(%r14), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	%rax, (%rcx,%r15,8)
	incq	%r12
	movq	(%rdx), %rax
	cmpq	%rax, %r12
	jb	LBB0_11
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_18
LBB0_6:
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	xorl	%eax, %eax
	cmpq	%rcx, %r12
	jae	LBB0_18
## %bb.7:
	movq	(%rdx), %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r12
	cmpq	%rcx, %r12
	jae	LBB0_17
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsi, %r15
	movq	%rsi, %rdi
	movq	%r13, %rsi
	callq	_ni_scale_power_for_smc
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	%r15, %rsi
	movq	(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, (%rcx,%r12,8)
	incq	%rbx
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rax, %rbx
	jb	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_16
LBB0_17:
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,8,3 ## @SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.comm	_SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES,8,3 ## @SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.no_dead_strip	_ni_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 ni_init_simplified_leakage_table
_ni_init_simplified_leakage_table:      ; @ni_init_simplified_leakage_table
	.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, x1
	mov	x22, x0
	bl	_evergreen_get_pi
	cbz	x22, LBB0_7
; %bb.1:
	ldr	x8, [x22]
	ldr	x9, [x0]
	cmp	x9, x8
	csel	x9, x9, x8, lo
	csel	x8, x8, x9, eq
Lloh0:
	adrp	x24, _SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x9, x8
	csel	x25, x9, x8, lo
	cbz	x25, LBB0_7
; %bb.2:
	mov	x0, x22
	bl	_ni_get_smc_power_scaling_factor
	mov	x20, x0
	mov	x21, #0
	mov	x27, #0
Lloh2:
	adrp	x26, _SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGE
Lloh3:
	ldr	x26, [x26, _SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES@GOTPAGEOFF]
	ldr	x8, [x26]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	cmp	x27, x25
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x22, #8]
	ldr	x23, [x9, x27, lsl #3]
	cmp	x23, x21
	csel	x21, x23, x21, hi
	cbz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	mov	x1, x20
	bl	_ni_scale_power_for_smc
	bl	_cpu_to_be32
	ldr	x8, [x19]
	ldr	x8, [x8, x28, lsl #3]
	str	x0, [x8, x27, lsl #3]
	add	x28, x28, #1
	ldr	x8, [x26]
	cmp	x28, x8
	b.lo	LBB0_6
	b	LBB0_3
LBB0_7:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_8:
	ldr	x8, [x24]
	cmp	x25, x8
	b.hs	LBB0_15
; %bb.9:
	ldr	x9, [x26]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x25, x25, #1
	cmp	x25, x8
	b.hs	LBB0_15
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	cbz	x9, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x22, #0
LBB0_13:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	mov	x1, x20
	bl	_ni_scale_power_for_smc
	bl	_cpu_to_be32
	ldr	x8, [x19]
	ldr	x8, [x8, x22, lsl #3]
	str	x0, [x8, x25, lsl #3]
	add	x22, x22, #1
	ldr	x9, [x26]
	cmp	x22, x9
	b.lo	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x24]
	b	LBB0_10
LBB0_15:
	mov	w0, #0
LBB0_16:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES,8,3 ; @SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES
	.comm	_SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES,8,3 ; @SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES
	.no_dead_strip	_ni_init_simplified_leakage_table
.subsections_via_symbols
