	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_write_phy_reg_gg82563_80003es2lan
_e1000_write_phy_reg_gg82563_80003es2lan: ## @e1000_write_phy_reg_gg82563_80003es2lan
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_e1000_acquire_phy_80003es2lan
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	movq	_GG82563_MIN_ALT_REG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jge	LBB0_2
## %bb.3:
	movq	_GG82563_PHY_PAGE_SELECT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_GG82563_PHY_PAGE_SELECT_ALT@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r13d
	movq	_GG82563_PAGE_SHIFT@GOTPCREL(%rip), %r14
	movb	(%r14), %cl
	movl	%r15d, %edx
	sarl	%cl, %edx
	movl	%edx, -48(%rbp)
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_e1000e_write_phy_reg_mdic
	testq	%rax, %rax
	je	LBB0_5
LBB0_10:
	movq	%rax, %rbx
LBB0_11:
	movq	%r12, %rdi
	callq	_e1000_release_phy_80003es2lan
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	cmpq	$0, (%r12)
	je	LBB0_9
## %bb.6:
	movl	$200, %edi
	movl	$400, %esi                      ## imm = 0x190
	callq	_usleep_range
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_e1000e_read_phy_reg_mdic
	movb	(%r14), %cl
	movl	%r15d, %eax
	sarl	%cl, %eax
	cmpl	-48(%rbp), %eax
	jne	LBB0_7
## %bb.8:
	movl	$200, %edi
	movl	$400, %esi                      ## imm = 0x190
	callq	_usleep_range
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_e1000e_write_phy_reg_mdic
	movq	%rax, %rbx
	movl	$200, %edi
	movl	$400, %esi                      ## imm = 0x190
	callq	_usleep_range
	jmp	LBB0_11
LBB0_9:
	movq	_MAX_PHY_REG_ADDRESS@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_e1000e_write_phy_reg_mdic
	jmp	LBB0_10
LBB0_7:
	movq	%r12, %rdi
	callq	_e1000_release_phy_80003es2lan
	movq	_E1000_ERR_PHY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ## @MAX_PHY_REG_ADDRESS
	.comm	_GG82563_MIN_ALT_REG,4,2        ## @GG82563_MIN_ALT_REG
	.comm	_GG82563_PHY_PAGE_SELECT,4,2    ## @GG82563_PHY_PAGE_SELECT
	.comm	_GG82563_PHY_PAGE_SELECT_ALT,4,2 ## @GG82563_PHY_PAGE_SELECT_ALT
	.comm	_GG82563_PAGE_SHIFT,4,2         ## @GG82563_PAGE_SHIFT
	.comm	_E1000_ERR_PHY,8,3              ## @E1000_ERR_PHY
	.no_dead_strip	_e1000_write_phy_reg_gg82563_80003es2lan
.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_gg82563_80003es2lan
_e1000_write_phy_reg_gg82563_80003es2lan: ; @e1000_write_phy_reg_gg82563_80003es2lan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_e1000_acquire_phy_80003es2lan
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x24, _MAX_PHY_REG_ADDRESS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_PHY_REG_ADDRESS@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w8, w8, w21
Lloh2:
	adrp	x9, _GG82563_MIN_ALT_REG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GG82563_MIN_ALT_REG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _GG82563_PHY_PAGE_SELECT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GG82563_PHY_PAGE_SELECT@GOTPAGEOFF]
Lloh7:
	adrp	x11, _GG82563_PHY_PAGE_SELECT_ALT@GOTPAGE
Lloh8:
	ldr	x11, [x11, _GG82563_PHY_PAGE_SELECT_ALT@GOTPAGEOFF]
	cmp	w8, w9
	csel	x8, x10, x11, lt
	ldr	w23, [x8]
Lloh9:
	adrp	x25, _GG82563_PAGE_SHIFT@GOTPAGE
Lloh10:
	ldr	x25, [x25, _GG82563_PAGE_SHIFT@GOTPAGEOFF]
	ldr	w8, [x25]
	asr	w2, w21, w8
	str	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x23
	bl	_e1000e_write_phy_reg_mdic
	cbz	x0, LBB0_5
LBB0_2:
	mov	x22, x0
LBB0_3:
	mov	x0, x19
	bl	_e1000_release_phy_80003es2lan
LBB0_4:
	mov	x0, x22
	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
	add	sp, sp, #96
	ret
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.6:
	mov	w0, #200
	mov	w1, #400
	bl	_usleep_range
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x23
	bl	_e1000e_read_phy_reg_mdic
	ldr	w8, [x25]
	asr	w8, w21, w8
	ldr	w9, [sp, #12]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.7:
	mov	w0, #200
	mov	w1, #400
	bl	_usleep_range
	ldr	w8, [x24]
	and	w1, w8, w21
	mov	x0, x19
	mov	x2, x20
	bl	_e1000e_write_phy_reg_mdic
	mov	x22, x0
	mov	w0, #200
	mov	w1, #400
	bl	_usleep_range
	b	LBB0_3
LBB0_8:
	ldr	w8, [x24]
	and	w1, w8, w21
	mov	x0, x19
	mov	x2, x20
	bl	_e1000e_write_phy_reg_mdic
	b	LBB0_2
LBB0_9:
	mov	x0, x19
	bl	_e1000_release_phy_80003es2lan
Lloh11:
	adrp	x8, _E1000_ERR_PHY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E1000_ERR_PHY@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	neg	x22, x8
	b	LBB0_4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PHY_REG_ADDRESS,4,2        ; @MAX_PHY_REG_ADDRESS
	.comm	_GG82563_MIN_ALT_REG,4,2        ; @GG82563_MIN_ALT_REG
	.comm	_GG82563_PHY_PAGE_SELECT,4,2    ; @GG82563_PHY_PAGE_SELECT
	.comm	_GG82563_PHY_PAGE_SELECT_ALT,4,2 ; @GG82563_PHY_PAGE_SELECT_ALT
	.comm	_GG82563_PAGE_SHIFT,4,2         ; @GG82563_PAGE_SHIFT
	.comm	_E1000_ERR_PHY,8,3              ; @E1000_ERR_PHY
	.no_dead_strip	_e1000_write_phy_reg_gg82563_80003es2lan
.subsections_via_symbols
