	.file	"extr_smc91x.c_smc_ethtool_set_link_ksettings.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	smc_ethtool_set_link_ksettings, @function
smc_ethtool_set_link_ksettings:
.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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	netdev_priv@PLT
	cmp	QWORD PTR [rax], 0
	mov	rbx, rax
	jne	.L9
	mov	rax, QWORD PTR AUTONEG_DISABLE[rip]
	cmp	QWORD PTR 0[rbp], rax
	je	.L10
.L4:
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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	rax, QWORD PTR SPEED_10[rip]
	cmp	QWORD PTR 8[rbp], rax
	jne	.L4
	mov	rax, QWORD PTR 16[rbp]
	cmp	rax, QWORD PTR DUPLEX_HALF[rip]
	je	.L5
	cmp	rax, QWORD PTR DUPLEX_FULL[rip]
	jne	.L4
.L5:
	mov	rdx, QWORD PTR 24[rbp]
	cmp	rdx, QWORD PTR PORT_TP[rip]
	je	.L6
	cmp	rdx, QWORD PTR PORT_AUI[rip]
	jne	.L4
.L6:
	cmp	QWORD PTR DUPLEX_FULL[rip], rax
	sete	al
	xor	r12d, r12d
	movzx	eax, al
	mov	DWORD PTR 8[rbx], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	lea	r13, 12[rax]
	mov	rdi, r13
	call	spin_lock_irq@PLT
	lea	rdi, 16[rbx]
	mov	rsi, rbp
	call	mii_ethtool_set_link_ksettings@PLT
	mov	rdi, r13
	mov	r12d, eax
	call	spin_unlock_irq@PLT
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
	.cfi_endproc
.LFE0:
	.size	smc_ethtool_set_link_ksettings, .-smc_ethtool_set_link_ksettings
	.comm	SPEED_10,8,8
	.comm	PORT_TP,8,8
	.comm	PORT_AUI,8,8
	.comm	EINVAL,4,4
	.comm	DUPLEX_HALF,8,8
	.comm	DUPLEX_FULL,8,8
	.comm	AUTONEG_DISABLE,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_smc91x.c_smc_ethtool_set_link_ksettings.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	smc_ethtool_set_link_ksettings, %function
smc_ethtool_set_link_ksettings:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	bl	netdev_priv
	ldr	r4, [r0]
	mov	r6, r0
	cmp	r4, #0
	bne	.L9
	ldr	r3, .L11
	ldr	r2, [r7]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L10
.L4:
	ldr	r3, .L11+4
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	ldr	r3, .L11+8
	ldr	r2, [r7, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r2, .L11+12
	ldr	r3, [r7, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L5
	ldr	r2, .L11+16
	ldr	r2, [r2]
	cmp	r3, r2
	bne	.L4
.L5:
	ldr	r1, .L11+20
	ldr	r2, [r7, #12]
	ldr	r1, [r1]
	cmp	r2, r1
	beq	.L6
	ldr	r1, .L11+24
	ldr	r1, [r1]
	cmp	r2, r1
	bne	.L4
.L6:
	ldr	r2, .L11+16
	ldr	r2, [r2]
	sub	r3, r2, r3
	clz	r3, r3
	lsr	r3, r3, #5
	str	r3, [r6, #4]
	b	.L1
.L9:
	add	r5, r0, #8
	mov	r0, r5
	bl	spin_lock_irq
	mov	r1, r7
	add	r0, r6, #12
	bl	mii_ethtool_set_link_ksettings
	mov	r4, r0
	mov	r0, r5
	bl	spin_unlock_irq
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	.align	2
.L11:
	.word	AUTONEG_DISABLE
	.word	EINVAL
	.word	SPEED_10
	.word	DUPLEX_HALF
	.word	DUPLEX_FULL
	.word	PORT_TP
	.word	PORT_AUI
	.size	smc_ethtool_set_link_ksettings, .-smc_ethtool_set_link_ksettings
	.comm	SPEED_10,4,4
	.comm	PORT_TP,4,4
	.comm	PORT_AUI,4,4
	.comm	EINVAL,4,4
	.comm	DUPLEX_HALF,4,4
	.comm	DUPLEX_FULL,4,4
	.comm	AUTONEG_DISABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
