package acm_random file_number 0 "/inputs/subtree/xls/dslx/stdlib/std.x" file_number 1 "/inputs/subtree/xls/dslx/stdlib/acm_random.x" fn __std__sgt__32(x: bits[32] id=1, y: bits[32] id=2) -> bits[1] { zero_ext.4: bits[32] = zero_ext(x, new_bit_count=32, id=4) zero_ext.5: bits[32] = zero_ext(y, new_bit_count=32, id=5) N: bits[32] = literal(value=32, id=3, pos=[(0,939,11)]) ret sgt.6: bits[1] = sgt(zero_ext.4, zero_ext.5, id=6, pos=[(0,939,50)]) } top fn __acm_random__rng_next(s: (bits[32]) id=7) -> ((bits[32]), bits[32]) { s_seed: bits[32] = tuple_index(s, index=0, id=10, pos=[(1,36,20)]) zero_ext.11: bits[64] = zero_ext(s_seed, new_bit_count=64, id=11) A: bits[64] = literal(value=16807, id=9, pos=[(1,35,14)]) M: bits[32] = literal(value=2147483647, id=8, pos=[(1,26,10)]) product: bits[64] = umul(zero_ext.11, A, id=12, pos=[(1,36,20)]) literal.13: bits[64] = literal(value=31, id=13, pos=[(1,37,32)]) zero_ext.15: bits[64] = zero_ext(M, new_bit_count=64, id=15) shrl.14: bits[64] = shrl(product, literal.13, id=14, pos=[(1,37,21)]) and.16: bits[64] = and(product, zero_ext.15, id=16, pos=[(1,37,43)]) add.17: bits[64] = add(shrl.14, and.16, id=17, pos=[(1,37,21)]) new_seed: bits[32] = bit_slice(add.17, start=0, width=32, id=18) invoke.19: bits[1] = invoke(new_seed, M, to_apply=__std__sgt__32, id=19, pos=[(1,38,30)]) sub.20: bits[32] = sub(new_seed, M, id=20, pos=[(1,38,46)]) new_seed__1: bits[32] = sel(invoke.19, cases=[new_seed, sub.20], id=21, pos=[(1,38,19)]) tuple.22: (bits[32]) = tuple(new_seed__1, id=22, pos=[(1,39,11)]) ret tuple.23: ((bits[32]), bits[32]) = tuple(tuple.22, new_seed__1, id=23, pos=[(1,39,4)]) }