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/fib38.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 / fib38.oir` 95 lines ยท 2029 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:i32 %2:u64 -> void 6 block ^0 7 %3 = gaddr %t33 @g0 8 %4 = const u64 31 9 %5 = const u8 10 10 %6 = const u64 1 11 %7 = chk.bounds 3 %0 %3 %4 %6 12 %8 = store %7 %3 %4 %5 13 %9 = const u64 31 14 %10 = const u64 0 15 br ^1 %8 %1 %2 %9 %2 %10 16 block ^1 %11:tok %12:i32 %13:u64 %14:u64 %15:u64 %16:u64 17 %17 = const u64 9 18 %18 = gt bool %15 %17 19 cbr %11 %18 ^2 ^3 20 block ^2 %19:tok 21 %20 = const u64 `1000000` 22 %21 = chk.fuel 4 %19 %16 %20 23 %22 = const u64 1 24 %23 = add u64 %16 %22 25 %24 = const u64 1 26 %25 = sub u64 %14 %24 27 %26 = gaddr %t33 @g0 28 %27 = const u64 10 29 %28 = chk.divz 2 %21 %27 30 %29 = rem u64 %15 %27 31 %30 = const u64 48 32 %31 = add u64 %29 %30 33 %32 = chk.conv u8 5 %28 %31 34 %33 = conv u8 0 %31 35 %34 = const u64 1 36 %35 = chk.bounds 3 %32 %26 %25 %34 37 %36 = store %35 %26 %25 %33 38 %37 = const u64 10 39 %38 = chk.divz 2 %36 %37 40 %39 = div u64 %15 %37 41 br ^1 %38 %12 %13 %25 %39 %23 42 block ^3 %40:tok 43 %41 = const u64 1 44 %42 = sub u64 %14 %41 45 %43 = gaddr %t33 @g0 46 %44 = const u64 48 47 %45 = add u64 %15 %44 48 %46 = chk.conv u8 5 %40 %45 49 %47 = conv u8 0 %45 50 %48 = const u64 1 51 %49 = chk.bounds 3 %46 %43 %42 %48 52 %50 = store %49 %43 %42 %47 53 %51 = gaddr %t33 @g0 54 %52 = const u64 32 55 %53 = sub u64 %52 %42 56 %54 = chk.slice 3 %50 %51 %42 %53 57 %55 %56 = host i64 54 %54 %12 %51 %42 %53 58 ret %55 59 end 60 fn @f1 flags 0 %1:u64 -> u64 61 block ^0 62 %2 = const u64 2 63 %3 = lt bool %1 %2 64 cbr %0 %3 ^1 ^2 65 block ^1 %4:tok 66 retv %4 %1 67 block ^2 %5:tok 68 br ^3 %5 %1 69 block ^3 %6:tok %7:u64 70 %8 = const u64 1 71 %9 = sub u64 %7 %8 72 %10 %11 = call u64 %6 @f1 %9 73 %12 = const u64 2 74 %13 = sub u64 %7 %12 75 %14 %15 = call u64 %10 @f1 %13 76 %16 = add u64 %11 %15 77 retv %14 %16 78 end 79 export @f2 flags 0 -> i32 80 block ^0 81 %1 %2 = host i64 109 %0 82 %3 = const u64 38 83 %4 %5 = call u64 %1 @f1 %3 84 %6 %7 = host i64 109 %4 85 %8 = const i32 2 86 %9 = chk.sub 1 %6 %7 %2 87 %10 = sub i64 %7 %2 88 %11 = chk.conv u64 5 %9 %10 89 %12 = conv u64 0 %10 90 %13 = call void %11 @f0 %8 %12 91 %14 = const i32 1 92 %15 = call void %13 @f0 %14 %5 93 %16 = const i32 0 94 retv %15 %16 95 end