	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orion_mdio_wait_ready
_orion_mdio_wait_ready:                 ## @orion_mdio_wait_ready
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rsi), %r13
	movq	_MVMDIO_SMI_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_usecs_to_jiffies
	movq	%rax, %r12
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	addq	%r12, %r14
	movq	%r13, %rdi
	callq	*(%r15)
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
## %bb.1:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$3, %r12
	movl	$2, %eax
	cmovbq	%rax, %r12
	movq	%r14, %rbx
	movl	8(%r13), %r14d
	movq	%r13, %rdi
	callq	*(%r15)
	movl	%r14d, %edi
	movq	%rbx, %r14
	movq	%rax, %rsi
	movq	%r12, %rdx
	callq	_wait_event_timeout
	movl	$1, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	*(%r15)
	testq	%rax, %rax
	jne	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r13)
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r15), %esi
	movl	12(%r15), %edi
	callq	_usleep_range
	movq	%r14, %rdi
	callq	_time_is_before_jiffies
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
	jmp	LBB0_6
LBB0_8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVMDIO_SMI_TIMEOUT,4,2         ## @MVMDIO_SMI_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout: SMI busy for too long\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_orion_mdio_wait_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orion_mdio_wait_ready
_orion_mdio_wait_ready:                 ; @orion_mdio_wait_ready
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x1, #8]
Lloh0:
	adrp	x8, _MVMDIO_SMI_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MVMDIO_SMI_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_usecs_to_jiffies
	mov	x22, x0
Lloh3:
	adrp	x8, _jiffies@GOTPAGE
Lloh4:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	ldr	x8, [x20]
	mov	x0, x21
	blr	x8
	cbz	x0, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_9
LBB0_2:
	mov	w24, #0
	add	x23, x23, x22
	mov	w25, #2
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	cmp	x22, #2
	csel	x22, x22, x25, hi
	ldr	w24, [x21, #8]
	ldr	x8, [x20]
	mov	x0, x21
	blr	x8
	mov	x1, x0
	mov	x0, x24
	mov	x2, x22
	bl	_wait_event_timeout
	mov	w24, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20]
	mov	x0, x21
	blr	x8
	cbnz	x0, LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cbnz	w24, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cmp	x8, #0
	b.gt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	w1, w0, [x20, #8]
	bl	_usleep_range
	mov	x0, x23
	bl	_time_is_before_jiffies
	cmp	x0, #0
	cset	w24, ne
	b	LBB0_4
LBB0_8:
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MVMDIO_SMI_TIMEOUT,4,2         ; @MVMDIO_SMI_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout: SMI busy for too long\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_orion_mdio_wait_ready
.subsections_via_symbols
