This function posts the MIR and returns 0 for successful execution.
A call to the post function is only successful if all previous inserts for a MIR have succeeded. In the case of an error, the cycle write_mir_header, write_mir_header_nls, and write_inv_issues must be started again. In this case, all the data belonging to the MIR causing the error is deleted.