	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pch_gbe_mac_ctrl_miim          ## -- Begin function pch_gbe_mac_ctrl_miim
	.p2align	4, 0x90
_pch_gbe_mac_ctrl_miim:                 ## @pch_gbe_mac_ctrl_miim
	.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	%r8d, %r15d
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	callq	_pch_gbe_hw_to_adapter
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movl	$-100, %ebx
	movq	_PCH_GBE_MIIM_OPER_READY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	callq	_ioread32
	testl	%eax, (%r13)
	jne	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$20, %edi
	callq	_udelay
	incl	%ebx
	jne	LBB0_1
## %bb.3:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%r14d, %r14d
	jmp	LBB0_8
LBB0_4:
	movq	_PCH_GBE_MIIM_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	shll	%cl, %eax
	movq	_PCH_GBE_MIIM_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	movl	%r15d, %edi
	orl	-44(%rbp), %edi                 ## 4-byte Folded Reload
	orl	%eax, %edi
	orl	%r14d, %edi
	movq	8(%r12), %rsi
	callq	_iowrite32
	movl	$99, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$20, %edi
	callq	_udelay
	movq	8(%r12), %rdi
	callq	_ioread32
	movl	%eax, %r14d
	subl	$1, %ebx
	setb	%al
	testl	%r14d, (%r13)
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testb	%al, %al
	je	LBB0_5
LBB0_7:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_PCH_GBE_MIIM_OPER_READ@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	cmovel	%r14d, %r15d
	leaq	L_.str.1(%rip), %rsi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%r15d, %r8d
	callq	_netdev_dbg
LBB0_8:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCH_GBE_MIIM_OPER_READY,4,2    ## @PCH_GBE_MIIM_OPER_READY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pch-gbe.miim won't go Ready\n"

	.comm	_PCH_GBE_MIIM_REG_ADDR_SHIFT,4,2 ## @PCH_GBE_MIIM_REG_ADDR_SHIFT
	.comm	_PCH_GBE_MIIM_PHY_ADDR_SHIFT,4,2 ## @PCH_GBE_MIIM_PHY_ADDR_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"PHY %s: reg=%d, data=0x%04X\n"

	.comm	_PCH_GBE_MIIM_OPER_READ,4,2     ## @PCH_GBE_MIIM_OPER_READ
L_.str.2:                               ## @.str.2
	.asciz	"READ"

L_.str.3:                               ## @.str.3
	.asciz	"WRITE"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pch_gbe_mac_ctrl_miim          ; -- Begin function pch_gbe_mac_ctrl_miim
	.p2align	2
_pch_gbe_mac_ctrl_miim:                 ; @pch_gbe_mac_ctrl_miim
	.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	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x24, x1
	mov	x22, x0
	bl	_pch_gbe_hw_to_adapter
	mov	x23, x0
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	w26, #-100
Lloh0:
	adrp	x25, _PCH_GBE_MIIM_OPER_READY@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PCH_GBE_MIIM_OPER_READY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22, #8]
	bl	_ioread32
	ldr	w8, [x25]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #20
	bl	_udelay
	adds	w26, w26, #1
	b.lo	LBB0_1
; %bb.3:
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	w24, #0
	b	LBB0_7
LBB0_4:
Lloh4:
	adrp	x8, _PCH_GBE_MIIM_REG_ADDR_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCH_GBE_MIIM_REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w19, w8
Lloh7:
	adrp	x9, _PCH_GBE_MIIM_PHY_ADDR_SHIFT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PCH_GBE_MIIM_PHY_ADDR_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	lsl	w9, w24, w9
	orr	w10, w20, w21
	orr	w8, w10, w8
	orr	w0, w8, w9
	ldr	x1, [x22, #8]
	bl	_iowrite32
	mov	w26, #99
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #20
	bl	_udelay
	ldr	x0, [x22, #8]
	bl	_ioread32
	ldr	w8, [x25]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w26, #0, #4, eq
	sub	w26, w26, #1
	b.ne	LBB0_5
; %bb.6:
	mov	x24, x0
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	w0, [x23]
Lloh10:
	adrp	x8, _PCH_GBE_MIIM_OPER_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCH_GBE_MIIM_OPER_READ@GOTPAGEOFF]
Lloh12:
	adrp	x9, l_.str.3@PAGE
Lloh13:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x10, l_.str.2@PAGE
Lloh16:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, w21
	csel	w4, w24, w20, eq
	csel	x2, x10, x9, eq
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x19
	bl	_netdev_dbg
LBB0_7:
	mov	x0, x24
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PCH_GBE_MIIM_OPER_READY,4,2    ; @PCH_GBE_MIIM_OPER_READY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pch-gbe.miim won't go Ready\n"

	.comm	_PCH_GBE_MIIM_REG_ADDR_SHIFT,4,2 ; @PCH_GBE_MIIM_REG_ADDR_SHIFT
	.comm	_PCH_GBE_MIIM_PHY_ADDR_SHIFT,4,2 ; @PCH_GBE_MIIM_PHY_ADDR_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"PHY %s: reg=%d, data=0x%04X\n"

	.comm	_PCH_GBE_MIIM_OPER_READ,4,2     ; @PCH_GBE_MIIM_OPER_READ
l_.str.2:                               ; @.str.2
	.asciz	"READ"

l_.str.3:                               ; @.str.3
	.asciz	"WRITE"

.subsections_via_symbols
