	.file	"extr_ksz884x.c_netdev_set_pauseparam.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	netdev_set_pauseparam, @function
netdev_set_pauseparam:
.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
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	mov	rbp, QWORD PTR 16[rax]
	mov	r12, rax
	mov	rdi, rbp
	lea	r13, 8[rbp]
	call	mutex_lock@PLT
	cmp	QWORD PTR 8[rbx], 0
	je	.L2
	cmp	QWORD PTR [rbx], 0
	mov	eax, DWORD PTR PHY_FLOW_CTRL[rip]
	jne	.L4
	mov	eax, DWORD PTR PHY_NO_FLOW_CTRL[rip]
.L4:
	mov	DWORD PTR 8[r12], eax
	mov	eax, DWORD PTR PAUSE_FLOW_CTRL[rip]
	not	eax
	and	DWORD PTR 16[rbp], eax
	cmp	QWORD PTR 8[rbp], 0
	mov	QWORD PTR [r12], 0
	jne	.L10
.L5:
	mov	rdi, r12
	call	port_set_link_speed@PLT
.L6:
	mov	rdi, rbp
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR PAUSE_FLOW_CTRL[rip]
	or	DWORD PTR 16[rbp], eax
	cmp	QWORD PTR 8[rbp], 0
	mov	ecx, DWORD PTR [rbx]
	je	.L7
	mov	edx, DWORD PTR SWITCH_RX_FLOW_CTRL[rip]
	mov	esi, DWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	mov	rdi, r13
	call	sw_cfg@PLT
	mov	ecx, DWORD PTR 4[rbx]
	mov	edx, DWORD PTR SWITCH_TX_FLOW_CTRL[rip]
	mov	rdi, r13
	mov	esi, DWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	call	sw_cfg@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, DWORD PTR 4[rbx]
	mov	esi, ecx
	mov	rdi, r13
	call	set_flow_ctrl@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edx, DWORD PTR SWITCH_RX_FLOW_CTRL[rip]
	mov	esi, DWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	mov	rdi, r13
	mov	ecx, 1
	call	sw_cfg@PLT
	mov	edx, DWORD PTR SWITCH_TX_FLOW_CTRL[rip]
	mov	ecx, 1
	mov	rdi, r13
	mov	esi, DWORD PTR KS8842_SWITCH_CTRL_1_OFFSET[rip]
	call	sw_cfg@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	netdev_set_pauseparam, .-netdev_set_pauseparam
	.comm	SWITCH_TX_FLOW_CTRL,4,4
	.comm	SWITCH_RX_FLOW_CTRL,4,4
	.comm	PHY_NO_FLOW_CTRL,4,4
	.comm	PHY_FLOW_CTRL,4,4
	.comm	PAUSE_FLOW_CTRL,4,4
	.comm	KS8842_SWITCH_CTRL_1_OFFSET,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_netdev_set_pauseparam.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	netdev_set_pauseparam, %function
netdev_set_pauseparam:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	bl	netdev_priv
	ldr	r4, [r0, #8]
	mov	r6, r0
	mov	r0, r4
	bl	mutex_lock
	ldr	r3, [r5, #8]
	add	r7, r4, #4
	cmp	r3, #0
	beq	.L2
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L13
.L3:
	ldr	r3, .L15
	ldr	r1, [r3]
.L4:
	mov	r2, #0
	ldr	r3, .L15+4
	str	r1, [r6, #4]
	ldr	r0, [r3]
	ldmib	r4, {r1, r3}
	bic	r3, r3, r0
	cmp	r1, r2
	str	r3, [r4, #8]
	str	r2, [r6]
	bne	.L14
.L5:
	mov	r0, r6
	bl	port_set_link_speed
.L6:
	mov	r0, r4
	bl	mutex_unlock
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r2, .L15+4
	ldr	r3, [r4, #8]
	ldr	r1, [r2]
	ldr	r2, [r4, #4]
	orr	r3, r3, r1
	cmp	r2, #0
	str	r3, [r4, #8]
	ldr	r3, [r5]
	beq	.L7
	ldr	r6, .L15+8
	ldr	r2, .L15+12
	ldr	r1, [r6]
	mov	r0, r7
	ldr	r2, [r2]
	bl	sw_cfg
	ldr	r2, .L15+16
	mov	r0, r7
	ldr	r1, [r6]
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	bl	sw_cfg
	b	.L6
.L13:
	ldr	r3, [r5, #4]
	cmp	r3, #0
	bne	.L3
	ldr	r3, .L15+20
	ldr	r1, [r3]
	b	.L4
.L7:
	mov	r1, r3
	mov	r0, r7
	ldr	r2, [r5, #4]
	bl	set_flow_ctrl
	b	.L6
.L14:
	ldr	r5, .L15+8
	ldr	r3, .L15+12
	ldr	r1, [r5]
	ldr	r2, [r3]
	mov	r0, r7
	mov	r3, #1
	bl	sw_cfg
	ldr	r3, .L15+16
	mov	r0, r7
	ldr	r2, [r3]
	ldr	r1, [r5]
	mov	r3, #1
	bl	sw_cfg
	b	.L5
.L16:
	.align	2
.L15:
	.word	PHY_FLOW_CTRL
	.word	PAUSE_FLOW_CTRL
	.word	KS8842_SWITCH_CTRL_1_OFFSET
	.word	SWITCH_RX_FLOW_CTRL
	.word	SWITCH_TX_FLOW_CTRL
	.word	PHY_NO_FLOW_CTRL
	.size	netdev_set_pauseparam, .-netdev_set_pauseparam
	.comm	SWITCH_TX_FLOW_CTRL,4,4
	.comm	SWITCH_RX_FLOW_CTRL,4,4
	.comm	PHY_NO_FLOW_CTRL,4,4
	.comm	PHY_FLOW_CTRL,4,4
	.comm	PAUSE_FLOW_CTRL,4,4
	.comm	KS8842_SWITCH_CTRL_1_OFFSET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
