	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orion_mdio_smi_write
_orion_mdio_smi_write:                  ## @orion_mdio_smi_write
	.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_2
## %bb.1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %rsi
	movq	(%rdi), %r12
	movq	_orion_mdio_smi_ops@GOTPCREL(%rip), %rdi
	callq	_orion_mdio_wait_ready
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	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_WRITE_OPERATION@GOTPCREL(%rip), %rax
	movq	_MVMDIO_SMI_DATA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	orl	(%rax), %ebx
	orl	%ebx, %r14d
	movl	(%r12), %esi
	movl	%r14d, %edi
	callq	_writel
	xorl	%eax, %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_WRITE_OPERATION,4,2 ## @MVMDIO_SMI_WRITE_OPERATION
	.comm	_MVMDIO_SMI_DATA_SHIFT,4,2      ## @MVMDIO_SMI_DATA_SHIFT
	.no_dead_strip	_orion_mdio_smi_write
.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_write
_orion_mdio_smi_write:                  ; @orion_mdio_smi_write
	.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_2
; %bb.1:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x1, x0
	ldr	x22, [x0]
Lloh6:
	adrp	x0, _orion_mdio_smi_ops@GOTPAGE
Lloh7:
	ldr	x0, [x0, _orion_mdio_smi_ops@GOTPAGEOFF]
	bl	_orion_mdio_wait_ready
	tbnz	w0, #31, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _MVMDIO_SMI_PHY_ADDR_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MVMDIO_SMI_PHY_ADDR_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	w8, w21, w8
Lloh11:
	adrp	x9, _MVMDIO_SMI_PHY_REG_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MVMDIO_SMI_PHY_REG_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _MVMDIO_SMI_WRITE_OPERATION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MVMDIO_SMI_WRITE_OPERATION@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _MVMDIO_SMI_DATA_SHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MVMDIO_SMI_DATA_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	lsl	w9, w19, w9
	orr	w0, w8, w9
	ldr	w1, [x22]
	bl	_writel
	mov	w0, #0
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.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_WRITE_OPERATION,4,2 ; @MVMDIO_SMI_WRITE_OPERATION
	.comm	_MVMDIO_SMI_DATA_SHIFT,4,2      ; @MVMDIO_SMI_DATA_SHIFT
	.no_dead_strip	_orion_mdio_smi_write
.subsections_via_symbols
