```\nuint256 j = index;\n// Note: We're skipping the first 32 bytes of `proof`, which holds the size of the dynamically sized `bytes`\nfor (uint256 i = 32; i <= proof.length; i += 32) {\n    // solhint-disable-next-line no-inline-assembly\n    assembly {\n        proofElement := mload(add(proof, i))\n    }\n    if (j % 2 == 0) {\n        computedHash = keccak256(abi.encodePacked(NODE\_SALT, computedHash, proofElement));\n    } else {\n        computedHash = keccak256(abi.encodePacked(NODE\_SALT, proofElement, computedHash));\n    }\n    j = j / 2;\n}\n```\n