	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orion_mdio_smi_read
_orion_mdio_smi_read:                   ## @orion_mdio_smi_read
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	_orion_mdio_smi_ops@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_orion_mdio_wait_ready
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	_MVMDIO_SMI_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r15d
	movq	_MVMDIO_SMI_PHY_REG_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%r15d, %ebx
	movq	_MVMDIO_SMI_READ_OPERATION@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_writel
	movq	_orion_mdio_smi_ops@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	callq	_orion_mdio_wait_ready
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	movl	(%r12), %edi
	callq	_readl
	movl	%eax, %ebx
	movq	_MVMDIO_SMI_READ_VALID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.7:
	movl	$15, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%ebx, %eax
	jmp	LBB0_8
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_orion_mdio_smi_ops,4,2         ## @orion_mdio_smi_ops
	.comm	_MVMDIO_SMI_PHY_ADDR_SHIFT,4,2  ## @MVMDIO_SMI_PHY_ADDR_SHIFT
	.comm	_MVMDIO_SMI_PHY_REG_SHIFT,4,2   ## @MVMDIO_SMI_PHY_REG_SHIFT
	.comm	_MVMDIO_SMI_READ_OPERATION,4,2  ## @MVMDIO_SMI_READ_OPERATION
	.comm	_MVMDIO_SMI_READ_VALID,4,2      ## @MVMDIO_SMI_READ_VALID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SMI bus read not valid\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_orion_mdio_smi_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orion_mdio_smi_read
_orion_mdio_smi_read:                   ; @orion_mdio_smi_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _MII_ADDR_C45@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ADDR_C45@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
Lloh5:
	adrp	x0, _orion_mdio_smi_ops@GOTPAGE
Lloh6:
	ldr	x0, [x0, _orion_mdio_smi_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_orion_mdio_wait_ready
	tbnz	w0, #31, LBB0_3
; %bb.5:
Lloh7:
	adrp	x8, _MVMDIO_SMI_PHY_ADDR_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MVMDIO_SMI_PHY_ADDR_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	w8, w21, w8
Lloh10:
	adrp	x9, _MVMDIO_SMI_PHY_REG_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MVMDIO_SMI_PHY_REG_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _MVMDIO_SMI_READ_OPERATION@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MVMDIO_SMI_READ_OPERATION@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	w1, [x22]
	bl	_writel
Lloh16:
	adrp	x0, _orion_mdio_smi_ops@GOTPAGE
Lloh17:
	ldr	x0, [x0, _orion_mdio_smi_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_orion_mdio_wait_ready
	tbnz	w0, #31, LBB0_3
; %bb.6:
	ldr	w0, [x22]
	bl	_readl
Lloh18:
	adrp	x8, _MVMDIO_SMI_READ_VALID@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MVMDIO_SMI_READ_VALID@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.7:
	mov	x20, x0
	mov	w0, #15
	mov	w1, #0
	bl	_GENMASK
	and	w0, w0, w20
	b	LBB0_3
LBB0_8:
	ldr	w0, [x19]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh23:
	adrp	x8, _ENODEV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_orion_mdio_smi_ops,4,2         ; @orion_mdio_smi_ops
	.comm	_MVMDIO_SMI_PHY_ADDR_SHIFT,4,2  ; @MVMDIO_SMI_PHY_ADDR_SHIFT
	.comm	_MVMDIO_SMI_PHY_REG_SHIFT,4,2   ; @MVMDIO_SMI_PHY_REG_SHIFT
	.comm	_MVMDIO_SMI_READ_OPERATION,4,2  ; @MVMDIO_SMI_READ_OPERATION
	.comm	_MVMDIO_SMI_READ_VALID,4,2      ; @MVMDIO_SMI_READ_VALID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SMI bus read not valid\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_orion_mdio_smi_read
.subsections_via_symbols
