	.file	"extr_netjet.c_read_dma.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s: B%1d overrun at idx %d\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"%s.B%d: No memory for %d bytes\n"
	.section	.rodata.str1.1
.LC2:
	.string	"B%1d-recv %s %d "
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"%s: B%1d receive frame CRC error\n"
	.align 8
.LC4:
	.string	"%s: B%1d receive framing error\n"
	.align 8
.LC5:
	.string	"%s: B%1d receive frame too long (> %d)\n"
	.text
	.p2align 4
	.type	read_dma, @function
read_dma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdi
	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
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	rbp, QWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR [rdi], rsi
	je	.L38
.L2:
	mov	QWORD PTR [r15], rbx
	lea	r14, 32[r15]
	mov	edi, DWORD PTR FLG_RX_OFF[rip]
	mov	rsi, r14
	call	test_bit@PLT
	test	rax, rax
	je	.L3
	add	DWORD PTR 12[r15], r12d
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L39
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L3:
	.cfi_restore_state
	lea	r13, 8[r15]
	mov	esi, r12d
	mov	rdi, r13
	call	bchannel_get_rxbuf@PLT
	add	eax, DWORD PTR ENOMEM[rip]
	je	.L36
	mov	edi, DWORD PTR FLG_TRANSPARENT[rip]
	mov	rsi, r14
	call	test_bit@PLT
	test	rax, rax
	jne	.L40
	mov	rax, QWORD PTR 56[r15]
.L7:
	mov	DWORD PTR 36[rsp], 0
	mov	r9d, DWORD PTR FLG_TRANSPARENT[rip]
	test	r12d, r12d
	jle	.L8
	mov	esi, DWORD PTR 8[r15]
	lea	edx, -1[r12]
	mov	r11, QWORD PTR 16[rbp]
	xor	edi, edi
	lea	r8, 8[rax+rdx*8]
	and	esi, 2
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, QWORD PTR [r11+rbx*8]
	lea	rcx, 1[rbx]
	mov	r10, rdx
	sar	r10, 8
	test	esi, esi
	cmovne	rdx, r10
	cmp	QWORD PTR 24[rbp], rcx
	cmovle	rcx, rdi
	add	rax, 8
	and	edx, 255
	mov	QWORD PTR -8[rax], rdx
	mov	rbx, rcx
	cmp	r8, rax
	jne	.L11
	mov	rsi, r14
	mov	edi, r9d
	mov	DWORD PTR 36[rsp], r12d
	call	test_bit@PLT
	test	rax, rax
	jne	.L21
	lea	rax, 48[r15]
	mov	QWORD PTR 16[rsp], rbp
	mov	rbx, QWORD PTR 56[r15]
	mov	rbp, r13
	lea	r14, 36[rsp]
	mov	r13, rax
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L13:
	add	eax, DWORD PTR HDLC_CRC_ERROR[rip]
	je	.L41
	mov	eax, r9d
	add	eax, DWORD PTR HDLC_FRAMING_ERROR[rip]
	je	.L42
	add	r9d, DWORD PTR HDLC_LENGTH_ERROR[rip]
	je	.L43
.L16:
	movsx	rdx, DWORD PTR 36[rsp]
	sub	r12d, edx
	lea	rbx, [rbx+rdx*8]
	test	r12d, r12d
	jle	.L1
.L20:
	mov	rax, QWORD PTR 24[r15]
	mov	r9d, DWORD PTR 16[r15]
	mov	rcx, r14
	mov	edx, r12d
	mov	rsi, rbx
	mov	rdi, r13
	mov	r8d, DWORD PTR [rax]
	call	isdnhdlc_decode@PLT
	mov	r9d, eax
	test	eax, eax
	jle	.L13
	mov	rdi, QWORD PTR 24[r15]
	mov	esi, eax
	mov	DWORD PTR 12[rsp], eax
	call	skb_put@PLT
	mov	r9d, DWORD PTR 12[rsp]
	mov	r11, rax
	mov	eax, DWORD PTR debug[rip]
	test	DWORD PTR DEBUG_HW_BFIFO[rip], eax
	jne	.L44
.L14:
	xor	esi, esi
	xor	edx, edx
	mov	rdi, rbp
	call	recv_Bchannel@PLT
	mov	esi, DWORD PTR 16[r15]
	mov	rdi, rbp
	call	bchannel_get_rxbuf@PLT
	test	eax, eax
	jns	.L16
	mov	rbp, QWORD PTR 16[rsp]
