	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fuel_gauge_get_property
_fuel_gauge_get_property:               ## @fuel_gauge_get_property
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r13
	leaq	8(%rax), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	addl	$-128, %ebx
	cmpl	$11, %ebx
	ja	LBB0_28
## %bb.1:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_9:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	callq	_fuel_gauge_get_vocv
	testl	%eax, %eax
	jns	LBB0_7
	jmp	LBB0_5
LBB0_28:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_32
LBB0_3:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	callq	_fuel_gauge_get_vbatt
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movl	-44(%rbp), %edi
	jmp	LBB0_8
LBB0_27:
	movl	4(%r13), %edi
LBB0_8:
	callq	_PROP_VOLT
	movl	%eax, (%r14)
	jmp	LBB0_31
LBB0_22:
	movq	_POWER_SUPPLY_TECHNOLOGY_LION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_30
LBB0_29:
	movq	%r13, %rdi
	callq	_fuel_gauge_get_status
	movl	(%r13), %eax
	jmp	LBB0_30
LBB0_12:
	movq	_AXP20X_PWR_OP_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_fuel_gauge_reg_readb
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.13:
	movq	_CHRG_STAT_BAT_PRESENT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_15
## %bb.14:
	movl	$1, (%r14)
	jmp	LBB0_31
LBB0_2:
	movq	%r13, %rdi
	callq	_fuel_gauge_battery_health
	jmp	LBB0_30
LBB0_10:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	callq	_fuel_gauge_get_current
	testl	%eax, %eax
	js	LBB0_5
## %bb.11:
	movl	-44(%rbp), %edi
	callq	_PROP_CURR
	jmp	LBB0_30
LBB0_5:
	movl	%eax, %r12d
	jmp	LBB0_6
LBB0_23:
	movq	_AXP288_FG_CC_MTR1_REG@GOTPCREL(%rip), %rax
	jmp	LBB0_24
LBB0_26:
	movq	_AXP288_FG_DES_CAP1_REG@GOTPCREL(%rip), %rax
LBB0_24:
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_fuel_gauge_read_15bit_word
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.25:
	movq	_FG_DES_CAP_RES_LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%r12d, %eax
	jmp	LBB0_30
LBB0_20:
	movq	_AXP288_FG_LOW_CAP_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_fuel_gauge_reg_readb
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.21:
	andl	$15, %r12d
	movl	%r12d, (%r14)
	jmp	LBB0_31
LBB0_16:
	movq	_AXP20X_FG_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_fuel_gauge_reg_readb
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_6
## %bb.17:
	movq	_FG_REP_CAP_VALID@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_19
## %bb.18:
	movq	16(%r13), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_19:
	movq	_FG_REP_CAP_VAL_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
LBB0_30:
	movl	%eax, (%r14)
LBB0_31:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_32
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_32:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	$0, (%r14)
	jmp	LBB0_31
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_3
	.long	L0_0_set_27
	.long	L0_0_set_22
	.long	L0_0_set_29
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_23
	.long	L0_0_set_26
	.long	L0_0_set_20
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_AXP20X_PWR_OP_MODE,4,2         ## @AXP20X_PWR_OP_MODE
	.comm	_CHRG_STAT_BAT_PRESENT,4,2      ## @CHRG_STAT_BAT_PRESENT
	.comm	_AXP20X_FG_RES,4,2              ## @AXP20X_FG_RES
	.comm	_FG_REP_CAP_VALID,4,2           ## @FG_REP_CAP_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"capacity measurement not valid\n"

	.comm	_FG_REP_CAP_VAL_MASK,4,2        ## @FG_REP_CAP_VAL_MASK
	.comm	_AXP288_FG_LOW_CAP_REG,4,2      ## @AXP288_FG_LOW_CAP_REG
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ## @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_AXP288_FG_CC_MTR1_REG,4,2      ## @AXP288_FG_CC_MTR1_REG
	.comm	_FG_DES_CAP_RES_LSB,4,2         ## @FG_DES_CAP_RES_LSB
	.comm	_AXP288_FG_DES_CAP1_REG,4,2     ## @AXP288_FG_DES_CAP1_REG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_fuel_gauge_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fuel_gauge_get_property
_fuel_gauge_get_property:               ; @fuel_gauge_get_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	mov	x22, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	sub	w8, w21, #128
	cmp	w8, #11
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	add	x1, sp, #12
	mov	x0, x22
	bl	_fuel_gauge_get_vocv
	tbz	w0, #31, LBB0_5
	b	LBB0_16
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_30
LBB0_4:
	add	x1, sp, #12
	mov	x0, x22
	bl	_fuel_gauge_get_vbatt
	tbnz	w0, #31, LBB0_16
