	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq27xxx_battery_status
_bq27xxx_battery_status:                ## @bq27xxx_battery_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	%rsi, %rbx
	movq	_BQ27XXX_O_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%rdi), %eax
	testl	%ecx, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_BQ27000_FLAG_FC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.5:
	movq	_BQ27000_FLAG_CHGS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.6:
	movl	8(%rdi), %edi
	callq	_power_supply_am_i_supplied
	testq	%rax, %rax
	jle	LBB0_11
## %bb.7:
	movq	_POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_3:
	movq	_BQ27XXX_FLAG_FC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
LBB0_2:
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_8:
	movq	_BQ27XXX_FLAG_DSC@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_11
LBB0_9:
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BQ27XXX_O_ZERO,4,2             ## @BQ27XXX_O_ZERO
	.comm	_BQ27000_FLAG_FC,4,2            ## @BQ27000_FLAG_FC
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_BQ27000_FLAG_CHGS,4,2          ## @BQ27000_FLAG_CHGS
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ## @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BQ27XXX_FLAG_FC,4,2            ## @BQ27XXX_FLAG_FC
	.comm	_BQ27XXX_FLAG_DSC,4,2           ## @BQ27XXX_FLAG_DSC
	.no_dead_strip	_bq27xxx_battery_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq27xxx_battery_status
_bq27xxx_battery_status:                ; @bq27xxx_battery_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
	mov	x19, x1
Lloh0:
	adrp	x8, _BQ27XXX_O_ZERO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BQ27XXX_O_ZERO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldp	w10, w8, [x0]
	tst	w9, w10
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x9, _BQ27000_FLAG_FC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _BQ27000_FLAG_FC@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x9, _BQ27000_FLAG_CHGS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BQ27000_FLAG_CHGS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
Lloh9:
	adrp	x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x9, _BQ27XXX_FLAG_FC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BQ27XXX_FLAG_FC@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
LBB0_5:
Lloh14:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh16:
	adrp	x9, _BQ27XXX_FLAG_DSC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BQ27XXX_FLAG_DSC@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh20:
	ldr	x10, [x10, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
Lloh21:
	adrp	x11, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh22:
	ldr	x11, [x11, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	b	LBB0_6
LBB0_8:
	ldr	w0, [x0, #8]
	bl	_power_supply_am_i_supplied
Lloh23:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh24:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
Lloh25:
	adrp	x9, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGE
Lloh26:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_NOT_CHARGING@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, gt
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.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
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BQ27XXX_O_ZERO,4,2             ; @BQ27XXX_O_ZERO
	.comm	_BQ27000_FLAG_FC,4,2            ; @BQ27000_FLAG_FC
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_BQ27000_FLAG_CHGS,4,2          ; @BQ27000_FLAG_CHGS
	.comm	_POWER_SUPPLY_STATUS_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_POWER_SUPPLY_STATUS_NOT_CHARGING,4,2 ; @POWER_SUPPLY_STATUS_NOT_CHARGING
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_BQ27XXX_FLAG_FC,4,2            ; @BQ27XXX_FLAG_FC
	.comm	_BQ27XXX_FLAG_DSC,4,2           ; @BQ27XXX_FLAG_DSC
	.no_dead_strip	_bq27xxx_battery_status
.subsections_via_symbols
