midenc-codegen-masm 0.7.2

Miden Assembly backend for the Miden compiler
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
builtin.function public extern("C") @util_emit_if_nested_test(%0: u32, %1: u32) -> u32 {
    %2 = arith.eq %0, %1;
    %3 = scf.if %2 then {
        %4 = arith.constant 1 : u32;
        scf.yield %4 : (u32);
    } else {
        %5 = arith.lt %0, %1;
        %6 = scf.if %5 then {
            %7 = arith.constant 2 : u32;
            scf.yield %7 : (u32);
        } else {
            %8 = arith.mul %0, %1 <{ overflow = #builtin.overflow<checked> }>;
            scf.yield %8 : (u32);
        } : (i1) -> (u32);
        scf.yield %6 : (u32);
    } : (i1) -> (u32);
    builtin.ret %3 : (u32);
};