	.file	"extr_apm-emulation.c_apm_release.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	apm_release, @function
apm_release:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, QWORD PTR [rsi]
	lea	rdi, user_list_lock[rip]
	mov	QWORD PTR [rsi], 0
	call	down_write@PLT
	lea	rdi, 8[rbp]
	call	list_del@PLT
	lea	rdi, user_list_lock[rip]
	call	up_write@PLT
	lea	rdi, state_lock[rip]
	call	mutex_lock@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR SUSPEND_PENDING[rip]
	je	.L2
	cmp	rax, QWORD PTR SUSPEND_READ[rip]
	je	.L2
.L3:
	lea	rdi, state_lock[rip]
	call	mutex_unlock@PLT
	lea	rdi, apm_suspend_waitqueue[rip]
	call	wake_up@PLT
	mov	rdi, rbp
	call	kfree@PLT
	xor	eax, eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdi, suspend_acks_pending[rip]
	call	atomic_dec@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	apm_release, .-apm_release
	.comm	user_list_lock,4,4
	.comm	suspend_acks_pending,4,4
	.comm	state_lock,4,4
	.comm	apm_suspend_waitqueue,4,4
	.comm	SUSPEND_READ,8,8
	.comm	SUSPEND_PENDING,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_apm-emulation.c_apm_release.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	apm_release, %function
apm_release:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, lr}
	ldr	r4, [r1]
	ldr	r0, .L6
	str	r3, [r1]
	bl	down_write
	add	r0, r4, #4
	bl	list_del
	ldr	r0, .L6
	bl	up_write
	ldr	r0, .L6+4
	bl	mutex_lock
	ldr	r2, .L6+8
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
	ldr	r2, .L6+12
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L2
.L3:
	ldr	r0, .L6+4
	bl	mutex_unlock
	ldr	r0, .L6+16
	bl	wake_up
	mov	r0, r4
	bl	kfree
	mov	r0, #0
	pop	{r4, pc}
.L2:
	ldr	r0, .L6+20
	bl	atomic_dec
	b	.L3
.L7:
	.align	2
.L6:
	.word	user_list_lock
	.word	state_lock
	.word	SUSPEND_PENDING
	.word	SUSPEND_READ
	.word	apm_suspend_waitqueue
	.word	suspend_acks_pending
	.size	apm_release, .-apm_release
	.comm	user_list_lock,4,4
	.comm	suspend_acks_pending,4,4
	.comm	state_lock,4,4
	.comm	apm_suspend_waitqueue,4,4
	.comm	SUSPEND_READ,4,4
	.comm	SUSPEND_PENDING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
