Ejemplo n.º 1
0
int main(int argc, char** args){
	int64_t* n;
	_DECL_DEALLOC(n);
	int64_t max = 0;
	int64_t index = 0;
	_DECL_1DARRAY(arr);
	_DECL_DEALLOC(arr);
	int64_t* _5;
	_DECL_DEALLOC(_5);
	_DECL_2DARRAY(_6);
	_DECL_DEALLOC(_6);
	int64_t _7 = 0;
	_DECL_1DARRAY(_8);
	_DECL_DEALLOC(_8);
	int64_t _9 = 0;
	int64_t _10 = 0;
	_DECL_1DARRAY(_11);
	_DECL_DEALLOC(_11);
	int64_t _12 = 0;
	int64_t _13 = 0;
	int64_t _14 = 0;
	_DECL_1DARRAY(_15);
	_DECL_DEALLOC(_15);
	int64_t _16 = 0;
	void* _17;
	int64_t _19 = 0;
	int64_t _20 = 0;
	void* _21;
	int64_t _23 = 0;
	int64_t _24 = 0;
	int64_t _25 = 0;
	void* _26;
	_DECL_1DARRAY(_28);
	_DECL_DEALLOC(_28);
	//fieldload %6 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	_DEALLOC_2DARRAY_int64_t(_6);
	_CONV_ARGS(_6);
	_ADD_DEALLOC(_6);
	//const %7 = 0 : int
	_7 = 0;
	//indexof %8 = %6, %7 : int[][]
	_8=_6[_7];
	_8_size = _6_size_size;
	_REMOVE_DEALLOC(_8);
	//invoke (%5) = (%8) whiley/lang/Int:parse : function(whiley/lang/ASCII:string)->(null|int)
	{
		_STR_TO_INT(_5, _8);
		_ADD_DEALLOC(_5);
		_REMOVE_DEALLOC(_8);
	}
	//assign %1 = %5  : null|int
	_DEALLOC(n);
	// isCopyEliminated = true
	n = _5;
	_TRANSFER_DEALLOC(n, _5);
	//ifis %1, null goto blklab9 : null|int
	if(n == NULL) { goto blklab9;}
	//assign %2 = %1  : int
	// isCopyEliminated = true
	max = *n;
	//const %9 = 0 : int
	_9 = 0;
	//assign %3 = %9  : int
	// isCopyEliminated = true
	index = _9;
	//const %10 = 0 : int
	_10 = 0;
	//arraygen %11 = [10; 2] : int[]
	_DEALLOC(_11);
	_NEW_1DARRAY_int64_t(_11, max, _10);
	_ADD_DEALLOC(_11);
	//assign %4 = %11  : int[]
	_DEALLOC(arr);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(arr, _11);
	_TRANSFER_DEALLOC(arr, _11);
	//loop (%3, %4, %12, %13, %14)
	while(true){
		//ifge %3, %2 goto blklab10 : int
		if(index>=max){goto blklab10;}
		//sub %12 = %2, %3 : int
		_12=max-index;
		//update %4[%3] = %12 : int[] -> int[]
		// isCopyEliminated = false
		arr[index] = _12;
		//const %13 = 1 : int
		_13 = 1;
		//add %14 = %3, %13 : int
		_14=index+_13;
		//assign %3 = %14  : int
		// isCopyEliminated = true
		index = _14;
//.blklab11
blklab11:;
	}
//.blklab10
blklab10:;
	//const %16 = 0 : int
	_16 = 0;
	//invoke (%15) = (%4, %16, %2) MergeSort_original:sortV1 : function(int[],int,int)->(int[])
	{
		_DEALLOC(_15);
		// isCopyEliminated of '_4' = true
		_15 = _sortV1_(_1DARRAY_PARAM(arr), false, _16, max, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_15));
		_RESET_DEALLOC(arr, "true-true-false" , "sortV1");
		_ADD_DEALLOC(_15);
	}
	//assign %4 = %15  : int[]
	_DEALLOC(arr);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(arr, _15);
	_TRANSFER_DEALLOC(arr, _15);
	//fieldload %17 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %18 = %17 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %19 = 0 : int
	_19 = 0;
	//indexof %20 = %4, %19 : int[]
	_20=arr[_19];
	//indirectinvoke () = %18 (%20) : method(any)->()
	{
		printf("%"PRId64"\n", _20);
	}
	//fieldload %21 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %22 = %21 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %23 = 1 : int
	_23 = 1;
	//sub %24 = %2, %23 : int
	_24=max-_23;
	//indexof %25 = %4, %24 : int[]
	_25=arr[_24];
	//indirectinvoke () = %22 (%25) : method(any)->()
	{
		printf("%"PRId64"\n", _25);
	}
	//fieldload %26 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %27 = %26 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %28 = [80,97,115,115,32,77,101,114,103,101,115,111,114,116,32,116,101,115,116,32,99,97,115,101] : int[]
	_DEALLOC(_28);
	_NEW_1DARRAY_int64_t(_28, 24, 0);
	_28[0] = 80; _28[1] = 97; _28[2] = 115; _28[3] = 115; _28[4] = 32; _28[5] = 77; _28[6] = 101; _28[7] = 114; _28[8] = 103; _28[9] = 101; _28[10] = 115; _28[11] = 111; _28[12] = 114; _28[13] = 116; _28[14] = 32; _28[15] = 116; _28[16] = 101; _28[17] = 115; _28[18] = 116; _28[19] = 32; _28[20] = 99; _28[21] = 97; _28[22] = 115; _28[23] = 101;
	_ADD_DEALLOC(_28);
	//indirectinvoke () = %27 (%28) : method(int[])->()
	{
		println_s(_28, _28_size);
	}
//.blklab9
blklab9:;
	//return
	_DEALLOC(n);
	_DEALLOC(arr);
	_DEALLOC(_5);
	_DEALLOC_2DARRAY_int64_t(_6);
	_DEALLOC(_8);
	_DEALLOC(_11);
	_DEALLOC(_15);
	_DEALLOC(_28);
	exit(0);
}
Ejemplo n.º 2
0
int main(int argc, char** args){
	_DECL_1DARRAY(a);
	_DECL_DEALLOC(a);
	_DECL_1DARRAY(b);
	_DECL_DEALLOC(b);
	_DECL_1DARRAY(c);
	_DECL_DEALLOC(c);
	_DECL_1DARRAY(r);
	_DECL_DEALLOC(r);
	int64_t _5;
	int64_t _6;
	_DECL_1DARRAY(_7);
	_DECL_DEALLOC(_7);
	int64_t _8;
	int64_t _9;
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	int64_t _11;
	int64_t _12;
	_DECL_1DARRAY(_13);
	_DECL_DEALLOC(_13);
	_DECL_1DARRAY(_14);
	_DECL_DEALLOC(_14);
	//const %5 = 2 : int
	_5 = 2;
	//const %6 = 2 : int
	_6 = 2;
	//arraygen %7 = [5; 6] : int[]
	_NEW1DARRAY_DEALLOC(_7, _5, _6, int64_t);
	//assign %1 = %7  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _7);
	//const %8 = 2 : int
	_8 = 2;
	//const %9 = 2 : int
	_9 = 2;
	//arraygen %10 = [8; 9] : int[]
	_NEW1DARRAY_DEALLOC(_10, _8, _9, int64_t);
	//assign %2 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(b, _10);
	//const %11 = 2 : int
	_11 = 2;
	//const %12 = 2 : int
	_12 = 2;
	//arraygen %13 = [11; 12] : int[]
	_NEW1DARRAY_DEALLOC(_13, _11, _12, int64_t);
	//assign %3 = %13  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(c, _13);
	//invoke (%14) = (%1, %2, %3) 3parameter_test655:func : function(int[],int[],int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_14, c, "true-NEVER_RETURN-false" , "func");
		_FUNCTIONCALL_NO_COPY_PRE(_14, b, "true-NEVER_RETURN-false" , "func");
		_FUNCTIONCALL_NO_COPY_PRE(_14, a, "false-MAYBE_RETURN-false" , "func");
		_DEALLOC(_14);
		// isCopyEliminated of '_1' = true
		// isCopyEliminated of '_2' = true
		// isCopyEliminated of '_3' = true
		_14 = _func_(a, a_size, b, b_size, c, c_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_14));
		if( _14 == a ){
			_14_dealloc = a_dealloc;
			a_dealloc = false;
		} else {
			_14_dealloc = true;
		}
	}
	//assign %4 = %14  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(r, _14);
	//return
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(r);
	_DEALLOC(_7);
	_DEALLOC(_10);
	_DEALLOC(_13);
	_DEALLOC(_14);
	exit(0);
}
Ejemplo n.º 3
0
int main(int argc, char** args){
	int64_t* n;
	_DECL_DEALLOC(n);
	int64_t max;
	int64_t size;
	int64_t repeats;
	int64_t index;
	_DECL_1DARRAY(arr);
	_DECL_DEALLOC(arr);
	int64_t* _7;
	_DECL_DEALLOC(_7);
	_DECL_2DARRAY(_8);
	_DECL_DEALLOC(_8);
	int64_t _9;
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	int64_t _11;
	int64_t _12;
	int64_t _13;
	int64_t _14;
	_DECL_1DARRAY(_15);
	_DECL_DEALLOC(_15);
	int64_t _16;
	int64_t _17;
	int64_t _18;
	_DECL_1DARRAY(_19);
	_DECL_DEALLOC(_19);
	void* _20;
	int64_t _22;
	int64_t _23;
	int64_t _24;
	void* _25;
	int64_t _27;
	int64_t _28;
	void* _29;
	_DECL_1DARRAY(_31);
	_DECL_DEALLOC(_31);
	void* _32;
	void* _34;
	_DECL_1DARRAY(_36);
	_DECL_DEALLOC(_36);
	//fieldload %8 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	_DEALLOC_2DARRAY(_8);
	_CONV_ARGS(_8);
	_8_dealloc = true;
	//const %9 = 0 : int
	_9 = 0;
	//indexof %10 = %8, %9 : int[][]
	_10=_8[_9];
	_10_size = _8_size_size;
	_10_dealloc = false;
	//invoke (%7) = (%10) whiley/lang/Int:parse : function(whiley/lang/ASCII:string)->(null|int)
	{
		_STR_TO_INT(_7, _10);
		_7_dealloc = true;
		_10_dealloc = false;
	}
	//assign %1 = %7  : null|int
	// isCopyEliminated = true
	_DEALLOC(n);
	n = _7;
	_TRANSFER_DEALLOC_POST(n, _7);
	//ifis %1, null goto blklab5 : null|int
	if(n == NULL) { goto blklab5;}
	//const %11 = 1 : int
	_11 = 1;
	//assign %2 = %11  : int
	// isCopyEliminated = true
	max = _11;
	//assign %3 = %1  : int
	// isCopyEliminated = true
	size = *n;
	//const %12 = 0 : int
	_12 = 0;
	//assign %4 = %12  : int
	// isCopyEliminated = true
	repeats = _12;
	//loop (%4, %5, %6, %13, %14, %15, %16, %17, %18, %19, %20, %21, %22, %23, %24, %25, %26, %27, %28)
	while(true){
		//ifge %4, %2 goto blklab6 : int
		if(repeats>=max){goto blklab6;}
		//const %13 = 0 : int
		_13 = 0;
		//assign %5 = %13  : int
		// isCopyEliminated = true
		index = _13;
		//const %14 = 0 : int
		_14 = 0;
		//arraygen %15 = [14; 3] : int[]
		_NEW1DARRAY_DEALLOC(_15, _14, size, int64_t);
		//assign %6 = %15  : int[]
		// isCopyEliminated = true
		_TRANSFER_DEALLOC(arr, _15);
		//loop (%5, %6, %16, %17, %18)
		while(true){
			//ifge %5, %3 goto blklab8 : int
			if(index>=size){goto blklab8;}
			//sub %16 = %3, %5 : int
			_16=size-index;
			//update %6[%5] = %16 : int[] -> int[]
			arr[index] = _16;
			//const %17 = 1 : int
			_17 = 1;
			//add %18 = %5, %17 : int
			_18=index+_17;
			//assign %5 = %18  : int
			// isCopyEliminated = true
			index = _18;
//.blklab9
blklab9:;
		}
//.blklab8
blklab8:;
		//invoke (%19) = (%6) BubbleSort_original:bubbleSort : function(int[])->(int[])
		{
			_FUNCTIONCALL_NO_COPY_PRE(_19, arr, 0, "liveness: arr = false, readonly: arr = false, return:arr = ALWAYS_RETURN" , "bubbleSort");
			_DEALLOC(_19);
			// isCopyEliminated of 'arr at 0' = true
			_19 = _bubbleSort_(arr, arr_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_19));
			_19_dealloc = arr_dealloc;
			arr_dealloc = false;
		}
		//assign %6 = %19  : int[]
		// isCopyEliminated = true
		_TRANSFER_DEALLOC(arr, _19);
		//fieldload %20 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
		//fieldload %21 = %20 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
		//const %22 = 1 : int
		_22 = 1;
		//sub %23 = %3, %22 : int
		_23=size-_22;
		//indexof %24 = %6, %23 : int[]
		_24=arr[_23];
		//indirectinvoke () = %21 (%24) : method(any)->()
		{
			printf("%"PRId64"\n", _24);
		}
		//fieldload %25 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
		//fieldload %26 = %25 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
		//indirectinvoke () = %26 (%4) : method(any)->()
		{
			printf("%"PRId64"\n", repeats);
		}
		//const %27 = 1 : int
		_27 = 1;
		//add %28 = %4, %27 : int
		_28=repeats+_27;
		//assign %4 = %28  : int
		// isCopyEliminated = true
		repeats = _28;
//.blklab7
blklab7:;
	}
