People tend to overestimate the actual complexity of code for a space shuttle; it's rocket science, therefore it must be some sort of complex black magic.
Most of the space shuttle is going to boil down to control theory. The code for a control system essentially looks like this:
while (true) {
readInputs();
smoothInputs();
computeUserDesiredSetpoints();
adjustVariablesToHitSetpoints();
makeActuatorsMove();
}
These functions are not computationally challenging. Even the complex mathematics boils down to "evaluate this function", and you can often get away without needing high precision if you have a feedback mechanism that can adjust for systematic error. There's also a lot of leeway on how simple or complex you can make the user direction: it is far more complex to implement a "perform a translunar injection orbit" than it is to say "burn thrusters at X heading at Y thrust for Z seconds" (think the difference between self-driving cars and cruise control).