	.file	"extr_ksz884x.c_sw_set_global_ctrl.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sw_set_global_ctrl, @function
sw_set_global_ctrl:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rbx, rdi
	mov	rdi, QWORD PTR KS8842_SWITCH_CTRL_3_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readw@PLT
	or	eax, DWORD PTR SWITCH_FLOW_CTRL[rip]
	mov	rsi, QWORD PTR KS8842_SWITCH_CTRL_3_OFFSET[rip]
	mov	edi, eax
	add	rsi, QWORD PTR 8[rbx]
	call	writew@PLT
	mov	rdi, QWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readw@PLT
	mov	edi, DWORD PTR SWITCH_AGGR_BACKOFF[rip]
	or	edi, DWORD PTR SWITCH_AGING_ENABLE[rip]
	or	edi, DWORD PTR SWITCH_LINK_AUTO_AGING[rip]
	or	edi, eax
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR FAST_AGING[rip], eax
	je	.L2
	or	edi, DWORD PTR SWITCH_FAST_AGING[rip]
.L3:
	mov	rsi, QWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	add	rsi, QWORD PTR 8[rbx]
	call	writew@PLT
	mov	rdi, QWORD PTR KS8842_SWITCH_CTRL_2_OFFSET[rip]
	add	rdi, QWORD PTR 8[rbx]
	call	readw@PLT
	or	eax, DWORD PTR NO_EXC_COLLISION_DROP[rip]
	mov	rsi, QWORD PTR KS8842_SWITCH_CTRL_2_OFFSET[rip]
	mov	edi, eax
	add	rsi, QWORD PTR 8[rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	writew@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR SWITCH_FAST_AGING[rip]
	not	eax
	and	edi, eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	sw_set_global_ctrl, .-sw_set_global_ctrl
	.comm	SWITCH_LINK_AUTO_AGING,4,4
	.comm	SWITCH_FLOW_CTRL,4,4
	.comm	SWITCH_FAST_AGING,4,4
	.comm	SWITCH_AGING_ENABLE,4,4
	.comm	SWITCH_AGGR_BACKOFF,4,4
	.comm	NO_EXC_COLLISION_DROP,4,4
	.comm	KS8842_SWITCH_CTRL_3_OFFSET,8,8
	.comm	KS8842_SWITCH_CTRL_2_OFFSET,8,8
	.comm	KS8842_SWITCH_CTRL_1_OFFSET,8,8
	.comm	FAST_AGING,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_ksz884x.c_sw_set_global_ctrl.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sw_set_global_ctrl, %function
sw_set_global_ctrl:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, .L6
	mov	r4, r0
	ldr	r3, [r6]
	ldr	r0, [r0, #4]
	ldr	r5, .L6+4
	add	r0, r0, r3
	bl	readw
	ldr	r3, .L6+8
	ldr	r2, [r6]
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	add	r1, r1, r2
	orr	r0, r0, r3
	bl	writew
	ldr	r3, [r5]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readw
	ldr	r2, .L6+12
	ldr	r3, .L6+16
	ldr	r1, .L6+20
	ldr	ip, [r2]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, ip
	orr	r3, r3, r1
	ldr	r2, .L6+24
	orr	r0, r3, r0
	ldr	r3, .L6+28
	ldr	r2, [r2]
	ldr	r1, [r4]
	ldr	r3, [r3]
	tst	r1, r2
	orrne	r0, r0, r3
	ldr	r1, [r4, #4]
	biceq	r0, r0, r3
	ldr	r3, [r5]
	ldr	r5, .L6+32
	add	r1, r1, r3
	bl	writew
	ldr	r3, [r5]
	ldr	r0, [r4, #4]
	add	r0, r0, r3
	bl	readw
	ldr	r3, .L6+36
	ldr	r2, [r5]
	ldr	r1, [r4, #4]
	ldr	r3, [r3]
	add	r1, r1, r2
	orr	r0, r0, r3
	pop	{r4, r5, r6, lr}
	b	writew
.L7:
	.align	2
.L6:
	.word	KS8842_SWITCH_CTRL_3_OFFSET
	.word	KS8842_SWITCH_CTRL_1_OFFSET
	.word	SWITCH_FLOW_CTRL
	.word	SWITCH_AGING_ENABLE
	.word	SWITCH_AGGR_BACKOFF
	.word	SWITCH_LINK_AUTO_AGING
	.word	FAST_AGING
	.word	SWITCH_FAST_AGING
	.word	KS8842_SWITCH_CTRL_2_OFFSET
	.word	NO_EXC_COLLISION_DROP
	.size	sw_set_global_ctrl, .-sw_set_global_ctrl
	.comm	SWITCH_LINK_AUTO_AGING,4,4
	.comm	SWITCH_FLOW_CTRL,4,4
	.comm	SWITCH_FAST_AGING,4,4
	.comm	SWITCH_AGING_ENABLE,4,4
	.comm	SWITCH_AGGR_BACKOFF,4,4
	.comm	NO_EXC_COLLISION_DROP,4,4
	.comm	KS8842_SWITCH_CTRL_3_OFFSET,4,4
	.comm	KS8842_SWITCH_CTRL_2_OFFSET,4,4
	.comm	KS8842_SWITCH_CTRL_1_OFFSET,4,4
	.comm	FAST_AGING,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
