	.file	"extr_sja1105_main.c_sja1105pqrs_fdb_add.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"FDB is full, cannot add entry.\n"
	.text
	.p2align 4
	.globl	sja1105pqrs_fdb_add
	.type	sja1105pqrs_fdb_add, @function
sja1105pqrs_fdb_add:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pxor	xmm0, xmm0
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	mov	rdi, rdx
	sub	rsp, 64
	.cfi_def_cfa_offset 112
	mov	rbp, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR [rsp], xmm0
	movaps	XMMWORD PTR 16[rsp], xmm0
	movaps	XMMWORD PTR 32[rsp], xmm0
	call	ether_addr_to_u64@PLT
	xor	esi, esi
	mov	DWORD PTR 32[rsp], r12d
	mov	DWORD PTR 36[rsp], eax
	mov	eax, DWORD PTR SJA1105_S_TAG[rip]
	mov	DWORD PTR 28[rsp], eax
	mov	eax, DWORD PTR ETH_ALEN[rip]
	lea	edi, -1[0+rax*8]
	call	GENMASK_ULL@PLT
	movsx	rdx, r13d
	mov	DWORD PTR 24[rsp], eax
	mov	rax, QWORD PTR 8[rbx]
	lea	rdi, [rax+rdx*4]
	call	dsa_port_is_vlan_filtering@PLT
	test	rax, rax
	jne	.L17
	mov	QWORD PTR 16[rsp], 0
	mov	DWORD PTR [rsp], 0
.L3:
	mov	edi, r13d
	mov	r14, rsp
	call	BIT@PLT
	mov	edx, DWORD PTR SJA1105_SEARCH[rip]
	mov	rcx, r14
	mov	rdi, rbp
	mov	esi, DWORD PTR BLK_IDX_L2_LOOKUP[rip]
	mov	DWORD PTR 4[rsp], eax
	call	sja1105_dynamic_config_read@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L4
	mov	eax, DWORD PTR SJA1105_MAX_L2_LOOKUP_COUNT[rip]
	xor	r12d, r12d
	test	eax, eax
	jg	.L5
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR SJA1105_MAX_L2_LOOKUP_COUNT[rip]
	add	r12d, 1
	cmp	eax, r12d
	jle	.L6
.L5:
	mov	esi, DWORD PTR BLK_IDX_L2_LOOKUP[rip]
	xor	ecx, ecx
	mov	edx, r12d
	mov	rdi, rbp
	call	sja1105_dynamic_config_read@PLT
	test	eax, eax
	jns	.L9
	mov	eax, DWORD PTR SJA1105_MAX_L2_LOOKUP_COUNT[rip]
.L6:
	cmp	eax, r12d
	je	.L18
	mov	DWORD PTR 8[rsp], 1
	mov	DWORD PTR 12[rsp], r12d
.L8:
	mov	esi, DWORD PTR BLK_IDX_L2_LOOKUP[rip]
	mov	edx, r12d
	mov	rcx, r14
	mov	rdi, rbp
	mov	r8d, 1
	call	sja1105_dynamic_config_write@PLT
	mov	r12d, eax
	test	eax, eax
	js	.L1
	mov	ecx, 1
	mov	rdx, r14
	mov	esi, r13d
	mov	rdi, rbp
	call	sja1105_static_fdb_change@PLT
	mov	r12d, eax
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	mov	ebx, DWORD PTR 4[rsp]
	mov	edi, r13d
	call	BIT@PLT
	test	ebx, eax
	jne	.L1
	mov	edi, r13d
	call	BIT@PLT
	mov	r12d, DWORD PTR 12[rsp]
	or	DWORD PTR 4[rsp], eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rax, QWORD PTR VLAN_VID_MASK[rip]
	xor	edi, edi
	mov	QWORD PTR 16[rsp], rax
	call	BIT@PLT
	mov	DWORD PTR [rsp], eax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sja1105pqrs_fdb_add, .-sja1105pqrs_fdb_add
	.comm	VLAN_VID_MASK,8,8
	.comm	SJA1105_S_TAG,4,4
	.comm	SJA1105_SEARCH,4,4
	.comm	SJA1105_MAX_L2_LOOKUP_COUNT,4,4
	.comm	ETH_ALEN,4,4
	.comm	EINVAL,4,4
	.comm	BLK_IDX_L2_LOOKUP,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_sja1105_main.c_sja1105pqrs_fdb_add.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"FDB is full, cannot add entry.\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sja1105pqrs_fdb_add
	.syntax unified
	.arm
	.fpu softvfp
	.type	sja1105pqrs_fdb_add, %function