LBB0_5:
	ldr	w0, [sp, #12]
	b	LBB0_7
LBB0_6:
	ldr	w0, [x22, #4]
LBB0_7:
	bl	_PROP_VOLT
	str	w0, [x20]
	b	LBB0_28
LBB0_8:
Lloh5:
	adrp	x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	b	LBB0_27
LBB0_9:
	mov	x0, x22
	bl	_fuel_gauge_get_status
	ldr	w8, [x22]
	b	LBB0_27
LBB0_10:
Lloh8:
	adrp	x8, _AXP20X_PWR_OP_MODE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AXP20X_PWR_OP_MODE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_fuel_gauge_reg_readb
	mov	x21, x0
	tbnz	w0, #31, LBB0_29
; %bb.11:
Lloh11:
	adrp	x8, _CHRG_STAT_BAT_PRESENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CHRG_STAT_BAT_PRESENT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_31
; %bb.12:
	mov	w8, #1
	b	LBB0_27
LBB0_13:
	mov	x0, x22
	bl	_fuel_gauge_battery_health
	str	w0, [x20]
	b	LBB0_28
LBB0_14:
	add	x1, sp, #12
	mov	x0, x22
	bl	_fuel_gauge_get_current
	tbnz	w0, #31, LBB0_16
; %bb.15:
	ldr	w0, [sp, #12]
	bl	_PROP_CURR
	str	w0, [x20]
	b	LBB0_28
LBB0_16:
	mov	x21, x0
	b	LBB0_29
LBB0_17:
Lloh14:
	adrp	x8, _AXP288_FG_CC_MTR1_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AXP288_FG_CC_MTR1_REG@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:
Lloh16:
	adrp	x8, _AXP288_FG_DES_CAP1_REG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AXP288_FG_DES_CAP1_REG@GOTPAGEOFF]
LBB0_19:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_fuel_gauge_read_15bit_word
	mov	x21, x0
	tbnz	w0, #31, LBB0_29
; %bb.20:
Lloh18:
	adrp	x8, _FG_DES_CAP_RES_LSB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FG_DES_CAP_RES_LSB@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mul	w8, w8, w21
	b	LBB0_27
LBB0_21:
Lloh21:
	adrp	x8, _AXP288_FG_LOW_CAP_REG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AXP288_FG_LOW_CAP_REG@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_fuel_gauge_reg_readb
	mov	x21, x0
	tbnz	w0, #31, LBB0_29
; %bb.22:
	and	w8, w21, #0xf
	b	LBB0_27
LBB0_23:
Lloh24:
	adrp	x8, _AXP20X_FG_RES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AXP20X_FG_RES@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_fuel_gauge_reg_readb
	mov	x21, x0
	tbnz	w0, #31, LBB0_29
; %bb.24:
Lloh27:
	adrp	x8, _FG_REP_CAP_VALID@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FG_REP_CAP_VALID@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w21
	b.ne	LBB0_26
; %bb.25:
	ldr	x0, [x22, #16]
Lloh30:
	adrp	x1, l_.str@PAGE
Lloh31:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_26:
Lloh32:
	adrp	x8, _FG_REP_CAP_VAL_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _FG_REP_CAP_VAL_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	and	w8, w8, w21
LBB0_27:
	str	w8, [x20]
LBB0_28:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w21, #0
	b	LBB0_30
LBB0_29:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_30:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_31:
	str	wzr, [x20]
	b	LBB0_28
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
	.byte	(LBB0_18-LBB0_2)>>2
	.byte	(LBB0_21-LBB0_2)>>2
	.byte	(LBB0_23-LBB0_2)>>2
                                        ; -- End function
	.comm	_AXP20X_PWR_OP_MODE,4,2         ; @AXP20X_PWR_OP_MODE
	.comm	_CHRG_STAT_BAT_PRESENT,4,2      ; @CHRG_STAT_BAT_PRESENT
	.comm	_AXP20X_FG_RES,4,2              ; @AXP20X_FG_RES
	.comm	_FG_REP_CAP_VALID,4,2           ; @FG_REP_CAP_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"capacity measurement not valid\n"

	.comm	_FG_REP_CAP_VAL_MASK,4,2        ; @FG_REP_CAP_VAL_MASK
	.comm	_AXP288_FG_LOW_CAP_REG,4,2      ; @AXP288_FG_LOW_CAP_REG
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ; @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_AXP288_FG_CC_MTR1_REG,4,2      ; @AXP288_FG_CC_MTR1_REG
	.comm	_FG_DES_CAP_RES_LSB,4,2         ; @FG_DES_CAP_RES_LSB
	.comm	_AXP288_FG_DES_CAP1_REG,4,2     ; @AXP288_FG_DES_CAP1_REG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_fuel_gauge_get_property
.subsections_via_symbols
