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
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
 void interpret(const int *instrs, int c1, int c2) {
   int tmp;
   int running;
   int result;
   int ptr;
   result = 0;
   ptr = 0;
   running = 1;
   while (running == 1) {
     tmp = instrs[ptr];
     if (tmp == 0) {
       running = 0;
     } else {
     };
     if (tmp == 1) {
       c1 = (c1 + 1);
     } else {
     };
     if (tmp == 2) {
       c2 = (c2 + 1);
     } else {
     };
     if (tmp == 3) {
       c1 = (c1 - 1);
     } else {
     };
     if (tmp == 4) {
       c2 = (c2 - 1);
     } else {
     };
     if (tmp == 5) {
       if (c1 == 0) {
         ptr = (ptr + 1);
         ptr = instrs[ptr];
       } else {
         ptr = (ptr + 2);
         ptr = instrs[ptr];
       };
     } else {
     };
     if (tmp == 6) {
       if (c2 == 0) {
         ptr = (ptr + 1);
         ptr = instrs[ptr];
       } else {
         ptr = (ptr + 2);
         ptr = instrs[ptr];
       };
     } else {
     };
   };
   result = c1;

 }