	.file	"extr_vt_ioctl.c_vt_disallocate_all.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vt_disallocate_all, @function
vt_disallocate_all:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r13
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -40[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_NR_CONSOLES[rip]
	mov	rcx, rsp
	lea	rax, 15[0+rax*8]
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L23:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L23
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L24
.L4:
	xor	eax, eax
	mov	r13, rsp
	call	console_lock@PLT
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], 1
	jle	.L5
	mov	ebx, 1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L6:
	mov	QWORD PTR 0[r13+rbx*8], 0
	add	rbx, 1
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], ebx
	jle	.L5
.L8:
	mov	edi, ebx
	call	VT_BUSY@PLT
	test	eax, eax
	jne	.L6
	mov	edi, ebx
	call	vc_deallocate@PLT
	mov	QWORD PTR 0[r13+rbx*8], rax
	add	rbx, 1
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], ebx
	jg	.L8
.L5:
	xor	eax, eax
	call	console_unlock@PLT
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], 1
	jle	.L1
	mov	ebx, 1
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L10:
	add	rbx, 1
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], ebx
	jle	.L1
.L11:
	mov	r12, QWORD PTR 0[r13+rbx*8]
	test	r12, r12
	je	.L10
	cmp	DWORD PTR MIN_NR_CONSOLES[rip], ebx
	jg	.L10
	mov	rdi, r12
	add	rbx, 1
	call	tty_port_destroy@PLT
	mov	rdi, r12
	call	kfree@PLT
	cmp	DWORD PTR MAX_NR_CONSOLES[rip], ebx
	jg	.L11
.L1:
	mov	rax, QWORD PTR -40[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L25
	lea	rsp, -24[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vt_disallocate_all, .-vt_disallocate_all
	.comm	MIN_NR_CONSOLES,4,4
	.comm	MAX_NR_CONSOLES,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_vt_ioctl.c_vt_disallocate_all.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vt_disallocate_all, %function
vt_disallocate_all:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r6, .L18
	ldr	r3, .L18+4
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	ldr	r3, [r6]
	lsl	r3, r3, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	bl	console_lock
	ldr	r3, [r6]
	mov	r5, sp
	cmp	r3, #1
	ble	.L2
	mov	r4, #1
	mov	r7, #0
	b	.L5
.L4:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L5:
	mov	r0, r4
	bl	VT_BUSY
	cmp	r0, #0
	strne	r7, [r5, r4, lsl #2]
	bne	.L4
	mov	r0, r4
	bl	vc_deallocate
	ldr	r3, [r6]
	str	r0, [r5, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L5
.L2:
	bl	console_unlock
	ldr	r3, [r6]
	cmp	r3, #1
	ble	.L1
	mov	r4, #1
	ldr	r8, .L18+8
	b	.L8
.L7:
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L1
.L8:
	ldr	r7, [r5, #4]!
	cmp	r7, #0
	beq	.L7
	ldr	r3, [r8]
	cmp	r3, r4
	bgt	.L7
	mov	r0, r7
	bl	tty_port_destroy
	mov	r0, r7
	bl	kfree
	ldr	r3, [r6]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L8
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	MAX_NR_CONSOLES
	.word	.LC0
	.word	MIN_NR_CONSOLES
	.size	vt_disallocate_all, .-vt_disallocate_all
	.comm	MIN_NR_CONSOLES,4,4
	.comm	MAX_NR_CONSOLES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
