Carnot engine (theorem) proof I am facing issues in the proof.
Some links to the proof of carnot engine:

*

*https://en.wikipedia.org/wiki/Carnot%27s_theorem_%28thermodynamics%29


*https://www.khanacademy.org/science/physics/thermodynamics/laws-of-thermodynamics/v/carnot-efficiency-3-proving-that-it-is-the-most-efficient
First of all, we took irreversible engine and Carnot engine. We stated that irreversible is more efficient than Carnot one. Then we disproved it by contradicting 2nd law. All is fine now.
But what if we took in those two engines again. And this time irreversible one is less efficient than Carnot engine. And make them go through same cycle as in video. Then how will it still be consistent with 2nd law?
Again, now suppose we did proved the above.
How does it matter in the proof whether engine is reversible or not? what role did it play in the proof (apart from saying reversible is most efficient)?
 A: First of all, we took irreversible engine and carnot engine. we stated that irreversible is more efficient than carnot one. then we disproved it by contradicting 2nd law. all fine now.
Not so fine. That the Carnot engine is the most efficient one was actually the initial version (prototype) of the second law of thermodynamics. Carnot deduced it from the premise
"Heat is an indestructible substance (caloric) that cannot be converted into work by the heat engine"
which then turned out to be false. Carnot discovered the falsehood and was going to abandon the (prototype of the) second law of thermodynamics but died prematurely. The proofs that you cite are logically correct but morally incorrect - the initial version of the second law is deduced from a later (Kelvin-Planck) one.
Here are Carnot's qualms:
http://www.nd.edu/~powers/ame.20231/carnot1897.pdf 
 REFLECTIONS ON THE MOTIVE POWER OF HEAT, Sadi Carnot: p. 225: "Heat is simply motive power, or rather motion which has changed form. It is a movement among the particles of bodies. Wherever there is destruction of motive power there is, at the same time, production of heat in quantity exactly proportional to the quantity of motive power destroyed. Reciprocally, wherever there is destruction of heat, there is production of motive power." p. 222: "Could a motion (that of radiating heat) produce matter (caloric)? No, undoubtedly; it can only produce a motion. Heat is then the result of a motion. Then it is plain that it could be produced by the consumption of motive power, and that it could produce this power. All the other phenomena - composition and decomposition of bodies, passage to the gaseous state, specific heat, equilibrium of heat, its more or less easy transmission, its constancy in experiments with the calorimeter - could be explained by this hypothesis. But it would be DIFFICULT TO EXPLAIN WHY, IN THE DEVELOPMENT OF MOTIVE POWER BY HEAT, A COLD BODY IS NECESSARY; why, in consuming the heat of a warm body, motion cannot be produced." 
