	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function charger_manager_remove
_charger_manager_remove:                ## @charger_manager_remove
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_platform_get_drvdata
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movq	_cm_list_mtx@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_list_del
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_setup_polling@GOTPCREL(%rip), %rdi
	callq	_cancel_work_sync
	movq	_cm_monitor_work@GOTPCREL(%rip), %rdi
	callq	_cancel_delayed_work_sync
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.1:
	xorl	%r15d, %r15d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	cmpq	%rcx, %r15
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	8(%r14), %rcx
	movq	%r15, %rdx
	shlq	$4, %rdx
	cmpl	$0, (%rcx,%rdx)
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rcx,%rdx), %r13
	leaq	(%rcx,%rdx), %rbx
	addq	$8, %rbx
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rdi
	addq	%r14, %rdi
	callq	_extcon_unregister_interest
	incq	%r12
	movslq	(%r13), %rax
	addq	$4, %r14
	cmpq	%rax, %r12
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %eax
	jmp	LBB0_6
LBB0_7:
	testl	%eax, %eax
	jle	LBB0_10
## %bb.8:
	movl	$4, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%r15), %edi
	callq	_regulator_put
	incq	%rbx
	movslq	(%r14), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	callq	_power_supply_unregister
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_try_charger_enable
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cm_list_mtx,4,2                ## @cm_list_mtx
	.comm	_setup_polling,4,2              ## @setup_polling
	.comm	_cm_monitor_work,4,2            ## @cm_monitor_work
	.no_dead_strip	_charger_manager_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function charger_manager_remove
_charger_manager_remove:                ; @charger_manager_remove
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x20, _cm_list_mtx@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cm_list_mtx@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #4
	bl	_list_del
	mov	x0, x20
	bl	_mutex_unlock
Lloh2:
	adrp	x0, _setup_polling@GOTPAGE
Lloh3:
	ldr	x0, [x0, _setup_polling@GOTPAGEOFF]
	bl	_cancel_work_sync
Lloh4:
	adrp	x0, _cm_monitor_work@GOTPAGE
Lloh5:
	ldr	x0, [x0, _cm_monitor_work@GOTPAGEOFF]
	bl	_cancel_delayed_work_sync
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x9, [x21, #8]
	add	x22, x9, x20, lsl #4
	ldr	w9, [x22]
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, #0
	mov	x24, #0
	add	x25, x22, #8
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x25]
	add	x0, x8, x23
	bl	_extcon_unregister_interest
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	b	LBB0_2
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x20, #0
	mov	w22, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w0, [x8, x22]
	bl	_regulator_put
	add	x20, x20, #1
	ldrsw	x8, [x21]
	add	x22, x22, #16
	cmp	x20, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	w0, [x19]
	bl	_power_supply_unregister
	mov	x0, x19
	mov	w1, #0
	bl	_try_charger_enable
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_cm_list_mtx,4,2                ; @cm_list_mtx
	.comm	_setup_polling,4,2              ; @setup_polling
	.comm	_cm_monitor_work,4,2            ; @cm_monitor_work
	.no_dead_strip	_charger_manager_remove
.subsections_via_symbols
