int main(int argc, char** args){ FILE* file; _DECL_1DARRAY_BYTE(input_data); _DECL_1DARRAY_BYTE(decompress_data); void* _4; _DECL_1DARRAY(_5); _DECL_1DARRAY_BYTE(_6); _DECL_1DARRAY_BYTE(_8); void* _9; _DECL_1DARRAY(_11); void* _12; _DECL_1DARRAY(_14); void* _15; int64_t _17; void* _18; _DECL_1DARRAY(_20); //const %5 = [46,46,47,46,46,47,46,46,47,73,110,112,117,116,102,105,108,101,115,47,115,109,97,108,108,46,100,97,116] : int[] _NEW_1DARRAY_int64_t(_5, 29, 0); _5[0] = 46; _5[1] = 46; _5[2] = 47; _5[3] = 46; _5[4] = 46; _5[5] = 47; _5[6] = 46; _5[7] = 46; _5[8] = 47; _5[9] = 73; _5[10] = 110; _5[11] = 112; _5[12] = 117; _5[13] = 116; _5[14] = 102; _5[15] = 105; _5[16] = 108; _5[17] = 101; _5[18] = 115; _5[19] = 47; _5[20] = 115; _5[21] = 109; _5[22] = 97; _5[23] = 108; _5[24] = 108; _5[25] = 46; _5[26] = 100; _5[27] = 97; _5[28] = 116; //invoke (%4) = (%5) whiley/io/File:Reader : method(whiley/lang/ASCII:string)->(whiley/io/File:Reader) { _4 = Reader(_5, _5_size); } //assign %1 = %4 : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} // isCopyEliminated = true file = _4; //fieldload %7 = %1 readAll : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} //indirectinvoke (%6) = %7 () : method()->(byte[]) { _6 = readAll(file, &_6_size); } //assign %2 = %6 : byte[] // isCopyEliminated = true _UPDATE_1DARRAY(input_data, _6); //invoke (%8) = (%2) lz77_decompress:decompress : function(byte[])->(byte[]) { // isCopyEliminated of 'input_data at 0' = true _8 = _decompress_(input_data, input_data_size, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_8)); } //assign %3 = %8 : byte[] // isCopyEliminated = true _UPDATE_1DARRAY(decompress_data, _8); //fieldload %9 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %10 = %9 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %11 = [68,69,67,79,77,80,82,69,83,83,69,68,58,32,32,32] : int[] _NEW_1DARRAY_int64_t(_11, 16, 0); _11[0] = 68; _11[1] = 69; _11[2] = 67; _11[3] = 79; _11[4] = 77; _11[5] = 80; _11[6] = 82; _11[7] = 69; _11[8] = 83; _11[9] = 83; _11[10] = 69; _11[11] = 68; _11[12] = 58; _11[13] = 32; _11[14] = 32; _11[15] = 32; //indirectinvoke () = %10 (%11) : method(int[])->() { println_s(_11, _11_size); } //fieldload %12 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %13 = %12 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //invoke (%14) = (%3) whiley/lang/ASCII:fromBytes : function(byte[])->(whiley/lang/ASCII:string) { _14 = fromBytes(decompress_data, decompress_data_size); _14_size = decompress_data_size; } //indirectinvoke () = %13 (%14) : method(int[])->() { println_s(_14, _14_size); } //fieldload %15 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %16 = %15 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //lengthof %17 = %3 : byte[] _17 = decompress_data_size; //indirectinvoke () = %16 (%17) : method(any)->() { printf("%"PRId64, _17); } //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_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %20 = [32,98,121,116,101,115] : int[] _NEW_1DARRAY_int64_t(_20, 6, 0); _20[0] = 32; _20[1] = 98; _20[2] = 121; _20[3] = 116; _20[4] = 101; _20[5] = 115; //indirectinvoke () = %19 (%20) : method(int[])->() { println_s(_20, _20_size); } //fieldload %21 = %1 close : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} //indirectinvoke () = %21 () : method()->() { fclose(file); file = NULL; } //return exit(0); }
int main(int argc, char** args){ FILE* file; _DECL_1DARRAY_BYTE(input_data); _DECL_DEALLOC(input_data); _DECL_1DARRAY_BYTE(decompress_data); _DECL_DEALLOC(decompress_data); void* _4; _DECL_DEALLOC(_4); _DECL_2DARRAY(_5); _DECL_DEALLOC(_5); int64_t _6; _DECL_1DARRAY(_7); _DECL_DEALLOC(_7); _DECL_1DARRAY_BYTE(_8); _DECL_DEALLOC(_8); _DECL_1DARRAY_BYTE(_10); _DECL_DEALLOC(_10); void* _11; _DECL_1DARRAY(_13); _DECL_DEALLOC(_13); void* _14; int64_t _16; void* _17; _DECL_1DARRAY(_19); _DECL_DEALLOC(_19); //fieldload %5 = %0 args : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} _DEALLOC_2DARRAY_int64_t(_5); _CONV_ARGS(_5); _ADD_DEALLOC(_5); //const %6 = 0 : int _6 = 0; //indexof %7 = %5, %6 : int[][] _7=_5[_6]; _7_size = _5_size_size; _REMOVE_DEALLOC(_7); //invoke (%4) = (%7) whiley/io/File:Reader : method(whiley/lang/ASCII:string)->(whiley/io/File:Reader) { _4 = Reader(_7, _7_size); } //assign %1 = %4 : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} // isCopyEliminated = true file = _4; //fieldload %9 = %1 readAll : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} //indirectinvoke (%8) = %9 () : method()->(byte[]) { _8 = readAll(file, &_8_size); _ADD_DEALLOC(_8); } //assign %2 = %8 : byte[] _DEALLOC(input_data); // isCopyEliminated = true _UPDATE_1DARRAY(input_data, _8); _TRANSFER_DEALLOC(input_data, _8); //invoke (%10) = (%2) LZ77_decompress:decompress : function(byte[])->(byte[]) { // isCopyEliminated of '_2' = true _10 = _decompress_(input_data, input_data_size, false, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_10)); _RETAIN_DEALLOC(input_data, "false-false-false" , "decompress"); _RETAIN_DEALLOC_POST(_10, input_data); } //assign %3 = %10 : byte[] _DEALLOC(decompress_data); // isCopyEliminated = true _UPDATE_1DARRAY(decompress_data, _10); _TRANSFER_DEALLOC(decompress_data, _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_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %13 = [68,69,67,79,77,80,82,69,83,83,69,68,58,32,32,32] : int[] _DEALLOC(_13); _NEW_1DARRAY_int64_t(_13, 16, 0); _13[0] = 68; _13[1] = 69; _13[2] = 67; _13[3] = 79; _13[4] = 77; _13[5] = 80; _13[6] = 82; _13[7] = 69; _13[8] = 83; _13[9] = 83; _13[10] = 69; _13[11] = 68; _13[12] = 58; _13[13] = 32; _13[14] = 32; _13[15] = 32; _ADD_DEALLOC(_13); //indirectinvoke () = %12 (%13) : method(int[])->() { println_s(_13, _13_size); } //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 : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //lengthof %16 = %3 : byte[] _16 = decompress_data_size; //indirectinvoke () = %15 (%16) : method(any)->() { printf("%"PRId64, _16); } //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_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %19 = [32,98,121,116,101,115] : int[] _DEALLOC(_19); _NEW_1DARRAY_int64_t(_19, 6, 0); _19[0] = 32; _19[1] = 98; _19[2] = 121; _19[3] = 116; _19[4] = 101; _19[5] = 115; _ADD_DEALLOC(_19); //indirectinvoke () = %18 (%19) : method(int[])->() { println_s(_19, _19_size); } //fieldload %20 = %1 close : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} //indirectinvoke () = %20 () : method()->() { fclose(file); file = NULL; } //return if(file != NULL){fclose(file); file = NULL;} _DEALLOC(input_data); _DEALLOC(decompress_data); _FREE_ARGS(_5); _DEALLOC(_7); _DEALLOC(_8); _DEALLOC(_10); _DEALLOC(_13); _DEALLOC(_19); exit(0); }
int main(int argc, char** args){ FILE* file; _DECL_1DARRAY_BYTE(data); _DECL_DEALLOC(data); _DECL_1DARRAY_BYTE(compress_data); _DECL_DEALLOC(compress_data); FILE* writer; _DECL_1DARRAY_BYTE(decompress_data); _DECL_DEALLOC(decompress_data); void* _6; _DECL_DEALLOC(_6); _DECL_1DARRAY(_7); _DECL_DEALLOC(_7); _DECL_1DARRAY_BYTE(_8); _DECL_DEALLOC(_8); void* _10; _DECL_1DARRAY(_12); _DECL_DEALLOC(_12); void* _13; _DECL_1DARRAY(_15); _DECL_DEALLOC(_15); void* _16; int64_t _18; void* _19; _DECL_1DARRAY(_21); _DECL_DEALLOC(_21); _DECL_1DARRAY_BYTE(_22); _DECL_DEALLOC(_22); void* _23; _DECL_1DARRAY(_25); _DECL_DEALLOC(_25); void* _26; int64_t _28; void* _29; _DECL_1DARRAY(_31); _DECL_DEALLOC(_31); void* _32; _DECL_DEALLOC(_32); _DECL_1DARRAY(_33); _DECL_DEALLOC(_33); int64_t _34; _DECL_1DARRAY_BYTE(_37); _DECL_DEALLOC(_37); void* _38; _DECL_1DARRAY(_40); _DECL_DEALLOC(_40); void* _41; _DECL_1DARRAY(_43); _DECL_DEALLOC(_43); void* _44; int64_t _46; void* _47; _DECL_1DARRAY(_49); _DECL_DEALLOC(_49); //const %7 = [105,110,112,117,116,50,120,46,105,110] : int[] _DEALLOC(_7); _NEW_1DARRAY_int64_t(_7, 10, 0); _7[0] = 105; _7[1] = 110; _7[2] = 112; _7[3] = 117; _7[4] = 116; _7[5] = 50; _7[6] = 120; _7[7] = 46; _7[8] = 105; _7[9] = 110; _ADD_DEALLOC(_7); //invoke (%6) = (%7) whiley/io/File:Reader : method(whiley/lang/ASCII:string)->(whiley/io/File:Reader) { _6 = Reader(_7, _7_size); } //assign %1 = %6 : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} file = _6; //fieldload %9 = %1 readAll : {method()->(int) available,method()->() close,method()->(bool) hasMore,method(int)->(byte[]) read,method()->(byte[]) readAll} //indirectinvoke (%8) = %9 () : method()->(byte[]) { _8 = readAll(file, &_8_size); _ADD_DEALLOC(_8); } //assign %2 = %8 : byte[] _DEALLOC(data); _COPY_1DARRAY_BYTE(data, _8); _ADD_DEALLOC(data); //fieldload %10 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %11 = %10 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %12 = [68,97,116,97,58,32,32,32,32,32,32,32,32,32] : int[] _DEALLOC(_12); _NEW_1DARRAY_int64_t(_12, 14, 0); _12[0] = 68; _12[1] = 97; _12[2] = 116; _12[3] = 97; _12[4] = 58; _12[5] = 32; _12[6] = 32; _12[7] = 32; _12[8] = 32; _12[9] = 32; _12[10] = 32; _12[11] = 32; _12[12] = 32; _12[13] = 32; _ADD_DEALLOC(_12); //indirectinvoke () = %11 (%12) : method(int[])->() { println_s(_12, _12_size); } //fieldload %13 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %14 = %13 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //invoke (%15) = (%2) whiley/lang/ASCII:fromBytes : function(byte[])->(whiley/lang/ASCII:string) { _DEALLOC(_15); _15 = fromBytes(data, data_size); _15_size = data_size; _ADD_DEALLOC(_15); } //indirectinvoke () = %14 (%15) : method(int[])->() { println_s(_15, _15_size); } //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 = %2 : byte[] _18 = data_size; //indirectinvoke () = %17 (%18) : method(any)->() { printf("%"PRId64, _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_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %21 = [32,98,121,116,101,115] : int[] _DEALLOC(_21); _NEW_1DARRAY_int64_t(_21, 6, 0); _21[0] = 32; _21[1] = 98; _21[2] = 121; _21[3] = 116; _21[4] = 101; _21[5] = 115; _ADD_DEALLOC(_21); //indirectinvoke () = %20 (%21) : method(int[])->() { println_s(_21, _21_size); } //invoke (%22) = (%2) lz77_compress:compress : function(byte[])->(byte[]) { void* tmp_data; _COPY_1DARRAY_PARAM(data, tmp_data, BYTE); _DEALLOC(_22); _22 = _compress_(tmp_data, data_size, true, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_22)); _CALLEE_DEALLOC(data, "false-false-false" , "compress"); _CALLEE_DEALLOC_POST(_22, data); } //assign %3 = %22 : byte[] _DEALLOC(compress_data); _COPY_1DARRAY_BYTE(compress_data, _22); _ADD_DEALLOC(compress_data); //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_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %25 = [67,79,77,80,82,69,83,83,69,68,32,68,97,116,97,58,32,32,32] : int[] _DEALLOC(_25); _NEW_1DARRAY_int64_t(_25, 19, 0); _25[0] = 67; _25[1] = 79; _25[2] = 77; _25[3] = 80; _25[4] = 82; _25[5] = 69; _25[6] = 83; _25[7] = 83; _25[8] = 69; _25[9] = 68; _25[10] = 32; _25[11] = 68; _25[12] = 97; _25[13] = 116; _25[14] = 97; _25[15] = 58; _25[16] = 32; _25[17] = 32; _25[18] = 32; _ADD_DEALLOC(_25); //indirectinvoke () = %24 (%25) : method(int[])->() { println_s(_25, _25_size); } //fieldload %26 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %27 = %26 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //lengthof %28 = %3 : byte[] _28 = compress_data_size; //indirectinvoke () = %27 (%28) : method(any)->() { printf("%"PRId64, _28); } //fieldload %29 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %30 = %29 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %31 = [32,98,121,116,101,115] : int[] _DEALLOC(_31); _NEW_1DARRAY_int64_t(_31, 6, 0); _31[0] = 32; _31[1] = 98; _31[2] = 121; _31[3] = 116; _31[4] = 101; _31[5] = 115; _ADD_DEALLOC(_31); //indirectinvoke () = %30 (%31) : method(int[])->() { println_s(_31, _31_size); } //const %33 = [115,109,97,108,108,46,100,97,116] : int[] _DEALLOC(_33); _NEW_1DARRAY_int64_t(_33, 9, 0); _33[0] = 115; _33[1] = 109; _33[2] = 97; _33[3] = 108; _33[4] = 108; _33[5] = 46; _33[6] = 100; _33[7] = 97; _33[8] = 116; _ADD_DEALLOC(_33); //invoke (%32) = (%33) whiley/io/File:Writer : method(whiley/lang/ASCII:string)->(whiley/io/File:Writer) { _32 = Writer(_33, _33_size); } //assign %4 = %32 : {method()->() close,method()->() flush,method(byte[])->(int) write,...} writer = _32; //fieldload %35 = %4 write : {method()->() close,method()->() flush,method(byte[])->(int) write,...} //indirectinvoke (%34) = %35 (%3) : method(byte[])->(int) { writeAll(writer, compress_data, compress_data_size); } //fieldload %36 = %4 close : {method()->() close,method()->() flush,method(byte[])->(int) write,...} //indirectinvoke () = %36 () : method()->() { fclose(writer); writer = NULL; } //invoke (%37) = (%3) lz77_compress:decompress : function(byte[])->(byte[]) { void* tmp_data; _COPY_1DARRAY_PARAM(compress_data, tmp_data, BYTE); _DEALLOC(_37); _37 = _decompress_(tmp_data, compress_data_size, true, _1DARRAYSIZE_PARAM_CALLBYREFERENCE(_37)); _CALLEE_DEALLOC(compress_data, "false-false-false" , "decompress"); _CALLEE_DEALLOC_POST(_37, compress_data); } //assign %5 = %37 : byte[] _DEALLOC(decompress_data); _COPY_1DARRAY_BYTE(decompress_data, _37); _ADD_DEALLOC(decompress_data); //fieldload %38 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %39 = %38 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %40 = [68,69,67,79,77,80,82,69,83,83,69,68,58,32,32,32] : int[] _DEALLOC(_40); _NEW_1DARRAY_int64_t(_40, 16, 0); _40[0] = 68; _40[1] = 69; _40[2] = 67; _40[3] = 79; _40[4] = 77; _40[5] = 80; _40[6] = 82; _40[7] = 69; _40[8] = 83; _40[9] = 83; _40[10] = 69; _40[11] = 68; _40[12] = 58; _40[13] = 32; _40[14] = 32; _40[15] = 32; _ADD_DEALLOC(_40); //indirectinvoke () = %39 (%40) : method(int[])->() { println_s(_40, _40_size); } //fieldload %41 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %42 = %41 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //invoke (%43) = (%5) whiley/lang/ASCII:fromBytes : function(byte[])->(whiley/lang/ASCII:string) { _DEALLOC(_43); _43 = fromBytes(decompress_data, decompress_data_size); _43_size = decompress_data_size; _ADD_DEALLOC(_43); } //indirectinvoke () = %42 (%43) : method(int[])->() { println_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 print : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //lengthof %46 = %5 : byte[] _46 = decompress_data_size; //indirectinvoke () = %45 (%46) : method(any)->() { printf("%"PRId64, _46); } //fieldload %47 = %0 out : {int[][] args,{method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} out} //fieldload %48 = %47 println_s : {method(any)->() print,method(int[])->() print_s,method(any)->() println,method(int[])->() println_s} //const %49 = [32,98,121,116,101,115] : int[] _DEALLOC(_49); _NEW_1DARRAY_int64_t(_49, 6, 0); _49[0] = 32; _49[1] = 98; _49[2] = 121; _49[3] = 116; _49[4] = 101; _49[5] = 115; _ADD_DEALLOC(_49); //indirectinvoke () = %48 (%49) : method(int[])->() { println_s(_49, _49_size); } //return if(file != NULL){fclose(file); file = NULL;} _DEALLOC(data); _DEALLOC(compress_data); if(writer != NULL){fclose(writer); writer = NULL;} _DEALLOC(decompress_data); _DEALLOC(_7); _DEALLOC(_8); _DEALLOC(_12); _DEALLOC(_15); _DEALLOC(_21); _DEALLOC(_22); _DEALLOC(_25); _DEALLOC(_31); _DEALLOC(_33); _DEALLOC(_37); _DEALLOC(_40); _DEALLOC(_43); _DEALLOC(_49); exit(0); }