Ireland and Apple Inc. are close to a deal to protect the Irish government from any losses that could occur while it holds as much as