	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_charging_duration
_check_charging_duration:               ## @check_charging_duration
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	32(%rdi), %r12
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	callq	_ktime_to_ms
	movq	%rax, %rbx
	movq	(%r12), %rdx
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.1:
	cmpq	$0, 8(%r12)
	je	LBB0_11
LBB0_2:
	cmpq	$0, 24(%r15)
	je	LBB0_5
## %bb.3:
	subq	(%r15), %rbx
	xorl	%r14d, %r14d
	cmpq	%rdx, %rbx
	jle	LBB0_11
## %bb.4:
	movl	16(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	xorl	%ebx, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_10:
	movq	%r15, %rdi
	callq	_uevent_notify
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_try_charger_enable
	movl	$1, %r14d
	jmp	LBB0_11
LBB0_5:
	movq	%r15, %rdi
	callq	_is_ext_pwr_online
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	cmpq	$0, 24(%r15)
	jne	LBB0_11
## %bb.7:
	subq	8(%r15), %rbx
	cmpq	8(%r12), %rbx
	jle	LBB0_11
## %bb.8:
	movq	%r15, %rdi
	callq	_is_ext_pwr_online
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	16(%r15), %edi
	movq	8(%r12), %rdx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_info
	movl	$1, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_10
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Charging duration exceed %ums\n"

L_.str.1:                               ## @.str.1
	.asciz	"Discharging"

L_.str.2:                               ## @.str.2
	.asciz	"Discharging duration exceed %ums\n"

L_.str.3:                               ## @.str.3
	.asciz	"Recharging"

	.no_dead_strip	_check_charging_duration
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_charging_duration
_check_charging_duration:               ; @check_charging_duration
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	x21, [x0, #32]
	bl	_ktime_get
	bl	_ktime_to_ms
	mov	x20, x0
	ldr	x2, [x21]
	cbnz	x2, LBB0_2
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_11
LBB0_2:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x19]
	sub	x8, x20, x8
	cmp	x8, x2
	b.le	LBB0_11
; %bb.4:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w20, #0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_uevent_notify
	mov	x0, x19
	mov	x1, x20
	bl	_try_charger_enable
	mov	w0, #1
	b	LBB0_12
LBB0_6:
	mov	x0, x19
	bl	_is_ext_pwr_online
	cbz	x0, LBB0_12
; %bb.7:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_11
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	x9, [x21, #8]
	sub	x8, x20, x8
	cmp	x8, x9
	b.le	LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_is_ext_pwr_online
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w0, [x19, #16]
	ldr	x2, [x21, #8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	mov	w20, #1
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_11:
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Charging duration exceed %ums\n"

l_.str.1:                               ; @.str.1
	.asciz	"Discharging"

l_.str.2:                               ; @.str.2
	.asciz	"Discharging duration exceed %ums\n"

l_.str.3:                               ; @.str.3
	.asciz	"Recharging"

	.no_dead_strip	_check_charging_duration
.subsections_via_symbols
