Consider func rewriteBlockAMD64 It spans lines 66518-69626 of rewriteAMD64go However  it calls (at line 66699) func log2  located at lines 369-370 of rewritego log2 is inlined Thus when the numberLines pass looks for the first and last lines of func rewriteBlockAMD64  it doesn't find lines 66518-69626  it finds lines 369-69626! It then allocates a giant sparsemap to accomodate all these lines