	.file	"extr_tag_8021q.c_dsa_port_setup_8021q_tagging.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to apply RX VID %d to port %d: %d\n"
	.align 8
.LC1:
	.string	"Failed to apply TX VID %d on port %d: %d\n"
	.text
	.p2align 4
	.globl	dsa_port_setup_8021q_tagging
	.type	dsa_port_setup_8021q_tagging, @function
dsa_port_setup_8021q_tagging:
.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, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	dsa_upstream_port@PLT
	mov	esi, r12d
	mov	rdi, r15
	mov	r13d, eax
	call	dsa_8021q_rx_vid@PLT
	mov	esi, r12d
	mov	rdi, r15
	mov	r14d, eax
	call	dsa_8021q_tx_vid@PLT
	mov	esi, r12d
	mov	rdi, r15
	mov	DWORD PTR 8[rsp], eax
	call	dsa_is_user_port@PLT
	test	eax, eax
	je	.L12
	mov	eax, DWORD PTR [r15]
	xor	ebx, ebx
	test	eax, eax
	jle	.L9
	.p2align 4,,10
	.p2align 3
.L4:
	cmp	r13d, ebx
	je	.L7
	mov	ecx, DWORD PTR BRIDGE_VLAN_INFO_UNTAGGED[rip]
	cmp	r12d, ebx
	jne	.L8
	or	ecx, DWORD PTR BRIDGE_VLAN_INFO_PVID[rip]
.L8:
	mov	r8d, ebp
	mov	edx, r14d
	mov	esi, ebx
	mov	rdi, r15
	call	dsa_8021q_vid_apply@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L5
.L7:
	add	ebx, 1
	cmp	DWORD PTR [r15], ebx
	jg	.L4
.L9:
	mov	r8d, ebp
	xor	ecx, ecx
	mov	edx, r14d
	mov	esi, r13d
	mov	rdi, r15
	call	dsa_8021q_vid_apply@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L5
	mov	ecx, DWORD PTR BRIDGE_VLAN_INFO_UNTAGGED[rip]
	mov	edx, DWORD PTR 8[rsp]
	mov	r8d, ebp
	mov	esi, r12d
	mov	rdi, r15
	call	dsa_8021q_vid_apply@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L22
	mov	edx, DWORD PTR 8[rsp]
	mov	r8d, ebp
	xor	ecx, ecx
	mov	esi, r13d
	mov	rdi, r15
	call	dsa_8021q_vid_apply@PLT
	mov	r8d, eax
	test	eax, eax
	jne	.L23
	test	ebp, ebp
	je	.L24
.L12:
	xor	r8d, r8d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[r15]
	mov	ecx, r12d
	mov	edx, r14d
	mov	DWORD PTR 8[rsp], r8d
	lea	rsi, .LC0[rip]
	call	dev_err@PLT
	mov	r8d, DWORD PTR 8[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edi, DWORD PTR 4[r15]
	mov	edx, DWORD PTR 8[rsp]
	mov	ecx, r12d
	mov	DWORD PTR 12[rsp], eax
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
.L24:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	esi, r12d
	mov	rdi, r15
	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
	jmp	dsa_8021q_restore_pvid@PLT
.L23:
	.cfi_restore_state
	mov	edi, DWORD PTR 4[r15]
	mov	edx, DWORD PTR 8[rsp]
	mov	ecx, r13d
	mov	DWORD PTR 12[rsp], eax
	lea	rsi, .LC1[rip]
	call	dev_err@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	dsa_port_setup_8021q_tagging, .-dsa_port_setup_8021q_tagging
	.comm	BRIDGE_VLAN_INFO_UNTAGGED,4,4
	.comm	BRIDGE_VLAN_INFO_PVID,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_tag_8021q.c_dsa_port_setup_8021q_tagging.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to apply RX VID %d to port %d: %d\012\000"
	.align	2
.LC1:
	.ascii	"Failed to apply TX VID %d on port %d: %d\012\000"
	.text
	.align	2
	.global	dsa_port_setup_8021q_tagging
	.syntax unified
	.arm
	.fpu softvfp
	.type	dsa_port_setup_8021q_tagging, %function
dsa_port_setup_8021q_tagging:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #20
	mov	r6, r0
	mov	r7, r1
	mov	r9, r2
	bl	dsa_upstream_port
	mov	r1, r7
	mov	r8, r0
	mov	r0, r6
	bl	dsa_8021q_rx_vid
	mov	r1, r7
	mov	r10, r0
	mov	r0, r6
	bl	dsa_8021q_tx_vid
	mov	r3, r0
	mov	r1, r7
	mov	r0, r6
	str	r3, [sp, #12]
	bl	dsa_is_user_port
	cmp	r0, #0
	beq	.L12
	ldr	r3, [r6]
	cmp	r3, #0
	movgt	r4, #0
	ldrgt	fp, .L24
	ble	.L9
.L4:
	cmp	r8, r4
	beq	.L7
	cmp	r7, r4
	ldreq	ip, .L24+4
	ldr	r3, [fp]
	ldreq	ip, [ip]
	mov	r2, r10
	orreq	r3, r3, ip
	mov	r1, r4
	mov	r0, r6
	str	r9, [sp]
	bl	dsa_8021q_vid_apply
	cmp	r0, #0
	bne	.L18
	ldr	r3, [r6]
.L7:
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L4
.L9:
	mov	r3, #0
	mov	r2, r10
	mov	r1, r8
	mov	r0, r6
	str	r9, [sp]
	bl	dsa_8021q_vid_apply
	subs	r5, r0, #0
	bne	.L5
	ldr	r3, .L24
	str	r9, [sp]
	mov	r1, r7
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r2, [sp, #12]
	bl	dsa_8021q_vid_apply
	subs	r5, r0, #0
	bne	.L21
	mov	r3, r5
	mov	r1, r8
	mov	r0, r6
	ldr	r2, [sp, #12]
	str	r9, [sp]
	bl	dsa_8021q_vid_apply
	subs	r5, r0, #0
	bne	.L22
	cmp	r9, #0
	beq	.L23
.L12:
	mov	r5, #0
.L1:
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r5, r0
.L5:
	str	r5, [sp]
	mov	r3, r7
	mov	r2, r10
	ldr	r0, [r6, #4]
	ldr	r1, .L24+8
	bl	dev_err
	mov	r0, r5
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	str	r5, [sp]
	mov	r3, r7
	ldr	r2, [sp, #12]
	ldr	r0, [r6, #4]
	ldr	r1, .L24+12
	bl	dev_err
	b	.L1
.L23:
	mov	r1, r7
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	dsa_8021q_restore_pvid
.L22:
	str	r5, [sp]
	mov	r3, r8
	ldr	r2, [sp, #12]
	ldr	r0, [r6, #4]
	ldr	r1, .L24+12
	bl	dev_err
	b	.L1
.L25:
	.align	2
.L24:
	.word	BRIDGE_VLAN_INFO_UNTAGGED
	.word	BRIDGE_VLAN_INFO_PVID
	.word	.LC0
	.word	.LC1
	.size	dsa_port_setup_8021q_tagging, .-dsa_port_setup_8021q_tagging
	.comm	BRIDGE_VLAN_INFO_UNTAGGED,4,4
	.comm	BRIDGE_VLAN_INFO_PVID,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
