	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function battery_level
LCPI0_0:
	.quad	0x400a666666666666              ## double 3.2999999999999998
LCPI0_1:
	.quad	0x3f50000000000000              ## double 9.765625E-4
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_2:
	.long	0x437f0000                      ## float 255
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_battery_level
	.p2align	4, 0x90
_battery_level:                         ## @battery_level
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_BATTERY_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_analogRead
	addl	%eax, %eax
	cvtsi2sd	%eax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	mulsd	LCPI0_1(%rip), %xmm0
	cvtsd2ss	%xmm0, %xmm0
	movq	_MIN_VOLTAGE@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	xorl	%eax, %eax
	ucomiss	%xmm0, %xmm1
	ja	LBB0_3
## %bb.1:
	movq	_MAX_VOLTAGE@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	movl	$255, %eax
	ucomiss	%xmm2, %xmm0
	ja	LBB0_3
## %bb.2:
	subss	%xmm1, %xmm0
	subss	%xmm1, %xmm2
	divss	%xmm2, %xmm0
	mulss	LCPI0_2(%rip), %xmm0
	cvttss2si	%xmm0, %eax
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BATTERY_PIN,4,2                ## @BATTERY_PIN
	.comm	_MIN_VOLTAGE,4,2                ## @MIN_VOLTAGE
	.comm	_MAX_VOLTAGE,4,2                ## @MAX_VOLTAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_battery_level                  ; -- Begin function battery_level
	.p2align	2
_battery_level:                         ; @battery_level
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _BATTERY_PIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BATTERY_PIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_analogRead
	lsl	w8, w0, #1
	scvtf	d0, w8
	mov	x8, #7378697629483820646
	movk	x8, #16394, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	mov	x8, #4562146422526312448
	fmov	d1, x8
	fmul	d0, d0, d1
	fcvt	s0, d0
Lloh3:
	adrp	x8, _MIN_VOLTAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIN_VOLTAGE@GOTPAGEOFF]
Lloh5:
	ldr	s1, [x8]
	fcmp	s1, s0
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh6:
	adrp	x8, _MAX_VOLTAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_VOLTAGE@GOTPAGEOFF]
Lloh8:
	ldr	s2, [x8]
	fcmp	s2, s0
	b.pl	LBB0_4
; %bb.3:
	mov	w0, #255
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_4:
	fsub	s0, s0, s1
	fsub	s1, s2, s1
	fdiv	s0, s0, s1
	mov	w8, #1132396544
	fmov	s1, w8
	fmul	s0, s0, s1
	fcvtzs	w0, s0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BATTERY_PIN,4,2                ; @BATTERY_PIN
	.comm	_MIN_VOLTAGE,4,2                ; @MIN_VOLTAGE
	.comm	_MAX_VOLTAGE,4,2                ; @MAX_VOLTAGE
.subsections_via_symbols
