	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9150_charger_battery_status
_da9150_charger_battery_status:         ## @da9150_charger_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_DA9150_STATUS_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_da9150_reg_read
	movq	_DA9150_VBUS_STAT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_DA9150_VBUS_STAT_OFF@GOTPCREL(%rip), %rdx
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rcx
	cmpl	(%rdx), %eax
	je	LBB0_5
## %bb.1:
	movq	_DA9150_VBUS_STAT_WAIT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	je	LBB0_5
## %bb.2:
	movl	(%rbx), %edi
	movq	_DA9150_STATUS_J@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_da9150_reg_read
	movq	_DA9150_CHG_STAT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-128, %eax
	cmpl	$9, %eax
	ja	LBB0_3
## %bb.4:
	cltq
	leaq	l_switch.table.da9150_charger_battery_status(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	jmp	LBB0_5
LBB0_3:
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9150_STATUS_H,4,2            ## @DA9150_STATUS_H
	.comm	_DA9150_VBUS_STAT_MASK,4,2      ## @DA9150_VBUS_STAT_MASK
	.comm	_DA9150_VBUS_STAT_OFF,4,2       ## @DA9150_VBUS_STAT_OFF
	.comm	_DA9150_VBUS_STAT_WAIT,4,2      ## @DA9150_VBUS_STAT_WAIT
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_DA9150_STATUS_J,4,2            ## @DA9150_STATUS_J
	.comm	_DA9150_CHG_STAT_MASK,4,2       ## @DA9150_CHG_STAT_MASK
	.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_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_da9150_charger_battery_status
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.da9150_charger_battery_status
l_switch.table.da9150_charger_battery_status:
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_FULL
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9150_charger_battery_status
_da9150_charger_battery_status:         ; @da9150_charger_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
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _DA9150_STATUS_H@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DA9150_STATUS_H@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_da9150_reg_read
Lloh3:
	adrp	x8, _DA9150_VBUS_STAT_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DA9150_VBUS_STAT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _DA9150_VBUS_STAT_OFF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DA9150_VBUS_STAT_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _DA9150_VBUS_STAT_WAIT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _DA9150_VBUS_STAT_WAIT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _DA9150_STATUS_J@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DA9150_STATUS_J@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_da9150_reg_read
Lloh17:
	adrp	x8, _DA9150_CHG_STAT_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DA9150_CHG_STAT_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #128
	cmp	w8, #9
	b.hi	LBB0_4
; %bb.3:
Lloh20:
	adrp	x9, l_switch.table.da9150_charger_battery_status@PAGE
Lloh21:
	add	x9, x9, l_switch.table.da9150_charger_battery_status@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
Lloh22:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9150_STATUS_H,4,2            ; @DA9150_STATUS_H
	.comm	_DA9150_VBUS_STAT_MASK,4,2      ; @DA9150_VBUS_STAT_MASK
	.comm	_DA9150_VBUS_STAT_OFF,4,2       ; @DA9150_VBUS_STAT_OFF
	.comm	_DA9150_VBUS_STAT_WAIT,4,2      ; @DA9150_VBUS_STAT_WAIT
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_DA9150_STATUS_J,4,2            ; @DA9150_STATUS_J
	.comm	_DA9150_CHG_STAT_MASK,4,2       ; @DA9150_CHG_STAT_MASK
	.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_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_da9150_charger_battery_status
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.da9150_charger_battery_status
l_switch.table.da9150_charger_battery_status:
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_FULL
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING
	.quad	_POWER_SUPPLY_STATUS_NOT_CHARGING
	.quad	_POWER_SUPPLY_STATUS_CHARGING

.subsections_via_symbols
