	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __e1000_write_phy_reg_hv
___e1000_write_phy_reg_hv:              ## @__e1000_write_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	$40, %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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%edx, -64(%rbp)
	movl	%esi, %edi
	callq	_BM_PHY_REG_PAGE
	movl	%eax, %r15d
	movl	%r14d, %edi
	callq	_BM_PHY_REG_NUM
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	%r15d, %edi
	callq	_e1000_get_phy_addr_for_hv_page
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	%eax, (%r12)
	movl	%ebx, %r13d
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_2:
	movq	_BM_WUC_PAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_4
## %bb.3:
	leaq	-64(%rbp), %rdx
	movl	%r14d, %esi
	xorl	%ecx, %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	%r15d, %r15d
	jle	LBB0_8
## %bb.5:
	cmpl	%eax, %r15d
	jge	LBB0_8
## %bb.6:
	leaq	-64(%rbp), %rdx
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_e1000_access_phy_debug_regs_hv
LBB0_7:
	movq	%rax, %r12
	movl	%r13d, %ebx
	jmp	LBB0_18
LBB0_1:
	movq	%rdi, %rbx
	movl	%edx, %r12d
	callq	*32(%rdi)
	movl	%r12d, %edx
	movq	%rbx, %rdi
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_20
	jmp	LBB0_2
LBB0_8:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	movl	%r13d, %ebx
	movl	-68(%rbp), %r13d                ## 4-byte Reload
	jne	LBB0_17
## %bb.9:
	xorl	%ecx, %ecx
	cmpl	%eax, %r15d
	cmovel	%ecx, %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	_e1000_phy_82578@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.10:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 16(%rax)
	jle	LBB0_15
## %bb.11:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, (%rax)
	jne	LBB0_15
## %bb.12:
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_13
LBB0_15:
	movq	_MAX_PHY_MULTI_PAGE_REG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jle	LBB0_17
## %bb.16:
	movq	_IGP_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r15d, %esi
	shll	%cl, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_e1000_set_page_igp
	movq	%rax, %r12
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	testq	%r12, %r12
	jne	LBB0_18
LBB0_17:
	movq	_IGP_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r15d, %edx
	shll	%cl, %edx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r13d, %ecx
	callq	_e_dbg
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_e1000e_write_phy_reg_mdic
	movq	%rax, %r12
LBB0_18:
	testl	%ebx, %ebx
	jne	LBB0_20
## %bb.19:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	*24(%rdi)
LBB0_20:
	movq	%r12, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	$11, %edi
	movl	%edx, %r14d
	callq	_BIT
	movl	%r14d, %edx
	testl	%eax, -60(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_15
## %bb.14:
	movl	$32511, -72(%rbp)               ## imm = 0x7EFF
	movl	$6, %edi
	callq	_BIT
	orl	$3, %eax
	leaq	-72(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	xorl	%ecx, %ecx
	callq	_e1000_access_phy_debug_regs_hv
	movl	%r14d, %edx
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_18
	jmp	LBB0_15
	.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	_e1000_phy_82578,8,3            ## @e1000_phy_82578
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ## @MAX_PHY_REG_ADDRESS
	.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	"writing PHY page %d (or 0x%x shifted) reg 0x%x\n"

	.no_dead_strip	___e1000_write_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_write_phy_reg_hv
___e1000_write_phy_reg_hv:              ; @__e1000_write_phy_reg_hv
	.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
	mov	x25, x4
	mov	x20, x3
	mov	x21, x2
	mov	x26, x1
	mov	x19, x0
	str	w2, [sp, #12]
	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	x24, x0
	str	w0, [x19]
	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:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x26
	mov	w3, #0
	mov	x4, x25
	bl	_e1000_access_phy_wakeup_reg_bm
	b	LBB0_15
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:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x26
	mov	w3, #0
	bl	_e1000_access_phy_debug_regs_hv
	b	LBB0_15
LBB0_6:
	ldr	x8, [x19, #32]
	mov	x0, x19
	blr	x8
	mov	x27, x0
	cbnz	x0, LBB0_18
	b	LBB0_1
LBB0_7:
Lloh6:
	adrp	x26, _IGP_PAGE_SHIFT@GOTPAGE
Lloh7:
	ldr	x26, [x26, _IGP_PAGE_SHIFT@GOTPAGEOFF]
	cbnz	w25, LBB0_14
; %bb.8:
	cmp	w23, w8
	csel	w23, wzr, w23, eq
	ldr	x8, [x19, #8]
Lloh8:
	adrp	x9, _e1000_phy_82578@GOTPAGE
Lloh9:
	ldr	x9, [x9, _e1000_phy_82578@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	ldr	w8, [x19]
	cmp	w8, #2
	b.ne	LBB0_12
; %bb.11:
Lloh11:
	adrp	x8, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_19
LBB0_12:
Lloh14:
	adrp	x8, _MAX_PHY_MULTI_PAGE_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_PHY_MULTI_PAGE_REG@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_14
; %bb.13:
	ldr	w8, [x26]
	lsl	w1, w23, w8
	mov	x0, x19
	bl	_e1000_set_page_igp
	mov	x27, x0
	str	w24, [x19]
	cbnz	x0, LBB0_16
LBB0_14:
	ldr	w8, [x26]
	lsl	w2, w23, w8
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	mov	x3, x22
	bl	_e_dbg
Lloh19:
	adrp	x8, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w1, w8, w22
	mov	x0, x19
	mov	x2, x21
	bl	_e1000e_write_phy_reg_mdic
LBB0_15:
	mov	x27, x0
LBB0_16:
	cbnz	w20, LBB0_18
; %bb.17:
	ldr	x8, [x19, #24]
	mov	x0, x19
	blr	x8
LBB0_18:
	mov	x0, x27
	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_19:
	mov	w0, #11
	bl	_BIT
	tst	w0, w21
	b.eq	LBB0_12
; %bb.20:
	mov	w8, #32511
	str	w8, [sp, #8]
	mov	w0, #6
	bl	_BIT
	orr	w1, w0, #0x3
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #0
	bl	_e1000_access_phy_debug_regs_hv
	mov	x27, x0
	cbnz	x0, LBB0_16
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.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	_e1000_phy_82578,8,3            ; @e1000_phy_82578
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ; @MAX_PHY_REG_ADDRESS
	.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	"writing PHY page %d (or 0x%x shifted) reg 0x%x\n"

	.no_dead_strip	___e1000_write_phy_reg_hv
.subsections_via_symbols
