	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_prep                      ## -- Begin function sctp_prep
	.p2align	4, 0x90
_sctp_prep:                             ## @sctp_prep
	.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	%rdi, %r14
	movq	_outp@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_ident@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movl	%eax, (%r15)
	movq	_port@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_fixedPort@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	$0, (%rcx)
	movl	$0, %edi
	jne	LBB0_2
## %bb.1:
	movl	(%r14), %edi
LBB0_2:
	addl	%eax, %edi
	callq	_htons
	movl	%eax, 4(%r15)
	movq	_protlen@GOTPCREL(%rip), %r14
	cmpl	$87, (%r14)
	jg	LBB0_4
## %bb.3:
	movl	(%r15), %ebx
	shll	$16, %ebx
	orl	%eax, %ebx
LBB0_4:
	movl	%ebx, 8(%r15)
	xorl	%edi, %edi
	callq	_htonl
	movq	%rax, 16(%r15)
	movl	(%r14), %edi
	cmpl	$88, %edi
	jl	LBB0_7
## %bb.5:
	movq	_SCTP_INITIATION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r15)
	movq	$0, 72(%r15)
	addl	$-24, %edi
	callq	_htons
	movq	%rax, 64(%r15)
	movl	(%r15), %eax
	shll	$16, %eax
	orl	4(%r15), %eax
	movl	%eax, 24(%r15)
	movl	$1500, %edi                     ## imm = 0x5DC
	callq	_htonl
	movq	%rax, 56(%r15)
	movl	$1, %edi
	callq	_htons
	movq	%rax, 48(%r15)
	movl	$1, %edi
	callq	_htons
	movq	%rax, 40(%r15)
	xorl	%edi, %edi
	callq	_htonl
	movq	%rax, 32(%r15)
	cmpl	$104, (%r14)
	jl	LBB0_10
## %bb.6:
	movq	_SCTP_PAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	movq	%rax, 96(%r15)
	movl	(%r14), %edi
	addl	$-88, %edi
	callq	_htons
	movq	%rax, 88(%r15)
	jmp	LBB0_10
LBB0_7:
	cmpl	$48, %edi
	jl	LBB0_10
## %bb.8:
	movq	_SCTP_SHUTDOWN_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	$0, 32(%r15)
	movl	$4, %edi
	callq	_htons
	movq	%rax, 24(%r15)
	movl	(%r14), %edi
	cmpl	$72, %edi
	jl	LBB0_10
## %bb.9:
	movq	_SCTP_PAD_CHUNK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r15)
	movq	$0, 56(%r15)
	addl	$-48, %edi
	callq	_htons
	movq	%rax, 48(%r15)
LBB0_10:
	movq	_doipcksum@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_12
## %bb.11:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_sctp_crc32c
	movq	%rax, 16(%r15)
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_outp,8,3                       ## @outp
	.comm	_ident,4,2                      ## @ident
	.comm	_port,4,2                       ## @port
	.comm	_fixedPort,8,3                  ## @fixedPort
	.comm	_protlen,4,2                    ## @protlen
	.comm	_SCTP_INITIATION,4,2            ## @SCTP_INITIATION
	.comm	_SCTP_PAD,4,2                   ## @SCTP_PAD
	.comm	_SCTP_SHUTDOWN_ACK,4,2          ## @SCTP_SHUTDOWN_ACK
	.comm	_SCTP_PAD_CHUNK,4,2             ## @SCTP_PAD_CHUNK
	.comm	_doipcksum,8,3                  ## @doipcksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sctp_prep                      ; -- Begin function sctp_prep
	.p2align	2
_sctp_prep:                             ; @sctp_prep
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _outp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _outp@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x8, _ident@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ident@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_htons
	str	w0, [x19]
Lloh6:
	adrp	x8, _port@GOTPAGE
Lloh7:
	ldr	x8, [x8, _port@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _fixedPort@GOTPAGE
Lloh10:
	ldr	x9, [x9, _fixedPort@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cbz	x9, LBB0_2
; %bb.1:
	mov	w9, #0
	b	LBB0_3
LBB0_2:
	ldr	w9, [x20]
LBB0_3:
	add	w0, w9, w8
	bl	_htons
	str	w0, [x19, #4]
Lloh12:
	adrp	x20, _protlen@GOTPAGE
Lloh13:
	ldr	x20, [x20, _protlen@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #87
	b.le	LBB0_5
; %bb.4:
	mov	w8, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [x19]
	orr	w8, w0, w8, lsl #16
LBB0_6:
	str	w8, [x19, #8]
	mov	w0, #0
	bl	_htonl
	str	x0, [x19, #16]
	ldr	w8, [x20]
	cmp	w8, #88
	b.lt	LBB0_9
; %bb.7:
Lloh14:
	adrp	x9, _SCTP_INITIATION@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SCTP_INITIATION@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	str	w9, [x19, #80]
	str	xzr, [x19, #72]
	sub	w0, w8, #24
	bl	_htons
	str	x0, [x19, #64]
	ldp	w8, w9, [x19]
	orr	w8, w9, w8, lsl #16
	str	w8, [x19, #24]
	mov	w0, #1500
	bl	_htonl
	str	x0, [x19, #56]
	mov	w0, #1
	bl	_htons
	str	x0, [x19, #48]
	mov	w0, #1
	bl	_htons
	str	x0, [x19, #40]
	mov	w0, #0
	bl	_htonl
	str	x0, [x19, #32]
	ldr	w8, [x20]
	cmp	w8, #104
	b.lt	LBB0_12
; %bb.8:
Lloh17:
	adrp	x8, _SCTP_PAD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SCTP_PAD@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_htons
	str	x0, [x19, #96]
	ldr	w8, [x20]
	sub	w0, w8, #88
	bl	_htons
	str	x0, [x19, #88]
	b	LBB0_12
LBB0_9:
	cmp	w8, #48
	b.lt	LBB0_12
; %bb.10:
Lloh20:
	adrp	x8, _SCTP_SHUTDOWN_ACK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SCTP_SHUTDOWN_ACK@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	str	xzr, [x19, #32]
	mov	w0, #4
	bl	_htons
	str	x0, [x19, #24]
	ldr	w8, [x20]
	cmp	w8, #72
	b.lt	LBB0_12
; %bb.11:
Lloh23:
	adrp	x9, _SCTP_PAD_CHUNK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SCTP_PAD_CHUNK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	str	w9, [x19, #64]
	str	xzr, [x19, #56]
	sub	w0, w8, #48
	bl	_htons
	str	x0, [x19, #48]
LBB0_12:
Lloh26:
	adrp	x8, _doipcksum@GOTPAGE
Lloh27:
	ldr	x8, [x8, _doipcksum@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sctp_crc32c
	str	x0, [x19, #16]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_outp,8,3                       ; @outp
	.comm	_ident,4,2                      ; @ident
	.comm	_port,4,2                       ; @port
	.comm	_fixedPort,8,3                  ; @fixedPort
	.comm	_protlen,4,2                    ; @protlen
	.comm	_SCTP_INITIATION,4,2            ; @SCTP_INITIATION
	.comm	_SCTP_PAD,4,2                   ; @SCTP_PAD
	.comm	_SCTP_SHUTDOWN_ACK,4,2          ; @SCTP_SHUTDOWN_ACK
	.comm	_SCTP_PAD_CHUNK,4,2             ; @SCTP_PAD_CHUNK
	.comm	_doipcksum,8,3                  ; @doipcksum
.subsections_via_symbols
