Urgent Corp basis HELPPP

Hi y'all hope everyone's studying is going well. I'm currently struggling with corp basis problems. Can anyone help me. I'm trying to write it all out in simplified form so that I can apply it easier. It's mainly the recognized G for each that I'm unsure. Specifically when one is receiving Cash from the corporation. Please let me know if you can correct my information. It would be the greatest help!! No control Shareholder basis: FMV property + FMV services + Cash contributed by shareholder Realized Gain: FMV property - adj basis Recognized Gain = Realized G ****???! Ordinary Inc = FMV services Corporation basis: FMV property Control Shareholder basis: adj basis + FMV services + Cash contributed by SH + Gain recognized - liabilities assumed Realized G= FMV property - adj basis Recognized G = (Adj basis + Cash contributed - liability assumed) -> basis to 0 OR Cash received from corp to the extent of the realized G. ****??! Ordinary inc = FMV services Corporation basis= FMV services + Cash contributed by SH + adj basis - liability assumed + recognized Gain by SH