	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_unlock_battery_dir        ## -- Begin function acpi_unlock_battery_dir
	.p2align	4, 0x90
_acpi_unlock_battery_dir:               ## @acpi_unlock_battery_dir
	.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	_cm_sbs_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	_lock_battery_dir_cnt@GOTPCREL(%rip), %rax
	decq	(%rax)
	jne	LBB0_4
## %bb.2:
	movq	_acpi_battery_dir@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_ACPI_BATTERY_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_acpi_root_dir@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_remove_proc_entry
	movq	$0, (%rbx)
LBB0_4:
	movq	_cm_sbs_mutex@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_cm_sbs_mutex,4,2               ## @cm_sbs_mutex
	.comm	_lock_battery_dir_cnt,8,3       ## @lock_battery_dir_cnt
	.comm	_acpi_battery_dir,8,3           ## @acpi_battery_dir
	.comm	_ACPI_BATTERY_CLASS,4,2         ## @ACPI_BATTERY_CLASS
	.comm	_acpi_root_dir,4,2              ## @acpi_root_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_unlock_battery_dir        ; -- Begin function acpi_unlock_battery_dir
	.p2align	2
_acpi_unlock_battery_dir:               ; @acpi_unlock_battery_dir
	.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
Lloh0:
	adrp	x0, _cm_sbs_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _cm_sbs_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	x19, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _lock_battery_dir_cnt@GOTPAGE
Lloh3:
	ldr	x8, [x8, _lock_battery_dir_cnt@GOTPAGEOFF]
	ldr	x9, [x8]
	sub	x9, x9, #1
	str	x9, [x8]
Lloh4:
	adrp	x19, _acpi_battery_dir@GOTPAGE
Lloh5:
	ldr	x19, [x19, _acpi_battery_dir@GOTPAGEOFF]
	ldr	x8, [x19]
	cmp	x9, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _ACPI_BATTERY_CLASS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_BATTERY_CLASS@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _acpi_root_dir@GOTPAGE
Lloh10:
	ldr	x8, [x8, _acpi_root_dir@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_remove_proc_entry
	str	xzr, [x19]
LBB0_3:
Lloh12:
	adrp	x0, _cm_sbs_mutex@GOTPAGE
Lloh13:
	ldr	x0, [x0, _cm_sbs_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cm_sbs_mutex,4,2               ; @cm_sbs_mutex
	.comm	_lock_battery_dir_cnt,8,3       ; @lock_battery_dir_cnt
	.comm	_acpi_battery_dir,8,3           ; @acpi_battery_dir
	.comm	_ACPI_BATTERY_CLASS,4,2         ; @ACPI_BATTERY_CLASS
	.comm	_acpi_root_dir,4,2              ; @acpi_root_dir
.subsections_via_symbols
