	.file	"extr_if_mos.c_mos_bulk_read_callback.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"actlen : %d"
.LC1:
	.string	"erroneous frame received"
.LC2:
	.string	"frame size less than 64 bytes"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC3:
	.string	"frame size larger than 1532 bytes"
	.section	.rodata.str1.1
.LC4:
	.string	"CRC error"
.LC5:
	.string	"alignment error"
	.section	.rodata.str1.8
	.align 8
.LC6:
	.string	"error: pktlen %d is smaller than ether_header %zd"
	.section	.rodata.str1.1
.LC7:
	.string	"bulk read error, %s"
.LC8:
	.string	"start rx %i"
	.text
	.p2align 4
	.type	mos_bulk_read_callback, @function
mos_bulk_read_callback:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	usbd_xfer_softc@PLT
	mov	rdi, rax
	mov	r12, rax
	call	uether_getifp@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	xor	edx, edx
	lea	rsi, 4[rsp]
	mov	rdi, rbp
	mov	DWORD PTR [rsp], 0
	mov	r14, rax
	call	usbd_xfer_status@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	usbd_xfer_get_frame@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	USB_GET_STATE@PLT
	cmp	eax, 128
	je	.L2
	cmp	eax, 129
	je	.L3
	mov	edi, ebx
	call	usbd_errstr@PLT
	lea	rdi, .LC7[rip]
	mov	esi, eax
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	cmp	DWORD PTR USB_ERR_CANCELLED[rip], ebx
	mov	rdi, rbp
	je	.L13
	call	usbd_xfer_set_stall@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, rbp
	call	usbd_xfer_max_len@PLT
	xor	esi, esi
	mov	rdi, rbp
	mov	edx, eax
	call	usbd_xfer_set_frame_len@PLT
	mov	rdi, rbp
	call	usbd_transfer_submit@PLT
	mov	rdi, r12
	call	uether_rxflush@PLT
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rsp]
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	mov	esi, DWORD PTR 4[rsp]
	cmp	esi, 1
	jle	.L32
	mov	rdx, rsp
	sub	esi, 4
	mov	ecx, 4
	mov	rdi, r13
	call	usbd_copy_out@PLT
	mov	eax, DWORD PTR MOS_RXSTS_VALID[rip]
	cmp	DWORD PTR [rsp], eax
	jne	.L35
	mov	ecx, DWORD PTR 4[rsp]
	lea	esi, -1[rcx]
	cmp	esi, 3
	jbe	.L36
	xor	edx, edx
	mov	rsi, r13
	mov	rdi, r12
	call	uether_rxbuf@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edx, 4
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
.L32:
	mov	esi, DWORD PTR IFCOUNTER_IERRORS[rip]
	mov	edx, 1
	mov	rdi, r14
	call	if_inc_counter@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L13:
	call	usbd_xfer_max_len@PLT
	lea	rdi, .LC8[rip]
	mov	esi, eax
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	mov	eax, DWORD PTR [rsp]
	test	DWORD PTR MOS_RXSTS_SHORT_FRAME[rip], eax
	jne	.L37
.L7:
	test	DWORD PTR MOS_RXSTS_LARGE_FRAME[rip], eax
	jne	.L38
.L8:
	test	DWORD PTR MOS_RXSTS_CRC_ERROR[rip], eax
	jne	.L39
.L9:
	test	DWORD PTR MOS_RXSTS_ALIGN_ERROR[rip], eax
	je	.L32
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L39:
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	mov	eax, DWORD PTR [rsp]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L38:
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	mov	eax, DWORD PTR [rsp]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L37:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	MOS_DPRINTFN@PLT
	mov	eax, DWORD PTR [rsp]
	jmp	.L7
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mos_bulk_read_callback, .-mos_bulk_read_callback
	.comm	USB_ERR_CANCELLED,4,4
	.comm	MOS_RXSTS_VALID,4,4
	.comm	MOS_RXSTS_SHORT_FRAME,4,4
	.comm	MOS_RXSTS_LARGE_FRAME,4,4
	.comm	MOS_RXSTS_CRC_ERROR,4,4
	.comm	MOS_RXSTS_ALIGN_ERROR,4,4
	.comm	IFCOUNTER_IERRORS,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_if_mos.c_mos_bulk_read_callback.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"actlen : %d\000"
	.align	2
.LC1:
	.ascii	"erroneous frame received\000"
	.align	2
.LC2:
	.ascii	"frame size less than 64 bytes\000"
	.align	2
.LC3:
	.ascii	"frame size larger than 1532 bytes\000"
	.align	2
.LC4:
	.ascii	"CRC error\000"
	.align	2
.LC5:
	.ascii	"alignment error\000"
	.align	2
.LC6:
	.ascii	"error: pktlen %d is smaller than ether_header %zd\000"
	.align	2
