	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_link_reset                ## -- Begin function tipc_link_reset
	.p2align	4, 0x90
_tipc_link_reset:                       ## @tipc_link_reset
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdi), %r13
	movq	8(%rdi), %rbx
	callq	_tipc_link_is_active
	movl	%eax, %r14d
	movl	172(%r12), %r15d
	movl	%r15d, %edi
	callq	_msg_session
	incl	%eax
	movzwl	%ax, %esi
	movl	%r15d, %edi
	callq	_msg_set_session
	movq	_INVALID_SESSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 168(%r12)
	movq	%r12, %rdi
	callq	_link_init_max_pkt
	movq	_RESET_UNKNOWN@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, (%r12)
	leaq	L_.str(%rip), %rdi
	callq	_dbg_link_state
	cmpq	(%r15), %r13
	je	LBB0_11
## %bb.1:
	movq	_RESET_RESET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_11
## %bb.2:
	movq	152(%r12), %rdi
	movq	%r12, %rsi
	callq	_tipc_node_link_down
	movl	24(%r12), %esi
	movl	164(%r12), %edi
	callq	_tipc_bearer_remove_dest
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.3:
	movq	152(%r12), %rdi
	callq	_tipc_node_has_active_links
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	152(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	movq	%rbx, 144(%r12)
	movq	_START_CHANGEOVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 136(%r12)
LBB0_6:
	movq	%r12, %rdi
	callq	_link_release_outqueue
	movq	128(%r12), %rdi
	callq	_buf_discard
	movq	$0, 128(%r12)
	movq	56(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rbx
	callq	_buf_discard
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_7
LBB0_8:
	leaq	120(%r12), %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tipc_link_wakeup_ports
LBB0_10:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 104(%r12)
	movups	%xmm0, 88(%r12)
	movups	%xmm0, 72(%r12)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%r12)
	movups	%xmm0, 32(%r12)
	movups	%xmm0, 48(%r12)
	movq	$0, 64(%r12)
	movq	%r12, %rdi
	callq	_link_reset_statistics
	movq	_tipc_cfg_link_event@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_link_send_event
	movl	24(%r12), %edi
	callq	_in_own_cluster
	testl	%eax, %eax
	je	LBB0_12
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	_tipc_disc_link_event@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_link_send_event                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_SESSION,4,2            ## @INVALID_SESSION
	.comm	_RESET_UNKNOWN,8,3              ## @RESET_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Resetting Link\n"

	.comm	_RESET_RESET,8,3                ## @RESET_RESET
	.comm	_START_CHANGEOVER,4,2           ## @START_CHANGEOVER
	.comm	_tipc_cfg_link_event,4,2        ## @tipc_cfg_link_event
	.comm	_tipc_disc_link_event,4,2       ## @tipc_disc_link_event
	.comm	_TIPC_CONS,4,2                  ## @TIPC_CONS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_tipc_link_reset                ; -- Begin function tipc_link_reset
	.p2align	2
_tipc_link_reset:                       ; @tipc_link_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldp	x23, x22, [x0]
	bl	_tipc_link_is_active
	mov	x20, x0
	ldr	w21, [x19, #172]
	mov	x0, x21
	bl	_msg_session
	add	w8, w0, #1
	and	w1, w8, #0xffff
	mov	x0, x21
	bl	_msg_set_session
Lloh0:
	adrp	x8, _INVALID_SESSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_SESSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #168]
	mov	x0, x19
	bl	_link_init_max_pkt
Lloh3:
	adrp	x21, _RESET_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _RESET_UNKNOWN@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x19]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_link_state
	ldr	x8, [x21]
Lloh7:
	adrp	x9, _RESET_RESET@GOTPAGE
Lloh8:
	ldr	x9, [x9, _RESET_RESET@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x23, x8
	ccmp	x23, x9, #4, ne
	b.eq	LBB0_10
; %bb.1:
	ldr	x0, [x19, #152]
	mov	x1, x19
	bl	_tipc_node_link_down
	ldr	w0, [x19, #164]
	ldr	w1, [x19, #24]
	bl	_tipc_bearer_remove_dest
	cbz	w20, LBB0_5
; %bb.2:
	ldr	x0, [x19, #152]
	bl	_tipc_node_has_active_links
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x19, #152]
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	str	x22, [x19, #144]
Lloh10:
	adrp	x8, _START_CHANGEOVER@GOTPAGE
Lloh11:
	ldr	x8, [x8, _START_CHANGEOVER@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #136]
LBB0_5:
	mov	x0, x19
	bl	_link_release_outqueue
	ldr	x0, [x19, #128]
	bl	_buf_discard
	str	xzr, [x19, #128]
	ldr	x0, [x19, #56]
	cbz	x0, LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x0]
	bl	_buf_discard
	mov	x0, x20
	cbnz	x20, LBB0_6
LBB0_7:
	add	x0, x19, #120
	bl	_list_empty
	cbnz	w0, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	w1, #1
	bl	_tipc_link_wakeup_ports
LBB0_9:
	movi.2d	v0, #0000000000000000
	stur	q0, [x19, #104]
	stur	q0, [x19, #88]
	stur	q0, [x19, #72]
	movi.2s	v1, #1
	str	d1, [x19, #16]
	stp	q0, q0, [x19, #32]
	str	xzr, [x19, #64]
	mov	x0, x19
	bl	_link_reset_statistics
Lloh13:
	adrp	x8, _tipc_cfg_link_event@GOTPAGE
Lloh14:
	ldr	x8, [x8, _tipc_cfg_link_event@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x19
	mov	w2, #0
	bl	_link_send_event
	ldr	w0, [x19, #24]
	bl	_in_own_cluster
	cbz	w0, LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh16:
	adrp	x8, _tipc_disc_link_event@GOTPAGE
Lloh17:
	ldr	x8, [x8, _tipc_disc_link_event@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x19
	mov	w2, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_link_send_event
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_SESSION,4,2            ; @INVALID_SESSION
	.comm	_RESET_UNKNOWN,8,3              ; @RESET_UNKNOWN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Resetting Link\n"

	.comm	_RESET_RESET,8,3                ; @RESET_RESET
	.comm	_START_CHANGEOVER,4,2           ; @START_CHANGEOVER
	.comm	_tipc_cfg_link_event,4,2        ; @tipc_cfg_link_event
	.comm	_tipc_disc_link_event,4,2       ; @tipc_disc_link_event
	.comm	_TIPC_CONS,4,2                  ; @TIPC_CONS
.subsections_via_symbols
