	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_write_phy_reg            ## -- Begin function e1000_write_phy_reg
	.p2align	4, 0x90
_e1000_write_phy_reg:                   ## @e1000_write_phy_reg
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_e1000_phy_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	_e1000_phy_igp@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_MAX_PHY_MULTI_PAGE_REG@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jge	LBB0_3
## %bb.2:
	movq	_IGP01E1000_PHY_PAGE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_e1000_write_phy_reg_ex
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
LBB0_3:
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_e1000_write_phy_reg_ex
	movl	%eax, %r12d
LBB0_4:
	movq	_e1000_phy_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_phy_lock,4,2             ## @e1000_phy_lock
	.comm	_e1000_phy_igp,8,3              ## @e1000_phy_igp
	.comm	_MAX_PHY_MULTI_PAGE_REG,4,2     ## @MAX_PHY_MULTI_PAGE_REG
	.comm	_IGP01E1000_PHY_PAGE_SELECT,4,2 ## @IGP01E1000_PHY_PAGE_SELECT
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ## @MAX_PHY_REG_ADDRESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000_write_phy_reg            ; -- Begin function e1000_write_phy_reg
	.p2align	2
_e1000_write_phy_reg:                   ; @e1000_write_phy_reg
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _e1000_phy_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _e1000_phy_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _e1000_phy_igp@GOTPAGE
Lloh3:
	ldr	x9, [x9, _e1000_phy_igp@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _MAX_PHY_MULTI_PAGE_REG@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MAX_PHY_MULTI_PAGE_REG@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	x8, x9
	ccmp	w10, w21, #0, eq
	b.ge	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _IGP01E1000_PHY_PAGE_SELECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IGP01E1000_PHY_PAGE_SELECT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_e1000_write_phy_reg_ex
	mov	x22, x0
	cbnz	w0, LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	and	w1, w8, w21
	mov	x0, x20
	mov	x2, x19
	bl	_e1000_write_phy_reg_ex
	mov	x22, x0
LBB0_3:
Lloh14:
	adrp	x0, _e1000_phy_lock@GOTPAGE
Lloh15:
	ldr	x0, [x0, _e1000_phy_lock@GOTPAGEOFF]
	bl	_spin_unlock_irqrestore
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_phy_lock,4,2             ; @e1000_phy_lock
	.comm	_e1000_phy_igp,8,3              ; @e1000_phy_igp
	.comm	_MAX_PHY_MULTI_PAGE_REG,4,2     ; @MAX_PHY_MULTI_PAGE_REG
	.comm	_IGP01E1000_PHY_PAGE_SELECT,4,2 ; @IGP01E1000_PHY_PAGE_SELECT
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ; @MAX_PHY_REG_ADDRESS
.subsections_via_symbols
