	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_add_chk_to_control        ## -- Begin function sctp_add_chk_to_control
	.p2align	4, 0x90
_sctp_add_chk_to_control:               ## @sctp_add_chk_to_control
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	$0, -44(%rbp)
	cmpq	$0, 32(%rdi)
	setne	%al
	testl	%r9d, %r9d
	sete	%r13b
	andb	%al, %r13b
	cmpb	$1, %r13b
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	callq	_SCTP_INP_READ_LOCK
LBB0_2:
	cmpq	$0, 56(%rbx)
	movq	16(%r15), %rsi
	je	LBB0_3
## %bb.4:
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sctp_add_to_tail_pointer
	jmp	LBB0_5
LBB0_3:
	movq	%rsi, 56(%rbx)
	movq	%rbx, %rdi
	callq	_sctp_setup_tail_pointer
LBB0_5:
	movl	12(%r15), %eax
	movl	%eax, 48(%rbx)
	movl	24(%r15), %eax
	subl	%eax, 8(%r12)
	movl	4(%r12), %edi
	callq	_sctp_ucount_decr
	movl	8(%r15), %esi
	movq	%r12, %rdi
	callq	_sctp_mark_non_revokable
	movq	$0, 16(%r15)
	movl	(%r15), %eax
	movq	_SCTP_DATA_FIRST_FRAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movl	$1, (%rbx)
	movl	8(%r15), %ecx
	movl	%ecx, 44(%rbx)
	movl	4(%r15), %ecx
	movl	%ecx, 40(%rbx)
LBB0_7:
	movq	_SCTP_DATA_LAST_FRAG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_18
## %bb.8:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	cmpq	$0, 32(%rbx)
	je	LBB0_17
## %bb.10:
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.11:
	movq	$0, 24(%rbx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	$0, 8(%rcx)
LBB0_12:
	movq	_SCTP_ON_UNORDERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	movq	_next_instrm@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	jmp	LBB0_16
LBB0_14:
	movq	_SCTP_ON_ORDERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:
	movq	_next_instrm@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r12), %edi
	callq	_sctp_ucount_decr
LBB0_16:
	movq	$0, 8(%rbx)
LBB0_17:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 16(%rbx)
LBB0_18:
	testb	%r13b, %r13b
	je	LBB0_20
## %bb.19:
	movl	(%r14), %edi
	callq	_SCTP_INP_READ_UNLOCK
LBB0_20:
	movq	_SCTP_SO_NOT_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sctp_free_a_chunk
	movl	-44(%rbp), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_DATA_FIRST_FRAG,4,2       ## @SCTP_DATA_FIRST_FRAG
	.comm	_SCTP_DATA_LAST_FRAG,4,2        ## @SCTP_DATA_LAST_FRAG
	.comm	_SCTP_ON_UNORDERED,8,3          ## @SCTP_ON_UNORDERED
	.comm	_next_instrm,4,2                ## @next_instrm
	.comm	_SCTP_ON_ORDERED,8,3            ## @SCTP_ON_ORDERED
	.comm	_SCTP_SO_NOT_LOCKED,4,2         ## @SCTP_SO_NOT_LOCKED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_add_chk_to_control        ; -- Begin function sctp_add_chk_to_control
	.p2align	2
_sctp_add_chk_to_control:               ; @sctp_add_chk_to_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x21, x0
	str	wzr, [sp, #12]
	ldr	x8, [x0, #32]
	cmp	w5, #0
	ccmp	x8, #0, #4, eq
	cset	w24, ne
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x20]
	bl	_SCTP_INP_READ_LOCK
LBB0_2:
	ldr	x8, [x21, #56]
	ldr	x1, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
	add	x2, sp, #12
	mov	x0, x21
	bl	_sctp_add_to_tail_pointer
	b	LBB0_5
LBB0_4:
	str	x1, [x21, #56]
	mov	x0, x21
	bl	_sctp_setup_tail_pointer
LBB0_5:
	ldr	w8, [x19, #12]
	str	w8, [x21, #48]
	ldr	w8, [x19, #24]
	ldp	w0, w9, [x22, #4]
	sub	w8, w9, w8
	str	w8, [x22, #8]
	bl	_sctp_ucount_decr
	ldr	w1, [x19, #8]
	mov	x0, x22
	bl	_sctp_mark_non_revokable
	str	xzr, [x19, #16]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SCTP_DATA_FIRST_FRAG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SCTP_DATA_FIRST_FRAG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	w9, #1
	str	w9, [x21]
	ldur	d0, [x19, #4]
	str	d0, [x21, #40]
LBB0_7:
Lloh3:
	adrp	x9, _SCTP_DATA_LAST_FRAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCTP_DATA_LAST_FRAG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.8:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_17
; %bb.9:
	ldr	x9, [x21, #32]
	cbz	x9, LBB0_17
; %bb.10:
	ldr	x9, [x21, #24]
	cbz	x9, LBB0_12
; %bb.11:
	str	xzr, [x21, #24]
	str	xzr, [x23, #8]
LBB0_12:
Lloh6:
	adrp	x9, _SCTP_ON_UNORDERED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SCTP_ON_UNORDERED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	add	x0, x23, #4
Lloh9:
	adrp	x8, _next_instrm@GOTPAGE
Lloh10:
	ldr	x8, [x8, _next_instrm@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x1, x21
	bl	_TAILQ_REMOVE
	b	LBB0_16
LBB0_14:
Lloh12:
	adrp	x9, _SCTP_ON_ORDERED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SCTP_ON_ORDERED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.15:
Lloh15:
	adrp	x8, _next_instrm@GOTPAGE
Lloh16:
	ldr	x8, [x8, _next_instrm@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x21
	bl	_TAILQ_REMOVE
	ldr	w0, [x22]
	bl	_sctp_ucount_decr
LBB0_16:
	str	xzr, [x21, #8]
LBB0_17:
	movi.2s	v0, #1
	str	d0, [x21, #16]
LBB0_18:
	cbz	w24, LBB0_20
; %bb.19:
	ldr	w0, [x20]
	bl	_SCTP_INP_READ_UNLOCK
LBB0_20:
Lloh18:
	adrp	x8, _SCTP_SO_NOT_LOCKED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SCTP_SO_NOT_LOCKED@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_sctp_free_a_chunk
	ldr	w0, [sp, #12]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_DATA_FIRST_FRAG,4,2       ; @SCTP_DATA_FIRST_FRAG
	.comm	_SCTP_DATA_LAST_FRAG,4,2        ; @SCTP_DATA_LAST_FRAG
	.comm	_SCTP_ON_UNORDERED,8,3          ; @SCTP_ON_UNORDERED
	.comm	_next_instrm,4,2                ; @next_instrm
	.comm	_SCTP_ON_ORDERED,8,3            ; @SCTP_ON_ORDERED
	.comm	_SCTP_SO_NOT_LOCKED,4,2         ; @SCTP_SO_NOT_LOCKED
.subsections_via_symbols