sja1105pqrs_fdb_add:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, r2
	mov	r8, r0
	sub	sp, sp, #60
	mov	r4, r3
	ldr	r3, .L19
	mov	r2, #40
	mov	r7, r1
	add	r0, sp, #12
	mov	r1, #0
	ldr	r3, [r3]
	str	r3, [sp, #52]
	mov	r3,#0
	bl	memset
	mov	r0, r5
	ldr	r5, [r8, #8]
	bl	ether_addr_to_u64
	mov	r2, r0
	ldr	r1, .L19+4
	ldr	r3, .L19+8
	ldr	r0, [r1]
	ldr	r3, [r3]
	lsl	r0, r0, #3
	mov	r1, #0
	sub	r0, r0, #1
	str	r2, [sp, #44]
	str	r3, [sp, #36]
	str	r4, [sp, #40]
	bl	GENMASK_ULL
	ldr	r3, [r8, #4]
	str	r0, [sp, #32]
	add	r0, r3, r7, lsl #2
	bl	dsa_port_is_vlan_filtering
	cmp	r0, #0
	streq	r0, [sp, #28]
	streq	r0, [sp, #12]
	bne	.L16
.L3:
	mov	r0, r7
	bl	BIT
	mov	ip, r0
	ldr	r3, .L19+12
	ldr	r6, .L19+16
	ldr	r2, [r3]
	mov	r0, r5
	ldr	r1, [r6]
	add	r3, sp, #12
	str	ip, [sp, #16]
	bl	sja1105_dynamic_config_read
	subs	r4, r0, #0
	beq	.L4
	ldr	r9, .L19+20
	mov	r4, #0
	ldr	r3, [r9]
	cmp	r3, #0
	bgt	.L5
	b	.L6
.L9:
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L6
.L5:
	mov	r3, #0
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r6]
	bl	sja1105_dynamic_config_read
	cmp	r0, #0
	ldr	r3, [r9]
	bge	.L9
.L6:
	cmp	r3, r4
	movne	r3, #1
	strne	r4, [sp, #24]
	strne	r3, [sp, #20]
	beq	.L17
.L8:
	mov	r8, #1
	mov	r2, r4
	mov	r0, r5
	ldr	r1, [r6]
	str	r8, [sp]
	add	r3, sp, #12
	bl	sja1105_dynamic_config_write
	subs	r4, r0, #0
	blt	.L1
	mov	r3, r8
	mov	r1, r7
	mov	r0, r5
	add	r2, sp, #12
	bl	sja1105_static_fdb_change
	mov	r4, r0
.L1:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	mov	r0, r7
	ldr	r8, [sp, #16]
	bl	BIT
	tst	r8, r0
	bne	.L1
	mov	r0, r7
	bl	BIT
	ldr	r3, [sp, #16]
	ldr	r4, [sp, #24]
	orr	r3, r3, r0
	str	r3, [sp, #16]
	b	.L8
.L16:
	ldr	r3, .L19+24
	mov	r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #28]
	bl	BIT
	str	r0, [sp, #12]
	b	.L3
.L17:
	ldr	r0, [r8]
	ldr	r1, .L19+28
	bl	dev_err
	ldr	r3, .L19+32
	ldr	r4, [r3]
	rsb	r4, r4, #0
	b	.L1
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	.LC1
	.word	ETH_ALEN
	.word	SJA1105_S_TAG
	.word	SJA1105_SEARCH
	.word	BLK_IDX_L2_LOOKUP
	.word	SJA1105_MAX_L2_LOOKUP_COUNT
	.word	VLAN_VID_MASK
	.word	.LC0
	.word	EINVAL
	.size	sja1105pqrs_fdb_add, .-sja1105pqrs_fdb_add
	.comm	VLAN_VID_MASK,4,4
	.comm	SJA1105_S_TAG,4,4
	.comm	SJA1105_SEARCH,4,4
	.comm	SJA1105_MAX_L2_LOOKUP_COUNT,4,4
	.comm	ETH_ALEN,4,4
	.comm	EINVAL,4,4
	.comm	BLK_IDX_L2_LOOKUP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
