```\nfunction getParentAndBlockhash(bytes memory \_blockheader) public pure returns (bytes32 parentHash, bytes32 bhash) {\n\n    /// we need the 1st byte of the blockheader to calculate the position of the parentHash\n    uint8 first = uint8(\_blockheader[0]);\n\n    /// calculates the offset\n    /// by using the 1st byte (usually f9) and substracting f7 to get the start point of the parentHash information\n    /// we also have to add "2" = 1 byte to it to skip the length-information\n    require(first > 0xf7, "invalid offset");\n    uint8 offset = first - 0xf7 + 2;\n\n    /// we are using assembly because it's the most efficent way to access the parent blockhash within the rlp-encoded blockheader\n    // solium-disable-next-line security/no-inline-assembly\n    assembly { // solhint-disable-line no-inline-assembly\n        // mstore to get the memory pointer of the blockheader to 0x20\n        mstore(0x20, \_blockheader)\n\n        // we load the pointer we just stored\n        // then we add 0x20 (32 bytes) to get to the start of the blockheader\n        // then we add the offset we calculated\n        // and load it to the parentHash variable\n        parentHash :=mload(\n            add(\n                add(\n                    mload(0x20), 0x20\n                ), offset)\n        )\n    }\n    bhash = keccak256(\_blockheader);\n```\n