	.file	"extr_psb6970.c_psb6970_set_ports.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	psb6970_set_ports, @function
psb6970_set_ports:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	call	to_psb6970@PLT
	mov	rdx, QWORD PTR [rbx]
	mov	r11, QWORD PTR [rax]
	lea	rbp, [r11+rdx*4]
	mov	DWORD PTR 0[rbp], 0
	mov	ecx, DWORD PTR 8[rbx]
	test	ecx, ecx
	jle	.L11
	mov	r10, QWORD PTR 16[rbx]
	xor	r8d, r8d
	mov	r9d, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	or	edx, edi
	mov	DWORD PTR 8[rax], edx
.L4:
	or	DWORD PTR 0[rbp], edi
	add	r8, 1
	cmp	DWORD PTR 8[rbx], r8d
	jle	.L11
.L7:
	mov	ecx, DWORD PTR 4[r10+r8*8]
	mov	esi, DWORD PTR SWITCH_PORT_FLAG_TAGGED[rip]
	mov	edi, r9d
	mov	r14d, DWORD PTR [r10+r8*8]
	mov	edx, DWORD PTR 8[rax]
	sal	edi, cl
	bt	r14d, esi
	jc	.L14
	mov	esi, edi
	mov	r14, QWORD PTR [rbx]
	not	esi
	and	edx, esi
	mov	rsi, QWORD PTR 16[rax]
	mov	DWORD PTR 8[rax], edx
	movsx	rdx, ecx
	mov	QWORD PTR [rsi+rdx*8], r14
	mov	edx, DWORD PTR PSB6970_MAX_VLANS[rip]
	test	edx, edx
	jle	.L4
	mov	rsi, QWORD PTR [rbx]
	xor	edx, edx
	.p2align 4,,10
	.p2align 3
.L6:
	mov	edi, r9d
	sal	edi, cl
	cmp	rsi, rdx
	je	.L5
	not	edi
	and	DWORD PTR [r11+rdx*4], edi
	mov	ecx, DWORD PTR 4[r10+r8*8]
	mov	edi, r9d
	sal	edi, cl
.L5:
	add	rdx, 1
	cmp	DWORD PTR PSB6970_MAX_VLANS[rip], edx
	jg	.L6
	or	DWORD PTR 0[rbp], edi
	add	r8, 1
	cmp	DWORD PTR 8[rbx], r8d
	jg	.L7
.L11:
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	psb6970_set_ports, .-psb6970_set_ports
	.comm	SWITCH_PORT_FLAG_TAGGED,4,4
	.comm	PSB6970_MAX_VLANS,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_psb6970.c_psb6970_set_ports.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	psb6970_set_ports, %function
psb6970_set_ports:
	@ 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, #12
	mov	r9, r1
	bl	to_psb6970
	mov	lr, #0
	ldr	r6, [r0]
	ldr	r1, [r9]
	str	lr, [r6, r1, lsl #2]
	ldr	r3, [r9, #4]
	add	r1, r6, r1, lsl #2
	cmp	r3, lr
	ble	.L11
	ldr	fp, [r9, #8]
	mov	r4, #1
	ldr	r8, .L15
	add	r7, fp, #4
	b	.L7
.L14:
	orr	r5, r5, r2
	str	r5, [r0, #4]
.L4:
	ldr	r3, [r1]
	add	lr, lr, #1
	orr	r2, r3, r2
	str	r2, [r1]
	ldr	r3, [r9, #4]
	cmp	r3, lr
	ble	.L11
.L7:
	ldr	r2, .L15+4
	ldr	r3, [fp, lr, lsl #3]
	ldr	r2, [r2]
	ldr	ip, [r7, lr, lsl #3]
	asr	r3, r3, r2
	ands	r3, r3, #1
	ldr	r5, [r0, #4]
	lsl	r2, r4, ip
	bne	.L14
	bic	r5, r5, r2
	str	r5, [sp, #4]
	ldr	r5, [r8]
	ldr	r10, [r9]
	cmp	r5, #0
	ldr	r5, [sp, #4]
	str	r5, [r0, #4]
	ldr	r5, [r0, #8]
	str	r10, [r5, ip, lsl #2]
	ble	.L4
	ldr	r5, [r9]
.L6:
	cmp	r5, r3
	lsl	r2, r4, ip
	ldrne	ip, [r6, r3, lsl #2]
	bicne	r2, ip, r2
	strne	r2, [r6, r3, lsl #2]
	ldrne	ip, [r7, lr, lsl #3]
	ldr	r10, [r8]
	add	r3, r3, #1
	lslne	r2, r4, ip
	cmp	r10, r3
	bgt	.L6
	b	.L4
.L11:
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	PSB6970_MAX_VLANS
	.word	SWITCH_PORT_FLAG_TAGGED
	.size	psb6970_set_ports, .-psb6970_set_ports
	.comm	SWITCH_PORT_FLAG_TAGGED,4,4
	.comm	PSB6970_MAX_VLANS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
