	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_read_phy_reg_mdi         ## -- Begin function ixgbe_read_phy_reg_mdi
	.p2align	4, 0x90
_ixgbe_read_phy_reg_mdi:                ## @ixgbe_read_phy_reg_mdi
	.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
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_IXGBE_MSCA_NP_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	%rsi, %rax
	shlq	%cl, %rax
	movq	_IXGBE_MSCA_DEV_TYPE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	shlq	%cl, %rdx
	orq	%rax, %rdx
	movq	(%rdi), %rbx
	movq	_IXGBE_MSCA_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rbx
	orq	%rdx, %rbx
	movq	_IXGBE_MSCA_ADDR_CYCLE@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_IXGBE_MSCA_MDI_COMMAND@GOTPCREL(%rip), %r12
	orq	(%r12), %rbx
	movq	_IXGBE_MSCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_IXGBE_WRITE_REG
	movq	_IXGBE_MDIO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_2
## %bb.1:
	movq	%r12, %r14
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	_IXGBE_MSCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_IXGBE_READ_REG
	movq	%rax, %rbx
	movq	(%r14), %rax
	testq	%rbx, %rax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movq	_IXGBE_MDIO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	jl	LBB0_4
LBB0_5:
	testq	%rbx, %rax
	je	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_2:
	movq	%r12, %r14
	movq	(%r12), %rax
	testq	%rbx, %rax
	jne	LBB0_6
LBB0_8:
	movq	_IXGBE_MSCA_NP_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %r13
	movq	_IXGBE_MSCA_DEV_TYPE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	shlq	%cl, %rsi
	movq	(%r15), %rdx
	movq	_IXGBE_MSCA_PHY_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rdx
	orq	%rsi, %rdx
	movq	_IXGBE_MSCA_READ@GOTPCREL(%rip), %rcx
	orq	%rax, %r13
	orq	%rdx, %r13
	orq	(%rcx), %r13
	movq	_IXGBE_MSCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_IXGBE_WRITE_REG
	movq	_IXGBE_MDIO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_10
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	movq	_IXGBE_MSCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_IXGBE_READ_REG
	movq	%rax, %r13
	movq	(%r14), %rax
	testq	%r13, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movq	_IXGBE_MDIO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	jl	LBB0_12
LBB0_13:
	testq	%r13, %rax
	je	LBB0_15
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	callq	_hw_dbg
	movq	_IXGBE_ERR_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	(%r14), %rax
	testq	%r13, %rax
	jne	LBB0_14
LBB0_15:
	movq	_IXGBE_MSRWD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_IXGBE_READ_REG
	movq	_IXGBE_MSRWD_READ_DATA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarq	%cl, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_IXGBE_MSCA_NP_ADDR_SHIFT,8,3   ## @IXGBE_MSCA_NP_ADDR_SHIFT
	.comm	_IXGBE_MSCA_DEV_TYPE_SHIFT,8,3  ## @IXGBE_MSCA_DEV_TYPE_SHIFT
	.comm	_IXGBE_MSCA_PHY_ADDR_SHIFT,8,3  ## @IXGBE_MSCA_PHY_ADDR_SHIFT
	.comm	_IXGBE_MSCA_ADDR_CYCLE,8,3      ## @IXGBE_MSCA_ADDR_CYCLE
	.comm	_IXGBE_MSCA_MDI_COMMAND,8,3     ## @IXGBE_MSCA_MDI_COMMAND
	.comm	_IXGBE_MSCA,4,2                 ## @IXGBE_MSCA
	.comm	_IXGBE_MDIO_COMMAND_TIMEOUT,8,3 ## @IXGBE_MDIO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PHY address command did not complete.\n"

	.comm	_IXGBE_ERR_PHY,4,2              ## @IXGBE_ERR_PHY
	.comm	_IXGBE_MSCA_READ,8,3            ## @IXGBE_MSCA_READ
L_.str.1:                               ## @.str.1
	.asciz	"PHY read command didn't complete\n"

	.comm	_IXGBE_MSRWD,4,2                ## @IXGBE_MSRWD
	.comm	_IXGBE_MSRWD_READ_DATA_SHIFT,8,3 ## @IXGBE_MSRWD_READ_DATA_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ixgbe_read_phy_reg_mdi         ; -- Begin function ixgbe_read_phy_reg_mdi
	.p2align	2
_ixgbe_read_phy_reg_mdi:                ; @ixgbe_read_phy_reg_mdi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _IXGBE_MSCA_NP_ADDR_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IXGBE_MSCA_NP_ADDR_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsl	x8, x1, x8
Lloh3:
	adrp	x28, _IXGBE_MSCA_DEV_TYPE_SHIFT@GOTPAGE
Lloh4:
	ldr	x28, [x28, _IXGBE_MSCA_DEV_TYPE_SHIFT@GOTPAGEOFF]
	ldr	x9, [x28]
	lsl	x9, x2, x9
	ldr	x10, [x0]
Lloh5:
	adrp	x19, _IXGBE_MSCA_PHY_ADDR_SHIFT@GOTPAGE
Lloh6:
	ldr	x19, [x19, _IXGBE_MSCA_PHY_ADDR_SHIFT@GOTPAGEOFF]
	ldr	x11, [x19]
