interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / ng / tests / ir / x-fuel.oir

22 lines · 401 bytes Raw Blame History
1omegair 1
2export @f0 flags 0 -> i32
3block ^0
4%1 = const u64 0
5br ^1 %0 %1 %1
6block ^1 %2:tok %3:u64 %4:u64
7%5 = const u64 1000001
8%6 = lt bool %3 %5
9cbr %2 %6 ^2 ^3
10block ^2 %7:tok
11%8 = const u64 1000000
12%9 = chk.fuel 4 %7 %3 %8
13%10 = add u64 %4 %3
14%11 = const u64 1
15%12 = add u64 %3 %11
16br ^1 %9 %12 %10
17block ^3 %13:tok
18%14 = const u64 255
19%15 = and u64 %4 %14
20%16 = conv i32 0 %15
21retv %13 %16
22end