	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_get_ext_psy_data
_ab8500_fg_get_ext_psy_data:            ## @ab8500_fg_get_ext_psy_data
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r13
	movq	16(%rax), %r15
	movq	%rbx, %rdi
	callq	_power_supply_get_drvdata
	movq	%rax, %r14
	movl	8(%r13), %esi
	movq	(%rbx), %rax
	movl	20(%rax), %edx
	movq	%r15, %rdi
	callq	_match_string
	testl	%eax, %eax
	js	LBB0_32
## %bb.1:
	movq	(%r13), %rax
	cmpl	$0, (%rax)
	jle	LBB0_32
## %bb.2:
	movq	%r14, %rcx
	addq	$48, %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	leaq	-48(%rbp), %r12
	jmp	LBB0_3
LBB0_26:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, 20(%r14)
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movq	(%r13), %rax
	movslq	(%rax), %rcx
	cmpq	%rcx, %r15
	jge	LBB0_32
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rax), %rax
	movl	(%rax,%r15,4), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_power_supply_get_property
	testq	%rax, %rax
	jne	LBB0_31
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$134, %ebx
	je	LBB0_28
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$135, %ebx
	je	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$136, %ebx
	jne	LBB0_31
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	cmpl	$128, 16(%rax)
	jne	LBB0_31
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax
	movl	$-129, %ecx
	addl	%ecx, %eax
	cmpl	$4, %eax
	ja	LBB0_31
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 4(%r14)
	je	LBB0_31
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	$0, 4(%r14)
	jmp	LBB0_12
LBB0_28:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	cmpl	$128, 16(%rax)
	jne	LBB0_31
## %bb.29:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 16(%r14)
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_31
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r13), %rax
	cmpl	$128, 16(%rax)
	jne	LBB0_31
## %bb.22:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 16(%r14)
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%r14), %rcx
	movq	(%rcx), %rax
	movq	_BATTERY_UNKNOWN@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rcx
	movl	$1, 16(%r14)
	movl	(%rcx,%rax,8), %edx
	movq	_MILLI_TO_MICRO@GOTPCREL(%rip), %rsi
	imull	(%rsi), %edx
	movl	%edx, 36(%r14)
	movl	%edx, 28(%r14)
	movl	4(%rcx,%rax,8), %eax
	movl	%eax, 24(%r14)
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -48(%rbp)
	jne	LBB0_26
## %bb.27:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, 20(%r14)
	jmp	LBB0_31
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 8(%r14)
	jne	LBB0_31
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
	movl	32(%r14), %eax
	movl	52(%r14), %edi
	movl	%eax, 28(%r14)
	jmp	LBB0_15
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 4(%r14)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 8(%r14)
	je	LBB0_31
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	$1, 4(%r14)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%r14), %rax
	cmpl	$0, 16(%rax)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_ab8500_fg_update_cap_scalers
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	52(%r14), %edi
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_queue_work
	jmp	LBB0_31
LBB0_32:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_10
	.long	L0_0_set_16
	.long	L0_0_set_10
	.long	L0_0_set_18
	.end_data_region
                                        ## -- End function
	.comm	_BATTERY_UNKNOWN,8,3            ## @BATTERY_UNKNOWN
	.comm	_MILLI_TO_MICRO,4,2             ## @MILLI_TO_MICRO
	.no_dead_strip	_ab8500_fg_get_ext_psy_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ab8500_fg_get_ext_psy_data
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_ab8500_fg_get_ext_psy_data:            ; @ab8500_fg_get_ext_psy_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x21, x1
	bl	_dev_get_drvdata
	mov	x19, x0
	ldr	x22, [x0, #16]
	mov	x0, x21
	bl	_power_supply_get_drvdata
	mov	x20, x0
	ldr	w1, [x19, #8]
	ldr	x8, [x21]
	ldr	w2, [x8, #20]
	mov	x0, x22
	bl	_match_string
	tbnz	w0, #31, LBB0_31
; %bb.1:
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_31
; %bb.2:
	mov	x23, #0
	add	x21, x20, #48
Lloh0:
	adrp	x24, _BATTERY_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BATTERY_UNKNOWN@GOTPAGEOFF]
Lloh2:
	adrp	x25, _MILLI_TO_MICRO@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MILLI_TO_MICRO@GOTPAGEOFF]
	mov	w26, #1
	movi.2s	v8, #1
Lloh4:
	adrp	x27, lJTI0_0@PAGE
Lloh5:
	add	x27, x27, lJTI0_0@PAGEOFF
Lloh6:
	adrp	x9, lCPI0_0@PAGE
Lloh7:
	ldr	d9, [x9, lCPI0_0@PAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	wzr, [x20, #20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19]
	ldrsw	x9, [x8]
	cmp	x23, x9
	b.ge	LBB0_31
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x8, #8]
	ldr	w22, [x8, x23, lsl #2]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_power_supply_get_property
	cbnz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #134
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #135
	b.eq	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w22, #136
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	w8, [x8, #16]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #8]
	sub	w8, w8, #129
	cmp	w8, #4
	b.hi	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	adr	x9, LBB0_12
	ldrb	w10, [x27, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_4
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	stp	wzr, wzr, [x20, #4]
	b	LBB0_28
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	w8, [x8, #16]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #16]
	cbz	w8, LBB0_4
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #8]
	str	w8, [x20]
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	ldr	w8, [x8, #16]
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #40]
	ldr	x8, [x9]
	ldr	x10, [x24]
	cmp	x8, x10
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x9, #8]
	str	w26, [x20, #16]
	ldr	w10, [x25]
	add	x8, x9, x8, lsl #3
	ldp	w9, w8, [x8]
	mul	w9, w9, w10
	str	w9, [x20, #36]
	stp	w8, w9, [x20, #24]
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #8]
	cbnz	w8, LBB0_3
; %bb.22:                               ;   in Loop: Header=BB0_5 Depth=1
	str	w26, [x20, #20]
	b	LBB0_4
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_4
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	str	d8, [x20, #8]
	ldr	w8, [x20, #32]
	str	w8, [x20, #28]
	b	LBB0_30
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_27
; %bb.26:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #8]
	cbz	w8, LBB0_4
LBB0_27:                                ;   in Loop: Header=BB0_5 Depth=1
	stur	d9, [x20, #4]
LBB0_28:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #40]
	ldr	w8, [x8, #16]
	cbz	w8, LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_ab8500_fg_update_cap_scalers
LBB0_30:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20, #52]
	mov	x1, x21
	bl	_queue_work
	b	LBB0_4
LBB0_31:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_23-LBB0_12)>>2
	.byte	(LBB0_12-LBB0_12)>>2
	.byte	(LBB0_25-LBB0_12)>>2
                                        ; -- End function
	.comm	_BATTERY_UNKNOWN,8,3            ; @BATTERY_UNKNOWN
	.comm	_MILLI_TO_MICRO,4,2             ; @MILLI_TO_MICRO
	.no_dead_strip	_ab8500_fg_get_ext_psy_data
.subsections_via_symbols