//.blklab6
blklab6:;
	//fieldload %29 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %30 = %29 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %31 = [78,117,109,98,101,114,32,111,102,32,114,101,112,101,97,116,115,32] : int[]
	_DEALLOC(_31);
	_NEW_1DARRAY_int64_t(_31, 18, 0);
	_31[0] = 78; _31[1] = 117; _31[2] = 109; _31[3] = 98; _31[4] = 101; _31[5] = 114; _31[6] = 32; _31[7] = 111; _31[8] = 102; _31[9] = 32; _31[10] = 114; _31[11] = 101; _31[12] = 112; _31[13] = 101; _31[14] = 97; _31[15] = 116; _31[16] = 115; _31[17] = 32; 
	_31_dealloc = true;
	//indirectinvoke () = %30 (%31) : method(int[])->()
	{
		printf_s(_31, _31_size);
	}
	//fieldload %32 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %33 = %32 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %33 (%4) : method(any)->()
	{
		printf("%"PRId64"\n", repeats);
	}
	//fieldload %34 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %35 = %34 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %36 = [80,97,115,115,32,66,117,98,98,108,101,83,111,114,116,32,116,101,115,116,32,99,97,115,101] : int[]
	_DEALLOC(_36);
	_NEW_1DARRAY_int64_t(_36, 25, 0);
	_36[0] = 80; _36[1] = 97; _36[2] = 115; _36[3] = 115; _36[4] = 32; _36[5] = 66; _36[6] = 117; _36[7] = 98; _36[8] = 98; _36[9] = 108; _36[10] = 101; _36[11] = 83; _36[12] = 111; _36[13] = 114; _36[14] = 116; _36[15] = 32; _36[16] = 116; _36[17] = 101; _36[18] = 115; _36[19] = 116; _36[20] = 32; _36[21] = 99; _36[22] = 97; _36[23] = 115; _36[24] = 101; 
	_36_dealloc = true;
	//indirectinvoke () = %35 (%36) : method(int[])->()
	{
		println_s(_36, _36_size);
	}
//.blklab5
blklab5:;
	//return
	_DEALLOC(n);
	_DEALLOC(arr);
	_DEALLOC(_7);
	_FREE_ARGS(_8);
	_DEALLOC(_10);
	_DEALLOC(_15);
	_DEALLOC(_19);
	_DEALLOC(_31);
	_DEALLOC(_36);
	exit(0);
}
Ejemplo n.º 4
0
int64_t* _sortV1_(_DECL_1DARRAY_PARAM(items), _DECL_DEALLOC_PARAM(items), int64_t start, int64_t end, _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_1DARRAY(_3);
	_DECL_DEALLOC(_3);
	int64_t pivot = 0;
	_DECL_1DARRAY(lhs);
	_DECL_DEALLOC(lhs);
	_DECL_1DARRAY(rhs);
	_DECL_DEALLOC(rhs);
	int64_t l = 0;
	int64_t r = 0;
	int64_t i = 0;
	int64_t _10 = 0;
	int64_t _11 = 0;
	int64_t _12 = 0;
	int64_t _13 = 0;
	int64_t _14 = 0;
	_DECL_1DARRAY(_15);
	_DECL_DEALLOC(_15);
	_DECL_1DARRAY(_16);
	_DECL_DEALLOC(_16);
	int64_t _17 = 0;
	_DECL_1DARRAY(_18);
	_DECL_DEALLOC(_18);
	_DECL_1DARRAY(_19);
	_DECL_DEALLOC(_19);
	int64_t _20 = 0;
	int64_t _21 = 0;
	int64_t _22 = 0;
	int64_t _23 = 0;
	int64_t _24 = 0;
	int64_t _25 = 0;
	int64_t _26 = 0;
	int64_t _27 = 0;
	int64_t _28 = 0;
	int64_t _29 = 0;
	int64_t _30 = 0;
	int64_t _31 = 0;
	int64_t _32 = 0;
	int64_t _33 = 0;
	int64_t _34 = 0;
	int64_t _35 = 0;
	int64_t _36 = 0;
	int64_t _37 = 0;
	int64_t _38 = 0;
	int64_t _39 = 0;
	int64_t _40 = 0;
	int64_t _41 = 0;
	int64_t _42 = 0;
	int64_t _43 = 0;
	int64_t _44 = 0;
	int64_t _45 = 0;
	int64_t _46 = 0;
	int64_t _47 = 0;
	int64_t _48 = 0;
	int64_t _49 = 0;
	//const %10 = 1 : int
	_10 = 1;
	//add %11 = %1, %10 : int
	_11=start+_10;
	//ifge %11, %2 goto blklab0 : int
	if(_11>=end){goto blklab0;}
	//add %12 = %1, %2 : int
	_12=start+end;
	//const %13 = 2 : int
	_13 = 2;
	//div %14 = %12, %13 : int
	_14=_12/_13;
	//assign %4 = %14  : int
	// isCopyEliminated = true
	pivot = _14;
	//invoke (%15) = (%0, %1, %4) whiley/lang/Array:slice : function(int[],int,int)->(int[])
	{
		_DEALLOC(_15);
		_SLICE_ARRAY(_15, items, start, pivot);
		_ADD_DEALLOC(_15);
	}
	//assign %5 = %15  : int[]
	_DEALLOC(lhs);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(lhs, _15);
	_TRANSFER_DEALLOC(lhs, _15);
	//const %17 = 0 : int
	_17 = 0;
	//invoke (%16) = (%5, %17, %4) MergeSort_original:sortV1 : function(int[],int,int)->(int[])
	{
		if(items_size>=1000){
			lhs = cilk_spawn _sortV1_(_1DARRAY_PARAM(lhs), false, _17, pivot, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(lhs));
		}else{
			lhs = _sortV1_(_1DARRAY_PARAM(lhs), false, _17, pivot, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(lhs));
		}
	}
	//invoke (%18) = (%0, %4, %2) whiley/lang/Array:slice : function(int[],int,int)->(int[])
	{
		_DEALLOC(_18);
		_SLICE_ARRAY(_18, items, pivot, end);
		_ADD_DEALLOC(_18);
	}
	//assign %6 = %18  : int[]
	_DEALLOC(rhs);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(rhs, _18);
	_TRANSFER_DEALLOC(rhs, _18);
	//const %20 = 0 : int
	_20 = 0;
	//sub %21 = %2, %4 : int
	_21=end-pivot;
	//invoke (%19) = (%6, %20, %21) MergeSort_original:sortV1 : function(int[],int,int)->(int[])
	{
		if(items_size>=1000){
			rhs = cilk_spawn _sortV1_(_1DARRAY_PARAM(rhs), false, _20, _21, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_19));
		}else{
			rhs = _sortV1_(_1DARRAY_PARAM(rhs), false, _20, _21, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(rhs));
		}
	}
	cilk_sync;
	//const %22 = 0 : int
	_22 = 0;
	//assign %7 = %22  : int
	// isCopyEliminated = true
	l = _22;
	//const %23 = 0 : int
	_23 = 0;
	//assign %8 = %23  : int
	// isCopyEliminated = true
	r = _23;
	//const %24 = 0 : int
	_24 = 0;
	//assign %9 = %24  : int
	// isCopyEliminated = true
	i = _24;
	//loop (%0, %7, %8, %9, %25, %26, %27, %28, %29, %30, %31, %32, %33, %34, %35, %36, %37)
	while(true){
		//sub %25 = %2, %1 : int
		_25=end-start;
		//ifge %9, %25 goto blklab1 : int
		if(i>=_25){goto blklab1;}
		//sub %26 = %4, %1 : int
		_26=pivot-start;
		//ifge %7, %26 goto blklab1 : int
		if(l>=_26){goto blklab1;}
		//sub %27 = %2, %4 : int
		_27=end-pivot;
		//ifge %8, %27 goto blklab1 : int
		if(r>=_27){goto blklab1;}
		//indexof %28 = %5, %7 : int[]
		_28=lhs[l];
		//indexof %29 = %6, %8 : int[]
		_29=rhs[r];
		//ifgt %28, %29 goto blklab3 : int
		if(_28>_29){goto blklab3;}
		//indexof %30 = %5, %7 : int[]
		_30=lhs[l];
		//update %0[%9] = %30 : int[] -> int[]
		// isCopyEliminated = false
		items[i] = _30;
		//const %31 = 1 : int
		_31 = 1;
		//add %32 = %7, %31 : int
		_32=l+_31;
		//assign %7 = %32  : int
		// isCopyEliminated = true
		l = _32;
		//goto blklab4
		goto blklab4;
//.blklab3
blklab3:;
		//indexof %33 = %6, %8 : int[]
		_33=rhs[r];
		//update %0[%9] = %33 : int[] -> int[]
		// isCopyEliminated = false
		items[i] = _33;
		//const %34 = 1 : int
		_34 = 1;
		//add %35 = %8, %34 : int
		_35=r+_34;
		//assign %8 = %35  : int
		// isCopyEliminated = true
		r = _35;
//.blklab4
blklab4:;
		//const %36 = 1 : int
		_36 = 1;
		//add %37 = %9, %36 : int
		_37=i+_36;
		//assign %9 = %37  : int
		// isCopyEliminated = true
		i = _37;
//.blklab2
blklab2:;
	}
//.blklab1
blklab1:;
	//loop (%0, %7, %9, %38, %39, %40, %41, %42, %43)
	while(true){
		//sub %38 = %4, %1 : int
		_38=pivot-start;
		//ifge %7, %38 goto blklab5 : int
		if(l>=_38){goto blklab5;}
		//indexof %39 = %5, %7 : int[]
		_39=lhs[l];
		//update %0[%9] = %39 : int[] -> int[]
		// isCopyEliminated = false
		items[i] = _39;
		//const %40 = 1 : int
		_40 = 1;
		//add %41 = %9, %40 : int
		_41=i+_40;
		//assign %9 = %41  : int
		// isCopyEliminated = true
		i = _41;
		//const %42 = 1 : int
		_42 = 1;
		//add %43 = %7, %42 : int
		_43=l+_42;
		//assign %7 = %43  : int
		// isCopyEliminated = true
		l = _43;
//.blklab6
blklab6:;
	}
//.blklab5
blklab5:;
	//loop (%0, %8, %9, %44, %45, %46, %47, %48, %49)
	while(true){
		//sub %44 = %2, %4 : int
		_44=end-pivot;
		//ifge %8, %44 goto blklab7 : int
		if(r>=_44){goto blklab7;}
		//indexof %45 = %6, %8 : int[]
		_45=rhs[r];
		//update %0[%9] = %45 : int[] -> int[]
		// isCopyEliminated = false
		items[i] = _45;
		//const %46 = 1 : int
		_46 = 1;
		//add %47 = %9, %46 : int
		_47=i+_46;
		//assign %9 = %47  : int
		// isCopyEliminated = true
		i = _47;
		//const %48 = 1 : int
		_48 = 1;
		//add %49 = %8, %48 : int
		_49=r+_48;
		//assign %8 = %49  : int
		// isCopyEliminated = true
		r = _49;
//.blklab8
blklab8:;
	}
