	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stop_charge
_stop_charge:                           ## @stop_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	12(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movl	8(%rbx), %edi
	movq	_PM8607_CHG_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CC1_MODE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$3, %edx
	callq	_pm860x_set_bits
	movq	_CHARGE_THRESHOLD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%r14d, %esi
	jge	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_set_vbatt_threshold            ## TAILCALL
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stop charging!\n"

	.comm	_PM8607_CHG_CTRL1,4,2           ## @PM8607_CHG_CTRL1
	.comm	_CC1_MODE_OFF,4,2               ## @CC1_MODE_OFF
	.comm	_CHARGE_THRESHOLD,4,2           ## @CHARGE_THRESHOLD
	.no_dead_strip	_stop_charge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stop_charge
_stop_charge:                           ; @stop_charge
	.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
	ldr	w0, [x0, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x8, _PM8607_CHG_CTRL1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PM8607_CHG_CTRL1@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _CC1_MODE_OFF@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CC1_MODE_OFF@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	w2, #3
	bl	_pm860x_set_bits
Lloh8:
	adrp	x8, _CHARGE_THRESHOLD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHARGE_THRESHOLD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	cmp	w1, w20
	b.ge	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_set_vbatt_threshold
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stop charging!\n"

	.comm	_PM8607_CHG_CTRL1,4,2           ; @PM8607_CHG_CTRL1
	.comm	_CC1_MODE_OFF,4,2               ; @CC1_MODE_OFF
	.comm	_CHARGE_THRESHOLD,4,2           ; @CHARGE_THRESHOLD
	.no_dead_strip	_stop_charge
.subsections_via_symbols
