c_src: update
[nit.git] / c_src / sorter._sep.c
index 8e0db86..af999f6 100644 (file)
 /* This C file is generated by NIT to compile module sorter. */
 #include "sorter._sep.h"
-val_t sorter___AbstractSorter___compare(val_t  self, val_t  param0, val_t  param1) {
-  struct trace_t trace = {NULL, NULL, 22, LOCATE_sorter___AbstractSorter___compare};
-  val_t *variable = NULL;
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
+val_t sorter___AbstractSorter___compare(val_t p0, val_t p1, val_t p2){
+  struct {struct stack_frame_t me;} fra;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 22;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___compare;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 0;
+  /* ./../lib/standard//collection//sorter.nit:22 */
   fprintf(stderr, "Deferred method called");
   fprintf(stderr, " (%s:%d)\n", LOCATE_sorter, 22);
   nit_exit(1);
-  tracehead = trace.prev;
+  stack_frame_head = fra.me.prev;
   return NIT_NULL;
 }
-void sorter___AbstractSorter___sort(val_t  self, val_t  param0) {
-  struct trace_t trace = {NULL, NULL, 29, LOCATE_sorter___AbstractSorter___sort};
-  val_t variable[4];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Local variable */
-  variable[1] =  param0;
-  /* Register variable[2]: Method return value and escape marker */
-  /* Register variable[3]: Result */
-  variable[3] = CALL_abstract_collection___Collection___length( variable[1] /*array*/)( variable[1] /*array*/) /*AbstractArrayRead::length*/;
-  /* Register variable[3]: Result */
-  variable[3] = TAG_Int(UNTAG_Int(variable[3])-UNTAG_Int( TAG_Int(1)));
-  CALL_sorter___AbstractSorter___sub_sort(variable[0])(variable[0],  variable[1] /*array*/,  TAG_Int(0), variable[3]) /*AbstractSorter::sub_sort*/;
-  return_label0: while(false);
-  tracehead = trace.prev;
+void sorter___AbstractSorter___sort(val_t p0, val_t p1){
+  struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t REGB2;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 29;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___sort;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 2;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  REGB0 = TAG_Int(0);
+  REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+  /* ./../lib/standard//collection//array.nit:23 */
+  if (UNTAG_Bool(REGB1)) {
+  } else {
+    fprintf(stderr, "Uninitialized attribute %s", "_length");
+    fprintf(stderr, " (%s:%d)\n", LOCATE_array, 23);
+    nit_exit(1);
+  }
+  REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+  REGB2 = TAG_Int(1);
+  REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
+  /* ./../lib/standard//collection//sorter.nit:30 */
+  CALL_sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB2);
+  stack_frame_head = fra.me.prev;
   return;
 }
-void sorter___AbstractSorter___sub_sort(val_t  self, val_t  param0, val_t  param1, val_t  param2) {
-  struct trace_t trace = {NULL, NULL, 32, LOCATE_sorter___AbstractSorter___sub_sort};
-  val_t variable[6];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Local variable */
-  variable[1] =  param0;
-  /* Register variable[2]: Local variable */
-  variable[2] =  param1;
-  /* Register variable[3]: Local variable */
-  variable[3] =  param2;
-  /* Register variable[4]: Method return value and escape marker */
-  /* Register variable[5]: Result */
-  variable[5] = TAG_Bool(UNTAG_Int( variable[2] /*from*/)>=UNTAG_Int( variable[3] /*to*/));
-  if (UNTAG_Bool(variable[5])) { /*if*/
-    goto return_label1;
-  } else { /*if*/
-    /* Register variable[5]: Result */
-    variable[5] = TAG_Int(UNTAG_Int( variable[2] /*from*/)+UNTAG_Int( TAG_Int(7)));
-    /* Register variable[5]: Result */
-    variable[5] = TAG_Bool(UNTAG_Int(variable[5])<UNTAG_Int( variable[3] /*to*/));
-    if (UNTAG_Bool(variable[5])) { /*if*/
-      CALL_sorter___AbstractSorter___quick_sort(variable[0])(variable[0],  variable[1] /*array*/,  variable[2] /*from*/,  variable[3] /*to*/) /*AbstractSorter::quick_sort*/;
-    } else { /*if*/
-      CALL_sorter___AbstractSorter___bubble_sort(variable[0])(variable[0],  variable[1] /*array*/,  variable[2] /*from*/,  variable[3] /*to*/) /*AbstractSorter::bubble_sort*/;
+void sorter___AbstractSorter___sub_sort(val_t p0, val_t p1, val_t p2, val_t p3){
+  struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t REGB2;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 32;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___sub_sort;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 2;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  REGB0 = p2;
+  REGB1 = p3;
+  REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
+  /* ./../lib/standard//collection//sorter.nit:35 */
+  if (UNTAG_Bool(REGB2)) {
+    /* ./../lib/standard//collection//sorter.nit:36 */
+    goto label1;
+  } else {
+    REGB2 = TAG_Int(7);
+    REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+    REGB2 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB1));
+    /* ./../lib/standard//collection//sorter.nit:37 */
+    if (UNTAG_Bool(REGB2)) {
+      /* ./../lib/standard//collection//sorter.nit:38 */
+      CALL_sorter___AbstractSorter___quick_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB1);
+    } else {
+      /* ./../lib/standard//collection//sorter.nit:40 */
+      CALL_sorter___AbstractSorter___bubble_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB1);
     }
   }
-  return_label1: while(false);
-  tracehead = trace.prev;
+  label1: while(0);
+  stack_frame_head = fra.me.prev;
   return;
 }