//.blklab7
blklab7:;
//.blklab0
blklab0:;
	//return %0
	_DEALLOC(_3);
	_DEALLOC(lhs);
	_DEALLOC(rhs);
	_DEALLOC(_15);
	_DEALLOC(_16);
	_DEALLOC(_18);
	_DEALLOC(_19);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(items);
	return items;
	//return
}
Ejemplo n.º 5
0
int64_t* _func_(_DECL_1DARRAY_PARAM(a), _DECL_1DARRAY_PARAM(b), _DECL_1DARRAY_PARAM(c), _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_DEALLOC(a);
	_DECL_DEALLOC(b);
	_DECL_DEALLOC(c);
	_DECL_1DARRAY(_3);
	_DECL_DEALLOC(_3);
	int64_t ra;
	int64_t rb;
	int64_t rc;
	_DECL_1DARRAY(y);
	_DECL_DEALLOC(y);
	_DECL_1DARRAY(x);
	_DECL_DEALLOC(x);
	int64_t _11;
	int64_t _12;
	int64_t _13;
	int64_t _14;
	int64_t _15;
	int64_t _16;
	int64_t _17;
	int64_t _18;
	int64_t _19;
	int64_t _20;
	//const %11 = 0 : int
	_11 = 0;
	//indexof %12 = %0, %11 : int[]
	_12=a[_11];
	//assign %4 = %12  : int
	// isCopyEliminated = true
	ra = _12;
	//const %13 = 0 : int
	_13 = 0;
	//indexof %14 = %1, %13 : int[]
	_14=b[_13];
	//assign %5 = %14  : int
	// isCopyEliminated = true
	rb = _14;
	//const %15 = 0 : int
	_15 = 0;
	//indexof %16 = %2, %15 : int[]
	_16=c[_15];
	//assign %6 = %16  : int
	// isCopyEliminated = true
	rc = _16;
	//const %17 = 0 : int
	_17 = 0;
	//indexof %18 = %0, %17 : int[]
	_18=a[_17];
	//const %19 = 0 : int
	_19 = 0;
	//indexof %20 = %1, %19 : int[]
	_20=b[_19];
	//ifne %18, %20 goto blklab0 : int
	if(_18!=_20){goto blklab0;}
	//assign %9 = %0  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(y, a);
	//assign %10 = %1  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(x, b);
	//return %10
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(_3);
	_DEALLOC(y);
	_DEALLOC(x);
	_DEALLOC(y);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(x);
	return x;
	//goto blklab1
	goto blklab1;
//.blklab0
blklab0:;
	//assign %9 = %2  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(y, c);
	//assign %10 = %9  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(x, y);
	//return %10
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(_3);
	_DEALLOC(y);
	_DEALLOC(x);
	_DEALLOC(y);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(x);
	return x;
//.blklab1
blklab1:;
	//return
}
Ejemplo n.º 6
0
int main(int argc, char** args){
	_DECL_1DARRAY(a);
	_DECL_DEALLOC(a);
	_DECL_1DARRAY(b);
	_DECL_DEALLOC(b);
	_DECL_1DARRAY(c);
	_DECL_DEALLOC(c);
	_DECL_1DARRAY(r);
	_DECL_DEALLOC(r);
	int64_t _5;
	int64_t _6;
	_DECL_1DARRAY(_7);
	_DECL_DEALLOC(_7);
	int64_t _8;
	int64_t _9;
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	int64_t _11;
	int64_t _12;
	_DECL_1DARRAY(_13);
	_DECL_DEALLOC(_13);
	_DECL_1DARRAY(_14);
	_DECL_DEALLOC(_14);
	int64_t _15;
	int64_t _16;
	int64_t _17;
	int64_t _18;
	int64_t _19;
	int64_t _20;
	int64_t _21;
	int64_t _22;
	int64_t _23;
	int64_t _24;
	int64_t _25;
	int64_t _26;
	//const %5 = 1 : int
	_5 = 1;
	//const %6 = 2 : int
	_6 = 2;
	//arraygen %7 = [5; 6] : int[]
	_NEW1DARRAY_DEALLOC(_7, _5, _6, int64_t);
	//assign %1 = %7  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _7);
	//const %8 = 2 : int
	_8 = 2;
	//const %9 = 2 : int
	_9 = 2;
	//arraygen %10 = [8; 9] : int[]
	_NEW1DARRAY_DEALLOC(_10, _8, _9, int64_t);
	//assign %2 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(b, _10);
	//const %11 = 3 : int
	_11 = 3;
	//const %12 = 2 : int
	_12 = 2;
	//arraygen %13 = [11; 12] : int[]
	_NEW1DARRAY_DEALLOC(_13, _11, _12, int64_t);
	//assign %3 = %13  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(c, _13);
	//invoke (%14) = (%1, %2, %3) specialcase1:func : function(int[],int[],int[])->(int[])
	{
		_FUNCTIONCALL_COPY_PRE(_14, c, 2, "liveness: c = true, readonly: c = false, return:c = MAYBE_RETURN" , "func");
		_FUNCTIONCALL_COPY_PRE(_14, b, 1, "liveness: b = true, readonly: b = false, return:b = MAYBE_RETURN" , "func");
		_FUNCTIONCALL_COPY_PRE(_14, a, 0, "liveness: a = true, readonly: a = false, return:a = MAYBE_RETURN" , "func");
		_DEALLOC(_14);
		void* tmp_a;
		_COPY_1DARRAY_PARAM(a, tmp_a, int64_t);
		void* tmp_b;
		_COPY_1DARRAY_PARAM(b, tmp_b, int64_t);
		void* tmp_c;
		_COPY_1DARRAY_PARAM(c, tmp_c, int64_t);
		// isCopyEliminated of 'a at 0' = false
		// isCopyEliminated of 'b at 1' = false
		// isCopyEliminated of 'c at 2' = false
		_14 = _func_(tmp_a, a_size, tmp_b, b_size, tmp_c, c_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_14));
		if( _14 == tmp_a ){
			_14_dealloc = true;
			free(tmp_b);
			free(tmp_c);
		} else if( _14 == tmp_b ){
			_14_dealloc = true;
			free(tmp_a);
			free(tmp_c);
		} else if( _14 == tmp_c ){
			_14_dealloc = true;
			free(tmp_a);
			free(tmp_b);
		} else {
			_14_dealloc = true;
			free(tmp_a);
			free(tmp_b);
			free(tmp_c);
		}
	}
	//assign %4 = %14  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(r, _14);
	//assert
	{
		//const %15 = 0 : int
		_15 = 0;
		//indexof %16 = %1, %15 : int[]
		_16=a[_15];
		//const %17 = 1 : int
		_17 = 1;
		//ifeq %16, %17 goto blklab2 : int
		if(_16==_17){goto blklab2;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab2
blklab2:;
	//assert
	}
	//assert
	{
		//const %18 = 0 : int
		_18 = 0;
		//indexof %19 = %2, %18 : int[]
		_19=b[_18];
		//const %20 = 2 : int
		_20 = 2;
		//ifeq %19, %20 goto blklab3 : int
		if(_19==_20){goto blklab3;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab3
blklab3:;
	//assert
	}
	//assert
	{
		//const %21 = 0 : int
		_21 = 0;
		//indexof %22 = %3, %21 : int[]
		_22=c[_21];
		//const %23 = 3 : int
		_23 = 3;
		//ifeq %22, %23 goto blklab4 : int
		if(_22==_23){goto blklab4;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab4
blklab4:;
	//assert
	}
	//assert
	{
		//const %24 = 0 : int
		_24 = 0;
		//indexof %25 = %4, %24 : int[]
		_25=r[_24];
		//const %26 = 3 : int
		_26 = 3;
		//ifeq %25, %26 goto blklab5 : int
		if(_25==_26){goto blklab5;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab5
blklab5:;
	//assert
	}
	//return
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(r);
	_DEALLOC(_7);
	_DEALLOC(_10);
	_DEALLOC(_13);
	_DEALLOC(_14);
	exit(0);
}
Ejemplo n.º 7
0
int main(int argc, char** args){
	int* n;
	_DECL_DEALLOC(n);
	int width;
	int height;
	int size;
	_DECL_1DARRAY_BYTE(pixels);
	_DECL_DEALLOC(pixels);
	int i;
	_DECL_1DARRAY_BYTE(newPixels);
	_DECL_DEALLOC(newPixels);
	int* _8;
	_DECL_DEALLOC(_8);
	_DECL_2DARRAY(_9);
	_DECL_DEALLOC(_9);
	int _10;
	_DECL_1DARRAY(_11);
	_DECL_DEALLOC(_11);
	int _12;
	int _13;
	BYTE _14;
	_DECL_1DARRAY_BYTE(_15);
	_DECL_DEALLOC(_15);
	int _16;
	BYTE _17;
	int _18;
	int _19;
	int _20;
	int _21;
	void* _22;
	_DECL_1DARRAY(_24);
	_DECL_DEALLOC(_24);
	void* _25;
	int _27;
	BYTE _28;
	_DECL_1DARRAY_BYTE(_29);
	_DECL_DEALLOC(_29);
	void* _30;
	_DECL_1DARRAY(_32);
	_DECL_DEALLOC(_32);
	void* _33;
	int _35;
	void* _36;
	_DECL_1DARRAY(_38);
	_DECL_DEALLOC(_38);
	void* _39;
	_DECL_1DARRAY(_41);
	_DECL_DEALLOC(_41);
	void* _42;
	int _44;
	BYTE _45;
	//fieldload %9 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	_DEALLOC_2DARRAY_int64_t(_9);
	_CONV_ARGS(_9);
	_ADD_DEALLOC(_9);
	//const %10 = 0 : int
	_10 = 0;
	//indexof %11 = %9, %10 : int[][]
	_11=_9[_10];
	_11_size = _9_size_size;
	_REMOVE_DEALLOC(_11);
	//invoke (%8) = (%11) whiley/lang/Int:parse : function(whiley/lang/ASCII:string)->(null|int)
	{
		_STR_TO_INT(_8, _11);
		_ADD_DEALLOC(_8);
		_REMOVE_DEALLOC(_11);
	}
	//assign %1 = %8  : null|int
	_DEALLOC(n);
	// isCopyEliminated = true
	n = _8;
	_TRANSFER_DEALLOC(n, _8);
	//ifis %1, null goto blklab19 : null|int
	if(n == NULL) { goto blklab19;}
	//const %12 = 2000 : int
	_12 = 2000;
	//assign %2 = %12  : int
	// isCopyEliminated = true
	width = _12;
	//assign %3 = %1  : int
	// isCopyEliminated = true
	height = *n;
	//mul %13 = %2, %3 : int
	_13=width*height;
	//assign %4 = %13  : int
	// isCopyEliminated = true
	size = _13;
	//const %14 = 00100000b : byte
	_14 = 0b00100000;
	//arraygen %15 = [14; 4] : byte[]
	_DEALLOC(_15);
	_NEW_1DARRAY_BYTE(_15, size, _14);
	_ADD_DEALLOC(_15);
	//assign %5 = %15  : byte[]
	_DEALLOC(pixels);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(pixels, _15);
	_TRANSFER_DEALLOC(pixels, _15);
	//const %16 = 0 : int
	_16 = 0;
	//assign %6 = %16  : int
	// isCopyEliminated = true
	i = _16;
	//loop (%5, %6, %17, %18, %19, %20, %21)
	while(true){
		//ifge %6, %4 goto blklab20 : int
		if(i>=size){goto blklab20;}
		//const %18 = 256 : int
		_18 = 256;
		//rem %19 = %6, %18 : int
		_19=i%_18;
		//invoke (%17) = (%19) whiley/lang/Int:toUnsignedByte : function(whiley/lang/Int:u8)->(byte)
		{
			_17 = (BYTE)_19;
		}
		//update %5[%6] = %17 : byte[] -> byte[]
		pixels[i] = _17;
		//const %20 = 1 : int
		_20 = 1;
		//add %21 = %6, %20 : int
		_21=i+_20;
		//assign %6 = %21  : int
		// isCopyEliminated = true
		i = _21;
//.blklab21
blklab21:;
	}
//.blklab20
blklab20:;
	//fieldload %22 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %23 = %22 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %24 = [112,105,120,101,108,115,91,49,48,48,48,93,61] : int[]
	_DEALLOC(_24);
	_NEW_1DARRAY_int64_t(_24, 13, 0);
	_24[0] = 112; _24[1] = 105; _24[2] = 120; _24[3] = 101; _24[4] = 108; _24[5] = 115; _24[6] = 91; _24[7] = 49; _24[8] = 48; _24[9] = 48; _24[10] = 48; _24[11] = 93; _24[12] = 61;
	_ADD_DEALLOC(_24);
	//indirectinvoke () = %23 (%24) : method(int[])->()
	{
		printf_s(_24, _24_size);
	}
	//fieldload %25 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %26 = %25 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %27 = 1000 : int
	_27 = 1000;
	//indexof %28 = %5, %27 : byte[]
	_28=pixels[_27];
	//indirectinvoke () = %26 (%28) : method(any)->()
	{
		printf("%"PRIu8"\n", _28);
	}
	//invoke (%29) = (%5, %2, %3) SobelEdge_large:sobelEdgeDetection : function(byte[],int,int)->(byte[])
	{
		_DEALLOC(_29);
		// isCopyEliminated of '_5' = true
		_29 = _sobelEdgeDetection_(pixels, pixels_size, false, width, height, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_29));
		_RETAIN_DEALLOC(pixels, "false-false-false" , "sobelEdgeDetection");
		_RETAIN_DEALLOC_POST(_29, pixels);
	}
	//assign %7 = %29  : byte[]
	_DEALLOC(newPixels);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(newPixels, _29);
	_TRANSFER_DEALLOC(newPixels, _29);
	//fieldload %30 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %31 = %30 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %32 = [66,108,117,114,114,101,100,32,73,109,97,103,101,32,115,105,122,101,115,58,32,32,32] : int[]
	_DEALLOC(_32);
	_NEW_1DARRAY_int64_t(_32, 23, 0);
	_32[0] = 66; _32[1] = 108; _32[2] = 117; _32[3] = 114; _32[4] = 114; _32[5] = 101; _32[6] = 100; _32[7] = 32; _32[8] = 73; _32[9] = 109; _32[10] = 97; _32[11] = 103; _32[12] = 101; _32[13] = 32; _32[14] = 115; _32[15] = 105; _32[16] = 122; _32[17] = 101; _32[18] = 115; _32[19] = 58; _32[20] = 32; _32[21] = 32; _32[22] = 32;
	_ADD_DEALLOC(_32);
	//indirectinvoke () = %31 (%32) : method(int[])->()
	{
		println_s(_32, _32_size);
	}
	//fieldload %33 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %34 = %33 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//lengthof %35 = %7 : byte[]
	_35 = newPixels_size;
	//indirectinvoke () = %34 (%35) : method(any)->()
	{
		printf("%d", _35);
	}
	//fieldload %36 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %37 = %36 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %38 = [32,98,121,116,101,115] : int[]
	_DEALLOC(_38);
	_NEW_1DARRAY_int64_t(_38, 6, 0);
	_38[0] = 32; _38[1] = 98; _38[2] = 121; _38[3] = 116; _38[4] = 101; _38[5] = 115;
	_ADD_DEALLOC(_38);
	//indirectinvoke () = %37 (%38) : method(int[])->()
	{
		println_s(_38, _38_size);
	}
	//fieldload %39 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %40 = %39 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %41 = [110,101,119,80,105,120,101,108,115,91,49,48,48,48,93,61] : int[]
	_DEALLOC(_41);
	_NEW_1DARRAY_int64_t(_41, 16, 0);
	_41[0] = 110; _41[1] = 101; _41[2] = 119; _41[3] = 80; _41[4] = 105; _41[5] = 120; _41[6] = 101; _41[7] = 108; _41[8] = 115; _41[9] = 91; _41[10] = 49; _41[11] = 48; _41[12] = 48; _41[13] = 48; _41[14] = 93; _41[15] = 61;
	_ADD_DEALLOC(_41);
	//indirectinvoke () = %40 (%41) : method(int[])->()
	{
		printf_s(_41, _41_size);
	}
	//fieldload %42 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %43 = %42 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %44 = 1000 : int
	_44 = 1000;
	//indexof %45 = %7, %44 : byte[]
	_45=newPixels[_44];
	//indirectinvoke () = %43 (%45) : method(any)->()
	{
		printf("%d", _45);
	}
//.blklab19
blklab19:;
	//return
	_DEALLOC(n);
	_DEALLOC(pixels);
	_DEALLOC(newPixels);
	_DEALLOC(_8);
	_FREE_ARGS(_9);
	_DEALLOC(_11);
	_DEALLOC(_15);
	_DEALLOC(_24);
	_DEALLOC(_29);
	_DEALLOC(_32);
	_DEALLOC(_38);
	_DEALLOC(_41);
	exit(0);
}
BYTE* _append_(BYTE* items, size_t items_size, _DECL_DEALLOC_PARAM(items), BYTE item, _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_1DARRAY_BYTE(nitems);
	_DECL_DEALLOC(nitems);
	int64_t i = 0;
	BYTE _4;
	int64_t _5 = 0;
	int64_t _6 = 0;
	int64_t _7 = 0;
	_DECL_1DARRAY_BYTE(_8);
	_DECL_DEALLOC(_8);
	int64_t _9 = 0;
	int64_t _10 = 0;
	BYTE _11;
	int64_t _12 = 0;
	int64_t _13 = 0;
	//const %4 = 00000000b : byte
	_4 = 0b00000000;
	//lengthof %5 = %0 : byte[]
	_5 = items_size;
	//const %6 = 1 : int
	_6 = 1;
	//add %7 = %5, %6 : int
	_7=_5+_6;
	//arraygen %8 = [4; 7] : byte[]
	_DEALLOC(_8);
	_NEW_1DARRAY_BYTE(_8, _7, _4);
	_ADD_DEALLOC(_8);
	//assign %2 = %8  : byte[]
	_DEALLOC(nitems);
	_UPDATE_1DARRAY(nitems, _8);
	_TRANSFER_DEALLOC(nitems, _8);
	//const %9 = 0 : int
	_9 = 0;
	//assign %3 = %9  : int
	i = _9;
	//loop (%2, %3, %10, %11, %12, %13)
	while(true){
		//lengthof %10 = %0 : byte[]
		_10 = items_size;
		//ifge %3, %10 goto blklab1 : int
		if(i>=_10){goto blklab1;}
		//indexof %11 = %0, %3 : byte[]
		_11=items[i];
		//update %2[%3] = %11 : byte[] -> byte[]
		nitems[i] = _11;
		//const %12 = 1 : int
		_12 = 1;
		//add %13 = %3, %12 : int
		_13=i+_12;
		//assign %3 = %13  : int
		i = _13;
//.blklab2
blklab2:;
	}
//.blklab1
blklab1:;
	//update %2[%3] = %1 : byte[] -> byte[]
	nitems[i] = item;
	//return %2
	_DEALLOC(items);
	_DEALLOC(_8);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(nitems);
	return nitems;
	//return
}
Ejemplo n.º 9
0
int64_t* Array_Append(_DECL_1DARRAY_PARAM(lhs), _DECL_1DARRAY_PARAM(rhs), _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_1DARRAY(_2);
	_DECL_DEALLOC(_2);
	_DECL_1DARRAY(rs);
	_DECL_DEALLOC(rs);
	int64_t i = 0;
	int64_t _5 = 0;
	int64_t _6 = 0;
	int64_t _7 = 0;
	int64_t _8 = 0;
	_DECL_1DARRAY(_9);
	_DECL_DEALLOC(_9);
	int64_t _10 = 0;
	int64_t _11 = 0;
	int64_t _12 = 0;
	int64_t _13 = 0;
	int64_t _14 = 0;
	int64_t _15 = 0;
	int64_t _16 = 0;
	int64_t _17 = 0;
	int64_t _18 = 0;
	int64_t _19 = 0;
	int64_t _20 = 0;
	//const %5 = 0 : int
	_5 = 0;
	//lengthof %6 = %0 : int[]
	_6 = lhs_size;
	//lengthof %7 = %1 : int[]
	_7 = rhs_size;
	//add %8 = %6, %7 : int
	_8=_6+_7;
	//arraygen %9 = [5; 8] : int[]
	_DEALLOC(_9);
	_NEW_1DARRAY_int64_t(_9, _8, _5);
	_ADD_DEALLOC(_9);
	//assign %3 = %9  : int[]
	_DEALLOC(rs);
	_UPDATE_1DARRAY(rs, _9);
	_TRANSFER_DEALLOC(rs, _9);
	//lengthof %10 = %0 : int[]
	_10 = lhs_size;
	//assign %4 = %10  : int
	i = _10;
	//loop (%3, %4, %11, %12, %13, %14)
	while(true){
		//const %11 = 0 : int
		_11 = 0;
		//ifle %4, %11 goto blklab0 : int
		if(i<=_11){goto blklab0;}
		//const %12 = 1 : int
		_12 = 1;
		//sub %13 = %4, %12 : int
		_13=i-_12;
		//assign %4 = %13  : int
		i = _13;
		//indexof %14 = %0, %4 : int[]
		_14=lhs[i];
		//update %3[%4] = %14 : int[] -> int[]
		rs[i] = _14;
		//.blklab1
		blklab1:;
	}
	//.blklab0
	blklab0:;
	//loop (%3, %4, %15, %16, %17, %18, %19, %20)
	while(true){
		//lengthof %15 = %1 : int[]
		_15 = rhs_size;
		//ifge %4, %15 goto blklab2 : int
		if(i>=_15){goto blklab2;}
		//indexof %16 = %1, %4 : int[]
		_16=rhs[i];
		//lengthof %17 = %0 : int[]
		_17 = lhs_size;
		//add %18 = %4, %17 : int
		_18=i+_17;
		//update %3[%18] = %16 : int[] -> int[]
		rs[_18] = _16;
		//const %19 = 1 : int
		_19 = 1;
		//add %20 = %4, %19 : int
		_20=i+_19;
		//assign %4 = %20  : int
		i = _20;
		//.blklab3
		blklab3:;
	}
	//.blklab2
	blklab2:;
	//return %3
	_DEALLOC(_2);
	_DEALLOC(_9);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(rs);
	return rs;
	//return
}
Ejemplo n.º 10
0
BYTE* _sobelEdgeDetection_(BYTE* pixels, size_t pixels_size, _DECL_DEALLOC_PARAM(pixels), int width, int height, _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_1DARRAY_BYTE(_3);
	_DECL_DEALLOC(_3);
	int size;
	_DECL_1DARRAY_BYTE(newPixels);
	_DECL_DEALLOC(newPixels);
	_DECL_1DARRAY(v_sobel);
	_DECL_DEALLOC(v_sobel);
	_DECL_1DARRAY(h_sobel);
	_DECL_DEALLOC(h_sobel);
	int x;
	int y;
	int pos;
	int v_g;
	int h_g;
	int t_g;
	int _14;
	BYTE _15;
	_DECL_1DARRAY_BYTE(_16);
	_DECL_DEALLOC(_16);
	int _17;
	int _18;
	int _19;
	int _20;
	int _21;
	int _22;
	int _23;
	int _24;
	int _25;
	int _26;
	int _27;
	int _28;
	_DECL_1DARRAY(_29);
	_DECL_DEALLOC(_29);
	int _30;
	int _31;
	int _32;
	int _33;
	int _34;
	int _35;
	int _36;
	int _37;
	int _38;
	int _39;
	int _40;
	int _41;
	_DECL_1DARRAY(_42);
	_DECL_DEALLOC(_42);
	int _43;
	int _44;
	int _45;
	int _46;
	int _47;
	int _48;
	int _49;
	int _50;
	int _51;
	int _52;
	BYTE _53;
	int _54;
	int _55;
	int _56;
	int _57;
	//mul %14 = %1, %2 : int
	_14=width*height;
	//assign %4 = %14  : int
	// isCopyEliminated = true
	size = _14;
	//const %15 = 00100000b : byte
	_15 = 0b00100000;
	//arraygen %16 = [15; 4] : byte[]
	_DEALLOC(_16);
	_NEW_1DARRAY_BYTE(_16, size, _15);
	_ADD_DEALLOC(_16);
	//assign %5 = %16  : byte[]
	_DEALLOC(newPixels);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(newPixels, _16);
	_TRANSFER_DEALLOC(newPixels, _16);
	//const %17 = 1 : int
	_17 = 1;
	//neg %18 = %17 : int
	_18= -_17;
	//const %19 = 0 : int
	_19 = 0;
	//const %20 = 1 : int
	_20 = 1;
	//const %21 = 2 : int
	_21 = 2;
	//neg %22 = %21 : int
	_22= -_21;
	//const %23 = 0 : int
	_23 = 0;
	//const %24 = 2 : int
	_24 = 2;
	//const %25 = 1 : int
	_25 = 1;
	//neg %26 = %25 : int
	_26= -_25;
	//const %27 = 0 : int
	_27 = 0;
	//const %28 = 1 : int
	_28 = 1;
	//newlist %29 = (%18, %19, %20, %22, %23, %24, %26, %27, %28) : int[]
	_DEALLOC(_29);
	_NEW_1DARRAY_int64_t(_29, 9, 0);
	_29[0] = _18; _29[1] = _19; _29[2] = _20; _29[3] = _22; _29[4] = _23; _29[5] = _24; _29[6] = _26; _29[7] = _27; _29[8] = _28;
	_ADD_DEALLOC(_29);
	//assign %6 = %29  : int[]
	_DEALLOC(v_sobel);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(v_sobel, _29);
	_TRANSFER_DEALLOC(v_sobel, _29);
	//const %30 = 1 : int
	_30 = 1;
	//const %31 = 2 : int
	_31 = 2;
	//const %32 = 1 : int
	_32 = 1;
	//const %33 = 0 : int
	_33 = 0;
	//const %34 = 0 : int
	_34 = 0;
	//const %35 = 0 : int
	_35 = 0;
	//const %36 = 1 : int
	_36 = 1;
	//neg %37 = %36 : int
	_37= -_36;
	//const %38 = 2 : int
	_38 = 2;
	//neg %39 = %38 : int
	_39= -_38;
	//const %40 = 1 : int
	_40 = 1;
	//neg %41 = %40 : int
	_41= -_40;
	//newlist %42 = (%30, %31, %32, %33, %34, %35, %37, %39, %41) : int[]
	_DEALLOC(_42);
	_NEW_1DARRAY_int64_t(_42, 9, 0);
	_42[0] = _30; _42[1] = _31; _42[2] = _32; _42[3] = _33; _42[4] = _34; _42[5] = _35; _42[6] = _37; _42[7] = _39; _42[8] = _41;
	_ADD_DEALLOC(_42);
	//assign %7 = %42  : int[]
	_DEALLOC(h_sobel);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(h_sobel, _42);
	_TRANSFER_DEALLOC(h_sobel, _42);
	//const %43 = 0 : int
	_43 = 0;
	//assign %8 = %43  : int
	// isCopyEliminated = true
	x = _43;
	//loop (%5, %8, %9, %10, %11, %12, %13, %44, %45, %46, %47, %48, %49, %50, %51, %52, %53, %54, %55, %56, %57)
	while(true){
		//ifge %8, %1 goto blklab8 : int
		if(x>=width){goto blklab8;}
		//const %44 = 0 : int
		_44 = 0;
		//assign %9 = %44  : int
		// isCopyEliminated = true
		y = _44;
		//loop (%5, %9, %10, %11, %12, %13, %45, %46, %47, %48, %49, %50, %51, %52, %53, %54, %55)
		while(true){
			//ifge %9, %2 goto blklab10 : int
			if(y>=height){goto blklab10;}
			//mul %45 = %9, %1 : int
			_45=y*width;
			//add %46 = %45, %8 : int
			_46=_45+x;
			//assign %10 = %46  : int
			// isCopyEliminated = true
			pos = _46;
			//invoke (%47) = (%0, %1, %2, %8, %9, %6) SobelEdge_large:convolution : function(byte[],int,int,int,int,int[])->(int)
			{
				// isCopyEliminated of '_0' = true
				// isCopyEliminated of '_6' = true
				_47 = _convolution_(pixels, pixels_size, false, width, height, x, y, v_sobel, v_sobel_size, false);
				_RETAIN_DEALLOC(pixels, "false-false-true" , "convolution");
				_RETAIN_DEALLOC(v_sobel, "false-false-true" , "convolution");
			}
			//assign %11 = %47  : int
			// isCopyEliminated = true
			v_g = _47;
			//invoke (%48) = (%0, %1, %2, %8, %9, %7) SobelEdge_large:convolution : function(byte[],int,int,int,int,int[])->(int)
			{
				// isCopyEliminated of '_0' = true
				// isCopyEliminated of '_7' = true
				_48 = _convolution_(pixels, pixels_size, false, width, height, x, y, h_sobel, h_sobel_size, false);
				_RETAIN_DEALLOC(pixels, "false-false-true" , "convolution");
				_RETAIN_DEALLOC(h_sobel, "false-false-true" , "convolution");
			}
			//assign %12 = %48  : int
			// isCopyEliminated = true
			h_g = _48;
			//mul %49 = %11, %11 : int
			_49=v_g*v_g;
			//mul %50 = %12, %12 : int
			_50=h_g*h_g;
			//add %51 = %49, %50 : int
			_51=_49+_50;
			//assign %13 = %51  : int
			// isCopyEliminated = true
			t_g = _51;
			//const %52 = 640000 : int
			_52 = 640000;
			//ifle %13, %52 goto blklab12 : int
			if(t_g<=_52){goto blklab12;}
			//const %53 = 01100010b : byte
			_53 = 0b01100010;
			//update %5[%10] = %53 : byte[] -> byte[]
			newPixels[pos] = _53;
//.blklab12
blklab12:;
			//const %54 = 1 : int
			_54 = 1;
			//add %55 = %9, %54 : int
			_55=y+_54;
			//assign %9 = %55  : int
			// isCopyEliminated = true
			y = _55;
//.blklab11
blklab11:;
		}
//.blklab10
blklab10:;
		//const %56 = 1 : int
		_56 = 1;
		//add %57 = %8, %56 : int
		_57=x+_56;
		//assign %8 = %57  : int
		// isCopyEliminated = true
		x = _57;
//.blklab9
blklab9:;
	}
//.blklab8
blklab8:;
	//return %5
	_DEALLOC(pixels);
	_DEALLOC(_3);
	_DEALLOC(v_sobel);
	_DEALLOC(h_sobel);
	_DEALLOC(_16);
	_DEALLOC(_29);
	_DEALLOC(_42);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(newPixels);
	return newPixels;
	//return
}
Ejemplo n.º 11
0
int main(int argc, char** args){
	_DECL_1DARRAY(a);
	_DECL_DEALLOC(a);
	_DECL_1DARRAY(b);
	_DECL_DEALLOC(b);
	_DECL_1DARRAY(c);
	_DECL_DEALLOC(c);
	int64_t _4;
	int64_t _5;
	int64_t _6;
	int64_t _7;
	int64_t _8;
	_DECL_1DARRAY(_9);
	_DECL_DEALLOC(_9);
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	int64_t _11;
	int64_t _12;
	int64_t _13;
	void* _14;
	_DECL_1DARRAY(_16);
	_DECL_DEALLOC(_16);
	void* _17;
	int64_t _19;
	int64_t _20;
	int64_t _21;
	int64_t _22;
	int64_t _23;
	int64_t _24;
	int64_t _25;
	_DECL_1DARRAY(_26);
	_DECL_DEALLOC(_26);
	_DECL_1DARRAY(_27);
	_DECL_DEALLOC(_27);
	int64_t _28;
	int64_t _29;
	int64_t _30;
	int64_t _31;
	int64_t _32;
	int64_t _33;
	void* _34;
	_DECL_1DARRAY(_36);
	_DECL_DEALLOC(_36);
	void* _37;
	int64_t _39;
	int64_t _40;
	void* _41;
	_DECL_1DARRAY(_43);
	_DECL_DEALLOC(_43);
	void* _44;
	int64_t _46;
	int64_t _47;
	//const %4 = 0 : int
	_4 = 0;
	//const %5 = 0 : int
	_5 = 0;
	//const %6 = 0 : int
	_6 = 0;
	//const %7 = 0 : int
	_7 = 0;
	//const %8 = 0 : int
	_8 = 0;
	//newlist %9 = (%4, %5, %6, %7, %8) : int[]
	_DEALLOC(_9);
	_NEW_1DARRAY_int64_t(_9, 5, 0);
	_9[0] = _4; _9[1] = _5; _9[2] = _6; _9[3] = _7; _9[4] = _8; 
	_9_dealloc = true;
	//assign %1 = %9  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _9);
	//invoke (%10) = (%1) FunctionCall3:func : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_10, a, 0, "liveness: a = false, readonly: a = false, return:a = MAYBE_RETURN" , "func");
		_DEALLOC(_10);
		// isCopyEliminated of 'a at 0' = true
		_10 = _func_(a, a_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_10));
		if( _10 == a ){
			_10_dealloc = a_dealloc;
			a_dealloc = false;
		} else {
			_10_dealloc = true;
		}
	}
	//assign %1 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _10);
	//assert
	{
		//const %11 = 2 : int
		_11 = 2;
		//indexof %12 = %1, %11 : int[]
		_12=a[_11];
		//const %13 = 0 : int
		_13 = 0;
		//ifeq %12, %13 goto blklab0 : int
		if(_12==_13){goto blklab0;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab0
blklab0:;
	//assert
	}
	//fieldload %14 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %15 = %14 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %16 = [97,91,50,93,61] : int[]
	_DEALLOC(_16);
	_NEW_1DARRAY_int64_t(_16, 5, 0);
	_16[0] = 97; _16[1] = 91; _16[2] = 50; _16[3] = 93; _16[4] = 61; 
	_16_dealloc = true;
	//indirectinvoke () = %15 (%16) : method(int[])->()
	{
		printf_s(_16, _16_size);
	}
	//fieldload %17 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %18 = %17 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %19 = 2 : int
	_19 = 2;
	//indexof %20 = %1, %19 : int[]
	_20=a[_19];
	//indirectinvoke () = %18 (%20) : method(any)->()
	{
		printf("%"PRId64"\n", _20);
	}
	//const %21 = 0 : int
	_21 = 0;
	//const %22 = 0 : int
	_22 = 0;
	//const %23 = 0 : int
	_23 = 0;
	//const %24 = 0 : int
	_24 = 0;
	//const %25 = 0 : int
	_25 = 0;
	//newlist %26 = (%21, %22, %23, %24, %25) : int[]
	_DEALLOC(_26);
	_NEW_1DARRAY_int64_t(_26, 5, 0);
	_26[0] = _21; _26[1] = _22; _26[2] = _23; _26[3] = _24; _26[4] = _25; 
	_26_dealloc = true;
	//assign %2 = %26  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(b, _26);
	//invoke (%27) = (%2) FunctionCall3:func : function(int[])->(int[])
	{
		_FUNCTIONCALL_COPY_PRE(_27, b, 0, "liveness: b = true, readonly: b = false, return:b = MAYBE_RETURN" , "func");
		_DEALLOC(_27);
		void* tmp_s;
		_COPY_1DARRAY_PARAM(b, tmp_s, int64_t);
		// isCopyEliminated of 'b at 0' = false
		_27 = _func_(tmp_s, b_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_27));
		if( _27 == tmp_s ){
			_27_dealloc = true;
		} else {
			_27_dealloc = true;
			free(tmp_s);
		}
	}
	//assign %3 = %27  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(c, _27);
	//assert
	{
		//const %28 = 2 : int
		_28 = 2;
		//indexof %29 = %2, %28 : int[]
		_29=b[_28];
		//const %30 = 0 : int
		_30 = 0;
		//ifeq %29, %30 goto blklab1 : int
		if(_29==_30){goto blklab1;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab1
blklab1:;
	//assert
	}
	//assert
	{
		//const %31 = 2 : int
		_31 = 2;
		//indexof %32 = %3, %31 : int[]
		_32=c[_31];
		//const %33 = 0 : int
		_33 = 0;
		//ifeq %32, %33 goto blklab2 : int
		if(_32==_33){goto blklab2;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab2
blklab2:;
	//assert
	}
	//fieldload %34 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %35 = %34 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %36 = [98,91,50,93,61] : int[]
	_DEALLOC(_36);
	_NEW_1DARRAY_int64_t(_36, 5, 0);
	_36[0] = 98; _36[1] = 91; _36[2] = 50; _36[3] = 93; _36[4] = 61; 
	_36_dealloc = true;
	//indirectinvoke () = %35 (%36) : method(int[])->()
	{
		printf_s(_36, _36_size);
	}
	//fieldload %37 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %38 = %37 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %39 = 2 : int
	_39 = 2;
	//indexof %40 = %2, %39 : int[]
	_40=b[_39];
	//indirectinvoke () = %38 (%40) : method(any)->()
	{
		printf("%"PRId64"\n", _40);
	}
	//fieldload %41 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %42 = %41 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %43 = [99,91,50,93,61] : int[]
	_DEALLOC(_43);
	_NEW_1DARRAY_int64_t(_43, 5, 0);
	_43[0] = 99; _43[1] = 91; _43[2] = 50; _43[3] = 93; _43[4] = 61; 
	_43_dealloc = true;
	//indirectinvoke () = %42 (%43) : method(int[])->()
	{
		printf_s(_43, _43_size);
	}
	//fieldload %44 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %45 = %44 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %46 = 2 : int
	_46 = 2;
	//indexof %47 = %3, %46 : int[]
	_47=c[_46];
	//indirectinvoke () = %45 (%47) : method(any)->()
	{
		printf("%"PRId64"\n", _47);
	}
	//return
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(_9);
	_DEALLOC(_10);
	_DEALLOC(_16);
	_DEALLOC(_26);
	_DEALLOC(_27);
	_DEALLOC(_36);
	_DEALLOC(_43);
	exit(0);
}
int main(int argc, char** args){
	int64_t* n;
	_DECL_DEALLOC(n);
	int64_t max = 0;
	_DECL_1DARRAY_BYTE(data);
	_DECL_DEALLOC(data);
	_DECL_1DARRAY_BYTE(arr);
	_DECL_DEALLOC(arr);
	int64_t* _5;
	_DECL_DEALLOC(_5);
	_DECL_2DARRAY(_6);
	_DECL_DEALLOC(_6);
	int64_t _7 = 0;
	_DECL_1DARRAY(_8);
	_DECL_DEALLOC(_8);
	BYTE _9;
	_DECL_1DARRAY_BYTE(_10);
	_DECL_DEALLOC(_10);
	_DECL_1DARRAY_BYTE(_11);
	_DECL_DEALLOC(_11);
	int64_t _12 = 0;
	int64_t _13 = 0;
	int64_t _14 = 0;
	int64_t _15 = 0;
	void* _16;
	int64_t _18 = 0;
	//fieldload %6 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	_DEALLOC_2DARRAY_int64_t(_6);
	_CONV_ARGS(_6);
	_ADD_DEALLOC(_6);
	//const %7 = 0 : int
	_7 = 0;
	//indexof %8 = %6, %7 : int[][]
	_8=_6[_7];
	_8_size = _6_size_size;
	_REMOVE_DEALLOC(_8);
	//invoke (%5) = (%8) whiley/lang/Int:parse : function(whiley/lang/ASCII:string)->(null|int)
	{
		_STR_TO_INT(_5, _8);
		_ADD_DEALLOC(_5);
		_REMOVE_DEALLOC(_8);
	}
	//assign %1 = %5  : null|int
	_DEALLOC(n);
	n = _5;
	_TRANSFER_DEALLOC(n, _5);
	//ifis %1, null goto blklab9 : null|int
	if(n == NULL) { goto blklab9;}
	//assign %2 = %1  : int
	max = *n;
	//const %9 = 01100001b : byte
	_9 = 0b01100001;
	//arraygen %10 = [9; 2] : byte[]
	_DEALLOC(_10);
	_NEW_1DARRAY_BYTE(_10, max, _9);
	_ADD_DEALLOC(_10);
	//assign %3 = %10  : byte[]
	_DEALLOC(data);
	_UPDATE_1DARRAY(data, _10);
	_TRANSFER_DEALLOC(data, _10);
	//invoke (%11) = (%3) AppendArrayPattern_original:comp : function(byte[])->(byte[])
	{
		_DEALLOC(_11);
		_11 = _comp_(_1DARRAY_PARAM(data), false, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_11));
		_RETAIN_DEALLOC(data, "false-false-false" , "comp");
		_ADD_DEALLOC(_11);
	}
	//assign %4 = %11  : byte[]
	_DEALLOC(arr);
	_UPDATE_1DARRAY(arr, _11);
	_TRANSFER_DEALLOC(arr, _11);
	//assert
	{
		//lengthof %12 = %4 : byte[]
		_12 = arr_size;
		//const %13 = 2 : int
		_13 = 2;
		//lengthof %14 = %3 : byte[]
		_14 = data_size;
		//mul %15 = %13, %14 : int
		_15=_13*_14;
		//ifeq %12, %15 goto blklab10 : int
		if(_12==_15){goto blklab10;}
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab10
blklab10:;
	//assert
	}
	//fieldload %16 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %17 = %16 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//lengthof %18 = %4 : byte[]
	_18 = arr_size;
	//indirectinvoke () = %17 (%18) : method(any)->()
	{
		printf("%"PRId64, _18);
	}
//.blklab9
blklab9:;
	//return
	_DEALLOC(n);
	_DEALLOC(data);
	_DEALLOC(arr);
	_DEALLOC(_5);
	_DEALLOC_2DARRAY_int64_t(_6);
	_DEALLOC(_8);
	_DEALLOC(_10);
	_DEALLOC(_11);
	exit(0);
}
BYTE* _comp_(BYTE* data, size_t data_size, _DECL_DEALLOC_PARAM(data), _DECL_1DARRAYSIZE_PARAM_CALLBYREFERENCE){
	_DECL_1DARRAY_BYTE(output);
	_DECL_DEALLOC(output);
	int64_t pos = 0;
	BYTE item;
	BYTE length;
	int64_t _5 = 0;
	BYTE _6;
	int64_t _7 = 0;
	_DECL_1DARRAY_BYTE(_8);
	_DECL_DEALLOC(_8);
	int64_t _9 = 0;
	BYTE _10;
	BYTE _11;
	int64_t _12 = 0;
	int64_t _13 = 0;
	_DECL_1DARRAY_BYTE(_14);
	_DECL_DEALLOC(_14);
	_DECL_1DARRAY_BYTE(_15);
	_DECL_DEALLOC(_15);
	//const %5 = 0 : int
	_5 = 0;
	//assign %2 = %5  : int
	pos = _5;
	//const %6 = 00000000b : byte
	_6 = 0b00000000;
	//const %7 = 0 : int
	_7 = 0;
	//arraygen %8 = [6; 7] : byte[]
	_DEALLOC(_8);
	_NEW_1DARRAY_BYTE(_8, _7, _6);
	_ADD_DEALLOC(_8);
	//assign %1 = %8  : byte[]
	_DEALLOC(output);
	_UPDATE_1DARRAY(output, _8);
	_TRANSFER_DEALLOC(output, _8);
	//loop (%1, %2, %3, %4, %9, %10, %11, %12, %13, %14, %15)
	while(true){
		//lengthof %9 = %0 : byte[]
		_9 = data_size;
		//ifge %2, %9 goto blklab7 : int
		if(pos>=_9){goto blklab7;}
		//indexof %10 = %0, %2 : byte[]
		_10=data[pos];
		//assign %3 = %10  : byte
		item = _10;
		//invoke (%11) = (%2) whiley/lang/Int:toUnsignedByte : function(whiley/lang/Int:u8)->(byte)
		{
			_11 = (BYTE)pos;
		}
		//assign %4 = %11  : byte
		length = _11;
		//const %12 = 1 : int
		_12 = 1;
		//add %13 = %2, %12 : int
		_13=pos+_12;
		//assign %2 = %13  : int
		pos = _13;
		//invoke (%14) = (%1, %4) AppendArrayPattern_original:append : function(byte[],byte)->(byte[])
		{
			_DEALLOC(_14);
			_14 = _append_(_1DARRAY_PARAM(output), false, length, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_14));
			_RETAIN_DEALLOC(output, "false-false-false" , "append");
			_ADD_DEALLOC(_14);
		}
		//assign %1 = %14  : byte[]
		_DEALLOC(output);
		_UPDATE_1DARRAY(output, _14);
		_TRANSFER_DEALLOC(output, _14);
		//invoke (%15) = (%1, %3) AppendArrayPattern_original:append : function(byte[],byte)->(byte[])
		{
			_DEALLOC(_15);
			_15 = _append_(_1DARRAY_PARAM(output), false, item, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_15));
			_RETAIN_DEALLOC(output, "false-false-false" , "append");
			_ADD_DEALLOC(_15);
		}
		//assign %1 = %15  : byte[]
		_DEALLOC(output);
		_UPDATE_1DARRAY(output, _15);
		_TRANSFER_DEALLOC(output, _15);
//.blklab8
blklab8:;
	}
