	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function link_state_update
_link_state_update:                     ## @link_state_update
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	$0, -32(%rbp)
	movl	28(%rdi), %edx
	movl	32(%rdi), %edi
	leaq	-48(%rbp), %rcx
	xorl	%esi, %esi
	callq	_dpni_get_link_state
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_8
LBB0_2:
	movl	-48(%rbp), %eax
	movq	_DPNI_LINK_OPT_PAUSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	sete	%cl
	movq	_DPNI_LINK_OPT_ASYM_PAUSE@GOTPCREL(%rip), %rdx
	andl	(%rdx), %eax
	setne	%al
	xorb	%cl, %al
	movzbl	%al, %esi
	movq	%r14, %rdi
	callq	_dpaa2_eth_set_rx_taildrop
	movq	-40(%rbp), %rax
	cmpq	%rax, 8(%r14)
	je	LBB0_7
## %bb.3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_update_tx_fqids
	movl	24(%r14), %edi
	callq	_netif_carrier_on
	movl	24(%r14), %edi
	callq	_netif_tx_start_all_queues
	jmp	LBB0_6
LBB0_5:
	movl	24(%r14), %edi
	callq	_netif_tx_stop_all_queues
	movl	24(%r14), %edi
	callq	_netif_carrier_off
LBB0_6:
	movl	24(%r14), %edi
	cmpq	$0, -40(%rbp)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_info
LBB0_7:
	movq	-32(%rbp), %rax
	movq	%rax, 16(%r14)
	movaps	-48(%rbp), %xmm0
	movups	%xmm0, (%r14)
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dpni_get_link_state() failed\n"

	.comm	_DPNI_LINK_OPT_PAUSE,4,2        ## @DPNI_LINK_OPT_PAUSE
	.comm	_DPNI_LINK_OPT_ASYM_PAUSE,4,2   ## @DPNI_LINK_OPT_ASYM_PAUSE
L_.str.1:                               ## @.str.1
	.asciz	"Link Event: state %s\n"

L_.str.2:                               ## @.str.2
	.asciz	"up"

L_.str.3:                               ## @.str.3
	.asciz	"down"

	.no_dead_strip	_link_state_update
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function link_state_update
_link_state_update:                     ; @link_state_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	ldr	w0, [x0, #32]
	ldr	w2, [x19, #28]
	add	x3, sp, #8
	mov	w1, #0
	bl	_dpni_get_link_state
	mov	x20, x0
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_8
LBB0_2:
	ldr	w8, [sp, #8]
Lloh2:
	adrp	x9, _DPNI_LINK_OPT_PAUSE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DPNI_LINK_OPT_PAUSE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w9, eq
Lloh5:
	adrp	x10, _DPNI_LINK_OPT_ASYM_PAUSE@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DPNI_LINK_OPT_ASYM_PAUSE@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w8, ne
	eor	w1, w9, w8
	mov	x0, x19
	bl	_dpaa2_eth_set_rx_taildrop
	ldr	x9, [x19, #8]
	ldr	x8, [sp, #16]
	cmp	x9, x8
	b.eq	LBB0_7
; %bb.3:
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_update_tx_fqids
	ldr	w0, [x19, #24]
	bl	_netif_carrier_on
	ldr	w0, [x19, #24]
	bl	_netif_tx_start_all_queues
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19, #24]
	bl	_netif_tx_stop_all_queues
	ldr	w0, [x19, #24]
	bl	_netif_carrier_off
LBB0_6:
	ldr	w0, [x19, #24]
	ldr	x8, [sp, #16]
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh10:
	adrp	x10, l_.str.3@PAGE
Lloh11:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	x8, #0
	csel	x2, x10, x9, eq
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_info
LBB0_7:
	mov	w20, #0
	ldur	q0, [sp, #8]
	str	q0, [x19]
	ldr	x8, [sp, #24]
	str	x8, [x19, #16]
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dpni_get_link_state() failed\n"

	.comm	_DPNI_LINK_OPT_PAUSE,4,2        ; @DPNI_LINK_OPT_PAUSE
	.comm	_DPNI_LINK_OPT_ASYM_PAUSE,4,2   ; @DPNI_LINK_OPT_ASYM_PAUSE
l_.str.1:                               ; @.str.1
	.asciz	"Link Event: state %s\n"

l_.str.2:                               ; @.str.2
	.asciz	"up"

l_.str.3:                               ; @.str.3
	.asciz	"down"

	.no_dead_strip	_link_state_update
.subsections_via_symbols
