	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ab8500_fg_add_cap_sample
_ab8500_fg_add_cap_sample:              ## @ab8500_fg_add_cap_sample
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_ktime_get_boottime_seconds
	movq	24(%rbx), %r10
	movq	(%rbx), %rdx
	movq	8(%rbx), %rsi
	movq	_NBR_AVG_SAMPLES@GOTPCREL(%rip), %r8
	movq	_VALID_CAPACITY_SEC@GOTPCREL(%rip), %r9
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rcx
	subq	(%r9), %rcx
	cmpq	(%rdx,%rsi,8), %rcx
	jle	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %ecx
	subl	(%r10,%rsi,4), %ecx
	addl	%ecx, 16(%rbx)
	movl	%r14d, (%r10,%rsi,4)
	movq	%rax, (%rdx,%rsi,8)
	movq	8(%rbx), %rsi
	incq	%rsi
	movslq	(%r8), %rcx
	cmpq	%rcx, %rsi
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%esi, %esi
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rsi, 8(%rbx)
	movl	32(%rbx), %edi
	cmpl	%ecx, %edi
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	incl	%edi
	movl	%edi, 32(%rbx)
	jmp	LBB0_5
LBB0_6:
	movl	16(%rbx), %eax
	cltd
	idivl	%edi
	movl	%eax, 36(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NBR_AVG_SAMPLES,4,2            ## @NBR_AVG_SAMPLES
	.comm	_VALID_CAPACITY_SEC,8,3         ## @VALID_CAPACITY_SEC
	.no_dead_strip	_ab8500_fg_add_cap_sample
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ab8500_fg_add_cap_sample
_ab8500_fg_add_cap_sample:              ; @ab8500_fg_add_cap_sample
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_ktime_get_boottime_seconds
	ldr	x8, [x19, #24]
	ldp	x9, x12, [x19]
Lloh0:
	adrp	x10, _NBR_AVG_SAMPLES@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NBR_AVG_SAMPLES@GOTPAGEOFF]
Lloh2:
	adrp	x11, _VALID_CAPACITY_SEC@GOTPAGE
Lloh3:
	ldr	x11, [x11, _VALID_CAPACITY_SEC@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x14, [x11]
	ldr	x15, [x9, x12, lsl #3]
	sub	x14, x0, x14
	cmp	x14, x15
	b.le	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x13, x12, #2
	ldr	w14, [x8, x13]
	ldr	w15, [x19, #16]
	sub	w14, w20, w14
	add	w14, w14, w15
	str	w14, [x19, #16]
	str	w20, [x8, x13]
	str	x0, [x9, x12, lsl #3]
	ldr	x12, [x19, #8]
	add	x13, x12, #1
	ldrsw	x14, [x10]
	cmp	x13, x14
	csinc	x12, xzr, x12, eq
	str	x12, [x19, #8]
	ldr	w13, [x19, #32]
	cmp	w13, w14
	b.ge	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w13, w13, #1
	str	w13, [x19, #32]
	b	LBB0_1
LBB0_4:
	ldr	w8, [x19, #16]
	sdiv	w0, w8, w13
	str	w0, [x19, #36]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NBR_AVG_SAMPLES,4,2            ; @NBR_AVG_SAMPLES
	.comm	_VALID_CAPACITY_SEC,8,3         ; @VALID_CAPACITY_SEC
	.no_dead_strip	_ab8500_fg_add_cap_sample
.subsections_via_symbols
