	.file	"120926.c"
	.intel_syntax noprefix
	.text
	.globl	vterm
	.bss
	.align 4
	.type	vterm, @object
	.size	vterm, 4
vterm:
	.zero	4
	.globl	cvt
	.align 4
	.type	cvt, @object
	.size	cvt, 4
cvt:
	.zero	4
	.globl	ocvt
	.align 4
	.type	ocvt, @object
	.size	ocvt, 4
ocvt:
	.zero	4
	.data
	.align 4
	.type	ttyfd, @object
	.size	ttyfd, 4
ttyfd:
	.long	-1
	.section	.rodata
.LC0:
	.string	"/dev/tty0"
	.text
	.globl	fb_InitVt
	.type	fb_InitVt, @function
fb_InitVt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	esi, 0
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR ttyfd[rip], eax
	call	fb_CurrentVt
	mov	DWORD PTR vterm[rip], eax
	mov	eax, DWORD PTR vterm[rip]
	mov	DWORD PTR ocvt[rip], eax
	mov	eax, DWORD PTR ocvt[rip]
	mov	DWORD PTR cvt[rip], eax
	mov	eax, DWORD PTR vterm[rip]
	mov	edi, eax
	call	fb_RedrawVt
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	fb_InitVt, .-fb_InitVt
	.globl	fb_CurrentVt
	.type	fb_CurrentVt, @function
fb_CurrentVt:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR ttyfd[rip]
	lea	rdx, -14[rbp]
	mov	esi, 22019
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	movzx	eax, WORD PTR -14[rbp]
	movzx	eax, ax
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	fb_CurrentVt, .-fb_CurrentVt
	.globl	fb_CheckVtChange
	.type	fb_CheckVtChange, @function
fb_CheckVtChange:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	call	fb_CurrentVt
	mov	DWORD PTR cvt[rip], eax
	mov	edx, DWORD PTR cvt[rip]
	mov	eax, DWORD PTR ocvt[rip]
	cmp	edx, eax
	je	.L6
	mov	edx, DWORD PTR cvt[rip]
	mov	eax, DWORD PTR vterm[rip]
	cmp	edx, eax
	jne	.L6
	mov	eax, DWORD PTR cvt[rip]
	mov	DWORD PTR ocvt[rip], eax
	mov	eax, 1
	jmp	.L7
.L6:
	mov	eax, DWORD PTR cvt[rip]
	mov	DWORD PTR ocvt[rip], eax
	mov	eax, 0
.L7:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	fb_CheckVtChange, .-fb_CheckVtChange
	.globl	fb_RedrawVt
	.type	fb_RedrawVt, @function
fb_RedrawVt:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	call	fb_CurrentVt
	mov	edx, DWORD PTR vterm[rip]
	cmp	eax, edx
	jne	.L12
	cmp	DWORD PTR -4[rbp], 1
	jne	.L10
	mov	edx, 2
	jmp	.L11
.L10:
	mov	edx, 1
.L11:
	mov	eax, DWORD PTR ttyfd[rip]
	mov	esi, 22022
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	mov	eax, DWORD PTR ttyfd[rip]
	mov	edx, DWORD PTR -4[rbp]
	mov	esi, 22022
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
.L12:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	fb_RedrawVt, .-fb_RedrawVt
	.globl	fb_ExitVt
	.type	fb_ExitVt, @function
fb_ExitVt:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, DWORD PTR ttyfd[rip]
	cmp	eax, -1
	je	.L15
	mov	eax, DWORD PTR ttyfd[rip]
	mov	edi, eax
	call	close@PLT
.L15:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	fb_ExitVt, .-fb_ExitVt
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"120926.c"
	.text
	.comm	vterm,4,4
	.comm	cvt,4,4
	.comm	ocvt,4,4
	.data
	.align	2
	.type	ttyfd, %object
	.size	ttyfd, 4
ttyfd:
	.word	-1
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/dev/tty0\000"
	.text
	.align	2
	.global	fb_InitVt
	.syntax unified
	.arm
	.fpu softvfp
	.type	fb_InitVt, %function
fb_InitVt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r1, #0
	ldr	r0, .L2
	bl	open
	mov	r3, r0
	ldr	r2, .L2+4
	str	r3, [r2]
	bl	fb_CurrentVt
	mov	r3, r0
	ldr	r2, .L2+8
	str	r3, [r2]
	ldr	r3, .L2+8
	ldr	r3, [r3]
	ldr	r2, .L2+12
	str	r3, [r2]
	ldr	r3, .L2+12
	ldr	r3, [r3]
	ldr	r2, .L2+16
	str	r3, [r2]
	ldr	r3, .L2+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	fb_RedrawVt
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.word	ttyfd
	.word	vterm
	.word	ocvt
	.word	cvt
	.size	fb_InitVt, .-fb_InitVt
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	fb_CurrentVt
	.syntax unified
	.arm
	.fpu softvfp
	.type	fb_CurrentVt, %function
fb_CurrentVt:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L7+4
	ldr	r3, [r3]
	sub	r2, fp, #16
	ldr	r1, .L7+8
	mov	r0, r3
	bl	ioctl
	ldrh	r3, [fp, #-16]
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC1
	.word	ttyfd
	.word	22019
	.size	fb_CurrentVt, .-fb_CurrentVt
	.align	2
	.global	fb_CheckVtChange
	.syntax unified
	.arm
	.fpu softvfp
	.type	fb_CheckVtChange, %function
fb_CheckVtChange:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	fb_CurrentVt
	mov	r3, r0
	ldr	r2, .L12
	str	r3, [r2]
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, .L12+4
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L10
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, .L12+8
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L10
	ldr	r3, .L12
	ldr	r3, [r3]
	ldr	r2, .L12+4
	str	r3, [r2]
	mov	r3, #1
	b	.L11
.L10:
	ldr	r3, .L12
	ldr	r3, [r3]
	ldr	r2, .L12+4
	str	r3, [r2]
	mov	r3, #0
.L11:
	mov	r0, r3
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	cvt
	.word	ocvt
	.word	vterm
	.size	fb_CheckVtChange, .-fb_CheckVtChange
	.align	2
	.global	fb_RedrawVt
	.syntax unified
	.arm
	.fpu softvfp
	.type	fb_RedrawVt, %function
fb_RedrawVt:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	bl	fb_CurrentVt
	mov	r2, r0
	ldr	r3, .L19
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L18
	ldr	r3, .L19+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	bne	.L16
	mov	r3, #2
	b	.L17
.L16:
	mov	r3, #1
.L17:
	mov	r2, r3
	ldr	r1, .L19+8
	bl	ioctl
	ldr	r3, .L19+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L19+8
	mov	r0, r3
	bl	ioctl
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	vterm
	.word	ttyfd
	.word	22022
	.size	fb_RedrawVt, .-fb_RedrawVt
	.align	2
	.global	fb_ExitVt
	.syntax unified
	.arm
	.fpu softvfp
	.type	fb_ExitVt, %function
fb_ExitVt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L24
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L23
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
.L23:
	nop
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	ttyfd
	.size	fb_ExitVt, .-fb_ExitVt
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
