	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _cm_monitor
__cm_monitor:                           ## @_cm_monitor
	.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	%rdi, %r15
	callq	_cm_check_thermal_status
	movl	%eax, %ebx
	movl	(%r15), %eax
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movl	%ebx, (%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_try_charger_enable
	movl	$1, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movq	_default_event_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	(%rax,%rcx,8), %rsi
	jmp	LBB0_8
LBB0_4:
	testl	%eax, %eax
	je	LBB0_9
LBB0_5:
	movl	$0, (%r15)
	movq	%r15, %rdi
	callq	_is_ext_pwr_online
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_try_charger_enable
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	movq	%r15, %rdi
	callq	_uevent_notify
	jmp	LBB0_12
LBB0_9:
	movq	%r15, %rdi
	callq	_check_charging_duration
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_11:
	movl	$1, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cmpl	$0, (%r15)
	jne	LBB0_5
## %bb.14:
	movq	%r15, %rdi
	callq	_is_ext_pwr_online
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	cmpq	$0, 16(%r15)
	je	LBB0_20
LBB0_16:
	cmpl	$0, (%r15)
	jne	LBB0_5
## %bb.17:
	movq	%r15, %rdi
	callq	_is_full_charged
	testq	%rax, %rax
	je	LBB0_5
## %bb.18:
	cmpq	$0, 16(%r15)
	je	LBB0_5
## %bb.19:
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	movq	_default_event_names@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CM_EVENT_BATT_FULL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	%r15, %rdi
	callq	_uevent_notify
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_try_charger_enable
LBB0_20:
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_fullbatt_vchk
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_default_event_names,8,3        ## @default_event_names
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Charging/Discharging duration is out of range\n"

L_.str.1:                               ## @.str.1
	.asciz	"EVENT_HANDLE: Battery Fully Charged\n"

	.comm	_CM_EVENT_BATT_FULL,8,3         ## @CM_EVENT_BATT_FULL
L_.str.2:                               ## @.str.2
	.asciz	"CHARGING"

	.no_dead_strip	__cm_monitor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _cm_monitor
__cm_monitor:                           ; @_cm_monitor
	.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	x19, x0
	bl	_cm_check_thermal_status
	ldr	w8, [x19]
	cbz	w0, LBB0_3
; %bb.1:
	cbz	w8, LBB0_7
; %bb.2:
	mov	w20, #0
	b	LBB0_13
LBB0_3:
	cbz	w8, LBB0_10
LBB0_4:
	str	wzr, [x19]
	mov	x0, x19
	bl	_is_ext_pwr_online
	cbz	x0, LBB0_12
; %bb.5:
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
	bl	_try_charger_enable
	cbnz	w0, LBB0_13
; %bb.6:
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_7:
	mov	x20, x0
	str	w0, [x19]
	mov	x0, x19
	mov	w1, #0
	bl	_try_charger_enable
	cbnz	w0, LBB0_12
; %bb.8:
Lloh2:
	adrp	x8, _default_event_names@GOTPAGE
Lloh3:
	ldr	x8, [x8, _default_event_names@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x1, [x8, w20, sxtw #3]
LBB0_9:
	mov	x0, x19
	bl	_uevent_notify
	b	LBB0_12
LBB0_10:
	mov	x0, x19
	bl	_check_charging_duration
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w0, [x19, #8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_12:
	mov	w20, #1
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.15:
	mov	x0, x19
	bl	_is_ext_pwr_online
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_21
LBB0_17:
	ldr	w8, [x19]
	cbnz	w8, LBB0_4
; %bb.18:
	mov	x0, x19
	bl	_is_full_charged
	cbz	x0, LBB0_4
; %bb.19:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.20:
	ldr	w0, [x19, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
Lloh9:
	adrp	x8, _default_event_names@GOTPAGE
Lloh10:
	ldr	x8, [x8, _default_event_names@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _CM_EVENT_BATT_FULL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CM_EVENT_BATT_FULL@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_uevent_notify
	mov	x0, x19
	mov	w1, #0
	bl	_try_charger_enable
LBB0_21:
	add	x0, x19, #4
	bl	_fullbatt_vchk
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_default_event_names,8,3        ; @default_event_names
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Charging/Discharging duration is out of range\n"

l_.str.1:                               ; @.str.1
	.asciz	"EVENT_HANDLE: Battery Fully Charged\n"

	.comm	_CM_EVENT_BATT_FULL,8,3         ; @CM_EVENT_BATT_FULL
l_.str.2:                               ; @.str.2
	.asciz	"CHARGING"

	.no_dead_strip	__cm_monitor
.subsections_via_symbols
