	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bq24190_battery_get_health
_bq24190_battery_get_health:            ## @bq24190_battery_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_BAT_FAULT_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	_BQ24190_REG_F_NTC_FAULT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	cmpl	$6, %ebx
	ja	LBB0_3
## %bb.4:
	movslq	%ebx, %rax
	leaq	l_switch.table.bq24190_battery_get_health(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_POWER_SUPPLY_HEALTH_UNKNOWN@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_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_GOOD,4,2   ## @POWER_SUPPLY_HEALTH_GOOD
	.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
	.no_dead_strip	_bq24190_battery_get_health
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.bq24190_battery_get_health
l_switch.table.bq24190_battery_get_health:
	.quad	_POWER_SUPPLY_HEALTH_GOOD
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bq24190_battery_get_health
_bq24190_battery_get_health:            ; @bq24190_battery_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_BAT_FAULT_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BQ24190_REG_F_BAT_FAULT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_OVERVOLTAGE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
Lloh5:
	adrp	x8, _BQ24190_REG_F_NTC_FAULT_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BQ24190_REG_F_NTC_FAULT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh8:
	adrp	x9, _BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BQ24190_REG_F_NTC_FAULT_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cmp	w8, #6
	b.hi	LBB0_4
; %bb.3:
Lloh11:
	adrp	x9, l_switch.table.bq24190_battery_get_health@PAGE
Lloh12:
	add	x9, x9, l_switch.table.bq24190_battery_get_health@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _POWER_SUPPLY_HEALTH_UNKNOWN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.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_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_GOOD,4,2   ; @POWER_SUPPLY_HEALTH_GOOD
	.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
	.no_dead_strip	_bq24190_battery_get_health
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.bq24190_battery_get_health
l_switch.table.bq24190_battery_get_health:
	.quad	_POWER_SUPPLY_HEALTH_GOOD
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT
	.quad	_POWER_SUPPLY_HEALTH_COLD
	.quad	_POWER_SUPPLY_HEALTH_OVERHEAT

.subsections_via_symbols
