	.file	"extr_keyboard.c_VGLKeyboardInit.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	VGLKeyboardInit
	.type	VGLKeyboardInit, @function
VGLKeyboardInit:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	esi, DWORD PTR KDGKBMODE[rip]
	lea	rdx, VGLKeyboardMode[rip]
	mov	ebx, edi
	xor	edi, edi
	call	ioctl@PLT
	lea	rsi, VGLKeyboardTty[rip]
	xor	edi, edi
	call	tcgetattr@PLT
	movdqu	xmm0, XMMWORD PTR VGLKeyboardTty[rip]
	mov	rax, QWORD PTR VGLKeyboardTty[rip+16]
	lea	rdi, term.1963[rip]
	movaps	XMMWORD PTR term.1963[rip], xmm0
	mov	QWORD PTR term.1963[rip+16], rax
	call	cfmakeraw@PLT
	mov	eax, DWORD PTR IGNPAR[rip]
	or	eax, DWORD PTR IGNBRK[rip]
	mov	esi, 9600
	mov	DWORD PTR term.1963[rip], eax
	mov	eax, DWORD PTR OPOST[rip]
	lea	rdi, term.1963[rip]
	or	eax, DWORD PTR ONLCR[rip]
	mov	rdx, QWORD PTR VTIME[rip]
	mov	DWORD PTR term.1963[rip+4], eax
	mov	eax, DWORD PTR CREAD[rip]
	or	eax, DWORD PTR CS8[rip]
	mov	DWORD PTR term.1963[rip+8], eax
	mov	eax, DWORD PTR ICANON[rip]
	or	eax, DWORD PTR ECHO[rip]
	or	eax, DWORD PTR ISIG[rip]
	not	eax
	and	DWORD PTR term.1963[rip+12], eax
	mov	rax, QWORD PTR term.1963[rip+16]
	mov	QWORD PTR [rax+rdx*8], 0
	mov	rdx, QWORD PTR VMIN[rip]
	mov	QWORD PTR [rax+rdx*8], 0
	call	cfsetispeed@PLT
	mov	esi, 9600
	lea	rdi, term.1963[rip]
	call	cfsetospeed@PLT
	mov	esi, DWORD PTR TCSANOW[rip]
	xor	edi, edi
	or	esi, DWORD PTR TCSAFLUSH[rip]
	lea	rdx, term.1963[rip]
	call	tcsetattr@PLT
	cmp	ebx, 129
	je	.L2
	cmp	ebx, 130
	je	.L3
	cmp	ebx, 128
	je	.L8
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdx, QWORD PTR K_RAW[rip]
	mov	esi, DWORD PTR KDSKBMODE[rip]
	xor	edi, edi
	call	ioctl@PLT
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rdx, QWORD PTR K_XLATE[rip]
	mov	esi, DWORD PTR KDSKBMODE[rip]
	xor	edi, edi
	call	ioctl@PLT
	xor	eax, eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdx, QWORD PTR K_CODE[rip]
	mov	esi, DWORD PTR KDSKBMODE[rip]
	xor	edi, edi
	call	ioctl@PLT
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	VGLKeyboardInit, .-VGLKeyboardInit
	.local	term.1963
	.comm	term.1963,24,16
	.comm	VTIME,8,8
	.comm	VMIN,8,8
	.comm	VGLKeyboardTty,24,16
	.comm	VGLKeyboardMode,4,4
	.comm	TCSANOW,4,4
	.comm	TCSAFLUSH,4,4
	.comm	OPOST,4,4
	.comm	ONLCR,4,4
	.comm	K_XLATE,8,8
	.comm	K_RAW,8,8
	.comm	K_CODE,8,8
	.comm	KDSKBMODE,4,4
	.comm	KDGKBMODE,4,4
	.comm	ISIG,4,4
	.comm	IGNPAR,4,4
	.comm	IGNBRK,4,4
	.comm	ICANON,4,4
	.comm	ECHO,4,4
	.comm	CS8,4,4
	.comm	CREAD,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_keyboard.c_VGLKeyboardInit.c"
	.text
	.align	2
	.global	VGLKeyboardInit
	.syntax unified
	.arm
	.fpu softvfp
	.type	VGLKeyboardInit, %function
