extract_proofs: add branch part of ProofCheck algorithm