	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_iccsense_create_sensor
_nvkm_iccsense_create_sensor:           ## @nvkm_iccsense_create_sensor
	.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	8(%rdi), %rax
	movq	(%rax), %r13
	xorl	%ebx, %ebx
	testq	%r13, %r13
	je	LBB0_20
## %bb.1:
	movq	%rdi, %r12
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.2:
	movq	%rsi, %r14
	leaq	-56(%rbp), %rdx
	callq	_nvbios_extdev_parse
	testq	%rax, %rax
	jne	LBB0_19
## %bb.4:
	movl	-56(%rbp), %edx
	cmpl	$255, %edx
	je	LBB0_19
## %bb.6:
	leaq	8(%r12), %r15
	movq	_NVBIOS_EXTDEV_INA209@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_10
## %bb.7:
	movq	_NVBIOS_EXTDEV_INA219@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_10
## %bb.8:
	movq	_NVBIOS_EXTDEV_INA3221@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_10
## %bb.9:
	movl	$0, (%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_nvkm_error
	jmp	LBB0_19
LBB0_10:
	cmpq	$0, -48(%rbp)
	jne	LBB0_12
## %bb.11:
	movq	_NVKM_I2C_BUS_PRI@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_NVKM_I2C_BUS_SEC@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_nvkm_i2c_bus_find
	testq	%rax, %rax
	je	LBB0_19
## %bb.14:
	movq	%rax, %r13
	movl	-56(%rbp), %edx
	movl	-52(%rbp), %eax
	sarl	%eax
	movslq	%eax, %rbx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_nvkm_iccsense_validate_device
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	movq	%rbx, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$32, %rdi
	addq	$4, %r12
	movq	%r12, %rsi
	callq	_list_add_tail
	movq	%r14, 24(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, (%rbx)
	movq	%r13, 16(%rbx)
	movq	%r15, 8(%rbx)
	movl	$0, 4(%rbx)
	jmp	LBB0_20
LBB0_18:
	movl	$0, (%r12)
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_nvkm_warn
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVBIOS_EXTDEV_INA209,4,2       ## @NVBIOS_EXTDEV_INA209
	.comm	_NVBIOS_EXTDEV_INA219,4,2       ## @NVBIOS_EXTDEV_INA219
	.comm	_NVBIOS_EXTDEV_INA3221,4,2      ## @NVBIOS_EXTDEV_INA3221
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown sensor type %x, power reading disabled\n"

	.comm	_NVKM_I2C_BUS_SEC,4,2           ## @NVKM_I2C_BUS_SEC
	.comm	_NVKM_I2C_BUS_PRI,4,2           ## @NVKM_I2C_BUS_PRI
L_.str.1:                               ## @.str.1
	.asciz	"found invalid sensor id: %i, power readingmight be invalid\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_nvkm_iccsense_create_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_iccsense_create_sensor
_nvkm_iccsense_create_sensor:           ; @nvkm_iccsense_create_sensor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	mov	x21, x0
	ldr	x8, [x21, #8]!
	ldp	x22, x0, [x8]
	cmp	x22, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x2, sp
	bl	_nvbios_extdev_parse
	cbnz	x0, LBB0_10
; %bb.2:
	ldr	w2, [sp]
	cmp	w2, #255
	b.eq	LBB0_10
; %bb.3:
Lloh0:
	adrp	x8, _NVBIOS_EXTDEV_INA209@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVBIOS_EXTDEV_INA209@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _NVBIOS_EXTDEV_INA219@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NVBIOS_EXTDEV_INA219@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _NVBIOS_EXTDEV_INA3221@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NVBIOS_EXTDEV_INA3221@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w2, w8
	ccmp	w2, w9, #4, ne
	ccmp	w2, w10, #4, ne
	b.ne	LBB0_8
; %bb.4:
Lloh9:
	adrp	x8, _NVKM_I2C_BUS_PRI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NVKM_I2C_BUS_PRI@GOTPAGEOFF]
	ldr	x9, [sp, #8]
Lloh11:
	adrp	x10, _NVKM_I2C_BUS_SEC@GOTPAGE
Lloh12:
	ldr	x10, [x10, _NVKM_I2C_BUS_SEC@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	mov	x0, x22
	bl	_nvkm_i2c_bus_find
	cbz	x0, LBB0_10
; %bb.5:
	mov	x22, x0
	ldp	w2, w8, [sp]
	sbfx	x23, x8, #1, #31
	mov	x1, x23
	bl	_nvkm_iccsense_validate_device
	cbz	w0, LBB0_9
; %bb.6:
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kmalloc
	mov	x21, x0
	cbz	x0, LBB0_11
; %bb.7:
	add	x0, x21, #32
	add	x1, x20, #4
	bl	_list_add_tail
	stp	x22, x19, [x21, #16]
	ldr	w8, [sp]
	str	x23, [x21, #8]
	stp	w8, wzr, [x21]
	b	LBB0_11
LBB0_8:
	str	wzr, [x20]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvkm_error
	b	LBB0_10
LBB0_9:
	str	wzr, [x20]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_nvkm_warn
LBB0_10:
	mov	x21, #0
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NVBIOS_EXTDEV_INA209,4,2       ; @NVBIOS_EXTDEV_INA209
	.comm	_NVBIOS_EXTDEV_INA219,4,2       ; @NVBIOS_EXTDEV_INA219
	.comm	_NVBIOS_EXTDEV_INA3221,4,2      ; @NVBIOS_EXTDEV_INA3221
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown sensor type %x, power reading disabled\n"

	.comm	_NVKM_I2C_BUS_SEC,4,2           ; @NVKM_I2C_BUS_SEC
	.comm	_NVKM_I2C_BUS_PRI,4,2           ; @NVKM_I2C_BUS_PRI
l_.str.1:                               ; @.str.1
	.asciz	"found invalid sensor id: %i, power readingmight be invalid\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_nvkm_iccsense_create_sensor
.subsections_via_symbols