VGLKeyboardInit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L10
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r3]
	ldr	r4, .L10+4
	ldr	r2, .L10+8
	mov	r5, r0
	mov	r0, #0
	bl	ioctl
	ldr	r1, .L10+12
	mov	r0, #0
	bl	tcgetattr
	mov	ip, r4
	mov	r6, #0
	ldr	lr, .L10+12
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	mov	r0, r4
	str	r3, [ip]
	bl	cfmakeraw
	ldr	r3, .L10+16
	ldr	r1, .L10+20
	ldr	r2, .L10+24
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	ip, .L10+28
	orr	r3, r3, r1
	ldr	lr, .L10+32
	ldr	r0, .L10+36
	orr	r3, r3, r2
	ldr	r1, .L10+40
	ldr	r2, .L10+44
	ldr	r7, [ip]
	ldr	lr, [lr]
	ldr	r0, [r0]
	ldr	ip, .L10+48
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	ip, [ip]
	orr	r0, lr, r0
	ldr	lr, .L10+52
	orr	r1, r1, r2
	ldr	r2, [r4, #12]
	orr	ip, r7, ip
	ldr	r7, [lr]
	ldr	lr, [r4, #16]
	bic	r3, r2, r3
	ldr	r2, .L10+56
	str	ip, [r4, #4]
	str	r0, [r4]
	str	r1, [r4, #8]
	str	r3, [r4, #12]
	str	r6, [lr, r7, lsl #2]
	ldr	r3, [r2]
	mov	r1, #9600
	str	r6, [lr, r3, lsl #2]
	mov	r0, r4
	bl	cfsetispeed
	mov	r1, #9600
	mov	r0, r4
	bl	cfsetospeed
	ldr	r2, .L10+60
	ldr	r3, .L10+64
	ldr	r1, [r2]
	ldr	r3, [r3]
	mov	r2, r4
	mov	r0, r6
	orr	r1, r1, r3
	bl	tcsetattr
	cmp	r5, #129
	beq	.L2
	cmp	r5, #130
	beq	.L3
	cmp	r5, #128
	beq	.L9
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r2, .L10+68
.L7:
	ldr	r3, .L10+72
	mov	r0, r6
	ldr	r2, [r2]
	ldr	r1, [r3]
	bl	ioctl
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	ldr	r2, .L10+76
	b	.L7
.L3:
	ldr	r2, .L10+80
	b	.L7
.L11:
	.align	2
.L10:
	.word	KDGKBMODE
	.word	.LANCHOR0
	.word	VGLKeyboardMode
	.word	VGLKeyboardTty
	.word	ICANON
	.word	ECHO
	.word	ISIG
	.word	OPOST
	.word	IGNPAR
	.word	IGNBRK
	.word	CREAD
	.word	CS8
	.word	ONLCR
	.word	VTIME
	.word	VMIN
	.word	TCSANOW
	.word	TCSAFLUSH
	.word	K_RAW
	.word	KDSKBMODE
	.word	K_XLATE
	.word	K_CODE
	.size	VGLKeyboardInit, .-VGLKeyboardInit
	.comm	VTIME,4,4
	.comm	VMIN,4,4
	.comm	VGLKeyboardTty,20,4
	.comm	VGLKeyboardMode,4,4
	.comm	TCSANOW,4,4
	.comm	TCSAFLUSH,4,4
	.comm	OPOST,4,4
	.comm	ONLCR,4,4
	.comm	K_XLATE,4,4
	.comm	K_RAW,4,4
	.comm	K_CODE,4,4
	.comm	KDSKBMODE,4,4
	.comm	KDGKBMODE,4,4
	.comm	ISIG,4,4
	.comm	IGNPAR,4,4
	.comm	IGNBRK,4,4
	.comm	ICANON,4,4
	.comm	ECHO,4,4
	.comm	CS8,4,4
	.comm	CREAD,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	term.4247, %object
	.size	term.4247, 20
term.4247:
	.space	20
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
