	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_iccsense_oneinit
_nvkm_iccsense_oneinit:                 ## @nvkm_iccsense_oneinit
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_nvkm_iccsense
	movq	%rax, %r14
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	(%rax), %rbx
	xorl	%r15d, %r15d
	testq	%rbx, %rbx
	je	LBB0_26
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nvbios_power_budget_header
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	-48(%rbp), %edx
	cmpl	$255, %edx
	je	LBB0_5
## %bb.3:
	leaq	-48(%rbp), %rsi
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_nvbios_power_budget_entry
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	-60(%rbp), %eax
	movl	%eax, 12(%r14)
	movl	-64(%rbp), %eax
	movl	%eax, 8(%r14)
LBB0_5:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_nvbios_iccsense_parse
	testq	%rax, %rax
	jne	LBB0_26
## %bb.6:
	cmpl	$0, -64(%rbp)
	je	LBB0_26
## %bb.7:
	movl	$1, (%r14)
	jle	LBB0_26
## %bb.8:
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	addq	$4, %r14
	movq	%r14, -104(%rbp)                ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	incq	%rbx
	movslq	-64(%rbp), %rax
	cmpq	%rax, %rbx
	jge	LBB0_25
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_18 Depth 2
	movq	-56(%rbp), %r14
	movq	%rbx, -128(%rbp)                ## 8-byte Spill
	shlq	$5, %rbx
	cmpl	$1, (%r14,%rbx)
	jne	LBB0_24
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	$0, 4(%r14,%rbx)
	je	LBB0_24
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	16(%r14,%rbx), %esi
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_nvkm_iccsense_get_sensor
	testq	%rax, %rax
	je	LBB0_24
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	(%r14,%rbx), %rcx
	addq	$16, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rdx
	movq	8(%r14,%rbx), %rcx
	testq	%rdx, %rdx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rcx, %rdx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	callq	_nvkm_error
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rcx, (%rax)
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	leaq	(%r14,%rbx), %rcx
	addq	$4, %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	(%rcx), %edx
	testl	%edx, %edx
	jle	LBB0_24
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	(%r14,%rbx), %rsi
	addq	$24, %rsi
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_18 Depth=2
	incq	%r12
	movslq	%edx, %rcx
	addq	$16, %r13
	cmpq	%rcx, %r12
	jge	LBB0_24
LBB0_18:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi), %r14
	cmpq	$0, (%r14,%r13)
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	cmpl	$0, 8(%r14,%r13)
	je	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_18 Depth=2
	movl	8(%rax), %r15d
	addl	$-128, %r15d
	cmpl	$2, %r15d
	ja	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=2
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_27
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=2
	movq	%rax, %rbx
	movslq	%r15d, %rax
	leaq	l_switch.table.nvkm_iccsense_oneinit(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	%rax, (%rbx)
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, 24(%rbx)
	movl	%r12d, 8(%rbx)
	movq	(%r14,%r13), %r8
	movq	%r8, 16(%rbx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%r12d, %ecx
	callq	_nvkm_debug
	addq	$12, %rbx
	movq	%rbx, %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_list_add_tail
	movq	%r15, %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx), %edx
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	jmp	LBB0_23
LBB0_25:
	xorl	%r15d, %r15d
	jmp	LBB0_26
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"config mismatch found for extdev %i\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"create rail for extdev %i: { idx: %i, mohm: %i }\n"

	.no_dead_strip	_nvkm_iccsense_oneinit
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.nvkm_iccsense_oneinit
l_switch.table.nvkm_iccsense_oneinit:
	.quad	_nvkm_iccsense_ina3221_read
	.quad	_nvkm_iccsense_ina219_read
	.quad	_nvkm_iccsense_ina209_read

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_iccsense_oneinit
_nvkm_iccsense_oneinit:                 ; @nvkm_iccsense_oneinit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	_nvkm_iccsense
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	ldr	x8, [x19]
	ldr	x21, [x8]
	cbz	x21, LBB0_24
; %bb.1:
	mov	x20, x0
	add	x1, sp, #40
	mov	x0, x21
	bl	_nvbios_power_budget_header
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w2, [sp, #40]
	cmp	w2, #255
	b.eq	LBB0_5
; %bb.3:
	add	x1, sp, #40
	add	x3, sp, #24
	mov	x0, x21
	bl	_nvbios_power_budget_entry
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	d0, [sp, #24]
	str	d0, [x20, #8]
LBB0_5:
	add	x1, sp, #24
	mov	x0, x21
	bl	_nvbios_iccsense_parse
	ldr	w8, [sp, #24]
	cmp	x0, #0
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_24
; %bb.6:
	mov	w9, #1
	str	w9, [x20]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.7:
	mov	x27, #0
	add	x8, x20, #4
	stp	x20, x8, [sp]                   ; 16-byte Folded Spill
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #1
	ldrsw	x8, [sp, #24]
	cmp	x27, x8
	b.ge	LBB0_24
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_19 Depth 2
	ldr	x20, [sp, #32]
	lsl	x8, x27, #5
	ldr	w8, [x20, x8]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x20, x27, lsl #5
	mov	x28, x22
	ldr	w8, [x28, #4]!
	cbz	w8, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w1, [x22, #16]!
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	bl	_nvkm_iccsense_get_sensor
	cbz	x0, LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x24, x0
	ldr	x9, [x0]
	add	x8, x20, x27, lsl #5
	ldr	x8, [x8, #8]
	cbz	x9, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	x9, x8
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w2, [x22]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nvkm_error
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	str	x8, [x24]
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x28]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.17:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, #0
	mov	x25, #0
	add	x9, x20, x27, lsl #5
	add	x20, x9, #24
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=2
	add	x25, x25, #1
	add	x23, x23, #16
	cmp	x25, w8, sxtw
	b.ge	LBB0_8
LBB0_19:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x21, [x20]
	ldr	x9, [x21, x23]
	cbz	x9, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	add	x9, x21, x23
	ldr	w9, [x9, #8]
	cbz	w9, LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=2
	ldr	w9, [x24, #8]
	sub	w19, w9, #128
	cmp	w19, #2
	b.hi	LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=2
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kmalloc
	cbz	x0, LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_19 Depth=2
	mov	x26, x0
Lloh5:
	adrp	x8, l_switch.table.nvkm_iccsense_oneinit@PAGE
Lloh6:
	add	x8, x8, l_switch.table.nvkm_iccsense_oneinit@PAGEOFF
	ldr	x8, [x8, w19, sxtw #3]
	str	x8, [x0]
	str	x24, [x0, #24]
	str	w25, [x0, #8]
	ldr	x4, [x21, x23]
	str	x4, [x0, #16]
	ldr	w2, [x22]
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x25
	bl	_nvkm_debug
	add	x0, x26, #12
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_list_add_tail
	ldr	w8, [x28]
	b	LBB0_18
LBB0_24:
	mov	w0, #0
LBB0_25:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_26:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_25
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"config mismatch found for extdev %i\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"create rail for extdev %i: { idx: %i, mohm: %i }\n"

	.no_dead_strip	_nvkm_iccsense_oneinit
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.nvkm_iccsense_oneinit
l_switch.table.nvkm_iccsense_oneinit:
	.quad	_nvkm_iccsense_ina3221_read
	.quad	_nvkm_iccsense_ina219_read
	.quad	_nvkm_iccsense_ina209_read

.subsections_via_symbols
