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: pointer_unsafe.go
    path of file: ./repos/moby/vendor/github.com/gogo/protobuf/proto
    
    the code of the file until where you have to start completion: // Go support for Protocol Buffers - Google's data interchange format
//
// Copyright 2012 The Go Authors.  All rights reserved.
// https://github.com/golang/protobuf
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided tha
    
func toAddrPointer(i *interface{}, isptr bool) pointer {
	// Super-tricky - read or get the address of data word of interface value.
	if isptr {
		// The interface is of pointer type, thus it is a direct interface.
		// The data word is the pointer data itself. We take its address.
		return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
	}
	// The interface is not of pointer type. The data word is the pointer
	// to the data.
	return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
}