	.file	"extr_os_win32.c_tgetch.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	tgetch, @function
tgetch:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	lea	rbp, 12[rsp]
	lea	rbx, 16[rsp]
	lea	r15, 8[rsp]
	lea	r14, 28[rsp]
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR g_hConIn[rip]
	mov	rcx, rbp
	mov	edx, 1
	mov	rsi, rbx
	mov	DWORD PTR 12[rsp], 0
	call	read_console_input@PLT
	test	rax, rax
	je	.L15
	mov	rdi, QWORD PTR 16[rsp]
	cmp	rdi, QWORD PTR KEY_EVENT[rip]
	je	.L16
	cmp	rdi, QWORD PTR FOCUS_EVENT[rip]
	je	.L17
	cmp	rdi, QWORD PTR WINDOW_BUFFER_SIZE_EVENT[rip]
	jne	.L2
	xor	eax, eax
	call	shell_resized@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	cmp	QWORD PTR did_create_conin[rip], 0
	jne	.L18
.L4:
	xor	eax, eax
	call	create_conin@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r8d, DWORD PTR TRUE[rip]
	mov	rcx, r13
	mov	rdx, r12
	mov	rsi, r15
	mov	rdi, r14
	call	decode_key_event@PLT
	test	rax, rax
	je	.L2
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	mov	eax, DWORD PTR 8[rsp]
	jne	.L19
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	call	read_error_exit@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rsi, QWORD PTR 24[rsp]
	call	handle_focus_event@PLT
	jmp	.L2
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	tgetch, .-tgetch
	.comm	g_nMouseClick,4,4
	.comm	g_hConIn,4,4
	.comm	did_create_conin,8,8
	.comm	WINDOW_BUFFER_SIZE_EVENT,8,8
	.comm	TRUE,4,4
	.comm	MOUSE_EVENT,8,8
	.comm	KEY_EVENT,8,8
	.comm	FOCUS_EVENT,8,8
	.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_os_win32.c_tgetch.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	tgetch, %function
tgetch:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L23
	sub	sp, sp, #44
	str	r1, [sp, #12]
	mov	r10, r0
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r5, .L23+4
	ldr	r6, .L23+8
	ldr	fp, .L23+12
	ldr	r7, .L23+16
	ldr	r8, .L23+20
	ldr	r9, .L23+24
	add	r4, sp, #24
.L2:
	mov	ip, #0
	mov	r2, #1
	mov	r1, r4
	ldr	r0, [r5]
	add	r3, sp, #20
	str	ip, [sp, #20]
	bl	read_console_input
	cmp	r0, #0
	beq	.L18
	ldr	r3, [sp, #24]
	ldr	r2, [r6]
	cmp	r3, r2
	beq	.L19
	ldr	r2, [r7]
	cmp	r3, r2
	beq	.L20
	ldr	r2, [r8]
	cmp	r3, r2
	bne	.L2
	bl	shell_resized
	b	.L2
.L18:
	ldr	r3, [r9]
	cmp	r3, #0
	bne	.L21
.L4:
	bl	create_conin
	b	.L2
.L19:
	ldr	r2, [fp]
	mov	r3, r10
	str	r2, [sp]
	add	r1, sp, #16
	ldr	r2, [sp, #12]
	add	r0, sp, #32
	bl	decode_key_event
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L23
	ldr	r0, [sp, #16]
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L22
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	bl	read_error_exit
	b	.L4
.L20:
	ldm	r4, {r0, r1, r2}
	bl	handle_focus_event
	b	.L2
.L22:
	bl	__stack_chk_fail
.L24:
	.align	2
.L23:
	.word	.LC0
	.word	g_hConIn
	.word	KEY_EVENT
	.word	TRUE
	.word	FOCUS_EVENT
	.word	WINDOW_BUFFER_SIZE_EVENT
	.word	did_create_conin
	.size	tgetch, .-tgetch
	.comm	g_nMouseClick,4,4
	.comm	g_hConIn,4,4
	.comm	did_create_conin,4,4
	.comm	WINDOW_BUFFER_SIZE_EVENT,4,4
	.comm	TRUE,4,4
	.comm	MOUSE_EVENT,4,4
	.comm	KEY_EVENT,4,4
	.comm	FOCUS_EVENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
