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
omega-mv / seed / ng / tests / ir / x-fuelok.oir
| 1 | omegair 1 |
| 2 | export @f0 flags 0 -> i32 |
| 3 | block ^0 |
| 4 | %1 = const u64 0 |
| 5 | br ^1 %0 %1 %1 |
| 6 | block ^1 %2:tok %3:u64 %4:u64 |
| 7 | %5 = const u64 1000000 |
| 8 | %6 = lt bool %3 %5 |
| 9 | cbr %2 %6 ^2 ^3 |
| 10 | block ^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 |
| 16 | br ^1 %9 %12 %10 |
| 17 | block ^3 %13:tok |
| 18 | %14 = const u64 255 |
| 19 | %15 = and u64 %4 %14 |
| 20 | %16 = conv i32 0 %15 |
| 21 | retv %13 %16 |
| 22 | end |