	.file	"extr_usbdux.c_receive_dux_commands.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	receive_dux_commands, @function
receive_dux_commands:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	DWORD PTR 12[rsp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	comedi_to_usb_dev@PLT
	mov	edx, DWORD PTR RETRIES[rip]
	mov	r13, QWORD PTR [rbx]
	test	edx, edx
	jle	.L2
	mov	rbp, rax
	xor	ebx, ebx
	lea	r15, 20[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rax, QWORD PTR 0[r13]
	mov	edi, DWORD PTR [rax]
	call	le16_to_cpu@PLT
	cmp	eax, DWORD PTR 12[rsp]
	je	.L1
	add	ebx, 1
	cmp	DWORD PTR RETRIES[rip], ebx
	jle	.L2
.L4:
	mov	r9d, DWORD PTR BULK_TIMEOUT[rip]
	mov	r12, QWORD PTR 0[r13]
	mov	esi, 8
	mov	rdi, rbp
	mov	r14d, DWORD PTR SIZEINSNBUF[rip]
	mov	DWORD PTR 8[rsp], r9d
	call	usb_rcvbulkpipe@PLT
	mov	r9d, DWORD PTR 8[rsp]
	mov	rdx, r12
	mov	r8, r15
	mov	esi, eax
	mov	ecx, r14d
	mov	rdi, rbp
	call	usb_bulk_msg@PLT
	mov	r12d, eax
	test	eax, eax
	jns	.L9
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	r12d, DWORD PTR EFAULT[rip]
	neg	r12d
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	receive_dux_commands, .-receive_dux_commands
	.comm	SIZEINSNBUF,4,4
	.comm	RETRIES,4,4
	.comm	EFAULT,4,4
	.comm	BULK_TIMEOUT,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_usbdux.c_receive_dux_commands.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	receive_dux_commands, %function
receive_dux_commands:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L11
	sub	sp, sp, #28
	ldr	r8, .L11+4
	str	r1, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	comedi_to_usb_dev
	ldr	r3, [r8]
	ldr	r7, [r4]
	cmp	r3, #0
	ble	.L2
	mov	r6, r0
	mov	r5, #0
	ldr	fp, .L11+8
	ldr	r10, .L11+12
	add	r9, sp, #16
	b	.L4
.L9:
	ldr	r3, [r7]
	ldr	r0, [r3]
	bl	le16_to_cpu
	ldr	r3, [sp, #12]
	cmp	r0, r3
	beq	.L1
	ldr	r3, [r8]
	add	r5, r5, #1
	cmp	r3, r5
	ble	.L2
.L4:
	mov	r1, #8
	mov	r0, r6
	bl	usb_rcvbulkpipe
	ldr	r3, [r10]
	ldr	r2, [r7]
	mov	r1, r0
	str	r3, [sp, #4]
	mov	r0, r6
	ldr	r3, [fp]
	str	r9, [sp]
	bl	usb_bulk_msg
	subs	r4, r0, #0
	bge	.L9
.L1:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, r4
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L11+16
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	RETRIES
	.word	SIZEINSNBUF
	.word	BULK_TIMEOUT
	.word	EFAULT
	.size	receive_dux_commands, .-receive_dux_commands
	.comm	SIZEINSNBUF,4,4
	.comm	RETRIES,4,4
	.comm	EFAULT,4,4
	.comm	BULK_TIMEOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
