	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq24190_charger_get_health
_bq24190_charger_get_health:            ## @bq24190_charger_get_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%rbx), %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_BQ24190_REG_F_NTC_FAULT_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.1:
	movq	_BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	andl	$7, %ebx
	cmpl	$6, %ebx
	ja	LBB0_5
## %bb.2:
	movl	$42, %eax
	btl	%ebx, %eax
	jb	LBB0_18
## %bb.3:
	movl	$84, %eax
	btl	%ebx, %eax
	jae	LBB0_5
LBB0_4:
	movq	_POWER_SUPPLY_HEALTH_OVERHEAT@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_6:
	movq	_BQ24190_REG_F_BAT_FAULT_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
LBB0_7:
	movq	_POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_18:
	movq	_POWER_SUPPLY_HEALTH_COLD@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_8:
	movq	_BQ24190_REG_F_CHRG_FAULT_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_14
## %bb.9:
	movq	_BQ24190_REG_F_CHRG_FAULT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	andl	$3, %ebx
	cmpl	$3, %ebx
	je	LBB0_13
## %bb.10:
	cmpl	$2, %ebx
	je	LBB0_4
## %bb.11:
	movl	$-1, %eax
	cmpl	$1, %ebx
	jne	LBB0_17
## %bb.12:
	movq	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_5:
	movq	_POWER_SUPPLY_HEALTH_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %eax
LBB0_17:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_BQ24190_REG_F_BOOST_FAULT_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_7
## %bb.15:
	movq	_POWER_SUPPLY_HEALTH_GOOD@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_13:
	movq	_POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_BQ24190_REG_F_NTC_FAULT_MASK,4,2 ## @BQ24190_REG_F_NTC_FAULT_MASK
	.comm	_BQ24190_REG_F_NTC_FAULT_SHIFT,4,2 ## @BQ24190_REG_F_NTC_FAULT_SHIFT
	.comm	_POWER_SUPPLY_HEALTH_COLD,4,2   ## @POWER_SUPPLY_HEALTH_COLD
	.comm	_POWER_SUPPLY_HEALTH_OVERHEAT,4,2 ## @POWER_SUPPLY_HEALTH_OVERHEAT
	.comm	_POWER_SUPPLY_HEALTH_UNKNOWN,4,2 ## @POWER_SUPPLY_HEALTH_UNKNOWN
	.comm	_BQ24190_REG_F_BAT_FAULT_MASK,4,2 ## @BQ24190_REG_F_BAT_FAULT_MASK
	.comm	_POWER_SUPPLY_HEALTH_OVERVOLTAGE,4,2 ## @POWER_SUPPLY_HEALTH_OVERVOLTAGE
	.comm	_BQ24190_REG_F_CHRG_FAULT_MASK,4,2 ## @BQ24190_REG_F_CHRG_FAULT_MASK
	.comm	_BQ24190_REG_F_CHRG_FAULT_SHIFT,4,2 ## @BQ24190_REG_F_CHRG_FAULT_SHIFT
	.comm	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,4,2 ## @POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.comm	_POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,4,2 ## @POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
	.comm	_BQ24190_REG_F_BOOST_FAULT_MASK,4,2 ## @BQ24190_REG_F_BOOST_FAULT_MASK
	.comm	_POWER_SUPPLY_HEALTH_GOOD,4,2   ## @POWER_SUPPLY_HEALTH_GOOD
	.no_dead_strip	_bq24190_charger_get_health
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq24190_charger_get_health
_bq24190_charger_get_health:            ; @bq24190_charger_get_health
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	add	x21, x0, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	w20, [x20]
	mov	x0, x21
	bl	_mutex_unlock
Lloh0:
	adrp	x8, _BQ24190_REG_F_NTC_FAULT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BQ24190_REG_F_NTC_FAULT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w8, w20, w8
	and	w8, w8, #0x7
	cmp	w8, #6
	b.hi	LBB0_13
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #42
	tst	w8, w9
	b.ne	LBB0_7
; %bb.3:
	mov	w9, #84
	tst	w8, w9
	b.eq	LBB0_13
