Answer:
Winston truly believed that O'Brien was an ally because he did not want to feel alone in his ideas about the totalitarian government of Big Brother.
Even after interrogation, Winston still wonders about O'Brien allegiance to Big Brother, not knowing whether to believe or not that O'Brien is a government agent.
For these reasons, what Orwell is trying to convey is Winston's disbelief at the actions of O'Brien, and his gradual losing of hope.