	.file	"extr_nes_cm.c_handle_fin_pkt.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Received FIN, cm_node = %p, state = %u. refcnt=%d\n"
	.align 8
.LC1:
	.string	"Error Rcvd FIN for node-%p state = %d\n"
	.text
	.p2align 4
	.type	handle_fin_pkt, @function
handle_fin_pkt:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	add	rdi, 12
	call	atomic_read@PLT
	mov	ecx, DWORD PTR 0[rbp]
	mov	rdx, rbp
	mov	edi, DWORD PTR NES_DBG_CM[rip]
	mov	r8d, eax
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	nes_debug@PLT
	mov	ecx, DWORD PTR 0[rbp]
	lea	eax, -129[rcx]
	cmp	eax, 7
	ja	.L2
	lea	rdx, .L4[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L4:
	.long	.L8-.L4
	.long	.L3-.L4
	.long	.L3-.L4
	.long	.L7-.L4
	.long	.L3-.L4
	.long	.L6-.L4
	.long	.L5-.L4
	.long	.L3-.L4
	.text
	.p2align 4,,10
	.p2align 3
.L3:
	add	DWORD PTR 8[rbp], 1
	mov	rdi, rbp
	call	cleanup_retrans_entry@PLT
	mov	eax, DWORD PTR NES_CM_STATE_LAST_ACK[rip]
	mov	rdi, rbp
	xor	esi, esi
	mov	DWORD PTR 0[rbp], eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	send_fin@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	esi, DWORD PTR NES_CM_EVENT_ABORTED[rip]
	mov	rdi, rbp
	call	create_event@PLT
	add	DWORD PTR 8[rbp], 1
	mov	rdi, rbp
	call	cleanup_retrans_entry@PLT
	mov	rax, QWORD PTR NES_CM_STATE_CLOSED[rip]
	mov	rdi, rbp
	mov	DWORD PTR 0[rbp], eax
	call	add_ref_cm_node@PLT
	mov	rdi, rbp
	xor	esi, esi
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	send_reset@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	add	DWORD PTR 8[rbp], 1
	mov	rdi, rbp
	call	cleanup_retrans_entry@PLT
	mov	DWORD PTR 0[rbp], 129
	mov	rdi, rbp
	xor	esi, esi
	call	send_ack@PLT
	mov	edx, DWORD PTR NES_TIMER_TYPE_CLOSE[rip]
	mov	rdi, rbp
	xor	esi, esi
	xor	r8d, r8d
	mov	ecx, 1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	schedule_nes_timer@PLT
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	add	DWORD PTR 8[rbp], 1
	mov	rdi, rbp
	call	cleanup_retrans_entry@PLT
	mov	eax, DWORD PTR NES_CM_STATE_CLOSING[rip]
	mov	rdi, rbp
	xor	esi, esi
	mov	DWORD PTR 0[rbp], eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	send_ack@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	add	DWORD PTR 8[rbp], 1
	mov	rdi, rbp
	call	cleanup_retrans_entry@PLT
	mov	rax, QWORD PTR NES_CM_STATE_CLOSED[rip]
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, rbp
	mov	DWORD PTR 0[rbp], eax
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	jmp	rem_ref_cm_node@PLT
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR NES_DBG_CM[rip]
	mov	rdx, rbp
	lea	rsi, .LC1[rip]
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	nes_debug@PLT
	.cfi_endproc
.LFE0:
	.size	handle_fin_pkt, .-handle_fin_pkt
	.comm	NES_TIMER_TYPE_CLOSE,4,4
	.comm	NES_DBG_CM,4,4
	.comm	NES_CM_STATE_LAST_ACK,4,4
	.comm	NES_CM_STATE_CLOSING,4,4
	.comm	NES_CM_STATE_CLOSED,8,8
	.comm	NES_CM_EVENT_ABORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_nes_cm.c_handle_fin_pkt.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Received FIN, cm_node = %p, state = %u. refcnt=%d\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Error Rcvd FIN for node-%p state = %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_fin_pkt, %function
handle_fin_pkt:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r5, .L13
	mov	r4, r0
	sub	sp, sp, #12
	ldr	r7, [r0], #12
	ldr	r6, [r5]
	bl	atomic_read
	mov	r2, r0
	mov	r3, r7
	str	r2, [sp]
	mov	r0, r6
	mov	r2, r4
	ldr	r1, .L13+4
	bl	nes_debug
	ldr	r3, [r4]
	sub	r2, r3, #129
	cmp	r2, #7
	ldrls	pc, [pc, r2, asl #2]
	b	.L2
.L4:
	.word	.L8
	.word	.L3
	.word	.L3
	.word	.L7
	.word	.L3
	.word	.L6
	.word	.L5
	.word	.L3
.L3:
	ldr	r3, [r4, #8]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r4, #8]
	bl	cleanup_retrans_entry
	mov	r0, r4
	mov	r1, #0
	ldr	r3, .L13+8
	ldr	r3, [r3]
	str	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	send_fin
.L7:
	ldr	r3, .L13+12
	mov	r0, r4
	ldr	r1, [r3]
	bl	create_event
	ldr	r3, [r4, #8]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r4, #8]
	bl	cleanup_retrans_entry
	ldr	r3, .L13+16
	mov	r0, r4
	ldr	r3, [r3]
	str	r3, [r4]
	bl	add_ref_cm_node
	mov	r0, r4
	mov	r1, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	send_reset
.L6:
	ldr	r3, [r4, #8]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r4, #8]
	bl	cleanup_retrans_entry
	mov	r3, #129
	mov	r1, #0
	str	r3, [r4]
	mov	r0, r4
	bl	send_ack
	mov	r1, #0
	ldr	r3, .L13+20
	str	r1, [sp]
	ldr	r2, [r3]
	mov	r0, r4
	mov	r3, #1
	bl	schedule_nes_timer
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	ldr	r3, [r4, #8]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r4, #8]
	bl	cleanup_retrans_entry
	mov	r0, r4
	mov	r1, #0
	ldr	r3, .L13+24
	ldr	r3, [r3]
	str	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	send_ack
.L8:
	ldr	r3, [r4, #8]
	mov	r0, r4
	add	r3, r3, #1
	str	r3, [r4, #8]
	bl	cleanup_retrans_entry
	mov	r1, r4
	ldr	r3, .L13+16
	ldr	r0, [r4, #4]
	ldr	r3, [r3]
	str	r3, [r4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	rem_ref_cm_node
.L2:
	mov	r2, r4
	ldr	r0, [r5]
	ldr	r1, .L13+28
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, lr}
	b	nes_debug
.L14:
	.align	2
.L13:
	.word	NES_DBG_CM
	.word	.LC0
	.word	NES_CM_STATE_LAST_ACK
	.word	NES_CM_EVENT_ABORTED
	.word	NES_CM_STATE_CLOSED
	.word	NES_TIMER_TYPE_CLOSE
	.word	NES_CM_STATE_CLOSING
	.word	.LC1
	.size	handle_fin_pkt, .-handle_fin_pkt
	.comm	NES_TIMER_TYPE_CLOSE,4,4
	.comm	NES_DBG_CM,4,4
	.comm	NES_CM_STATE_LAST_ACK,4,4
	.comm	NES_CM_STATE_CLOSING,4,4
	.comm	NES_CM_STATE_CLOSED,4,4
	.comm	NES_CM_EVENT_ABORTED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
