	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TcpChecksum                    ## -- Begin function TcpChecksum
	.p2align	4, 0x90
_TcpChecksum:                           ## @TcpChecksum
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %ebx
	movl	24(%rdi), %edi
	callq	_ntohs
	movl	%eax, %r14d
	shll	$2, %ebx
	subl	%ebx, %r14d
	movq	%r15, %rdi
	callq	_ip_next
	cmpl	$2, %r14d
	jl	LBB0_1
## %bb.2:
	leal	2(%r14), %ecx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	addl	(%rax), %ebx
	addq	$8, %rax
	movslq	%ebx, %rbx
	addl	$-2, %ecx
	cmpl	$3, %ecx
	ja	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_4:
	movdqu	16(%r15), %xmm0
	movdqu	20(%r15), %xmm1
	paddq	%xmm0, %xmm1
	movdqa	%xmm1, -48(%rbp)                ## 16-byte Spill
	movslq	%r14d, %rdi
	callq	_htons
	movq	%rax, %r14
	movq	8(%r15), %rdi
	callq	_htons
	movdqa	-48(%rbp), %xmm1                ## 16-byte Reload
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddq	%xmm1, %xmm0
	movd	%xmm0, %ecx
	addl	%ecx, %ebx
	addl	%ebx, %r14d
	addl	%r14d, %eax
	movzwl	%ax, %ecx
                                        ## kill: def $eax killed $eax killed $rax
	sarl	$16, %eax
	addl	%eax, %ecx
	movl	%ecx, %eax
	sarl	$16, %eax
	addl	%ecx, %eax
	notl	%eax
	cltq
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TcpChecksum                    ; -- Begin function TcpChecksum
	.p2align	2
_TcpChecksum:                           ; @TcpChecksum
	.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
	ldr	w20, [x0]
	ldr	w0, [x0, #24]
	bl	_ntohs
	sub	w20, w0, w20, lsl #2
	mov	x0, x19
	bl	_ip_next
	cmp	w20, #2
	b.lt	LBB0_3
; %bb.1:
	mov	x8, #0
	add	w9, w20, #2
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x0], #8
	add	w8, w10, w8
	sxtw	x8, w8
	sub	w9, w9, #2
	cmp	w9, #3
	b.hi	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	x8, #0
LBB0_4:
	ldp	w10, w9, [x19, #16]
	ldp	w12, w11, [x19, #24]
	add	w8, w9, w8
	add	w8, w8, w11
	add	w8, w8, w10
	add	w21, w8, w12
	sxtw	x0, w20
	bl	_htons
	add	w20, w21, w0
	ldr	x0, [x19, #8]
	bl	_htons
	add	w8, w20, w0
	asr	w9, w8, #16
	add	w8, w9, w8, uxth
	add	w8, w8, w8, asr #16
	mvn	w8, w8
	sxtw	x0, w8
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