-void sorter___AbstractSorter___quick_sort(val_t  self, val_t  param0, val_t  param1, val_t  param2) {
-  struct trace_t trace = {NULL, NULL, 44, LOCATE_sorter___AbstractSorter___quick_sort};
-  val_t variable[13];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Local variable */
-  variable[1] =  param0;
-  /* Register variable[2]: Local variable */
-  variable[2] =  param1;
-  /* Register variable[3]: Local variable */
-  variable[3] =  param2;
-  /* Register variable[4]: Method return value and escape marker */
-  /* Register variable[5]: Local variable */
-  /* Register variable[6]: Local variable */
-  variable[6] =  variable[1] /*array*/;
-  /* Register variable[7]: Local variable */
-  variable[7] =  variable[2] /*from*/;
-  /* Register variable[8]: Method return value and escape marker */
-  /* Register variable[9]: Result */
-  variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-  /* Ensure var variable[9]: Left 'and' operand*/
-  if (UNTAG_Bool(variable[9])) { /* and */
-    /* Register variable[9]: Result */
-    variable[9] = ATTR_array___AbstractArrayRead____length(variable[6]) /*AbstractArrayRead::_length*/;
-    /* Register variable[9]: Result */
-    variable[9] = TAG_Bool(UNTAG_Int( variable[7] /*index*/)<UNTAG_Int(variable[9]));
+void sorter___AbstractSorter___quick_sort(val_t p0, val_t p1, val_t p2, val_t p3){
+  struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t REGB2;
+  val_t REGB3;
+  val_t REGB4;
+  val_t REGB5;
+  val_t REGB6;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 44;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___quick_sort;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 5;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[2] = NIT_NULL;
+  fra.me.REG[3] = NIT_NULL;
+  fra.me.REG[4] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  REGB0 = p2;
+  REGB1 = p3;
+  fra.me.REG[2] = fra.me.REG[1];
+  REGB2 = REGB0;
+  REGB3 = TAG_Int(0);
+  REGB3 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB3));
+  /* ./../lib/standard//collection//array.nit:233 */
+  if (UNTAG_Bool(REGB3)) {
+    REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+    if (UNTAG_Bool(REGB3)) {
+    } else {
+      fprintf(stderr, "Uninitialized attribute %s", "_length");
+      fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+      nit_exit(1);
+    }
+    REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+    REGB3 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB3));
+  /* ./../lib/standard//collection//array.nit:233 */
+  } else {
+    REGB4 = TAG_Bool(false);
+    REGB3 = REGB4;
+  }
+  if (UNTAG_Bool(REGB3)) {
+  } else {
+    fprintf(stderr, "Assert %s  failed", "'index'");
+    fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+    nit_exit(1);
+  }
+  fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
+  REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+  /* ./../lib/standard//collection//array.nit:234 */
+  if (UNTAG_Bool(REGB3)) {
+    fprintf(stderr, "Reciever is null");
+    fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+    nit_exit(1);
   }