//.blklab7
blklab7:;
	//return %1
	_DEALLOC(data);
	_DEALLOC(_8);
	_DEALLOC(_14);
	_DEALLOC(_15);
	_UPDATE_1DARRAYSZIE_PARAM_CALLBYREFERENCE(output);
	return output;
	//return
}
Ejemplo n.º 14
0
int main(int argc, char** args){
	_DECL_1DARRAY(a);
	_DECL_DEALLOC(a);
	_DECL_1DARRAY(b);
	_DECL_DEALLOC(b);
	_DECL_1DARRAY(r);
	_DECL_DEALLOC(r);
	int64_t _4;
	int64_t _5;
	_DECL_1DARRAY(_6);
	_DECL_DEALLOC(_6);
	int64_t _7;
	int64_t _8;
	_DECL_1DARRAY(_9);
	_DECL_DEALLOC(_9);
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	void* _11;
	int64_t _13;
	int64_t _14;
	//const %4 = 2 : int
	_4 = 2;
	//const %5 = 2 : int
	_5 = 2;
	//arraygen %6 = [4; 5] : int[]
	_NEW1DARRAY_DEALLOC(_6, _4, _5, int64_t);
	//assign %1 = %6  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _6);
	//const %7 = 2 : int
	_7 = 2;
	//const %8 = 2 : int
	_8 = 2;
	//arraygen %9 = [7; 8] : int[]
	_NEW1DARRAY_DEALLOC(_9, _7, _8, int64_t);
	//assign %2 = %9  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(b, _9);
	//invoke (%10) = (%1, %2) 2parameter_test56:func : function(int[],int[])->(int[])
	{
		_FUNCTIONCALL_COPY_PRE(_10, b, "true-ALWAYS_RETURN-true" , "func");
		_FUNCTIONCALL_NO_COPY_PRE(_10, a, "false-NEVER_RETURN-false" , "func");
		_DEALLOC(_10);
		void* tmp_b;
		_COPY_1DARRAY_PARAM(b, tmp_b, int64_t);
		// isCopyEliminated of '_1' = true
		// isCopyEliminated of '_2' = false
		_10 = _func_(a, a_size, tmp_b, b_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_10));
		_10_dealloc = true;
	}
	//assign %3 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(r, _10);
	//fieldload %11 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %12 = %11 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %13 = 0 : int
	_13 = 0;
	//indexof %14 = %2, %13 : int[]
	_14=b[_13];
	//indirectinvoke () = %12 (%14) : method(any)->()
	{
		printf("%"PRId64"\n", _14);
	}
	//return
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(r);
	_DEALLOC(_6);
	_DEALLOC(_9);
	_DEALLOC(_10);
	exit(0);
}
Ejemplo n.º 15
0
int main(int argc, char** args){
	int64_t* max;
	_DECL_DEALLOC(max);
	int64_t n = 0;
	_DECL_1DARRAY(moves);
	_DECL_DEALLOC(moves);
	int64_t sum_alice = 0;
	int64_t* _5;
	_DECL_DEALLOC(_5);
	_DECL_2DARRAY(_6);
	_DECL_DEALLOC(_6);
	int64_t _7 = 0;
	_DECL_1DARRAY(_8);
	_DECL_DEALLOC(_8);
	int64_t _9 = 0;
	int64_t _10 = 0;
	int64_t _11 = 0;
	int64_t _12 = 0;
	int64_t _13 = 0;
	int64_t _14 = 0;
	_DECL_1DARRAY(_15);
	_DECL_DEALLOC(_15);
	_DECL_1DARRAY(_16);
	_DECL_DEALLOC(_16);
	int64_t _17 = 0;
	int64_t _18 = 0;
	int64_t _19 = 0;
	void* _20;
	_DECL_1DARRAY(_22);
	_DECL_DEALLOC(_22);
	void* _23;
	void* _25;
	_DECL_1DARRAY(_27);
	_DECL_DEALLOC(_27);
	//fieldload %6 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	_DEALLOC_2DARRAY_int64_t(_6);
	_CONV_ARGS(_6);
	_ADD_DEALLOC(_6);
	//const %7 = 0 : int
	_7 = 0;
	//indexof %8 = %6, %7 : int[][]
	_8=_6[_7];
	_8_size = _6_size_size;
	_REMOVE_DEALLOC(_8);
	//invoke (%5) = (%8) whiley/lang/Int:parse : function(whiley/lang/ASCII:string)->(null|int)
	{
		_STR_TO_INT(_5, _8);
		_ADD_DEALLOC(_5);
		_REMOVE_DEALLOC(_8);
	}
	//assign %1 = %5  : null|int
	_DEALLOC(max);
	// isCopyEliminated = true
	max = _5;
	_TRANSFER_DEALLOC(max, _5);
	//ifis %1, null goto blklab4 : null|int
	if(max == NULL) { goto blklab4;}
	//assign %2 = %1  : int
	// isCopyEliminated = true
	n = *max;
	//const %9 = 0 : int
	_9 = 0;
	//const %10 = 2 : int
	_10 = 2;
	//add %11 = %2, %10 : int
	_11=n+_10;
	//const %12 = 2 : int
	_12 = 2;
	//add %13 = %2, %12 : int
	_13=n+_12;
	//mul %14 = %11, %13 : int
	_14=_11*_13;
	//arraygen %15 = [9; 14] : int[]
	_DEALLOC(_15);
	_NEW_1DARRAY_int64_t(_15, _14, _9);
	_ADD_DEALLOC(_15);
	//assign %3 = %15  : int[]
	_DEALLOC(moves);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(moves, _15);
	_TRANSFER_DEALLOC(moves, _15);
	//invoke (%16) = (%3, %2) CoinGame_original:findMoves : function(int[],int)->(int[])
	{
		_DEALLOC(_16);
		// isCopyEliminated of '_3' = true
		_16 = _findMoves_(_1DARRAY_PARAM(moves), false, n, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_16));
		_RESET_DEALLOC(moves, "true-true-false" , "findMoves");
		_ADD_DEALLOC(_16);
	}
	//assign %3 = %16  : int[]
	_DEALLOC(moves);
	// isCopyEliminated = true
	_UPDATE_1DARRAY(moves, _16);
	_TRANSFER_DEALLOC(moves, _16);
	//const %17 = 1 : int
	_17 = 1;
	//sub %18 = %2, %17 : int
	_18=n-_17;
	//indexof %19 = %3, %18 : int[]
	_19=moves[_18];
	//assign %4 = %19  : int
	// isCopyEliminated = true
	sum_alice = _19;
	//fieldload %20 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %21 = %20 print_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %22 = [84,104,101,32,116,111,116,97,108,32,97,109,111,117,110,116,32,111,102,32,109,111,110,101,121,32,40,109,97,120,105,109,117,109,41,32,65,108,105,99,101,32,103,101,116,115,32,105,115,32] : int[]
	_DEALLOC(_22);
	_NEW_1DARRAY_int64_t(_22, 50, 0);
	_22[0] = 84; _22[1] = 104; _22[2] = 101; _22[3] = 32; _22[4] = 116; _22[5] = 111; _22[6] = 116; _22[7] = 97; _22[8] = 108; _22[9] = 32; _22[10] = 97; _22[11] = 109; _22[12] = 111; _22[13] = 117; _22[14] = 110; _22[15] = 116; _22[16] = 32; _22[17] = 111; _22[18] = 102; _22[19] = 32; _22[20] = 109; _22[21] = 111; _22[22] = 110; _22[23] = 101; _22[24] = 121; _22[25] = 32; _22[26] = 40; _22[27] = 109; _22[28] = 97; _22[29] = 120; _22[30] = 105; _22[31] = 109; _22[32] = 117; _22[33] = 109; _22[34] = 41; _22[35] = 32; _22[36] = 65; _22[37] = 108; _22[38] = 105; _22[39] = 99; _22[40] = 101; _22[41] = 32; _22[42] = 103; _22[43] = 101; _22[44] = 116; _22[45] = 115; _22[46] = 32; _22[47] = 105; _22[48] = 115; _22[49] = 32;
	_ADD_DEALLOC(_22);
	//indirectinvoke () = %21 (%22) : method(int[])->()
	{
		printf_s(_1DARRAY_PARAM(_22));
	}
	//fieldload %23 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %24 = %23 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %24 (%4) : method(any)->()
	{
		printf("%"PRId64"\n", sum_alice);
	}
	//fieldload %25 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %26 = %25 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %27 = [80,97,115,115,32,67,111,105,110,71,97,109,101,32,116,101,115,116,32,99,97,115,101] : int[]
	_DEALLOC(_27);
	_NEW_1DARRAY_int64_t(_27, 23, 0);
	_27[0] = 80; _27[1] = 97; _27[2] = 115; _27[3] = 115; _27[4] = 32; _27[5] = 67; _27[6] = 111; _27[7] = 105; _27[8] = 110; _27[9] = 71; _27[10] = 97; _27[11] = 109; _27[12] = 101; _27[13] = 32; _27[14] = 116; _27[15] = 101; _27[16] = 115; _27[17] = 116; _27[18] = 32; _27[19] = 99; _27[20] = 97; _27[21] = 115; _27[22] = 101;
	_ADD_DEALLOC(_27);
	//indirectinvoke () = %26 (%27) : method(int[])->()
	{
		println_s(_27, _27_size);
	}
