	.file	"extr_ethernet-rx.c_cvm_oct_check_rcv_error.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Port %d unknown preamble, packet dropped\n"
	.align 8
.LC1:
	.string	"Port %d receive error code %d, packet dropped\n"
	.text
	.p2align 4
	.type	cvm_oct_check_rcv_error, @function
cvm_oct_check_rcv_error:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, DWORD PTR OCTEON_FEATURE_PKND[rip]
	call	octeon_has_feature@PLT
	test	rax, rax
	je	.L2
	mov	edx, DWORD PTR 0[rbp]
	mov	r12d, DWORD PTR 16[rbp]
	cmp	edx, 10
	je	.L20
.L4:
	mov	eax, edx
	and	eax, -3
	cmp	eax, 5
	jne	.L6
	mov	edi, r12d
	call	cvmx_helper_get_interface_num@PLT
	mov	edi, r12d
	mov	r13d, eax
	call	cvmx_helper_get_interface_index_num@PLT
	mov	esi, r13d
	mov	edi, eax
	call	CVMX_GMXX_RXX_FRM_CTL@PLT
	mov	edi, eax
	call	cvmx_read_csr@PLT
	test	eax, eax
	je	.L21
.L12:
	xor	eax, eax
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edx, DWORD PTR 0[rbp]
	mov	r12d, DWORD PTR 8[rbp]
	cmp	edx, 10
	jne	.L4
.L20:
	xor	eax, eax
	cmp	DWORD PTR 4[rbp], 64
	jle	.L1
.L6:
	mov	esi, r12d
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	printk_ratelimited@PLT
	mov	rdi, rbp
	call	cvm_oct_free_work@PLT
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, 1
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	call	cvmx_phys_to_ptr@PLT
	mov	r8d, DWORD PTR 4[rbp]
	cmp	r8d, 1
	jle	.L8
	lea	edi, -1[r8]
	xor	edx, edx
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L23:
	add	edx, 1
	lea	rsi, 4[rax]
	cmp	edi, edx
	je	.L22
	mov	rax, rsi
.L10:
	mov	ecx, DWORD PTR [rax]
	cmp	ecx, 85
	je	.L23
.L9:
	cmp	ecx, 213
	je	.L24
	and	ecx, 15
	cmp	ecx, 13
	jne	.L13
	add	DWORD PTR 12[rbp], edx
	add	edx, 4
	sub	r8d, edx
	mov	DWORD PTR 4[rbp], r8d
	test	r8d, r8d
	jle	.L12
	mov	edi, DWORD PTR [rax]
	xor	esi, esi
	.p2align 4,,10
	.p2align 3
.L14:
	sar	edi, 4
	and	edi, 15
	mov	r8d, edi
	mov	edi, DWORD PTR 4[rax+rsi*4]
	mov	ecx, edi
	sal	ecx, 4
	movzx	edx, cl
	or	edx, r8d
	mov	DWORD PTR [rax+rsi*4], edx
	add	rsi, 1
	cmp	DWORD PTR 4[rbp], esi
	jg	.L14
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L22:
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, rsi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L24:
	lea	eax, 1[rdx]
	add	edx, 5
	add	DWORD PTR 12[rbp], eax
	sub	r8d, edx
	mov	DWORD PTR 4[rbp], r8d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L13:
	mov	esi, r12d
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	printk_ratelimited@PLT
	mov	rdi, rbp
	call	cvm_oct_free_work@PLT
	mov	eax, 1
	jmp	.L1
.L8:
	mov	ecx, DWORD PTR [rax]
	xor	edx, edx
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	cvm_oct_check_rcv_error, .-cvm_oct_check_rcv_error
	.comm	OCTEON_FEATURE_PKND,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_ethernet-rx.c_cvm_oct_check_rcv_error.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Port %d unknown preamble, packet dropped\012\000"
	.align	2
.LC1:
	.ascii	"Port %d receive error code %d, packet dropped\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	cvm_oct_check_rcv_error, %function
cvm_oct_check_rcv_error:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L23
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r3]
	bl	octeon_has_feature
	ldr	r2, [r4]
	cmp	r0, #0
	ldrne	r6, [r4, #16]
	ldreq	r6, [r4, #8]
	cmp	r2, #10
	beq	.L18
	bic	r3, r2, #2
	cmp	r3, #5
	bne	.L5
	mov	r0, r6
	bl	cvmx_helper_get_interface_num
	mov	r5, r0
	mov	r0, r6
	bl	cvmx_helper_get_interface_index_num
	mov	r1, r5
	bl	CVMX_GMXX_RXX_FRM_CTL
	bl	cvmx_read_csr
	subs	r5, r0, #0
	beq	.L19
.L7:
	mov	r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L18:
	ldr	r3, [r4, #4]
	cmp	r3, #64
	ble	.L7
.L5:
	mov	r5, #1
	mov	r1, r6
	ldr	r0, .L23+4
	bl	printk_ratelimited
	mov	r0, r4
	bl	cvm_oct_free_work
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L19:
	ldr	r0, [r4, #12]
	bl	cvmx_phys_to_ptr
	ldr	lr, [r4, #4]
	mov	r3, r0
	cmp	lr, #1
	ble	.L8
	mov	r2, r5
	sub	ip, lr, #1
	b	.L10
.L21:
	add	r2, r2, #1
	cmp	r2, ip
	beq	.L20
.L10:
	ldr	r1, [r0]
	mov	r3, r0
	cmp	r1, #85
	add	r0, r0, #4
	beq	.L21
.L9:
	cmp	r1, #213
	beq	.L22
	and	r1, r1, #15
	cmp	r1, #13
	bne	.L12
	ldr	r0, [r4, #12]
	add	r1, r2, #4
	sub	r1, lr, r1
	add	r2, r0, r2
	cmp	r1, #0
	str	r2, [r4, #12]
	str	r1, [r4, #4]
	ble	.L7
	ldr	r0, [r3]
.L13:
	asr	r2, r0, #4
	ldr	r0, [r3, #4]
	and	r1, r2, #15
	lsl	r2, r0, #4
	and	r2, r2, #255
	orr	r2, r2, r1
	str	r2, [r3], #4
	ldr	r2, [r4, #4]
	add	r5, r5, #1
	cmp	r2, r5
	bgt	.L13
	b	.L7
.L20:
	ldr	r1, [r3, #4]
	mov	r3, r0
	b	.L9
.L22:
	ldr	r3, [r4, #12]
	add	r1, r2, #1
	add	r2, r2, #5
	add	r3, r3, r1
	sub	r2, lr, r2
	str	r3, [r4, #12]
	str	r2, [r4, #4]
	b	.L1
.L12:
	mov	r1, r6
	ldr	r0, .L23+8
	bl	printk_ratelimited
	mov	r0, r4
	bl	cvm_oct_free_work
	mov	r5, #1
	b	.L1
.L8:
	mov	r2, r5
	ldr	r1, [r0]
	b	.L9
.L24:
	.align	2
.L23:
	.word	OCTEON_FEATURE_PKND
	.word	.LC1
	.word	.LC0
	.size	cvm_oct_check_rcv_error, .-cvm_oct_check_rcv_error
	.comm	OCTEON_FEATURE_PKND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
