((a)) ** Partner not acting in capacity as partner**
((1)) ** In general** If a partner engages in a transaction with a partnership other than in his capacity as a member of such partnership, the transaction shall, except as otherwise provided in this section, be considered as occurring between the partnership and one who is not a partner.
((2)) ** Treatment of payments to partners for property or services** Except as provided by the Secretary—
((A)) ** Treatment of certain services and transfers of property** If—
((i)) a partner performs services for a partnership or transfers property to a partnership,
((ii)) there is a related direct or indirect allocation and distribution to such partner, and
((iii)) the performance of such services (or such transfer) and the allocation and distribution, when viewed together, are properly characterized as a transaction occurring between the partnership and a partner acting other than in his capacity as a member of the partnership,
((B)) ** Treatment of certain property transfers** If—
((i)) there is a direct or indirect transfer of money or other property by a partner to a partnership,
((ii)) there is a related direct or indirect transfer of money or other property by the partnership to such partner (or another partner), and
((iii)) the transfers described in clauses (i) and (ii), when viewed together, are properly characterized as a sale or exchange of property,
((b)) ** Certain sales or exchanges of property with respect to controlled partnerships**
((1)) ** Losses disallowed** No deduction shall be allowed in respect of losses from sales or exchanges of property (other than an interest in the partnership), directly or indirectly, between—
((A)) a partnership and a person owning, directly or indirectly, more than 50 percent of the capital interest, or the profits interest, in such partnership, or
((B)) two partnerships in which the same persons own, directly or indirectly, more than 50 percent of the capital interests or profits interests.
((2)) ** Gains treated as ordinary income** In the case of a sale or exchange, directly or indirectly, of property, which in the hands of the transferee, is property other than a capital asset as defined in section 1221—
((A)) between a partnership and a person owning, directly or indirectly, more than 50 percent of the capital interest, or profits interest, in such partnership, or
((B)) between two partnerships in which the same persons own, directly or indirectly, more than 50 percent of the capital interests or profits interests,
((3)) ** Ownership of a capital or profits interest** For purposes of paragraphs (1) and (2) of this subsection, the ownership of a capital or profits interest in a partnership shall be determined in accordance with the rules for constructive ownership of stock provided in section 267(c) other than paragraph (3) of such section.
((c)) ** Guaranteed payments** To the extent determined without regard to the income of the partnership, payments to a partner for services or the use of capital shall be considered as made to one who is not a member of the partnership, but only for the purposes of section 61(a) (relating to gross income) and, subject to section 263, for purposes of section 162(a) (relating to trade or business expenses).