	.file	"extr_virtio_console.c_remove_port_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	remove_port_data, @function
remove_port_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	r12, 8[rdi]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	mov	rdi, r12
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	spin_lock_irq@PLT
	mov	rdi, rbp
	call	discard_port_data@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	call	free_buf@PLT
.L2:
	mov	edi, DWORD PTR 12[rbp]
	call	virtqueue_detach_unused_buf@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L3
	mov	rdi, r12
	call	spin_unlock_irq@PLT
	mov	rdi, rbp
	call	spin_lock_irq@PLT
	mov	rdi, rbp
	call	reclaim_consumed_buffers@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	call	free_buf@PLT
.L4:
	mov	edi, DWORD PTR 4[rbp]
	call	virtqueue_detach_unused_buf@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L5
	add	rsp, 8
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irq@PLT
	.cfi_endproc
.LFE0:
	.size	remove_port_data, .-remove_port_data
	.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_virtio_console.c_remove_port_data.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_port_data, %function
remove_port_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	add	r5, r0, #8
	mov	r0, r5
	bl	spin_lock_irq
	mov	r0, r4
	bl	discard_port_data
	b	.L2
.L3:
	bl	free_buf
.L2:
	ldr	r0, [r4, #12]
	bl	virtqueue_detach_unused_buf
	cmp	r0, #0
	bne	.L3
	mov	r0, r5
	bl	spin_unlock_irq
	mov	r0, r4
	bl	spin_lock_irq
	mov	r0, r4
	bl	reclaim_consumed_buffers
	b	.L4
.L5:
	bl	free_buf
.L4:
	ldr	r0, [r4, #4]
	bl	virtqueue_detach_unused_buf
	cmp	r0, #0
	bne	.L5
	mov	r0, r4
	pop	{r4, r5, r6, lr}
	b	spin_unlock_irq
	.size	remove_port_data, .-remove_port_data
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
