	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_user_rcvd
_sctp_user_rcvd:                        ## @sctp_user_rcvd
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.1:
	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	%rcx, %r12
	movl	%edx, %r15d
	movq	%rsi, %r13
	movq	%rdi, %rbx
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_add_int
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.2:
	movq	_SCTP_STATE_ABOUT_TO_BE_FREED@GOTPCREL(%rip), %rcx
	movq	_SCTP_STATE_SHUTDOWN_RECEIVED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	testl	%eax, (%rbx)
	jne	LBB0_16
## %bb.3:
	movq	24(%rbx), %rdi
	callq	_SCTP_INP_INCR_REF
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	movq	_SCTP_PCB_FLAGS_SOCKET_GONE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_15
## %bb.4:
	movq	_SCTP_PCB_FLAGS_SOCKET_ALLGONE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
LBB0_15:
	movq	24(%rbx), %rdi
	callq	_SCTP_INP_DECR_REF
LBB0_16:
	movq	%r14, %rdi
	movl	$-1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atomic_add_int                 ## TAILCALL
LBB0_17:
	retq
LBB0_5:
	cmpq	$0, 40(%rbx)
	je	LBB0_15
## %bb.6:
	leaq	32(%rbx), %rdi
	movl	(%r13), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_atomic_add_int
	movq	$0, (%r13)
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_sctp_calc_rwnd
	xorl	%ecx, %ecx
	subq	8(%rbx), %rax
	cmovgeq	%rax, %rcx
	cmpq	%r12, %rcx
	jge	LBB0_7
## %bb.18:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, (%rax)
	jmp	LBB0_15
LBB0_7:
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:
	movq	24(%rbx), %rdi
	callq	_SCTP_INP_READ_UNLOCK
LBB0_9:
	movq	_SCTP_STATE_ABOUT_TO_BE_FREED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	testl	%eax, (%rbx)
	jne	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	movq	%rcx, %r12
	callq	_SCTP_TCB_LOCK
	movl	(%r12), %eax
	testl	%eax, (%rbx)
	jne	LBB0_12
## %bb.11:
	movq	_sctps_wu_sacks_sent@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SCTP_STAT_INCR
	movq	_SCTP_SO_LOCKED@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_sctp_send_sack
	movq	24(%rbx), %rdi
	movq	_SCTP_OUTPUT_FROM_USR_RCVD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r12), %ecx
	movq	%rbx, %rsi
	callq	_sctp_chunk_output
	movq	_SCTP_TIMER_TYPE_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rsi
	movq	_SCTP_FROM_SCTPUTIL@GOTPCREL(%rip), %rax
	movq	_SCTP_LOC_6@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	addq	(%rax), %r8
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_sctp_timer_stop
LBB0_12:
	movq	%rbx, %rdi
	callq	_SCTP_TCB_UNLOCK
LBB0_13:
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.14:
	movq	24(%rbx), %rdi
	callq	_SCTP_INP_READ_LOCK
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_STATE_SHUTDOWN_ACK_SENT,8,3 ## @SCTP_STATE_SHUTDOWN_ACK_SENT
	.comm	_SCTP_STATE_ABOUT_TO_BE_FREED,4,2 ## @SCTP_STATE_ABOUT_TO_BE_FREED
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,4,2 ## @SCTP_STATE_SHUTDOWN_RECEIVED
	.comm	_SCTP_PCB_FLAGS_SOCKET_GONE,4,2 ## @SCTP_PCB_FLAGS_SOCKET_GONE
	.comm	_SCTP_PCB_FLAGS_SOCKET_ALLGONE,4,2 ## @SCTP_PCB_FLAGS_SOCKET_ALLGONE
	.comm	_sctps_wu_sacks_sent,4,2        ## @sctps_wu_sacks_sent
	.comm	_SCTP_SO_LOCKED,4,2             ## @SCTP_SO_LOCKED
	.comm	_SCTP_OUTPUT_FROM_USR_RCVD,4,2  ## @SCTP_OUTPUT_FROM_USR_RCVD
	.comm	_SCTP_TIMER_TYPE_RECV,4,2       ## @SCTP_TIMER_TYPE_RECV
	.comm	_SCTP_FROM_SCTPUTIL,8,3         ## @SCTP_FROM_SCTPUTIL
	.comm	_SCTP_LOC_6,8,3                 ## @SCTP_LOC_6
	.no_dead_strip	_sctp_user_rcvd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_user_rcvd
_sctp_user_rcvd:                        ; @sctp_user_rcvd
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_7
; %bb.1:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_remember_state
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	mov	w1, #1
	bl	_atomic_add_int
	mov	x0, x20
	bl	_SCTP_GET_STATE
Lloh0:
	adrp	x8, _SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.2:
	ldr	w8, [x20]
