	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function olpc_bat_get_status
_olpc_bat_get_status:                   ## @olpc_bat_get_status
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	_BAT_STAT_CHARGING@GOTPCREL(%rip), %rax
	movq	_BAT_STAT_TRICKLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%edx, %ecx
	jne	LBB0_6
## %bb.2:
	movq	_BAT_STAT_DISCHARGING@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_3
## %bb.9:
	movq	_BAT_STAT_FULL@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_4:
	movq	_BAT_STAT_AC@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_3
## %bb.5:
	movq	_BAT_STAT_FULL@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	jne	LBB0_11
LBB0_6:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
LBB0_12:
	movq	(%rax), %rax
	movq	%rax, (%rsi)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BAT_STAT_CHARGING,4,2          ## @BAT_STAT_CHARGING
	.comm	_BAT_STAT_TRICKLE,4,2           ## @BAT_STAT_TRICKLE
	.comm	_POWER_SUPPLY_STATUS_CHARGING,8,3 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_BAT_STAT_DISCHARGING,4,2       ## @BAT_STAT_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,8,3 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BAT_STAT_FULL,4,2              ## @BAT_STAT_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,8,3   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,8,3 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_BAT_STAT_AC,4,2                ## @BAT_STAT_AC
	.no_dead_strip	_olpc_bat_get_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function olpc_bat_get_status
_olpc_bat_get_status:                   ; @olpc_bat_get_status
	.cfi_startproc
; %bb.0:
	ldr	x8, [x0]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _BAT_STAT_CHARGING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BAT_STAT_CHARGING@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _BAT_STAT_TRICKLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BAT_STAT_TRICKLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w2
	b.eq	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh8:
	adrp	x8, _BAT_STAT_AC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BAT_STAT_AC@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_6
; %bb.4:
Lloh11:
	adrp	x8, _BAT_STAT_FULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BAT_STAT_FULL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
Lloh16:
	adrp	x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh17:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh18:
	adrp	x8, _BAT_STAT_DISCHARGING@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BAT_STAT_DISCHARGING@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_7
LBB0_6:
Lloh21:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh23:
	adrp	x8, _BAT_STAT_FULL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BAT_STAT_FULL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	adrp	x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh27:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
Lloh28:
	adrp	x10, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh29:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
LBB0_8:
	tst	w8, w2
	csel	x8, x10, x9, eq
LBB0_9:
	ldr	x8, [x8]
	str	x8, [x1]
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_BAT_STAT_CHARGING,4,2          ; @BAT_STAT_CHARGING
	.comm	_BAT_STAT_TRICKLE,4,2           ; @BAT_STAT_TRICKLE
	.comm	_POWER_SUPPLY_STATUS_CHARGING,8,3 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_BAT_STAT_DISCHARGING,4,2       ; @BAT_STAT_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,8,3 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BAT_STAT_FULL,4,2              ; @BAT_STAT_FULL
	.comm	_POWER_SUPPLY_STATUS_FULL,8,3   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,8,3 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_BAT_STAT_AC,4,2                ; @BAT_STAT_AC
	.no_dead_strip	_olpc_bat_get_status
.subsections_via_symbols
