	.file	"extr_os_win32.c_RestoreConsoleBuffer.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	RestoreConsoleBuffer, @function
RestoreConsoleBuffer:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 56
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L24
	mov	eax, DWORD PTR 48[rdi]
	mov	rbx, rdi
	test	eax, eax
	je	.L24
	mov	rbp, rsi
	test	rsi, rsi
	jne	.L26
.L5:
	mov	rdi, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR TRUE[rip]
	call	FitConsoleWindow@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	rdx, QWORD PTR 24[rbx]
	mov	edi, DWORD PTR g_hConOut[rip]
	call	SetConsoleScreenBufferSize@PLT
	test	eax, eax
	jne	.L6
.L24:
	mov	rax, QWORD PTR FALSE[rip]
.L4:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L27
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	esi, DWORD PTR 40[rbx]
	mov	edi, DWORD PTR g_hConOut[rip]
	call	SetConsoleTextAttribute@PLT
	test	eax, eax
	je	.L24
	test	rbp, rbp
	je	.L11
	mov	esi, DWORD PTR 36[rbx]
	mov	edi, DWORD PTR g_hConOut[rip]
	call	SetConsoleCursorPosition@PLT
	test	eax, eax
	je	.L24
	mov	rsi, QWORD PTR TRUE[rip]
	mov	edi, DWORD PTR g_hConOut[rip]
	lea	rdx, 32[rbx]
	call	SetConsoleWindowInfo@PLT
	test	eax, eax
	je	.L24
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	je	.L11
	mov	rax, QWORD PTR 24[rbx]
	mov	edx, DWORD PTR [rbx]
	xor	ecx, ecx
	xor	r8d, r8d
	mov	edi, DWORD PTR g_hConOut[rip]
	mov	r9, rsp
	mov	QWORD PTR 24[rsp], 0
	mov	QWORD PTR 16[rsp], 0
	sub	rax, 1
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR 16[rbx]
	sub	rax, 1
	mov	QWORD PTR [rsp], rax
	call	WriteConsoleOutput@PLT
	test	eax, eax
	je	.L24
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR TRUE[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L26:
	mov	edi, DWORD PTR 40[rdi]
	call	ClearConsoleBuffer@PLT
	jmp	.L5
.L27:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	RestoreConsoleBuffer, .-RestoreConsoleBuffer
	.comm	g_hConOut,4,4
	.comm	TRUE,8,8
	.comm	FALSE,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_RestoreConsoleBuffer.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	RestoreConsoleBuffer, %function
RestoreConsoleBuffer:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L27
	sub	sp, sp, #40
	subs	r5, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	beq	.L23
	ldr	r3, [r5, #28]
	cmp	r3, #0
	beq	.L23
	cmp	r1, #0
	mov	r6, r1
	bne	.L25
.L5:
	ldr	r8, .L27+4
	add	r4, r5, #8
	ldr	r7, .L27+8
	ldr	r2, [r8]
	ldm	r4, {r0, r1}
	bl	FitConsoleWindow
	ldm	r4, {r1, r2}
	ldr	r0, [r7]
	bl	SetConsoleScreenBufferSize
	cmp	r0, #0
	bne	.L6
.L23:
	ldr	r3, .L27+12
	ldr	r0, [r3]
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r1, [r5, #24]
	ldr	r0, [r7]
	bl	SetConsoleTextAttribute
	cmp	r0, #0
	beq	.L23
	cmp	r6, #0
	beq	.L11
	ldr	r1, [r5, #20]
	ldr	r0, [r7]
	bl	SetConsoleCursorPosition
	cmp	r0, #0
	beq	.L23
	ldr	r1, [r8]
	ldr	r0, [r7]
	add	r2, r5, #16
	bl	SetConsoleWindowInfo
	cmp	r0, #0
	beq	.L23
	ldr	r1, [r5, #4]
	cmp	r1, #0
	beq	.L11
	mov	r3, #0
	ldr	lr, [r5, #12]
	ldr	ip, [r5, #8]
	sub	lr, lr, #1
	str	lr, [sp, #24]
	add	lr, sp, #20
	ldr	r2, [r5]
	sub	ip, ip, #1
	ldr	r0, [r7]
	str	r3, [sp]
	str	lr, [sp, #4]
	str	ip, [sp, #20]
	str	r3, [sp, #32]
	str	r3, [sp, #28]
	bl	WriteConsoleOutput
	cmp	r0, #0
	beq	.L23
.L11:
	ldr	r0, [r8]
	b	.L1
.L25:
	ldr	r0, [r5, #24]
	bl	ClearConsoleBuffer
	b	.L5
.L26:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC0
	.word	TRUE
	.word	g_hConOut
	.word	FALSE
	.size	RestoreConsoleBuffer, .-RestoreConsoleBuffer
	.comm	g_hConOut,4,4
	.comm	TRUE,4,4
	.comm	FALSE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
