	.file	"extr_uvscom.c_uvscom_write_callback.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	uvscom_write_callback, @function
uvscom_write_callback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	ebx, esi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	usbd_xfer_softc@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	USB_GET_STATE@PLT
	add	eax, -128
	cmp	eax, 1
	jbe	.L3
	cmp	DWORD PTR USB_ERR_CANCELLED[rip], ebx
	jne	.L12
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rdi, rbp
	call	usbd_xfer_set_stall@PLT
.L3:
	xor	esi, esi
	mov	rdi, rbp
	call	usbd_xfer_get_frame@PLT
	mov	ecx, DWORD PTR UVSCOM_BULK_BUF_SIZE[rip]
	xor	edx, edx
	mov	rdi, r12
	mov	rsi, rax
	lea	r8, 4[rsp]
	call	ucom_get_data@PLT
	test	eax, eax
	je	.L1
	mov	edx, DWORD PTR 4[rsp]
	mov	rdi, rbp
	xor	esi, esi
	call	usbd_xfer_set_frame_len@PLT
	mov	rdi, rbp
	call	usbd_transfer_submit@PLT
	jmp	.L1
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	uvscom_write_callback, .-uvscom_write_callback
	.comm	UVSCOM_BULK_BUF_SIZE,4,4
	.comm	USB_ERR_CANCELLED,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_uvscom.c_uvscom_write_callback.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	uvscom_write_callback, %function
uvscom_write_callback:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L14
	sub	sp, sp, #16
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	mov	r5, r1
	bl	usbd_xfer_softc
	mov	r6, r0
	mov	r0, r4
	bl	USB_GET_STATE
	sub	r3, r0, #128
	cmp	r3, #1
	bls	.L3
	ldr	r3, .L14+4
	ldr	r3, [r3]
	cmp	r3, r5
	bne	.L12
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, pc}
.L12:
	mov	r0, r4
	bl	usbd_xfer_set_stall
.L3:
	mov	r1, #0
	mov	r0, r4
	bl	usbd_xfer_get_frame
	ldr	r3, .L14+8
	add	r2, sp, #8
	mov	r1, r0
	ldr	r3, [r3]
	mov	r0, r6
	str	r2, [sp]
	mov	r2, #0
	bl	ucom_get_data
	cmp	r0, #0
	beq	.L1
	mov	r1, #0
	mov	r0, r4
	ldr	r2, [sp, #8]
	bl	usbd_xfer_set_frame_len
	mov	r0, r4
	bl	usbd_transfer_submit
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	USB_ERR_CANCELLED
	.word	UVSCOM_BULK_BUF_SIZE
	.size	uvscom_write_callback, .-uvscom_write_callback
	.comm	UVSCOM_BULK_BUF_SIZE,4,4
	.comm	USB_ERR_CANCELLED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