.L36:
	mov	edx, DWORD PTR 8[r15]
	mov	rsi, QWORD PTR 0[rbp]
	mov	ecx, r12d
	lea	rdi, .LC1[rip]
	call	pr_warning@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L44:
	mov	rax, QWORD PTR 16[rsp]
	mov	ecx, DWORD PTR 8[r15]
	lea	rdx, .LC2[rip]
	mov	QWORD PTR 24[rsp], r11
	mov	esi, DWORD PTR LOG_SIZE[rip]
	mov	edi, DWORD PTR 8[rax]
	mov	r8, QWORD PTR [rax]
	call	snprintf@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	r9d, DWORD PTR 12[rsp]
	mov	r11, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR DUMP_PREFIX_OFFSET[rip]
	mov	edi, DWORD PTR 8[rax]
	mov	ecx, r9d
	mov	rdx, r11
	call	print_hex_dump_bytes@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L41:
	mov	rax, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR 8[r15]
	lea	rdi, .LC3[rip]
	mov	rsi, QWORD PTR [rax]
	xor	eax, eax
	call	pr_info@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L42:
	mov	rax, QWORD PTR 16[rsp]
	mov	edx, DWORD PTR 8[r15]
	lea	rdi, .LC4[rip]
	mov	rsi, QWORD PTR [rax]
	xor	eax, eax
	call	pr_info@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L43:
	mov	rax, QWORD PTR 16[rsp]
	mov	ecx, DWORD PTR 16[r15]
	lea	rdi, .LC5[rip]
	mov	edx, DWORD PTR 8[r15]
	mov	rsi, QWORD PTR [rax]
	xor	eax, eax
	call	pr_info@PLT
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L38:
	mov	eax, DWORD PTR RX_OVERRUN[rip]
	or	DWORD PTR 64[rdi], eax
	mov	rcx, rsi
	xor	eax, eax
	mov	edx, DWORD PTR 8[rdi]
	mov	rsi, QWORD PTR 0[rbp]
	lea	rdi, .LC0[rip]
	call	pr_info@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L40:
	mov	rdi, QWORD PTR 24[r15]
	mov	esi, r12d
	call	skb_put@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, r14
	mov	edi, r9d
	call	test_bit@PLT
	test	rax, rax
	je	.L1
.L21:
	xor	edx, edx
	xor	esi, esi
	mov	rdi, r13
	call	recv_Bchannel@PLT
	jmp	.L1
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	read_dma, .-read_dma
	.comm	debug,4,4
	.comm	RX_OVERRUN,4,4
	.comm	LOG_SIZE,4,4
	.comm	HDLC_LENGTH_ERROR,4,4
	.comm	HDLC_FRAMING_ERROR,4,4
	.comm	HDLC_CRC_ERROR,4,4
	.comm	FLG_TRANSPARENT,4,4
	.comm	FLG_RX_OFF,4,4
	.comm	ENOMEM,4,4
	.comm	DUMP_PREFIX_OFFSET,4,4
	.comm	DEBUG_HW_BFIFO,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_netjet.c_read_dma.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s: B%1d overrun at idx %d\012\000"
	.align	2
.LC1:
	.ascii	"%s.B%d: No memory for %d bytes\012\000"
	.align	2
.LC2:
	.ascii	"B%1d-recv %s %d \000"
	.align	2
.LC3:
	.ascii	"%s: B%1d receive frame CRC error\012\000"
	.align	2
.LC4:
	.ascii	"%s: B%1d receive framing error\012\000"
	.align	2
.LC5:
	.ascii	"%s: B%1d receive frame too long (> %d)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_dma, %function
