def C1040(c05800, c07180, c07200, c07220, c07230, c07240, c07260, c07300,
          c07400, c07600, c08000, e09700, e09800, e09900, niit, othertaxes,
          c07100, c09200, odc, charity_credit,
          personal_nonrefundable_credit, icgtc, iratc, evtc):
    """
    Computes total used nonrefundable credits, c07100, othertaxes, and
    income tax before refundable credits, c09200.
    """
    # total used nonrefundable credits (as computed in NonrefundableCredits)
    c07100 = (c07180 + c07200 + c07600 + c07300 + c07400 + c07220 + c08000 +
              c07230 + c07240 + c07260 + odc + charity_credit +
              personal_nonrefundable_credit + icgtc + iratc + evtc)
    # tax after credits (2016 Form 1040, line 56)
    tax_net_nonrefundable_credits = max(0., c05800 - c07100)
    # tax (including othertaxes) before refundable credits
    othertaxes = e09700 + e09800 + e09900 + niit
    c09200 = othertaxes + tax_net_nonrefundable_credits
    return (c07100, othertaxes, c09200)