-  /* Register variable[9]: Result */
-  if (!UNTAG_Bool(variable[9])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-  /* Register variable[9]: Result */
-  variable[9] = ATTR_array___Array____items(variable[6]) /*Array::_items*/;
-  /* Register variable[9]: Result */
-  variable[9] = UNBOX_NativeArray(variable[9])[UNTAG_Int( variable[7] /*index*/)];
-  variable[8] = variable[9];
-  goto return_label3;
-  return_label3: while(false);
-  /* Register variable[6]: Result */
-  variable[6] = variable[8];
-  variable[5] = variable[6];
-  /* Register variable[6]: Local variable */
-  variable[6] =  variable[2] /*from*/;
-  /* Register variable[7]: Local variable */
-  variable[7] =  variable[3] /*to*/;
-  while (true) { /*while*/
-    /* Register variable[8]: Result */
-    variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*j*/)>UNTAG_Int( variable[6] /*i*/));
-    if (!UNTAG_Bool(variable[8])) break; /* while*/
-    while (true) { /*while*/
-      /* Register variable[8]: Result */
-      variable[8] = TAG_Bool(UNTAG_Int( variable[6] /*i*/)<=UNTAG_Int( variable[3] /*to*/));
-      /* Ensure var variable[8]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[8])) { /* and */
-        /* Register variable[8]: Local variable */
-        variable[8] =  variable[1] /*array*/;
-        /* Register variable[9]: Local variable */
-        variable[9] =  variable[6] /*i*/;
-        /* Register variable[10]: Method return value and escape marker */
-        /* Register variable[11]: Result */
-        variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-        /* Ensure var variable[11]: Left 'and' operand*/
-        if (UNTAG_Bool(variable[11])) { /* and */
-          /* Register variable[11]: Result */
-          variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
-          /* Register variable[11]: Result */
-          variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
+  fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
+  /* ./../lib/standard//collection//array.nit:234 */
+  goto label1;
+  label1: while(0);
+  REGB2 = REGB0;
+  REGB3 = REGB1;
+  /* ./../lib/standard//collection//sorter.nit:50 */
+  while(1) {
+    REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
+    /* ./../lib/standard//collection//sorter.nit:50 */
+    if (UNTAG_Bool(REGB4)) {
+      /* ./../lib/standard//collection//sorter.nit:51 */
+      while(1) {
+        REGB4 = TAG_Bool(UNTAG_Int(REGB2)<=UNTAG_Int(REGB1));
+        /* ./../lib/standard//collection//sorter.nit:51 */
+        if (UNTAG_Bool(REGB4)) {
+          fra.me.REG[3] = fra.me.REG[1];
+          REGB4 = REGB2;
+          REGB5 = TAG_Int(0);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
+          /* ./../lib/standard//collection//array.nit:233 */
+          if (UNTAG_Bool(REGB5)) {
+            REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+            if (UNTAG_Bool(REGB5)) {
+            } else {
+              fprintf(stderr, "Uninitialized attribute %s", "_length");
+              fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+              nit_exit(1);
+            }
+            REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+            REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
+          /* ./../lib/standard//collection//array.nit:233 */
+          } else {
+            REGB6 = TAG_Bool(false);
+            REGB5 = REGB6;
+          }
+          if (UNTAG_Bool(REGB5)) {
+          } else {
+            fprintf(stderr, "Assert %s  failed", "'index'");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+          REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+          /* ./../lib/standard//collection//array.nit:234 */
+          if (UNTAG_Bool(REGB5)) {
+            fprintf(stderr, "Reciever is null");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
+          /* ./../lib/standard//collection//array.nit:234 */
+          goto label2;
+          label2: while(0);
+          REGB4 = CALL_sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3], fra.me.REG[2]);
+          REGB5 = TAG_Int(0);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)<=UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//sorter.nit:51 */
+        } else {
+          REGB4 = TAG_Bool(false);
+          REGB5 = REGB4;
         }
-        /* Register variable[11]: Result */
-        if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-        /* Register variable[11]: Result */
-        variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
-        /* Register variable[11]: Result */
-        variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
-        variable[10] = variable[11];
-        goto return_label6;
-        return_label6: while(false);
-        /* Register variable[8]: Result */
-        variable[8] = variable[10];
-        /* Register variable[8]: Result */
-        variable[8] = CALL_sorter___AbstractSorter___compare(variable[0])(variable[0], variable[8],  variable[5] /*pivot*/) /*AbstractSorter::compare*/;
-        /* Register variable[8]: Result */
-        variable[8] = TAG_Bool(UNTAG_Int(variable[8])<=UNTAG_Int( TAG_Int(0)));
-      }
-      /* Register variable[8]: Result */
-      if (!UNTAG_Bool(variable[8])) break; /* while*/
-      variable[6] = TAG_Int(UNTAG_Int(variable[6])+UNTAG_Int( TAG_Int(1))) /*i*/;
-      continue_5: while(0);
-    }
-    break_5: while(0);
-    while (true) { /*while*/
-      /* Register variable[8]: Result */
-      variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*j*/)>UNTAG_Int( variable[6] /*i*/));
-      /* Ensure var variable[8]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[8])) { /* and */
-        /* Register variable[8]: Local variable */
-        variable[8] =  variable[1] /*array*/;
-        /* Register variable[9]: Local variable */
-        variable[9] =  variable[7] /*j*/;
-        /* Register variable[10]: Method return value and escape marker */
-        /* Register variable[11]: Result */
-        variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-        /* Ensure var variable[11]: Left 'and' operand*/
-        if (UNTAG_Bool(variable[11])) { /* and */
-          /* Register variable[11]: Result */
-          variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
-          /* Register variable[11]: Result */
-          variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
+        if (UNTAG_Bool(REGB5)) {
+          REGB5 = TAG_Int(1);
+          REGB5 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB5));
+          REGB2 = REGB5;
+        /* ./../lib/standard//collection//sorter.nit:51 */
+        } else {
+          goto label3;
         }
-        /* Register variable[11]: Result */
-        if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-        /* Register variable[11]: Result */
-        variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
-        /* Register variable[11]: Result */
-        variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
-        variable[10] = variable[11];
-        goto return_label8;
-        return_label8: while(false);
-        /* Register variable[8]: Result */
-        variable[8] = variable[10];
-        /* Register variable[8]: Result */
-        variable[8] = CALL_sorter___AbstractSorter___compare(variable[0])(variable[0], variable[8],  variable[5] /*pivot*/) /*AbstractSorter::compare*/;
-        /* Register variable[8]: Result */
-        variable[8] = TAG_Bool(UNTAG_Int(variable[8])>=UNTAG_Int( TAG_Int(0)));
       }
-      /* Register variable[8]: Result */
-      if (!UNTAG_Bool(variable[8])) break; /* while*/
-      variable[7] = TAG_Int(UNTAG_Int(variable[7])-UNTAG_Int( TAG_Int(1))) /*j*/;
-      continue_7: while(0);
-    }
-    break_7: while(0);
-    /* Register variable[8]: Result */
-    variable[8] = TAG_Bool(UNTAG_Int( variable[7] /*j*/)>UNTAG_Int( variable[6] /*i*/));
-    if (UNTAG_Bool(variable[8])) { /*if*/
-      /* Register variable[8]: Local variable */
-      /* Register variable[9]: Local variable */
-      variable[9] =  variable[1] /*array*/;
-      /* Register variable[10]: Local variable */
-      variable[10] =  variable[6] /*i*/;
-      /* Register variable[11]: Method return value and escape marker */
-      /* Register variable[12]: Result */
-      variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-      /* Ensure var variable[12]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[12])) { /* and */
-        /* Register variable[12]: Result */
-        variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-        /* Register variable[12]: Result */
-        variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+      label3: while(0);
+      /* ./../lib/standard//collection//sorter.nit:52 */
+      while(1) {
+        REGB5 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
+        /* ./../lib/standard//collection//sorter.nit:52 */
+        if (UNTAG_Bool(REGB5)) {
+          fra.me.REG[3] = fra.me.REG[1];
+          REGB5 = REGB3;
+          REGB4 = TAG_Int(0);
+          REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
+          /* ./../lib/standard//collection//array.nit:233 */
+          if (UNTAG_Bool(REGB4)) {
+            REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+            if (UNTAG_Bool(REGB4)) {
+            } else {
+              fprintf(stderr, "Uninitialized attribute %s", "_length");
+              fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+              nit_exit(1);
+            }
+            REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+            REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
+          /* ./../lib/standard//collection//array.nit:233 */
+          } else {
+            REGB6 = TAG_Bool(false);
+            REGB4 = REGB6;
+          }
+          if (UNTAG_Bool(REGB4)) {
+          } else {
+            fprintf(stderr, "Assert %s  failed", "'index'");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+          REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+          /* ./../lib/standard//collection//array.nit:234 */
+          if (UNTAG_Bool(REGB4)) {
+            fprintf(stderr, "Reciever is null");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB5)];
+          /* ./../lib/standard//collection//array.nit:234 */
+          goto label4;
+          label4: while(0);
+          REGB5 = CALL_sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3], fra.me.REG[2]);
+          REGB4 = TAG_Int(0);
+          REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
+        /* ./../lib/standard//collection//sorter.nit:52 */
+        } else {
+          REGB5 = TAG_Bool(false);
+          REGB4 = REGB5;
+        }
+        if (UNTAG_Bool(REGB4)) {
+          REGB4 = TAG_Int(1);
+          REGB4 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB4));
+          REGB3 = REGB4;
+        /* ./../lib/standard//collection//sorter.nit:52 */
+        } else {
+          goto label5;
+        }
       }
