Where, in the code, in the Satoshi client is 21 million cap implemented? Which fragment of the Satoshi client is verifying if announced block has a valid reward?

I mean, we now live in the 25 BTC reward period. I guess client after receiving a newly minted block, does verifications, like checking if inputs and outputs are balancing for example, and, I guess, if the reward is 25 BTC, right?

So where is this fragment of the code?

I know where is the code which limits BTC supply to 21 million:

    int64 static GetBlockValue(int nHeight, int64 nFees)
    {
        int64 nSubsidy = 50 * COIN;

        // Subsidy is cut in half every 210000 blocks, which will occur approximately every 4 years
        nSubsidy &gt;&gt;= (nHeight / 210000);

        return nSubsidy + nFees;
    }


...and I am looking for somebody to point me to the right place, where the verification is done.
There are 3 places where GetBlockValue is called. One is on incoming blocks, one is on blocks we're mining, and one is an error message. This is the one for incoming blocks:

if (vtx[0].GetValueOut() &gt; GetBlockValue(pindex-&gt;nHeight, nFees))
    return state.DoS(100, error("ConnectBlock() : coinbase pays too much (actual=%"PRI64d" vs limit=%"PRI64d")", vtx[0].GetValueOut(), GetBlockValue(pindex-&gt;nHeight, nFees)));


Source

This looks at the first transaction (the coinbase transaction) and checks the value. If it is larger than the subsidy plus the fees, then the block is rejected and the node that sent the block is blacklisted.