	.file	"extr_ap_bus.c_ap_device_remove.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ap_device_remove, @function
ap_device_remove:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	to_ap_dev@PLT
	mov	rbp, rax
	mov	rdi, rax
	mov	rbx, QWORD PTR 16[rax]
	call	ap_flush_queue@PLT
	lea	rdi, 12[rbp]
	call	del_timer_sync@PLT
	lea	rdi, ap_device_list_lock[rip]
	call	spin_lock_bh@PLT
	lea	rdi, 8[rbp]
	call	list_del_init@PLT
	lea	rdi, ap_device_list_lock[rip]
	call	spin_unlock_bh@PLT
	mov	rax, QWORD PTR [rbx]
	test	rax, rax
	je	.L2
	mov	rdi, rbp
	call	rax
.L2:
	mov	rdi, rbp
	call	spin_lock_bh@PLT
	mov	edi, DWORD PTR 4[rbp]
	lea	rsi, ap_poll_requests[rip]
	call	atomic_sub@PLT
	mov	rdi, rbp
	call	spin_unlock_bh@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ap_device_remove, .-ap_device_remove
	.comm	ap_poll_requests,4,4
	.comm	ap_device_list_lock,4,4
	.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_ap_bus.c_ap_device_remove.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ap_device_remove, %function
ap_device_remove:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	bl	to_ap_dev
	mov	r4, r0
	ldr	r5, [r0, #16]
	bl	ap_flush_queue
	add	r0, r4, #12
	bl	del_timer_sync
	ldr	r0, .L8
	bl	spin_lock_bh
	add	r0, r4, #8
	bl	list_del_init
	ldr	r0, .L8
	bl	spin_unlock_bh
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L2
	mov	r0, r4
	blx	r3
.L2:
	mov	r0, r4
	bl	spin_lock_bh
	ldr	r1, .L8+4
	ldr	r0, [r4, #4]
	bl	atomic_sub
	mov	r0, r4
	bl	spin_unlock_bh
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L9:
	.align	2
.L8:
	.word	ap_device_list_lock
	.word	ap_poll_requests
	.size	ap_device_remove, .-ap_device_remove
	.comm	ap_poll_requests,4,4
	.comm	ap_device_list_lock,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
