	.file	"extr_vt_sysmouse.c_sysmouse_buf_store.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sysmouse_buf_store, @function
sysmouse_buf_store:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rsi, rdi
	mov	rdi, QWORD PTR sysmouse_buffer[rip]
	test	rdi, rdi
	je	.L9
	mov	eax, DWORD PTR sysmouse_length[rip]
	mov	ecx, DWORD PTR SYSMOUSE_MAXFRAMES[rip]
	cmp	eax, ecx
	je	.L9
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	xor	edx, edx
	add	eax, DWORD PTR sysmouse_start[rip]
	mov	r8d, DWORD PTR MOUSE_SYS_PACKETSIZE[rip]
	div	ecx
	mov	eax, edx
	mov	edx, r8d
	imul	eax, r8d
	lea	rdi, [rdi+rax*4]
	call	memcpy@PLT
	lea	rdi, sysmouse_sleep[rip]
	add	DWORD PTR sysmouse_length[rip], 1
	call	cv_broadcast@PLT
	lea	rdi, sysmouse_bufpoll[rip]
	call	selwakeup@PLT
	mov	eax, DWORD PTR sysmouse_flags[rip]
	test	DWORD PTR SM_ASYNC[rip], eax
	je	.L1
	cmp	QWORD PTR sysmouse_sigio[rip], 0
	je	.L1
	mov	esi, DWORD PTR SIGIO[rip]
	xor	edx, edx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	lea	rdi, sysmouse_sigio[rip]
	jmp	pgsigio@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	ret
	.cfi_endproc
.LFE0:
	.size	sysmouse_buf_store, .-sysmouse_buf_store
	.comm	sysmouse_start,4,4
	.comm	sysmouse_sleep,4,4
	.comm	sysmouse_sigio,8,8
	.comm	sysmouse_length,4,4
	.comm	sysmouse_flags,4,4
	.comm	sysmouse_bufpoll,4,4
	.comm	sysmouse_buffer,8,8
	.comm	SYSMOUSE_MAXFRAMES,4,4
	.comm	SM_ASYNC,4,4
	.comm	SIGIO,4,4
	.comm	MOUSE_SYS_PACKETSIZE,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_vt_sysmouse.c_sysmouse_buf_store.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sysmouse_buf_store, %function
sysmouse_buf_store:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L13
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r3]
	cmp	r4, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r6, .L13+4
	ldr	r2, .L13+8
	ldr	r3, [r6]
	ldr	r1, [r2]
	cmp	r3, r1
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L13+12
	mov	r5, r0
	ldr	r0, [r2]
	ldr	r2, .L13+16
	add	r0, r3, r0
	ldr	r7, [r2]
	bl	__aeabi_uidivmod
	mul	r1, r7, r1
	mov	r2, r7
	add	r0, r4, r1, lsl #2
	mov	r1, r5
	bl	memcpy
	ldr	r3, [r6]
	ldr	r0, .L13+20
	add	r3, r3, #1
	str	r3, [r6]
	bl	cv_broadcast
	ldr	r0, .L13+24
	bl	selwakeup
	ldr	r2, .L13+28
	ldr	r3, .L13+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	tst	r2, r3
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, .L13+36
	ldr	r3, [r0]
	cmp	r3, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L13+40
	mov	r2, #0
	pop	{r4, r5, r6, r7, r8, lr}
	ldr	r1, [r3]
	b	pgsigio
.L14:
	.align	2
.L13:
	.word	sysmouse_buffer
	.word	sysmouse_length
	.word	SYSMOUSE_MAXFRAMES
	.word	sysmouse_start
	.word	MOUSE_SYS_PACKETSIZE
	.word	sysmouse_sleep
	.word	sysmouse_bufpoll
	.word	sysmouse_flags
	.word	SM_ASYNC
	.word	sysmouse_sigio
	.word	SIGIO
	.size	sysmouse_buf_store, .-sysmouse_buf_store
	.comm	sysmouse_start,4,4
	.comm	sysmouse_sleep,4,4
	.comm	sysmouse_sigio,4,4
	.comm	sysmouse_length,4,4
	.comm	sysmouse_flags,4,4
	.comm	sysmouse_bufpoll,4,4
	.comm	sysmouse_buffer,4,4
	.comm	SYSMOUSE_MAXFRAMES,4,4
	.comm	SM_ASYNC,4,4
	.comm	SIGIO,4,4
	.comm	MOUSE_SYS_PACKETSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