-      /* Register variable[12]: Result */
-      if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-      /* Register variable[12]: Result */
-      variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-      /* Register variable[12]: Result */
-      variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-      variable[11] = variable[12];
-      goto return_label9;
-      return_label9: while(false);
-      /* Register variable[9]: Result */
-      variable[9] = variable[11];
-      variable[8] = variable[9];
-      /* Register variable[9]: Local variable */
-      variable[9] =  variable[1] /*array*/;
-      /* Register variable[10]: Local variable */
-      variable[10] =  variable[7] /*j*/;
-      /* Register variable[11]: Method return value and escape marker */
-      /* Register variable[12]: Result */
-      variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-      /* Ensure var variable[12]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[12])) { /* and */
-        /* Register variable[12]: Result */
-        variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-        /* Register variable[12]: Result */
-        variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+      label5: while(0);
+      REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
+      /* ./../lib/standard//collection//sorter.nit:53 */
+      if (UNTAG_Bool(REGB4)) {
+        fra.me.REG[3] = fra.me.REG[1];
+        REGB4 = REGB2;
+        REGB5 = TAG_Int(0);
+        REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        if (UNTAG_Bool(REGB5)) {
+          REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+          if (UNTAG_Bool(REGB5)) {
+          } else {
+            fprintf(stderr, "Uninitialized attribute %s", "_length");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        } else {
+          REGB6 = TAG_Bool(false);
+          REGB5 = REGB6;
+        }
+        if (UNTAG_Bool(REGB5)) {
+        } else {
+          fprintf(stderr, "Assert %s  failed", "'index'");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+          nit_exit(1);
+        }
+        fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+        REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+        /* ./../lib/standard//collection//array.nit:234 */
+        if (UNTAG_Bool(REGB5)) {
+          fprintf(stderr, "Reciever is null");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+          nit_exit(1);
+        }
+        fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
+        /* ./../lib/standard//collection//array.nit:234 */
+        goto label6;
+        label6: while(0);
+        fra.me.REG[4] = fra.me.REG[1];
+        REGB4 = REGB3;
+        REGB5 = TAG_Int(0);
+        REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        if (UNTAG_Bool(REGB5)) {
+          REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+          if (UNTAG_Bool(REGB5)) {
+          } else {
+            fprintf(stderr, "Uninitialized attribute %s", "_length");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        } else {
+          REGB6 = TAG_Bool(false);
+          REGB5 = REGB6;
+        }
+        if (UNTAG_Bool(REGB5)) {
+        } else {
+          fprintf(stderr, "Assert %s  failed", "'index'");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+          nit_exit(1);
+        }
+        fra.me.REG[4] = ATTR_array___Array____items(fra.me.REG[4]);
+        REGB5 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+        /* ./../lib/standard//collection//array.nit:234 */
+        if (UNTAG_Bool(REGB5)) {
+          fprintf(stderr, "Reciever is null");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+          nit_exit(1);
+        }
+        fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB4)];
+        /* ./../lib/standard//collection//array.nit:234 */
+        goto label7;
+        label7: while(0);
+        /* ./../lib/standard//collection//sorter.nit:55 */
+        CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[4]);
+        /* ./../lib/standard//collection//sorter.nit:56 */
+        CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB3, fra.me.REG[3]);
       }
-      /* Register variable[12]: Result */
-      if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-      /* Register variable[12]: Result */
-      variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-      /* Register variable[12]: Result */
-      variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-      variable[11] = variable[12];
-      goto return_label10;
-      return_label10: while(false);
-      /* Register variable[9]: Result */
-      variable[9] = variable[11];
-      CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/,  variable[6] /*i*/, variable[9]) /*Array::[]=*/;
-      CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/,  variable[7] /*j*/,  variable[8] /*t*/) /*Array::[]=*/;
+    } else {
+      /* ./../lib/standard//collection//sorter.nit:50 */
+      goto label8;
+    }
+  }
+  label8: while(0);
+  REGB3 = TAG_Int(1);
+  REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
+  fra.me.REG[3] = fra.me.REG[1];
+  REGB4 = TAG_Int(0);
+  REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4));
+  /* ./../lib/standard//collection//array.nit:233 */
+  if (UNTAG_Bool(REGB4)) {
+    REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+    if (UNTAG_Bool(REGB4)) {
+    } else {
+      fprintf(stderr, "Uninitialized attribute %s", "_length");
+      fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+      nit_exit(1);
     }
-    continue_4: while(0);
+    REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+    REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
+  /* ./../lib/standard//collection//array.nit:233 */
+  } else {
+    REGB5 = TAG_Bool(false);
+    REGB4 = REGB5;
+  }
+  if (UNTAG_Bool(REGB4)) {
+  } else {
+    fprintf(stderr, "Assert %s  failed", "'index'");
+    fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+    nit_exit(1);
   }
