	.file	"extr_mv88e1xxx.c_mv88e1xxx_downshift_set.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mv88e1xxx_downshift_set, @function
mv88e1xxx_downshift_set:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	ebx, esi
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR MV88E1XXX_EXT_PHY_SPECIFIC_CNTRL_REGISTER[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	lea	rdx, 4[rsp]
	call	simple_mdio_read@PLT
	mov	edi, DWORD PTR M_DOWNSHIFT_CNT[rip]
	call	V_DOWNSHIFT_CNT@PLT
	or	eax, DWORD PTR V_DOWNSHIFT_ENABLE[rip]
	mov	edx, eax
	not	edx
	and	edx, DWORD PTR 4[rsp]
	mov	DWORD PTR 4[rsp], edx
	test	ebx, ebx
	jne	.L9
.L2:
	mov	esi, DWORD PTR MV88E1XXX_EXT_PHY_SPECIFIC_CNTRL_REGISTER[rip]
	mov	rdi, rbp
	call	simple_mdio_write@PLT
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L10
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	edi, 2
	call	V_DOWNSHIFT_CNT@PLT
	mov	edx, DWORD PTR V_DOWNSHIFT_ENABLE[rip]
	or	edx, DWORD PTR 4[rsp]
	or	edx, eax
	mov	DWORD PTR 4[rsp], edx
	jmp	.L2
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mv88e1xxx_downshift_set, .-mv88e1xxx_downshift_set
	.comm	V_DOWNSHIFT_ENABLE,4,4
	.comm	M_DOWNSHIFT_CNT,4,4
	.comm	MV88E1XXX_EXT_PHY_SPECIFIC_CNTRL_REGISTER,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_mv88e1xxx.c_mv88e1xxx_downshift_set.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mv88e1xxx_downshift_set, %function
mv88e1xxx_downshift_set:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r6, .L11
	sub	sp, sp, #12
	ldr	r3, .L11+4
	mov	r2, sp
	mov	r5, r1
	ldr	r1, [r6]
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r4, r0
	bl	simple_mdio_read
	ldr	r3, .L11+8
	ldr	r7, .L11+12
	ldr	r0, [r3]
	bl	V_DOWNSHIFT_CNT
	ldr	r3, [r7]
	ldr	r2, [sp]
	orr	r0, r0, r3
	bic	r2, r2, r0
	cmp	r5, #0
	str	r2, [sp]
	bne	.L9
.L2:
	mov	r0, r4
	ldr	r1, [r6]
	bl	simple_mdio_write
	ldr	r3, .L11+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	mov	r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L9:
	mov	r0, #2
	bl	V_DOWNSHIFT_CNT
	ldr	r3, [sp]
	ldr	r2, [r7]
	orr	r2, r2, r3
	orr	r2, r2, r0
	str	r2, [sp]
	b	.L2
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	MV88E1XXX_EXT_PHY_SPECIFIC_CNTRL_REGISTER
	.word	.LC0
	.word	M_DOWNSHIFT_CNT
	.word	V_DOWNSHIFT_ENABLE
	.size	mv88e1xxx_downshift_set, .-mv88e1xxx_downshift_set
	.comm	V_DOWNSHIFT_ENABLE,4,4
	.comm	M_DOWNSHIFT_CNT,4,4
	.comm	MV88E1XXX_EXT_PHY_SPECIFIC_CNTRL_REGISTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
