	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bat_status
_bat_status:                            ## @bat_status
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -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
	movq	_BAT_S0_CHARGING@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_BAT_S0_DISCHARGE@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_4
## %bb.3:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_BAT_S1_FULL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.6:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAT_STATUS0,4,2                ## @BAT_STATUS0
	.comm	_BAT_STATUS1,4,2                ## @BAT_STATUS1
	.comm	_BAT_S0_CHARGING,4,2            ## @BAT_S0_CHARGING
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_BAT_S0_DISCHARGE,4,2           ## @BAT_S0_DISCHARGE
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BAT_S1_FULL,4,2                ## @BAT_S1_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.no_dead_strip	_bat_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bat_status
_bat_status:                            ; @bat_status
	.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
Lloh6:
	adrp	x8, _BAT_S0_CHARGING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BAT_S0_CHARGING@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_2
; %bb.1:
Lloh9:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh11:
	adrp	x8, _BAT_S0_DISCHARGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BAT_S0_DISCHARGE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x8, _BAT_S1_FULL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BAT_S1_FULL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
Lloh21:
	adrp	x10, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh22:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
	tst	w8, w0
	csel	x8, x10, x9, eq
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BAT_STATUS0,4,2                ; @BAT_STATUS0
	.comm	_BAT_STATUS1,4,2                ; @BAT_STATUS1
	.comm	_BAT_S0_CHARGING,4,2            ; @BAT_S0_CHARGING
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_BAT_S0_DISCHARGE,4,2           ; @BAT_S0_DISCHARGE
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BAT_S1_FULL,4,2                ; @BAT_S1_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.no_dead_strip	_bat_status
.subsections_via_symbols
