	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_handle_str_reset_add_out_strm
_sctp_handle_str_reset_add_out_strm:    ## @sctp_handle_str_reset_add_out_strm
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	4(%rdx), %edi
	callq	_ntohl
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_ntohs
	movl	(%r12), %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_8
## %bb.1:
	movq	16(%r12), %rcx
	movq	(%rcx), %rdx
	movq	%rdx, 8(%rcx)
	movq	_SCTP_ENABLE_CHANGE_ASSOC_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SCTP_STREAM_RESET_RESULT_DENIED@GOTPCREL(%rip), %rbx
	testl	%ecx, 4(%r12)
	je	LBB0_6
## %bb.2:
	cmpq	$0, 24(%r12)
	je	LBB0_4
## %bb.3:
	movq	_SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_8:
	leal	-1(%rcx), %eax
	cmpl	%r15d, %eax
	jne	LBB0_12
## %bb.9:
	movq	16(%r12), %rax
	jmp	LBB0_10
LBB0_12:
	addl	$-2, %ecx
	cmpl	%r15d, %ecx
	jne	LBB0_14
## %bb.13:
	movq	16(%r12), %rax
	movq	8(%rax), %rdx
	jmp	LBB0_11
LBB0_14:
	movq	_SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rdx
LBB0_11:
	movq	%r14, %rdi
	movl	%r15d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sctp_add_stream_reset_result   ## TAILCALL
LBB0_4:
	movl	8(%r12), %ecx
	addl	%eax, %ecx
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jg	LBB0_6
## %bb.5:
	movq	_SCTP_STREAM_RESET_RESULT_PERFORMED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	16(%r12), %rdx
	movq	%rcx, (%rdx)
	subq	$8, %rsp
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	pushq	$1
	pushq	$0
	pushq	%rax
	callq	_sctp_send_str_reset_req
	addq	$32, %rsp
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	(%rbx), %rax
	movq	16(%r12), %rcx
	movq	%rax, (%rcx)
LBB0_7:
	movq	16(%r12), %rax
	movq	(%rax), %rdx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_sctp_add_stream_reset_result
	incl	(%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_ENABLE_CHANGE_ASSOC_REQ,4,2 ## @SCTP_ENABLE_CHANGE_ASSOC_REQ
	.comm	_SCTP_STREAM_RESET_RESULT_DENIED,8,3 ## @SCTP_STREAM_RESET_RESULT_DENIED
	.comm	_SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS,8,3 ## @SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS
	.comm	_SCTP_STREAM_RESET_RESULT_PERFORMED,8,3 ## @SCTP_STREAM_RESET_RESULT_PERFORMED
	.comm	_SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO,8,3 ## @SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO
	.no_dead_strip	_sctp_handle_str_reset_add_out_strm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_handle_str_reset_add_out_strm
_sctp_handle_str_reset_add_out_strm:    ; @sctp_handle_str_reset_add_out_strm
	.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	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x2, #4]
	bl	_ntohl
	mov	x21, x0
	ldr	w0, [x22]
	bl	_ntohs
	ldr	w8, [x20]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x20, #16]
	ldr	x9, [x8]
	str	x9, [x8, #8]
	ldr	w8, [x20, #4]
Lloh0:
	adrp	x9, _SCTP_ENABLE_CHANGE_ASSOC_REQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCTP_ENABLE_CHANGE_ASSOC_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.2:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_11
; %bb.3:
Lloh3:
	adrp	x8, _SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS@GOTPAGEOFF]
	b	LBB0_14
LBB0_4:
	sub	w9, w8, #1
	cmp	w9, w21
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x20, #16]
	b	LBB0_9
LBB0_6:
	sub	w8, w8, #2
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x20, #16]
	ldr	x2, [x8, #8]
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO@GOTPAGEOFF]
LBB0_9:
	ldr	x2, [x8]
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	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	_sctp_add_stream_reset_result
LBB0_11:
	mov	x6, x0
	ldr	w8, [x20, #8]
	add	w8, w8, w6
	cmp	w8, #16, lsl #12                ; =65536
	b.ge	LBB0_13
; %bb.12:
Lloh7:
	adrp	x8, _SCTP_STREAM_RESET_RESULT_PERFORMED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SCTP_STREAM_RESET_RESULT_PERFORMED@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	str	x8, [x9]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x20
	mov	w1, #0
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #1
	mov	w7, #0
	bl	_sctp_send_str_reset_req
	cbz	x0, LBB0_15
LBB0_13:
Lloh10:
	adrp	x8, _SCTP_STREAM_RESET_RESULT_DENIED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCTP_STREAM_RESET_RESULT_DENIED@GOTPAGEOFF]
LBB0_14:
	ldr	x8, [x8]
	ldr	x9, [x20, #16]
	str	x8, [x9]
LBB0_15:
	ldr	x8, [x20, #16]
	ldr	x2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_sctp_add_stream_reset_result
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_ENABLE_CHANGE_ASSOC_REQ,4,2 ; @SCTP_ENABLE_CHANGE_ASSOC_REQ
	.comm	_SCTP_STREAM_RESET_RESULT_DENIED,8,3 ; @SCTP_STREAM_RESET_RESULT_DENIED
	.comm	_SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS,8,3 ; @SCTP_STREAM_RESET_RESULT_ERR_IN_PROGRESS
	.comm	_SCTP_STREAM_RESET_RESULT_PERFORMED,8,3 ; @SCTP_STREAM_RESET_RESULT_PERFORMED
	.comm	_SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO,8,3 ; @SCTP_STREAM_RESET_RESULT_ERR_BAD_SEQNO
	.no_dead_strip	_sctp_handle_str_reset_add_out_strm
.subsections_via_symbols
