	.file	"extr_mv88e6060.c_mv88e6060_setup_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mv88e6060_setup_port, @function
mv88e6060_setup_port:
.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
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	mov	edi, esi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	REG_PORT@PLT
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, r12d
	mov	r13d, eax
	call	dsa_is_cpu_port@PLT
	mov	ecx, DWORD PTR PORT_CONTROL_STATE_FORWARDING[rip]
	test	rax, rax
	je	.L3
	mov	ecx, DWORD PTR PORT_CONTROL_TRAILER[rip]
	or	ecx, DWORD PTR PORT_CONTROL_INGRESS_MODE[rip]
	or	ecx, DWORD PTR PORT_CONTROL_STATE_FORWARDING[rip]
.L3:
	mov	edx, DWORD PTR PORT_CONTROL[rip]
	mov	esi, r13d
	mov	rdi, rbp
	call	reg_write@PLT
	test	eax, eax
	je	.L10
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.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
.L10:
	.cfi_restore_state
	mov	ecx, DWORD PTR PORT_VLAN_MAP_DBNUM_SHIFT[rip]
	mov	ebx, r12d
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, r12d
	and	ebx, 15
	sal	ebx, cl
	call	dsa_is_cpu_port@PLT
	test	rax, rax
	je	.L5
	mov	edi, DWORD PTR 0[rbp]
	call	dsa_user_ports@PLT
	mov	ecx, eax
.L6:
	mov	edx, DWORD PTR PORT_VLAN_MAP[rip]
	or	ecx, ebx
	mov	esi, r13d
	mov	rdi, rbp
	call	reg_write@PLT
	test	eax, eax
	jne	.L1
	mov	edi, r12d
	call	BIT@PLT
	mov	edx, DWORD PTR PORT_ASSOC_VECTOR[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	esi, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	rdi, rbp
	mov	ecx, eax
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	reg_write@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edi, DWORD PTR 0[rbp]
	mov	esi, r12d
	call	dsa_to_port@PLT
	mov	rax, QWORD PTR [rax]
	mov	edi, DWORD PTR [rax]
	call	BIT@PLT
	mov	ecx, eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	mv88e6060_setup_port, .-mv88e6060_setup_port
	.comm	PORT_VLAN_MAP_DBNUM_SHIFT,4,4
	.comm	PORT_VLAN_MAP,4,4
	.comm	PORT_CONTROL_TRAILER,4,4
	.comm	PORT_CONTROL_STATE_FORWARDING,4,4
	.comm	PORT_CONTROL_INGRESS_MODE,4,4
	.comm	PORT_CONTROL,4,4
	.comm	PORT_ASSOC_VECTOR,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_mv88e6060.c_mv88e6060_setup_port.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mv88e6060_setup_port, %function
mv88e6060_setup_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r5, r1
	bl	REG_PORT
	ldr	r3, .L9
	mov	r1, r5
	mov	r6, r0
	ldr	r0, [r4]
	ldr	r7, [r3]
	bl	dsa_is_cpu_port
	cmp	r0, #0
	ldrne	r3, .L9+4
	ldrne	r1, .L9+8
	ldrne	r2, .L9+12
	ldrne	r3, [r3]
	ldrne	r1, [r1]
	ldrne	r2, [r2]
	ldreq	r3, .L9+12
	orrne	r3, r3, r1
	orrne	r3, r3, r2
	ldreq	r3, [r3]
	mov	r2, r7
	mov	r1, r6
	mov	r0, r4
	bl	reg_write
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L9+16
	ldr	r3, .L9+20
	ldr	r2, [r2]
	mov	r1, r5
	ldr	r0, [r4]
	and	r7, r5, #15
	ldr	r8, [r3]
	lsl	r7, r7, r2
	bl	dsa_is_cpu_port
	cmp	r0, #0
	beq	.L5
	ldr	r0, [r4]
	bl	dsa_user_ports
.L6:
	orr	r3, r7, r0
	mov	r2, r8
	mov	r1, r6
	mov	r0, r4
	bl	reg_write
	cmp	r0, #0
	popne	{r4, r5, r6, r7, r8, pc}
	ldr	r3, .L9+24
	mov	r0, r5
	ldr	r5, [r3]
	bl	BIT
	mov	r2, r5
	mov	r3, r0
	mov	r1, r6
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, lr}
	b	reg_write
.L5:
	mov	r1, r5
	ldr	r0, [r4]
	bl	dsa_to_port
	ldr	r3, [r0]
	ldr	r0, [r3]
	bl	BIT
	b	.L6
.L10:
	.align	2
.L9:
	.word	PORT_CONTROL
	.word	PORT_CONTROL_TRAILER
	.word	PORT_CONTROL_INGRESS_MODE
	.word	PORT_CONTROL_STATE_FORWARDING
	.word	PORT_VLAN_MAP_DBNUM_SHIFT
	.word	PORT_VLAN_MAP
	.word	PORT_ASSOC_VECTOR
	.size	mv88e6060_setup_port, .-mv88e6060_setup_port
	.comm	PORT_VLAN_MAP_DBNUM_SHIFT,4,4
	.comm	PORT_VLAN_MAP,4,4
	.comm	PORT_CONTROL_TRAILER,4,4
	.comm	PORT_CONTROL_STATE_FORWARDING,4,4
	.comm	PORT_CONTROL_INGRESS_MODE,4,4
	.comm	PORT_CONTROL,4,4
	.comm	PORT_ASSOC_VECTOR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
