First, the IRS does not follow state court orders. The IRS only follows where the child actually physically lived more than half the nights of the year. If that was with you, you can claim the child as a dependent (assuming you meet the other usual tests). Print your return and file by mail, the IRS will investigate the discrepancy.
If you are not the parent where the child lived more than half the nights of the year, you can't claim the child unless you get a signed release form from the other parent, that you must mail to the IRS. If you don't have the signed release, you can't claim the child. Remove them from your return and file without. The IRS will not help you solve your family dispute, you must go through the family court.