# x86-64 machine code, 10 bytes Fortunately, there is a built-in RNG. Requires the RDRAND instruction. ``` 00000000: c1e1 020f c7f0 abe2 fac3 .......... ``` Disassembled: ``` shl ecx, 2 label: rdrand eax stosd loop label ret ``` Outputs to a pre-allocated buffer in `rdi`. `n` is passed in `ecx` (arrays with 2^30 elements and more are not supported). [Try it online!](https://tio.run/##ZVLBTuMwED3HXzHLCpSSNKQsWqFttjf2uh@AqspxnMaVY0e2AxGIby8zDiAoJ3vezHvzZuya@@54FDzABurCQ1XB3f9/zHHT2P4PA99pkGLK4ZqB5rXUiIFrKA@STxj4YH2DSWuHuYI5GRjba1tzDbPQ7tHxYZCOfQ1Rq7cPs770isGhH94YjFzMtngh3m39VEbosZFQ@dAoE4puc4LZb5BWNWFyCtIZeLCqOTGV7nYjaq2ub3fhEgJ3exlyQATMYs0iYXAYfq6DacGeWSI67sCM/f2vcrtmCXEO8BdKurfpj2kRw1Uea8ot3m9uMffYKS1TlEhQI6HcIcsoO8E5rErI5rJkgitkk9rLO@kAy@UGSqQmwxiofxr5W7T6gaxKjF4Y2em5Mmn0GgdagxfctOnZeXOWwwUNmHwZvx5b9NFzra1IzaVXT9K2nydfEOVkgUjK47KS1rqUGqm4BTwq6qmyLBqOW8TiexXttk5KCqNZel7DfQ/LFqRuf9/Qd2R7IeL714VlxRUv7BjwL1S4lOPxFQ "Bash – Try It Online") (a helper function is needed because of the unusual calling convention)