-  break_4: while(0);
-  /* Register variable[8]: Result */
-  variable[8] = TAG_Int(UNTAG_Int( variable[6] /*i*/)-UNTAG_Int( TAG_Int(1)));
-  /* Register variable[9]: Local variable */
-  variable[9] =  variable[1] /*array*/;
-  /* Register variable[10]: Local variable */
-  variable[10] = variable[8];
-  /* Register variable[11]: Method return value and escape marker */
-  /* Register variable[12]: Result */
-  variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-  /* Ensure var variable[12]: Left 'and' operand*/
-  if (UNTAG_Bool(variable[12])) { /* and */
-    /* Register variable[12]: Result */
-    variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-    /* Register variable[12]: Result */
-    variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+  fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+  REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+  /* ./../lib/standard//collection//array.nit:234 */
+  if (UNTAG_Bool(REGB4)) {
+    fprintf(stderr, "Reciever is null");
+    fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+    nit_exit(1);
   }
-  /* Register variable[12]: Result */
-  if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-  /* Register variable[12]: Result */
-  variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-  /* Register variable[12]: Result */
-  variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-  variable[11] = variable[12];
-  goto return_label11;
-  return_label11: while(false);
-  /* Register variable[8]: Result */
-  variable[8] = variable[11];
-  CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/,  variable[2] /*from*/, variable[8]) /*Array::[]=*/;
-  /* Register variable[8]: Result */
-  variable[8] = TAG_Int(UNTAG_Int( variable[6] /*i*/)-UNTAG_Int( TAG_Int(1)));
-  CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/, variable[8],  variable[5] /*pivot*/) /*Array::[]=*/;
-  /* Register variable[8]: Result */
-  variable[8] = TAG_Int(UNTAG_Int( variable[6] /*i*/)-UNTAG_Int( TAG_Int(2)));
-  CALL_sorter___AbstractSorter___sub_sort(variable[0])(variable[0],  variable[1] /*array*/,  variable[2] /*from*/, variable[8]) /*AbstractSorter::sub_sort*/;
-  CALL_sorter___AbstractSorter___sub_sort(variable[0])(variable[0],  variable[1] /*array*/,  variable[6] /*i*/,  variable[3] /*to*/) /*AbstractSorter::sub_sort*/;
-  return_label2: while(false);
-  tracehead = trace.prev;
+  fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB3)];
+  /* ./../lib/standard//collection//array.nit:234 */
+  goto label9;
+  label9: while(0);
+  /* ./../lib/standard//collection//sorter.nit:59 */
+  CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[3]);
+  REGB3 = TAG_Int(1);
+  REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
+  /* ./../lib/standard//collection//sorter.nit:60 */
+  CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB3, fra.me.REG[2]);
+  REGB3 = TAG_Int(2);
+  REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
+  /* ./../lib/standard//collection//sorter.nit:61 */
+  CALL_sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0, REGB3);
+  /* ./../lib/standard//collection//sorter.nit:62 */
+  CALL_sorter___AbstractSorter___sub_sort(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB2, REGB1);
+  stack_frame_head = fra.me.prev;
   return;
 }
