	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apm_release
_apm_release:                           ## @apm_release
	.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
	movq	(%rsi), %rbx
	movq	$0, (%rsi)
	movq	_user_list_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_down_write
	leaq	8(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_up_write
	movq	_state_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_SUSPEND_PENDING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_SUSPEND_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_2:
	movq	_suspend_acks_pending@GOTPCREL(%rip), %rdi
	callq	_atomic_dec
LBB0_3:
	movq	_state_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_apm_suspend_waitqueue@GOTPCREL(%rip), %rdi
	callq	_wake_up
	movq	%rbx, %rdi
	callq	_kfree
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_user_list_lock,4,2             ## @user_list_lock
	.comm	_state_lock,4,2                 ## @state_lock
	.comm	_SUSPEND_PENDING,8,3            ## @SUSPEND_PENDING
	.comm	_SUSPEND_READ,8,3               ## @SUSPEND_READ
	.comm	_suspend_acks_pending,4,2       ## @suspend_acks_pending
	.comm	_apm_suspend_waitqueue,4,2      ## @apm_suspend_waitqueue
	.no_dead_strip	_apm_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apm_release
_apm_release:                           ; @apm_release
	.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
	ldr	x19, [x1]
	str	xzr, [x1]
Lloh0:
	adrp	x20, _user_list_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _user_list_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_down_write
	add	x0, x19, #8
	bl	_list_del
	mov	x0, x20
	bl	_up_write
Lloh2:
	adrp	x0, _state_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _state_lock@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _SUSPEND_PENDING@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SUSPEND_PENDING@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
Lloh7:
	adrp	x10, _SUSPEND_READ@GOTPAGE
Lloh8:
	ldr	x10, [x10, _SUSPEND_READ@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x0, _suspend_acks_pending@GOTPAGE
Lloh11:
	ldr	x0, [x0, _suspend_acks_pending@GOTPAGEOFF]
	bl	_atomic_dec
LBB0_2:
Lloh12:
	adrp	x0, _state_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, _state_lock@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh14:
	adrp	x0, _apm_suspend_waitqueue@GOTPAGE
Lloh15:
	ldr	x0, [x0, _apm_suspend_waitqueue@GOTPAGEOFF]
	bl	_wake_up
	mov	x0, x19
	bl	_kfree
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_user_list_lock,4,2             ; @user_list_lock
	.comm	_state_lock,4,2                 ; @state_lock
	.comm	_SUSPEND_PENDING,8,3            ; @SUSPEND_PENDING
	.comm	_SUSPEND_READ,8,3               ; @SUSPEND_READ
	.comm	_suspend_acks_pending,4,2       ; @suspend_acks_pending
	.comm	_apm_suspend_waitqueue,4,2      ; @apm_suspend_waitqueue
	.no_dead_strip	_apm_release
.subsections_via_symbols
