Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/ng/tests/opt/fib40.oir # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / ng / tests / opt / fib40.oir` 87 lines ยท 1807 bytes Raw Blame History 1 omegair 1 2 type %t32 = array u8 32 3 type %t33 = ref edit host %t32 4 global @g0 %t32 zero 5 fn @f0 flags 0 %1:u64 -> u64 6 block ^0 7 %2 = const u64 2 8 %3 = lt bool %1 %2 9 cbr %0 %3 ^1 ^2 10 block ^1 %4:tok 11 retv %4 %1 12 block ^2 %5:tok 13 br ^3 %5 %1 14 block ^3 %6:tok %7:u64 15 %8 = const u64 1 16 %9 = sub u64 %7 %8 17 %10 %11 = call u64 %6 @f0 %9 18 %12 = const u64 2 19 %13 = sub u64 %7 %12 20 %14 %15 = call u64 %10 @f0 %13 21 %16 = add u64 %11 %15 22 retv %14 %16 23 end 24 fn @f1 flags 0 %1:u64 -> void 25 block ^0 26 %2 = gaddr %t33 @g0 27 %3 = const u64 31 28 %4 = const u8 10 29 %5 = const u64 1 30 %6 = chk.bounds 3 %0 %2 %3 %5 31 %7 = store %6 %2 %3 %4 32 %8 = const u64 31 33 %9 = const u64 0 34 br ^1 %7 %1 %8 %1 %9 35 block ^1 %10:tok %11:u64 %12:u64 %13:u64 %14:u64 36 %15 = const u64 9 37 %16 = gt bool %13 %15 38 cbr %10 %16 ^2 ^3 39 block ^2 %17:tok 40 %18 = const u64 `1000000` 41 %19 = chk.fuel 4 %17 %14 %18 42 %20 = const u64 1 43 %21 = add u64 %14 %20 44 %22 = const u64 1 45 %23 = sub u64 %12 %22 46 %24 = gaddr %t33 @g0 47 %25 = const u64 10 48 %26 = chk.divz 2 %19 %25 49 %27 = rem u64 %13 %25 50 %28 = const u64 48 51 %29 = add u64 %27 %28 52 %30 = chk.conv u8 5 %26 %29 53 %31 = conv u8 0 %29 54 %32 = const u64 1 55 %33 = chk.bounds 3 %30 %24 %23 %32 56 %34 = store %33 %24 %23 %31 57 %35 = const u64 10 58 %36 = chk.divz 2 %34 %35 59 %37 = div u64 %13 %35 60 br ^1 %36 %11 %23 %37 %21 61 block ^3 %38:tok 62 %39 = const u64 1 63 %40 = sub u64 %12 %39 64 %41 = gaddr %t33 @g0 65 %42 = const u64 48 66 %43 = add u64 %13 %42 67 %44 = chk.conv u8 5 %38 %43 68 %45 = conv u8 0 %43 69 %46 = const u64 1 70 %47 = chk.bounds 3 %44 %41 %40 %46 71 %48 = store %47 %41 %40 %45 72 %49 = const i32 1 73 %50 = gaddr %t33 @g0 74 %51 = const u64 32 75 %52 = sub u64 %51 %40 76 %53 = chk.slice 3 %48 %50 %40 %52 77 %54 %55 = host i64 54 %53 %49 %50 %40 %52 78 ret %54 79 end 80 export @f2 flags 0 -> i32 81 block ^0 82 %1 = const u64 40 83 %2 %3 = call u64 %0 @f0 %1 84 %4 = call void %2 @f1 %3 85 %5 = const i32 0 86 retv %4 %5 87 end