-void sorter___AbstractSorter___bubble_sort(val_t  self, val_t  param0, val_t  param1, val_t  param2) {
-  struct trace_t trace = {NULL, NULL, 65, LOCATE_sorter___AbstractSorter___bubble_sort};
-  val_t variable[13];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Local variable */
-  variable[1] =  param0;
-  /* Register variable[2]: Local variable */
-  variable[2] =  param1;
-  /* Register variable[3]: Local variable */
-  variable[3] =  param2;
-  /* Register variable[4]: Method return value and escape marker */
-  /* Register variable[5]: Local variable */
-  variable[5] =  variable[2] /*from*/;
-  while (true) { /*while*/
-    /* Register variable[6]: Result */
-    variable[6] = TAG_Bool(UNTAG_Int( variable[5] /*i*/)<UNTAG_Int( variable[3] /*to*/));
-    if (!UNTAG_Bool(variable[6])) break; /* while*/
-    /* Register variable[6]: Local variable */
-    variable[6] =  variable[5] /*i*/;
-    /* Register variable[7]: Local variable */
-    /* Register variable[8]: Local variable */
-    variable[8] =  variable[1] /*array*/;
-    /* Register variable[9]: Local variable */
-    variable[9] =  variable[5] /*i*/;
-    /* Register variable[10]: Method return value and escape marker */
-    /* Register variable[11]: Result */
-    variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-    /* Ensure var variable[11]: Left 'and' operand*/
-    if (UNTAG_Bool(variable[11])) { /* and */
-      /* Register variable[11]: Result */
-      variable[11] = ATTR_array___AbstractArrayRead____length(variable[8]) /*AbstractArrayRead::_length*/;
-      /* Register variable[11]: Result */
-      variable[11] = TAG_Bool(UNTAG_Int( variable[9] /*index*/)<UNTAG_Int(variable[11]));
-    }
-    /* Register variable[11]: Result */
-    if (!UNTAG_Bool(variable[11])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-    /* Register variable[11]: Result */
-    variable[11] = ATTR_array___Array____items(variable[8]) /*Array::_items*/;
-    /* Register variable[11]: Result */
-    variable[11] = UNBOX_NativeArray(variable[11])[UNTAG_Int( variable[9] /*index*/)];
-    variable[10] = variable[11];
-    goto return_label14;
-    return_label14: while(false);
-    /* Register variable[8]: Result */
-    variable[8] = variable[10];
-    variable[7] = variable[8];
-    /* Register variable[8]: Local variable */
-    variable[8] =  variable[5] /*i*/;
-    while (true) { /*while*/
-      /* Register variable[9]: Result */
-      variable[9] = TAG_Bool(UNTAG_Int( variable[8] /*j*/)<=UNTAG_Int( variable[3] /*to*/));
-      if (!UNTAG_Bool(variable[9])) break; /* while*/
-      /* Register variable[9]: Local variable */
-      variable[9] =  variable[1] /*array*/;
-      /* Register variable[10]: Local variable */
-      variable[10] =  variable[8] /*j*/;
-      /* Register variable[11]: Method return value and escape marker */
-      /* Register variable[12]: Result */
-      variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-      /* Ensure var variable[12]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[12])) { /* and */
-        /* Register variable[12]: Result */
-        variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-        /* Register variable[12]: Result */
-        variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+void sorter___AbstractSorter___bubble_sort(val_t p0, val_t p1, val_t p2, val_t p3){
+  struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+  val_t REGB0;
+  val_t REGB1;
+  val_t REGB2;
+  val_t REGB3;
+  val_t REGB4;
+  val_t REGB5;
+  val_t REGB6;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 65;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___bubble_sort;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 4;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[2] = NIT_NULL;
+  fra.me.REG[3] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  REGB0 = p2;
+  REGB1 = p3;
+  /* ./../lib/standard//collection//sorter.nit:69 */
+  while(1) {
+    REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+    /* ./../lib/standard//collection//sorter.nit:69 */
+    if (UNTAG_Bool(REGB2)) {
+      REGB2 = REGB0;
+      fra.me.REG[2] = fra.me.REG[1];
+      REGB3 = REGB0;
+      REGB4 = TAG_Int(0);
+      REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4));
+      /* ./../lib/standard//collection//array.nit:233 */
+      if (UNTAG_Bool(REGB4)) {
+        REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+        if (UNTAG_Bool(REGB4)) {
+        } else {
+          fprintf(stderr, "Uninitialized attribute %s", "_length");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+          nit_exit(1);
+        }
+        REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+        REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB4));
+      /* ./../lib/standard//collection//array.nit:233 */
+      } else {
+        REGB5 = TAG_Bool(false);
+        REGB4 = REGB5;
+      }
+      if (UNTAG_Bool(REGB4)) {
+      } else {
+        fprintf(stderr, "Assert %s  failed", "'index'");
+        fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+        nit_exit(1);
       }
-      /* Register variable[12]: Result */
-      if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-      /* Register variable[12]: Result */
-      variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-      /* Register variable[12]: Result */
-      variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-      variable[11] = variable[12];
-      goto return_label16;
-      return_label16: while(false);
-      /* Register variable[9]: Result */
-      variable[9] = variable[11];
-      /* Register variable[9]: Result */
-      variable[9] = CALL_sorter___AbstractSorter___compare(variable[0])(variable[0],  variable[7] /*min_v*/, variable[9]) /*AbstractSorter::compare*/;
-      /* Register variable[9]: Result */
-      variable[9] = TAG_Bool(UNTAG_Int(variable[9])>UNTAG_Int( TAG_Int(0)));
-      if (UNTAG_Bool(variable[9])) { /*if*/
-        variable[6] =  variable[8] /*j*/ /*min=*/;
-        /* Register variable[9]: Local variable */
-        variable[9] =  variable[1] /*array*/;
-        /* Register variable[10]: Local variable */
-        variable[10] =  variable[8] /*j*/;
-        /* Register variable[11]: Method return value and escape marker */
-        /* Register variable[12]: Result */
-        variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-        /* Ensure var variable[12]: Left 'and' operand*/
-        if (UNTAG_Bool(variable[12])) { /* and */
-          /* Register variable[12]: Result */
-          variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-          /* Register variable[12]: Result */
-          variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+      fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[2]);
+      REGB4 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+      /* ./../lib/standard//collection//array.nit:234 */
+      if (UNTAG_Bool(REGB4)) {
+        fprintf(stderr, "Reciever is null");
+        fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+        nit_exit(1);
+      }
+      fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB3)];
+      /* ./../lib/standard//collection//array.nit:234 */
+      goto label1;
+      label1: while(0);
+      REGB3 = REGB0;
+      /* ./../lib/standard//collection//sorter.nit:73 */
+      while(1) {
+        REGB4 = TAG_Bool(UNTAG_Int(REGB3)<=UNTAG_Int(REGB1));
+        /* ./../lib/standard//collection//sorter.nit:73 */
+        if (UNTAG_Bool(REGB4)) {
+          fra.me.REG[3] = fra.me.REG[1];
+          REGB4 = REGB3;
+          REGB5 = TAG_Int(0);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
+          /* ./../lib/standard//collection//array.nit:233 */
+          if (UNTAG_Bool(REGB5)) {
+            REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+            if (UNTAG_Bool(REGB5)) {
+            } else {
+              fprintf(stderr, "Uninitialized attribute %s", "_length");
+              fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+              nit_exit(1);
+            }
+            REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+            REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
+          /* ./../lib/standard//collection//array.nit:233 */
+          } else {
+            REGB6 = TAG_Bool(false);
+            REGB5 = REGB6;
+          }
+          if (UNTAG_Bool(REGB5)) {
+          } else {
+            fprintf(stderr, "Assert %s  failed", "'index'");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+          REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+          /* ./../lib/standard//collection//array.nit:234 */
+          if (UNTAG_Bool(REGB5)) {
+            fprintf(stderr, "Reciever is null");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+            nit_exit(1);
+          }
+          fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
+          /* ./../lib/standard//collection//array.nit:234 */
+          goto label2;
+          label2: while(0);
+          REGB4 = CALL_sorter___AbstractSorter___compare(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], fra.me.REG[3]);
+          REGB5 = TAG_Int(0);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB4)>UNTAG_Int(REGB5));
+          /* ./../lib/standard//collection//sorter.nit:74 */
+          if (UNTAG_Bool(REGB5)) {
+            REGB2 = REGB3;
+            fra.me.REG[3] = fra.me.REG[1];
+            REGB5 = REGB3;
+            REGB4 = TAG_Int(0);
+            REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
+            /* ./../lib/standard//collection//array.nit:233 */
+            if (UNTAG_Bool(REGB4)) {
+              REGB4 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+              if (UNTAG_Bool(REGB4)) {
+              } else {
+               fprintf(stderr, "Uninitialized attribute %s", "_length");
+               fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+               nit_exit(1);
+              }
+              REGB4 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+              REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
+            /* ./../lib/standard//collection//array.nit:233 */
+            } else {
+              REGB6 = TAG_Bool(false);
+              REGB4 = REGB6;
+            }
+            if (UNTAG_Bool(REGB4)) {
+            } else {
+              fprintf(stderr, "Assert %s  failed", "'index'");
+              fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+              nit_exit(1);
+            }
+            fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+            REGB4 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+            /* ./../lib/standard//collection//array.nit:234 */
+            if (UNTAG_Bool(REGB4)) {
+              fprintf(stderr, "Reciever is null");
+              fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+              nit_exit(1);
+            }
+            fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB5)];
+            /* ./../lib/standard//collection//array.nit:234 */
+            goto label3;
+            label3: while(0);
+            fra.me.REG[2] = fra.me.REG[3];
+          /* ./../lib/standard//collection//sorter.nit:76 */
+          }
+          REGB5 = TAG_Int(1);
+          REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB5));
+          REGB3 = REGB5;
+        /* ./../lib/standard//collection//sorter.nit:78 */
+        } else {
+          /* ./../lib/standard//collection//sorter.nit:73 */
+          goto label4;
         }