Lloh3:
	adrp	x25, _SCTP_STATE_ABOUT_TO_BE_FREED@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SCTP_STATE_ABOUT_TO_BE_FREED@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh5:
	adrp	x10, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x20, #24]
	bl	_SCTP_INP_INCR_REF
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SCTP_PCB_FLAGS_SOCKET_GONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SCTP_PCB_FLAGS_SOCKET_GONE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh11:
	adrp	x9, _SCTP_PCB_FLAGS_SOCKET_ALLGONE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SCTP_PCB_FLAGS_SOCKET_ALLGONE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_5:
	ldr	x0, [x20, #24]
	bl	_SCTP_INP_DECR_REF
LBB0_6:
	mov	x0, x19
	mov	w1, #-1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_atomic_add_int
LBB0_7:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	.cfi_same_value w23
	.cfi_same_value w24
	.cfi_same_value w25
	.cfi_same_value w26
	ret
LBB0_8:
	.cfi_restore_state
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_5
; %bb.9:
	add	x24, x20, #32
	ldr	w1, [x23]
	mov	x0, x24
	bl	_atomic_add_int
	str	xzr, [x23]
	mov	x0, x20
	mov	x1, x20
	bl	_sctp_calc_rwnd
	ldr	x8, [x20, #8]
	subs	x8, x0, x8
	csel	x8, xzr, x8, lt
	cmp	x8, x22
	b.ge	LBB0_11
; %bb.10:
	str	x8, [x24]
	b	LBB0_5
LBB0_11:
	cbz	w21, LBB0_13
; %bb.12:
	ldr	x0, [x20, #24]
	bl	_SCTP_INP_READ_UNLOCK
LBB0_13:
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_17
; %bb.14:
	mov	x0, x20
	bl	_SCTP_TCB_LOCK
	ldr	w8, [x20]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_16
; %bb.15:
Lloh14:
	adrp	x8, _sctps_wu_sacks_sent@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sctps_wu_sacks_sent@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_SCTP_STAT_INCR
Lloh17:
	adrp	x22, _SCTP_SO_LOCKED@GOTPAGE
Lloh18:
	ldr	x22, [x22, _SCTP_SO_LOCKED@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_sctp_send_sack
	ldr	x0, [x20, #24]
Lloh19:
	adrp	x8, _SCTP_OUTPUT_FROM_USR_RCVD@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SCTP_OUTPUT_FROM_USR_RCVD@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	ldr	w3, [x22]
	mov	x1, x20
	bl	_sctp_chunk_output
Lloh22:
	adrp	x8, _SCTP_TIMER_TYPE_RECV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SCTP_TIMER_TYPE_RECV@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _SCTP_FROM_SCTPUTIL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _SCTP_FROM_SCTPUTIL@GOTPAGEOFF]
	ldr	x1, [x20, #24]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _SCTP_LOC_6@GOTPAGE
Lloh29:
	ldr	x9, [x9, _SCTP_LOC_6@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	add	x4, x9, x8
	mov	x2, x20
	mov	x3, #0
	bl	_sctp_timer_stop
LBB0_16:
	mov	x0, x20
	bl	_SCTP_TCB_UNLOCK
LBB0_17:
	cbz	w21, LBB0_5
; %bb.18:
	ldr	x0, [x20, #24]
	bl	_SCTP_INP_READ_LOCK
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_STATE_SHUTDOWN_ACK_SENT,8,3 ; @SCTP_STATE_SHUTDOWN_ACK_SENT
	.comm	_SCTP_STATE_ABOUT_TO_BE_FREED,4,2 ; @SCTP_STATE_ABOUT_TO_BE_FREED
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,4,2 ; @SCTP_STATE_SHUTDOWN_RECEIVED
	.comm	_SCTP_PCB_FLAGS_SOCKET_GONE,4,2 ; @SCTP_PCB_FLAGS_SOCKET_GONE
	.comm	_SCTP_PCB_FLAGS_SOCKET_ALLGONE,4,2 ; @SCTP_PCB_FLAGS_SOCKET_ALLGONE
	.comm	_sctps_wu_sacks_sent,4,2        ; @sctps_wu_sacks_sent
	.comm	_SCTP_SO_LOCKED,4,2             ; @SCTP_SO_LOCKED
	.comm	_SCTP_OUTPUT_FROM_USR_RCVD,4,2  ; @SCTP_OUTPUT_FROM_USR_RCVD
	.comm	_SCTP_TIMER_TYPE_RECV,4,2       ; @SCTP_TIMER_TYPE_RECV
	.comm	_SCTP_FROM_SCTPUTIL,8,3         ; @SCTP_FROM_SCTPUTIL
	.comm	_SCTP_LOC_6,8,3                 ; @SCTP_LOC_6
	.no_dead_strip	_sctp_user_rcvd
.subsections_via_symbols
