	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9150_charger_battery_health
_da9150_charger_battery_health:         ## @da9150_charger_battery_health
	.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
	movl	(%rdi), %edi
	movq	_DA9150_STATUS_J@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_da9150_reg_read
	movq	_DA9150_CHG_TEMP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	cmpl	$128, %ecx
	je	LBB0_1
## %bb.2:
	cmpl	$129, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_POWER_SUPPLY_HEALTH_OVERHEAT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_POWER_SUPPLY_HEALTH_COLD@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_DA9150_CHG_STAT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	addl	$-130, %eax
	cmpl	$2, %eax
	ja	LBB0_5
## %bb.6:
	cltq
	leaq	l_switch.table.da9150_charger_battery_health(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_POWER_SUPPLY_HEALTH_GOOD@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DA9150_STATUS_J,4,2            ## @DA9150_STATUS_J
	.comm	_DA9150_CHG_TEMP_MASK,4,2       ## @DA9150_CHG_TEMP_MASK
	.comm	_POWER_SUPPLY_HEALTH_COLD,4,2   ## @POWER_SUPPLY_HEALTH_COLD
	.comm	_POWER_SUPPLY_HEALTH_OVERHEAT,4,2 ## @POWER_SUPPLY_HEALTH_OVERHEAT
	.comm	_DA9150_CHG_STAT_MASK,4,2       ## @DA9150_CHG_STAT_MASK
	.comm	_POWER_SUPPLY_HEALTH_DEAD,4,2   ## @POWER_SUPPLY_HEALTH_DEAD
	.comm	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,4,2 ## @POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.comm	_POWER_SUPPLY_HEALTH_GOOD,4,2   ## @POWER_SUPPLY_HEALTH_GOOD
	.no_dead_strip	_da9150_charger_battery_health
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.da9150_charger_battery_health
l_switch.table.da9150_charger_battery_health:
	.quad	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.quad	_POWER_SUPPLY_HEALTH_DEAD
	.quad	_POWER_SUPPLY_HEALTH_DEAD

.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_health
_da9150_charger_battery_health:         ; @da9150_charger_battery_health
	.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
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _DA9150_STATUS_J@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DA9150_STATUS_J@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_da9150_reg_read
Lloh3:
	adrp	x8, _DA9150_CHG_TEMP_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DA9150_CHG_TEMP_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _POWER_SUPPLY_HEALTH_OVERHEAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_OVERHEAT@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _POWER_SUPPLY_HEALTH_COLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_COLD@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh10:
	adrp	x8, _DA9150_CHG_STAT_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DA9150_CHG_STAT_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w8, w8, #130
	cmp	w8, #2
	b.hi	LBB0_6
; %bb.5:
Lloh13:
	adrp	x9, l_switch.table.da9150_charger_battery_health@PAGE
Lloh14:
	add	x9, x9, l_switch.table.da9150_charger_battery_health@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _POWER_SUPPLY_HEALTH_GOOD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_GOOD@GOTPAGEOFF]
LBB0_7:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_DA9150_STATUS_J,4,2            ; @DA9150_STATUS_J
	.comm	_DA9150_CHG_TEMP_MASK,4,2       ; @DA9150_CHG_TEMP_MASK
	.comm	_POWER_SUPPLY_HEALTH_COLD,4,2   ; @POWER_SUPPLY_HEALTH_COLD
	.comm	_POWER_SUPPLY_HEALTH_OVERHEAT,4,2 ; @POWER_SUPPLY_HEALTH_OVERHEAT
	.comm	_DA9150_CHG_STAT_MASK,4,2       ; @DA9150_CHG_STAT_MASK
	.comm	_POWER_SUPPLY_HEALTH_DEAD,4,2   ; @POWER_SUPPLY_HEALTH_DEAD
	.comm	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,4,2 ; @POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.comm	_POWER_SUPPLY_HEALTH_GOOD,4,2   ; @POWER_SUPPLY_HEALTH_GOOD
	.no_dead_strip	_da9150_charger_battery_health
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.da9150_charger_battery_health
l_switch.table.da9150_charger_battery_health:
	.quad	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.quad	_POWER_SUPPLY_HEALTH_DEAD
	.quad	_POWER_SUPPLY_HEALTH_DEAD

.subsections_via_symbols
