	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function abx500_chargalg_end_of_charge
_abx500_chargalg_end_of_charge:         ## @abx500_chargalg_end_of_charge
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_POWER_SUPPLY_STATUS_CHARGING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.1:
	movq	8(%rbx), %rax
	movq	_STATE_NORMAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.2:
	cmpl	$0, 16(%rbx)
	je	LBB0_3
LBB0_10:
	movq	$0, 24(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	40(%rbx), %rdx
	movq	56(%rbx), %rcx
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	shlq	$4, %rax
	cmpq	(%rcx,%rax), %rdx
	jge	LBB0_6
## %bb.4:
	cmpq	$0, 72(%rbx)
	jne	LBB0_6
## %bb.5:
	cmpq	$0, 64(%rbx)
	je	LBB0_10
LBB0_6:
	movq	48(%rbx), %rdx
	testq	%rdx, %rdx
	jle	LBB0_10
## %bb.7:
	cmpq	8(%rcx,%rax), %rdx
	jge	LBB0_10
## %bb.8:
	movq	24(%rbx), %rdx
	incq	%rdx
	movq	%rdx, 24(%rbx)
	movq	_EOC_COND_CNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_11
## %bb.9:
	movl	32(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_11:
	movq	$0, 24(%rbx)
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movl	$1, 16(%rbx)
	movl	32(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	36(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_power_supply_changed           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_SUPPLY_STATUS_CHARGING,8,3 ## @POWER_SUPPLY_STATUS_CHARGING
	.comm	_STATE_NORMAL,8,3               ## @STATE_NORMAL
	.comm	_EOC_COND_CNT,8,3               ## @EOC_COND_CNT
	.comm	_POWER_SUPPLY_STATUS_FULL,8,3   ## @POWER_SUPPLY_STATUS_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EOC reached!\n"

L_.str.1:                               ## @.str.1
	.asciz	" EOC limit reached for the %d time, out of %d before EOC\n"

	.no_dead_strip	_abx500_chargalg_end_of_charge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function abx500_chargalg_end_of_charge
_abx500_chargalg_end_of_charge:         ; @abx500_chargalg_end_of_charge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _POWER_SUPPLY_STATUS_CHARGING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _STATE_NORMAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATE_NORMAL@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_5
LBB0_3:
	str	xzr, [x19, #24]
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	ldr	x10, [x19, #40]
	ldr	x9, [x19, #56]
	ldp	x9, x8, [x9]
	lsl	x11, x9, #4
	ldr	x11, [x8, x11]
	cmp	x10, x11
	b.ge	LBB0_8
; %bb.6:
	ldr	x10, [x19, #72]
	cbnz	x10, LBB0_8
; %bb.7:
	ldr	x10, [x19, #64]
	cbz	x10, LBB0_3
LBB0_8:
	ldr	x10, [x19, #48]
	cmp	x10, #1
	b.lt	LBB0_3
; %bb.9:
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	cmp	x10, x8
	b.ge	LBB0_3
; %bb.10:
	ldr	x8, [x19, #24]
	add	x8, x8, #1
	str	x8, [x19, #24]
Lloh6:
	adrp	x9, _EOC_COND_CNT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EOC_COND_CNT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_12
; %bb.11:
	ldr	w0, [x19, #32]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	b	LBB0_4
LBB0_12:
Lloh11:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
	str	xzr, [x19, #24]
Lloh13:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	w0, [x19, #32]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #36]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_power_supply_changed
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_SUPPLY_STATUS_CHARGING,8,3 ; @POWER_SUPPLY_STATUS_CHARGING
	.comm	_STATE_NORMAL,8,3               ; @STATE_NORMAL
	.comm	_EOC_COND_CNT,8,3               ; @EOC_COND_CNT
	.comm	_POWER_SUPPLY_STATUS_FULL,8,3   ; @POWER_SUPPLY_STATUS_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EOC reached!\n"

l_.str.1:                               ; @.str.1
	.asciz	" EOC limit reached for the %d time, out of %d before EOC\n"

	.no_dead_strip	_abx500_chargalg_end_of_charge
.subsections_via_symbols
