The company spent $1.8 billion on restructuring costs as it cited AI deployment as a driver of workforce reductions