	.file	"extr_vusb.c_send_keyboard.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"kbuf: full\n"
	.text
	.p2align 4
	.type	send_keyboard, @function
send_keyboard:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	movsx	rcx, DWORD PTR kbuf_head[rip]
	lea	eax, 1[rcx]
	cdq
	idiv	DWORD PTR KBUF_SIZE[rip]
	cmp	DWORD PTR kbuf_tail[rip], edx
	je	.L2
	mov	esi, DWORD PTR [rdi]
	mov	rax, QWORD PTR kbuf[rip]
	mov	DWORD PTR [rax+rcx*4], esi
	mov	DWORD PTR kbuf_head[rip], edx
.L3:
	xor	eax, eax
	call	usbPoll@PLT
	xor	eax, eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	vusb_transfer_keyboard@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	debug@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	send_keyboard, .-send_keyboard
	.comm	kbuf_tail,4,4
	.comm	kbuf_head,4,4
	.comm	kbuf,8,8
	.comm	KBUF_SIZE,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_vusb.c_send_keyboard.c"
	.text
	.global	__aeabi_idivmod
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"kbuf: full\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_keyboard, %function
send_keyboard:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, .L6
	ldr	r2, .L6+4
	ldr	r6, [r5]
	mov	r4, r0
	ldr	r1, [r2]
	add	r0, r6, #1
	bl	__aeabi_idivmod
	ldr	r3, .L6+8
	ldr	r3, [r3]
	cmp	r3, r1
	beq	.L2
	ldr	r3, .L6+12
	ldr	r2, [r4]
	ldr	r3, [r3]
	str	r2, [r3, r6, lsl #2]
	str	r1, [r5]
	bl	usbPoll
	pop	{r4, r5, r6, lr}
	b	vusb_transfer_keyboard
.L2:
	ldr	r0, .L6+16
	bl	debug
	bl	usbPoll
	pop	{r4, r5, r6, lr}
	b	vusb_transfer_keyboard
.L7:
	.align	2
.L6:
	.word	kbuf_head
	.word	KBUF_SIZE
	.word	kbuf_tail
	.word	kbuf
	.word	.LC0
	.size	send_keyboard, .-send_keyboard
	.comm	kbuf_tail,4,4
	.comm	kbuf_head,4,4
	.comm	kbuf,4,4
	.comm	KBUF_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
