	.file	"extr_virtio_console.c_unplug_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	unplug_port, @function
unplug_port:
.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
	mov	rbx, rdi
	lea	rbp, 48[rbx]
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rdi, QWORD PTR 32[rdi]
	call	spin_lock_irq@PLT
	lea	rdi, 56[rbx]
	call	list_del@PLT
	mov	rdi, QWORD PTR 32[rbx]
	call	spin_unlock_irq@PLT
	mov	rdi, rbp
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jne	.L9
.L2:
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	mov	rdi, rbx
	call	is_console_port@PLT
	test	rax, rax
	jne	.L10
.L3:
	mov	rdi, rbx
	call	remove_port_data@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	QWORD PTR 32[rbx], 0
	lea	rsi, port_attribute_group[rip]
	lea	rdi, 4[rax]
	call	sysfs_remove_group@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR pdrvdata[rip]
	mov	esi, DWORD PTR [rax]
	call	device_destroy@PLT
	mov	edi, DWORD PTR 20[rbx]
	call	cdev_del@PLT
	mov	edi, DWORD PTR 16[rbx]
	call	debugfs_remove@PLT
	mov	edi, DWORD PTR 12[rbx]
	call	kfree@PLT
	mov	esi, DWORD PTR remove_port[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, 8[rbx]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	kref_put@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, rbx
	call	send_sigio_to_port@PLT
	mov	QWORD PTR [rbx], 0
	lea	rdi, 52[rbx]
	call	wake_up_interruptible@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rdi, pdrvdata_lock[rip]
	call	spin_lock_irq@PLT
	lea	rdi, 44[rbx]
	call	list_del@PLT
	lea	rdi, pdrvdata_lock[rip]
	call	spin_unlock_irq@PLT
	mov	edi, DWORD PTR 40[rbx]
	call	hvc_remove@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	unplug_port, .-unplug_port
	.comm	remove_port,4,4
	.comm	port_attribute_group,4,4
	.comm	pdrvdata_lock,4,4
	.comm	pdrvdata,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_virtio_console.c_unplug_port.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	unplug_port, %function
unplug_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r0, #28]
	bl	spin_lock_irq
	add	r0, r4, #48
	bl	list_del
	add	r5, r4, #40
	ldr	r0, [r4, #28]
	bl	spin_unlock_irq
	mov	r0, r5
	bl	spin_lock_irq
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L12
.L2:
	mov	r0, r5
	bl	spin_unlock_irq
	mov	r0, r4
	bl	is_console_port
	cmp	r0, #0
	bne	.L13
.L3:
	mov	r0, r4
	bl	remove_port_data
	mov	r3, #0
	ldr	r0, [r4, #24]
	str	r3, [r4, #28]
	ldr	r1, .L14
	add	r0, r0, #4
	bl	sysfs_remove_group
	ldr	r2, [r4, #24]
	ldr	r3, .L14+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	device_destroy
	ldr	r0, [r4, #20]
	bl	cdev_del
	ldr	r0, [r4, #16]
	bl	debugfs_remove
	ldr	r0, [r4, #12]
	bl	kfree
	ldr	r3, .L14+8
	add	r0, r4, #8
	ldr	r1, [r3]
	pop	{r4, r5, r6, lr}
	b	kref_put
.L12:
	mov	r0, r4
	bl	send_sigio_to_port
	mov	r3, #0
	add	r0, r4, #44
	str	r3, [r4]
	str	r3, [r4, #4]
	bl	wake_up_interruptible
	b	.L2
.L13:
	ldr	r0, .L14+12
	bl	spin_lock_irq
	add	r0, r4, #36
	bl	list_del
	ldr	r0, .L14+12
	bl	spin_unlock_irq
	ldr	r0, [r4, #32]
	bl	hvc_remove
	b	.L3
.L15:
	.align	2
.L14:
	.word	port_attribute_group
	.word	pdrvdata
	.word	remove_port
	.word	pdrvdata_lock
	.size	unplug_port, .-unplug_port
	.comm	remove_port,4,4
	.comm	port_attribute_group,4,4
	.comm	pdrvdata_lock,4,4
	.comm	pdrvdata,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