Lloh7:
	adrp	x12, _IXGBE_MSCA_ADDR_CYCLE@GOTPAGE
Lloh8:
	ldr	x12, [x12, _IXGBE_MSCA_ADDR_CYCLE@GOTPAGEOFF]
	lsl	x10, x10, x11
Lloh9:
	ldr	x11, [x12]
Lloh10:
	adrp	x24, _IXGBE_MSCA_MDI_COMMAND@GOTPAGE
Lloh11:
	ldr	x24, [x24, _IXGBE_MSCA_MDI_COMMAND@GOTPAGEOFF]
	ldr	x12, [x24]
	orr	x8, x9, x8
	orr	x8, x8, x10
	orr	x8, x8, x11
	orr	x23, x8, x12
Lloh12:
	adrp	x25, _IXGBE_MSCA@GOTPAGE
Lloh13:
	ldr	x25, [x25, _IXGBE_MSCA@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x2, x23
	bl	_IXGBE_WRITE_REG
Lloh14:
	adrp	x26, _IXGBE_MDIO_COMMAND_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x26, [x26, _IXGBE_MDIO_COMMAND_TIMEOUT@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x27, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x25]
	mov	x0, x20
	bl	_IXGBE_READ_REG
	mov	x23, x0
	ldr	x8, [x24]
	tst	x8, x0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	ldr	x9, [x26]
	cmp	x27, x9
	b.lt	LBB0_2
LBB0_4:
	tst	x8, x23
	b.eq	LBB0_7
LBB0_5:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_6:
	ldr	x8, [x24]
	tst	x8, x23
	b.ne	LBB0_5
LBB0_7:
Lloh18:
	adrp	x9, _IXGBE_MSCA_NP_ADDR_SHIFT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IXGBE_MSCA_NP_ADDR_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	lsl	x9, x22, x9
	ldr	x10, [x28]
	lsl	x10, x21, x10
	ldr	x11, [x20]
	ldr	x12, [x19]
	lsl	x11, x11, x12
Lloh21:
	adrp	x12, _IXGBE_MSCA_READ@GOTPAGE
Lloh22:
	ldr	x12, [x12, _IXGBE_MSCA_READ@GOTPAGEOFF]
Lloh23:
	ldr	x12, [x12]
	orr	x8, x9, x8
	orr	x8, x8, x10
	orr	x8, x8, x11
	orr	x21, x8, x12
	ldr	w1, [x25]
	mov	x0, x20
	mov	x2, x21
	bl	_IXGBE_WRITE_REG
	ldr	x8, [x26]
	cmp	x8, #1
	b.lt	LBB0_15
; %bb.8:
	mov	x19, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	ldr	w1, [x25]
	mov	x0, x20
	bl	_IXGBE_READ_REG
	mov	x21, x0
	ldr	x8, [x24]
	tst	x8, x0
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x19, x19, #1
	ldr	x9, [x26]
	cmp	x19, x9
	b.lt	LBB0_9
LBB0_11:
	tst	x8, x21
	b.eq	LBB0_16
LBB0_12:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x20
	bl	_hw_dbg
Lloh26:
	adrp	x8, _IXGBE_ERR_PHY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IXGBE_ERR_PHY@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
	ldr	x8, [x24]
	tst	x8, x21
	b.ne	LBB0_12
LBB0_16:
Lloh29:
	adrp	x8, _IXGBE_MSRWD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IXGBE_MSRWD@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_IXGBE_READ_REG
	mov	x8, x0
	mov	w0, #0
Lloh32:
	adrp	x9, _IXGBE_MSRWD_READ_DATA_SHIFT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IXGBE_MSRWD_READ_DATA_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	asr	x8, x8, x9
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x9]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_IXGBE_MSCA_NP_ADDR_SHIFT,8,3   ; @IXGBE_MSCA_NP_ADDR_SHIFT
	.comm	_IXGBE_MSCA_DEV_TYPE_SHIFT,8,3  ; @IXGBE_MSCA_DEV_TYPE_SHIFT
	.comm	_IXGBE_MSCA_PHY_ADDR_SHIFT,8,3  ; @IXGBE_MSCA_PHY_ADDR_SHIFT
	.comm	_IXGBE_MSCA_ADDR_CYCLE,8,3      ; @IXGBE_MSCA_ADDR_CYCLE
	.comm	_IXGBE_MSCA_MDI_COMMAND,8,3     ; @IXGBE_MSCA_MDI_COMMAND
	.comm	_IXGBE_MSCA,4,2                 ; @IXGBE_MSCA
	.comm	_IXGBE_MDIO_COMMAND_TIMEOUT,8,3 ; @IXGBE_MDIO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PHY address command did not complete.\n"

	.comm	_IXGBE_ERR_PHY,4,2              ; @IXGBE_ERR_PHY
	.comm	_IXGBE_MSCA_READ,8,3            ; @IXGBE_MSCA_READ
l_.str.1:                               ; @.str.1
	.asciz	"PHY read command didn't complete\n"

	.comm	_IXGBE_MSRWD,4,2                ; @IXGBE_MSRWD
	.comm	_IXGBE_MSRWD_READ_DATA_SHIFT,8,3 ; @IXGBE_MSRWD_READ_DATA_SHIFT
.subsections_via_symbols
