	.file	"extr_versatile_clcd.c_clcdr_draw_cursor.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	clcdr_draw_cursor, @function
clcdr_draw_cursor:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR [rdi], 0
	mov	eax, esi
	jle	.L1
	mov	rdx, QWORD PTR 8[rdi]
	mov	rdi, QWORD PTR [rdx]
	mov	rsi, QWORD PTR [rdi]
	test	rsi, rsi
	je	.L1
	mov	ecx, DWORD PTR [rdi]
	mov	edx, DWORD PTR 4[rdi]
	imul	edx, ecx
	cmp	edx, eax
	jle	.L1
	cdq
	mov	r10d, DWORD PTR 16[rdi]
	mov	r8d, DWORD PTR 8[rdi]
	idiv	ecx
	mov	ecx, DWORD PTR 12[rdi]
	lea	r9d, 7[r10]
	imul	edx, ecx
	add	edx, DWORD PTR 20[rdi]
	test	r10d, r10d
	cmovns	r9d, r10d
	imul	eax, r8d
	sar	r9d, 3
	add	eax, r8d
	imul	edx, r9d
	imul	eax, ecx
	movsx	rdx, edx
	cdqe
	add	rax, rdx
	lea	rdx, [rsi+rax*4]
	xor	esi, esi
	test	r8d, r8d
	jle	.L15
	.p2align 4,,10
	.p2align 3
.L3:
	xor	eax, eax
	test	ecx, ecx
	jle	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	xor	DWORD PTR [rdx+rax*8], 255
	xor	DWORD PTR 4[rdx+rax*8], 255
	mov	ecx, DWORD PTR 12[rdi]
	add	rax, 1
	cmp	ecx, eax
	jg	.L4
.L5:
	movsx	rax, ecx
	add	esi, 1
	lea	rdx, [rdx+rax*4]
	cmp	DWORD PTR 8[rdi], esi
	jg	.L3
.L1:
	ret
.L15:
	ret
	.cfi_endproc
.LFE0:
	.size	clcdr_draw_cursor, .-clcdr_draw_cursor
	.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_versatile_clcd.c_clcdr_draw_cursor.c"
	.text
	.global	__aeabi_idivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	clcdr_draw_cursor, %function
clcdr_draw_cursor:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0]
	cmp	r2, #0
	bxle	lr
	ldr	r3, [r0, #4]
	push	{r4, r5, r6, lr}
	ldr	r5, [r3]
	ldr	r4, [r5]
	cmp	r4, #0
	popeq	{r4, r5, r6, pc}
	ldr	r6, [r5, #4]
	mul	r3, r6, r4
	cmp	r3, r1
	pople	{r4, r5, r6, pc}
	mov	r0, r1
	mov	r1, r4
	bl	__aeabi_idivmod
	ldr	r2, [r5, #12]
	ldr	lr, [r5, #8]
	cmp	r2, #0
	add	ip, r2, #7
	movge	ip, r2
	mla	r3, lr, r0, r6
	ldr	r0, [r5, #16]
	mul	r3, lr, r3
	mla	r1, r2, r1, r0
	asr	ip, ip, #3
	mla	r1, ip, r1, r3
	cmp	lr, #0
	add	r1, r4, r1, lsl #2
	pople	{r4, r5, r6, pc}
	mov	ip, #0
.L3:
	cmp	r2, #0
	movgt	r3, #0
	addgt	r0, r1, #4
	ble	.L5
.L4:
	ldr	r2, [r1, r3, lsl #3]
	eor	r2, r2, #255
	str	r2, [r1, r3, lsl #3]
	ldr	r2, [r0, r3, lsl #3]
	eor	r2, r2, #255
	str	r2, [r0, r3, lsl #3]
	ldr	r2, [r5, #12]
	add	r3, r3, #1
	cmp	r2, r3
	bgt	.L4
.L5:
	ldr	r3, [r5, #8]
	add	ip, ip, #1
	cmp	r3, ip
	add	r1, r1, r3, lsl #2
	bgt	.L3
	pop	{r4, r5, r6, pc}
	.size	clcdr_draw_cursor, .-clcdr_draw_cursor
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
