	.file	"extr_e6060sw.c_e6060sw_setvgroup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	e6060sw_setvgroup, @function
e6060sw_setvgroup:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	device_get_softc@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR [rax]
	cmp	rax, QWORD PTR ETHERSWITCH_VLAN_PORT[rip]
	je	.L19
	cmp	rax, QWORD PTR ETHERSWITCH_VLAN_DOT1Q[rip]
	je	.L20
.L3:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L20:
	.cfi_restore_state
	mov	r9, QWORD PTR [r12]
	test	r9, r9
	je	.L3
	mov	edi, DWORD PTR 8[r12]
	mov	esi, DWORD PTR 12[r12]
	xor	eax, eax
	xor	r8d, r8d
	xor	edx, edx
	mov	ebx, 3
	mov	r11d, 14
	mov	r10d, 13
	and	esi, edi
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	cmp	eax, 3
	ja	.L5
	lea	ecx, 0[0+rax*4]
	mov	r14d, r10d
	sal	r14d, cl
	or	edx, r14d
.L13:
	add	eax, 1
.L12:
	bt	esi, eax
	jc	.L21
	bt	edi, eax
	jnc	.L8
	cmp	eax, 3
	ja	.L9
	lea	ecx, 0[0+rax*4]
	mov	r14d, r11d
	sal	r14d, cl
	or	edx, r14d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L19:
	mov	r14d, DWORD PTR PORT_VLAN_MAP[rip]
	mov	edi, ebp
	mov	r13, QWORD PTR CORE_REGISTER[rip]
	add	r13, QWORD PTR 8[rbx]
	add	r13, QWORD PTR [r12]
	call	device_get_parent@PLT
	mov	edx, r14d
	mov	rsi, r13
	mov	edi, eax
	call	MDIO_READREG@PLT
	mov	r13d, DWORD PTR 8[r12]
	mov	edi, ebp
	mov	r14d, DWORD PTR PORT_VLAN_MAP[rip]
	mov	rsi, QWORD PTR CORE_REGISTER[rip]
	and	eax, -64
	add	rsi, QWORD PTR 8[rbx]
	add	rsi, QWORD PTR [r12]
	or	r13d, eax
	mov	r12, rsi
	call	device_get_parent@PLT
	mov	ecx, r13d
	mov	edx, r14d
	mov	rsi, r12
	mov	edi, eax
	call	MDIO_WRITEREG@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L8:
	.cfi_restore_state
	cmp	eax, 3
	ja	.L10
	lea	ecx, 0[0+rax*4]
	mov	r14d, ebx
	sal	r14d, cl
	or	edx, r14d
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L5:
	lea	ecx, -16[0+rax*4]
	mov	r14d, r10d
	sal	r14d, cl
	or	r8d, r14d
.L7:
	cmp	eax, 5
	jne	.L13
	mov	edi, ebp
	mov	ecx, r8d
	mov	rsi, r9
	call	e6060sw_set_vtu@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L9:
	.cfi_restore_state
	lea	ecx, -16[0+rax*4]
	mov	r14d, r11d
	sal	r14d, cl
	or	r8d, r14d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L10:
	lea	ecx, -16[0+rax*4]
	mov	r14d, ebx
	sal	r14d, cl
	or	r8d, r14d
	jmp	.L7
	.cfi_endproc
.LFE0:
	.size	e6060sw_setvgroup, .-e6060sw_setvgroup
	.comm	PORT_VLAN_MAP,4,4
	.comm	ETHERSWITCH_VLAN_PORT,8,8
	.comm	ETHERSWITCH_VLAN_DOT1Q,8,8
	.comm	CORE_REGISTER,8,8
	.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_e6060sw.c_e6060sw_setvgroup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	e6060sw_setvgroup, %function
e6060sw_setvgroup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r1
	mov	r5, r0
	bl	device_get_softc
	ldr	r2, .L22
	ldr	r3, [r0]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L19
	ldr	r2, .L22+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L20
.L3:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	ldr	r1, [r6]
	cmp	r1, #0
	beq	.L3
	mov	ip, #0
	ldr	r4, [r6, #4]
	ldr	r0, [r6, #8]
	mov	r9, #3
	mov	r3, ip
	mov	r2, ip
	mov	r8, #14
	mov	r7, #13
	and	r0, r0, r4
	b	.L12
.L21:
	cmp	ip, #3
	lsl	lr, ip, #2
	bhi	.L5
	orr	r2, r2, r7, lsl lr
.L13:
	add	ip, ip, #1
.L12:
	asr	lr, r0, ip
	tst	lr, #1
	bne	.L21
	asr	lr, r4, ip
	tst	lr, #1
	lsl	lr, ip, #2
	beq	.L8
	cmp	ip, #3
	bhi	.L9
	orr	r2, r2, r8, lsl lr
	b	.L13
.L19:
	mov	r4, r0
	ldr	r8, .L22+8
	mov	r0, r5
	bl	device_get_parent
	ldr	r2, [r8]
	ldr	r3, [r4, #4]
	ldr	r1, [r6]
	ldr	r7, .L22+12
	add	r3, r3, r2
	add	r1, r3, r1
	ldr	r2, [r7]
	bl	MDIO_READREG
	ldr	r2, [r6, #4]
	bic	r3, r0, #63
	mov	r0, r5
	orr	r5, r3, r2
	bl	device_get_parent
	ldr	r3, [r4, #4]
	ldr	r1, [r8]
	ldr	ip, [r6]
	add	r1, r3, r1
	ldr	r2, [r7]
	mov	r3, r5
	add	r1, r1, ip
	bl	MDIO_WRITEREG
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L8:
	cmp	ip, #3
	bhi	.L10
	orr	r2, r2, r9, lsl lr
	b	.L13
.L5:
	sub	lr, lr, #16
	orr	r3, r3, r7, lsl lr
.L7:
	cmp	ip, #5
	bne	.L13
	mov	r0, r5
	bl	e6060sw_set_vtu
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L9:
	sub	lr, lr, #16
	orr	r3, r3, r8, lsl lr
	b	.L7
.L10:
	sub	lr, lr, #16
	orr	r3, r3, r9, lsl lr
	b	.L7
.L23:
	.align	2
.L22:
	.word	ETHERSWITCH_VLAN_PORT
	.word	ETHERSWITCH_VLAN_DOT1Q
	.word	CORE_REGISTER
	.word	PORT_VLAN_MAP
	.size	e6060sw_setvgroup, .-e6060sw_setvgroup
	.comm	PORT_VLAN_MAP,4,4
	.comm	ETHERSWITCH_VLAN_PORT,4,4
	.comm	ETHERSWITCH_VLAN_DOT1Q,4,4
	.comm	CORE_REGISTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