.LC7:
	.ascii	"bulk read error, %s\000"
	.align	2
.LC8:
	.ascii	"start rx %i\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mos_bulk_read_callback, %function
mos_bulk_read_callback:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L40
	sub	sp, sp, #28
	mov	r4, r0
	mov	r7, r1
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	usbd_xfer_softc
	mov	r5, #0
	mov	r6, r0
	bl	uether_getifp
	mov	r3, r5
	mov	r2, r5
	add	r1, sp, #16
	mov	r8, r0
	str	r5, [sp]
	mov	r0, r4
	str	r5, [sp, #12]
	bl	usbd_xfer_status
	mov	r1, r5
	mov	r0, r4
	bl	usbd_xfer_get_frame
	mov	r9, r0
	mov	r0, r4
	bl	USB_GET_STATE
	cmp	r0, #128
	beq	.L2
	cmp	r0, #129
	beq	.L3
	mov	r0, r7
	bl	usbd_errstr
	mov	r1, r0
	ldr	r0, .L40+4
	bl	MOS_DPRINTFN
	ldr	r3, .L40+8
	mov	r0, r4
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L13
	bl	usbd_xfer_set_stall
.L3:
	mov	r0, r4
	bl	usbd_xfer_max_len
	mov	r1, #0
	mov	r2, r0
	mov	r0, r4
	bl	usbd_xfer_set_frame_len
	mov	r0, r4
	bl	usbd_transfer_submit
	mov	r0, r6
	bl	uether_rxflush
.L1:
	ldr	r3, .L40
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L2:
	ldr	r1, [sp, #16]
	ldr	r0, .L40+12
	bl	MOS_DPRINTFN
	ldr	r1, [sp, #16]
	cmp	r1, #1
	ble	.L32
	mov	r3, #4
	add	r2, sp, #12
	mov	r0, r9
	sub	r1, r1, #4
	bl	usbd_copy_out
	ldr	r3, .L40+16
	ldr	r2, [sp, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L35
	ldr	r3, [sp, #16]
	sub	r1, r3, #1
	cmp	r1, #3
	bls	.L36
	mov	r2, r5
	mov	r1, r9
	mov	r0, r6
	bl	uether_rxbuf
	b	.L3
.L36:
	mov	r2, #4
	ldr	r0, .L40+20
	bl	MOS_DPRINTFN
.L32:
	ldr	r3, .L40+24
	mov	r0, r8
	mov	r2, #1
	ldr	r1, [r3]
	bl	if_inc_counter
	b	.L3
.L13:
	bl	usbd_xfer_max_len
	mov	r1, r0
	ldr	r0, .L40+28
	bl	MOS_DPRINTFN
	b	.L1
.L35:
	ldr	r0, .L40+32
	bl	MOS_DPRINTFN
	ldr	r2, .L40+36
	ldr	r3, [sp, #12]
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L37
.L7:
	ldr	r2, .L40+40
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L38
.L8:
	ldr	r2, .L40+44
	ldr	r2, [r2]
	tst	r3, r2
	bne	.L39
.L9:
	ldr	r2, .L40+48
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L32
	ldr	r0, .L40+52
	bl	MOS_DPRINTFN
	b	.L32
.L39:
	ldr	r0, .L40+56
	bl	MOS_DPRINTFN
	ldr	r3, [sp, #12]
	b	.L9
.L38:
	ldr	r0, .L40+60
	bl	MOS_DPRINTFN
	ldr	r3, [sp, #12]
	b	.L8
.L37:
	ldr	r0, .L40+64
	bl	MOS_DPRINTFN
	ldr	r3, [sp, #12]
	b	.L7
.L34:
	bl	__stack_chk_fail
.L41:
	.align	2
.L40:
	.word	.LC9
	.word	.LC7
	.word	USB_ERR_CANCELLED
	.word	.LC0
	.word	MOS_RXSTS_VALID
	.word	.LC6
	.word	IFCOUNTER_IERRORS
	.word	.LC8
	.word	.LC1
	.word	MOS_RXSTS_SHORT_FRAME
	.word	MOS_RXSTS_LARGE_FRAME
	.word	MOS_RXSTS_CRC_ERROR
	.word	MOS_RXSTS_ALIGN_ERROR
	.word	.LC5
	.word	.LC4
	.word	.LC3
	.word	.LC2
	.size	mos_bulk_read_callback, .-mos_bulk_read_callback
	.comm	USB_ERR_CANCELLED,4,4
	.comm	MOS_RXSTS_VALID,4,4
	.comm	MOS_RXSTS_SHORT_FRAME,4,4
	.comm	MOS_RXSTS_LARGE_FRAME,4,4
	.comm	MOS_RXSTS_CRC_ERROR,4,4
	.comm	MOS_RXSTS_ALIGN_ERROR,4,4
	.comm	IFCOUNTER_IERRORS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