//.blklab4
blklab4:;
	//return
	_DEALLOC(max);
	_DEALLOC(moves);
	_DEALLOC(_5);
	_DEALLOC_2DARRAY_int64_t(_6);
	_DEALLOC(_8);
	_DEALLOC(_15);
	_DEALLOC(_16);
	_DEALLOC(_22);
	_DEALLOC(_27);
	exit(0);
}
Ejemplo n.º 16
0
int main(int argc, char** args){
	_DECL_1DARRAY(a);
	_DECL_DEALLOC(a);
	_DECL_1DARRAY(b);
	_DECL_DEALLOC(b);
	_DECL_1DARRAY(c);
	_DECL_DEALLOC(c);
	_DECL_1DARRAY(r);
	_DECL_DEALLOC(r);
	int64_t _5;
	int64_t _6;
	_DECL_1DARRAY(_7);
	_DECL_DEALLOC(_7);
	int64_t _8;
	int64_t _9;
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	int64_t _11;
	int64_t _12;
	_DECL_1DARRAY(_13);
	_DECL_DEALLOC(_13);
	_DECL_1DARRAY(_14);
	_DECL_DEALLOC(_14);
	void* _15;
	int64_t _17;
	int64_t _18;
	void* _19;
	int64_t _21;
	int64_t _22;
	void* _23;
	int64_t _25;
	int64_t _26;
	//const %5 = 2 : int
	_5 = 2;
	//const %6 = 2 : int
	_6 = 2;
	//arraygen %7 = [5; 6] : int[]
	_NEW1DARRAY_DEALLOC(_7, _5, _6, int64_t);
	//assign %1 = %7  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(a, _7);
	//const %8 = 2 : int
	_8 = 2;
	//const %9 = 2 : int
	_9 = 2;
	//arraygen %10 = [8; 9] : int[]
	_NEW1DARRAY_DEALLOC(_10, _8, _9, int64_t);
	//assign %2 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(b, _10);
	//const %11 = 2 : int
	_11 = 2;
	//const %12 = 2 : int
	_12 = 2;
	//arraygen %13 = [11; 12] : int[]
	_NEW1DARRAY_DEALLOC(_13, _11, _12, int64_t);
	//assign %3 = %13  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(c, _13);
	//invoke (%14) = (%1, %2, %3) 3parameter_test31:func : function(int[],int[],int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_14, c, "false-NEVER_RETURN-true" , "func");
		_FUNCTIONCALL_COPY_PRE(_14, b, "true-MAYBE_RETURN-true" , "func");
		_FUNCTIONCALL_NO_COPY_PRE(_14, a, "false-NEVER_RETURN-true" , "func");
		_DEALLOC(_14);
		void* tmp_b;
		_COPY_1DARRAY_PARAM(b, tmp_b, int64_t);
		// isCopyEliminated of '_1' = true
		// isCopyEliminated of '_2' = false
		// isCopyEliminated of '_3' = true
		_14 = _func_(a, a_size, tmp_b, b_size, c, c_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_14));
		if( _14 == tmp_b ){
			_14_dealloc = true;
		} else {
			_14_dealloc = true;
			free(tmp_b);
		}
	}
	//assign %4 = %14  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(r, _14);
	//fieldload %15 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %16 = %15 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %17 = 0 : int
	_17 = 0;
	//indexof %18 = %1, %17 : int[]
	_18=a[_17];
	//indirectinvoke () = %16 (%18) : method(any)->()
	{
		printf("%"PRId64"\n", _18);
	}
	//fieldload %19 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %20 = %19 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %21 = 0 : int
	_21 = 0;
	//indexof %22 = %2, %21 : int[]
	_22=b[_21];
	//indirectinvoke () = %20 (%22) : method(any)->()
	{
		printf("%"PRId64"\n", _22);
	}
	//fieldload %23 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %24 = %23 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %25 = 0 : int
	_25 = 0;
	//indexof %26 = %3, %25 : int[]
	_26=c[_25];
	//indirectinvoke () = %24 (%26) : method(any)->()
	{
		printf("%"PRId64"\n", _26);
	}
	//return
	_DEALLOC(a);
	_DEALLOC(b);
	_DEALLOC(c);
	_DEALLOC(r);
	_DEALLOC(_7);
	_DEALLOC(_10);
	_DEALLOC(_13);
	_DEALLOC(_14);
	exit(0);
}
Ejemplo n.º 17
0
int main(int argc, char** args){
	_DECL_1DARRAY(ys);
	_DECL_DEALLOC(ys);
	int64_t max;
	int64_t index;
	_DECL_1DARRAY(arr);
	_DECL_DEALLOC(arr);
	int64_t _5;
	int64_t _6;
	int64_t _7;
	int64_t _8;
	int64_t _9;
	_DECL_1DARRAY(_10);
	_DECL_DEALLOC(_10);
	_DECL_1DARRAY(_11);
	_DECL_DEALLOC(_11);
	int64_t _12;
	int64_t _13;
	int64_t _14;
	int64_t _15;
	int64_t _16;
	_DECL_1DARRAY(_17);
	_DECL_DEALLOC(_17);
	void* _18;
	int64_t _20;
	int64_t _21;
	int64_t _22;
	int64_t _23;
	_DECL_1DARRAY(_24);
	_DECL_DEALLOC(_24);
	_DECL_1DARRAY(_25);
	_DECL_DEALLOC(_25);
	int64_t _26;
	int64_t _27;
	int64_t _28;
	int64_t _29;
	_DECL_1DARRAY(_30);
	_DECL_DEALLOC(_30);
	void* _31;
	int64_t _33;
	int64_t _34;
	int64_t _35;
	int64_t _36;
	_DECL_1DARRAY(_37);
	_DECL_DEALLOC(_37);
	_DECL_1DARRAY(_38);
	_DECL_DEALLOC(_38);
	int64_t _39;
	int64_t _40;
	int64_t _41;
	int64_t _42;
	_DECL_1DARRAY(_43);
	_DECL_DEALLOC(_43);
	void* _44;
	int64_t _46;
	int64_t _47;
	int64_t _48;
	int64_t _49;
	int64_t _50;
	_DECL_1DARRAY(_51);
	_DECL_DEALLOC(_51);
	_DECL_1DARRAY(_52);
	_DECL_DEALLOC(_52);
	int64_t _53;
	int64_t _54;
	int64_t _55;
	int64_t _56;
	int64_t _57;
	_DECL_1DARRAY(_58);
	_DECL_DEALLOC(_58);
	void* _59;
	int64_t _61;
	int64_t _62;
	int64_t _63;
	_DECL_1DARRAY(_64);
	_DECL_DEALLOC(_64);
	int64_t _65;
	int64_t _66;
	int64_t _67;
	_DECL_1DARRAY(_68);
	_DECL_DEALLOC(_68);
	int64_t _69;
	int64_t _70;
	int64_t _71;
	int64_t _72;
	int64_t _73;
	int64_t _74;
	int64_t _75;
	int64_t _76;
	int64_t _77;
	int64_t _78;
	_DECL_1DARRAY(_79);
	_DECL_DEALLOC(_79);
	void* _80;
	void* _82;
	_DECL_1DARRAY(_84);
	_DECL_DEALLOC(_84);
	//const %5 = 3 : int
	_5 = 3;
	//const %6 = 4 : int
	_6 = 4;
	//const %7 = 7 : int
	_7 = 7;
	//const %8 = 1 : int
	_8 = 1;
	//const %9 = 2 : int
	_9 = 2;
	//newlist %10 = (%5, %6, %7, %8, %9) : int[]
	_DEALLOC(_10);
	_NEW_1DARRAY_int64_t(_10, 5, 0);
	_10[0] = _5; _10[1] = _6; _10[2] = _7; _10[3] = _8; _10[4] = _9; 
	_10_dealloc = true;
	//assign %1 = %10  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _10);
	//invoke (%11) = (%1) bubblesort:bubbleSort : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_11, ys, 0, "liveness: ys = false, readonly: ys = false, return:ys = ALWAYS_RETURN" , "bubbleSort");
		_DEALLOC(_11);
		// isCopyEliminated of 'ys at 0' = true
		_11 = _bubbleSort_(ys, ys_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_11));
		_11_dealloc = ys_dealloc;
		ys_dealloc = false;
	}
	//assign %1 = %11  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _11);
	//assert
	{
		//const %12 = 1 : int
		_12 = 1;
		//const %13 = 2 : int
		_13 = 2;
		//const %14 = 3 : int
		_14 = 3;
		//const %15 = 4 : int
		_15 = 4;
		//const %16 = 7 : int
		_16 = 7;
		//newlist %17 = (%12, %13, %14, %15, %16) : int[]
		_DEALLOC(_17);
		_NEW_1DARRAY_int64_t(_17, 5, 0);
		_17[0] = _12; _17[1] = _13; _17[2] = _14; _17[3] = _15; _17[4] = _16; 
		_17_dealloc = true;
		//ifeq %1, %17 goto blklab5 : int[]
		_IFEQ_ARRAY_int64_t(ys, _17, blklab5);
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab5
blklab5:;
	//assert
	}
	//fieldload %18 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %19 = %18 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %19 (%1) : method(any)->()
	{
		_PRINT_1DARRAY_int64_t(ys);
	}
	//const %20 = 3 : int
	_20 = 3;
	//const %21 = 4 : int
	_21 = 4;
	//const %22 = 7 : int
	_22 = 7;
	//const %23 = 2 : int
	_23 = 2;
	//newlist %24 = (%20, %21, %22, %23) : int[]
	_DEALLOC(_24);
	_NEW_1DARRAY_int64_t(_24, 4, 0);
	_24[0] = _20; _24[1] = _21; _24[2] = _22; _24[3] = _23; 
	_24_dealloc = true;
	//assign %1 = %24  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _24);
	//invoke (%25) = (%1) bubblesort:bubbleSort : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_25, ys, 0, "liveness: ys = false, readonly: ys = false, return:ys = ALWAYS_RETURN" , "bubbleSort");
		_DEALLOC(_25);
		// isCopyEliminated of 'ys at 0' = true
		_25 = _bubbleSort_(ys, ys_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_25));
		_25_dealloc = ys_dealloc;
		ys_dealloc = false;
	}
	//assign %1 = %25  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _25);
	//assert
	{
		//const %26 = 2 : int
		_26 = 2;
		//const %27 = 3 : int
		_27 = 3;
		//const %28 = 4 : int
		_28 = 4;
		//const %29 = 7 : int
		_29 = 7;
		//newlist %30 = (%26, %27, %28, %29) : int[]
		_DEALLOC(_30);
		_NEW_1DARRAY_int64_t(_30, 4, 0);
		_30[0] = _26; _30[1] = _27; _30[2] = _28; _30[3] = _29; 
		_30_dealloc = true;
		//ifeq %1, %30 goto blklab6 : int[]
		_IFEQ_ARRAY_int64_t(ys, _30, blklab6);
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab6
blklab6:;
	//assert
	}
	//fieldload %31 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %32 = %31 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %32 (%1) : method(any)->()
	{
		_PRINT_1DARRAY_int64_t(ys);
	}
	//const %33 = 1 : int
	_33 = 1;
	//const %34 = 2 : int
	_34 = 2;
	//const %35 = 3 : int
	_35 = 3;
	//const %36 = 4 : int
	_36 = 4;
	//newlist %37 = (%33, %34, %35, %36) : int[]
	_DEALLOC(_37);
	_NEW_1DARRAY_int64_t(_37, 4, 0);
	_37[0] = _33; _37[1] = _34; _37[2] = _35; _37[3] = _36; 
	_37_dealloc = true;
	//assign %1 = %37  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _37);
	//invoke (%38) = (%1) bubblesort:bubbleSort : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_38, ys, 0, "liveness: ys = false, readonly: ys = false, return:ys = ALWAYS_RETURN" , "bubbleSort");
		_DEALLOC(_38);
		// isCopyEliminated of 'ys at 0' = true
		_38 = _bubbleSort_(ys, ys_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_38));
		_38_dealloc = ys_dealloc;
		ys_dealloc = false;
	}
	//assign %1 = %38  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _38);
	//assert
	{
		//const %39 = 1 : int
		_39 = 1;
		//const %40 = 2 : int
		_40 = 2;
		//const %41 = 3 : int
		_41 = 3;
		//const %42 = 4 : int
		_42 = 4;
		//newlist %43 = (%39, %40, %41, %42) : int[]
		_DEALLOC(_43);
		_NEW_1DARRAY_int64_t(_43, 4, 0);
		_43[0] = _39; _43[1] = _40; _43[2] = _41; _43[3] = _42; 
		_43_dealloc = true;
		//ifeq %1, %43 goto blklab7 : int[]
		_IFEQ_ARRAY_int64_t(ys, _43, blklab7);
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab7
blklab7:;
	//assert
	}
	//fieldload %44 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %45 = %44 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %45 (%1) : method(any)->()
	{
		_PRINT_1DARRAY_int64_t(ys);
	}
	//const %46 = 1 : int
	_46 = 1;
	//const %47 = 2 : int
	_47 = 2;
	//const %48 = 3 : int
	_48 = 3;
	//const %49 = 4 : int
	_49 = 4;
	//const %50 = 5 : int
	_50 = 5;
	//newlist %51 = (%46, %47, %48, %49, %50) : int[]
	_DEALLOC(_51);
	_NEW_1DARRAY_int64_t(_51, 5, 0);
	_51[0] = _46; _51[1] = _47; _51[2] = _48; _51[3] = _49; _51[4] = _50; 
	_51_dealloc = true;
	//assign %1 = %51  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _51);
	//invoke (%52) = (%1) bubblesort:bubbleSort : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_52, ys, 0, "liveness: ys = false, readonly: ys = false, return:ys = ALWAYS_RETURN" , "bubbleSort");
		_DEALLOC(_52);
		// isCopyEliminated of 'ys at 0' = true
		_52 = _bubbleSort_(ys, ys_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_52));
		_52_dealloc = ys_dealloc;
		ys_dealloc = false;
	}
	//assign %1 = %52  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(ys, _52);
	//assert
	{
		//const %53 = 1 : int
		_53 = 1;
		//const %54 = 2 : int
		_54 = 2;
		//const %55 = 3 : int
		_55 = 3;
		//const %56 = 4 : int
		_56 = 4;
		//const %57 = 5 : int
		_57 = 5;
		//newlist %58 = (%53, %54, %55, %56, %57) : int[]
		_DEALLOC(_58);
		_NEW_1DARRAY_int64_t(_58, 5, 0);
		_58[0] = _53; _58[1] = _54; _58[2] = _55; _58[3] = _56; _58[4] = _57; 
		_58_dealloc = true;
		//ifeq %1, %58 goto blklab8 : int[]
		_IFEQ_ARRAY_int64_t(ys, _58, blklab8);
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab8
blklab8:;
	//assert
	}
	//fieldload %59 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %60 = %59 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %60 (%1) : method(any)->()
	{
		_PRINT_1DARRAY_int64_t(ys);
	}
	//const %61 = 10 : int
	_61 = 10;
	//assign %2 = %61  : int
	// isCopyEliminated = true
	max = _61;
	//const %62 = 0 : int
	_62 = 0;
	//assign %3 = %62  : int
	// isCopyEliminated = true
	index = _62;
	//const %63 = 0 : int
	_63 = 0;
	//arraygen %64 = [63; 2] : int[]
	_NEW1DARRAY_DEALLOC(_64, _63, max, int64_t);
	//assign %4 = %64  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(arr, _64);
	//loop (%3, %4, %65, %66, %67)
	while(true){
		//ifge %3, %2 goto blklab9 : int
		if(index>=max){goto blklab9;}
		//sub %65 = %2, %3 : int
		_65=max-index;
		//update %4[%3] = %65 : int[] -> int[]
		arr[index] = _65;
		//const %66 = 1 : int
		_66 = 1;
		//add %67 = %3, %66 : int
		_67=index+_66;
		//assign %3 = %67  : int
		// isCopyEliminated = true
		index = _67;
//.blklab10
blklab10:;
	}
