	.file	"extr_syscons.c_scterm.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	scterm, @function
scterm:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	and	esi, DWORD PTR SC_KERNEL_CONSOLE[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	sc_get_softc@PLT
	test	rax, rax
	je	.L1
	mov	edx, DWORD PTR 4[rax]
	mov	rbx, rax
	test	edx, edx
	jns	.L15
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	jns	.L16
.L4:
	mov	rax, QWORD PTR 48[rbx]
	mov	edi, DWORD PTR [rax]
	call	sc_get_stat@PLT
	mov	r12, rax
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L5
	mov	rsi, r12
	mov	rdi, r12
	call	[QWORD PTR [rax]]
.L5:
	lea	rdi, 56[rbx]
	call	mtx_destroy@PLT
	test	DWORD PTR SC_KERNEL_CONSOLE[rip], ebp
	je	.L17
.L6:
	mov	esi, 72
	mov	rdi, rbx
	call	bzero@PLT
	mov	QWORD PTR 4[rbx], -1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR 60[rbx]
	lea	rsi, 8[rbx]
	call	vid_release@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 64[rax]
	lea	rsi, 4[rax]
	call	kbd_release@PLT
	mov	eax, DWORD PTR 8[rbx]
	test	eax, eax
	js	.L4
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, QWORD PTR [r12]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	call	free@PLT
	mov	rdi, QWORD PTR 48[rbx]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	call	free@PLT
	mov	rdi, QWORD PTR 32[rbx]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	call	free@PLT
	mov	rdi, QWORD PTR 24[rbx]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	call	free@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	esi, DWORD PTR M_DEVBUF[rip]
	call	free@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	scterm, .-scterm
	.comm	SC_SPLASH_SCRN,4,4
	.comm	SC_KERNEL_CONSOLE,4,4
	.comm	M_DEVBUF,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_syscons.c_scterm.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scterm, %function
scterm:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	ldr	r7, .L18
	ldr	r1, [r7]
	and	r1, r1, r6
	bl	sc_get_softc
	subs	r4, r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bge	.L15
	ldr	r3, [r4, #8]
	cmp	r3, #0
	bge	.L16
.L4:
	ldr	r3, [r4, #28]
	ldr	r0, [r3]
	bl	sc_get_stat
	ldr	r3, [r0, #4]
	mov	r5, r0
	cmp	r3, #0
	beq	.L5
	mov	r1, r0
	ldr	r3, [r3]
	blx	r3
.L5:
	add	r0, r4, #32
	bl	mtx_destroy
	ldr	r3, [r7]
	tst	r6, r3
	beq	.L17
.L6:
	mov	r1, #44
	mov	r0, r4
	bl	bzero
	mvn	r3, #0
	str	r3, [r4, #4]
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L16:
	ldr	r0, [r4, #36]
	add	r1, r4, #8
	bl	vid_release
	b	.L4
.L15:
	ldr	r0, [r4, #40]
	add	r1, r4, #4
	bl	kbd_release
	ldr	r3, [r4, #8]
	cmp	r3, #0
	blt	.L4
	b	.L16
.L17:
	ldr	r6, .L18+4
	ldr	r0, [r5]
	ldr	r1, [r6]
	bl	free
	ldr	r1, [r6]
	ldr	r0, [r4, #28]
	bl	free
	ldr	r1, [r6]
	ldr	r0, [r4, #20]
	bl	free
	ldr	r1, [r6]
	ldr	r0, [r4, #16]
	bl	free
	ldr	r1, [r6]
	ldr	r0, [r4, #12]
	bl	free
	b	.L6
.L19:
	.align	2
.L18:
	.word	SC_KERNEL_CONSOLE
	.word	M_DEVBUF
	.size	scterm, .-scterm
	.comm	SC_SPLASH_SCRN,4,4
	.comm	SC_KERNEL_CONSOLE,4,4
	.comm	M_DEVBUF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
