WARNING! Access to this system is limited to authorised users only.
Unauthorised users may be subject to prosecution.
Unauthorised access to this system is a criminal offence under Australian law (Federal Crimes Act 1914 Part VIA)
It is a criminal offence to:
(1) Obtain access to data without authority. -Penalty 2 years imprisonment.
(2) Damage, delete, alter or insert data without authority. -Penalty 10 years imprisonment.
User activity is monitored and recorded. Anyone using this system expressly consents to such monitoring and recording.

To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.6% of users enabled 2FA.

test_eq_ref.c 2.41 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

// Compile with flag -std=c99
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <dlfcn.h>
#include "muapi.h"
#include "mu-fastimpl.h"
int main(int argc, char** argv) {
    MuVM* mu_11;
    MuCtx* ctx_11;
    MuIRBuilder* bldr_11;
    MuID id_104;
    MuID id_105;
    MuID id_106;
    MuID id_107;
    MuID id_108;
    MuID id_109;
    MuID id_110;
    MuID id_111;
    MuID id_112;
    MuID id_113;
    MuID id_114;
    MuID id_115;
    MuID id_116;
    MuID id_117;
    MuID id_118;
28
    mu_11 = mu_fastimpl_new_with_opts("init_muinit_mu --log-level=none --aot-emit-dir=emit");
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
    ctx_11 = mu_11->new_context(mu_11);
    bldr_11 = ctx_11->new_ir_builder(ctx_11);
    id_104 = bldr_11->gen_sym(bldr_11, "@i1");
    bldr_11->new_type_int(bldr_11, id_104, 1);
    id_105 = bldr_11->gen_sym(bldr_11, "@i64");
    bldr_11->new_type_int(bldr_11, id_105, 64);
    id_106 = bldr_11->gen_sym(bldr_11, "@refi64");
    bldr_11->new_type_ref(bldr_11, id_106, id_105);
    id_107 = bldr_11->gen_sym(bldr_11, "@NULL_refi64");
    bldr_11->new_const_null(bldr_11, id_107, id_106);
    id_108 = bldr_11->gen_sym(bldr_11, "@sig__i64");
    bldr_11->new_funcsig(bldr_11, id_108, NULL, 0, (MuTypeNode [1]){id_105}, 1);
    id_109 = bldr_11->gen_sym(bldr_11, "@test_fnc");
    bldr_11->new_func(bldr_11, id_109, id_108);
    id_110 = bldr_11->gen_sym(bldr_11, "@test_fnc_v1");
    id_111 = bldr_11->gen_sym(bldr_11, "@test_fnc_v1.blk0");
    id_112 = bldr_11->gen_sym(bldr_11, "@test_fnc_v1.blk0.r");
    id_113 = bldr_11->gen_sym(bldr_11, "@test_fnc_v1.blk0.cmp_res");
    id_114 = bldr_11->gen_sym(bldr_11, "@test_fnc_v1.blk0.res");
    id_115 = bldr_11->gen_sym(bldr_11, NULL);
    bldr_11->new_new(bldr_11, id_115, id_112, id_105, MU_NO_ID);
    id_116 = bldr_11->gen_sym(bldr_11, NULL);
    bldr_11->new_cmp(bldr_11, id_116, id_113, MU_CMP_EQ, id_106, id_112, id_107);
    id_117 = bldr_11->gen_sym(bldr_11, NULL);
    bldr_11->new_conv(bldr_11, id_117, id_114, MU_CONV_ZEXT, id_104, id_105, id_113);
    id_118 = bldr_11->gen_sym(bldr_11, NULL);
    bldr_11->new_ret(bldr_11, id_118, (MuVarNode [1]){id_114}, 1);
    bldr_11->new_bb(bldr_11, id_111, NULL, NULL, 0, MU_NO_ID, (MuInstNode [4]){id_115, id_116, id_117, id_118}, 4);
    bldr_11->new_func_ver(bldr_11, id_110, id_109, (MuBBNode [1]){id_111}, 1);
    bldr_11->load(bldr_11);
59
    mu_11->compile_to_sharedlib(mu_11, "test_eq_ref.dylib", NULL, 0);
60 61 62
    printf("%s\n", "test_eq_ref.dylib");
    return 0;
}