	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bat_capacity_level
_bat_capacity_level:                    ## @bat_capacity_level
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_BAT_STATUS0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ec_read_u8
	movl	%eax, %ebx
	movq	_BAT_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ec_read_u8
	movl	%eax, %r14d
	movq	_BAT_STATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ec_read_u8
	movq	_BAT_S0_DISCHRG_CRITICAL@GOTPCREL(%rip), %rdx
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rdx)
	jne	LBB0_8
## %bb.1:
	movq	_BAT_S1_EMPTY@GOTPCREL(%rip), %rdx
	testl	%r14d, (%rdx)
	jne	LBB0_8
## %bb.2:
	movq	_BAT_S2_LOW_LOW@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	jne	LBB0_8
## %bb.3:
	movq	_BAT_S0_LOW@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_5:
	movq	_BAT_S1_FULL@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_6
## %bb.7:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	movq	_POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPCREL(%rip), %rcx
LBB0_8:
	movl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAT_STATUS0,4,2                ## @BAT_STATUS0
	.comm	_BAT_STATUS1,4,2                ## @BAT_STATUS1
	.comm	_BAT_STATUS2,4,2                ## @BAT_STATUS2
	.comm	_BAT_S0_DISCHRG_CRITICAL,4,2    ## @BAT_S0_DISCHRG_CRITICAL
	.comm	_BAT_S1_EMPTY,4,2               ## @BAT_S1_EMPTY
	.comm	_BAT_S2_LOW_LOW,4,2             ## @BAT_S2_LOW_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_BAT_S0_LOW,4,2                 ## @BAT_S0_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_BAT_S1_FULL,4,2                ## @BAT_S1_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ## @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.no_dead_strip	_bat_capacity_level
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bat_capacity_level
_bat_capacity_level:                    ; @bat_capacity_level
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _BAT_STATUS0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAT_STATUS0@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ec_read_u8
	mov	x19, x0
Lloh3:
	adrp	x8, _BAT_STATUS1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BAT_STATUS1@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ec_read_u8
	mov	x20, x0
Lloh6:
	adrp	x8, _BAT_STATUS2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BAT_STATUS2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_ec_read_u8
Lloh9:
	adrp	x8, _BAT_S0_DISCHRG_CRITICAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BAT_S0_DISCHRG_CRITICAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_3
; %bb.1:
Lloh12:
	adrp	x8, _BAT_S1_EMPTY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BAT_S1_EMPTY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_3
; %bb.2:
Lloh15:
	adrp	x8, _BAT_S2_LOW_LOW@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BAT_S2_LOW_LOW@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
LBB0_3:
Lloh18:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh20:
	adrp	x8, _BAT_S0_LOW@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BAT_S0_LOW@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_7
; %bb.6:
Lloh23:
	adrp	x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGE
Lloh24:
	ldr	x8, [x8, _POWER_SUPPLY_CAPACITY_LEVEL_LOW@GOTPAGEOFF]
	b	LBB0_4
LBB0_7:
Lloh25:
	adrp	x8, _BAT_S1_FULL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BAT_S1_FULL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _POWER_SUPPLY_CAPACITY_LEVEL_FULL@GOTPAGEOFF]
Lloh30:
	adrp	x10, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGE
Lloh31:
	ldr	x10, [x10, _POWER_SUPPLY_CAPACITY_LEVEL_NORMAL@GOTPAGEOFF]
	tst	w8, w20
	csel	x8, x10, x9, eq
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BAT_STATUS0,4,2                ; @BAT_STATUS0
	.comm	_BAT_STATUS1,4,2                ; @BAT_STATUS1
	.comm	_BAT_STATUS2,4,2                ; @BAT_STATUS2
	.comm	_BAT_S0_DISCHRG_CRITICAL,4,2    ; @BAT_S0_DISCHRG_CRITICAL
	.comm	_BAT_S1_EMPTY,4,2               ; @BAT_S1_EMPTY
	.comm	_BAT_S2_LOW_LOW,4,2             ; @BAT_S2_LOW_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL
	.comm	_BAT_S0_LOW,4,2                 ; @BAT_S0_LOW
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_LOW,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_LOW
	.comm	_BAT_S1_FULL,4,2                ; @BAT_S1_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_FULL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_FULL
	.comm	_POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,4,2 ; @POWER_SUPPLY_CAPACITY_LEVEL_NORMAL
	.no_dead_strip	_bat_capacity_level
.subsections_via_symbols