-        /* Register variable[12]: Result */
-        if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-        /* Register variable[12]: Result */
-        variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-        /* Register variable[12]: Result */
-        variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-        variable[11] = variable[12];
-        goto return_label17;
-        return_label17: while(false);
-        /* Register variable[9]: Result */
-        variable[9] = variable[11];
-        variable[7] = variable[9] /*min_v=*/;
       }
-      variable[8] = TAG_Int(UNTAG_Int(variable[8])+UNTAG_Int( TAG_Int(1))) /*j*/;
-      continue_15: while(0);
-    }
-    break_15: while(0);
-    /* Register variable[9]: Result */
-    variable[9] = TAG_Bool(( variable[6] /*min*/)!=( variable[5] /*i*/));
-    if (UNTAG_Bool(variable[9])) { /*if*/
-      /* Register variable[9]: Local variable */
-      variable[9] =  variable[1] /*array*/;
-      /* Register variable[10]: Local variable */
-      variable[10] =  variable[5] /*i*/;
-      /* Register variable[11]: Method return value and escape marker */
-      /* Register variable[12]: Result */
-      variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
-      /* Ensure var variable[12]: Left 'and' operand*/
-      if (UNTAG_Bool(variable[12])) { /* and */
-        /* Register variable[12]: Result */
-        variable[12] = ATTR_array___AbstractArrayRead____length(variable[9]) /*AbstractArrayRead::_length*/;
-        /* Register variable[12]: Result */
-        variable[12] = TAG_Bool(UNTAG_Int( variable[10] /*index*/)<UNTAG_Int(variable[12]));
+      label4: while(0);
+      REGB3 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB0));
+      /* ./../lib/standard//collection//sorter.nit:80 */
+      if (UNTAG_Bool(REGB3)) {
+      } else {
+        REGB5 = TAG_Bool((REGB2)==(REGB0));
+        REGB3 = REGB5;
+      /* ./../lib/standard//collection//sorter.nit:80 */
+      }
+      REGB3 = TAG_Bool(!UNTAG_Bool(REGB3));
+      if (UNTAG_Bool(REGB3)) {
+        fra.me.REG[3] = fra.me.REG[1];
+        REGB3 = REGB0;
+        REGB5 = TAG_Int(0);
+        REGB5 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        if (UNTAG_Bool(REGB5)) {
+          REGB5 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+          if (UNTAG_Bool(REGB5)) {
+          } else {
+            fprintf(stderr, "Uninitialized attribute %s", "_length");
+            fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+            nit_exit(1);
+          }
+          REGB5 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+          REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
+        /* ./../lib/standard//collection//array.nit:233 */
+        } else {
+          REGB4 = TAG_Bool(false);
+          REGB5 = REGB4;
+        }
+        if (UNTAG_Bool(REGB5)) {
+        } else {
+          fprintf(stderr, "Assert %s  failed", "'index'");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 233);
+          nit_exit(1);
+        }
+        fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[3]);
+        REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+        /* ./../lib/standard//collection//array.nit:234 */
+        if (UNTAG_Bool(REGB5)) {
+          fprintf(stderr, "Reciever is null");
+          fprintf(stderr, " (%s:%d)\n", LOCATE_array, 234);
+          nit_exit(1);
+        }
+        fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB3)];
+        /* ./../lib/standard//collection//array.nit:234 */
+        goto label5;
+        label5: while(0);
+        /* ./../lib/standard//collection//sorter.nit:81 */
+        CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB2, fra.me.REG[3]);
+        /* ./../lib/standard//collection//sorter.nit:82 */
+        CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], REGB0, fra.me.REG[2]);
       }
