	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __e1000_read_phy_reg_hv
___e1000_read_phy_reg_hv:               ## @__e1000_read_phy_reg_hv
	.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, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	%esi, %edi
	callq	_BM_PHY_REG_PAGE
	movl	%eax, %r12d
	movl	%r14d, %edi
	callq	_BM_PHY_REG_NUM
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%r12d, %edi
	callq	_e1000_get_phy_addr_for_hv_page
	movl	%eax, %edx
	movl	%eax, 16(%r13)
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_2:
	movq	_BM_WUC_PAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_e1000_access_phy_wakeup_reg_bm
	jmp	LBB0_7
LBB0_4:
	movq	_HV_INTC_FC_PAGE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %r12d
	jle	LBB0_8
## %bb.5:
	cmpl	%eax, %r12d
	jge	LBB0_8
## %bb.6:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	$1, %ecx
	callq	_e1000_access_phy_debug_regs_hv
LBB0_7:
	movq	%rax, %r15
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_12
LBB0_1:
	movq	%r13, %rdi
	movl	%edx, %ebx
	callq	*8(%r13)
	movl	%ebx, %edx
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_14
	jmp	LBB0_2
LBB0_8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	jne	LBB0_11
## %bb.9:
	xorl	%ecx, %ecx
	cmpl	%eax, %r12d
	cmovel	%ecx, %r12d
	movq	_MAX_PHY_MULTI_PAGE_REG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jle	LBB0_11
## %bb.10:
	movq	_IGP_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %esi
	shll	%cl, %esi
	movq	%r13, %rdi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_e1000_set_page_igp
	movq	%rax, %r15
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r13)
	testq	%r15, %r15
	jne	LBB0_12
LBB0_11:
	movq	_IGP_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %edx
	shll	%cl, %edx
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %ecx
	callq	_e_dbg
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_e1000e_read_phy_reg_mdic
	movq	%rax, %r15
LBB0_12:
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	callq	*(%r13)
LBB0_14:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BM_WUC_PAGE,4,2                ## @BM_WUC_PAGE
	.comm	_HV_INTC_FC_PAGE_START,4,2      ## @HV_INTC_FC_PAGE_START
	.comm	_MAX_PHY_MULTI_PAGE_REG,4,2     ## @MAX_PHY_MULTI_PAGE_REG
	.comm	_IGP_PAGE_SHIFT,4,2             ## @IGP_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading PHY page %d (or 0x%x shifted) reg 0x%x\n"

	.comm	_MAX_PHY_REG_ADDRESS,4,2        ## @MAX_PHY_REG_ADDRESS
	.no_dead_strip	___e1000_read_phy_reg_hv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __e1000_read_phy_reg_hv
___e1000_read_phy_reg_hv:               ; @__e1000_read_phy_reg_hv
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x24, x4
	mov	x20, x3
	mov	x21, x2
	mov	x26, x1
	mov	x19, x0
	mov	x0, x1
	bl	_BM_PHY_REG_PAGE
	mov	x23, x0
	mov	x0, x26
	bl	_BM_PHY_REG_NUM
	mov	x22, x0
	mov	x0, x23
	bl	_e1000_get_phy_addr_for_hv_page
	mov	x25, x0
	str	w0, [x19, #16]
	cbz	w20, LBB0_6
LBB0_1:
Lloh0:
	adrp	x8, _BM_WUC_PAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BM_WUC_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x21
	mov	w3, #1
	mov	x4, x24
	bl	_e1000_access_phy_wakeup_reg_bm
	b	LBB0_11
LBB0_3:
Lloh3:
	adrp	x8, _HV_INTC_FC_PAGE_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HV_INTC_FC_PAGE_START@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w23, #1
	b.lt	LBB0_7
; %bb.4:
	cmp	w23, w8
	b.ge	LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x26
	mov	x2, x21
	mov	w3, #1
	bl	_e1000_access_phy_debug_regs_hv
	b	LBB0_11
LBB0_6:
	ldr	x8, [x19, #8]
	mov	x0, x19
	blr	x8
	mov	x27, x0
	cbnz	x0, LBB0_14
	b	LBB0_1
LBB0_7:
Lloh6:
	adrp	x26, _IGP_PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IGP_PAGE_SHIFT@GOTPAGEOFF]
	cbnz	w24, LBB0_10
; %bb.8:
	cmp	w23, w8
	csel	w23, wzr, w23, eq
Lloh8:
	adrp	x8, _MAX_PHY_MULTI_PAGE_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_PHY_MULTI_PAGE_REG@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_10
; %bb.9:
	ldr	w8, [x26]
	lsl	w1, w23, w8
	mov	x0, x19
	bl	_e1000_set_page_igp
	mov	x27, x0
	str	w25, [x19, #16]
	cbnz	x0, LBB0_12
LBB0_10:
	ldr	w8, [x26]
	lsl	w2, w23, w8
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x3, x22
	bl	_e_dbg
Lloh13:
	adrp	x8, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w1, w8, w22
	mov	x0, x19
	mov	x2, x21
	bl	_e1000e_read_phy_reg_mdic
LBB0_11:
	mov	x27, x0
LBB0_12:
	cbnz	w20, LBB0_14
; %bb.13:
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
LBB0_14:
	mov	x0, x27
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BM_WUC_PAGE,4,2                ; @BM_WUC_PAGE
	.comm	_HV_INTC_FC_PAGE_START,4,2      ; @HV_INTC_FC_PAGE_START
	.comm	_MAX_PHY_MULTI_PAGE_REG,4,2     ; @MAX_PHY_MULTI_PAGE_REG
	.comm	_IGP_PAGE_SHIFT,4,2             ; @IGP_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading PHY page %d (or 0x%x shifted) reg 0x%x\n"

	.comm	_MAX_PHY_REG_ADDRESS,4,2        ; @MAX_PHY_REG_ADDRESS
	.no_dead_strip	___e1000_read_phy_reg_hv
.subsections_via_symbols
