	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_fin_pkt
_handle_fin_pkt:                        ## @handle_fin_pkt
	.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	_NES_DBG_CM@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movl	(%rdi), %r15d
	addq	$12, %rdi
	callq	_atomic_read
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_nes_debug
	movl	(%rbx), %ecx
	leal	-129(%rcx), %eax
	cmpl	$7, %eax
	ja	LBB0_7
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	incl	8(%rbx)
	movq	%rbx, %rdi
	callq	_cleanup_retrans_entry
	movq	_NES_CM_STATE_LAST_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_fin                       ## TAILCALL
LBB0_7:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nes_debug                      ## TAILCALL
LBB0_6:
	incl	8(%rbx)
	movq	%rbx, %rdi
	callq	_cleanup_retrans_entry
	movq	_NES_CM_STATE_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rem_ref_cm_node                ## TAILCALL
LBB0_3:
	movq	_NES_CM_EVENT_ABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_create_event
	incl	8(%rbx)
	movq	%rbx, %rdi
	callq	_cleanup_retrans_entry
	movq	_NES_CM_STATE_CLOSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_add_ref_cm_node
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_reset                     ## TAILCALL
LBB0_5:
	incl	8(%rbx)
	movq	%rbx, %rdi
	callq	_cleanup_retrans_entry
	movl	$129, (%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_send_ack
	movq	_NES_TIMER_TYPE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_nes_timer             ## TAILCALL
LBB0_4:
	incl	8(%rbx)
	movq	%rbx, %rdi
	callq	_cleanup_retrans_entry
	movq	_NES_CM_STATE_CLOSING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_ack                       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_5
	.long	L0_0_set_4
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.comm	_NES_DBG_CM,4,2                 ## @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received FIN, cm_node = %p, state = %u. refcnt=%d\n"

	.comm	_NES_CM_STATE_LAST_ACK,4,2      ## @NES_CM_STATE_LAST_ACK
	.comm	_NES_CM_EVENT_ABORTED,4,2       ## @NES_CM_EVENT_ABORTED
	.comm	_NES_CM_STATE_CLOSED,8,3        ## @NES_CM_STATE_CLOSED
	.comm	_NES_CM_STATE_CLOSING,4,2       ## @NES_CM_STATE_CLOSING
	.comm	_NES_TIMER_TYPE_CLOSE,4,2       ## @NES_TIMER_TYPE_CLOSE
L_.str.1:                               ## @.str.1
	.asciz	"Error Rcvd FIN for node-%p state = %d\n"

	.no_dead_strip	_handle_fin_pkt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_fin_pkt
_handle_fin_pkt:                        ; @handle_fin_pkt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x22, _NES_DBG_CM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _NES_DBG_CM@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	w21, [x0], #12
	bl	_atomic_read
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_nes_debug
	ldr	w3, [x19]
	sub	w8, w3, #129
	cmp	w8, #7
	b.hi	LBB0_3
; %bb.1:
Lloh4:
	adrp	x9, lJTI0_0@PAGE
Lloh5:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_cleanup_retrans_entry
Lloh6:
	adrp	x8, _NES_CM_STATE_LAST_ACK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NES_CM_STATE_LAST_ACK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	mov	x1, #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
	add	sp, sp, #64
	b	_send_fin
LBB0_3:
	ldr	w0, [x22]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	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
	add	sp, sp, #64
	b	_nes_debug
LBB0_4:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_cleanup_retrans_entry
Lloh11:
	adrp	x8, _NES_CM_STATE_CLOSED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NES_CM_STATE_CLOSED@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	str	w8, [x19]
	ldr	w0, [x19, #4]
	mov	x1, x19
	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
	add	sp, sp, #64
	b	_rem_ref_cm_node
LBB0_5:
Lloh14:
	adrp	x8, _NES_CM_EVENT_ABORTED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NES_CM_EVENT_ABORTED@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_create_event
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_cleanup_retrans_entry
Lloh17:
	adrp	x8, _NES_CM_STATE_CLOSED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NES_CM_STATE_CLOSED@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_add_ref_cm_node
	mov	x0, x19
	mov	x1, #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
	add	sp, sp, #64
	b	_send_reset
LBB0_6:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_cleanup_retrans_entry
	mov	w8, #129
	str	w8, [x19]
	mov	x0, x19
	mov	x1, #0
	bl	_send_ack
Lloh20:
	adrp	x8, _NES_TIMER_TYPE_CLOSE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NES_TIMER_TYPE_CLOSE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, #0
	mov	w3, #1
	mov	w4, #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
	add	sp, sp, #64
	b	_schedule_nes_timer
LBB0_7:
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_cleanup_retrans_entry
Lloh23:
	adrp	x8, _NES_CM_STATE_CLOSING@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NES_CM_STATE_CLOSING@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	mov	x1, #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
	add	sp, sp, #64
	b	_send_ack
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_NES_DBG_CM,4,2                 ; @NES_DBG_CM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received FIN, cm_node = %p, state = %u. refcnt=%d\n"

	.comm	_NES_CM_STATE_LAST_ACK,4,2      ; @NES_CM_STATE_LAST_ACK
	.comm	_NES_CM_EVENT_ABORTED,4,2       ; @NES_CM_EVENT_ABORTED
	.comm	_NES_CM_STATE_CLOSED,8,3        ; @NES_CM_STATE_CLOSED
	.comm	_NES_CM_STATE_CLOSING,4,2       ; @NES_CM_STATE_CLOSING
	.comm	_NES_TIMER_TYPE_CLOSE,4,2       ; @NES_TIMER_TYPE_CLOSE
l_.str.1:                               ; @.str.1
	.asciz	"Error Rcvd FIN for node-%p state = %d\n"

	.no_dead_strip	_handle_fin_pkt
.subsections_via_symbols
