But in choosing the President, the votes shall be taken by states, the representation from each state having one vote; a quorum for this purpose shall consist of a member or members from two-thirds of the states, and a majority of all the states shall be necessary to a choice.
From "a majority of all the states shall be necessary to a choice", I take it that there needs to be a majority of positive votes in at least twenty-six of the fifty states. Ties aren't a positive vote for one candidate or another, so they don't count. If no candidate gets twenty-six states, then the original text from the twelfth amendment was
And if the House of Representatives shall not choose a President whenever the right of choice shall devolve upon them, before the fourth day of March next following, then the Vice-President shall act as President, as in the case of the death or other constitutional disability of the President.
This is generally considered to have been superseded by the twentieth amendment, which includes
Section 3. If, at the time fixed for the beginning of the term of the President, the President elect shall have died, the Vice President elect shall become President. If a President shall not have been chosen before the time fixed for the beginning of his term, or if the President elect shall have failed to qualify, then the Vice President elect shall act as President until a President shall have qualified; and the Congress may by law provide for the case wherein neither a President elect nor a Vice President elect shall have qualified, declaring who shall then act as President, or the manner in which one who is to act shall be selected, and such person shall act accordingly until a President or Vice President shall have qualified.
Both these basically agree. If the House, due to ties or other reasons, can't choose a President, the Vice-President chosen by the electors or the Senate becomes President. The twentieth amendment also considers the possibility that there will be no Vice-President chosen. If that happens, Congress has the authority to pass a law providing for the selection of a President.
Any of these choices might get litigated, and there is no precedent for it except the election of 1824. In that election, the vote was clear. Adams won thirteen of the twenty-four states. Every state voted and no state tied. Every state had a majority winner even. We don't even have a precedent for a plurality win in a state.