	.file	"extr_sctp_usrreq.c_sctp_flush.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sctp_flush
	.type	sctp_flush, @function
sctp_flush:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 48[rdi]
	test	rbp, rbp
	je	.L12
	mov	rbx, rdi
	mov	rdi, rbp
	mov	r12d, esi
	call	SCTP_INP_RLOCK@PLT
	mov	r13d, DWORD PTR 0[rbp]
	mov	rdi, rbp
	and	r13d, DWORD PTR SCTP_PCB_FLAGS_UDPTYPE[rip]
	jne	.L13
	call	SCTP_INP_RUNLOCK@PLT
	cmp	DWORD PTR PRU_FLUSH_RD[rip], r12d
	je	.L5
	cmp	DWORD PTR PRU_FLUSH_RDWR[rip], r12d
	je	.L5
	cmp	r12d, DWORD PTR PRU_FLUSH_WR[rip]
	jne	.L1
.L8:
	mov	QWORD PTR 16[rbx], 0
	mov	eax, r13d
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR [rbx], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	call	SCTP_INP_RUNLOCK@PLT
	xor	r13d, r13d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	r8d, DWORD PTR EINVAL[rip]
	xor	edx, edx
	xor	esi, esi
	xor	edi, edi
	mov	ecx, DWORD PTR SCTP_FROM_SCTP_USRREQ[rip]
	call	SCTP_LTRACE_ERR_RET@PLT
	mov	r13d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r13d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, rbp
	call	SCTP_INP_WLOCK@PLT
	mov	rdi, rbp
	call	SCTP_INP_READ_LOCK@PLT
	mov	eax, DWORD PTR SCTP_PCB_FLAGS_SOCKET_CANT_READ[rip]
	or	DWORD PTR 0[rbp], eax
	mov	rdi, rbp
	call	SCTP_INP_READ_UNLOCK@PLT
	mov	rdi, rbp
	call	SCTP_INP_WUNLOCK@PLT
	cmp	DWORD PTR PRU_FLUSH_WR[rip], r12d
	mov	QWORD PTR 40[rbx], 0
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 24[rbx], 0
	je	.L8
	cmp	DWORD PTR PRU_FLUSH_RDWR[rip], r12d
	je	.L8
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	sctp_flush, .-sctp_flush
	.comm	SCTP_PCB_FLAGS_UDPTYPE,4,4
	.comm	SCTP_PCB_FLAGS_SOCKET_CANT_READ,4,4
	.comm	SCTP_FROM_SCTP_USRREQ,4,4
	.comm	PRU_FLUSH_WR,4,4
	.comm	PRU_FLUSH_RDWR,4,4
	.comm	PRU_FLUSH_RD,4,4
	.comm	EINVAL,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_sctp_usrreq.c_sctp_flush.c"
	.text
	.align	2
	.global	sctp_flush
	.syntax unified
	.arm
	.fpu softvfp
	.type	sctp_flush, %function
sctp_flush:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r4, [r0, #24]
	sub	sp, sp, #12
	cmp	r4, #0
	beq	.L12
	mov	r5, r0
	mov	r0, r4
	mov	r7, r1
	bl	SCTP_INP_RLOCK
	ldr	r3, .L14
	ldr	r6, [r4]
	ldr	r3, [r3]
	mov	r0, r4
	ands	r6, r6, r3
	bne	.L13
	bl	SCTP_INP_RUNLOCK
	ldr	r3, .L14+4
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L5
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L5
	ldr	r3, .L14+12
	ldr	r3, [r3]
	cmp	r7, r3
	bne	.L1
.L8:
	mov	r3, #0
	mov	r0, r6
	str	r3, [r5, #8]
	str	r3, [r5, #4]
	str	r3, [r5]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L13:
	bl	SCTP_INP_RUNLOCK
	mov	r6, #0
.L1:
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L12:
	ldr	r5, .L14+16
	ldr	r3, .L14+20
	ldr	r2, [r5]
	ldr	r3, [r3]
	mov	r1, r4
	str	r2, [sp]
	mov	r0, r4
	mov	r2, r4
	bl	SCTP_LTRACE_ERR_RET
	ldr	r6, [r5]
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L5:
	mov	r0, r4
	bl	SCTP_INP_WLOCK
	mov	r0, r4
	bl	SCTP_INP_READ_LOCK
	ldr	r2, .L14+24
	ldr	r3, [r4]
	ldr	r2, [r2]
	mov	r0, r4
	orr	r3, r3, r2
	str	r3, [r4]
	bl	SCTP_INP_READ_UNLOCK
	mov	r0, r4
	bl	SCTP_INP_WUNLOCK
	mov	r3, #0
	ldr	r2, .L14+12
	str	r3, [r5, #20]
	ldr	r2, [r2]
	str	r3, [r5, #16]
	cmp	r2, r7
	str	r3, [r5, #12]
	beq	.L8
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L8
	b	.L1
.L15:
	.align	2
.L14:
	.word	SCTP_PCB_FLAGS_UDPTYPE
	.word	PRU_FLUSH_RD
	.word	PRU_FLUSH_RDWR
	.word	PRU_FLUSH_WR
	.word	EINVAL
	.word	SCTP_FROM_SCTP_USRREQ
	.word	SCTP_PCB_FLAGS_SOCKET_CANT_READ
	.size	sctp_flush, .-sctp_flush
	.comm	SCTP_PCB_FLAGS_UDPTYPE,4,4
	.comm	SCTP_PCB_FLAGS_SOCKET_CANT_READ,4,4
	.comm	SCTP_FROM_SCTP_USRREQ,4,4
	.comm	PRU_FLUSH_WR,4,4
	.comm	PRU_FLUSH_RDWR,4,4
	.comm	PRU_FLUSH_RD,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