read_dma:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	sub	sp, sp, #28
	cmp	r3, r1
	ldr	r3, .L46
	mov	r5, r0
	mov	r4, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r8, [r0, #24]
	beq	.L39
.L2:
	mov	r7, r5
	ldr	r3, .L46+4
	str	r4, [r7], #20
	mov	r1, r7
	ldr	r0, [r3]
	bl	test_bit
	cmp	r0, #0
	beq	.L3
	ldr	r2, [r5, #8]
	add	r6, r2, r6
	str	r6, [r5, #8]
.L1:
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L40
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	add	r10, r5, #4
	mov	r0, r10
	mov	r1, r6
	bl	bchannel_get_rxbuf
	ldr	r3, .L46+8
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L37
	ldr	r9, .L46+12
	mov	r1, r7
	ldr	r0, [r9]
	bl	test_bit
	cmp	r0, #0
	ldreq	r2, [r5, #32]
	bne	.L41
.L7:
	mov	r3, #0
	cmp	r6, r3
	ldr	r0, [r9]
	str	r3, [sp, #16]
	ble	.L8
	ldr	r9, [r5, #4]
	add	lr, r2, r6, lsl #2
	ldr	fp, [r8, #8]
	and	r9, r9, #2
	sub	lr, lr, #4
	sub	r2, r2, #4
.L11:
	ldr	r3, [fp, r4, lsl #2]
	cmp	r9, #0
	add	r1, r4, #1
	asrne	r3, r3, #8
	ldr	r4, [r8, #12]
	and	r3, r3, #255
	cmp	r4, r1
	str	r3, [r2, #4]!
	movgt	r4, r1
	movle	r4, #0
	cmp	lr, r2
	bne	.L11
	mov	r1, r7
	str	r6, [sp, #16]
	bl	test_bit
	cmp	r0, #0
	bne	.L21
	ldr	r7, [r5, #32]
	ldr	r9, .L46+16
	add	fp, r5, #28
	b	.L20
.L13:
	ldr	r3, [r9]
	cmn	r4, r3
	beq	.L42
	ldr	r3, .L46+20
	ldr	r3, [r3]
	cmn	r4, r3
	beq	.L43
	ldr	r3, .L46+24
	ldr	r3, [r3]
	cmn	r4, r3
	beq	.L44
.L16:
	ldr	r3, [sp, #16]
	sub	r6, r6, r3
	cmp	r6, #0
	add	r7, r7, r3, lsl #2
	ble	.L1
.L20:
	ldr	r2, [r5, #12]
	ldr	r3, [r5, #16]
	str	r2, [sp, #4]
	ldr	r2, [r3]
	mov	r1, r7
	str	r2, [sp]
	mov	r0, fp
	mov	r2, r6
	add	r3, sp, #16
	bl	isdnhdlc_decode
	subs	r4, r0, #0
	ble	.L13
	mov	r1, r4
	ldr	r0, [r5, #16]
	bl	skb_put
	ldr	r2, .L46+28
	ldr	r3, .L46+32
	ldr	r2, [r2]
	ldr	r3, [r3]
	str	r0, [sp, #12]
	tst	r2, r3
	bne	.L45
.L14:
	mov	r2, #0
	mov	r0, r10
	mov	r1, r2
	bl	recv_Bchannel
	mov	r0, r10
	ldr	r1, [r5, #12]
	bl	bchannel_get_rxbuf
	cmp	r0, #0
	bge	.L16
.L37:
	mov	r3, r6
	ldr	r2, [r5, #4]
	ldr	r1, [r8]
	ldr	r0, .L46+36
	bl	pr_warning
	b	.L1
.L45:
	ldr	r0, [r8, #4]
	str	r4, [sp, #4]
	ldr	r2, [r8]
	ldr	r3, .L46+40
	str	r2, [sp]
	ldr	r1, [r3]
	ldr	r2, .L46+44
	ldr	r3, [r5, #4]
	bl	snprintf
	ldr	r1, .L46+48
	mov	r3, r4
	ldr	r2, [sp, #12]
	ldr	r1, [r1]
	ldr	r0, [r8, #4]
	bl	print_hex_dump_bytes
	b	.L14
.L42:
	ldr	r2, [r5, #4]
	ldr	r1, [r8]
	ldr	r0, .L46+52
	bl	pr_info
	b	.L16
.L43:
	ldr	r2, [r5, #4]
	ldr	r1, [r8]
	ldr	r0, .L46+56
	bl	pr_info
	b	.L16
.L44:
	ldr	r3, [r5, #12]
	ldr	r2, [r5, #4]
	ldr	r1, [r8]
	ldr	r0, .L46+60
	bl	pr_info
	b	.L16
.L39:
	ldr	r3, .L46+64
	ldr	r2, [r0, #36]
	ldr	r1, [r3]
	mov	r3, r4
	orr	r2, r2, r1
	str	r2, [r0, #36]
	ldr	r1, [r8]
	ldr	r2, [r0, #4]
	ldr	r0, .L46+68
	bl	pr_info
	b	.L2
.L41:
	mov	r1, r6
	ldr	r0, [r5, #16]
	bl	skb_put
	mov	r2, r0
	b	.L7
.L8:
	mov	r1, r7
	bl	test_bit
	cmp	r0, #0
	beq	.L1
.L21:
	mov	r2, #0
	mov	r0, r10
	mov	r1, r2
	bl	recv_Bchannel
	b	.L1
.L40:
	bl	__stack_chk_fail
.L47:
	.align	2
.L46:
	.word	.LC6
	.word	FLG_RX_OFF
	.word	ENOMEM
	.word	FLG_TRANSPARENT
	.word	HDLC_CRC_ERROR
	.word	HDLC_FRAMING_ERROR
	.word	HDLC_LENGTH_ERROR
	.word	debug
	.word	DEBUG_HW_BFIFO
	.word	.LC1
	.word	LOG_SIZE
	.word	.LC2
	.word	DUMP_PREFIX_OFFSET
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	RX_OVERRUN
	.word	.LC0
	.size	read_dma, .-read_dma
	.comm	debug,4,4
	.comm	RX_OVERRUN,4,4
	.comm	LOG_SIZE,4,4
	.comm	HDLC_LENGTH_ERROR,4,4
	.comm	HDLC_FRAMING_ERROR,4,4
	.comm	HDLC_CRC_ERROR,4,4
	.comm	FLG_TRANSPARENT,4,4
	.comm	FLG_RX_OFF,4,4
	.comm	ENOMEM,4,4
	.comm	DUMP_PREFIX_OFFSET,4,4
	.comm	DEBUG_HW_BFIFO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
