	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_init_link_events
_ice_init_link_events:                  ## @ice_init_link_events
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ICE_AQ_LINK_EVENT_UPDOWN@GOTPCREL(%rip), %rax
	movq	_ICE_AQ_LINK_EVENT_MEDIA_NA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rdi, %rbx
	notl	%edx
	movl	(%rdi), %esi
	movl	4(%rdi), %edi
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_ice_aq_set_event_mask
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %r15
	jmp	LBB0_4
LBB0_2:
	movq	%rbx, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ice_aq_get_link_info
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	leaq	L_.str.1(%rip), %r15
LBB0_4:
	movl	4(%rbx), %edi
	callq	_ice_hw_to_dev
	movl	(%rbx), %edx
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_dev_dbg
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_AQ_LINK_EVENT_UPDOWN,4,2   ## @ICE_AQ_LINK_EVENT_UPDOWN
	.comm	_ICE_AQ_LINK_EVENT_MEDIA_NA,4,2 ## @ICE_AQ_LINK_EVENT_MEDIA_NA
	.comm	_ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL,4,2 ## @ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set link event mask for port %d\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable link events for port %d\n"

	.no_dead_strip	_ice_init_link_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_init_link_events
_ice_init_link_events:                  ; @ice_init_link_events
	.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
Lloh0:
	adrp	x8, _ICE_AQ_LINK_EVENT_UPDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICE_AQ_LINK_EVENT_UPDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _ICE_AQ_LINK_EVENT_MEDIA_NA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ICE_AQ_LINK_EVENT_MEDIA_NA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL@GOTPAGE
Lloh7:
	ldr	x10, [x10, _ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh8:
	ldr	w9, [x10]
	orr	w8, w8, w9
	mvn	w2, w8
	ldr	w0, [x0, #4]
	ldr	w1, [x19]
	mov	x3, #0
	bl	_ice_aq_set_event_mask
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x20, l_.str@PAGE
Lloh10:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	mov	w1, #1
	mov	x2, #0
	mov	x3, #0
	bl	_ice_aq_get_link_info
	cbz	x0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x20, l_.str.1@PAGE
Lloh12:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_ice_hw_to_dev
	ldr	w2, [x19]
	mov	x1, x20
	bl	_dev_dbg
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_AQ_LINK_EVENT_UPDOWN,4,2   ; @ICE_AQ_LINK_EVENT_UPDOWN
	.comm	_ICE_AQ_LINK_EVENT_MEDIA_NA,4,2 ; @ICE_AQ_LINK_EVENT_MEDIA_NA
	.comm	_ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL,4,2 ; @ICE_AQ_LINK_EVENT_MODULE_QUAL_FAIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set link event mask for port %d\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable link events for port %d\n"

	.no_dead_strip	_ice_init_link_events
.subsections_via_symbols
