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 / opt / x-fuel.oir

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