	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm860x_batt_get_prop
_pm860x_batt_get_prop:                  ## @pm860x_batt_get_prop
	.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	%rdx, %r14
	movl	%esi, %ebx
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	addl	$-128, %ebx
	cmpl	$6, %ebx
	ja	LBB0_3
## %bb.1:
	movq	%rax, %r15
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	_OCV_MODE_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_measure_vbatt
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_5
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_20
LBB0_4:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_calc_ocv
	testl	%eax, %eax
	jne	LBB0_20
LBB0_5:
	imull	$1000, -28(%rbp), %eax          ## imm = 0x3E8
	jmp	LBB0_19
LBB0_6:
	cmpl	$0, (%r15)
	je	LBB0_17
## %bb.7:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_measure_temp
	testl	%eax, %eax
	jne	LBB0_20
## %bb.8:
	movl	-28(%rbp), %eax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	jmp	LBB0_18
LBB0_9:
	movq	_POWER_SUPPLY_TECHNOLOGY_LION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_10:
	movl	(%r15), %eax
	jmp	LBB0_19
LBB0_11:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_measure_current
	testl	%eax, %eax
	jne	LBB0_20
## %bb.12:
	movl	-28(%rbp), %eax
	jmp	LBB0_19
LBB0_13:
	leaq	-28(%rbp), %rsi
	movq	%r15, %rdi
	callq	_calc_capacity
	testl	%eax, %eax
	jne	LBB0_20
## %bb.14:
	movl	-28(%rbp), %edx
	cmpl	$100, %edx
	movl	$100, %ecx
	cmovbl	%edx, %ecx
	xorl	%eax, %eax
	testl	%edx, %edx
	cmovsl	%eax, %ecx
	cmpl	$0, (%r15)
	jne	LBB0_16
## %bb.15:
	movl	$100, -28(%rbp)
	movl	$100, %ecx
LBB0_16:
	movl	%ecx, (%r14)
	jmp	LBB0_20
LBB0_17:
	movl	$250, %eax
LBB0_18:
	movl	%eax, -28(%rbp)
LBB0_19:
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ## @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_OCV_MODE_ACTIVE,4,2            ## @OCV_MODE_ACTIVE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_pm860x_batt_get_prop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm860x_batt_get_prop
_pm860x_batt_get_prop:                  ; @pm860x_batt_get_prop
	.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	x19, x2
	mov	x21, x1
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	sub	w8, w21, #128
	cmp	w8, #6
	b.hi	LBB0_3
; %bb.1:
	mov	x20, x0
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:
Lloh2:
	adrp	x8, _OCV_MODE_ACTIVE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCV_MODE_ACTIVE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_measure_vbatt
	cbnz	w0, LBB0_20
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_4:
	add	x1, sp, #12
	mov	x0, x20
	bl	_calc_ocv
	cbnz	w0, LBB0_20
LBB0_5:
	ldr	w8, [sp, #12]
	mov	w9, #1000
	mul	w8, w8, w9
	b	LBB0_19
LBB0_6:
	ldr	w8, [x20]
	cbz	w8, LBB0_17
; %bb.7:
	add	x1, sp, #12
	mov	x0, x20
	bl	_measure_temp
	cbnz	w0, LBB0_20
; %bb.8:
	ldr	w8, [sp, #12]
	add	w8, w8, w8, lsl #2
	lsl	w8, w8, #1
	b	LBB0_18
LBB0_9:
	mov	w0, #0
Lloh8:
	adrp	x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_TECHNOLOGY_LION@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	b	LBB0_19
LBB0_10:
	mov	w0, #0
	ldr	w8, [x20]
	b	LBB0_19
LBB0_11:
	add	x1, sp, #12
	mov	x0, x20
	bl	_measure_current
	cbnz	w0, LBB0_20
; %bb.12:
	ldr	w8, [sp, #12]
	b	LBB0_19
LBB0_13:
	add	x1, sp, #12
	mov	x0, x20
	bl	_calc_capacity
	cbnz	w0, LBB0_20
; %bb.14:
	ldr	w8, [sp, #12]
	mov	w9, #100
	cmp	w8, #100
	csel	w10, w8, w9, lo
	cmp	w8, #0
	csel	w8, wzr, w10, lt
	ldr	w10, [x20]
	cbnz	w10, LBB0_16
; %bb.15:
	str	w9, [sp, #12]
	mov	w8, #100
LBB0_16:
	mov	w0, #0
	b	LBB0_19
LBB0_17:
	mov	w8, #250
LBB0_18:
	mov	w0, #0
	str	w8, [sp, #12]
LBB0_19:
	str	w8, [x19]
LBB0_20:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_POWER_SUPPLY_TECHNOLOGY_LION,4,2 ; @POWER_SUPPLY_TECHNOLOGY_LION
	.comm	_OCV_MODE_ACTIVE,4,2            ; @OCV_MODE_ACTIVE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_pm860x_batt_get_prop
.subsections_via_symbols
