	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_power
_read_power:                            ## @read_power
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	callq	_dev_get_drvdata
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movl	(%rax,%rcx,4), %r12d
	movq	_lochnagar_chan_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str(%rip), %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_LN2_VOLT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_LN2_PWR_UNITS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	$1, %ecx
	movq	%r14, %r9
	callq	_read_sensor
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movq	(%r14), %rax
	movq	%rbx, %rcx
	movq	%rax, %rbx
	negq	%rbx
	cmovsq	%rax, %rbx
	movl	(%rcx), %r8d
	jmp	LBB0_4
LBB0_1:
	movq	_LN2_PWR_UNITS@GOTPCREL(%rip), %rax
	movslq	(%rax), %r8
	leaq	(%r8,%r8,4), %rbx
LBB0_4:
	movq	_LN2_CURR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r12d, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	movq	%r14, %r9
	callq	_read_sensor
	testl	%eax, %eax
	js	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movq	%rax, %rdi
	negq	%rdi
	cmovsq	%rax, %rdi
	imulq	%rbx, %rdi
	movq	_LN2_PWR_UNITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_CLOSEST_ULL
	movq	_LONG_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	cmovlq	%rax, %rcx
	movq	%rcx, (%r14)
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %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	"SYSVDD"

	.comm	_lochnagar_chan_names,8,3       ## @lochnagar_chan_names
	.comm	_LN2_PWR_UNITS,4,2              ## @LN2_PWR_UNITS
	.comm	_LN2_VOLT,4,2                   ## @LN2_VOLT
	.comm	_LN2_CURR,4,2                   ## @LN2_CURR
	.comm	_LONG_MAX,8,3                   ## @LONG_MAX
	.no_dead_strip	_read_power
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_power
_read_power:                            ; @read_power
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_dev_get_drvdata
	ldr	x8, [x0]
	sbfiz	x9, x20, #2, #32
	ldr	w22, [x8, x9]
Lloh0:
	adrp	x8, _lochnagar_chan_names@GOTPAGE
Lloh1:
	ldr	x8, [x8, _lochnagar_chan_names@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, x9]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_strcmp
Lloh5:
	adrp	x23, _LN2_PWR_UNITS@GOTPAGE
Lloh6:
	ldr	x23, [x23, _LN2_PWR_UNITS@GOTPAGEOFF]
	cbz	w0, LBB0_3
; %bb.1:
Lloh7:
	adrp	x8, _LN2_VOLT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LN2_VOLT@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	ldr	w4, [x23]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #1
	mov	x5, x19
	bl	_read_sensor
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	x8, [x19]
	cmp	x8, #0
	cneg	x24, x8, mi
	ldr	w4, [x23]
	b	LBB0_4
LBB0_3:
	ldrsw	x4, [x23]
	add	x24, x4, x4, lsl #2
LBB0_4:
Lloh10:
	adrp	x8, _LN2_CURR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LN2_CURR@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
                                        ; kill: def $w4 killed $w4 killed $x4
	mov	x5, x19
	bl	_read_sensor
	tbnz	w0, #31, LBB0_6
; %bb.5:
	ldr	x8, [x19]
	cmp	x8, #0
	cneg	x8, x8, mi
	mul	x0, x8, x24
	ldr	w1, [x23]
	bl	_DIV_ROUND_CLOSEST_ULL
	mov	x8, x0
	mov	w0, #0
Lloh13:
	adrp	x9, _LONG_MAX@GOTPAGE
Lloh14:
	ldr	x9, [x9, _LONG_MAX@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	csel	x8, x8, x9, lt
	str	x8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SYSVDD"

	.comm	_lochnagar_chan_names,8,3       ; @lochnagar_chan_names
	.comm	_LN2_PWR_UNITS,4,2              ; @LN2_PWR_UNITS
	.comm	_LN2_VOLT,4,2                   ; @LN2_VOLT
	.comm	_LN2_CURR,4,2                   ; @LN2_CURR
	.comm	_LONG_MAX,8,3                   ; @LONG_MAX
	.no_dead_strip	_read_power
.subsections_via_symbols
