You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: checksum.go
    path of file: ./repos/sliver/vendor/github.com/tailscale/wireguard-go/tun
    
    the code of the file until where you have to start completion: package tun

import (
	"encoding/binary"
	"math/bits"
	"strconv"

	"golang.org/x/sys/cpu"
)

// checksumGeneric64 is a reference implementation of checksum using 64 bit
// arithmetic for use in testing or when an architecture-specific implementation
// is not available.
func checksumGeneric64(b []byte, initial uint16) uint16 {
	var ac uint64
	var carry uint64

	if cpu.IsBigEndian {
		ac = uint64(initial)
	} else {
		ac = uint64(bits
    
func pseudoHeaderChecksum64(protocol uint8, srcAddr, dstAddr []byte, totalLen uint16) uint16 {
	var sum uint64
	if cpu.IsBigEndian {
		sum = uint64(totalLen) + uint64(protocol)
	} else {
		sum = uint64(bits.ReverseBytes16(totalLen)) + uint64(protocol)<<8
	}
	sum, carry := addrPartialChecksum64(srcAddr, sum, 0)
	sum, carry = addrPartialChecksum64(dstAddr, sum, carry)

	foldedSum := ipChecksumFold64(sum, carry)
	if !cpu.IsBigEndian {
		foldedSum = bits.ReverseBytes16(foldedSum)
	}
	return foldedSum
}