	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_calculate_cksum           ## -- Begin function sctp_calculate_cksum
	.p2align	4, 0x90
_sctp_calculate_cksum:                  ## @sctp_calculate_cksum
	.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	%rdi, %rbx
	movl	$4294967295, %r14d              ## imm = 0xFFFFFFFF
	testq	%rsi, %rsi
	jle	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	leaq	L_.str(%rip), %r12
	movq	%rsi, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	movq	%r12, %rsi
	callq	_KASSERT
	movq	(%rbx), %rdx
	subq	%rdx, %r13
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rbx), %rbx
	movq	%r13, %r15
	jg	LBB0_2
	jmp	LBB0_7
LBB0_4:
	movq	8(%rbx), %rsi
	addq	%r15, %rsi
	subl	%r15d, %edx
	movl	$4294967295, %edi               ## imm = 0xFFFFFFFF
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_6
LBB0_5:
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	%r14, %rdi
LBB0_6:
	callq	_calculate_crc32c
	movq	%rax, %r14
	movq	16(%rbx), %rbx
LBB0_7:
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.8:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sctp_finalize_crc32c           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sctp_calculate_cksum, offset > length of mbuf chain"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_calculate_cksum           ; -- Begin function sctp_calculate_cksum
	.p2align	2
_sctp_calculate_cksum:                  ; @sctp_calculate_cksum
	.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, x0
	cmp	x1, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x21, x1
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
	mov	w20, #-1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x19, #0
	cset	w0, ne
	mov	x1, x22
	bl	_KASSERT
	ldr	x8, [x19]
	subs	x9, x21, x8
	b.lt	LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x19, [x19, #16]
	mov	x21, x9
	cmp	x9, #0
	b.gt	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	w20, #-1
LBB0_5:
	cbz	x19, LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	mov	x0, x20
	bl	_calculate_crc32c
	mov	x20, x0
	ldr	x19, [x19, #16]
	cbnz	x19, LBB0_6
LBB0_7:
	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
	b	_sctp_finalize_crc32c
LBB0_8:
	ldr	x9, [x19, #8]
	add	x1, x9, x21
	sub	w2, w8, w21
	mov	w0, #-1
	bl	_calculate_crc32c
	mov	x20, x0
	ldr	x19, [x19, #16]
	cbnz	x19, LBB0_6
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sctp_calculate_cksum, offset > length of mbuf chain"

.subsections_via_symbols
