	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orion_mdio_xsmi_write
_orion_mdio_xsmi_write:                 ## @orion_mdio_xsmi_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movl	$4, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, %r12d
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_orion_mdio_xsmi_ops@GOTPCREL(%rip), %rdi
	movq	%r15, %rsi
	callq	_orion_mdio_wait_ready
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	%ebx, %eax
	sarl	$16, %eax
	andl	%eax, %r12d
	xorl	%r14d, %r14d
	movl	$15, %edi
	xorl	%esi, %esi
	callq	_GENMASK
	andl	%eax, %ebx
	movq	_MVMDIO_XSMI_ADDR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	_MVMDIO_XSMI_PHYADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	_MVMDIO_XSMI_DEVADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movq	_MVMDIO_XSMI_WRITE_OPERATION@GOTPCREL(%rip), %rax
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%r12d, %r13d
	orl	(%rax), %r13d
	movq	_MVMDIO_XSMI_MGNT_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%r13d, %edi
	callq	_writel
	jmp	LBB0_5
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_xsmi_ops,4,2        ## @orion_mdio_xsmi_ops
	.comm	_MVMDIO_XSMI_ADDR_REG,8,3       ## @MVMDIO_XSMI_ADDR_REG
	.comm	_MVMDIO_XSMI_PHYADDR_SHIFT,4,2  ## @MVMDIO_XSMI_PHYADDR_SHIFT
	.comm	_MVMDIO_XSMI_DEVADDR_SHIFT,4,2  ## @MVMDIO_XSMI_DEVADDR_SHIFT
	.comm	_MVMDIO_XSMI_WRITE_OPERATION,4,2 ## @MVMDIO_XSMI_WRITE_OPERATION
	.comm	_MVMDIO_XSMI_MGNT_REG,8,3       ## @MVMDIO_XSMI_MGNT_REG
	.no_dead_strip	_orion_mdio_xsmi_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_xsmi_write
_orion_mdio_xsmi_write:                 ; @orion_mdio_xsmi_write
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x24, [x0]
	mov	w0, #4
	mov	w1, #0
	bl	_GENMASK
Lloh0:
	adrp	x8, _MII_ADDR_C45@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ADDR_C45@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.1:
	mov	x23, x0
Lloh3:
	adrp	x0, _orion_mdio_xsmi_ops@GOTPAGE
Lloh4:
	ldr	x0, [x0, _orion_mdio_xsmi_ops@GOTPAGEOFF]
	mov	x1, x22
	bl	_orion_mdio_wait_ready
	tbnz	w0, #31, LBB0_4
; %bb.2:
	and	w22, w23, w21, asr #16
	mov	w0, #15
	mov	w1, #0
	bl	_GENMASK
	and	w0, w0, w21
	ldr	x8, [x24]
Lloh5:
	adrp	x9, _MVMDIO_XSMI_ADDR_REG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MVMDIO_XSMI_ADDR_REG@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh8:
	adrp	x8, _MVMDIO_XSMI_PHYADDR_SHIFT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MVMDIO_XSMI_PHYADDR_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	lsl	w8, w20, w8
Lloh11:
	adrp	x9, _MVMDIO_XSMI_DEVADDR_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MVMDIO_XSMI_DEVADDR_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w9, w22, w9
Lloh14:
	adrp	x10, _MVMDIO_XSMI_WRITE_OPERATION@GOTPAGE
Lloh15:
	ldr	x10, [x10, _MVMDIO_XSMI_WRITE_OPERATION@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	orr	w8, w8, w19
	orr	w8, w8, w9
	orr	w0, w8, w10
	ldr	x8, [x24]
Lloh17:
	adrp	x9, _MVMDIO_XSMI_MGNT_REG@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MVMDIO_XSMI_MGNT_REG@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh20:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_orion_mdio_xsmi_ops,4,2        ; @orion_mdio_xsmi_ops
	.comm	_MVMDIO_XSMI_ADDR_REG,8,3       ; @MVMDIO_XSMI_ADDR_REG
	.comm	_MVMDIO_XSMI_PHYADDR_SHIFT,4,2  ; @MVMDIO_XSMI_PHYADDR_SHIFT
	.comm	_MVMDIO_XSMI_DEVADDR_SHIFT,4,2  ; @MVMDIO_XSMI_DEVADDR_SHIFT
	.comm	_MVMDIO_XSMI_WRITE_OPERATION,4,2 ; @MVMDIO_XSMI_WRITE_OPERATION
	.comm	_MVMDIO_XSMI_MGNT_REG,8,3       ; @MVMDIO_XSMI_MGNT_REG
	.no_dead_strip	_orion_mdio_xsmi_write
.subsections_via_symbols