LBB0_4:
Lloh6:
	adrp	x8, _POWER_SUPPLY_HEALTH_OVERHEAT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_OVERHEAT@GOTPAGEOFF]
	b	LBB0_14
LBB0_5:
Lloh8:
	adrp	x8, _BQ24190_REG_F_BAT_FAULT_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BQ24190_REG_F_BAT_FAULT_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPAGEOFF]
	b	LBB0_14
LBB0_7:
Lloh13:
	adrp	x8, _POWER_SUPPLY_HEALTH_COLD@GOTPAGE
Lloh14:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_COLD@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
Lloh15:
	adrp	x8, _BQ24190_REG_F_CHRG_FAULT_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BQ24190_REG_F_CHRG_FAULT_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_16
; %bb.9:
Lloh18:
	adrp	x8, _BQ24190_REG_F_CHRG_FAULT_SHIFT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BQ24190_REG_F_CHRG_FAULT_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	asr	w8, w20, w8
	and	w8, w8, #0x3
	cmp	w8, #3
	b.eq	LBB0_18
; %bb.10:
	cmp	w8, #2
	b.eq	LBB0_4
; %bb.11:
	cmp	w8, #1
	b.ne	LBB0_19
; %bb.12:
Lloh21:
	adrp	x8, _POWER_SUPPLY_HEALTH_UNSPEC_FAILURE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_UNSPEC_FAILURE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh23:
	adrp	x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
LBB0_15:
	str	w8, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_16:
Lloh25:
	adrp	x8, _BQ24190_REG_F_BOOST_FAULT_MASK@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BQ24190_REG_F_BOOST_FAULT_MASK@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_6
; %bb.17:
Lloh28:
	adrp	x8, _POWER_SUPPLY_HEALTH_GOOD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_GOOD@GOTPAGEOFF]
	b	LBB0_14
LBB0_18:
Lloh30:
	adrp	x8, _POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE@GOTPAGEOFF]
	b	LBB0_14
LBB0_19:
	mov	w8, #-1
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_BQ24190_REG_F_NTC_FAULT_MASK,4,2 ; @BQ24190_REG_F_NTC_FAULT_MASK
	.comm	_BQ24190_REG_F_NTC_FAULT_SHIFT,4,2 ; @BQ24190_REG_F_NTC_FAULT_SHIFT
	.comm	_POWER_SUPPLY_HEALTH_COLD,4,2   ; @POWER_SUPPLY_HEALTH_COLD
	.comm	_POWER_SUPPLY_HEALTH_OVERHEAT,4,2 ; @POWER_SUPPLY_HEALTH_OVERHEAT
	.comm	_POWER_SUPPLY_HEALTH_UNKNOWN,4,2 ; @POWER_SUPPLY_HEALTH_UNKNOWN
	.comm	_BQ24190_REG_F_BAT_FAULT_MASK,4,2 ; @BQ24190_REG_F_BAT_FAULT_MASK
	.comm	_POWER_SUPPLY_HEALTH_OVERVOLTAGE,4,2 ; @POWER_SUPPLY_HEALTH_OVERVOLTAGE
	.comm	_BQ24190_REG_F_CHRG_FAULT_MASK,4,2 ; @BQ24190_REG_F_CHRG_FAULT_MASK
	.comm	_BQ24190_REG_F_CHRG_FAULT_SHIFT,4,2 ; @BQ24190_REG_F_CHRG_FAULT_SHIFT
	.comm	_POWER_SUPPLY_HEALTH_UNSPEC_FAILURE,4,2 ; @POWER_SUPPLY_HEALTH_UNSPEC_FAILURE
	.comm	_POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,4,2 ; @POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE
	.comm	_BQ24190_REG_F_BOOST_FAULT_MASK,4,2 ; @BQ24190_REG_F_BOOST_FAULT_MASK
	.comm	_POWER_SUPPLY_HEALTH_GOOD,4,2   ; @POWER_SUPPLY_HEALTH_GOOD
	.no_dead_strip	_bq24190_charger_get_health
.subsections_via_symbols
