Warning: technical mumbo jumbo follows.
At proc time, it checks how much crit, haste, and mastery you have (yes, this is a snapshot, and does NOT include the mastery raid buff). It finds which is the highest of those 3 (tie breaking rule: crit trumps haste trumps mastery), and gives you a buff of +[sum of lowest two stats] to your highest stat, and -[lowest stat A] and -[lowest stat B]. For example, if you have 6000 mastery, 3000 crit, 2000 haste, and the proc goes off, it gives you a buff that provides [+5000 mastery, -3000 crit, -2000 haste]. It does not continue adjusting that buff as stats change during its duration. Yes, this means that if you have a temporary buff to a stat that is not your highest (even with the temporary buff), and that temporary buff falls off during Re-Origination, you *could* end up with negative rating. In this obscure edge case, negative crit does reduce your crit chance, negative mastery does reduce whatever it normally does, and negative haste is ignored. http://ru.wowhead.com/item=96546#english-comments
так было в 5.1.0 , в 5.2 в прок добавили умножение на 2, т.е. не +5к мастери дало бы, а +10к