-      /* Register variable[12]: Result */
-      if (!UNTAG_Bool(variable[12])) { fprintf(stderr, "Assert%s failed", " 'index' "); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_array___Array_____bra, LOCATE_sorter, 234); nit_exit(1);}
-      /* Register variable[12]: Result */
-      variable[12] = ATTR_array___Array____items(variable[9]) /*Array::_items*/;
-      /* Register variable[12]: Result */
-      variable[12] = UNBOX_NativeArray(variable[12])[UNTAG_Int( variable[10] /*index*/)];
-      variable[11] = variable[12];
-      goto return_label18;
-      return_label18: while(false);
-      /* Register variable[9]: Result */
-      variable[9] = variable[11];
-      CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/,  variable[6] /*min*/, variable[9]) /*Array::[]=*/;
-      CALL_abstract_collection___Map_____braeq( variable[1] /*array*/)( variable[1] /*array*/,  variable[5] /*i*/,  variable[7] /*min_v*/) /*Array::[]=*/;
+      REGB2 = TAG_Int(1);
+      REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB2));
+      REGB0 = REGB2;
+    /* ./../lib/standard//collection//sorter.nit:84 */
+    } else {
+      /* ./../lib/standard//collection//sorter.nit:69 */
+      goto label6;
     }
-    variable[5] = TAG_Int(UNTAG_Int(variable[5])+UNTAG_Int( TAG_Int(1))) /*i*/;
-    continue_13: while(0);
   }
-  break_13: while(0);
-  return_label12: while(false);
-  tracehead = trace.prev;
+  label6: while(0);
+  stack_frame_head = fra.me.prev;
   return;
 }
-void sorter___AbstractSorter___init(val_t  self, int* init_table) {
-  struct trace_t trace = {NULL, NULL, 0, LOCATE_sorter___AbstractSorter___init};
-  val_t *variable = NULL;
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  tracehead = trace.prev;
+void sorter___AbstractSorter___init(val_t p0, int* init_table){
+  int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_AbstractSorter].i;
+  struct {struct stack_frame_t me;} fra;
+  val_t tmp;
+  if (init_table[itpos0]) return;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 0;
+  fra.me.meth = LOCATE_sorter___AbstractSorter___init;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 0;
+  stack_frame_head = fra.me.prev;
+  init_table[itpos0] = 1;
   return;
 }
-val_t sorter___ComparableSorter___compare(val_t  self, val_t  param0, val_t  param1) {
-  struct trace_t trace = {NULL, NULL, 93, LOCATE_sorter___ComparableSorter___compare};
-  val_t variable[5];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  /* Register variable[1]: Local variable */
-  variable[1] =  param0;
-  /* Register variable[2]: Local variable */
-  variable[2] =  param1;
-  /* Register variable[3]: Method return value and escape marker */
-  /* Register variable[4]: Result */
-  variable[4] = CALL_kernel___Comparable_____leqg( variable[1] /*a*/)( variable[1] /*a*/,  variable[2] /*b*/) /*Comparable::<=>*/;
-  variable[3] = variable[4];
-  goto return_label19;
-  return_label19: while(false);
-  tracehead = trace.prev;
-  return variable[3];
+val_t sorter___ComparableSorter___compare(val_t p0, val_t p1, val_t p2){
+  struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+  val_t REGB0;
+  val_t tmp;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 93;
+  fra.me.meth = LOCATE_sorter___ComparableSorter___compare;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 3;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[1] = NIT_NULL;
+  fra.me.REG[2] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  fra.me.REG[1] = p1;
+  fra.me.REG[2] = p2;
+  REGB0 = CALL_kernel___Comparable_____leqg(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+  /* ./../lib/standard//collection//sorter.nit:94 */
+  goto label1;
+  label1: while(0);
+  stack_frame_head = fra.me.prev;
+  return REGB0;
 }
-void sorter___ComparableSorter___init(val_t  self, int* init_table) {
-  struct trace_t trace = {NULL, NULL, 96, LOCATE_sorter___ComparableSorter___init};
-  val_t variable[2];
-  struct WBT_ **closurevariable = NULL;
-  trace.prev = tracehead; tracehead = &trace;
-  trace.file = LOCATE_sorter;
-  /* Register variable[0]: Local variable */
-  variable[0] =  self;
-  if (init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ComparableSorter].i]) return;
-  /* Register variable[1]: Method return value and escape marker */
-  return_label20: while(false);
-  init_table[VAL2OBJ(variable[0])->vft[INIT_TABLE_POS_ComparableSorter].i] = 1;
-  tracehead = trace.prev;
+void sorter___ComparableSorter___init(val_t p0, int* init_table){
+  int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_ComparableSorter].i;
+  struct {struct stack_frame_t me;} fra;
+  val_t tmp;
+  if (init_table[itpos1]) return;
+  fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+  fra.me.file = LOCATE_sorter;
+  fra.me.line = 96;
+  fra.me.meth = LOCATE_sorter___ComparableSorter___init;
+  fra.me.has_broke = 0;
+  fra.me.REG_size = 1;
+  fra.me.REG[0] = NIT_NULL;
+  fra.me.REG[0] = p0;
+  /* ./../lib/standard//collection//sorter.nit:96 */
+  CALL_sorter___AbstractSorter___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+  stack_frame_head = fra.me.prev;
+  init_table[itpos1] = 1;
   return;
 }