//.blklab9
blklab9:;
	//invoke (%68) = (%4) bubblesort:bubbleSort : function(int[])->(int[])
	{
		_FUNCTIONCALL_NO_COPY_PRE(_68, arr, 0, "liveness: arr = false, readonly: arr = false, return:arr = ALWAYS_RETURN" , "bubbleSort");
		_DEALLOC(_68);
		// isCopyEliminated of 'arr at 0' = true
		_68 = _bubbleSort_(arr, arr_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_68));
		_68_dealloc = arr_dealloc;
		arr_dealloc = false;
	}
	//assign %4 = %68  : int[]
	// isCopyEliminated = true
	_TRANSFER_DEALLOC(arr, _68);
	//assert
	{
		//const %69 = 1 : int
		_69 = 1;
		//const %70 = 2 : int
		_70 = 2;
		//const %71 = 3 : int
		_71 = 3;
		//const %72 = 4 : int
		_72 = 4;
		//const %73 = 5 : int
		_73 = 5;
		//const %74 = 6 : int
		_74 = 6;
		//const %75 = 7 : int
		_75 = 7;
		//const %76 = 8 : int
		_76 = 8;
		//const %77 = 9 : int
		_77 = 9;
		//const %78 = 10 : int
		_78 = 10;
		//newlist %79 = (%69, %70, %71, %72, %73, %74, %75, %76, %77, %78) : int[]
		_DEALLOC(_79);
		_NEW_1DARRAY_int64_t(_79, 10, 0);
		_79[0] = _69; _79[1] = _70; _79[2] = _71; _79[3] = _72; _79[4] = _73; _79[5] = _74; _79[6] = _75; _79[7] = _76; _79[8] = _77; _79[9] = _78; 
		_79_dealloc = true;
		//ifeq %4, %79 goto blklab11 : int[]
		_IFEQ_ARRAY_int64_t(arr, _79, blklab11);
		//fail
		fprintf(stderr,"fail");
		exit(-1);
//.blklab11
blklab11:;
	//assert
	}
	//fieldload %80 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %81 = %80 println : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//indirectinvoke () = %81 (%4) : method(any)->()
	{
		_PRINT_1DARRAY_int64_t(arr);
	}
	//fieldload %82 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out}
	//fieldload %83 = %82 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s}
	//const %84 = [80,97,115,115,32,66,117,98,98,108,101,83,111,114,116,32,116,101,115,116,32,99,97,115,101] : int[]
	_DEALLOC(_84);
	_NEW_1DARRAY_int64_t(_84, 25, 0);
	_84[0] = 80; _84[1] = 97; _84[2] = 115; _84[3] = 115; _84[4] = 32; _84[5] = 66; _84[6] = 117; _84[7] = 98; _84[8] = 98; _84[9] = 108; _84[10] = 101; _84[11] = 83; _84[12] = 111; _84[13] = 114; _84[14] = 116; _84[15] = 32; _84[16] = 116; _84[17] = 101; _84[18] = 115; _84[19] = 116; _84[20] = 32; _84[21] = 99; _84[22] = 97; _84[23] = 115; _84[24] = 101; 
	_84_dealloc = true;
	//indirectinvoke () = %83 (%84) : method(int[])->()
	{
		println_s(_84, _84_size);
	}
	//return
	_DEALLOC(ys);
	_DEALLOC(arr);
	_DEALLOC(_10);
	_DEALLOC(_11);
	_DEALLOC(_17);
	_DEALLOC(_24);
	_DEALLOC(_25);
	_DEALLOC(_30);
	_DEALLOC(_37);
	_DEALLOC(_38);
	_DEALLOC(_43);
	_DEALLOC(_51);
	_DEALLOC(_52);
	_DEALLOC(_58);
	_DEALLOC(_64);
	_DEALLOC(_68);
	_DEALLOC(_79);
	_DEALLOC(_84);
	exit(0);
}