	.file	"extr_mvmdio.c_orion_mdio_wait_ready.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Timeout: SMI busy for too long\n"
	.text
	.p2align 4
	.type	orion_mdio_wait_ready, @function
orion_mdio_wait_ready:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, 2
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	xor	r13d, r13d
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR MVMDIO_SMI_TIMEOUT[rip]
	mov	rbx, QWORD PTR 8[rsi]
	mov	QWORD PTR 8[rsp], rsi
	call	usecs_to_jiffies@PLT
	mov	r15, QWORD PTR jiffies[rip]
	mov	rbp, rax
	add	r15, rax
.L2:
	mov	rdi, rbx
	call	[QWORD PTR [r12]]
	test	rax, rax
	jne	.L7
.L11:
	test	r13d, r13d
	jne	.L4
	cmp	QWORD PTR [rbx], 0
	jle	.L10
	cmp	rbp, 2
	mov	rdi, rbx
	mov	r13d, 1
	cmovb	rbp, r14
	call	[QWORD PTR [r12]]
	mov	edi, DWORD PTR 8[rbx]
	mov	rsi, rax
	mov	rdx, rbp
	call	wait_event_timeout@PLT
	mov	rdi, rbx
	call	[QWORD PTR [r12]]
	test	rax, rax
	je	.L11
.L7:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[r12]
	mov	edi, DWORD PTR 12[r12]
	xor	r13d, r13d
	call	usleep_range@PLT
	mov	rdi, r15
	call	time_is_before_jiffies@PLT
	test	rax, rax
	setne	r13b
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 8[rsp]
	lea	rsi, .LC0[rip]
	mov	edi, DWORD PTR [rax]
	call	dev_err@PLT
	mov	eax, DWORD PTR ETIMEDOUT[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	orion_mdio_wait_ready, .-orion_mdio_wait_ready
	.comm	jiffies,8,8
	.comm	MVMDIO_SMI_TIMEOUT,4,4
	.comm	ETIMEDOUT,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_mvmdio.c_orion_mdio_wait_ready.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Timeout: SMI busy for too long\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	orion_mdio_wait_ready, %function
orion_mdio_wait_ready:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L11
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r0
	ldr	r0, [r3]
	mov	r9, r1
	ldr	r4, [r1, #4]
	bl	usecs_to_jiffies
	mov	r7, #0
	mov	r5, r0
	ldr	r3, .L11+4
	ldr	r8, [r3]
	add	r8, r0, r8
.L2:
	mov	r0, r4
	ldr	r3, [r6]
	blx	r3
	cmp	r0, #0
	bne	.L7
	cmp	r7, #0
	bne	.L4
	ldr	r3, [r4]
	cmp	r3, #0
	ble	.L10
	cmp	r5, #2
	ldr	r3, [r6]
	mov	r0, r4
	movcc	r5, #2
	ldr	r7, [r4, #4]
	blx	r3
	mov	r2, r5
	mov	r1, r0
	mov	r0, r7
	bl	wait_event_timeout
	mov	r7, #1
	b	.L2
.L10:
	ldr	r1, [r6, #4]
	ldr	r0, [r6, #8]
	bl	usleep_range
	mov	r0, r8
	bl	time_is_before_jiffies
	subs	r7, r0, #0
	movne	r7, #1
	b	.L2
.L7:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r0, [r9]
	ldr	r1, .L11+8
	bl	dev_err
	ldr	r3, .L11+12
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	.align	2
.L11:
	.word	MVMDIO_SMI_TIMEOUT
	.word	jiffies
	.word	.LC0
	.word	ETIMEDOUT
	.size	orion_mdio_wait_ready, .-orion_mdio_wait_ready
	.comm	jiffies,4,4
	.comm	MVMDIO_SMI_TIMEOUT,4,4
	.comm	ETIMEDOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
