	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_flush                     ## -- Begin function sctp_flush
	.p2align	4, 0x90
_sctp_flush:                            ## @sctp_flush
	.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	48(%rdi), %r13
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	%r13, %rdi
	callq	_SCTP_INP_RLOCK
	movq	_SCTP_PCB_FLAGS_UDPTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%r13), %ebx
	movq	%r13, %rdi
	callq	_SCTP_INP_RUNLOCK
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.3:
	movq	_PRU_FLUSH_RD@GOTPCREL(%rip), %rax
	movq	_PRU_FLUSH_RDWR@GOTPCREL(%rip), %rbx
	cmpl	%r14d, (%rax)
	je	LBB0_5
## %bb.4:
	movl	(%rbx), %eax
	cmpl	%r14d, %eax
	jne	LBB0_6
LBB0_5:
	movq	%r13, %rdi
	callq	_SCTP_INP_WLOCK
	movq	%r13, %rdi
	callq	_SCTP_INP_READ_LOCK
	movq	_SCTP_PCB_FLAGS_SOCKET_CANT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
	movq	%r13, %rdi
	callq	_SCTP_INP_READ_UNLOCK
	movq	%r13, %rdi
	callq	_SCTP_INP_WUNLOCK
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r12)
	movq	$0, 40(%r12)
	movl	(%rbx), %eax
LBB0_6:
	movq	_PRU_FLUSH_WR@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	je	LBB0_8
## %bb.7:
	cmpl	%r14d, %eax
	jne	LBB0_9
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
	jmp	LBB0_9
LBB0_1:
	movq	_SCTP_FROM_SCTP_USRREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_EINVAL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_SCTP_LTRACE_ERR_RET
	movl	(%rbx), %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_FROM_SCTP_USRREQ,4,2      ## @SCTP_FROM_SCTP_USRREQ
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCTP_PCB_FLAGS_UDPTYPE,4,2     ## @SCTP_PCB_FLAGS_UDPTYPE
	.comm	_PRU_FLUSH_RD,4,2               ## @PRU_FLUSH_RD
	.comm	_PRU_FLUSH_RDWR,4,2             ## @PRU_FLUSH_RDWR
	.comm	_SCTP_PCB_FLAGS_SOCKET_CANT_READ,4,2 ## @SCTP_PCB_FLAGS_SOCKET_CANT_READ
	.comm	_PRU_FLUSH_WR,4,2               ## @PRU_FLUSH_WR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_flush                     ; -- Begin function sctp_flush
	.p2align	2
_sctp_flush:                            ; @sctp_flush
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x21, [x0, #48]
	cbz	x21, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x0, x21
	bl	_SCTP_INP_RLOCK
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _SCTP_PCB_FLAGS_UDPTYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCTP_PCB_FLAGS_UDPTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w22, w9, w8
	mov	x0, x21
	bl	_SCTP_INP_RUNLOCK
	cbz	w22, LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
Lloh3:
	adrp	x8, _SCTP_FROM_SCTP_USRREQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCTP_FROM_SCTP_USRREQ@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x19, _EINVAL@GOTPAGE
Lloh7:
	ldr	x19, [x19, _EINVAL@GOTPAGEOFF]
	ldr	w4, [x19]
	mov	x0, #0
	mov	x1, #0
	mov	x2, #0
	bl	_SCTP_LTRACE_ERR_RET
	ldr	w0, [x19]
	b	LBB0_8
LBB0_4:
Lloh8:
	adrp	x8, _PRU_FLUSH_RD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PRU_FLUSH_RD@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x8]
Lloh11:
	adrp	x22, _PRU_FLUSH_RDWR@GOTPAGE
Lloh12:
	ldr	x22, [x22, _PRU_FLUSH_RDWR@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w9, w20
	ccmp	w8, w20, #4, ne
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x21
	bl	_SCTP_INP_WLOCK
	mov	x0, x21
	bl	_SCTP_INP_READ_LOCK
Lloh13:
	adrp	x8, _SCTP_PCB_FLAGS_SOCKET_CANT_READ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SCTP_PCB_FLAGS_SOCKET_CANT_READ@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	mov	x0, x21
	bl	_SCTP_INP_READ_UNLOCK
	mov	x0, x21
	bl	_SCTP_INP_WUNLOCK
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #24]
	ldr	w8, [x22]
LBB0_6:
Lloh16:
	adrp	x9, _PRU_FLUSH_WR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PRU_FLUSH_WR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w9, w20
	mov	w0, #0
	ccmp	w8, w20, #4, ne
	b.ne	LBB0_8
; %bb.7:
	stp	xzr, xzr, [x19]
	str	xzr, [x19, #16]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_FROM_SCTP_USRREQ,4,2      ; @SCTP_FROM_SCTP_USRREQ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCTP_PCB_FLAGS_UDPTYPE,4,2     ; @SCTP_PCB_FLAGS_UDPTYPE
	.comm	_PRU_FLUSH_RD,4,2               ; @PRU_FLUSH_RD
	.comm	_PRU_FLUSH_RDWR,4,2             ; @PRU_FLUSH_RDWR
	.comm	_SCTP_PCB_FLAGS_SOCKET_CANT_READ,4,2 ; @SCTP_PCB_FLAGS_SOCKET_CANT_READ
	.comm	_PRU_FLUSH_WR,4,2               ; @PRU_FLUSH_WR
.subsections_via_symbols
