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.7% of users enabled 2FA.

test_fib.c 4.42 KB
Newer Older
1
2
3
4
5
6
7
8
9

// 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) {
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
    MuVM* mu_33;
    MuCtx* ctx_33;
    MuIRBuilder* bldr_33;
    MuID id_465;
    MuID id_466;
    MuID id_467;
    MuID id_468;
    MuID id_469;
    MuID id_470;
    MuID id_471;
    MuID id_472;
    MuID id_473;
    MuID id_474;
    MuID id_475;
    MuID id_476;
    MuID id_477;
    MuID id_478;
    MuID id_479;
    MuID id_480;
    MuID id_481;
    MuID id_482;
    MuID id_483;
    MuID id_484;
    MuID id_485;
    MuID id_486;
    MuID id_487;
    MuID id_488;
    MuID id_489;
    MuID id_490;
    MuID id_491;
    MuID id_492;
    MuID id_493;
    mu_33 = mu_fastimpl_new_with_opts("init_muinit_mu --log-level=none --aot-emit-dir=emit");
    ctx_33 = mu_33->new_context(mu_33);
    bldr_33 = ctx_33->new_ir_builder(ctx_33);
    id_465 = bldr_33->gen_sym(bldr_33, "@i64");
    bldr_33->new_type_int(bldr_33, id_465, 64);
    id_466 = bldr_33->gen_sym(bldr_33, "@0_i64");
    bldr_33->new_const_int(bldr_33, id_466, id_465, 0);
    id_467 = bldr_33->gen_sym(bldr_33, "@1_i64");
    bldr_33->new_const_int(bldr_33, id_467, id_465, 1);
    id_468 = bldr_33->gen_sym(bldr_33, "@2_i64");
    bldr_33->new_const_int(bldr_33, id_468, id_465, 2);
    id_469 = bldr_33->gen_sym(bldr_33, "@sig_i64_i64");
    bldr_33->new_funcsig(bldr_33, id_469, (MuTypeNode [1]){id_465}, 1, (MuTypeNode [1]){id_465}, 1);
    id_470 = bldr_33->gen_sym(bldr_33, "@fib");
    bldr_33->new_func(bldr_33, id_470, id_469);
    id_471 = bldr_33->gen_sym(bldr_33, "@fib_v1");
    id_472 = bldr_33->gen_sym(bldr_33, "@fib_v1.blk0");
    id_473 = bldr_33->gen_sym(bldr_33, "@fib_v1.blk1");
    id_474 = bldr_33->gen_sym(bldr_33, "@fib_v1.blk2");
    id_475 = bldr_33->gen_sym(bldr_33, "@fib_v1.blk0.k");
    id_476 = bldr_33->gen_sym(bldr_33, NULL);
    id_477 = bldr_33->gen_sym(bldr_33, NULL);
    id_478 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_dest_clause(bldr_33, id_476, id_474, (MuVarNode [1]){id_475}, 1);
    bldr_33->new_dest_clause(bldr_33, id_477, id_473, (MuVarNode [1]){id_466}, 1);
    bldr_33->new_dest_clause(bldr_33, id_478, id_473, (MuVarNode [1]){id_467}, 1);
    id_479 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_switch(bldr_33, id_479, id_465, id_475, id_476, (MuConstNode [2]){id_466, id_467}, (MuDestClause [2]){id_477, id_478}, 2);
    bldr_33->new_bb(bldr_33, id_472, (MuID [1]){id_475}, (MuTypeNode [1]){id_465}, 1, MU_NO_ID, (MuInstNode [1]){id_479}, 1);
    id_480 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk1.rtn");
    id_481 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_ret(bldr_33, id_481, (MuVarNode [1]){id_480}, 1);
    bldr_33->new_bb(bldr_33, id_473, (MuID [1]){id_480}, (MuTypeNode [1]){id_465}, 1, MU_NO_ID, (MuInstNode [1]){id_481}, 1);
    id_482 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.k");
    id_483 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.k_1");
    id_484 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.k_2");
    id_485 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.res");
    id_486 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.res1");
    id_487 = bldr_33->gen_sym(bldr_33, "@fig_v1.blk2.res2");
    id_488 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_binop(bldr_33, id_488, id_483, MU_BINOP_SUB, id_465, id_482, id_467, MU_NO_ID);
    id_489 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_call(bldr_33, id_489, (MuID [1]){id_486}, 1, id_469, id_470, (MuVarNode [1]){id_483}, 1, MU_NO_ID, MU_NO_ID);
    id_490 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_binop(bldr_33, id_490, id_484, MU_BINOP_SUB, id_465, id_482, id_468, MU_NO_ID);
    id_491 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_call(bldr_33, id_491, (MuID [1]){id_487}, 1, id_469, id_470, (MuVarNode [1]){id_484}, 1, MU_NO_ID, MU_NO_ID);
    id_492 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_binop(bldr_33, id_492, id_485, MU_BINOP_ADD, id_465, id_486, id_487, MU_NO_ID);
    id_493 = bldr_33->gen_sym(bldr_33, NULL);
    bldr_33->new_ret(bldr_33, id_493, (MuVarNode [1]){id_485}, 1);
    bldr_33->new_bb(bldr_33, id_474, (MuID [1]){id_482}, (MuTypeNode [1]){id_465}, 1, MU_NO_ID, (MuInstNode [6]){id_488, id_489, id_490, id_491, id_492, id_493}, 6);
    bldr_33->new_func_ver(bldr_33, id_471, id_470, (MuBBNode [3]){id_472, id_473, id_474}, 3);
    bldr_33->load(bldr_33);
    mu_33->compile_to_sharedlib(mu_33, "test_fib.dylib", NULL, 0);
97
    printf("%s\n", "test_fib.dylib");
98
99
    return 0;
}