	.file	"extr_btext.c_btext_clearscreen.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	btext_clearscreen
	.type	btext_clearscreen, @function
btext_clearscreen:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	xor	esi, esi
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	calc_base@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR dispDeviceRect[rip]
	mov	ebp, DWORD PTR 8[rax]
	sub	ebp, DWORD PTR [rax]
	mov	eax, DWORD PTR dispDeviceDepth[rip]
	sar	eax, 3
	imul	ebp, eax
	xor	eax, eax
	call	rmci_maybe_on@PLT
	mov	rsi, QWORD PTR dispDeviceRect[rip]
	mov	edi, DWORD PTR 12[rsi]
	sar	ebp, 2
	mov	eax, edi
	sub	eax, DWORD PTR 4[rsi]
	test	eax, eax
	jle	.L2
	lea	eax, -1[rbp]
	xor	ecx, ecx
	lea	r8, 4[0+rax*4]
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rdx, [rbx+r8]
	mov	rax, rbx
	test	ebp, ebp
	je	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	add	rax, 4
	mov	DWORD PTR -4[rax], 0
	cmp	rax, rdx
	jne	.L4
	mov	edi, DWORD PTR 12[rsi]
.L6:
	mov	eax, DWORD PTR dispDeviceRowBytes[rip]
	add	ecx, 1
	sar	eax, 2
	cdqe
	lea	rbx, [rbx+rax*4]
	mov	eax, edi
	sub	eax, DWORD PTR 4[rsi]
	cmp	eax, ecx
	jg	.L3
.L2:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	rmci_maybe_off@PLT
	.cfi_endproc
.LFE0:
	.size	btext_clearscreen, .-btext_clearscreen
	.comm	dispDeviceRowBytes,4,4
	.comm	dispDeviceRect,8,8
	.comm	dispDeviceDepth,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_btext.c_btext_clearscreen.c"
	.text
	.align	2
	.global	btext_clearscreen
	.syntax unified
	.arm
	.fpu softvfp
	.type	btext_clearscreen, %function
btext_clearscreen:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r1, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r0, r1
	bl	calc_base
	ldr	r6, .L10
	ldr	r3, .L10+4
	ldr	r2, [r6]
	ldr	r3, [r3]
	ldr	r5, [r2, #8]
	ldr	r2, [r2]
	asr	r3, r3, #3
	sub	r5, r5, r2
	mul	r5, r3, r5
	mov	r4, r0
	bl	rmci_maybe_on
	ldr	ip, [r6]
	ldr	r2, [ip, #12]
	ldr	lr, [ip, #4]
	sub	r3, r2, lr
	cmp	r3, #0
	ble	.L2
	mov	r0, #0
	mov	r1, r0
	asr	r5, r5, #2
	ldr	r7, .L10+8
	lsl	r8, r5, #2
.L3:
	cmp	r5, #0
	movne	r3, r4
	addne	r2, r4, r8
	beq	.L6
.L4:
	str	r1, [r3], #4
	cmp	r3, r2
	bne	.L4
	ldr	r2, [ip, #12]
	ldr	lr, [ip, #4]
.L6:
	ldr	r3, [r7]
	add	r0, r0, #1
	sub	r6, r2, lr
	bic	r3, r3, #3
	cmp	r6, r0
	add	r4, r4, r3
	bgt	.L3
.L2:
	pop	{r4, r5, r6, r7, r8, lr}
	b	rmci_maybe_off
.L11:
	.align	2
.L10:
	.word	dispDeviceRect
	.word	dispDeviceDepth
	.word	dispDeviceRowBytes
	.size	btext_clearscreen, .-btext_clearscreen
	.comm	dispDeviceRowBytes,4,4
	.comm	dispDeviceRect,4,4
	.comm	dispDeviceDepth,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
