	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_set_phy_mode
_e1000_set_phy_mode:                    ## @e1000_set_phy_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_e1000_82545_rev_3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_e1000_media_type_copper@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.2:
	movq	_EEPROM_PHY_CLASS_WORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_e1000_read_eeprom
	testq	%rax, %rax
	jne	LBB0_9
## %bb.3:
	movl	-12(%rbp), %eax
	movq	_EEPROM_RESERVED_WORD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.4:
	movq	_EEPROM_PHY_CLASS_A@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.5:
	movq	_M88E1000_PHY_PAGE_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$11, %edx
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movq	_M88E1000_PHY_GEN_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$33028, %edx                    ## imm = 0x8104
	callq	_e1000_write_phy_reg
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movl	$0, 16(%rbx)
LBB0_8:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_82545_rev_3,8,3          ## @e1000_82545_rev_3
	.comm	_e1000_media_type_copper,8,3    ## @e1000_media_type_copper
	.comm	_EEPROM_PHY_CLASS_WORD,4,2      ## @EEPROM_PHY_CLASS_WORD
	.comm	_EEPROM_RESERVED_WORD,4,2       ## @EEPROM_RESERVED_WORD
	.comm	_EEPROM_PHY_CLASS_A,4,2         ## @EEPROM_PHY_CLASS_A
	.comm	_M88E1000_PHY_PAGE_SELECT,4,2   ## @M88E1000_PHY_PAGE_SELECT
	.comm	_M88E1000_PHY_GEN_CONTROL,4,2   ## @M88E1000_PHY_GEN_CONTROL
	.comm	_E1000_SUCCESS,8,3              ## @E1000_SUCCESS
	.no_dead_strip	_e1000_set_phy_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_set_phy_mode
_e1000_set_phy_mode:                    ; @e1000_set_phy_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _e1000_82545_rev_3@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_82545_rev_3@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _e1000_media_type_copper@GOTPAGE
Lloh4:
	ldr	x9, [x9, _e1000_media_type_copper@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.2:
Lloh6:
	adrp	x8, _EEPROM_PHY_CLASS_WORD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEPROM_PHY_CLASS_WORD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #1
	bl	_e1000_read_eeprom
	cbnz	x0, LBB0_9
; %bb.3:
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x9, _EEPROM_RESERVED_WORD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EEPROM_RESERVED_WORD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_8
; %bb.4:
Lloh12:
	adrp	x9, _EEPROM_PHY_CLASS_A@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EEPROM_PHY_CLASS_A@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.5:
Lloh15:
	adrp	x8, _M88E1000_PHY_PAGE_SELECT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _M88E1000_PHY_PAGE_SELECT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #11
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_9
; %bb.6:
Lloh18:
	adrp	x8, _M88E1000_PHY_GEN_CONTROL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _M88E1000_PHY_GEN_CONTROL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #33028
	bl	_e1000_write_phy_reg
	cbnz	x0, LBB0_9
; %bb.7:
	str	wzr, [x19, #16]
LBB0_8:
Lloh21:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh22:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
Lloh23:
	ldr	x0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_82545_rev_3,8,3          ; @e1000_82545_rev_3
	.comm	_e1000_media_type_copper,8,3    ; @e1000_media_type_copper
	.comm	_EEPROM_PHY_CLASS_WORD,4,2      ; @EEPROM_PHY_CLASS_WORD
	.comm	_EEPROM_RESERVED_WORD,4,2       ; @EEPROM_RESERVED_WORD
	.comm	_EEPROM_PHY_CLASS_A,4,2         ; @EEPROM_PHY_CLASS_A
	.comm	_M88E1000_PHY_PAGE_SELECT,4,2   ; @M88E1000_PHY_PAGE_SELECT
	.comm	_M88E1000_PHY_GEN_CONTROL,4,2   ; @M88E1000_PHY_GEN_CONTROL
	.comm	_E1000_SUCCESS,8,3              ; @E1000_SUCCESS
	.no_dead_strip	_e1000_set_phy_mode
.subsections_via_symbols
