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/leafcall.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 / leafcall.oir` 104 lines ยท 2317 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 %2:u64 -> u64 61 block ^0 62 %3 = mul u64 %1 %2 63 %4 = const u64 5 64 %5 = chk.shift 7 %0 %4 65 %6 = shr u64 %1 %4 66 %7 = xor u64 %3 %6 67 retv %5 %7 68 end 69 export @f2 flags 0 -> i32 70 block ^0 71 %1 %2 = host i64 109 %0 72 %3 = const u64 1 73 %4 = const u64 0 74 %5 = const u64 0 75 br ^1 %1 %2 %3 %4 %5 76 block ^1 %6:tok %7:i64 %8:u64 %9:u64 %10:u64 77 %11 = const u64 `30000000` 78 %12 = lt bool %10 %11 79 cbr %6 %12 ^2 ^3 80 block ^2 %13:tok 81 %14 = const u64 `2654435761` 82 %15 %16 = call u64 %13 @f1 %10 %14 83 %17 = add u64 %8 %16 84 %18 = xor u64 %9 %17 85 br ^4 %15 %7 %17 %18 %10 86 block ^3 %19:tok 87 %20 %21 = host i64 109 %19 88 %22 = const i32 2 89 %23 = chk.sub 1 %20 %21 %7 90 %24 = sub i64 %21 %7 91 %25 = chk.conv u64 5 %23 %24 92 %26 = conv u64 0 %24 93 %27 = call void %25 @f0 %22 %26 94 %28 = const i32 1 95 %29 = call void %27 @f0 %28 %8 96 %30 = const i32 1 97 %31 = call void %29 @f0 %30 %9 98 %32 = const i32 0 99 retv %31 %32 100 block ^4 %33:tok %34:i64 %35:u64 %36:u64 %37:u64 101 %38 = const u64 1 102 %39 = add u64 %37 %38 103 br ^1 %33 %34 %35 %36 %39 104 end