	.file	"extr_tty_ldisc.c_tty_unregister_ldisc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	tty_unregister_ldisc
	.type	tty_unregister_ldisc, @function
tty_unregister_ldisc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	movsx	rbx, edi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	cmp	DWORD PTR N_TTY[rip], ebx
	jg	.L2
	cmp	DWORD PTR NR_LDISCS[rip], ebx
	jg	.L3
.L2:
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	xor	esi, esi
	lea	rdi, tty_ldisc_lock[rip]
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR tty_ldiscs[rip]
	lea	rax, [rax+rbx*8]
	mov	rdx, QWORD PTR [rax]
	cmp	QWORD PTR [rdx], 0
	jne	.L9
	mov	QWORD PTR [rax], 0
	xor	r12d, r12d
.L6:
	xor	esi, esi
	lea	rdi, tty_ldisc_lock[rip]
	call	spin_unlock_irqrestore@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	r12d, DWORD PTR EBUSY[rip]
	neg	r12d
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	tty_unregister_ldisc, .-tty_unregister_ldisc
	.comm	tty_ldiscs,8,8
	.comm	tty_ldisc_lock,4,4
	.comm	N_TTY,4,4
	.comm	NR_LDISCS,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,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_tty_ldisc.c_tty_unregister_ldisc.c"
	.text
	.align	2
	.global	tty_unregister_ldisc
	.syntax unified
	.arm
	.fpu softvfp
	.type	tty_unregister_ldisc, %function
tty_unregister_ldisc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L9
	push	{r4, r5, r6, lr}
	ldr	r3, [r3]
	cmp	r3, r0
	bgt	.L2
	ldr	r3, .L9+4
	mov	r4, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bgt	.L3
.L2:
	ldr	r3, .L9+8
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L3:
	mov	r1, #0
	ldr	r0, .L9+12
	bl	spin_lock_irqsave
	ldr	r3, .L9+16
	mov	r1, #0
	ldr	r3, [r3]
	ldr	r0, .L9+12
	ldr	r2, [r3, r4, lsl #2]
	ldr	r5, [r2]
	cmp	r5, #0
	ldrne	r3, .L9+20
	streq	r5, [r3, r4, lsl #2]
	ldrne	r5, [r3]
	rsbne	r5, r5, #0
	bl	spin_unlock_irqrestore
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L10:
	.align	2
.L9:
	.word	N_TTY
	.word	NR_LDISCS
	.word	EINVAL
	.word	tty_ldisc_lock
	.word	tty_ldiscs
	.word	EBUSY
	.size	tty_unregister_ldisc, .-tty_unregister_ldisc
	.comm	tty_ldiscs,4,4
	.comm	tty_ldisc_lock,4,4
	.comm	N_TTY,4,4
	.comm	NR_LDISCS,4,4
	.comm	EINVAL,4,4
	.comm	EBUSY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
