Semiclassical maslov asymptotics with complex phases. I. General approach