	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_setup_loopback_test
_e1000_setup_loopback_test:             ## @e1000_setup_loopback_test
	.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), %rcx
	movq	_e1000_media_type_fiber@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.1:
	movq	_e1000_media_type_internal_serdes@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_2
## %bb.4:
	movq	_e1000_media_type_copper@GOTPCREL(%rip), %rdx
	movl	$7, %eax
	cmpq	(%rdx), %rcx
	je	LBB0_6
	jmp	LBB0_5
LBB0_2:
	movl	8(%rdi), %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_3
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_e1000_set_phy_loopback         ## TAILCALL
LBB0_3:
	movq	_RCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_er32
	movq	_E1000_RCTL_LBM_TCVR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_ew32
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_e1000_media_type_fiber,8,3     ## @e1000_media_type_fiber
	.comm	_e1000_media_type_internal_serdes,8,3 ## @e1000_media_type_internal_serdes
	.comm	_RCTL,4,2                       ## @RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ## @E1000_RCTL_LBM_TCVR
	.comm	_e1000_media_type_copper,8,3    ## @e1000_media_type_copper
	.no_dead_strip	_e1000_setup_loopback_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_setup_loopback_test
_e1000_setup_loopback_test:             ; @e1000_setup_loopback_test
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _e1000_media_type_fiber@GOTPAGE
Lloh1:
	ldr	x9, [x9, _e1000_media_type_fiber@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _e1000_media_type_internal_serdes@GOTPAGE
Lloh4:
	ldr	x10, [x10, _e1000_media_type_internal_serdes@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x0, #8]
	and	w8, w8, #0xfffffffc
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.2:
Lloh6:
	adrp	x19, _RCTL@GOTPAGE
Lloh7:
	ldr	x19, [x19, _RCTL@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_er32
Lloh8:
	adrp	x8, _E1000_RCTL_LBM_TCVR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _E1000_RCTL_LBM_TCVR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w1, w8, w0
	ldr	w0, [x19]
	bl	_ew32
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x9, _e1000_media_type_copper@GOTPAGE
Lloh12:
	ldr	x9, [x9, _e1000_media_type_copper@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_e1000_set_phy_loopback
LBB0_5:
	mov	w0, #7
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_e1000_media_type_fiber,8,3     ; @e1000_media_type_fiber
	.comm	_e1000_media_type_internal_serdes,8,3 ; @e1000_media_type_internal_serdes
	.comm	_RCTL,4,2                       ; @RCTL
	.comm	_E1000_RCTL_LBM_TCVR,4,2        ; @E1000_RCTL_LBM_TCVR
	.comm	_e1000_media_type_copper,8,3    ; @e1000_media_type_copper
	.no_dead_strip	_e1000_setup_loopback_test
.subsections_via_symbols
