	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function phylink_phy_write
_phylink_phy_write:                     ## @phylink_phy_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	(%rdi), %r13
	movl	%esi, %edi
	callq	_mdio_phy_id_is_c45
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_mdio_phy_id_prtad
	movl	%eax, %r12d
	movl	%ebx, %edi
	callq	_mdio_phy_id_devad
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rcx
	shll	$16, %eax
	orl	%r15d, %eax
	orl	(%rcx), %eax
	movl	%r12d, %ebx
	jmp	LBB0_12
LBB0_2:
	cmpq	$0, 8(%r13)
	je	LBB0_13
## %bb.3:
	leal	-128(%r15), %eax
	cmpl	$5, %eax
	ja	LBB0_14
## %bb.4:
	movl	$27, %ecx
	btl	%eax, %ecx
	jae	LBB0_6
## %bb.5:
	movl	4(%r13), %edi
	callq	___ffs
	jmp	LBB0_11
LBB0_6:
	movq	_MDIO_DEVS_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_14
## %bb.7:
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$133, %r15d
	jne	LBB0_9
## %bb.8:
	movq	_MDIO_AN_ADVERTISE@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_MDIO_AN_LPA@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %r15d
LBB0_11:
	movq	_MII_ADDR_C45@GOTPCREL(%rip), %rcx
	shll	$16, %eax
	orl	%r15d, %eax
	orl	(%rcx), %eax
LBB0_12:
	movl	%eax, %r15d
LBB0_13:
	movl	(%r13), %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdiobus_write                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_ADDR_C45,4,2               ## @MII_ADDR_C45
	.comm	_MDIO_DEVS_AN,4,2               ## @MDIO_DEVS_AN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ## @MDIO_AN_ADVERTISE
	.comm	_MDIO_AN_LPA,4,2                ## @MDIO_AN_LPA
	.no_dead_strip	_phylink_phy_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function phylink_phy_write
_phylink_phy_write:                     ; @phylink_phy_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	x20, x2
	mov	x21, x1
	ldr	x23, [x0]
	mov	x0, x1
	bl	_mdio_phy_id_is_c45
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_mdio_phy_id_prtad
	mov	x22, x0
	mov	x0, x21
	bl	_mdio_phy_id_devad
Lloh0:
	adrp	x8, _MII_ADDR_C45@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_ADDR_C45@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w9, w20, w0, lsl #16
	orr	w20, w9, w8
	mov	x21, x22
	b	LBB0_13
LBB0_2:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_13
; %bb.3:
	sub	w8, w20, #128
	cmp	w8, #5
	b.hi	LBB0_9
; %bb.4:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #27
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
	ldr	w0, [x23, #4]
	bl	___ffs
	b	LBB0_12
LBB0_6:
	ldr	w8, [x23, #4]
Lloh3:
	adrp	x9, _MDIO_DEVS_AN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MDIO_DEVS_AN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
Lloh6:
	adrp	x8, _MDIO_MMD_AN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MDIO_MMD_AN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	cmp	w20, #133
	b.ne	LBB0_10
; %bb.8:
Lloh9:
	adrp	x8, _MDIO_AN_ADVERTISE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MDIO_AN_ADVERTISE@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	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
LBB0_10:
Lloh14:
	adrp	x8, _MDIO_AN_LPA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MDIO_AN_LPA@GOTPAGEOFF]
LBB0_11:
	ldr	w20, [x8]
LBB0_12:
Lloh16:
	adrp	x8, _MII_ADDR_C45@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MII_ADDR_C45@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w9, w20, w0, lsl #16
	orr	w20, w9, w8
LBB0_13:
	ldr	w0, [x23]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	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
	b	_mdiobus_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_ADDR_C45,4,2               ; @MII_ADDR_C45
	.comm	_MDIO_DEVS_AN,4,2               ; @MDIO_DEVS_AN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_ADVERTISE,4,2          ; @MDIO_AN_ADVERTISE
	.comm	_MDIO_AN_LPA,4,2                ; @MDIO_AN_LPA
	.no_dead_strip	_phylink_phy_write
.subsections_via_symbols
