	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gbe_dhg_phy_setup
_gbe_dhg_phy_setup:                     ## @gbe_dhg_phy_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$128, %eax
	je	LBB0_2
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
	movq	_E1000_ERR_PHY_TYPE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_CTL_AUX@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_er32
	movq	_E1000_CTL_AUX_RMII@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r14), %edi
	movl	%eax, %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_E1000_WRITE_FLUSH
	movl	(%r14), %edi
	callq	_er32
                                        ## kill: def $eax killed $eax def $rax
	andl	$-7, %eax
	leal	4(%rax), %esi
	movl	(%r14), %edi
	callq	_ew32
	xorl	%eax, %eax
	callq	_E1000_WRITE_FLUSH
LBB0_2:
	movq	%rbx, %rdi
	callq	_e1000_copper_link_rtl_setup
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_e_dbg
	jmp	LBB0_7
LBB0_5:
	movq	_E1000_SUCCESS@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"e1000_copper_link_rtl_setup failed!\n"

	.comm	_CTL_AUX,4,2                    ## @CTL_AUX
	.comm	_E1000_CTL_AUX_RMII,4,2         ## @E1000_CTL_AUX_RMII
L_.str.1:                               ## @.str.1
	.asciz	"Error Resetting the PHY\n"

	.comm	_E1000_ERR_PHY_TYPE,4,2         ## @E1000_ERR_PHY_TYPE
	.comm	_E1000_SUCCESS,4,2              ## @E1000_SUCCESS
	.no_dead_strip	_gbe_dhg_phy_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gbe_dhg_phy_setup
_gbe_dhg_phy_setup:                     ; @gbe_dhg_phy_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
Lloh2:
	adrp	x8, _E1000_ERR_PHY_TYPE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E1000_ERR_PHY_TYPE@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh4:
	adrp	x20, _CTL_AUX@GOTPAGE
Lloh5:
	ldr	x20, [x20, _CTL_AUX@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_er32
Lloh6:
	adrp	x8, _E1000_CTL_AUX_RMII@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E1000_CTL_AUX_RMII@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x20]
	bl	_ew32
	bl	_E1000_WRITE_FLUSH
	ldr	w0, [x20]
	bl	_er32
	and	w8, w0, #0xfffffff9
	orr	w1, w8, #0x4
	ldr	w0, [x20]
	bl	_ew32
	bl	_E1000_WRITE_FLUSH
LBB0_4:
	mov	x0, x19
	bl	_e1000_copper_link_rtl_setup
	cbz	w0, LBB0_6
; %bb.5:
	mov	x19, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_dbg
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x8, _E1000_SUCCESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E1000_SUCCESS@GOTPAGEOFF]
LBB0_7:
	ldr	w19, [x8]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"e1000_copper_link_rtl_setup failed!\n"

	.comm	_CTL_AUX,4,2                    ; @CTL_AUX
	.comm	_E1000_CTL_AUX_RMII,4,2         ; @E1000_CTL_AUX_RMII
l_.str.1:                               ; @.str.1
	.asciz	"Error Resetting the PHY\n"

	.comm	_E1000_ERR_PHY_TYPE,4,2         ; @E1000_ERR_PHY_TYPE
	.comm	_E1000_SUCCESS,4,2              ; @E1000_SUCCESS
	.no_dead_strip	_gbe_dhg_phy_setup
.subsections_via_symbols
