Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static thread_local uint64_t RandomStateA =
- static_cast<uint64_t>(time(nullptr));
- static thread_local uint64_t RandomStateB = xorShiftStar64();
- uint64_t getRandomUnsigned64() {
- uint64_t A = RandomStateA;
- const uint64_t B = RandomStateB;
- RandomStateA = B;
- A ^= A << 23;
- A ^= A >> 17;
- A ^= B ^ (B >> 26);
- RandomStateB = A;
- return A + B;
- }
- ==========================================================================
- 0000000000400780 <gwp_asan::random::getRandomUnsigned64()>:
- 400780: 41 57 push %r15
- 400782: 41 56 push %r14
- 400784: 41 55 push %r13
- 400786: 41 54 push %r12
- 400788: 53 push %rbx
- 400789: 66 66 66 64 48 8b 04 data16 data16 data16 mov %fs:0x0,%rax
- 400790: 25 00 00 00 00
- 400795: 49 89 c6 mov %rax,%r14
- 400798: 8a 88 f8 ff ff ff mov -0x8(%rax),%cl
- 40079e: 84 c9 test %cl,%cl
- 4007a0: 74 55 je 4007f7 <gwp_asan::random::getRandomUnsigned64()+0x77>
- 4007a2: 4d 8b a6 e8 ff ff ff mov -0x18(%r14),%r12
- 4007a9: 4d 8b ae f0 ff ff ff mov -0x10(%r14),%r13
- 4007b0: 4c 89 f0 mov %r14,%rax
- 4007b3: 4d 89 ae e8 ff ff ff mov %r13,-0x18(%r14)
- 4007ba: 4c 89 e3 mov %r12,%rbx
- 4007bd: 48 c1 e3 17 shl $0x17,%rbx
- 4007c1: 4c 31 e3 xor %r12,%rbx
- 4007c4: 4c 89 e8 mov %r13,%rax
- 4007c7: 48 c1 e8 1a shr $0x1a,%rax
- 4007cb: 4c 31 e8 xor %r13,%rax
- 4007ce: 48 31 d8 xor %rbx,%rax
- 4007d1: 48 c1 eb 11 shr $0x11,%rbx
- 4007d5: 48 31 c3 xor %rax,%rbx
- 4007d8: 84 c9 test %cl,%cl
- 4007da: 0f 84 d6 00 00 00 je 4008b6 <gwp_asan::random::getRandomUnsigned64()+0x136>
- 4007e0: 49 89 9e f0 ff ff ff mov %rbx,-0x10(%r14)
- 4007e7: 49 01 dd add %rbx,%r13
- 4007ea: 4c 89 e8 mov %r13,%rax
- 4007ed: 5b pop %rbx
- 4007ee: 41 5c pop %r12
- 4007f0: 41 5d pop %r13
- 4007f2: 41 5e pop %r14
- 4007f4: 41 5f pop %r15
- 4007f6: c3 retq
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement