func readDeferRecord(r io.ByteReader) {
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
}
(14) defer record
package heapfile
import (
	"encoding/binary"
	"fmt"
	"io"
	"os"
	"runtime"
)
var typeList map[uint64]*Type
var objectList map[uint64]*Object
var dumpParams *DumpParams
var memProf map[uint64]*Profile
var allocs []*Alloc
var goroutines []*Goroutine
var roots []*Root
var stackFrames map[uint64]*StackFrame
var dataSegment *Segment
var bss *Segment
var finalizers []*Finalizer
var queuedFinalizers []*Finalizer
func (h *HeapFile) parse() {
	if h.parsed {
		return
	}
	typeList = make(map[uint64]*Type, 0)
	objectList = make(map[uint64]*Object, 0)
	memProf = make(map[uint64]*Profile, 0)
	allocs = make([]*Alloc, 0)
	goroutines = make([]*Goroutine, 0)
	roots = make([]*Root, 0)
	stackFrames = make(map[uint64]*StackFrame, 0)
	dataSegment = &Segment{}
	bss = &Segment{}
	finalizers = make([]*Finalizer, 0)
	queuedFinalizers = make([]*Finalizer, 0)
	for {
		kind, err := binary.ReadUvarint(h.byteReader)
		if err != nil {
			fmt.Println("Error reading:", err)
			os.Exit(1)
		}
		switch kind {
		case 0:
			h.parsed = true
			return
		case 1:
			o := readObject(h.byteReader)
			objectList[o.Address] = o
		case 2:
			roots = append(roots, readOtherRoot(h.byteReader))
		case 3:
			t := readType(h.byteReader)
			typeList[t.Address] = t
		case 4:
			goroutines = append(goroutines, readGoroutine(h.byteReader))
		case 5:
			stackFrame := readStackFrame(h.byteReader)
			stackFrames[stackFrame.StackPointer] = stackFrame
		case 6:
			dumpParams = readDumpParams(h.byteReader)
		case 7:
			readFinalizer(h.byteReader)
		case 8:
			readiTab(h.byteReader)
		case 9:
			readOSThread(h.byteReader)
		case 10:
			h.memStats = readMemStats(h.byteReader)
		case 11:
			readQueuedFinalizer(h.byteReader)
		case 12:
			readDataSegment(h.byteReader)
		case 13:
			readBSS(h.byteReader)
		case 14:
			readDeferRecord(h.byteReader)
		case 15:
			readPanicRecord(h.byteReader)
		case 16:
			profile := readAllocFree(h.byteReader)
			memProf[profile.Record] = profile
		case 17:
			allocs = append(allocs, readAllocSampleRecord(h.byteReader))
		default:
			fmt.Println("Unknown object kind")
			os.Exit(1)
		}
	}
}
func readObject(r io.ByteReader) *Object {
	o := &Object{}
	o.Address = readUvarint(r)
	o.TypeAddress = readUvarint(r)
	o.kind = readUvarint(r)
	o.Content = readString(r)
	o.Size = len(o.Content)
	if o.TypeAddress != 0 {
		o.Type = typeList[o.TypeAddress]
	}
	return o
}
func readOtherRoot(r io.ByteReader) *Root {
	root := &Root{}
	root.Description = readString(r)
	root.Pointer = readUvarint(r)
	return root
}
func readType(r io.ByteReader) *Type {
	t := &Type{}
	t.Address = readUvarint(r)
	t.Size = readUvarint(r)
	t.Name = readString(r)
	t.IsPtr = readUvarint(r) == 1
	t.FieldList = readFieldList(r)
	return t
}
func readGoroutine(r io.ByteReader) *Goroutine {
	g := &Goroutine{}
	g.Address = readUvarint(r)
	g.Top = readUvarint(r)
	g.Id = readUvarint(r)
	g.Location = readUvarint(r)
	g.status = readUvarint(r)
	g.System = readUvarint(r) == 1
	g.Background = readUvarint(r) == 1
	g.LastWaiting = readUvarint(r)
	g.reasonWaiting = readString(r)
	g.CurrentFrame = readUvarint(r)
	g.OSThread = readUvarint(r)
	g.DeferRecord = readUvarint(r)
	g.PanicRecord = readUvarint(r)
	return g
}
func readStackFrame(r io.ByteReader) *StackFrame {
	sf := &StackFrame{}
	sf.StackPointer = readUvarint(r)       
	sf.DepthInStack = readUvarint(r)       
	sf.ChildFramePointer = readUvarint(r)  
	sf.Content = readString(r)             
	sf.EntryPC = readUvarint(r)            
	sf.CurrentPC = readUvarint(r)          
	sf.ContinuationPC = readUvarint(r)     
	sf.Name = readString(r)                
	sf.FieldList = readFieldList(r)        
	return sf
}
func readDumpParams(r io.ByteReader) *DumpParams {
	dumpParams := &DumpParams{}
	dumpParams.BigEndian = (readUvarint(r) == 0)
	dumpParams.PtrSize = readUvarint(r)
	dumpParams.ChHdrSize = readUvarint(r)
	dumpParams.StartAddress = readUvarint(r)
	dumpParams.EndAddress = readUvarint(r)
	dumpParams.Arch = readUvarint(r)
	dumpParams.GoExperiment = readString(r)
	dumpParams.NCPU = readUvarint(r)
	return dumpParams
}
func readFinalizer(r io.ByteReader) {
	f := &Finalizer{}
	f.ObjectAddress = readUvarint(r)
	f.FuncValPtr = readUvarint(r)
	f.PC = readUvarint(r)
	f.ArgType = readUvarint(r)
	f.ObjectType = readUvarint(r)
	finalizers = append(finalizers, f)
}
func readiTab(r io.ByteReader) {
	readUvarint(r)  
	readUvarint(r)  
}
func readOSThread(r io.ByteReader) {
	readUvarint(r)  
	readUvarint(r)  
	readUvarint(r)  
}
func readMemStats(r io.ByteReader) *runtime.MemStats {
	var memStats runtime.MemStats
	memStats.Alloc = readUvarint(r)         
	memStats.TotalAlloc = readUvarint(r)    
	memStats.Sys = readUvarint(r)           
	memStats.Lookups = readUvarint(r)       
	memStats.Mallocs = readUvarint(r)       
	memStats.Frees = readUvarint(r)         
	memStats.HeapAlloc = readUvarint(r)     
	memStats.HeapSys = readUvarint(r)       
	memStats.HeapIdle = readUvarint(r)      
	memStats.HeapInuse = readUvarint(r)     
	memStats.HeapReleased = readUvarint(r)  
	memStats.HeapObjects = readUvarint(r)   
	memStats.StackInuse = readUvarint(r)    
	memStats.StackSys = readUvarint(r)
	memStats.MSpanInuse = readUvarint(r)  
	memStats.MSpanSys = readUvarint(r)
	memStats.MCacheInuse = readUvarint(r)  
	memStats.MCacheSys = readUvarint(r)
	memStats.BuckHashSys = readUvarint(r)  
	memStats.GCSys = readUvarint(r)        
	memStats.OtherSys = readUvarint(r)     
	memStats.NextGC = readUvarint(r)       
	memStats.LastGC = readUvarint(r)       
	memStats.PauseTotalNs = readUvarint(r)
	for i := 0; i < 256; i++ {
		memStats.PauseNs[i] = readUvarint(r)
	}
	memStats.NumGC = uint32(readUvarint(r))
	return &memStats
}
func readQueuedFinalizer(r io.ByteReader) {
	f := &Finalizer{}
	f.ObjectAddress = readUvarint(r)
	f.FuncValPtr = readUvarint(r)
	f.PC = readUvarint(r)
	f.ArgType = readUvarint(r)
	f.ObjectType = readUvarint(r)
	queuedFinalizers = append(queuedFinalizers, f)
}
func readDataSegment(r io.ByteReader) {
	dataSegment.Address = readUvarint(r)
	dataSegment.Content = readString(r)
	dataSegment.Fields = readFieldList(r)
	populateFieldContent(dataSegment.Fields, dataSegment.Content)
}
func readBSS(r io.ByteReader) {
	bss.Address = readUvarint(r)
	bss.Content = readString(r)
	bss.Fields = readFieldList(r)
	populateFieldContent(bss.Fields, bss.Content)
}