	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igb_check_swap_media
_igb_check_swap_media:                  ## @igb_check_swap_media
	.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
	movq	%rdi, %rbx
	movq	_E1000_CTRL_EXT@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_rd32
	movl	%eax, %r14d
	movq	_E1000_CONNSW@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_rd32
	cmpl	$130, 12(%rbx)
	jne	LBB0_3
## %bb.1:
	movq	_E1000_CONNSW_AUTOSENSE_EN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
LBB0_10:
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_info
	movq	_E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, %r14d
	movq	_IGB_FLAG_MEDIA_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	movl	$0, (%rbx)
	jmp	LBB0_13
LBB0_3:
	movq	_E1000_CONNSW_SERDESD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%rbx), %ecx
	cmpl	$3, %ecx
	jg	LBB0_6
## %bb.5:
	incl	%ecx
	movl	%ecx, (%rbx)
	movq	_E1000_CONNSW_AUTOSENSE_CONF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	%eax, %r14d
	movq	%r12, %r15
LBB0_13:
	movl	(%r15), %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wr32                           ## TAILCALL
LBB0_6:
	movl	$0, (%rbx)
	movq	_E1000_CONNSW_PHYSD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.7:
	movq	_E1000_CONNSW_PHY_PDN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_2
## %bb.8:
	movq	_E1000_CONNSW_AUTOSENSE_CONF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	(%r12), %edi
	movl	%eax, %esi
	callq	_wr32
	movl	12(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_9
## %bb.11:
	movl	4(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_info
	movq	_E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	movq	_IGB_FLAG_MEDIA_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%rbx)
	jmp	LBB0_13
LBB0_9:
	cmpl	$130, %eax
	je	LBB0_10
## %bb.12:
	movl	4(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_E1000_CTRL_EXT,4,2             ## @E1000_CTRL_EXT
	.comm	_E1000_CONNSW,4,2               ## @E1000_CONNSW
	.comm	_E1000_CONNSW_AUTOSENSE_EN,4,2  ## @E1000_CONNSW_AUTOSENSE_EN
	.comm	_E1000_CONNSW_SERDESD,4,2       ## @E1000_CONNSW_SERDESD
	.comm	_E1000_CONNSW_AUTOSENSE_CONF,4,2 ## @E1000_CONNSW_AUTOSENSE_CONF
	.comm	_E1000_CONNSW_PHYSD,4,2         ## @E1000_CONNSW_PHYSD
	.comm	_E1000_CONNSW_PHY_PDN,4,2       ## @E1000_CONNSW_PHY_PDN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAS: changing media to fiber/serdes\n"

	.comm	_E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES,4,2 ## @E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES
	.comm	_IGB_FLAG_MEDIA_RESET,4,2       ## @IGB_FLAG_MEDIA_RESET
L_.str.1:                               ## @.str.1
	.asciz	"MAS: changing media to copper\n"

L_.str.2:                               ## @.str.2
	.asciz	"AMS: Invalid media type found, returning\n"

	.no_dead_strip	_igb_check_swap_media
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igb_check_swap_media
_igb_check_swap_media:                  ; @igb_check_swap_media
	.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	x20, x0
Lloh0:
	adrp	x8, _E1000_CTRL_EXT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E1000_CTRL_EXT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_rd32
	mov	x19, x0
Lloh3:
	adrp	x21, _E1000_CONNSW@GOTPAGE
Lloh4:
	ldr	x21, [x21, _E1000_CONNSW@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_rd32
	ldr	w8, [x20, #12]
	cmp	w8, #130
	b.ne	LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _E1000_CONNSW_AUTOSENSE_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E1000_CONNSW_AUTOSENSE_EN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_5
LBB0_2:
	ldr	w0, [x20, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_info
Lloh10:
	adrp	x8, _E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w19, w8, w19
Lloh13:
	adrp	x8, _IGB_FLAG_MEDIA_RESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IGB_FLAG_MEDIA_RESET@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	str	wzr, [x20]
LBB0_3:
Lloh16:
	adrp	x8, _E1000_CTRL_EXT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _E1000_CTRL_EXT@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh18:
	adrp	x8, _E1000_CONNSW_SERDESD@GOTPAGE
Lloh19:
	ldr	x8, [x8, _E1000_CONNSW_SERDESD@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
LBB0_5:
	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
LBB0_6:
	ldr	w8, [x20]
	cmp	w8, #3
	b.gt	LBB0_9
; %bb.7:
	add	w8, w8, #1
	str	w8, [x20]
Lloh21:
	adrp	x8, _E1000_CONNSW_AUTOSENSE_CONF@GOTPAGE
Lloh22:
	ldr	x8, [x8, _E1000_CONNSW_AUTOSENSE_CONF@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	orr	w19, w8, w0
Lloh24:
	adrp	x8, _E1000_CONNSW@GOTPAGE
Lloh25:
	ldr	x8, [x8, _E1000_CONNSW@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	mov	x1, x19
	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
	b	_wr32
LBB0_9:
	str	wzr, [x20]
Lloh26:
	adrp	x8, _E1000_CONNSW_PHYSD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _E1000_CONNSW_PHYSD@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.10:
Lloh29:
	adrp	x8, _E1000_CONNSW_PHY_PDN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _E1000_CONNSW_PHY_PDN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.11:
Lloh32:
	adrp	x8, _E1000_CONNSW_AUTOSENSE_CONF@GOTPAGE
Lloh33:
	ldr	x8, [x8, _E1000_CONNSW_AUTOSENSE_CONF@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_wr32
	ldr	w8, [x20, #12]
	sub	w9, w8, #128
	cmp	w9, #2
	b.hs	LBB0_13
; %bb.12:
	ldr	w0, [x20, #4]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_info
Lloh37:
	adrp	x8, _E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPAGE
Lloh38:
	ldr	x8, [x8, _E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	bic	w19, w19, w8
Lloh40:
	adrp	x8, _IGB_FLAG_MEDIA_RESET@GOTPAGE
Lloh41:
	ldr	x8, [x8, _IGB_FLAG_MEDIA_RESET@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	orr	w8, w9, w8
	str	w8, [x20, #8]
	b	LBB0_3
LBB0_13:
	cmp	w8, #130
	b.eq	LBB0_2
; %bb.14:
	ldr	w0, [x20, #4]
Lloh43:
	adrp	x1, l_.str.2@PAGE
Lloh44:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
	b	LBB0_3
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_E1000_CTRL_EXT,4,2             ; @E1000_CTRL_EXT
	.comm	_E1000_CONNSW,4,2               ; @E1000_CONNSW
	.comm	_E1000_CONNSW_AUTOSENSE_EN,4,2  ; @E1000_CONNSW_AUTOSENSE_EN
	.comm	_E1000_CONNSW_SERDESD,4,2       ; @E1000_CONNSW_SERDESD
	.comm	_E1000_CONNSW_AUTOSENSE_CONF,4,2 ; @E1000_CONNSW_AUTOSENSE_CONF
	.comm	_E1000_CONNSW_PHYSD,4,2         ; @E1000_CONNSW_PHYSD
	.comm	_E1000_CONNSW_PHY_PDN,4,2       ; @E1000_CONNSW_PHY_PDN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAS: changing media to fiber/serdes\n"

	.comm	_E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES,4,2 ; @E1000_CTRL_EXT_LINK_MODE_PCIE_SERDES
	.comm	_IGB_FLAG_MEDIA_RESET,4,2       ; @IGB_FLAG_MEDIA_RESET
l_.str.1:                               ; @.str.1
	.asciz	"MAS: changing media to copper\n"

l_.str.2:                               ; @.str.2
	.asciz	"AMS: Invalid media type found, returning\n"

	.no_dead_strip	_igb_check_swap_media
.subsections_via_symbols
