	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sctp_msg_append
_sctp_msg_append:                       ## @sctp_msg_append
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rax
	movq	%rdi, %rbx
	movq	(%rcx), %rcx
	cmpq	(%rdi), %rcx
	jae	LBB0_1
## %bb.2:
	cmpq	$0, 56(%rbx)
	je	LBB0_4
## %bb.3:
	cmpq	%rcx, 8(%rbx)
	jne	LBB0_1
LBB0_4:
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_SHUTDOWN_SENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.5:
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_SCTP_GET_STATE
	movq	_SCTP_STATE_SHUTDOWN_RECEIVED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_SCTP_STATE_SHUTDOWN_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_9
LBB0_8:
	movq	_SCTP_FROM_SCTP_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ECONNRESET@GOTPCREL(%rip), %r15
LBB0_10:
	movl	(%r15), %r8d
	xorl	%edi, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_SCTP_LTRACE_ERR_RET
	jmp	LBB0_11
LBB0_1:
	movq	_SCTP_FROM_SCTP_OUTPUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_EINVAL@GOTPCREL(%rip), %r15
	movl	(%r15), %r9d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_SCTP_LTRACE_ERR_RET_PKT
LBB0_11:
	movl	(%r15), %ebx
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_sctp_m_freem
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sctp_alloc_a_strmoq
	movq	_SCTP_FROM_SCTP_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_ENOMEM@GOTPCREL(%rip), %r15
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SCTP_FROM_SCTP_OUTPUT,4,2      ## @SCTP_FROM_SCTP_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCTP_STATE_SHUTDOWN_SENT,8,3   ## @SCTP_STATE_SHUTDOWN_SENT
	.comm	_SCTP_STATE_SHUTDOWN_ACK_SENT,8,3 ## @SCTP_STATE_SHUTDOWN_ACK_SENT
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,8,3 ## @SCTP_STATE_SHUTDOWN_RECEIVED
	.comm	_SCTP_STATE_SHUTDOWN_PENDING,4,2 ## @SCTP_STATE_SHUTDOWN_PENDING
	.comm	_ECONNRESET,4,2                 ## @ECONNRESET
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SCTP_ADDR_OVER,4,2             ## @SCTP_ADDR_OVER
	.comm	_SCTP_DATA,4,2                  ## @SCTP_DATA
	.comm	_next,4,2                       ## @next
	.no_dead_strip	_sctp_msg_append
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sctp_msg_append
_sctp_msg_append:                       ; @sctp_msg_append
	.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
	mov	x19, x2
	mov	x8, x1
	mov	x20, x0
	ldr	x9, [x3]
	ldr	x10, [x0]
	cmp	x9, x10
	b.hs	LBB0_9
; %bb.1:
	ldr	x10, [x20, #56]
	cbz	x10, LBB0_3
; %bb.2:
	ldr	x10, [x20, #8]
	cmp	x10, x9
	b.ne	LBB0_9
LBB0_3:
	mov	x0, x20
	bl	_SCTP_GET_STATE
Lloh0:
	adrp	x8, _SCTP_STATE_SHUTDOWN_SENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCTP_STATE_SHUTDOWN_SENT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_SCTP_GET_STATE
Lloh3:
	adrp	x8, _SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCTP_STATE_SHUTDOWN_ACK_SENT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_SCTP_GET_STATE
Lloh6:
	adrp	x8, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SCTP_STATE_SHUTDOWN_RECEIVED@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x20, #16]
Lloh9:
	adrp	x9, _SCTP_STATE_SHUTDOWN_PENDING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SCTP_STATE_SHUTDOWN_PENDING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
LBB0_7:
Lloh12:
	adrp	x8, _SCTP_FROM_SCTP_OUTPUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SCTP_FROM_SCTP_OUTPUT@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x21, _ECONNRESET@GOTPAGE
Lloh16:
	ldr	x21, [x21, _ECONNRESET@GOTPAGEOFF]
LBB0_8:
	ldr	w4, [x21]
	mov	x0, #0
	mov	x1, x20
	mov	x2, #0
	bl	_SCTP_LTRACE_ERR_RET
	ldr	w20, [x21]
	cbnz	x19, LBB0_10
	b	LBB0_11
LBB0_9:
Lloh17:
	adrp	x9, _SCTP_FROM_SCTP_OUTPUT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SCTP_FROM_SCTP_OUTPUT@GOTPAGEOFF]
Lloh19:
	ldr	w4, [x9]
Lloh20:
	adrp	x21, _EINVAL@GOTPAGE
Lloh21:
	ldr	x21, [x21, _EINVAL@GOTPAGEOFF]
	ldr	w5, [x21]
	mov	x0, x19
	mov	x1, #0
	mov	x2, x20
	mov	x3, x8
	bl	_SCTP_LTRACE_ERR_RET_PKT
	ldr	w20, [x21]
	cbz	x19, LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_sctp_m_freem
LBB0_11:
	mov	x0, x20
	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
LBB0_12:
	mov	x0, x20
	mov	x1, #0
	bl	_sctp_alloc_a_strmoq
Lloh22:
	adrp	x8, _SCTP_FROM_SCTP_OUTPUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SCTP_FROM_SCTP_OUTPUT@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x21, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x21, [x21, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_SCTP_FROM_SCTP_OUTPUT,4,2      ; @SCTP_FROM_SCTP_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCTP_STATE_SHUTDOWN_SENT,8,3   ; @SCTP_STATE_SHUTDOWN_SENT
	.comm	_SCTP_STATE_SHUTDOWN_ACK_SENT,8,3 ; @SCTP_STATE_SHUTDOWN_ACK_SENT
	.comm	_SCTP_STATE_SHUTDOWN_RECEIVED,8,3 ; @SCTP_STATE_SHUTDOWN_RECEIVED
	.comm	_SCTP_STATE_SHUTDOWN_PENDING,4,2 ; @SCTP_STATE_SHUTDOWN_PENDING
	.comm	_ECONNRESET,4,2                 ; @ECONNRESET
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SCTP_ADDR_OVER,4,2             ; @SCTP_ADDR_OVER
	.comm	_SCTP_DATA,4,2                  ; @SCTP_DATA
	.comm	_next,4,2                       ; @next
	.no_dead_strip	_sctp_msg_append
.subsections_via_symbols
