path
stringlengths
13
163
func_def
stringlengths
17
11.2k
func_head
stringlengths
7
184
func_head_types
stringlengths
7
195
fname
stringlengths
1
43
signature
sequencelengths
2
12
asm
dict
synth_deps
stringclasses
26 values
real_deps
stringlengths
5
418
synth_io_pairs
dict
real_io_pairs
dict
synth_exe_wrapper
stringclasses
44 values
real_exe_wrapper
stringlengths
1.23k
3.24k
ref
stringclasses
39 values
synth_iospec
stringclasses
1 value
real_iospec
stringlengths
266
748
Summeli/gnuboy4Symbian/Z/Z_io2.h
void fs_scandir(char *dir, char *name) { }
void fs_scandir(char *dir, char *name)
void fs_scandir(char *dir, char *name)
fs_scandir
[ "void", "char *", "char *" ]
{ "code": [ ".globl fs_scandir\n.type fs_scandir, @function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fs_scandir\n.type fs_scandir, @function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl fs_scandir\n.type fs_scandir, @function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global fs_scandir\n.type fs_scandir, %function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fs_scandir\n.type fs_scandir, %function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global fs_scandir\n.type fs_scandir, %function\nfs_scandir:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"bzjmkjuebl\"", "\"qmk\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"bfmqvzdbn\"", "\"q\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"jdjm\"", "\"rhftnooyj\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"xpubeekbfawrksujmit\"", "\"olf\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"pokqnyrncbqga\"", "\"jrfypnqej\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"fautwnvawxkekiqukzooya\"", "\"a\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"viefbuzip\"", "\"zze\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"omuleqhgvhnrpkcsadqderbpcsb\"", "\"omcoon\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"vlragrpnp\"", "\"huarbfmgsb\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"fjxdlkehterunytic\"", "\"czzqpppewlzej\"" ], "var": [ "dir", "name" ] } ], "output": [ { "value": [ "\"bzjmkjuebl\"", "\"qmk\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"bfmqvzdbn\"", "\"q\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"jdjm\"", "\"rhftnooyj\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"xpubeekbfawrksujmit\"", "\"olf\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"pokqnyrncbqga\"", "\"jrfypnqej\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"fautwnvawxkekiqukzooya\"", "\"a\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"viefbuzip\"", "\"zze\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"omuleqhgvhnrpkcsadqderbpcsb\"", "\"omcoon\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"vlragrpnp\"", "\"huarbfmgsb\"" ], "var": [ "dir", "name" ] }, { "value": [ "\"fjxdlkehterunytic\"", "\"czzqpppewlzej\"" ], "var": [ "dir", "name" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_332pk187u2.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* dir, char* name) { json output_json; output_json["dir"] = dir; output_json["name"] = name; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* dir = strdup(input_json["dir"].get<std::string>().c_str()); char* name = strdup(input_json["name"].get<std::string>().c_str()); clock_t begin = clock(); fs_scandir(dir, name); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(dir, name); }
master
null
{"livein": ["dir", "name"], "liveout": ["dir", "name"], "returnvarname": [], "execcmd": "", "funname": "fs_scandir", "funargs": ["dir", "name"], "typemap": {"dir": "string", "name": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_332pk187u2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
yigezhe/algorithm-summary/math/gcd/gcd_idea2_way2.c
int gcd(int a,int b) { int r; if(a<0) { a=-a; } if(b<0) { b=-b; } if(b>a) { int tmp=a; a=b; b=tmp; } # 36 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/yigezhe/algorithm-summary/refs/heads/master/math/gcd/gcd_idea2_way2.c" while (b != 0) { r = a % b; a = b; b = r; } return a; }
int gcd(inta, intb)
int gcd(int a,int b)
gcd
[ "int", "int", "int" ]
{ "code": [ ".globl gcd\n.type gcd, @function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjns\t.L2\n\tnegl\t-20(%rbp)\n.L2:\n\tcmpl\t$0, -24(%rbp)\n\tjns\t.L3\n\tnegl\t-24(%rbp)\n.L3:\n\tmovl\t-24(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjle\t.L5\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tmovl\t%eax, -24(%rbp)\n\tjmp\t.L5\n.L6:\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%edx, -4(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%eax, -24(%rbp)\n.L5:\n\tcmpl\t$0, -24(%rbp)\n\tjne\t.L6\n\tmovl\t-20(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl gcd\n.type gcd, @function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcltd\n\txorl\t%edx, %eax\n\tsubl\t%edx, %eax\n\tmovl\t%esi, %edx\n\tsarl\t$31, %edx\n\txorl\t%edx, %esi\n\tsubl\t%edx, %esi\n\tmovl\t%eax, %edx\n\tcmpl\t%eax, %esi\n\tjg\t.L5\n.L3:\n\ttestl\t%esi, %esi\n\tje\t.L7\n\tcltd\n\tidivl\t%esi\n.L5:\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %esi\n\tjmp\t.L3\n.L7:\n\tret\n\t.cfi_endproc\n\n", ".globl gcd\n.type gcd, @function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %ecx\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %edx\n\tsarl\t$31, %ecx\n\txorl\t%ecx, %eax\n\tsubl\t%ecx, %eax\n\tmovl\t%esi, %ecx\n\tsarl\t$31, %ecx\n\txorl\t%ecx, %edx\n\tsubl\t%ecx, %edx\n\tcmpl\t%eax, %edx\n\tjle\t.L2\n\tmovl\t%eax, %ecx\n\tmovl\t%edx, %eax\n\tmovl\t%ecx, %edx\n.L2:\n\ttestl\t%edx, %edx\n\tje\t.L5\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t%edx, %r8d\n\tcltd\n\tidivl\t%r8d\n\tmovl\t%r8d, %eax\n\ttestl\t%edx, %edx\n\tjne\t.L4\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovl\t%eax, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global gcd\n.type gcd, %function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbge\t.L2\n\tldr\tw0, [sp, 12]\n\tneg\tw0, w0\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 0\n\tbge\t.L3\n\tldr\tw0, [sp, 8]\n\tneg\tw0, w0\n\tstr\tw0, [sp, 8]\n.L3:\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tble\t.L5\n\tldr\tw0, [sp, 12]\n\tstr\tw0, [sp, 24]\n\tldr\tw0, [sp, 8]\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 24]\n\tstr\tw0, [sp, 8]\n\tb\t.L5\n.L6:\n\tldr\tw0, [sp, 12]\n\tldr\tw1, [sp, 8]\n\tsdiv\tw2, w0, w1\n\tldr\tw1, [sp, 8]\n\tmul\tw1, w2, w1\n\tsub\tw0, w0, w1\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tstr\tw0, [sp, 8]\n.L5:\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 0\n\tbne\t.L6\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global gcd\n.type gcd, %function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsneg\tw0, w0, w0, ge\n\tcmp\tw1, 0\n\tcsneg\tw1, w1, w1, ge\n\tcmp\tw1, w0\n\tble\t.L3\n\tmov\tw2, w0\n.L5:\n\tmov\tw0, w1\n\tmov\tw1, w2\n.L3:\n\tcbnz\tw1, .L4\n\tret\n.L4:\n\tudiv\tw2, w0, w1\n\tmsub\tw2, w2, w1, w0\n\tb\t.L5\n\t.cfi_endproc\n\n", ".global gcd\n.type gcd, %function\ngcd:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsneg\tw2, w0, w0, ge\n\tcmp\tw1, 0\n\tcsneg\tw1, w1, w1, ge\n\tcmp\tw1, w2\n\tcsel\tw0, w2, w1, le\n\tcsel\tw1, w1, w2, le\n\tmov\tw2, w0\n\tcbz\tw1, .L1\n\t.p2align 3,,7\n.L4:\n\tudiv\tw3, w2, w1\n\tmov\tw0, w1\n\tmsub\tw1, w3, w1, w2\n\tmov\tw2, w0\n\tcbnz\tw1, .L4\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "104", "99" ], "var": [ "a", "b" ] }, { "value": [ "114", "93" ], "var": [ "a", "b" ] }, { "value": [ "57", "18" ], "var": [ "a", "b" ] }, { "value": [ "115", "102" ], "var": [ "a", "b" ] }, { "value": [ "6", "4" ], "var": [ "a", "b" ] }, { "value": [ "84", "11" ], "var": [ "a", "b" ] }, { "value": [ "120", "104" ], "var": [ "a", "b" ] }, { "value": [ "76", "22" ], "var": [ "a", "b" ] }, { "value": [ "110", "45" ], "var": [ "a", "b" ] }, { "value": [ "8", "115" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_59gy4uj0wf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = gcd(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "gcd", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_59gy4uj0wf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dlna/DeveloperToolsForUPnP/Samples/EmbeddedSamples/Micro Av Server/MicroMediaServer.c
char MungeHexDigit(char* one_hexdigit) { char r = -1; char c = *one_hexdigit; if (c >= '0' && c <= '9') { r = c - '0'; } else if (c >= 'A' && c <= 'F') { r = c - 'A' + 10; } else if (c >= 'a' && c <= 'F') { r = c - 'a' + 10; } return r; }
char MungeHexDigit(char *one_hexdigit)
char MungeHexDigit(char* one_hexdigit)
MungeHexDigit
[ "char", "char *" ]
{ "code": [ ".globl MungeHexDigit\n.type MungeHexDigit, @function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovb\t$-1, -2(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovb\t%al, -1(%rbp)\n\tcmpb\t$47, -1(%rbp)\n\tjle\t.L2\n\tcmpb\t$57, -1(%rbp)\n\tjg\t.L2\n\tmovzbl\t-1(%rbp), %eax\n\tsubl\t$48, %eax\n\tmovb\t%al, -2(%rbp)\n\tjmp\t.L3\n.L2:\n\tcmpb\t$64, -1(%rbp)\n\tjle\t.L4\n\tcmpb\t$70, -1(%rbp)\n\tjg\t.L4\n\tmovzbl\t-1(%rbp), %eax\n\tsubl\t$55, %eax\n\tmovb\t%al, -2(%rbp)\n\tjmp\t.L3\n.L4:\n\tcmpb\t$96, -1(%rbp)\n\tjle\t.L3\n\tcmpb\t$70, -1(%rbp)\n\tjg\t.L3\n\tmovzbl\t-1(%rbp), %eax\n\tsubl\t$87, %eax\n\tmovb\t%al, -2(%rbp)\n.L3:\n\tmovzbl\t-2(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl MungeHexDigit\n.type MungeHexDigit, @function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rdi), %dl\n\tleal\t-48(%rdx), %eax\n\tcmpb\t$9, %al\n\tjbe\t.L1\n\tleal\t-65(%rdx), %ecx\n\tmovb\t$-1, %al\n\tcmpb\t$5, %cl\n\tja\t.L1\n\tleal\t-55(%rdx), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl MungeHexDigit\n.type MungeHexDigit, @function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %edx\n\tleal\t-48(%rdx), %eax\n\tcmpb\t$9, %al\n\tjbe\t.L1\n\tleal\t-65(%rdx), %eax\n\tcmpb\t$5, %al\n\tja\t.L4\n\tleal\t-55(%rdx), %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$-1, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global MungeHexDigit\n.type MungeHexDigit, %function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tmov\tw0, -1\n\tstrb\tw0, [sp, 30]\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tstrb\tw0, [sp, 31]\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 47\n\tbls\t.L2\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 57\n\tbhi\t.L2\n\tldrb\tw0, [sp, 31]\n\tsub\tw0, w0, #48\n\tstrb\tw0, [sp, 30]\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 64\n\tbls\t.L4\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 70\n\tbhi\t.L4\n\tldrb\tw0, [sp, 31]\n\tsub\tw0, w0, #55\n\tstrb\tw0, [sp, 30]\n\tb\t.L3\n.L4:\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 96\n\tbls\t.L3\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 70\n\tbhi\t.L3\n\tldrb\tw0, [sp, 31]\n\tsub\tw0, w0, #87\n\tstrb\tw0, [sp, 30]\n.L3:\n\tldrb\tw0, [sp, 30]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global MungeHexDigit\n.type MungeHexDigit, %function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tsub\tw0, w1, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tbls\t.L2\n\tsub\tw0, w1, #65\n\tsub\tw1, w1, #55\n\tand\tw0, w0, 255\n\tand\tw1, w1, 255\n\tcmp\tw0, 6\n\tmov\tw0, 255\n\tcsel\tw0, w1, w0, cc\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".global MungeHexDigit\n.type MungeHexDigit, %function\nMungeHexDigit:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tsub\tw0, w1, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tbls\t.L2\n\tsub\tw0, w1, #65\n\tsub\tw1, w1, #55\n\tand\tw0, w0, 255\n\tand\tw1, w1, 255\n\tcmp\tw0, 6\n\tmov\tw0, 255\n\tcsel\tw0, w1, w0, cc\n.L2:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"qfvfw\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"fsajoobzufkdnrusbhoet\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"urirjxxtrfzsctibdphhtm\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"agbtsoejrfuuirpqikltqzoajffrkye\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"kvxowyfwqdvnyoxlkunlqzuhxsazr\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"ydgvnvannhoeecnwnbjtx\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"iqgzrugfumuqwqrgp\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"mmgci\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"ijilfqo\"" ], "var": [ "one_hexdigit" ] }, { "value": [ "\"\"" ], "var": [ "one_hexdigit" ] } ], "output": [ { "value": [ "\"qfvfw\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"fsajoobzufkdnrusbhoet\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"urirjxxtrfzsctibdphhtm\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"agbtsoejrfuuirpqikltqzoajffrkye\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"kvxowyfwqdvnyoxlkunlqzuhxsazr\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"ydgvnvannhoeecnwnbjtx\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"iqgzrugfumuqwqrgp\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"mmgci\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"ijilfqo\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] }, { "value": [ "\"\"", "-1" ], "var": [ "one_hexdigit", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58e681x_mf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* one_hexdigit, char returnv) { json output_json; output_json["one_hexdigit"] = one_hexdigit; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* one_hexdigit = strdup(input_json["one_hexdigit"].get<std::string>().c_str()); clock_t begin = clock(); char returnv = MungeHexDigit(one_hexdigit); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(one_hexdigit, returnv); }
master
null
{"livein": ["one_hexdigit"], "liveout": ["one_hexdigit"], "returnvarname": ["returnv"], "execcmd": "", "funname": "MungeHexDigit", "funargs": ["one_hexdigit"], "typemap": {"one_hexdigit": "string", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58e681x_mf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
fatihafizoglu/document-allocation-policies/diversify/c/diversify.c
int mmr_diverse (int q_no, int number_of_preresults, int number_of_results) { return 0; }
int mmr_diverse(intq_no, intnumber_of_preresults, intnumber_of_results)
int mmr_diverse (int q_no, int number_of_preresults, int number_of_results)
mmr_diverse
[ "int", "int", "int", "int" ]
{ "code": [ ".globl mmr_diverse\n.type mmr_diverse, @function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t%edx, -12(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl mmr_diverse\n.type mmr_diverse, @function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl mmr_diverse\n.type mmr_diverse, @function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global mmr_diverse\n.type mmr_diverse, %function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tstr\tw2, [sp, 4]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global mmr_diverse\n.type mmr_diverse, %function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global mmr_diverse\n.type mmr_diverse, %function\nmmr_diverse:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "82", "37", "81" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "24", "12", "59" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "43", "85", "75" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "101", "8", "110" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "23", "96", "68" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "93", "46", "60" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "66", "80", "85" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "18", "58", "113" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "77", "72", "99" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] }, { "value": [ "125", "79", "107" ], "var": [ "q_no", "number_of_preresults", "number_of_results" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_35nyv54e7q.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int q_no, int number_of_preresults, int number_of_results, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int q_no = input_json["q_no"]; int number_of_preresults = input_json["number_of_preresults"]; int number_of_results = input_json["number_of_results"]; clock_t begin = clock(); int returnv = mmr_diverse(q_no, number_of_preresults, number_of_results); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(q_no, number_of_preresults, number_of_results, returnv); }
master
null
{"livein": ["q_no", "number_of_preresults", "number_of_results"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "mmr_diverse", "funargs": ["q_no", "number_of_preresults", "number_of_results"], "typemap": {"q_no": "int32", "number_of_preresults": "int32", "number_of_results": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35nyv54e7q.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
alexadam/c-utils/utils.c
int rgb2Int(const int r, const int g, const int b) { int tr = (r << 16) & 0x00FF0000; int tg = (g << 8) & 0x0000FF00; int tb = b & 0x000000FF; return 0xFF000000 | tr | tg | tb; }
int rgb2Int(const intr, const intg, const intb)
int rgb2Int(const int r, const int g, const int b)
rgb2Int
[ "int", "const int", "const int", "const int" ]
{ "code": [ ".globl rgb2Int\n.type rgb2Int, @function\nrgb2Int:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t%edx, -28(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tsall\t$16, %eax\n\tandl\t$16711680, %eax\n\tmovl\t%eax, -12(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tsall\t$8, %eax\n\tandl\t$65535, %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-28(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-12(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\torl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\torl\t%edx, %eax\n\torl\t$-16777216, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl rgb2Int\n.type rgb2Int, @function\nrgb2Int:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tsall\t$16, %edi\n\tmovzbl\t%dl, %edx\n\tsall\t$8, %esi\n\tandl\t$16711680, %edi\n\tmovzwl\t%si, %eax\n\torl\t%edx, %edi\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\torl\t$-16777216, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl rgb2Int\n.type rgb2Int, @function\nrgb2Int:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tsall\t$16, %edi\n\tmovzbl\t%dl, %edx\n\tsall\t$8, %esi\n\tandl\t$16711680, %edi\n\tmovzwl\t%si, %eax\n\torl\t%edx, %edi\n\torl\t%eax, %edi\n\tmovl\t%edi, %eax\n\torl\t$-16777216, %eax\n\tret\n\t.cfi_endproc\n\n", ".global rgb2Int\n.type rgb2Int, %function\nrgb2Int:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tstr\tw2, [sp, 4]\n\tldr\tw0, [sp, 12]\n\tlsl\tw0, w0, 16\n\tand\tw0, w0, 16711680\n\tstr\tw0, [sp, 20]\n\tldr\tw0, [sp, 8]\n\tlsl\tw0, w0, 8\n\tand\tw0, w0, 65535\n\tstr\tw0, [sp, 24]\n\tldr\tw0, [sp, 4]\n\tand\tw0, w0, 255\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 24]\n\torr\tw1, w1, w0\n\tldr\tw0, [sp, 28]\n\torr\tw0, w1, w0\n\torr\tw0, w0, -16777216\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global rgb2Int\n.type rgb2Int, %function\nrgb2Int:\n.LFB24:\n\t.cfi_startproc\n\tand\tw2, w2, 255\n\tubfiz\tw0, w0, 16, 8\n\tubfiz\tw1, w1, 8, 8\n\torr\tw0, w0, w2\n\torr\tw1, w1, -16777216\n\torr\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global rgb2Int\n.type rgb2Int, %function\nrgb2Int:\n.LFB39:\n\t.cfi_startproc\n\tand\tw2, w2, 255\n\tubfiz\tw0, w0, 16, 8\n\tubfiz\tw1, w1, 8, 8\n\torr\tw0, w0, w2\n\torr\tw1, w1, -16777216\n\torr\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> #include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "73", "71", "35" ], "var": [ "r", "g", "b" ] }, { "value": [ "84", "42", "108" ], "var": [ "r", "g", "b" ] }, { "value": [ "22", "61", "6" ], "var": [ "r", "g", "b" ] }, { "value": [ "112", "113", "55" ], "var": [ "r", "g", "b" ] }, { "value": [ "99", "8", "57" ], "var": [ "r", "g", "b" ] }, { "value": [ "37", "18", "5" ], "var": [ "r", "g", "b" ] }, { "value": [ "116", "73", "7" ], "var": [ "r", "g", "b" ] }, { "value": [ "70", "75", "12" ], "var": [ "r", "g", "b" ] }, { "value": [ "10", "65", "110" ], "var": [ "r", "g", "b" ] }, { "value": [ "82", "17", "35" ], "var": [ "r", "g", "b" ] } ], "output": [ { "value": [ "-11974877" ], "var": [ "returnv" ] }, { "value": [ "-11261332" ], "var": [ "returnv" ] }, { "value": [ "-15319802" ], "var": [ "returnv" ] }, { "value": [ "-9408201" ], "var": [ "returnv" ] }, { "value": [ "-10287047" ], "var": [ "returnv" ] }, { "value": [ "-14347771" ], "var": [ "returnv" ] }, { "value": [ "-9156345" ], "var": [ "returnv" ] }, { "value": [ "-12170484" ], "var": [ "returnv" ] }, { "value": [ "-16105106" ], "var": [ "returnv" ] }, { "value": [ "-11398877" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43hftyz4c0.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int r, int g, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int r = input_json["r"]; int g = input_json["g"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = rgb2Int(r, g, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(r, g, b, returnv); }
master
null
{"livein": ["r", "g", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "rgb2Int", "funargs": ["r", "g", "b"], "typemap": {"r": "int32", "g": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43hftyz4c0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
zerokullneo/IArtificial/TicTacToe/minimaxAlum.c
int min(int valor1, int valor2) { if(valor1 < valor2) return valor1; else return valor2; }
int min(intvalor1, intvalor2)
int min(int valor1, int valor2)
min
[ "int", "int", "int" ]
{ "code": [ ".globl min\n.type min, @function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjge\t.L2\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-8(%rbp), %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl min\n.type min, @function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl min\n.type min, @function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global min\n.type min, %function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tldr\tw0, [sp, 12]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 8]\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global min\n.type min, %function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, le\n\tret\n\t.cfi_endproc\n\n", ".global min\n.type min, %function\nmin:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, le\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "59", "19" ], "var": [ "valor1", "valor2" ] }, { "value": [ "84", "21" ], "var": [ "valor1", "valor2" ] }, { "value": [ "83", "25" ], "var": [ "valor1", "valor2" ] }, { "value": [ "30", "100" ], "var": [ "valor1", "valor2" ] }, { "value": [ "28", "97" ], "var": [ "valor1", "valor2" ] }, { "value": [ "85", "66" ], "var": [ "valor1", "valor2" ] }, { "value": [ "9", "7" ], "var": [ "valor1", "valor2" ] }, { "value": [ "75", "49" ], "var": [ "valor1", "valor2" ] }, { "value": [ "68", "33" ], "var": [ "valor1", "valor2" ] }, { "value": [ "82", "58" ], "var": [ "valor1", "valor2" ] } ], "output": [ { "value": [ "19" ], "var": [ "returnv" ] }, { "value": [ "21" ], "var": [ "returnv" ] }, { "value": [ "25" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "66" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "33" ], "var": [ "returnv" ] }, { "value": [ "58" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_526noil5zm.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int valor1, int valor2, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int valor1 = input_json["valor1"]; int valor2 = input_json["valor2"]; clock_t begin = clock(); int returnv = min(valor1, valor2); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(valor1, valor2, returnv); }
master
null
{"livein": ["valor1", "valor2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "min", "funargs": ["valor1", "valor2"], "typemap": {"valor1": "int32", "valor2": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_526noil5zm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
socoola/Zheyang/log.c
int spook_log_deinit() { return 0; }
int spook_log_deinit()
int spook_log_deinit()
spook_log_deinit
[ "int", "" ]
{ "code": [ ".globl spook_log_deinit\n.type spook_log_deinit, @function\nspook_log_deinit:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl spook_log_deinit\n.type spook_log_deinit, @function\nspook_log_deinit:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl spook_log_deinit\n.type spook_log_deinit, @function\nspook_log_deinit:\n.LFB51:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global spook_log_deinit\n.type spook_log_deinit, %function\nspook_log_deinit:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global spook_log_deinit\n.type spook_log_deinit, %function\nspook_log_deinit:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global spook_log_deinit\n.type spook_log_deinit, %function\nspook_log_deinit:\n.LFB51:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdarg.h> #include <time.h> #include <pthread.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41382dywl3.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = spook_log_deinit(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "spook_log_deinit", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41382dywl3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
deepmind/lab/q3map2/libs/picomodel/picomodel.c
int PicoGetHashTableSize( void ){ return 7919; }
int PicoGetHashTableSize()
int PicoGetHashTableSize( void )
PicoGetHashTableSize
[ "int", "" ]
{ "code": [ ".globl PicoGetHashTableSize\n.type PicoGetHashTableSize, @function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$7919, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl PicoGetHashTableSize\n.type PicoGetHashTableSize, @function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$7919, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl PicoGetHashTableSize\n.type PicoGetHashTableSize, @function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$7919, %eax\n\tret\n\t.cfi_endproc\n\n", ".global PicoGetHashTableSize\n.type PicoGetHashTableSize, %function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 7919\n\tret\n\t.cfi_endproc\n\n", ".global PicoGetHashTableSize\n.type PicoGetHashTableSize, %function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 7919\n\tret\n\t.cfi_endproc\n\n", ".global PicoGetHashTableSize\n.type PicoGetHashTableSize, %function\nPicoGetHashTableSize:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 7919\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] }, { "value": [ "7919" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_51uc7m9msx.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = PicoGetHashTableSize(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "PicoGetHashTableSize", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_51uc7m9msx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ayyucedemirbas/Minix-Source-Code/android/external/clang/test/Analysis/dead-stores.c
int f7c(int *p) { p = (void*) 0; return 1; }
int f7c(int *p)
int f7c(int *p)
f7c
[ "int", "int *" ]
{ "code": [ ".globl f7c\n.type f7c, @function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t$0, -8(%rbp)\n\tmovl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f7c\n.type f7c, @function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f7c\n.type f7c, @function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f7c\n.type f7c, %function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\txzr, [sp, 8]\n\tmov\tw0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f7c\n.type f7c, %function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global f7c\n.type f7c, %function\nf7c:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[115, 69, 94, 42, 45, 103, 99, 99, 45, 108, 97, 63, 12, 63, 47, 125, 68, 70, 45, 120, 120, 109, 66, 5, 14, 67, 68, 8, 50, 48, 40, 98]" ], "var": [ "p" ] }, { "value": [ "[40, 93, 59, 44, 100, 18, 59, 30, 34, 25, 20, 76, 107, 115, 53, 101, 99, 11, 15, 35, 34, 99, 115, 116, 41, 87, 22, 71, 90, 69, 108, 97]" ], "var": [ "p" ] }, { "value": [ "[9, 100, 111, 4, 72, 13, 60, 22, 108, 101, 66, 42, 104, 13, 67, 71, 73, 105, 35, 116, 26, 112, 67, 95, 3, 58, 90, 78, 55, 17, 112, 16]" ], "var": [ "p" ] }, { "value": [ "[14, 65, 9, 18, 10, 57, 88, 9, 116, 0, 93, 92, 91, 44, 19, 62, 115, 79, 51, 62, 117, 30, 3, 96, 71, 72, 59, 61, 88, 3, 59, 97]" ], "var": [ "p" ] }, { "value": [ "[12, 69, 4, 82, 72, 96, 113, 103, 97, 55, 100, 91, 124, 15, 38, 48, 41, 0, 120, 112, 80, 63, 119, 17, 71, 126, 72, 102, 111, 120, 5, 84]" ], "var": [ "p" ] }, { "value": [ "[9, 62, 60, 8, 116, 111, 125, 28, 49, 79, 64, 46, 98, 34, 98, 110, 51, 79, 34, 119, 103, 83, 0, 83, 12, 9, 74, 74, 110, 33, 21, 110]" ], "var": [ "p" ] }, { "value": [ "[53, 50, 54, 75, 97, 111, 5, 96, 91, 62, 15, 118, 83, 102, 92, 87, 54, 28, 15, 69, 116, 99, 41, 39, 16, 84, 96, 6, 114, 116, 42, 31]" ], "var": [ "p" ] }, { "value": [ "[107, 13, 47, 9, 5, 103, 82, 97, 112, 99, 29, 0, 30, 13, 101, 13, 65, 126, 64, 68, 107, 9, 52, 125, 81, 22, 49, 100, 10, 5, 26, 81]" ], "var": [ "p" ] }, { "value": [ "[83, 120, 90, 87, 19, 19, 98, 80, 103, 56, 125, 48, 63, 118, 11, 39, 94, 108, 32, 8, 121, 93, 18, 90, 24, 83, 84, 75, 81, 118, 55, 64]" ], "var": [ "p" ] }, { "value": [ "[71, 65, 96, 43, 118, 54, 0, 102, 108, 117, 55, 101, 125, 108, 125, 37, 122, 41, 87, 112, 62, 48, 119, 60, 53, 87, 101, 51, 82, 35, 117, 92]" ], "var": [ "p" ] } ], "output": [ { "value": [ "[115, 69, 94, 42, 45, 103, 99, 99, 45, 108, 97, 63, 12, 63, 47, 125, 68, 70, 45, 120, 120, 109, 66, 5, 14, 67, 68, 8, 50, 48, 40, 98]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[40, 93, 59, 44, 100, 18, 59, 30, 34, 25, 20, 76, 107, 115, 53, 101, 99, 11, 15, 35, 34, 99, 115, 116, 41, 87, 22, 71, 90, 69, 108, 97]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[9, 100, 111, 4, 72, 13, 60, 22, 108, 101, 66, 42, 104, 13, 67, 71, 73, 105, 35, 116, 26, 112, 67, 95, 3, 58, 90, 78, 55, 17, 112, 16]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[14, 65, 9, 18, 10, 57, 88, 9, 116, 0, 93, 92, 91, 44, 19, 62, 115, 79, 51, 62, 117, 30, 3, 96, 71, 72, 59, 61, 88, 3, 59, 97]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[12, 69, 4, 82, 72, 96, 113, 103, 97, 55, 100, 91, 124, 15, 38, 48, 41, 0, 120, 112, 80, 63, 119, 17, 71, 126, 72, 102, 111, 120, 5, 84]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[9, 62, 60, 8, 116, 111, 125, 28, 49, 79, 64, 46, 98, 34, 98, 110, 51, 79, 34, 119, 103, 83, 0, 83, 12, 9, 74, 74, 110, 33, 21, 110]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[53, 50, 54, 75, 97, 111, 5, 96, 91, 62, 15, 118, 83, 102, 92, 87, 54, 28, 15, 69, 116, 99, 41, 39, 16, 84, 96, 6, 114, 116, 42, 31]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[107, 13, 47, 9, 5, 103, 82, 97, 112, 99, 29, 0, 30, 13, 101, 13, 65, 126, 64, 68, 107, 9, 52, 125, 81, 22, 49, 100, 10, 5, 26, 81]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[83, 120, 90, 87, 19, 19, 98, 80, 103, 56, 125, 48, 63, 118, 11, 39, 94, 108, 32, 8, 121, 93, 18, 90, 24, 83, 84, 75, 81, 118, 55, 64]", "1" ], "var": [ "p", "returnv" ] }, { "value": [ "[71, 65, 96, 43, 118, 54, 0, 102, 108, 117, 55, 101, 125, 108, 125, 37, 122, 41, 87, 112, 62, 48, 119, 60, 53, 87, 101, 51, 82, 35, 117, 92]", "1" ], "var": [ "p", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_40ge5anj0m.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* p, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = p[i3]; output_temp_2.push_back(output_temp_4); } output_json["p"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["p"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* p = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = f7c(p); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, returnv); }
master
null
{"livein": ["p"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "f7c", "funargs": ["p"], "typemap": {"p": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40ge5anj0m.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
project-lovelace/lovelace-website/pip/src/sqlparse-0.4.2/src/static/code_stubs/c/game_of_life.c
void game_of_life(int** board, int N, int M, int steps, int** final_board) { }
void game_of_life(int **board, intN, intM, intsteps, int **final_board)
void game_of_life(int** board, int N, int M, int steps, int** final_board)
game_of_life
[ "void", "int **", "int", "int", "int", "int **" ]
{ "code": [ ".globl game_of_life\n.type game_of_life, @function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t%esi, -12(%rbp)\n\tmovl\t%edx, -16(%rbp)\n\tmovl\t%ecx, -20(%rbp)\n\tmovq\t%r8, -32(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl game_of_life\n.type game_of_life, @function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl game_of_life\n.type game_of_life, @function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global game_of_life\n.type game_of_life, %function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 24]\n\tstr\tw1, [sp, 20]\n\tstr\tw2, [sp, 16]\n\tstr\tw3, [sp, 12]\n\tstr\tx4, [sp]\n\tnop\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global game_of_life\n.type game_of_life, %function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global game_of_life\n.type game_of_life, %function\ngame_of_life:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[54, 4, 77, 53, 74, 22, 80, 110, 63, 44, 57, 80, 86, 61, 99, 70, 33, 78, 51, 49, 60, 103, 96, 77, 111, 120, 38, 69, 11, 22, 78, 60]", "29", "7", "26", "[48, 87, 43, 104, 71, 105, 63, 83, 78, 56, 44, 82, 105, 35, 17, 45, 101, 21, 17, 29, 58, 108, 86, 96, 61, 59, 22, 28, 95, 65, 94, 110]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[26, 120, 5, 50, 105, 86, 118, 93, 76, 74, 47, 1, 31, 76, 81, 20, 88, 105, 65, 80, 29, 106, 0, 12, 2, 17, 49, 78, 81, 66, 84, 33]", "65", "55", "99", "[87, 74, 43, 49, 115, 32, 64, 69, 78, 108, 115, 73, 35, 48, 57, 73, 64, 104, 68, 29, 39, 2, 38, 10, 61, 1, 74, 111, 19, 124, 21, 98]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[118, 58, 77, 70, 99, 118, 48, 41, 80, 18, 70, 55, 64, 73, 39, 17, 107, 41, 57, 117, 32, 92, 107, 87, 12, 68, 105, 61, 9, 94, 42, 64]", "71", "41", "124", "[120, 2, 59, 30, 46, 94, 91, 8, 109, 23, 81, 98, 112, 74, 105, 120, 9, 45, 10, 25, 0, 2, 64, 124, 81, 106, 74, 122, 26, 57, 55, 61]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[119, 114, 23, 43, 21, 126, 68, 51, 61, 40, 75, 20, 124, 10, 67, 13, 45, 87, 73, 114, 38, 72, 19, 26, 69, 96, 20, 49, 18, 13, 89, 72]", "64", "33", "117", "[64, 122, 58, 9, 73, 63, 38, 108, 51, 36, 87, 55, 34, 7, 114, 12, 86, 92, 38, 103, 53, 74, 49, 93, 12, 29, 41, 124, 106, 70, 47, 75]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[30, 102, 14, 90, 120, 31, 60, 113, 53, 40, 16, 36, 92, 48, 37, 54, 17, 101, 20, 83, 79, 31, 20, 106, 10, 37, 108, 105, 1, 121, 105, 59]", "30", "75", "101", "[31, 39, 57, 110, 112, 29, 4, 45, 88, 90, 10, 67, 37, 7, 99, 95, 19, 45, 107, 93, 43, 21, 14, 45, 115, 23, 23, 29, 78, 6, 11, 67]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[50, 123, 54, 15, 97, 92, 32, 72, 22, 6, 66, 25, 79, 46, 19, 46, 116, 13, 77, 70, 20, 94, 16, 4, 89, 51, 49, 98, 51, 99, 57, 76]", "32", "28", "26", "[98, 88, 79, 105, 23, 120, 23, 120, 42, 48, 56, 14, 23, 8, 1, 116, 72, 118, 117, 120, 123, 40, 118, 123, 34, 53, 81, 13, 56, 32, 90, 112]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[28, 11, 48, 56, 107, 111, 97, 42, 38, 17, 69, 120, 105, 24, 39, 68, 63, 90, 83, 37, 108, 3, 80, 33, 77, 7, 113, 65, 55, 43, 107, 112]", "7", "29", "22", "[109, 69, 125, 26, 60, 44, 13, 76, 26, 37, 4, 7, 121, 119, 47, 56, 109, 96, 94, 91, 84, 20, 44, 111, 37, 8, 44, 31, 49, 29, 89, 109]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[52, 84, 59, 57, 55, 31, 53, 1, 61, 39, 32, 98, 81, 77, 46, 96, 118, 125, 123, 70, 29, 57, 99, 107, 116, 96, 46, 18, 42, 107, 120, 3]", "72", "43", "23", "[72, 57, 62, 109, 63, 99, 11, 103, 81, 3, 85, 108, 11, 105, 48, 123, 41, 35, 104, 102, 48, 20, 109, 60, 72, 17, 68, 5, 16, 99, 38, 36]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[117, 4, 110, 77, 108, 121, 51, 114, 33, 111, 88, 29, 44, 28, 54, 93, 99, 60, 22, 46, 70, 68, 77, 74, 46, 58, 53, 63, 43, 23, 29, 55]", "99", "8", "84", "[80, 126, 55, 21, 123, 81, 84, 30, 83, 6, 117, 85, 41, 37, 10, 7, 29, 75, 94, 114, 25, 78, 45, 11, 37, 3, 65, 44, 16, 100, 27, 111]" ], "var": [ "board", "N", "M", "steps", "final_board" ] }, { "value": [ "[96, 124, 22, 8, 8, 41, 115, 34, 7, 100, 60, 56, 48, 90, 120, 4, 61, 4, 95, 63, 62, 103, 86, 19, 42, 0, 37, 106, 30, 75, 27, 32]", "105", "1", "85", "[23, 76, 43, 110, 80, 61, 126, 89, 70, 92, 13, 14, 3, 2, 30, 18, 99, 94, 112, 116, 19, 102, 60, 118, 52, 104, 22, 88, 109, 113, 20, 57]" ], "var": [ "board", "N", "M", "steps", "final_board" ] } ], "output": [ { "value": [ "[54, 4, 77, 53, 74, 22, 80, 110, 63, 44, 57, 80, 86, 61, 99, 70, 33, 78, 51, 49, 60, 103, 96, 77, 111, 120, 38, 69, 11, 22, 78, 60]", "[48, 87, 43, 104, 71, 105, 63, 83, 78, 56, 44, 82, 105, 35, 17, 45, 101, 21, 17, 29, 58, 108, 86, 96, 61, 59, 22, 28, 95, 65, 94, 110]" ], "var": [ "board", "final_board" ] }, { "value": [ "[26, 120, 5, 50, 105, 86, 118, 93, 76, 74, 47, 1, 31, 76, 81, 20, 88, 105, 65, 80, 29, 106, 0, 12, 2, 17, 49, 78, 81, 66, 84, 33]", "[87, 74, 43, 49, 115, 32, 64, 69, 78, 108, 115, 73, 35, 48, 57, 73, 64, 104, 68, 29, 39, 2, 38, 10, 61, 1, 74, 111, 19, 124, 21, 98]" ], "var": [ "board", "final_board" ] }, { "value": [ "[118, 58, 77, 70, 99, 118, 48, 41, 80, 18, 70, 55, 64, 73, 39, 17, 107, 41, 57, 117, 32, 92, 107, 87, 12, 68, 105, 61, 9, 94, 42, 64]", "[120, 2, 59, 30, 46, 94, 91, 8, 109, 23, 81, 98, 112, 74, 105, 120, 9, 45, 10, 25, 0, 2, 64, 124, 81, 106, 74, 122, 26, 57, 55, 61]" ], "var": [ "board", "final_board" ] }, { "value": [ "[119, 114, 23, 43, 21, 126, 68, 51, 61, 40, 75, 20, 124, 10, 67, 13, 45, 87, 73, 114, 38, 72, 19, 26, 69, 96, 20, 49, 18, 13, 89, 72]", "[64, 122, 58, 9, 73, 63, 38, 108, 51, 36, 87, 55, 34, 7, 114, 12, 86, 92, 38, 103, 53, 74, 49, 93, 12, 29, 41, 124, 106, 70, 47, 75]" ], "var": [ "board", "final_board" ] }, { "value": [ "[30, 102, 14, 90, 120, 31, 60, 113, 53, 40, 16, 36, 92, 48, 37, 54, 17, 101, 20, 83, 79, 31, 20, 106, 10, 37, 108, 105, 1, 121, 105, 59]", "[31, 39, 57, 110, 112, 29, 4, 45, 88, 90, 10, 67, 37, 7, 99, 95, 19, 45, 107, 93, 43, 21, 14, 45, 115, 23, 23, 29, 78, 6, 11, 67]" ], "var": [ "board", "final_board" ] }, { "value": [ "[50, 123, 54, 15, 97, 92, 32, 72, 22, 6, 66, 25, 79, 46, 19, 46, 116, 13, 77, 70, 20, 94, 16, 4, 89, 51, 49, 98, 51, 99, 57, 76]", "[98, 88, 79, 105, 23, 120, 23, 120, 42, 48, 56, 14, 23, 8, 1, 116, 72, 118, 117, 120, 123, 40, 118, 123, 34, 53, 81, 13, 56, 32, 90, 112]" ], "var": [ "board", "final_board" ] }, { "value": [ "[28, 11, 48, 56, 107, 111, 97, 42, 38, 17, 69, 120, 105, 24, 39, 68, 63, 90, 83, 37, 108, 3, 80, 33, 77, 7, 113, 65, 55, 43, 107, 112]", "[109, 69, 125, 26, 60, 44, 13, 76, 26, 37, 4, 7, 121, 119, 47, 56, 109, 96, 94, 91, 84, 20, 44, 111, 37, 8, 44, 31, 49, 29, 89, 109]" ], "var": [ "board", "final_board" ] }, { "value": [ "[52, 84, 59, 57, 55, 31, 53, 1, 61, 39, 32, 98, 81, 77, 46, 96, 118, 125, 123, 70, 29, 57, 99, 107, 116, 96, 46, 18, 42, 107, 120, 3]", "[72, 57, 62, 109, 63, 99, 11, 103, 81, 3, 85, 108, 11, 105, 48, 123, 41, 35, 104, 102, 48, 20, 109, 60, 72, 17, 68, 5, 16, 99, 38, 36]" ], "var": [ "board", "final_board" ] }, { "value": [ "[117, 4, 110, 77, 108, 121, 51, 114, 33, 111, 88, 29, 44, 28, 54, 93, 99, 60, 22, 46, 70, 68, 77, 74, 46, 58, 53, 63, 43, 23, 29, 55]", "[80, 126, 55, 21, 123, 81, 84, 30, 83, 6, 117, 85, 41, 37, 10, 7, 29, 75, 94, 114, 25, 78, 45, 11, 37, 3, 65, 44, 16, 100, 27, 111]" ], "var": [ "board", "final_board" ] }, { "value": [ "[96, 124, 22, 8, 8, 41, 115, 34, 7, 100, 60, 56, 48, 90, 120, 4, 61, 4, 95, 63, 62, 103, 86, 19, 42, 0, 37, 106, 30, 75, 27, 32]", "[23, 76, 43, 110, 80, 61, 126, 89, 70, 92, 13, 14, 3, 2, 30, 18, 99, 94, 112, 116, 19, 102, 60, 118, 52, 104, 22, 88, 109, 113, 20, 57]" ], "var": [ "board", "final_board" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29kzo62_kw.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* board, int N, int M, int steps, int* final_board) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = board[i4]; output_temp_3.push_back(output_temp_5); } output_json["board"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = final_board[i7]; output_temp_6.push_back(output_temp_8); } output_json["final_board"] = output_temp_6; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["board"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* board = &input_temp_1_vec[0]; int N = input_json["N"]; int M = input_json["M"]; int steps = input_json["steps"]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["final_board"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* final_board = &input_temp_2_vec[0]; clock_t begin = clock(); int(**casted_board) = (int(**))board; int(**casted_final_board) = (int(**))final_board; game_of_life(casted_board, N, M, steps, casted_final_board); board = (int(*))casted_board; final_board = (int(*))casted_final_board; clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(board, N, M, steps, final_board); }
dependabot
null
{"livein": ["board", "N", "M", "steps", "final_board"], "liveout": ["board", "final_board"], "returnvarname": [], "execcmd": "", "funname": "game_of_life", "funargs": ["board", "N", "M", "steps", "final_board"], "typemap": {"board": "array(int32#32)", "N": "int32", "M": "int32", "steps": "int32", "final_board": "array(int32#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29kzo62_kw.c"], "classmap": {}, "range": {}, "needs_cast": {"board": {"old_type": "int", "new_type": "int", "dims": ["*", "*"]}, "final_board": {"old_type": "int", "new_type": "int", "dims": ["*", "*"]}}, "globals": []}
Urinx/Hardware_Software_Interface/lab1/pointer.c
int doubleSize() { double doubArray[10]; double * doubPtr1; double * doubPtr2; return (long)(doubArray+1)+(~(long)doubArray+1); }
int doubleSize()
int doubleSize()
doubleSize
[ "int", "" ]
{ "code": [ ".globl doubleSize\n.type doubleSize, @function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$96, %rsp\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovl\t$8, %eax\n\tmovq\t-8(%rbp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L3\n\tcall\t__stack_chk_fail@PLT\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl doubleSize\n.type doubleSize, @function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$8, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl doubleSize\n.type doubleSize, @function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$8, %eax\n\tret\n\t.cfi_endproc\n\n", ".global doubleSize\n.type doubleSize, %function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -112]!\n\t.cfi_def_cfa_offset 112\n\t.cfi_offset 29, -112\n\t.cfi_offset 30, -104\n\tmov\tx29, sp\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 104]\n\tmov\tx1,0\n\tmov\tw0, 8\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 104]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L3\n\tbl\t__stack_chk_fail\n.L3:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 112\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global doubleSize\n.type doubleSize, %function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 8\n\tret\n\t.cfi_endproc\n\n", ".global doubleSize\n.type doubleSize, %function\ndoubleSize:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 8\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60mi6kvgcg.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = doubleSize(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "doubleSize", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60mi6kvgcg.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ningwei1993/beginnerOfC/5.c
int function(int x, int y) { switch (y) { case 2: if ((x % 4 == 0 && x % 100 != 0) || x % 400 == 0) { return 29; } else { return 28; } case 4: case 6: case 9: case 11: return 30; default: return 31; } }
int function(intx, inty)
int function(int x, int y)
function
[ "int", "int", "int" ]
{ "code": [ ".globl function\n.type function, @function\nfunction:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tcmpl\t$11, -8(%rbp)\n\tja\t.L2\n\tmovl\t-8(%rbp), %eax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L4(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L4(%rip), %rdx\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L5-.L4\n\t.long\t.L2-.L4\n\t.long\t.L3-.L4\n\t.long\t.L2-.L4\n\t.long\t.L3-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L3-.L4\n\t.long\t.L2-.L4\n\t.long\t.L3-.L4\n\t.text\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tandl\t$3, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L6\n\tmovl\t-4(%rbp), %edx\n\tmovslq\t%edx, %rax\n\timulq\t$1374389535, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %ecx\n\tsarl\t$5, %ecx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\timull\t$100, %eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L7\n.L6:\n\tmovl\t-4(%rbp), %edx\n\tmovslq\t%edx, %rax\n\timulq\t$1374389535, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %ecx\n\tsarl\t$7, %ecx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\timull\t$400, %eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L8\n.L7:\n\tmovl\t$29, %eax\n\tjmp\t.L9\n.L8:\n\tmovl\t$28, %eax\n\tjmp\t.L9\n.L3:\n\tmovl\t$30, %eax\n\tjmp\t.L9\n.L2:\n\tmovl\t$31, %eax\n.L9:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl function\n.type function, @function\nfunction:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$2, %esi\n\tcmpl\t$9, %esi\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovslq\t(%rdx,%rsi,4), %rax\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L5-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.text\n.L2:\n\tmovl\t$31, %eax\n\tret\n.L5:\n\ttestb\t$3, %dil\n\tjne\t.L6\n\tmovl\t%edi, %eax\n\tmovl\t$100, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovl\t$29, %eax\n\ttestl\t%edx, %edx\n\tjne\t.L1\n.L6:\n\tmovl\t%edi, %eax\n\tmovl\t$400, %ecx\n\tcltd\n\tidivl\t%ecx\n\tcmpl\t$1, %edx\n\tsbbl\t%eax, %eax\n\tnotl\t%eax\n\taddl\t$29, %eax\n\tret\n.L7:\n\tmovl\t$30, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl function\n.type function, @function\nfunction:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$11, %esi\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovl\t%esi, %esi\n\tmovslq\t(%rdx,%rsi,4), %rax\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L5-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.text\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovl\t$30, %eax\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovl\t$31, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\ttestb\t$3, %dil\n\tjne\t.L6\n\timull\t$-1030792151, %edi, %edx\n\tmovl\t$29, %eax\n\taddl\t$85899344, %edx\n\trorl\t$2, %edx\n\tcmpl\t$42949672, %edx\n\tja\t.L1\n.L6:\n\timull\t$-1030792151, %edi, %edi\n\txorl\t%eax, %eax\n\taddl\t$85899344, %edi\n\trorl\t$4, %edi\n\tcmpl\t$10737419, %edi\n\tsetb\t%al\n\taddl\t$28, %eax\n\tret\n\t.cfi_endproc\n\n", ".global function\n.type function, %function\nfunction:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 11\n\tcset\tw1, hi\n\tand\tw1, w1, 255\n\tcmp\tw1, 0\n\tbne\t.L2\n\tmov\tx1, 1\n\tlsl\tx0, x1, x0\n\tmov\tx1, 2640\n\tand\tx1, x0, x1\n\tcmp\tx1, 0\n\tcset\tw1, ne\n\tand\tw1, w1, 255\n\tcmp\tw1, 0\n\tbne\t.L3\n\tand\tx0, x0, 4\n\tcmp\tx0, 0\n\tcset\tw0, ne\n\tand\tw0, w0, 255\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 3\n\tcmp\tw0, 0\n\tbne\t.L4\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 34079\n\tmovk\tw0, 0x51eb, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 5\n\tasr\tw0, w1, 31\n\tsub\tw0, w2, w0\n\tmov\tw2, 100\n\tmul\tw0, w0, w2\n\tsub\tw0, w1, w0\n\tcmp\tw0, 0\n\tbne\t.L5\n.L4:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 34079\n\tmovk\tw0, 0x51eb, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 7\n\tasr\tw0, w1, 31\n\tsub\tw0, w2, w0\n\tmov\tw2, 400\n\tmul\tw0, w0, w2\n\tsub\tw0, w1, w0\n\tcmp\tw0, 0\n\tbne\t.L6\n.L5:\n\tmov\tw0, 29\n\tb\t.L7\n.L6:\n\tmov\tw0, 28\n\tb\t.L7\n.L3:\n\tmov\tw0, 30\n\tb\t.L7\n.L2:\n\tmov\tw0, 31\n.L7:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global function\n.type function, %function\nfunction:\n.LFB13:\n\t.cfi_startproc\n\tsub\tw1, w1, #2\n\tcmp\tw1, 9\n\tbhi\t.L2\n\tadrp\tx2, .L4\n\tadd\tx2, x2, :lo12:.L4\n\tldrb\tw1, [x2,w1,uxtw]\n\tadr\tx2, .Lrtx4\n\tadd\tx1, x2, w1, sxtb #2\n\tbr\tx1\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.byte\t(.L5 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L7 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L7 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L7 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L7 - .Lrtx4) / 4\n\t.text\n.L2:\n\tmov\tw0, 31\n.L1:\n\tret\n.L5:\n\ttst\tx0, 3\n\tbne\t.L6\n\tmov\tw2, 100\n\tsdiv\tw1, w0, w2\n\tmsub\tw1, w1, w2, w0\n\tcbnz\tw1, .L8\n.L6:\n\tmov\tw2, 400\n\tsdiv\tw1, w0, w2\n\tmsub\tw0, w1, w2, w0\n\tcmp\tw0, 0\n\tcset\tw0, eq\n\tadd\tw0, w0, 28\n\tb\t.L1\n.L7:\n\tmov\tw0, 30\n\tb\t.L1\n.L8:\n\tmov\tw0, 29\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global function\n.type function, %function\nfunction:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tcmp\tw1, 11\n\tbhi\t.L4\n\tmov\tx2, 1\n\tmov\tx4, 2640\n\tlsl\tx1, x2, x1\n\tmov\tw0, 30\n\ttst\tx1, x4\n\tbne\t.L1\n\tmov\tw0, 31\n\ttbnz\tx1, 2, .L11\n.L1:\n\tret\n.L11:\n\ttst\tx3, 3\n\tbne\t.L3\n\tmov\tw1, 23593\n\tmov\tw4, 47184\n\tmovk\tw1, 0xc28f, lsl 16\n\tmovk\tw4, 0x51e, lsl 16\n\tmov\tw2, 23592\n\tmov\tw0, 29\n\tmadd\tw1, w3, w1, w4\n\tmovk\tw2, 0x28f, lsl 16\n\tror\tw1, w1, 2\n\tcmp\tw1, w2\n\tbhi\t.L1\n.L3:\n\tmov\tw2, 23593\n\tmov\tw0, 47184\n\tmovk\tw2, 0xc28f, lsl 16\n\tmovk\tw0, 0x51e, lsl 16\n\tmov\tw1, 55050\n\tmadd\tw0, w3, w2, w0\n\tmovk\tw1, 0xa3, lsl 16\n\tror\tw0, w0, 4\n\tcmp\tw0, w1\n\tcset\tw0, ls\n\tadd\tw0, w0, 28\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 31\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "88", "56" ], "var": [ "x", "y" ] }, { "value": [ "3", "63" ], "var": [ "x", "y" ] }, { "value": [ "120", "113" ], "var": [ "x", "y" ] }, { "value": [ "7", "81" ], "var": [ "x", "y" ] }, { "value": [ "56", "27" ], "var": [ "x", "y" ] }, { "value": [ "43", "8" ], "var": [ "x", "y" ] }, { "value": [ "123", "9" ], "var": [ "x", "y" ] }, { "value": [ "94", "54" ], "var": [ "x", "y" ] }, { "value": [ "58", "10" ], "var": [ "x", "y" ] }, { "value": [ "83", "112" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_3011v4bfnu.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int y, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; int y = input_json["y"]; clock_t begin = clock(); int returnv = function(x, y); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, returnv); }
master
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "function", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_3011v4bfnu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.dg/parm-impl-decl-3.c
int g3 () { return 4; }
int g3()
int g3 ()
g3
[ "int", "" ]
{ "code": [ ".globl g3\n.type g3, @function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$4, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl g3\n.type g3, @function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$4, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl g3\n.type g3, @function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$4, %eax\n\tret\n\t.cfi_endproc\n\n", ".global g3\n.type g3, %function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n", ".global g3\n.type g3, %function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n", ".global g3\n.type g3, %function\ng3:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_568xqm3bnl.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = g3(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
arm-hot-cold
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "g3", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_568xqm3bnl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
CalSMV/lux/DSP/DSP_Lib_TestSuite/Common/platform/GCC/Retarget.c
int SER_GetChar (void) { return (-1); }
int SER_GetChar()
int SER_GetChar (void)
SER_GetChar
[ "int", "" ]
{ "code": [ ".globl SER_GetChar\n.type SER_GetChar, @function\nSER_GetChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$-1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl SER_GetChar\n.type SER_GetChar, @function\nSER_GetChar:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl SER_GetChar\n.type SER_GetChar, @function\nSER_GetChar:\n.LFB17:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global SER_GetChar\n.type SER_GetChar, %function\nSER_GetChar:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global SER_GetChar\n.type SER_GetChar, %function\nSER_GetChar:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global SER_GetChar\n.type SER_GetChar, %function\nSER_GetChar:\n.LFB17:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <sys/stat.h> #include <string.h> #include <errno.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48z4om6gs8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = SER_GetChar(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "SER_GetChar", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48z4om6gs8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
freudshow/learnc/Pointers.On.C/ch7/fact_rec.c
long factorial( int n ) { if( n <= 0 ) return 1; else return n * factorial( n - 1 ); }
long factorial(intn)
long factorial( int n )
factorial
[ "long", "int" ]
{ "code": [ ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tpushq\t%rbx\n\tsubq\t$24, %rsp\n\t.cfi_offset 3, -24\n\tmovl\t%edi, -20(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-20(%rbp), %eax\n\tmovslq\t%eax, %rbx\n\tmovl\t-20(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tfactorial\n\timulq\t%rbx, %rax\n.L3:\n\taddq\t$24, %rsp\n\tpopq\t%rbx\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovslq\t%edi, %rdx\n\tmovl\t$1, %eax\n.L3:\n\ttestl\t%edi, %edi\n\tjle\t.L4\n\timulq\t%rdx, %rax\n\tdecl\t%edi\n\tdecq\t%rdx\n\tjmp\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %r8d\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\tmovslq\t%edi, %rdx\n\tleal\t-1(%rdi), %ecx\n\tmovl\t$1, %r8d\n\tleaq\t-1(%rdx), %rax\n\tmovq\t%rax, %rsi\n\tsubq\t%rcx, %rsi\n\tmovq\t%rsi, %rcx\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tsubq\t$1, %rax\n.L4:\n\timulq\t%rdx, %r8\n\tmovq\t%rax, %rdx\n\tcmpq\t%rcx, %rax\n\tjne\t.L6\n.L1:\n\tmovq\t%r8, %rax\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 29, -48\n\t.cfi_offset 30, -40\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -32\n\tstr\tw0, [sp, 44]\n\tldr\tw0, [sp, 44]\n\tcmp\tw0, 0\n\tbgt\t.L2\n\tmov\tx0, 1\n\tb\t.L3\n.L2:\n\tldrsw\tx19, [sp, 44]\n\tldr\tw0, [sp, 44]\n\tsub\tw0, w0, #1\n\tbl\tfactorial\n\tmul\tx0, x19, x0\n.L3:\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tsxtw\tx4, w0\n\tmov\tx1, 0\n\tmov\tx2, x4\n\tmov\tx0, 1\n.L3:\n\tsub\tw3, w2, w1\n\tcmp\tw3, 0\n\tble\t.L4\n\tsub\tx3, x4, x1\n\tadd\tx1, x1, 1\n\tmul\tx0, x0, x3\n\tb\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tble\t.L6\n\tsxtw\tx2, w0\n\tsub\tw3, w0, #1\n\tsub\tx1, x2, #1\n\tmov\tx0, 1\n\tsub\tx3, x1, x3\n\tb\t.L4\n\t.p2align 2,,3\n.L7:\n\tsub\tx1, x1, #1\n.L4:\n\tmul\tx0, x0, x2\n\tcmp\tx1, x3\n\tmov\tx2, x1\n\tbne\t.L7\n\tret\n\t.p2align 2,,3\n.L6:\n\tmov\tx0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "111" ], "var": [ "n" ] }, { "value": [ "57" ], "var": [ "n" ] }, { "value": [ "37" ], "var": [ "n" ] }, { "value": [ "79" ], "var": [ "n" ] }, { "value": [ "72" ], "var": [ "n" ] }, { "value": [ "6" ], "var": [ "n" ] }, { "value": [ "74" ], "var": [ "n" ] }, { "value": [ "76" ], "var": [ "n" ] }, { "value": [ "95" ], "var": [ "n" ] }, { "value": [ "80" ], "var": [ "n" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "6404118670120845312" ], "var": [ "returnv" ] }, { "value": [ "1096907932701818880" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "720" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60fk0pyzoj.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, long int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); long int returnv = factorial(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "factorial", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60fk0pyzoj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Desartes/VUT/1.projekt/proj1.c
int isnum(char *c) { int i = 0; while( *(c + i) != '\0' ) { if ( !(*(c + i) >= 48 && *(c + i) <= 57) ) break; else i++; } if ( *(c + i) == '\0' ) return 1; else return 0; }
int isnum(char *c)
int isnum(char *c)
isnum
[ "int", "char *" ]
{ "code": [ ".globl isnum\n.type isnum, @function\nisnum:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$47, %al\n\tjle\t.L3\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$57, %al\n\tjg\t.L3\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L4\n.L3:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovl\t$1, %eax\n\tjmp\t.L6\n.L5:\n\tmovl\t$0, %eax\n.L6:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl isnum\n.type isnum, @function\nisnum:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n.L2:\n\tmovb\t(%rdi), %al\n\ttestb\t%al, %al\n\tje\t.L7\n\tsubl\t$48, %eax\n\tincq\t%rdi\n\tcmpb\t$9, %al\n\tjbe\t.L2\n\txorl\t%eax, %eax\n\tret\n.L7:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl isnum\n.type isnum, @function\nisnum:\n.LFB41:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L4\n\taddq\t$1, %rdi\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tmovzbl\t(%rdi), %eax\n\taddq\t$1, %rdi\n\ttestb\t%al, %al\n\tje\t.L4\n.L3:\n\tsubl\t$48, %eax\n\tcmpb\t$9, %al\n\tjbe\t.L8\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global isnum\n.type isnum, %function\nisnum:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbls\t.L3\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbhi\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n.L2:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L4\n.L3:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tmov\tw0, 1\n\tb\t.L6\n.L5:\n\tmov\tw0, 0\n.L6:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global isnum\n.type isnum, %function\nisnum:\n.LFB24:\n\t.cfi_startproc\n.L2:\n\tldrb\tw1, [x0]\n\tcbnz\tw1, .L4\n\tmov\tw0, 1\n.L1:\n\tret\n.L4:\n\tsub\tw1, w1, #48\n\tadd\tx0, x0, 1\n\tand\tw1, w1, 255\n\tcmp\tw1, 9\n\tbls\t.L2\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global isnum\n.type isnum, %function\nisnum:\n.LFB41:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L4\n\tadd\tx0, x0, 1\n\tb\t.L3\n\t.p2align 2,,3\n.L8:\n\tldrb\tw1, [x0], 1\n\tcbz\tw1, .L4\n.L3:\n\tsub\tw1, w1, #48\n\tand\tw1, w1, 255\n\tcmp\tw1, 9\n\tbls\t.L8\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <time.h> #include <stdlib.h> #include <limits.h> #include <ctype.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"pqzmjlrel\"" ], "var": [ "c" ] }, { "value": [ "\"psqyoivruj\"" ], "var": [ "c" ] }, { "value": [ "\"hwxxnyztfr\"" ], "var": [ "c" ] }, { "value": [ "\"zdpgtieriuzgfy\"" ], "var": [ "c" ] }, { "value": [ "\"blhylwmtljgagq\"" ], "var": [ "c" ] }, { "value": [ "\"m\"" ], "var": [ "c" ] }, { "value": [ "\"zzglcdwtqvjqodkte\"" ], "var": [ "c" ] }, { "value": [ "\"vdcnkwvrwzbmzamaodzlxxijs\"" ], "var": [ "c" ] }, { "value": [ "\"ipujvszvijxsmbawfhotamziayyawqi\"" ], "var": [ "c" ] }, { "value": [ "\"vfaybzludrrkiiq\"" ], "var": [ "c" ] } ], "output": [ { "value": [ "\"pqzmjlrel\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"psqyoivruj\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"hwxxnyztfr\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"zdpgtieriuzgfy\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"blhylwmtljgagq\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"m\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"zzglcdwtqvjqodkte\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"vdcnkwvrwzbmzamaodzlxxijs\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"ipujvszvijxsmbawfhotamziayyawqi\"", "0" ], "var": [ "c", "returnv" ] }, { "value": [ "\"vfaybzludrrkiiq\"", "0" ], "var": [ "c", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_328rtgu9nb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* c, int returnv) { json output_json; output_json["c"] = c; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* c = strdup(input_json["c"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = isnum(c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, returnv); }
master
null
{"livein": ["c"], "liveout": ["c"], "returnvarname": ["returnv"], "execcmd": "", "funname": "isnum", "funargs": ["c"], "typemap": {"c": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_328rtgu9nb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tykowale/learningC/ProgrammingInC/chapter10/ex4.c
int my_str_cmp (const char s1[], const char s2[]) { int i = 0; int are_equal = 0; while ( s1[i] == s2[i] && s1[i] != '\0' && s2[i] != '\0' ) { ++i; } if ( s1[i] == '\0' && s2[i] == '\0' ) { are_equal = 1; } return are_equal; }
int my_str_cmp(const char *s1, const char *s2)
int my_str_cmp (const char s1[], const char s2[])
my_str_cmp
[ "int", "const char *", "const char *" ]
{ "code": [ ".globl my_str_cmp\n.type my_str_cmp, @function\nmy_str_cmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %edx\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rcx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rcx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %dl\n\tjne\t.L3\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L3\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L4\n.L3:\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovl\t$1, -4(%rbp)\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl my_str_cmp\n.type my_str_cmp, @function\nmy_str_cmp:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L5:\n\tmovb\t(%rdi,%rax), %dl\n\tmovb\t(%rsi,%rax), %cl\n\tcmpb\t%cl, %dl\n\tjne\t.L2\n\ttestb\t%dl, %dl\n\tjne\t.L3\n.L6:\n\txorl\t%eax, %eax\n\ttestb\t%cl, %cl\n\tsete\t%al\n\tret\n.L3:\n\tincq\t%rax\n\tjmp\t.L5\n.L2:\n\ttestb\t%dl, %dl\n\tje\t.L6\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl my_str_cmp\n.type my_str_cmp, @function\nmy_str_cmp:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %edx\n\tmovzbl\t(%rsi), %ecx\n\tmovl\t$1, %eax\n\tcmpb\t%dl, %cl\n\tje\t.L2\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\ttestb\t%cl, %cl\n\tje\t.L15\n\tmovzbl\t(%rdi,%rax), %edx\n\taddq\t$1, %rax\n\tmovzbl\t-1(%rsi,%rax), %ecx\n\tcmpb\t%cl, %dl\n\tjne\t.L3\n.L2:\n\ttestb\t%dl, %dl\n\tjne\t.L16\n.L4:\n\txorl\t%eax, %eax\n\ttestb\t%cl, %cl\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\txorl\t%eax, %eax\n\ttestb\t%dl, %dl\n\tje\t.L4\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global my_str_cmp\n.type my_str_cmp, %function\nmy_str_cmp:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tstr\twzr, [sp, 24]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw1, [x0]\n\tldrsw\tx0, [sp, 24]\n\tldr\tx2, [sp]\n\tadd\tx0, x2, x0\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbne\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L4\n.L3:\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n.L5:\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global my_str_cmp\n.type my_str_cmp, %function\nmy_str_cmp:\n.LFB13:\n\t.cfi_startproc\n\tmov\tx2, 0\n.L5:\n\tldrb\tw3, [x0, x2]\n\tldrb\tw4, [x1, x2]\n\tcmp\tw3, w4\n\tbne\t.L2\n\tcbnz\tw3, .L3\n.L6:\n\tcmp\tw4, 0\n\tcset\tw0, eq\n.L1:\n\tret\n.L3:\n\tadd\tx2, x2, 1\n\tb\t.L5\n.L2:\n\tcbz\tw3, .L6\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global my_str_cmp\n.type my_str_cmp, %function\nmy_str_cmp:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw3, [x0]\n\tsub\tx4, x1, #1\n\tldrb\tw1, [x1]\n\tmov\tx2, 1\n\tcmp\tw1, w3\n\tbne\t.L3\n\t.p2align 3,,7\n.L2:\n\tcbz\tw3, .L4\n\tcbz\tw1, .L14\n\tldrb\tw3, [x0, x2]\n\tadd\tx2, x2, 1\n\tldrb\tw1, [x4, x2]\n\tcmp\tw3, w1\n\tbeq\t.L2\n.L3:\n\tmov\tw0, 0\n\tcbz\tw3, .L4\n\tret\n\t.p2align 2,,3\n.L4:\n\tcmp\tw1, 0\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L14:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"atg\"", "\"eltutkknguyghbylzimmghyleaiesk\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"xlfklntycd\"", "\"vgoqfkmozafwexxwizvoepobxdnvq\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"bg\"", "\"exymguugayaauxitzczqhyg\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"kfntte\"", "\"mqpyiznjlaexfomfyernh\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"ceqmmxnkldohlrpxgvq\"", "\"nahtvhdkwkwvpsf\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"bozngeziqfuegefpplhonbhdd\"", "\"hgsmesopscbggyluhl\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"aiebdiiruntqozhsczxulcvj\"", "\"gebxrmlslaohptbwfzsb\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"wkznlzbfunmtzsfafrygy\"", "\"hzvx\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"rchvlqr\"", "\"ghpsvfrftvxd\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"conmokdbdzqrxqaccwkaanlwy\"", "\"pipzkukxvz\"" ], "var": [ "s1", "s2" ] } ], "output": [ { "value": [ "0", "\"atg\"", "\"eltutkknguyghbylzimmghyleaiesk\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"xlfklntycd\"", "\"vgoqfkmozafwexxwizvoepobxdnvq\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"bg\"", "\"exymguugayaauxitzczqhyg\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"kfntte\"", "\"mqpyiznjlaexfomfyernh\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"ceqmmxnkldohlrpxgvq\"", "\"nahtvhdkwkwvpsf\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"bozngeziqfuegefpplhonbhdd\"", "\"hgsmesopscbggyluhl\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"aiebdiiruntqozhsczxulcvj\"", "\"gebxrmlslaohptbwfzsb\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"wkznlzbfunmtzsfafrygy\"", "\"hzvx\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"rchvlqr\"", "\"ghpsvfrftvxd\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"conmokdbdzqrxqaccwkaanlwy\"", "\"pipzkukxvz\"" ], "var": [ "returnv", "s1", "s2" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_5600ori7sc.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* s1, char* s2, int returnv) { json output_json; output_json["s1"] = s1; output_json["s2"] = s2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* s1 = strdup(input_json["s1"].get<std::string>().c_str()); char* s2 = strdup(input_json["s2"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = my_str_cmp(s1, s2); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(s1, s2, returnv); }
master
null
{"livein": ["s1", "s2"], "liveout": ["s1", "s2"], "returnvarname": ["returnv"], "execcmd": "", "funname": "my_str_cmp", "funargs": ["s1", "s2"], "typemap": {"s1": "string", "s2": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_5600ori7sc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
EmulatorArchive/yabause-rr/src/windows/mini18n/mini18n.c
int mini18n_set_log(const char * filename) { # 172 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EmulatorArchive/yabause-rr/refs/heads/master/src/windows/mini18n/mini18n.c" return 0; }
int mini18n_set_log(const char *filename)
int mini18n_set_log(const char * filename)
mini18n_set_log
[ "int", "const char *" ]
{ "code": [ ".globl mini18n_set_log\n.type mini18n_set_log, @function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl mini18n_set_log\n.type mini18n_set_log, @function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl mini18n_set_log\n.type mini18n_set_log, @function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global mini18n_set_log\n.type mini18n_set_log, %function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global mini18n_set_log\n.type mini18n_set_log, %function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global mini18n_set_log\n.type mini18n_set_log, %function\nmini18n_set_log:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"hjsryzwcwalquucyccnoqnziwaxpk\"" ], "var": [ "filename" ] }, { "value": [ "\"asjcnavh\"" ], "var": [ "filename" ] }, { "value": [ "\"xbthgxjuchvyuahcwtoloyrzyszq\"" ], "var": [ "filename" ] }, { "value": [ "\"ychcog\"" ], "var": [ "filename" ] }, { "value": [ "\"koafqeqzsohplygprzuhszzembsbx\"" ], "var": [ "filename" ] }, { "value": [ "\"xlosqodbevacbvieud\"" ], "var": [ "filename" ] }, { "value": [ "\"nlprjvvlkcgktknuti\"" ], "var": [ "filename" ] }, { "value": [ "\"lepvudiqfhdtzdsyntj\"" ], "var": [ "filename" ] }, { "value": [ "\"oqwtbckcjecuhqr\"" ], "var": [ "filename" ] }, { "value": [ "\"toiyvlxezk\"" ], "var": [ "filename" ] } ], "output": [ { "value": [ "\"hjsryzwcwalquucyccnoqnziwaxpk\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"asjcnavh\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"xbthgxjuchvyuahcwtoloyrzyszq\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"ychcog\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"koafqeqzsohplygprzuhszzembsbx\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"xlosqodbevacbvieud\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"nlprjvvlkcgktknuti\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"lepvudiqfhdtzdsyntj\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"oqwtbckcjecuhqr\"", "0" ], "var": [ "filename", "returnv" ] }, { "value": [ "\"toiyvlxezk\"", "0" ], "var": [ "filename", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32j65da6gq.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* filename, int returnv) { json output_json; output_json["filename"] = filename; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* filename = strdup(input_json["filename"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = mini18n_set_log(filename); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(filename, returnv); }
master
null
{"livein": ["filename"], "liveout": ["filename"], "returnvarname": ["returnv"], "execcmd": "", "funname": "mini18n_set_log", "funargs": ["filename"], "typemap": {"filename": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32j65da6gq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
c19/c_exercises/C_term_project/minibase.c
unsigned int cut( unsigned int length ) { if (length % 2 == 0) return length/2; else return length/2 + 1; }
unsigned int cut(unsigned intlength)
unsigned int cut( unsigned int length )
cut
[ "unsigned int", "unsigned int" ]
{ "code": [ ".globl cut\n.type cut, @function\ncut:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tandl\t$1, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L2\n\tmovl\t-4(%rbp), %eax\n\tshrl\t%eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tshrl\t%eax\n\taddl\t$1, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl cut\n.type cut, @function\ncut:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tandl\t$1, %edi\n\tshrl\t%eax\n\tcmpl\t$1, %edi\n\tsbbl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl cut\n.type cut, @function\ncut:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tandl\t$1, %edi\n\tshrl\t%eax\n\tcmpl\t$1, %edi\n\tsbbl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global cut\n.type cut, %function\ncut:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 1\n\tcmp\tw0, 0\n\tbne\t.L2\n\tldr\tw0, [sp, 12]\n\tlsr\tw0, w0, 1\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n\tlsr\tw0, w0, 1\n\tadd\tw0, w0, 1\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global cut\n.type cut, %function\ncut:\n.LFB24:\n\t.cfi_startproc\n\tand\tw1, w0, 1\n\tadd\tw0, w1, w0, lsr 1\n\tret\n\t.cfi_endproc\n\n", ".global cut\n.type cut, %function\ncut:\n.LFB39:\n\t.cfi_startproc\n\tand\tw1, w0, 1\n\tadd\tw0, w1, w0, lsr 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <time.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "916" ], "var": [ "length" ] }, { "value": [ "259" ], "var": [ "length" ] }, { "value": [ "484" ], "var": [ "length" ] }, { "value": [ "637" ], "var": [ "length" ] }, { "value": [ "672" ], "var": [ "length" ] }, { "value": [ "571" ], "var": [ "length" ] }, { "value": [ "514" ], "var": [ "length" ] }, { "value": [ "82" ], "var": [ "length" ] }, { "value": [ "337" ], "var": [ "length" ] }, { "value": [ "937" ], "var": [ "length" ] } ], "output": [ { "value": [ "458" ], "var": [ "returnv" ] }, { "value": [ "130" ], "var": [ "returnv" ] }, { "value": [ "242" ], "var": [ "returnv" ] }, { "value": [ "319" ], "var": [ "returnv" ] }, { "value": [ "336" ], "var": [ "returnv" ] }, { "value": [ "286" ], "var": [ "returnv" ] }, { "value": [ "257" ], "var": [ "returnv" ] }, { "value": [ "41" ], "var": [ "returnv" ] }, { "value": [ "169" ], "var": [ "returnv" ] }, { "value": [ "469" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_35sxwmlizw.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned int length, unsigned int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int length = input_json["length"]; clock_t begin = clock(); unsigned int returnv = cut(length); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(length, returnv); }
master
null
{"livein": ["length"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "cut", "funargs": ["length"], "typemap": {"length": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35sxwmlizw.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tiaotiao/algorithm/binary_indexed_tree.c
int lowbit(int x) { return x & (-x); }
int lowbit(intx)
int lowbit(int x)
lowbit
[ "int", "int" ]
{ "code": [ ".globl lowbit\n.type lowbit, @function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tnegl\t%eax\n\tandl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl lowbit\n.type lowbit, @function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tnegl\t%eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lowbit\n.type lowbit, @function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tnegl\t%eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global lowbit\n.type lowbit, %function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tneg\tw1, w0\n\tldr\tw0, [sp, 12]\n\tand\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global lowbit\n.type lowbit, %function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw1, w0\n\tand\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n", ".global lowbit\n.type lowbit, %function\nlowbit:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw1, w0\n\tand\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "11" ], "var": [ "x" ] }, { "value": [ "80" ], "var": [ "x" ] }, { "value": [ "37" ], "var": [ "x" ] }, { "value": [ "107" ], "var": [ "x" ] }, { "value": [ "53" ], "var": [ "x" ] }, { "value": [ "36" ], "var": [ "x" ] }, { "value": [ "97" ], "var": [ "x" ] }, { "value": [ "41" ], "var": [ "x" ] }, { "value": [ "74" ], "var": [ "x" ] }, { "value": [ "93" ], "var": [ "x" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_410dt14com.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; clock_t begin = clock(); int returnv = lowbit(x); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, returnv); }
master
null
{"livein": ["x"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "lowbit", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_410dt14com.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
andres-erbsen/baseconvert/opt/shortcuts.c
int magic(int a, int b) { if (a < 2 || b < 2) return 0; int r; while (1) { if (b > a) { r = a; a = b; b = r; } r = a%b; a /= b; if (r) return 0; else if (a == 1) return b; } }
int magic(inta, intb)
int magic(int a, int b)
magic
[ "int", "int", "int" ]
{ "code": [ ".globl magic\n.type magic, @function\nmagic:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tcmpl\t$1, -20(%rbp)\n\tjle\t.L2\n\tcmpl\t$1, -24(%rbp)\n\tjg\t.L3\n.L2:\n\tmovl\t$0, %eax\n\tjmp\t.L4\n.L3:\n\tmovl\t-24(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjle\t.L5\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%eax, -24(%rbp)\n.L5:\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%edx, -4(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%eax, -20(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tje\t.L6\n\tmovl\t$0, %eax\n\tjmp\t.L4\n.L6:\n\tcmpl\t$1, -20(%rbp)\n\tjne\t.L3\n\tmovl\t-24(%rbp), %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl magic\n.type magic, @function\nmagic:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n\tcmpl\t$1, %edi\n\tjle\t.L6\n\tcmpl\t$1, %esi\n\tjle\t.L6\n.L4:\n\tcmpl\t%r8d, %eax\n\tjge\t.L3\n\tmovl\t%eax, %edx\n\tmovl\t%r8d, %eax\n\tmovl\t%edx, %r8d\n.L3:\n\tcltd\n\tidivl\t%r8d\n\ttestl\t%edx, %edx\n\tjne\t.L6\n\tcmpl\t$1, %eax\n\tjne\t.L4\n\tjmp\t.L2\n.L6:\n\txorl\t%r8d, %r8d\n.L2:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl magic\n.type magic, @function\nmagic:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcmpl\t$1, %edi\n\tjle\t.L6\n\tcmpl\t$1, %esi\n\tjg\t.L4\n\tjmp\t.L6\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\tcmpl\t$1, %eax\n\tje\t.L9\n.L4:\n\tcmpl\t%esi, %eax\n\tjge\t.L3\n\tmovl\t%eax, %edx\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %esi\n.L3:\n\tcltd\n\tidivl\t%esi\n\ttestl\t%edx, %edx\n\tje\t.L10\n.L6:\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L9:\n\tmovl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global magic\n.type magic, %function\nmagic:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tble\t.L2\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 1\n\tbgt\t.L3\n.L2:\n\tmov\tw0, 0\n\tb\t.L4\n.L3:\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tble\t.L5\n\tldr\tw0, [sp, 12]\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tstr\tw0, [sp, 8]\n.L5:\n\tldr\tw0, [sp, 12]\n\tldr\tw1, [sp, 8]\n\tsdiv\tw2, w0, w1\n\tldr\tw1, [sp, 8]\n\tmul\tw1, w2, w1\n\tsub\tw0, w0, w1\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tsdiv\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L6\n\tmov\tw0, 0\n\tb\t.L4\n.L6:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbne\t.L3\n\tldr\tw0, [sp, 8]\n.L4:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global magic\n.type magic, %function\nmagic:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw0, w1\n\tcmp\tw2, 1\n\tccmp\tw1, 1, 4, gt\n\tble\t.L6\n.L4:\n\tcmp\tw2, w0\n\tbge\t.L3\n\tmov\tw1, w2\n\tmov\tw2, w0\n\tmov\tw0, w1\n.L3:\n\tsdiv\tw1, w2, w0\n\tmsub\tw3, w1, w0, w2\n\tmov\tw2, w1\n\tcbnz\tw3, .L6\n\tcmp\tw1, 1\n\tbne\t.L4\n.L2:\n\tret\n.L6:\n\tmov\tw0, 0\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global magic\n.type magic, %function\nmagic:\n.LFB39:\n\t.cfi_startproc\n\tcmp\tw0, 1\n\tccmp\tw1, 1, 4, gt\n\tbgt\t.L4\n\tb\t.L6\n\t.p2align 2,,3\n.L10:\n\tbeq\t.L9\n.L4:\n\tcmp\tw0, w1\n\tcsel\tw2, w0, w1, ge\n\tcsel\tw1, w1, w0, ge\n\tsdiv\tw0, w2, w1\n\tmsub\tw2, w0, w1, w2\n\tcmp\tw0, 1\n\tcbz\tw2, .L10\n.L6:\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L9:\n\tmov\tw0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include <limits.h> #include <assert.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "76", "68" ], "var": [ "a", "b" ] }, { "value": [ "119", "72" ], "var": [ "a", "b" ] }, { "value": [ "0", "117" ], "var": [ "a", "b" ] }, { "value": [ "61", "116" ], "var": [ "a", "b" ] }, { "value": [ "88", "11" ], "var": [ "a", "b" ] }, { "value": [ "29", "35" ], "var": [ "a", "b" ] }, { "value": [ "31", "97" ], "var": [ "a", "b" ] }, { "value": [ "68", "22" ], "var": [ "a", "b" ] }, { "value": [ "126", "124" ], "var": [ "a", "b" ] }, { "value": [ "30", "72" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45cw4dgww8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = magic(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "magic", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45cw4dgww8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_642() { return 642; }
int do_642()
int do_642()
do_642
[ "int", "" ]
{ "code": [ ".globl do_642\n.type do_642, @function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$642, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_642\n.type do_642, @function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$642, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_642\n.type do_642, @function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$642, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_642\n.type do_642, %function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 642\n\tret\n\t.cfi_endproc\n\n", ".global do_642\n.type do_642, %function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 642\n\tret\n\t.cfi_endproc\n\n", ".global do_642\n.type do_642, %function\ndo_642:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 642\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] }, { "value": [ "642" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_535ykn0dwi.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = do_642(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "do_642", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_535ykn0dwi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
AmyBSOD/ToME-SX/src/init1.c
int color_char_to_attr(char c) { switch (c) { case 'd': return (0); case 'w': return (1); case 's': return (2); case 'o': return (3); case 'r': return (4); case 'g': return (5); case 'b': return (6); case 'u': return (7); case 'D': return (8); case 'W': return (9); case 'v': return (10); case 'y': return (11); case 'R': return (12); case 'G': return (13); case 'B': return (14); case 'U': return (15); } return ( -1); }
int color_char_to_attr(charc)
int color_char_to_attr(char c)
color_char_to_attr
[ "int", "char" ]
{ "code": [ ".globl color_char_to_attr\n.type color_char_to_attr, @function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovsbl\t-4(%rbp), %eax\n\tsubl\t$66, %eax\n\tcmpl\t$55, %eax\n\tja\t.L2\n\tmovl\t%eax, %eax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L4(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L4(%rip), %rdx\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L19-.L4\n\t.long\t.L2-.L4\n\t.long\t.L18-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L17-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L16-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L15-.L4\n\t.long\t.L2-.L4\n\t.long\t.L14-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L13-.L4\n\t.long\t.L2-.L4\n\t.long\t.L12-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L11-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L10-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L2-.L4\n\t.long\t.L3-.L4\n\t.text\n.L12:\n\tmovl\t$0, %eax\n\tjmp\t.L20\n.L5:\n\tmovl\t$1, %eax\n\tjmp\t.L20\n.L8:\n\tmovl\t$2, %eax\n\tjmp\t.L20\n.L10:\n\tmovl\t$3, %eax\n\tjmp\t.L20\n.L9:\n\tmovl\t$4, %eax\n\tjmp\t.L20\n.L11:\n\tmovl\t$5, %eax\n\tjmp\t.L20\n.L13:\n\tmovl\t$6, %eax\n\tjmp\t.L20\n.L7:\n\tmovl\t$7, %eax\n\tjmp\t.L20\n.L18:\n\tmovl\t$8, %eax\n\tjmp\t.L20\n.L14:\n\tmovl\t$9, %eax\n\tjmp\t.L20\n.L6:\n\tmovl\t$10, %eax\n\tjmp\t.L20\n.L3:\n\tmovl\t$11, %eax\n\tjmp\t.L20\n.L16:\n\tmovl\t$12, %eax\n\tjmp\t.L20\n.L17:\n\tmovl\t$13, %eax\n\tjmp\t.L20\n.L19:\n\tmovl\t$14, %eax\n\tjmp\t.L20\n.L15:\n\tmovl\t$15, %eax\n\tjmp\t.L20\n.L2:\n\tmovl\t$-1, %eax\n.L20:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl color_char_to_attr\n.type color_char_to_attr, @function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$66, %edi\n\torl\t$-1, %eax\n\tcmpb\t$55, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl color_char_to_attr\n.type color_char_to_attr, @function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$66, %edi\n\tmovl\t$-1, %eax\n\tcmpb\t$55, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global color_char_to_attr\n.type color_char_to_attr, %function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 121\n\tbeq\t.L2\n\tcmp\tw0, 121\n\tbgt\t.L3\n\tcmp\tw0, 119\n\tbeq\t.L4\n\tcmp\tw0, 119\n\tbgt\t.L3\n\tcmp\tw0, 118\n\tbeq\t.L5\n\tcmp\tw0, 118\n\tbgt\t.L3\n\tcmp\tw0, 117\n\tbeq\t.L6\n\tcmp\tw0, 117\n\tbgt\t.L3\n\tcmp\tw0, 115\n\tbeq\t.L7\n\tcmp\tw0, 115\n\tbgt\t.L3\n\tcmp\tw0, 114\n\tbeq\t.L8\n\tcmp\tw0, 114\n\tbgt\t.L3\n\tcmp\tw0, 111\n\tbeq\t.L9\n\tcmp\tw0, 111\n\tbgt\t.L3\n\tcmp\tw0, 103\n\tbeq\t.L10\n\tcmp\tw0, 103\n\tbgt\t.L3\n\tcmp\tw0, 100\n\tbeq\t.L11\n\tcmp\tw0, 100\n\tbgt\t.L3\n\tcmp\tw0, 98\n\tbeq\t.L12\n\tcmp\tw0, 98\n\tbgt\t.L3\n\tcmp\tw0, 87\n\tbeq\t.L13\n\tcmp\tw0, 87\n\tbgt\t.L3\n\tcmp\tw0, 85\n\tbeq\t.L14\n\tcmp\tw0, 85\n\tbgt\t.L3\n\tcmp\tw0, 82\n\tbeq\t.L15\n\tcmp\tw0, 82\n\tbgt\t.L3\n\tcmp\tw0, 71\n\tbeq\t.L16\n\tcmp\tw0, 71\n\tbgt\t.L3\n\tcmp\tw0, 66\n\tbeq\t.L17\n\tcmp\tw0, 68\n\tbeq\t.L18\n\tb\t.L3\n.L11:\n\tmov\tw0, 0\n\tb\t.L19\n.L4:\n\tmov\tw0, 1\n\tb\t.L19\n.L7:\n\tmov\tw0, 2\n\tb\t.L19\n.L9:\n\tmov\tw0, 3\n\tb\t.L19\n.L8:\n\tmov\tw0, 4\n\tb\t.L19\n.L10:\n\tmov\tw0, 5\n\tb\t.L19\n.L12:\n\tmov\tw0, 6\n\tb\t.L19\n.L6:\n\tmov\tw0, 7\n\tb\t.L19\n.L18:\n\tmov\tw0, 8\n\tb\t.L19\n.L13:\n\tmov\tw0, 9\n\tb\t.L19\n.L5:\n\tmov\tw0, 10\n\tb\t.L19\n.L2:\n\tmov\tw0, 11\n\tb\t.L19\n.L15:\n\tmov\tw0, 12\n\tb\t.L19\n.L16:\n\tmov\tw0, 13\n\tb\t.L19\n.L17:\n\tmov\tw0, 14\n\tb\t.L19\n.L14:\n\tmov\tw0, 15\n\tb\t.L19\n.L3:\n\tmov\tw0, -1\n.L19:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global color_char_to_attr\n.type color_char_to_attr, %function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #66\n\tand\tw0, w0, 255\n\tcmp\tw0, 55\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, x0]\n.L1:\n\tret\n.L3:\n\tmov\tw0, -1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global color_char_to_attr\n.type color_char_to_attr, %function\ncolor_char_to_attr:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #66\n\tand\tw0, w0, 255\n\tcmp\tw0, 55\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, x0]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "71" ], "var": [ "c" ] }, { "value": [ "101" ], "var": [ "c" ] }, { "value": [ "4" ], "var": [ "c" ] }, { "value": [ "26" ], "var": [ "c" ] }, { "value": [ "77" ], "var": [ "c" ] }, { "value": [ "13" ], "var": [ "c" ] }, { "value": [ "44" ], "var": [ "c" ] }, { "value": [ "99" ], "var": [ "c" ] }, { "value": [ "113" ], "var": [ "c" ] }, { "value": [ "108" ], "var": [ "c" ] } ], "output": [ { "value": [ "13" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45_vzv9n_6.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char c, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char c = input_json["c"].get<char>(); clock_t begin = clock(); int returnv = color_char_to_attr(c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, returnv); }
master
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "color_char_to_attr", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45_vzv9n_6.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
carenelarmat/Conejo/src/cuda/specfem3D_gpu_cuda_method_stubs.c
void fortranflush_(int* rank){}
void fortranflush_(int *rank)
void fortranflush_(int* rank)
fortranflush_
[ "void", "int *" ]
{ "code": [ ".globl fortranflush_\n.type fortranflush_, @function\nfortranflush_:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fortranflush_\n.type fortranflush_, @function\nfortranflush_:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl fortranflush_\n.type fortranflush_, @function\nfortranflush_:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global fortranflush_\n.type fortranflush_, %function\nfortranflush_:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fortranflush_\n.type fortranflush_, %function\nfortranflush_:\n.LFB24:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global fortranflush_\n.type fortranflush_, %function\nfortranflush_:\n.LFB39:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[102, 87, 6, 109, 84, 97, 51, 109, 120, 68, 17, 90, 76, 39, 120, 61, 4, 103, 19, 18, 110, 78, 116, 118, 80, 20, 49, 113, 10, 39, 38, 59]" ], "var": [ "rank" ] }, { "value": [ "[100, 95, 52, 23, 22, 110, 89, 99, 77, 53, 69, 126, 120, 109, 93, 9, 77, 80, 26, 24, 115, 32, 123, 119, 8, 91, 20, 66, 13, 47, 90, 45]" ], "var": [ "rank" ] }, { "value": [ "[17, 63, 43, 45, 19, 101, 81, 40, 60, 60, 50, 71, 40, 103, 14, 60, 97, 78, 79, 43, 55, 110, 27, 86, 118, 1, 100, 105, 113, 36, 117, 21]" ], "var": [ "rank" ] }, { "value": [ "[10, 75, 92, 123, 118, 100, 122, 74, 19, 30, 34, 117, 101, 122, 12, 10, 33, 89, 22, 85, 31, 85, 19, 85, 72, 56, 34, 103, 101, 8, 49, 39]" ], "var": [ "rank" ] }, { "value": [ "[85, 43, 95, 77, 101, 107, 16, 108, 38, 97, 112, 52, 55, 52, 86, 110, 20, 27, 27, 60, 94, 36, 102, 15, 10, 31, 62, 111, 3, 112, 91, 63]" ], "var": [ "rank" ] }, { "value": [ "[20, 115, 112, 82, 106, 10, 21, 98, 97, 96, 101, 13, 38, 10, 101, 2, 31, 50, 40, 91, 34, 45, 36, 29, 124, 15, 53, 97, 17, 1, 107, 1]" ], "var": [ "rank" ] }, { "value": [ "[96, 16, 53, 11, 60, 70, 119, 24, 4, 96, 66, 13, 4, 87, 81, 32, 5, 67, 124, 96, 19, 46, 78, 87, 63, 119, 123, 61, 37, 69, 29, 80]" ], "var": [ "rank" ] }, { "value": [ "[95, 117, 63, 43, 118, 76, 94, 89, 90, 113, 77, 108, 19, 22, 30, 1, 109, 119, 5, 66, 22, 71, 32, 63, 118, 70, 52, 72, 57, 104, 90, 64]" ], "var": [ "rank" ] }, { "value": [ "[15, 112, 15, 122, 1, 4, 64, 76, 82, 11, 98, 5, 20, 98, 114, 37, 46, 16, 22, 96, 123, 105, 57, 80, 41, 4, 59, 71, 86, 66, 22, 12]" ], "var": [ "rank" ] }, { "value": [ "[27, 83, 62, 19, 16, 6, 37, 53, 122, 120, 111, 66, 29, 0, 125, 11, 25, 106, 23, 95, 97, 57, 31, 124, 73, 84, 88, 34, 51, 58, 17, 99]" ], "var": [ "rank" ] } ], "output": [ { "value": [ "[102, 87, 6, 109, 84, 97, 51, 109, 120, 68, 17, 90, 76, 39, 120, 61, 4, 103, 19, 18, 110, 78, 116, 118, 80, 20, 49, 113, 10, 39, 38, 59]" ], "var": [ "rank" ] }, { "value": [ "[100, 95, 52, 23, 22, 110, 89, 99, 77, 53, 69, 126, 120, 109, 93, 9, 77, 80, 26, 24, 115, 32, 123, 119, 8, 91, 20, 66, 13, 47, 90, 45]" ], "var": [ "rank" ] }, { "value": [ "[17, 63, 43, 45, 19, 101, 81, 40, 60, 60, 50, 71, 40, 103, 14, 60, 97, 78, 79, 43, 55, 110, 27, 86, 118, 1, 100, 105, 113, 36, 117, 21]" ], "var": [ "rank" ] }, { "value": [ "[10, 75, 92, 123, 118, 100, 122, 74, 19, 30, 34, 117, 101, 122, 12, 10, 33, 89, 22, 85, 31, 85, 19, 85, 72, 56, 34, 103, 101, 8, 49, 39]" ], "var": [ "rank" ] }, { "value": [ "[85, 43, 95, 77, 101, 107, 16, 108, 38, 97, 112, 52, 55, 52, 86, 110, 20, 27, 27, 60, 94, 36, 102, 15, 10, 31, 62, 111, 3, 112, 91, 63]" ], "var": [ "rank" ] }, { "value": [ "[20, 115, 112, 82, 106, 10, 21, 98, 97, 96, 101, 13, 38, 10, 101, 2, 31, 50, 40, 91, 34, 45, 36, 29, 124, 15, 53, 97, 17, 1, 107, 1]" ], "var": [ "rank" ] }, { "value": [ "[96, 16, 53, 11, 60, 70, 119, 24, 4, 96, 66, 13, 4, 87, 81, 32, 5, 67, 124, 96, 19, 46, 78, 87, 63, 119, 123, 61, 37, 69, 29, 80]" ], "var": [ "rank" ] }, { "value": [ "[95, 117, 63, 43, 118, 76, 94, 89, 90, 113, 77, 108, 19, 22, 30, 1, 109, 119, 5, 66, 22, 71, 32, 63, 118, 70, 52, 72, 57, 104, 90, 64]" ], "var": [ "rank" ] }, { "value": [ "[15, 112, 15, 122, 1, 4, 64, 76, 82, 11, 98, 5, 20, 98, 114, 37, 46, 16, 22, 96, 123, 105, 57, 80, 41, 4, 59, 71, 86, 66, 22, 12]" ], "var": [ "rank" ] }, { "value": [ "[27, 83, 62, 19, 16, 6, 37, 53, 122, 120, 111, 66, 29, 0, 125, 11, 25, 106, 23, 95, 97, 57, 31, 124, 73, 84, 88, 34, 51, 58, 17, 99]" ], "var": [ "rank" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_39fxzwfa3h.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* rank) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = rank[i3]; output_temp_2.push_back(output_temp_4); } output_json["rank"] = output_temp_2; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["rank"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* rank = &input_temp_1_vec[0]; clock_t begin = clock(); fortranflush_(rank); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(rank); }
master
null
{"livein": ["rank"], "liveout": ["rank"], "returnvarname": [], "execcmd": "", "funname": "fortranflush_", "funargs": ["rank"], "typemap": {"rank": "array(int32#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_39fxzwfa3h.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_053() { return 53; }
int do_053()
int do_053()
do_053
[ "int", "" ]
{ "code": [ ".globl do_053\n.type do_053, @function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$53, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_053\n.type do_053, @function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$53, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_053\n.type do_053, @function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$53, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_053\n.type do_053, %function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 53\n\tret\n\t.cfi_endproc\n\n", ".global do_053\n.type do_053, %function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 53\n\tret\n\t.cfi_endproc\n\n", ".global do_053\n.type do_053, %function\ndo_053:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 53\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] }, { "value": [ "53" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53h1mtcn22.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = do_053(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "do_053", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53h1mtcn22.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
juliustch/ProbEmbed/LME/code/GridTable.c
int same_coordinate(int* coor1, int* coor2, int d) { int i; for(i = 0; i < d; i++) if(coor1[i] != coor2[i]) return 0; return 1; }
int same_coordinate(int *coor1, int *coor2, intd)
int same_coordinate(int* coor1, int* coor2, int d)
same_coordinate
[ "int", "int *", "int *", "int" ]
{ "code": [ ".globl same_coordinate\n.type same_coordinate, @function\nsame_coordinate:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t%edx, -36(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovl\t(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rcx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rcx, %rax\n\tmovl\t(%rax), %eax\n\tcmpl\t%eax, %edx\n\tje\t.L3\n\tmovl\t$0, %eax\n\tjmp\t.L4\n.L3:\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-36(%rbp), %eax\n\tjl\t.L5\n\tmovl\t$1, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl same_coordinate\n.type same_coordinate, @function\nsame_coordinate:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tcmpl\t%eax, %edx\n\tjle\t.L7\n\tmovl\t(%rdi,%rax,4), %ecx\n\tincq\t%rax\n\tcmpl\t-4(%rsi,%rax,4), %ecx\n\tje\t.L2\n\txorl\t%eax, %eax\n\tret\n.L7:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl same_coordinate\n.type same_coordinate, @function\nsame_coordinate:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edx, %edx\n\tjle\t.L4\n\tleal\t-1(%rdx), %ecx\n\txorl\t%eax, %eax\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tleaq\t1(%rax), %rdx\n\tcmpq\t%rcx, %rax\n\tje\t.L4\n\tmovq\t%rdx, %rax\n.L3:\n\tmovl\t(%rsi,%rax,4), %edx\n\tcmpl\t%edx, (%rdi,%rax,4)\n\tje\t.L8\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global same_coordinate\n.type same_coordinate, %function\nsame_coordinate:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #48\n\t.cfi_def_cfa_offset 48\n\tstr\tx0, [sp, 24]\n\tstr\tx1, [sp, 16]\n\tstr\tw2, [sp, 12]\n\tstr\twzr, [sp, 44]\n\tb\t.L2\n.L5:\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\tw1, [x0]\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tldr\tx2, [sp, 16]\n\tadd\tx0, x2, x0\n\tldr\tw0, [x0]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tmov\tw0, 0\n\tb\t.L4\n.L3:\n\tldr\tw0, [sp, 44]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw1, [sp, 44]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tblt\t.L5\n\tmov\tw0, 1\n.L4:\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global same_coordinate\n.type same_coordinate, %function\nsame_coordinate:\n.LFB24:\n\t.cfi_startproc\n\tsub\tx1, x1, #4\n\tmov\tx3, 0\n.L2:\n\tcmp\tw2, w3\n\tbgt\t.L4\n\tmov\tw0, 1\n.L1:\n\tret\n.L4:\n\tldr\tw5, [x0, x3, lsl 2]\n\tadd\tx3, x3, 1\n\tldr\tw4, [x1, x3, lsl 2]\n\tcmp\tw5, w4\n\tbeq\t.L2\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global same_coordinate\n.type same_coordinate, %function\nsame_coordinate:\n.LFB39:\n\t.cfi_startproc\n\tcmp\tw2, 0\n\tble\t.L4\n\tmov\tx3, 0\n\tb\t.L3\n\t.p2align 2,,3\n.L8:\n\tcmp\tw2, w3\n\tble\t.L4\n.L3:\n\tldr\tw5, [x0, x3, lsl 2]\n\tldr\tw4, [x1, x3, lsl 2]\n\tadd\tx3, x3, 1\n\tcmp\tw5, w4\n\tbeq\t.L8\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[80, 93, 126, 78, 110, 110, 103, 110, 65, 78, 60, 66, 69, 93, 4, 109, 71, 58, 34, 125, 82, 89, 29, 36, 54, 0, 60, 60, 81, 79, 71, 60]", "[82, 114, 13, 48, 93, 117, 86, 20, 106, 61, 58, 9, 63, 5, 28, 85, 20, 89, 30, 109, 116, 117, 104, 10, 90, 61, 21, 82, 48, 57, 32, 8]", "86" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[42, 44, 58, 76, 51, 95, 25, 52, 96, 114, 112, 38, 116, 53, 97, 69, 7, 29, 111, 114, 121, 36, 15, 66, 32, 16, 40, 88, 91, 67, 83, 79]", "[125, 83, 74, 105, 50, 88, 73, 1, 97, 43, 30, 71, 97, 99, 88, 56, 37, 19, 66, 12, 16, 40, 33, 44, 73, 77, 42, 19, 38, 113, 4, 76]", "47" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[13, 37, 104, 65, 120, 96, 69, 105, 87, 79, 124, 20, 89, 31, 60, 110, 124, 10, 65, 93, 92, 18, 77, 88, 15, 9, 50, 36, 59, 77, 88, 62]", "[2, 9, 85, 92, 37, 40, 59, 112, 123, 105, 105, 88, 87, 57, 10, 21, 108, 98, 34, 8, 116, 66, 105, 22, 45, 26, 104, 58, 30, 38, 37, 97]", "76" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[13, 72, 62, 69, 29, 9, 115, 65, 53, 79, 105, 20, 10, 67, 46, 1, 5, 45, 5, 38, 90, 44, 27, 65, 92, 95, 111, 34, 113, 66, 50, 11]", "[48, 53, 43, 126, 90, 110, 93, 94, 56, 74, 77, 40, 17, 105, 79, 107, 99, 27, 36, 104, 85, 23, 51, 120, 39, 36, 101, 18, 78, 47, 88, 119]", "9" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[64, 112, 29, 38, 106, 4, 21, 66, 46, 25, 97, 22, 46, 73, 67, 63, 52, 47, 79, 66, 15, 72, 73, 54, 2, 88, 76, 45, 71, 9, 29, 4]", "[87, 99, 38, 62, 14, 125, 89, 74, 74, 20, 117, 2, 102, 89, 78, 8, 35, 51, 89, 110, 41, 18, 65, 54, 81, 118, 66, 51, 109, 20, 51, 123]", "106" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[124, 101, 88, 5, 105, 122, 5, 34, 46, 33, 94, 44, 94, 94, 39, 85, 16, 12, 66, 89, 105, 64, 39, 94, 29, 33, 7, 117, 124, 25, 82, 64]", "[56, 93, 114, 88, 43, 63, 86, 54, 6, 77, 99, 55, 1, 98, 28, 102, 18, 43, 34, 47, 72, 65, 53, 10, 11, 72, 13, 108, 34, 105, 94, 97]", "3" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[67, 116, 44, 59, 9, 61, 19, 20, 59, 77, 95, 65, 14, 101, 125, 4, 114, 103, 77, 19, 114, 45, 65, 3, 118, 82, 31, 48, 108, 10, 84, 110]", "[89, 4, 31, 46, 57, 48, 101, 114, 3, 76, 107, 21, 108, 126, 50, 77, 47, 5, 120, 110, 70, 75, 13, 58, 72, 86, 123, 91, 51, 84, 7, 28]", "74" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[70, 89, 19, 49, 67, 89, 115, 118, 98, 107, 109, 87, 69, 120, 71, 61, 72, 91, 72, 3, 3, 44, 125, 66, 67, 72, 71, 12, 122, 13, 17, 41]", "[29, 26, 67, 45, 89, 64, 65, 123, 69, 50, 107, 107, 96, 38, 6, 32, 73, 59, 60, 105, 56, 6, 126, 15, 61, 108, 62, 63, 98, 2, 37, 10]", "6" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[82, 36, 94, 58, 74, 67, 108, 104, 77, 75, 122, 100, 26, 49, 90, 62, 68, 21, 25, 69, 96, 115, 87, 75, 6, 37, 123, 31, 26, 110, 28, 52]", "[59, 89, 92, 102, 7, 7, 123, 20, 68, 102, 67, 16, 10, 98, 109, 60, 56, 22, 76, 71, 36, 22, 101, 104, 66, 99, 87, 94, 57, 0, 10, 0]", "56" ], "var": [ "coor1", "coor2", "d" ] }, { "value": [ "[45, 30, 45, 3, 56, 39, 117, 83, 14, 46, 100, 6, 104, 125, 80, 34, 95, 93, 91, 98, 99, 107, 52, 24, 86, 124, 69, 67, 80, 94, 20, 106]", "[64, 107, 103, 27, 105, 56, 113, 34, 9, 121, 12, 109, 26, 5, 82, 28, 9, 87, 22, 101, 92, 111, 86, 20, 40, 120, 40, 122, 23, 0, 57, 82]", "43" ], "var": [ "coor1", "coor2", "d" ] } ], "output": [ { "value": [ "[80, 93, 126, 78, 110, 110, 103, 110, 65, 78, 60, 66, 69, 93, 4, 109, 71, 58, 34, 125, 82, 89, 29, 36, 54, 0, 60, 60, 81, 79, 71, 60]", "[82, 114, 13, 48, 93, 117, 86, 20, 106, 61, 58, 9, 63, 5, 28, 85, 20, 89, 30, 109, 116, 117, 104, 10, 90, 61, 21, 82, 48, 57, 32, 8]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[42, 44, 58, 76, 51, 95, 25, 52, 96, 114, 112, 38, 116, 53, 97, 69, 7, 29, 111, 114, 121, 36, 15, 66, 32, 16, 40, 88, 91, 67, 83, 79]", "[125, 83, 74, 105, 50, 88, 73, 1, 97, 43, 30, 71, 97, 99, 88, 56, 37, 19, 66, 12, 16, 40, 33, 44, 73, 77, 42, 19, 38, 113, 4, 76]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[13, 37, 104, 65, 120, 96, 69, 105, 87, 79, 124, 20, 89, 31, 60, 110, 124, 10, 65, 93, 92, 18, 77, 88, 15, 9, 50, 36, 59, 77, 88, 62]", "[2, 9, 85, 92, 37, 40, 59, 112, 123, 105, 105, 88, 87, 57, 10, 21, 108, 98, 34, 8, 116, 66, 105, 22, 45, 26, 104, 58, 30, 38, 37, 97]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[13, 72, 62, 69, 29, 9, 115, 65, 53, 79, 105, 20, 10, 67, 46, 1, 5, 45, 5, 38, 90, 44, 27, 65, 92, 95, 111, 34, 113, 66, 50, 11]", "[48, 53, 43, 126, 90, 110, 93, 94, 56, 74, 77, 40, 17, 105, 79, 107, 99, 27, 36, 104, 85, 23, 51, 120, 39, 36, 101, 18, 78, 47, 88, 119]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[64, 112, 29, 38, 106, 4, 21, 66, 46, 25, 97, 22, 46, 73, 67, 63, 52, 47, 79, 66, 15, 72, 73, 54, 2, 88, 76, 45, 71, 9, 29, 4]", "[87, 99, 38, 62, 14, 125, 89, 74, 74, 20, 117, 2, 102, 89, 78, 8, 35, 51, 89, 110, 41, 18, 65, 54, 81, 118, 66, 51, 109, 20, 51, 123]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[124, 101, 88, 5, 105, 122, 5, 34, 46, 33, 94, 44, 94, 94, 39, 85, 16, 12, 66, 89, 105, 64, 39, 94, 29, 33, 7, 117, 124, 25, 82, 64]", "[56, 93, 114, 88, 43, 63, 86, 54, 6, 77, 99, 55, 1, 98, 28, 102, 18, 43, 34, 47, 72, 65, 53, 10, 11, 72, 13, 108, 34, 105, 94, 97]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[67, 116, 44, 59, 9, 61, 19, 20, 59, 77, 95, 65, 14, 101, 125, 4, 114, 103, 77, 19, 114, 45, 65, 3, 118, 82, 31, 48, 108, 10, 84, 110]", "[89, 4, 31, 46, 57, 48, 101, 114, 3, 76, 107, 21, 108, 126, 50, 77, 47, 5, 120, 110, 70, 75, 13, 58, 72, 86, 123, 91, 51, 84, 7, 28]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[70, 89, 19, 49, 67, 89, 115, 118, 98, 107, 109, 87, 69, 120, 71, 61, 72, 91, 72, 3, 3, 44, 125, 66, 67, 72, 71, 12, 122, 13, 17, 41]", "[29, 26, 67, 45, 89, 64, 65, 123, 69, 50, 107, 107, 96, 38, 6, 32, 73, 59, 60, 105, 56, 6, 126, 15, 61, 108, 62, 63, 98, 2, 37, 10]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[82, 36, 94, 58, 74, 67, 108, 104, 77, 75, 122, 100, 26, 49, 90, 62, 68, 21, 25, 69, 96, 115, 87, 75, 6, 37, 123, 31, 26, 110, 28, 52]", "[59, 89, 92, 102, 7, 7, 123, 20, 68, 102, 67, 16, 10, 98, 109, 60, 56, 22, 76, 71, 36, 22, 101, 104, 66, 99, 87, 94, 57, 0, 10, 0]", "0" ], "var": [ "coor1", "coor2", "returnv" ] }, { "value": [ "[45, 30, 45, 3, 56, 39, 117, 83, 14, 46, 100, 6, 104, 125, 80, 34, 95, 93, 91, 98, 99, 107, 52, 24, 86, 124, 69, 67, 80, 94, 20, 106]", "[64, 107, 103, 27, 105, 56, 113, 34, 9, 121, 12, 109, 26, 5, 82, 28, 9, 87, 22, 101, 92, 111, 86, 20, 40, 120, 40, 122, 23, 0, 57, 82]", "0" ], "var": [ "coor1", "coor2", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45k9zug3ig.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* coor1, int* coor2, int d, int returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = coor1[i4]; output_temp_3.push_back(output_temp_5); } output_json["coor1"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = coor2[i7]; output_temp_6.push_back(output_temp_8); } output_json["coor2"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["coor1"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* coor1 = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["coor2"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* coor2 = &input_temp_2_vec[0]; int d = input_json["d"]; clock_t begin = clock(); int returnv = same_coordinate(coor1, coor2, d); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(coor1, coor2, d, returnv); }
master
null
{"livein": ["coor1", "coor2", "d"], "liveout": ["coor1", "coor2"], "returnvarname": ["returnv"], "execcmd": "", "funname": "same_coordinate", "funargs": ["coor1", "coor2", "d"], "typemap": {"coor1": "array(int32#32)", "coor2": "array(int32#32)", "d": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45k9zug3ig.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hajuuk/R7000/src/router/iputils/racoon/oakley.c
int oakley_get_defaultlifetime() { return 28800; }
int oakley_get_defaultlifetime()
int oakley_get_defaultlifetime()
oakley_get_defaultlifetime
[ "int", "" ]
{ "code": [ ".globl oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, @function\noakley_get_defaultlifetime:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$28800, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, @function\noakley_get_defaultlifetime:\n.LFB37:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$28800, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, @function\noakley_get_defaultlifetime:\n.LFB53:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$28800, %eax\n\tret\n\t.cfi_endproc\n\n", ".global oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, %function\noakley_get_defaultlifetime:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 28800\n\tret\n\t.cfi_endproc\n\n", ".global oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, %function\noakley_get_defaultlifetime:\n.LFB37:\n\t.cfi_startproc\n\tmov\tw0, 28800\n\tret\n\t.cfi_endproc\n\n", ".global oakley_get_defaultlifetime\n.type oakley_get_defaultlifetime, %function\noakley_get_defaultlifetime:\n.LFB53:\n\t.cfi_startproc\n\tmov\tw0, 28800\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <sys/types.h> #include <sys/param.h> #include <sys/socket.h> #include <netinet/in.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] }, { "value": [ "28800" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41m_rqklie.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = oakley_get_defaultlifetime(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "oakley_get_defaultlifetime", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41m_rqklie.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
boos/cppcheck/test/synthetic/ub.c
int buffer_overflow() { int x[10]={0}; return x[100]; }
int buffer_overflow()
int buffer_overflow()
buffer_overflow
[ "int", "" ]
{ "code": [ ".globl buffer_overflow\n.type buffer_overflow, @function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$48, %rsp\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovq\t$0, -48(%rbp)\n\tmovq\t$0, -40(%rbp)\n\tmovq\t$0, -32(%rbp)\n\tmovq\t$0, -24(%rbp)\n\tmovq\t$0, -16(%rbp)\n\tmovl\t352(%rbp), %eax\n\tmovq\t-8(%rbp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L3\n\tcall\t__stack_chk_fail@PLT\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl buffer_overflow\n.type buffer_overflow, @function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$56, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 40(%rsp)\n\txorl\t%eax, %eax\n\tmovl\t400(%rsp), %eax\n\tmovq\t40(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L2\n\tcall\t__stack_chk_fail@PLT\n.L2:\n\taddq\t$56, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl buffer_overflow\n.type buffer_overflow, @function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$56, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 40(%rsp)\n\txorl\t%eax, %eax\n\tmovl\t400(%rsp), %eax\n\tmovq\t40(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tjne\t.L5\n\taddq\t$56, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L5:\n\t.cfi_restore_state\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".global buffer_overflow\n.type buffer_overflow, %function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 56]\n\tmov\tx1,0\n\tstp\txzr, xzr, [sp, 16]\n\tstp\txzr, xzr, [sp, 32]\n\tstr\txzr, [sp, 48]\n\tldr\tw0, [sp, 416]\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L3\n\tbl\t__stack_chk_fail\n.L3:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global buffer_overflow\n.type buffer_overflow, %function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tadrp\tx1, :got:__stack_chk_guard\n\tmov\tx29, sp\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [x1]\n\tstr\tx0, [sp, 56]\n\tmov\tx0,0\n\tldr\tw0, [sp, 416]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L2\n\tbl\t__stack_chk_fail\n.L2:\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global buffer_overflow\n.type buffer_overflow, %function\nbuffer_overflow:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tadrp\tx1, :got:__stack_chk_guard\n\tmov\tx29, sp\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tldr\tw0, [sp, 416]\n\tldr\tx2, [x1]\n\tstr\tx2, [sp, 56]\n\tmov\tx2,0\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbne\t.L5\n\tldp\tx29, x30, [sp], 64\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n.L5:\n\t.cfi_restore_state\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37pwt4gyhp.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = buffer_overflow(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
main
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "buffer_overflow", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37pwt4gyhp.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elsys/po-homework/A/03/03/task1.c
int month(int *n) {int month; int flag=0; month=n[2]*10+n[3]; if( (month<12) ||(month>=21 &&month<=32)||(month>=41 && month<=53)) {flag=1;} return flag; }
int month(int *n)
int month(int *n)
month
[ "int", "int *" ]
{ "code": [ ".globl month\n.type month, @function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tmovq\t-24(%rbp), %rax\n\taddq\t$8, %rax\n\tmovl\t(%rax), %edx\n\tmovl\t%edx, %eax\n\tsall\t$2, %eax\n\taddl\t%edx, %eax\n\taddl\t%eax, %eax\n\tmovl\t%eax, %edx\n\tmovq\t-24(%rbp), %rax\n\taddq\t$12, %rax\n\tmovl\t(%rax), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$11, -4(%rbp)\n\tjle\t.L2\n\tcmpl\t$20, -4(%rbp)\n\tjle\t.L3\n\tcmpl\t$32, -4(%rbp)\n\tjle\t.L2\n.L3:\n\tcmpl\t$40, -4(%rbp)\n\tjle\t.L4\n\tcmpl\t$53, -4(%rbp)\n\tjg\t.L4\n.L2:\n\tmovl\t$1, -8(%rbp)\n.L4:\n\tmovl\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl month\n.type month, @function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\timull\t$10, 8(%rdi), %eax\n\taddl\t12(%rdi), %eax\n\tleal\t-21(%rax), %edx\n\tcmpl\t$11, %edx\n\tjbe\t.L3\n\tcmpl\t$11, %eax\n\tjle\t.L3\n\tsubl\t$41, %eax\n\tcmpl\t$12, %eax\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n\tret\n.L3:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl month\n.type month, @function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t8(%rdi), %eax\n\tleal\t(%rax,%rax,4), %edx\n\tmovl\t12(%rdi), %eax\n\tleal\t(%rax,%rdx,2), %eax\n\tleal\t-21(%rax), %edx\n\tcmpl\t$11, %edx\n\tjbe\t.L3\n\tcmpl\t$11, %eax\n\tjle\t.L3\n\tsubl\t$41, %eax\n\tcmpl\t$12, %eax\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global month\n.type month, %function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\twzr, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 8\n\tldr\tw1, [x0]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w1\n\tlsl\tw0, w0, 1\n\tmov\tw1, w0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 12\n\tldr\tw0, [x0]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 11\n\tble\t.L2\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 20\n\tble\t.L3\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 32\n\tble\t.L2\n.L3:\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 40\n\tble\t.L4\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 53\n\tbgt\t.L4\n.L2:\n\tmov\tw0, 1\n\tstr\tw0, [sp, 24]\n.L4:\n\tldr\tw0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global month\n.type month, %function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tldp\tw1, w0, [x0, 8]\n\tmov\tw2, 10\n\tmadd\tw0, w1, w2, w0\n\tsub\tw1, w0, #21\n\tcmp\tw1, 11\n\tccmp\tw0, 11, 4, hi\n\tble\t.L3\n\tsub\tw0, w0, #41\n\tcmp\tw0, 12\n\tcset\tw0, ls\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global month\n.type month, %function\nmonth:\n.LFB0:\n\t.cfi_startproc\n\tldp\tw1, w0, [x0, 8]\n\tadd\tw1, w1, w1, lsl 2\n\tadd\tw0, w0, w1, lsl 1\n\tsub\tw1, w0, #21\n\tcmp\tw1, 11\n\tccmp\tw0, 11, 4, hi\n\tble\t.L3\n\tsub\tw0, w0, #41\n\tcmp\tw0, 12\n\tcset\tw0, ls\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[115, 9, 121, 11, 106, 95, 64, 109, 101, 9, 18, 107, 123, 4, 81, 20, 32, 113, 26, 43, 5, 7, 52, 126, 63, 49, 104, 94, 28, 36, 92, 86]" ], "var": [ "n" ] }, { "value": [ "[80, 79, 41, 26, 30, 101, 86, 20, 61, 89, 119, 80, 81, 62, 103, 107, 82, 10, 8, 33, 40, 103, 104, 95, 26, 56, 9, 34, 2, 33, 66, 80]" ], "var": [ "n" ] }, { "value": [ "[92, 122, 8, 38, 29, 8, 74, 86, 109, 74, 101, 117, 22, 121, 102, 61, 47, 16, 69, 81, 5, 37, 61, 44, 28, 75, 41, 55, 58, 33, 79, 23]" ], "var": [ "n" ] }, { "value": [ "[62, 46, 38, 70, 25, 60, 72, 75, 59, 0, 16, 81, 3, 84, 21, 117, 115, 27, 14, 24, 87, 125, 30, 15, 123, 12, 35, 91, 35, 109, 73, 123]" ], "var": [ "n" ] }, { "value": [ "[106, 110, 108, 7, 81, 54, 76, 26, 62, 47, 83, 72, 12, 106, 47, 108, 26, 116, 57, 28, 120, 49, 104, 111, 68, 8, 8, 37, 122, 117, 23, 59]" ], "var": [ "n" ] }, { "value": [ "[1, 43, 11, 32, 117, 67, 107, 121, 75, 85, 40, 31, 123, 96, 89, 56, 3, 7, 47, 87, 80, 19, 31, 42, 89, 3, 116, 121, 45, 37, 21, 43]" ], "var": [ "n" ] }, { "value": [ "[66, 73, 67, 4, 38, 69, 16, 121, 56, 57, 5, 69, 14, 126, 83, 81, 93, 89, 120, 52, 99, 57, 17, 112, 105, 6, 60, 117, 85, 82, 20, 57]" ], "var": [ "n" ] }, { "value": [ "[27, 63, 116, 78, 94, 75, 104, 88, 109, 63, 102, 123, 117, 45, 41, 114, 53, 5, 79, 83, 12, 22, 118, 1, 90, 38, 13, 125, 16, 41, 2, 58]" ], "var": [ "n" ] }, { "value": [ "[70, 34, 30, 93, 93, 72, 116, 8, 37, 10, 79, 11, 24, 80, 92, 78, 6, 121, 107, 23, 74, 0, 65, 86, 46, 68, 7, 37, 38, 50, 66, 15]" ], "var": [ "n" ] }, { "value": [ "[107, 112, 35, 100, 16, 14, 88, 7, 72, 16, 14, 45, 102, 28, 94, 100, 34, 85, 102, 71, 124, 56, 72, 93, 110, 54, 31, 33, 15, 23, 89, 47]" ], "var": [ "n" ] } ], "output": [ { "value": [ "[115, 9, 121, 11, 106, 95, 64, 109, 101, 9, 18, 107, 123, 4, 81, 20, 32, 113, 26, 43, 5, 7, 52, 126, 63, 49, 104, 94, 28, 36, 92, 86]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[80, 79, 41, 26, 30, 101, 86, 20, 61, 89, 119, 80, 81, 62, 103, 107, 82, 10, 8, 33, 40, 103, 104, 95, 26, 56, 9, 34, 2, 33, 66, 80]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[92, 122, 8, 38, 29, 8, 74, 86, 109, 74, 101, 117, 22, 121, 102, 61, 47, 16, 69, 81, 5, 37, 61, 44, 28, 75, 41, 55, 58, 33, 79, 23]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[62, 46, 38, 70, 25, 60, 72, 75, 59, 0, 16, 81, 3, 84, 21, 117, 115, 27, 14, 24, 87, 125, 30, 15, 123, 12, 35, 91, 35, 109, 73, 123]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[106, 110, 108, 7, 81, 54, 76, 26, 62, 47, 83, 72, 12, 106, 47, 108, 26, 116, 57, 28, 120, 49, 104, 111, 68, 8, 8, 37, 122, 117, 23, 59]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[1, 43, 11, 32, 117, 67, 107, 121, 75, 85, 40, 31, 123, 96, 89, 56, 3, 7, 47, 87, 80, 19, 31, 42, 89, 3, 116, 121, 45, 37, 21, 43]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[66, 73, 67, 4, 38, 69, 16, 121, 56, 57, 5, 69, 14, 126, 83, 81, 93, 89, 120, 52, 99, 57, 17, 112, 105, 6, 60, 117, 85, 82, 20, 57]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[27, 63, 116, 78, 94, 75, 104, 88, 109, 63, 102, 123, 117, 45, 41, 114, 53, 5, 79, 83, 12, 22, 118, 1, 90, 38, 13, 125, 16, 41, 2, 58]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[70, 34, 30, 93, 93, 72, 116, 8, 37, 10, 79, 11, 24, 80, 92, 78, 6, 121, 107, 23, 74, 0, 65, 86, 46, 68, 7, 37, 38, 50, 66, 15]", "0" ], "var": [ "n", "returnv" ] }, { "value": [ "[107, 112, 35, 100, 16, 14, 88, 7, 72, 16, 14, 45, 102, 28, 94, 100, 34, 85, 102, 71, 124, 56, 72, 93, 110, 54, 31, 33, 15, 23, 89, 47]", "0" ], "var": [ "n", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_433nr95nko.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* n, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = n[i3]; output_temp_2.push_back(output_temp_4); } output_json["n"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["n"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* n = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = month(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": ["n"], "returnvarname": ["returnv"], "execcmd": "", "funname": "month", "funargs": ["n"], "typemap": {"n": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_433nr95nko.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
trealla-lang/trealla/src/utf8.c
int readc_utf8(int fd, int *res) { unsigned int n = 0; int expect = 1; while (expect--) { unsigned char ch; int len; if ((len = read(fd, &ch, 1)) == 0) { *res = EOF; return 1; } if (len == -1) return 0; if ((ch & 0b11111100) == 0b11111100) { n = ch & 0b00000001; expect = 5; } else if ((ch & 0b11111000) == 0b11111000) { n = ch & 0b00000011; expect = 4; } else if ((ch & 0b11110000) == 0b11110000) { n = ch & 0b00000111; expect = 3; } else if ((ch & 0b11100000) == 0b11100000) { n = ch & 0b00001111; expect = 2; } else if ((ch & 0b11000000) == 0b11000000) { n = ch & 0b00011111; expect = 1; } else if ((ch & 0b10000000) == 0b10000000) { n <<= 6; n |= ch & 0b00111111; } else { n = ch; } } *res = (int)n; return 1; }
int readc_utf8(intfd, int *res)
int readc_utf8(int fd, int *res)
readc_utf8
[ "int", "int", "int *" ]
{ "code": [ ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$48, %rsp\n\tmovl\t%edi, -36(%rbp)\n\tmovq\t%rsi, -48(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovl\t$0, -20(%rbp)\n\tmovl\t$1, -16(%rbp)\n\tjmp\t.L2\n.L14:\n\tleaq\t-21(%rbp), %rcx\n\tmovl\t-36(%rbp), %eax\n\tmovl\t$1, %edx\n\tmovq\t%rcx, %rsi\n\tmovl\t%eax, %edi\n\tcall\tread@PLT\n\tmovl\t%eax, -12(%rbp)\n\tcmpl\t$0, -12(%rbp)\n\tjne\t.L3\n\tmovl\tEOF(%rip), %edx\n\tmovq\t-48(%rbp), %rax\n\tmovl\t%edx, (%rax)\n\tmovl\t$1, %eax\n\tjmp\t.L13\n.L3:\n\tcmpl\t$-1, -12(%rbp)\n\tjne\t.L5\n\tmovl\t$0, %eax\n\tjmp\t.L13\n.L5:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$252, %eax\n\tcmpl\t$252, %eax\n\tjne\t.L6\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$1, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$5, -16(%rbp)\n\tjmp\t.L2\n.L6:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$248, %eax\n\tcmpl\t$248, %eax\n\tjne\t.L8\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$3, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$4, -16(%rbp)\n\tjmp\t.L2\n.L8:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$240, %eax\n\tcmpl\t$240, %eax\n\tjne\t.L9\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$7, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$3, -16(%rbp)\n\tjmp\t.L2\n.L9:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$224, %eax\n\tcmpl\t$224, %eax\n\tjne\t.L10\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$15, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$2, -16(%rbp)\n\tjmp\t.L2\n.L10:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$192, %eax\n\tcmpl\t$192, %eax\n\tjne\t.L11\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$31, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$1, -16(%rbp)\n\tjmp\t.L2\n.L11:\n\tmovzbl\t-21(%rbp), %eax\n\ttestb\t%al, %al\n\tjns\t.L12\n\tsall\t$6, -20(%rbp)\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$63, %eax\n\torl\t%eax, -20(%rbp)\n\tjmp\t.L2\n.L12:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tmovl\t%eax, -20(%rbp)\n.L2:\n\tmovl\t-16(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t%edx, -16(%rbp)\n\ttestl\t%eax, %eax\n\tjne\t.L14\n\tmovl\t-20(%rbp), %edx\n\tmovq\t-48(%rbp), %rax\n\tmovl\t%edx, (%rax)\n\tmovl\t$1, %eax\n.L13:\n\tmovq\t-8(%rbp), %rcx\n\txorq\t%fs:40, %rcx\n\tje\t.L15\n\tcall\t__stack_chk_fail@PLT\n.L15:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$48, %rsp\n\tmovl\t%edi, -36(%rbp)\n\tmovq\t%rsi, -48(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovl\t$0, -20(%rbp)\n\tmovl\t$1, -16(%rbp)\n\tjmp\t.L2\n.L14:\n\tleaq\t-21(%rbp), %rcx\n\tmovl\t-36(%rbp), %eax\n\tmovl\t$1, %edx\n\tmovq\t%rcx, %rsi\n\tmovl\t%eax, %edi\n\tcall\tread@PLT\n\tmovl\t%eax, -12(%rbp)\n\tcmpl\t$0, -12(%rbp)\n\tjne\t.L3\n\tmovq\t-48(%rbp), %rax\n\tmovl\t$-1, (%rax)\n\tmovl\t$1, %eax\n\tjmp\t.L13\n.L3:\n\tcmpl\t$-1, -12(%rbp)\n\tjne\t.L5\n\tmovl\t$0, %eax\n\tjmp\t.L13\n.L5:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$252, %eax\n\tcmpl\t$252, %eax\n\tjne\t.L6\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$1, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$5, -16(%rbp)\n\tjmp\t.L2\n.L6:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$248, %eax\n\tcmpl\t$248, %eax\n\tjne\t.L8\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$3, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$4, -16(%rbp)\n\tjmp\t.L2\n.L8:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$240, %eax\n\tcmpl\t$240, %eax\n\tjne\t.L9\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$7, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$3, -16(%rbp)\n\tjmp\t.L2\n.L9:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$224, %eax\n\tcmpl\t$224, %eax\n\tjne\t.L10\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$15, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$2, -16(%rbp)\n\tjmp\t.L2\n.L10:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$192, %eax\n\tcmpl\t$192, %eax\n\tjne\t.L11\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$31, %eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t$1, -16(%rbp)\n\tjmp\t.L2\n.L11:\n\tmovzbl\t-21(%rbp), %eax\n\ttestb\t%al, %al\n\tjns\t.L12\n\tsall\t$6, -20(%rbp)\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tandl\t$63, %eax\n\torl\t%eax, -20(%rbp)\n\tjmp\t.L2\n.L12:\n\tmovzbl\t-21(%rbp), %eax\n\tmovzbl\t%al, %eax\n\tmovl\t%eax, -20(%rbp)\n.L2:\n\tmovl\t-16(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t%edx, -16(%rbp)\n\ttestl\t%eax, %eax\n\tjne\t.L14\n\tmovl\t-20(%rbp), %edx\n\tmovq\t-48(%rbp), %rax\n\tmovl\t%edx, (%rax)\n\tmovl\t$1, %eax\n.L13:\n\tmovq\t-8(%rbp), %rcx\n\txorq\t%fs:40, %rcx\n\tje\t.L15\n\tcall\t__stack_chk_fail@PLT\n.L15:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 14, -16\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 13, -24\n\tmovl\t%edi, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 12, -32\n\tmovq\t%rsi, %r12\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 6, -40\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 3, -48\n\txorl\t%ebx, %ebx\n\tsubq\t$16, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t7(%rsp), %r14\n\tmovl\t$1, %eax\n.L2:\n\tleal\t-1(%rax), %ebp\n\ttestl\t%eax, %eax\n\tje\t.L19\n\tmovl\t$1, %edx\n\tmovq\t%r14, %rsi\n\tmovl\t%r13d, %edi\n\tcall\tread@PLT\n\ttestl\t%eax, %eax\n\tjne\t.L3\n\tmovl\tEOF(%rip), %eax\n\tmovl\t%eax, (%r12)\n\tjmp\t.L17\n.L3:\n\tincl\t%eax\n\tje\t.L15\n\tmovb\t7(%rsp), %al\n\tmovl\t%eax, %edx\n\tandl\t$-4, %edx\n\tcmpb\t$-4, %dl\n\tjne\t.L5\n\tmovl\t%eax, %ebx\n\tmovl\t$5, %ebp\n\tandl\t$1, %ebx\n\tjmp\t.L6\n.L5:\n\tmovl\t%eax, %edx\n\tandl\t$-8, %edx\n\tcmpb\t$-8, %dl\n\tjne\t.L7\n\tmovl\t%eax, %ebx\n\tmovl\t$4, %ebp\n\tandl\t$3, %ebx\n\tjmp\t.L6\n.L7:\n\tmovl\t%eax, %edx\n\tandl\t$-16, %edx\n\tcmpb\t$-16, %dl\n\tjne\t.L8\n\tmovl\t%eax, %ebx\n\tmovl\t$3, %ebp\n\tandl\t$7, %ebx\n\tjmp\t.L6\n.L8:\n\tmovl\t%eax, %edx\n\tandl\t$-32, %edx\n\tcmpb\t$-32, %dl\n\tjne\t.L9\n\tmovl\t%eax, %ebx\n\tmovl\t$2, %ebp\n\tandl\t$15, %ebx\n\tjmp\t.L6\n.L9:\n\tmovl\t%eax, %edx\n\tandl\t$-64, %edx\n\tcmpb\t$-64, %dl\n\tjne\t.L10\n\tmovl\t%eax, %ebx\n\tmovl\t$1, %ebp\n\tandl\t$31, %ebx\n\tjmp\t.L6\n.L10:\n\ttestb\t%al, %al\n\tjns\t.L11\n\tsall\t$6, %ebx\n\tandl\t$63, %eax\n\torl\t%eax, %ebx\n\tjmp\t.L6\n.L11:\n\tmovzbl\t%al, %ebx\n.L6:\n\tmovl\t%ebp, %eax\n\tjmp\t.L2\n.L15:\n\txorl\t%eax, %eax\n\tjmp\t.L1\n.L19:\n\tmovl\t%ebx, (%r12)\n.L17:\n\tmovl\t$1, %eax\n.L1:\n\tmovq\t8(%rsp), %rcx\n\txorq\t%fs:40, %rcx\n\tje\t.L14\n\tcall\t__stack_chk_fail@PLT\n.L14:\n\taddq\t$16, %rsp\n\t.cfi_def_cfa_offset 48\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 40\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 32\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 24\n\tpopq\t%r13\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r14\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 14, -16\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 13, -24\n\tmovl\t%edi, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 12, -32\n\tmovq\t%rsi, %r12\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 6, -40\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 3, -48\n\txorl\t%ebx, %ebx\n\tsubq\t$16, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t7(%rsp), %r14\n\tmovl\t$1, %eax\n.L2:\n\tleal\t-1(%rax), %ebp\n\ttestl\t%eax, %eax\n\tje\t.L19\n\tmovl\t$1, %edx\n\tmovq\t%r14, %rsi\n\tmovl\t%r13d, %edi\n\tcall\tread@PLT\n\ttestl\t%eax, %eax\n\tjne\t.L3\n\tmovl\t$-1, (%r12)\n\tjmp\t.L17\n.L3:\n\tincl\t%eax\n\tje\t.L15\n\tmovb\t7(%rsp), %al\n\tmovl\t%eax, %edx\n\tandl\t$-4, %edx\n\tcmpb\t$-4, %dl\n\tjne\t.L5\n\tmovl\t%eax, %ebx\n\tmovl\t$5, %ebp\n\tandl\t$1, %ebx\n\tjmp\t.L6\n.L5:\n\tmovl\t%eax, %edx\n\tandl\t$-8, %edx\n\tcmpb\t$-8, %dl\n\tjne\t.L7\n\tmovl\t%eax, %ebx\n\tmovl\t$4, %ebp\n\tandl\t$3, %ebx\n\tjmp\t.L6\n.L7:\n\tmovl\t%eax, %edx\n\tandl\t$-16, %edx\n\tcmpb\t$-16, %dl\n\tjne\t.L8\n\tmovl\t%eax, %ebx\n\tmovl\t$3, %ebp\n\tandl\t$7, %ebx\n\tjmp\t.L6\n.L8:\n\tmovl\t%eax, %edx\n\tandl\t$-32, %edx\n\tcmpb\t$-32, %dl\n\tjne\t.L9\n\tmovl\t%eax, %ebx\n\tmovl\t$2, %ebp\n\tandl\t$15, %ebx\n\tjmp\t.L6\n.L9:\n\tmovl\t%eax, %edx\n\tandl\t$-64, %edx\n\tcmpb\t$-64, %dl\n\tjne\t.L10\n\tmovl\t%eax, %ebx\n\tmovl\t$1, %ebp\n\tandl\t$31, %ebx\n\tjmp\t.L6\n.L10:\n\ttestb\t%al, %al\n\tjns\t.L11\n\tsall\t$6, %ebx\n\tandl\t$63, %eax\n\torl\t%eax, %ebx\n\tjmp\t.L6\n.L11:\n\tmovzbl\t%al, %ebx\n.L6:\n\tmovl\t%ebp, %eax\n\tjmp\t.L2\n.L15:\n\txorl\t%eax, %eax\n\tjmp\t.L1\n.L19:\n\tmovl\t%ebx, (%r12)\n.L17:\n\tmovl\t$1, %eax\n.L1:\n\tmovq\t8(%rsp), %rcx\n\txorq\t%fs:40, %rcx\n\tje\t.L14\n\tcall\t__stack_chk_fail@PLT\n.L14:\n\taddq\t$16, %rsp\n\t.cfi_def_cfa_offset 48\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 40\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 32\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 24\n\tpopq\t%r13\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r14\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 14, -16\n\tmovq\t%rsi, %r14\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 13, -24\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 12, -32\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 6, -40\n\txorl\t%ebp, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 3, -48\n\tmovl\t%edi, %ebx\n\tsubq\t$16, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t7(%rsp), %r13\n.L2:\n\tmovl\t%eax, %r12d\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\tmovl\t$1, %edx\n\tmovq\t%r13, %rsi\n\tmovl\t%ebx, %edi\n\tcall\tread@PLT\n\ttestl\t%eax, %eax\n\tje\t.L22\n\tcmpl\t$-1, %eax\n\tje\t.L17\n\tmovzbl\t7(%rsp), %eax\n\tmovl\t%eax, %edx\n\tandl\t$-4, %edx\n\tcmpb\t$-4, %dl\n\tje\t.L23\n\tmovl\t%eax, %edx\n\tandl\t$-8, %edx\n\tcmpb\t$-8, %dl\n\tje\t.L24\n\tmovl\t%eax, %edx\n\tandl\t$-16, %edx\n\tcmpb\t$-16, %dl\n\tje\t.L25\n\tmovl\t%eax, %edx\n\tandl\t$-32, %edx\n\tcmpb\t$-32, %dl\n\tje\t.L26\n\tmovl\t%eax, %edx\n\tandl\t$-64, %edx\n\tcmpb\t$-64, %dl\n\tje\t.L27\n\ttestb\t%al, %al\n\tjs\t.L28\n\tmovzbl\t%al, %ebp\n.L12:\n\tleal\t-1(%r12), %eax\n\ttestl\t%r12d, %r12d\n\tjne\t.L2\n\tmovl\t%ebp, (%r14)\n\tmovl\t$1, %eax\n.L1:\n\tmovq\t8(%rsp), %rcx\n\txorq\t%fs:40, %rcx\n\tjne\t.L29\n\taddq\t$16, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 48\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 40\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 32\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 24\n\tpopq\t%r13\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r14\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L23:\n\t.cfi_restore_state\n\tmovl\t%eax, %ebp\n\tmovl\t$4, %r12d\n\tandl\t$1, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L24:\n\tmovl\t%eax, %ebp\n\tmovl\t$3, %r12d\n\tandl\t$3, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L25:\n\tmovl\t%eax, %ebp\n\tmovl\t$2, %r12d\n\tandl\t$7, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L26:\n\tmovl\t%eax, %ebp\n\tmovl\t$1, %r12d\n\tandl\t$15, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L27:\n\tmovl\t%eax, %ebp\n\txorl\t%r12d, %r12d\n\tandl\t$31, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L28:\n\tsall\t$6, %ebp\n\tandl\t$63, %eax\n\torl\t%eax, %ebp\n\tjmp\t.L12\n\t.p2align 4,,10\n\t.p2align 3\n.L22:\n\tmovl\tEOF(%rip), %eax\n\tmovl\t%eax, (%r14)\n\tmovl\t$1, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L17:\n\txorl\t%eax, %eax\n\tjmp\t.L1\n.L29:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".globl readc_utf8\n.type readc_utf8, @function\nreadc_utf8:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r14\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 14, -16\n\tmovq\t%rsi, %r14\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 13, -24\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 12, -32\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 6, -40\n\txorl\t%ebp, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 3, -48\n\tmovl\t%edi, %ebx\n\tsubq\t$16, %rsp\n\t.cfi_def_cfa_offset 64\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t7(%rsp), %r13\n.L2:\n\tmovl\t%eax, %r12d\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\tmovl\t$1, %edx\n\tmovq\t%r13, %rsi\n\tmovl\t%ebx, %edi\n\tcall\tread@PLT\n\ttestl\t%eax, %eax\n\tje\t.L22\n\tcmpl\t$-1, %eax\n\tje\t.L17\n\tmovzbl\t7(%rsp), %eax\n\tmovl\t%eax, %edx\n\tandl\t$-4, %edx\n\tcmpb\t$-4, %dl\n\tje\t.L23\n\tmovl\t%eax, %edx\n\tandl\t$-8, %edx\n\tcmpb\t$-8, %dl\n\tje\t.L24\n\tmovl\t%eax, %edx\n\tandl\t$-16, %edx\n\tcmpb\t$-16, %dl\n\tje\t.L25\n\tmovl\t%eax, %edx\n\tandl\t$-32, %edx\n\tcmpb\t$-32, %dl\n\tje\t.L26\n\tmovl\t%eax, %edx\n\tandl\t$-64, %edx\n\tcmpb\t$-64, %dl\n\tje\t.L27\n\ttestb\t%al, %al\n\tjs\t.L28\n\tmovzbl\t%al, %ebp\n.L12:\n\tleal\t-1(%r12), %eax\n\ttestl\t%r12d, %r12d\n\tjne\t.L2\n\tmovl\t%ebp, (%r14)\n\tmovl\t$1, %eax\n.L1:\n\tmovq\t8(%rsp), %rcx\n\txorq\t%fs:40, %rcx\n\tjne\t.L29\n\taddq\t$16, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 48\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 40\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 32\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 24\n\tpopq\t%r13\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r14\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L23:\n\t.cfi_restore_state\n\tmovl\t%eax, %ebp\n\tmovl\t$4, %r12d\n\tandl\t$1, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L24:\n\tmovl\t%eax, %ebp\n\tmovl\t$3, %r12d\n\tandl\t$3, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L25:\n\tmovl\t%eax, %ebp\n\tmovl\t$2, %r12d\n\tandl\t$7, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L26:\n\tmovl\t%eax, %ebp\n\tmovl\t$1, %r12d\n\tandl\t$15, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L27:\n\tmovl\t%eax, %ebp\n\txorl\t%r12d, %r12d\n\tandl\t$31, %ebp\n\tjmp\t.L15\n\t.p2align 4,,10\n\t.p2align 3\n.L28:\n\tsall\t$6, %ebp\n\tandl\t$63, %eax\n\torl\t%eax, %ebp\n\tjmp\t.L12\n\t.p2align 4,,10\n\t.p2align 3\n.L22:\n\tmovl\t$-1, (%r14)\n\tmovl\t$1, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L17:\n\txorl\t%eax, %eax\n\tjmp\t.L1\n.L29:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tstr\tx1, [sp, 16]\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 56]\n\tmov\tx1,0\n\tstr\twzr, [sp, 44]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L14:\n\tadd\tx0, sp, 43\n\tmov\tw2, 1\n\tmov\tx1, x0\n\tldr\tw0, [sp, 28]\n\tbl\tread\n\tstr\tw0, [sp, 52]\n\tldr\tw0, [sp, 52]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tadrp\tx0, :got:EOF\n\tldr\tx0, [x0, #:got_lo12:EOF]\n\tldr\tw1, [x0]\n\tldr\tx0, [sp, 16]\n\tstr\tw1, [x0]\n\tmov\tw0, 1\n\tb\t.L13\n.L3:\n\tldr\tw0, [sp, 52]\n\tcmn\tw0, #1\n\tbne\t.L5\n\tmov\tw0, 0\n\tb\t.L13\n.L5:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 252\n\tcmp\tw0, 252\n\tbne\t.L6\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 5\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L6:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 248\n\tcmp\tw0, 248\n\tbne\t.L8\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 3\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 4\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L8:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 240\n\tcmp\tw0, 240\n\tbne\t.L9\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 7\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 3\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L9:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 224\n\tcmp\tw0, 224\n\tbne\t.L10\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 15\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L10:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 192\n\tcmp\tw0, 192\n\tbne\t.L11\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 31\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L11:\n\tldrb\tw0, [sp, 43]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tbge\t.L12\n\tldr\tw0, [sp, 44]\n\tlsl\tw0, w0, 6\n\tstr\tw0, [sp, 44]\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 63\n\tldr\tw1, [sp, 44]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 44]\n\tb\t.L2\n.L12:\n\tldrb\tw0, [sp, 43]\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw0, [sp, 48]\n\tsub\tw1, w0, #1\n\tstr\tw1, [sp, 48]\n\tcmp\tw0, 0\n\tbne\t.L14\n\tldr\tw1, [sp, 44]\n\tldr\tx0, [sp, 16]\n\tstr\tw1, [x0]\n\tmov\tw0, 1\n.L13:\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L15\n\tbl\t__stack_chk_fail\n.L15:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tstr\tx1, [sp, 16]\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 56]\n\tmov\tx1,0\n\tstr\twzr, [sp, 44]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L14:\n\tadd\tx0, sp, 43\n\tmov\tx2, 1\n\tmov\tx1, x0\n\tldr\tw0, [sp, 28]\n\tbl\tread\n\tstr\tw0, [sp, 52]\n\tldr\tw0, [sp, 52]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tx0, [sp, 16]\n\tmov\tw1, -1\n\tstr\tw1, [x0]\n\tmov\tw0, 1\n\tb\t.L13\n.L3:\n\tldr\tw0, [sp, 52]\n\tcmn\tw0, #1\n\tbne\t.L5\n\tmov\tw0, 0\n\tb\t.L13\n.L5:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 252\n\tcmp\tw0, 252\n\tbne\t.L6\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 5\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L6:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 248\n\tcmp\tw0, 248\n\tbne\t.L8\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 3\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 4\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L8:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 240\n\tcmp\tw0, 240\n\tbne\t.L9\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 7\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 3\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L9:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 224\n\tcmp\tw0, 224\n\tbne\t.L10\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 15\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L10:\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 192\n\tcmp\tw0, 192\n\tbne\t.L11\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 31\n\tstr\tw0, [sp, 44]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 48]\n\tb\t.L2\n.L11:\n\tldrb\tw0, [sp, 43]\n\tsxtb\tw0, w0\n\tcmp\tw0, 0\n\tbge\t.L12\n\tldr\tw0, [sp, 44]\n\tlsl\tw0, w0, 6\n\tstr\tw0, [sp, 44]\n\tldrb\tw0, [sp, 43]\n\tand\tw0, w0, 63\n\tldr\tw1, [sp, 44]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 44]\n\tb\t.L2\n.L12:\n\tldrb\tw0, [sp, 43]\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw0, [sp, 48]\n\tsub\tw1, w0, #1\n\tstr\tw1, [sp, 48]\n\tcmp\tw0, 0\n\tbne\t.L14\n\tldr\tw1, [sp, 44]\n\tldr\tx0, [sp, 16]\n\tstr\tw1, [x0]\n\tmov\tw0, 1\n.L13:\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L15\n\tbl\t__stack_chk_fail\n.L15:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -80]!\n\t.cfi_def_cfa_offset 80\n\t.cfi_offset 29, -80\n\t.cfi_offset 30, -72\n\tadrp\tx2, :got:__stack_chk_guard\n\tmov\tw3, 1\n\tmov\tx29, sp\n\tstp\tx23, x24, [sp, 48]\n\t.cfi_offset 23, -32\n\t.cfi_offset 24, -24\n\tmov\tw23, w0\n\tadd\tx24, sp, 71\n\tldr\tx0, [x2, #:got_lo12:__stack_chk_guard]\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -64\n\t.cfi_offset 20, -56\n\tmov\tx20, x2\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -48\n\t.cfi_offset 22, -40\n\tmov\tx22, x1\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 72]\n\tmov\tx1,0\n\tmov\tw19, 0\n.L2:\n\tsub\tw21, w3, #1\n\tcbnz\tw3, .L13\n\tstr\tw19, [x22]\n\tb\t.L17\n.L13:\n\tmov\tx1, x24\n\tmov\tw0, w23\n\tmov\tw2, 1\n\tbl\tread\n\tcbnz\tw0, .L3\n\tadrp\tx0, :got:EOF\n\tldr\tx0, [x0, #:got_lo12:EOF]\n\tldr\tw0, [x0]\n\tstr\tw0, [x22]\n.L17:\n\tmov\tw0, 1\n\tb\t.L1\n.L3:\n\tcmn\tw0, #1\n\tbeq\t.L15\n\tldrb\tw2, [sp, 71]\n\tand\tw0, w2, 252\n\tcmp\tw0, 252\n\tbne\t.L5\n\tand\tw19, w2, 1\n\tmov\tw21, 5\n.L6:\n\tmov\tw3, w21\n\tb\t.L2\n.L5:\n\tand\tw0, w2, 248\n\tcmp\tw0, 248\n\tbne\t.L7\n\tand\tw19, w2, 3\n\tmov\tw21, 4\n\tb\t.L6\n.L7:\n\tand\tw0, w2, 240\n\tcmp\tw0, 240\n\tbne\t.L8\n\tand\tw19, w2, 7\n\tmov\tw21, 3\n\tb\t.L6\n.L8:\n\tand\tw0, w2, 224\n\tcmp\tw0, 224\n\tbne\t.L9\n\tand\tw19, w2, 15\n\tmov\tw21, 2\n\tb\t.L6\n.L9:\n\tand\tw0, w2, 192\n\tcmp\tw0, 192\n\tbne\t.L10\n\tand\tw19, w2, 31\n\tmov\tw21, 1\n\tb\t.L6\n.L10:\n\tand\tw0, w2, 63\n\ttst\tx2, 128\n\torr\tw19, w0, w19, lsl 6\n\tcsel\tw19, w19, w2, ne\n\tb\t.L6\n.L15:\n\tmov\tw0, 0\n.L1:\n\tldr\tx2, [x20, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 72]\n\tldr\tx3, [x2]\n\tsubs\tx1, x1, x3\n\tmov\tx3, 0\n\tbeq\t.L14\n\tbl\t__stack_chk_fail\n.L14:\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx23, x24, [sp, 48]\n\tldp\tx29, x30, [sp], 80\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 23\n\t.cfi_restore 24\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB35:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -80]!\n\t.cfi_def_cfa_offset 80\n\t.cfi_offset 29, -80\n\t.cfi_offset 30, -72\n\tadrp\tx2, :got:__stack_chk_guard\n\tmov\tw3, 1\n\tmov\tx29, sp\n\tstp\tx23, x24, [sp, 48]\n\t.cfi_offset 23, -32\n\t.cfi_offset 24, -24\n\tmov\tw23, w0\n\tadd\tx24, sp, 71\n\tldr\tx0, [x2, #:got_lo12:__stack_chk_guard]\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -64\n\t.cfi_offset 20, -56\n\tmov\tx20, x2\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -48\n\t.cfi_offset 22, -40\n\tmov\tx22, x1\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 72]\n\tmov\tx1,0\n\tmov\tw19, 0\n.L2:\n\tsub\tw21, w3, #1\n\tcbnz\tw3, .L13\n\tstr\tw19, [x22]\n\tb\t.L17\n.L13:\n\tmov\tx1, x24\n\tmov\tw0, w23\n\tmov\tx2, 1\n\tbl\tread\n\tcbnz\tw0, .L3\n\tmov\tw0, -1\n\tstr\tw0, [x22]\n.L17:\n\tmov\tw0, 1\n\tb\t.L1\n.L3:\n\tcmn\tw0, #1\n\tbeq\t.L15\n\tldrb\tw2, [sp, 71]\n\tand\tw0, w2, 252\n\tcmp\tw0, 252\n\tbne\t.L5\n\tand\tw19, w2, 1\n\tmov\tw21, 5\n.L6:\n\tmov\tw3, w21\n\tb\t.L2\n.L5:\n\tand\tw0, w2, 248\n\tcmp\tw0, 248\n\tbne\t.L7\n\tand\tw19, w2, 3\n\tmov\tw21, 4\n\tb\t.L6\n.L7:\n\tand\tw0, w2, 240\n\tcmp\tw0, 240\n\tbne\t.L8\n\tand\tw19, w2, 7\n\tmov\tw21, 3\n\tb\t.L6\n.L8:\n\tand\tw0, w2, 224\n\tcmp\tw0, 224\n\tbne\t.L9\n\tand\tw19, w2, 15\n\tmov\tw21, 2\n\tb\t.L6\n.L9:\n\tand\tw0, w2, 192\n\tcmp\tw0, 192\n\tbne\t.L10\n\tand\tw19, w2, 31\n\tmov\tw21, 1\n\tb\t.L6\n.L10:\n\tand\tw0, w2, 63\n\ttst\tx2, 128\n\torr\tw19, w0, w19, lsl 6\n\tcsel\tw19, w19, w2, ne\n\tb\t.L6\n.L15:\n\tmov\tw0, 0\n.L1:\n\tldr\tx2, [x20, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 72]\n\tldr\tx3, [x2]\n\tsubs\tx1, x1, x3\n\tmov\tx3, 0\n\tbeq\t.L14\n\tbl\t__stack_chk_fail\n.L14:\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx23, x24, [sp, 48]\n\tldp\tx29, x30, [sp], 80\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 23\n\t.cfi_restore 24\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -80]!\n\t.cfi_def_cfa_offset 80\n\t.cfi_offset 29, -80\n\t.cfi_offset 30, -72\n\tmov\tx29, sp\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -48\n\t.cfi_offset 22, -40\n\tadrp\tx22, :got:__stack_chk_guard\n\tldr\tx2, [x22, #:got_lo12:__stack_chk_guard]\n\tstp\tx23, x24, [sp, 48]\n\t.cfi_offset 23, -32\n\t.cfi_offset 24, -24\n\tmov\tx23, x1\n\tadd\tx24, sp, 71\n\tldr\tx1, [x2]\n\tstr\tx1, [sp, 72]\n\tmov\tx1,0\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -64\n\t.cfi_offset 20, -56\n\tmov\tw20, w0\n\tmov\tw19, 0\n\tmov\tw0, 0\n.L2:\n\tmov\tw21, w0\n.L15:\n\tmov\tx1, x24\n\tmov\tw0, w20\n\tmov\tw2, 1\n\tbl\tread\n\tcbz\tw0, .L22\n.L3:\n\tcmn\tw0, #1\n\tbeq\t.L17\n\tldrb\tw2, [sp, 71]\n\tand\tw3, w2, 252\n\tcmp\tw3, 252\n\tbeq\t.L23\n\tand\tw0, w2, 248\n\tcmp\tw0, 248\n\tbeq\t.L24\n\tand\tw0, w2, 240\n\tcmp\tw0, 240\n\tbeq\t.L25\n\tand\tw0, w2, 224\n\tcmp\tw0, 224\n\tbeq\t.L26\n\tand\tw0, w2, 192\n\tcmp\tw0, 192\n\tbeq\t.L27\n\tmov\tw0, w2\n\ttst\tx2, 128\n\tbfi\tw0, w19, 6, 26\n\tcsel\tw19, w0, w2, ne\n\tsub\tw0, w21, #1\n\tcbnz\tw21, .L2\n\tmov\tw0, 1\n\tstr\tw19, [x23]\n.L1:\n\tldr\tx22, [x22, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 72]\n\tldr\tx2, [x22]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L28\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx23, x24, [sp, 48]\n\tldp\tx29, x30, [sp], 80\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 23\n\t.cfi_restore 24\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.p2align 2,,3\n.L23:\n\t.cfi_restore_state\n\tand\tw19, w2, 1\n\tmov\tx1, x24\n\tmov\tw0, w20\n\tmov\tw21, 4\n\tmov\tw2, 1\n\tbl\tread\n\tcbnz\tw0, .L3\n.L22:\n\tadrp\tx1, :got:EOF\n\tmov\tw0, 1\n\tldr\tx1, [x1, #:got_lo12:EOF]\n\tldr\tw1, [x1]\n\tstr\tw1, [x23]\n\tb\t.L1\n\t.p2align 2,,3\n.L24:\n\tand\tw19, w2, 3\n\tmov\tw21, 3\n\tb\t.L15\n\t.p2align 2,,3\n.L25:\n\tand\tw19, w2, 7\n\tmov\tw21, 2\n\tb\t.L15\n\t.p2align 2,,3\n.L26:\n\tand\tw19, w2, 15\n\tmov\tw21, 1\n\tb\t.L15\n\t.p2align 2,,3\n.L27:\n\tand\tw19, w2, 31\n\tmov\tw21, 0\n\tb\t.L15\n\t.p2align 2,,3\n.L17:\n\tmov\tw0, 0\n\tb\t.L1\n.L28:\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n", ".global readc_utf8\n.type readc_utf8, %function\nreadc_utf8:\n.LFB52:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -80]!\n\t.cfi_def_cfa_offset 80\n\t.cfi_offset 29, -80\n\t.cfi_offset 30, -72\n\tmov\tx29, sp\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -48\n\t.cfi_offset 22, -40\n\tadrp\tx22, :got:__stack_chk_guard\n\tldr\tx2, [x22, #:got_lo12:__stack_chk_guard]\n\tstp\tx23, x24, [sp, 48]\n\t.cfi_offset 23, -32\n\t.cfi_offset 24, -24\n\tmov\tx23, x1\n\tadd\tx24, sp, 71\n\tldr\tx1, [x2]\n\tstr\tx1, [sp, 72]\n\tmov\tx1,0\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -64\n\t.cfi_offset 20, -56\n\tmov\tw20, w0\n\tmov\tw19, 0\n\tmov\tw0, 0\n.L2:\n\tmov\tw21, w0\n.L15:\n\tmov\tx1, x24\n\tmov\tw0, w20\n\tmov\tx2, 1\n\tbl\tread\n\tcbz\tw0, .L22\n.L3:\n\tcmn\tw0, #1\n\tbeq\t.L17\n\tldrb\tw2, [sp, 71]\n\tand\tw3, w2, 252\n\tcmp\tw3, 252\n\tbeq\t.L23\n\tand\tw0, w2, 248\n\tcmp\tw0, 248\n\tbeq\t.L24\n\tand\tw0, w2, 240\n\tcmp\tw0, 240\n\tbeq\t.L25\n\tand\tw0, w2, 224\n\tcmp\tw0, 224\n\tbeq\t.L26\n\tand\tw0, w2, 192\n\tcmp\tw0, 192\n\tbeq\t.L27\n\tmov\tw0, w2\n\ttst\tx2, 128\n\tbfi\tw0, w19, 6, 26\n\tcsel\tw19, w0, w2, ne\n\tsub\tw0, w21, #1\n\tcbnz\tw21, .L2\n\tmov\tw0, 1\n\tstr\tw19, [x23]\n.L1:\n\tldr\tx22, [x22, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 72]\n\tldr\tx2, [x22]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L28\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx23, x24, [sp, 48]\n\tldp\tx29, x30, [sp], 80\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 23\n\t.cfi_restore 24\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.p2align 2,,3\n.L23:\n\t.cfi_restore_state\n\tand\tw19, w2, 1\n\tmov\tx1, x24\n\tmov\tw0, w20\n\tmov\tw21, 4\n\tmov\tx2, 1\n\tbl\tread\n\tcbnz\tw0, .L3\n.L22:\n\tmov\tw1, -1\n\tmov\tw0, 1\n\tstr\tw1, [x23]\n\tb\t.L1\n\t.p2align 2,,3\n.L24:\n\tand\tw19, w2, 3\n\tmov\tw21, 3\n\tb\t.L15\n\t.p2align 2,,3\n.L25:\n\tand\tw19, w2, 7\n\tmov\tw21, 2\n\tb\t.L15\n\t.p2align 2,,3\n.L26:\n\tand\tw19, w2, 15\n\tmov\tw21, 1\n\tb\t.L15\n\t.p2align 2,,3\n.L27:\n\tand\tw19, w2, 31\n\tmov\tw21, 0\n\tb\t.L15\n\t.p2align 2,,3\n.L17:\n\tmov\tw0, 0\n\tb\t.L1\n.L28:\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */ int EOF ; int read (int,unsigned char*,int) ;
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "26", "[52, 17, 93, 99, 106, 18, 48, 18, 24, 70, 77, 108, 17, 7, 108, 63, 125, 52, 9, 72, 100, 119, 25, 84, 119, 71, 92, 48, 18, 102, 116, 126]" ], "var": [ "fd", "res" ] }, { "value": [ "68", "[38, 78, 10, 95, 63, 18, 71, 13, 113, 5, 76, 121, 108, 68, 58, 94, 89, 4, 1, 63, 59, 45, 43, 105, 87, 56, 118, 95, 76, 108, 78, 117]" ], "var": [ "fd", "res" ] }, { "value": [ "43", "[82, 109, 70, 36, 85, 17, 58, 98, 112, 53, 38, 125, 93, 122, 116, 40, 61, 60, 79, 34, 4, 42, 15, 74, 48, 77, 43, 33, 4, 16, 84, 23]" ], "var": [ "fd", "res" ] }, { "value": [ "22", "[31, 31, 67, 42, 40, 45, 100, 78, 50, 51, 59, 100, 93, 16, 78, 32, 35, 82, 83, 119, 86, 1, 88, 15, 124, 37, 107, 59, 14, 122, 31, 75]" ], "var": [ "fd", "res" ] }, { "value": [ "95", "[98, 53, 46, 38, 54, 44, 89, 82, 18, 23, 8, 0, 58, 48, 3, 110, 63, 23, 57, 60, 74, 95, 103, 15, 98, 84, 86, 119, 67, 13, 45, 49]" ], "var": [ "fd", "res" ] }, { "value": [ "17", "[67, 20, 84, 118, 63, 96, 44, 14, 75, 77, 107, 120, 121, 32, 108, 87, 67, 111, 52, 51, 48, 3, 56, 68, 36, 1, 13, 98, 13, 17, 43, 126]" ], "var": [ "fd", "res" ] }, { "value": [ "80", "[67, 122, 66, 87, 72, 108, 80, 125, 36, 66, 91, 126, 71, 124, 70, 16, 32, 9, 5, 36, 38, 26, 89, 64, 90, 76, 121, 27, 96, 116, 58, 17]" ], "var": [ "fd", "res" ] }, { "value": [ "88", "[96, 3, 10, 32, 61, 41, 60, 10, 91, 78, 7, 9, 77, 10, 0, 110, 89, 25, 63, 126, 103, 57, 10, 50, 0, 69, 80, 34, 73, 124, 35, 99]" ], "var": [ "fd", "res" ] }, { "value": [ "96", "[112, 78, 21, 8, 36, 29, 112, 80, 59, 4, 75, 39, 90, 21, 31, 118, 83, 97, 46, 24, 67, 14, 123, 83, 24, 114, 106, 83, 30, 24, 98, 38]" ], "var": [ "fd", "res" ] }, { "value": [ "111", "[13, 27, 121, 90, 111, 95, 66, 56, 126, 79, 126, 68, 6, 111, 12, 60, 100, 14, 1, 28, 47, 54, 104, 26, 5, 71, 21, 22, 125, 120, 101, 120]" ], "var": [ "fd", "res" ] } ], "output": [ { "value": [ "-1", "[52, 17, 93, 99, 106, 18, 48, 18, 24, 70, 77, 108, 17, 7, 108, 63, 125, 52, 9, 72, 100, 119, 25, 84, 119, 71, 92, 48, 18, 102, 116, 126]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[38, 78, 10, 95, 63, 18, 71, 13, 113, 5, 76, 121, 108, 68, 58, 94, 89, 4, 1, 63, 59, 45, 43, 105, 87, 56, 118, 95, 76, 108, 78, 117]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[82, 109, 70, 36, 85, 17, 58, 98, 112, 53, 38, 125, 93, 122, 116, 40, 61, 60, 79, 34, 4, 42, 15, 74, 48, 77, 43, 33, 4, 16, 84, 23]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[31, 31, 67, 42, 40, 45, 100, 78, 50, 51, 59, 100, 93, 16, 78, 32, 35, 82, 83, 119, 86, 1, 88, 15, 124, 37, 107, 59, 14, 122, 31, 75]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[98, 53, 46, 38, 54, 44, 89, 82, 18, 23, 8, 0, 58, 48, 3, 110, 63, 23, 57, 60, 74, 95, 103, 15, 98, 84, 86, 119, 67, 13, 45, 49]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[67, 20, 84, 118, 63, 96, 44, 14, 75, 77, 107, 120, 121, 32, 108, 87, 67, 111, 52, 51, 48, 3, 56, 68, 36, 1, 13, 98, 13, 17, 43, 126]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[67, 122, 66, 87, 72, 108, 80, 125, 36, 66, 91, 126, 71, 124, 70, 16, 32, 9, 5, 36, 38, 26, 89, 64, 90, 76, 121, 27, 96, 116, 58, 17]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[96, 3, 10, 32, 61, 41, 60, 10, 91, 78, 7, 9, 77, 10, 0, 110, 89, 25, 63, 126, 103, 57, 10, 50, 0, 69, 80, 34, 73, 124, 35, 99]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[112, 78, 21, 8, 36, 29, 112, 80, 59, 4, 75, 39, 90, 21, 31, 118, 83, 97, 46, 24, 67, 14, 123, 83, 24, 114, 106, 83, 30, 24, 98, 38]", "0" ], "var": [ "EOF", "res", "returnv" ] }, { "value": [ "-1", "[13, 27, 121, 90, 111, 95, 66, 56, 126, 79, 126, 68, 6, 111, 12, 60, 100, 14, 1, 28, 47, 54, 104, 26, 5, 71, 21, 22, 125, 120, 101, 120]", "0" ], "var": [ "EOF", "res", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_63x97dmpot.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int fd, int* res, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = res[i3]; output_temp_2.push_back(output_temp_4); } output_json["res"] = output_temp_2; output_json["EOF"] = EOF; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int fd = input_json["fd"]; std::vector<int> input_temp_1_vec; for (auto& elem : input_json["res"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* res = &input_temp_1_vec[0]; int EOF; clock_t begin = clock(); int returnv = readc_utf8(fd, res); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(fd, res, returnv); }
master
null
{"livein": ["fd", "res"], "liveout": ["res", "EOF"], "returnvarname": ["returnv"], "execcmd": "", "funname": "readc_utf8", "funargs": ["fd", "res"], "typemap": {"fd": "int32", "res": "array(int32#32)", "returnv": "int32", "EOF": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63x97dmpot.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": ["EOF"]}
hellobbn/C-X_NEW/CProgDesign/2797_new.c
int maximum(int a, int b) { if (a < b) { return b; } else { return a; } }
int maximum(inta, intb)
int maximum(int a, int b)
maximum
[ "int", "int", "int" ]
{ "code": [ ".globl maximum\n.type maximum, @function\nmaximum:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjge\t.L2\n\tmovl\t-8(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl maximum\n.type maximum, @function\nmaximum:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl maximum\n.type maximum, @function\nmaximum:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global maximum\n.type maximum, %function\nmaximum:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tldr\tw0, [sp, 8]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global maximum\n.type maximum, %function\nmaximum:\n.LFB35:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n", ".global maximum\n.type maximum, %function\nmaximum:\n.LFB50:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "94", "55" ], "var": [ "a", "b" ] }, { "value": [ "79", "52" ], "var": [ "a", "b" ] }, { "value": [ "82", "30" ], "var": [ "a", "b" ] }, { "value": [ "36", "108" ], "var": [ "a", "b" ] }, { "value": [ "60", "53" ], "var": [ "a", "b" ] }, { "value": [ "40", "101" ], "var": [ "a", "b" ] }, { "value": [ "78", "121" ], "var": [ "a", "b" ] }, { "value": [ "6", "74" ], "var": [ "a", "b" ] }, { "value": [ "91", "44" ], "var": [ "a", "b" ] }, { "value": [ "14", "10" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "94" ], "var": [ "returnv" ] }, { "value": [ "79" ], "var": [ "returnv" ] }, { "value": [ "82" ], "var": [ "returnv" ] }, { "value": [ "108" ], "var": [ "returnv" ] }, { "value": [ "60" ], "var": [ "returnv" ] }, { "value": [ "101" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "91" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32v6gun9ax.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = maximum(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "maximum", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32v6gun9ax.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nolink/algorithm/training/007arithmetic_seq.c
int v2(int n){ return n*(n+1)/2; }
int v2(intn)
int v2(int n)
v2
[ "int", "int" ]
{ "code": [ ".globl v2\n.type v2, @function\nv2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\taddl\t$1, %eax\n\timull\t-4(%rbp), %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl v2\n.type v2, @function\nv2:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tmovl\t$2, %ecx\n\timull\t%edi, %eax\n\tcltd\n\tidivl\t%ecx\n\tret\n\t.cfi_endproc\n\n", ".globl v2\n.type v2, @function\nv2:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\timull\t%eax, %edi\n\tmovl\t%edi, %eax\n\tshrl\t$31, %eax\n\taddl\t%edi, %eax\n\tsarl\t%eax\n\tret\n\t.cfi_endproc\n\n", ".global v2\n.type v2, %function\nv2:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tadd\tw1, w0, 1\n\tldr\tw0, [sp, 12]\n\tmul\tw0, w1, w0\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global v2\n.type v2, %function\nv2:\n.LFB13:\n\t.cfi_startproc\n\tmadd\tw0, w0, w0, w0\n\tmov\tw1, 2\n\tsdiv\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global v2\n.type v2, %function\nv2:\n.LFB23:\n\t.cfi_startproc\n\tmadd\tw0, w0, w0, w0\n\tadd\tw0, w0, w0, lsr 31\n\tasr\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "96" ], "var": [ "n" ] }, { "value": [ "92" ], "var": [ "n" ] }, { "value": [ "84" ], "var": [ "n" ] }, { "value": [ "30" ], "var": [ "n" ] }, { "value": [ "15" ], "var": [ "n" ] }, { "value": [ "43" ], "var": [ "n" ] }, { "value": [ "42" ], "var": [ "n" ] }, { "value": [ "115" ], "var": [ "n" ] }, { "value": [ "97" ], "var": [ "n" ] }, { "value": [ "36" ], "var": [ "n" ] } ], "output": [ { "value": [ "4656" ], "var": [ "returnv" ] }, { "value": [ "4278" ], "var": [ "returnv" ] }, { "value": [ "3570" ], "var": [ "returnv" ] }, { "value": [ "465" ], "var": [ "returnv" ] }, { "value": [ "120" ], "var": [ "returnv" ] }, { "value": [ "946" ], "var": [ "returnv" ] }, { "value": [ "903" ], "var": [ "returnv" ] }, { "value": [ "6670" ], "var": [ "returnv" ] }, { "value": [ "4753" ], "var": [ "returnv" ] }, { "value": [ "666" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_6184xyz1q8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = v2(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "v2", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_6184xyz1q8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
execunix/vinos/games/robots/move_robs.c
int sign(int n) { if (n < 0) return -1; else if (n > 0) return 1; else return 0; }
int sign(intn)
int sign(int n)
sign
[ "int", "int" ]
{ "code": [ ".globl sign\n.type sign, @function\nsign:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjns\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$0, -4(%rbp)\n\tjle\t.L4\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L4:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sign\n.type sign, @function\nsign:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\ttestl\t%edi, %edi\n\tjs\t.L1\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl sign\n.type sign, @function\nsign:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestl\t%edi, %edi\n\tmovl\t$-1, %edx\n\tsetne\t%al\n\tcmovs\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global sign\n.type sign, %function\nsign:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbge\t.L2\n\tmov\tw0, -1\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tble\t.L4\n\tmov\tw0, 1\n\tb\t.L3\n.L4:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sign\n.type sign, %function\nsign:\n.LFB30:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcset\tw1, ne\n\tcsinv\tw0, w1, wzr, ge\n\tret\n\t.cfi_endproc\n\n", ".global sign\n.type sign, %function\nsign:\n.LFB30:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tmov\tw2, -1\n\tcset\tw1, ne\n\tcsel\tw0, w1, w2, ge\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <sys/cdefs.h> #include <curses.h> #include <signal.h> #include <unistd.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "22" ], "var": [ "n" ] }, { "value": [ "126" ], "var": [ "n" ] }, { "value": [ "0" ], "var": [ "n" ] }, { "value": [ "47" ], "var": [ "n" ] }, { "value": [ "109" ], "var": [ "n" ] }, { "value": [ "118" ], "var": [ "n" ] }, { "value": [ "23" ], "var": [ "n" ] }, { "value": [ "6" ], "var": [ "n" ] }, { "value": [ "76" ], "var": [ "n" ] }, { "value": [ "49" ], "var": [ "n" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37qkx26aqo.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = sign(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sign", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37qkx26aqo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
8l/AutoCorres/c-parser/testfiles/shortcircuit.c
int imm_deref(int *p) { if (p && *p > 4) return 4; else return 0; }
int imm_deref(int *p)
int imm_deref(int *p)
imm_deref
[ "int", "int *" ]
{ "code": [ ".globl imm_deref\n.type imm_deref, @function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tcmpq\t$0, -8(%rbp)\n\tje\t.L2\n\tmovq\t-8(%rbp), %rax\n\tmovl\t(%rax), %eax\n\tcmpl\t$4, %eax\n\tjle\t.L2\n\tmovl\t$4, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl imm_deref\n.type imm_deref, @function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$5, (%rdi)\n\tsetge\t%al\n\tsall\t$2, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl imm_deref\n.type imm_deref, @function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rdi, %rdi\n\tje\t.L3\n\txorl\t%eax, %eax\n\tcmpl\t$4, (%rdi)\n\tsetg\t%al\n\tsall\t$2, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global imm_deref\n.type imm_deref, %function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 0\n\tbeq\t.L2\n\tldr\tx0, [sp, 8]\n\tldr\tw0, [x0]\n\tcmp\tw0, 4\n\tble\t.L2\n\tmov\tw0, 4\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global imm_deref\n.type imm_deref, %function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tx0, .L3\n\tldr\tw0, [x0]\n\tcmp\tw0, 4\n\tcset\tw0, gt\n\tlsl\tw0, w0, 2\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global imm_deref\n.type imm_deref, %function\nimm_deref:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tx0, .L3\n\tldr\tw0, [x0]\n\tcmp\tw0, 4\n\tcset\tw0, gt\n\tlsl\tw0, w0, 2\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[73, 79, 68, 23, 5, 97, 111, 38, 52, 49, 66, 88, 38, 53, 67, 107, 14, 110, 46, 22, 54, 76, 42, 102, 126, 27, 114, 99, 3, 89, 15, 101]" ], "var": [ "p" ] }, { "value": [ "[69, 121, 68, 35, 64, 22, 118, 88, 78, 104, 35, 60, 46, 21, 19, 72, 27, 73, 23, 57, 73, 43, 80, 121, 97, 70, 23, 6, 3, 7, 101, 102]" ], "var": [ "p" ] }, { "value": [ "[3, 26, 55, 41, 91, 78, 45, 24, 5, 93, 99, 95, 19, 34, 85, 50, 122, 95, 76, 29, 75, 24, 66, 71, 97, 114, 102, 76, 14, 54, 44, 116]" ], "var": [ "p" ] }, { "value": [ "[93, 59, 57, 74, 20, 90, 72, 84, 89, 38, 5, 12, 67, 46, 66, 97, 13, 87, 92, 123, 76, 26, 86, 15, 107, 38, 60, 43, 86, 39, 3, 90]" ], "var": [ "p" ] }, { "value": [ "[103, 60, 58, 93, 92, 28, 112, 109, 109, 69, 110, 118, 17, 18, 21, 107, 61, 98, 83, 87, 25, 96, 85, 115, 35, 39, 123, 76, 56, 55, 47, 40]" ], "var": [ "p" ] }, { "value": [ "[102, 94, 41, 108, 109, 77, 110, 94, 77, 56, 1, 94, 105, 102, 107, 87, 8, 38, 39, 9, 116, 59, 50, 79, 40, 54, 17, 17, 86, 95, 73, 89]" ], "var": [ "p" ] }, { "value": [ "[2, 1, 115, 103, 30, 95, 39, 46, 121, 125, 0, 100, 97, 28, 24, 18, 10, 53, 45, 13, 123, 59, 28, 70, 84, 21, 71, 56, 116, 100, 45, 26]" ], "var": [ "p" ] }, { "value": [ "[118, 110, 54, 48, 56, 67, 73, 41, 19, 102, 104, 41, 90, 21, 53, 61, 125, 78, 56, 38, 11, 82, 105, 91, 78, 83, 115, 36, 0, 46, 18, 122]" ], "var": [ "p" ] }, { "value": [ "[69, 34, 86, 1, 68, 101, 74, 64, 7, 37, 66, 53, 37, 87, 11, 3, 42, 31, 27, 117, 9, 76, 0, 100, 21, 39, 124, 115, 115, 25, 110, 80]" ], "var": [ "p" ] }, { "value": [ "[72, 90, 3, 55, 72, 40, 76, 9, 21, 78, 10, 37, 98, 111, 6, 15, 44, 97, 32, 43, 2, 2, 122, 34, 47, 80, 41, 72, 25, 59, 77, 119]" ], "var": [ "p" ] } ], "output": [ { "value": [ "[73, 79, 68, 23, 5, 97, 111, 38, 52, 49, 66, 88, 38, 53, 67, 107, 14, 110, 46, 22, 54, 76, 42, 102, 126, 27, 114, 99, 3, 89, 15, 101]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[69, 121, 68, 35, 64, 22, 118, 88, 78, 104, 35, 60, 46, 21, 19, 72, 27, 73, 23, 57, 73, 43, 80, 121, 97, 70, 23, 6, 3, 7, 101, 102]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[3, 26, 55, 41, 91, 78, 45, 24, 5, 93, 99, 95, 19, 34, 85, 50, 122, 95, 76, 29, 75, 24, 66, 71, 97, 114, 102, 76, 14, 54, 44, 116]", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "[93, 59, 57, 74, 20, 90, 72, 84, 89, 38, 5, 12, 67, 46, 66, 97, 13, 87, 92, 123, 76, 26, 86, 15, 107, 38, 60, 43, 86, 39, 3, 90]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[103, 60, 58, 93, 92, 28, 112, 109, 109, 69, 110, 118, 17, 18, 21, 107, 61, 98, 83, 87, 25, 96, 85, 115, 35, 39, 123, 76, 56, 55, 47, 40]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[102, 94, 41, 108, 109, 77, 110, 94, 77, 56, 1, 94, 105, 102, 107, 87, 8, 38, 39, 9, 116, 59, 50, 79, 40, 54, 17, 17, 86, 95, 73, 89]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[2, 1, 115, 103, 30, 95, 39, 46, 121, 125, 0, 100, 97, 28, 24, 18, 10, 53, 45, 13, 123, 59, 28, 70, 84, 21, 71, 56, 116, 100, 45, 26]", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "[118, 110, 54, 48, 56, 67, 73, 41, 19, 102, 104, 41, 90, 21, 53, 61, 125, 78, 56, 38, 11, 82, 105, 91, 78, 83, 115, 36, 0, 46, 18, 122]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[69, 34, 86, 1, 68, 101, 74, 64, 7, 37, 66, 53, 37, 87, 11, 3, 42, 31, 27, 117, 9, 76, 0, 100, 21, 39, 124, 115, 115, 25, 110, 80]", "4" ], "var": [ "p", "returnv" ] }, { "value": [ "[72, 90, 3, 55, 72, 40, 76, 9, 21, 78, 10, 37, 98, 111, 6, 15, 44, 97, 32, 43, 2, 2, 122, 34, 47, 80, 41, 72, 25, 59, 77, 119]", "4" ], "var": [ "p", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60je4vczvf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* p, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = p[i3]; output_temp_2.push_back(output_temp_4); } output_json["p"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["p"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* p = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = imm_deref(p); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, returnv); }
master
null
{"livein": ["p"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "imm_deref", "funargs": ["p"], "typemap": {"p": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60je4vczvf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Gurgel100/gcc/gcc/testsuite/gcc.c-torture/execute/20031003-1.c
int f2() { return (int)(float)(2147483647); }
int f2()
int f2()
f2
[ "int", "" ]
{ "code": [ ".globl f2\n.type f2, @function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$2147483647, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f2\n.type f2, @function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2147483647, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f2\n.type f2, @function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2147483647, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f2\n.type f2, %function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n", ".global f2\n.type f2, %function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n", ".global f2\n.type f2, %function\nf2:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2147483647\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <limits.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] }, { "value": [ "2147483647" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62icrgpefq.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = f2(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
apple-llvmgcc42_Embedded
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f2", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62icrgpefq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_472() { return 472; }
int do_472()
int do_472()
do_472
[ "int", "" ]
{ "code": [ ".globl do_472\n.type do_472, @function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$472, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_472\n.type do_472, @function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$472, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_472\n.type do_472, @function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$472, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_472\n.type do_472, %function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 472\n\tret\n\t.cfi_endproc\n\n", ".global do_472\n.type do_472, %function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 472\n\tret\n\t.cfi_endproc\n\n", ".global do_472\n.type do_472, %function\ndo_472:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 472\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] }, { "value": [ "472" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53j0gjl8q4.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = do_472(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "do_472", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53j0gjl8q4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
119/aircam-openwrt/QMOLEDEV/libtool-2.4.2/tests/demo/hell1.c
int hell1() { return 1; }
int hell1()
int hell1()
hell1
[ "int", "" ]
{ "code": [ ".globl hell1\n.type hell1, @function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl hell1\n.type hell1, @function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl hell1\n.type hell1, @function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global hell1\n.type hell1, %function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global hell1\n.type hell1, %function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global hell1\n.type hell1, %function\nhell1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_303gfl96o8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = hell1(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
ar9344
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "hell1", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_303gfl96o8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
yunghsianglu/CProgramExercise/Book/Storage/Pointer/swap5.c
void swap5 (int * a, int * b) { int k = a; a = b; b = k; }
void swap5(int *a, int *b)
void swap5 (int * a, int * b)
swap5
[ "void", "int *", "int *" ]
{ "code": [ ".globl swap5\n.type swap5, @function\nswap5:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovl\t%eax, -4(%rbp)\n\tmovq\t-32(%rbp), %rax\n\tmovq\t%rax, -24(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tmovq\t%rax, -32(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl swap5\n.type swap5, @function\nswap5:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl swap5\n.type swap5, @function\nswap5:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global swap5\n.type swap5, %function\nswap5:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tstr\tw0, [sp, 28]\n\tldr\tx0, [sp]\n\tstr\tx0, [sp, 8]\n\tldrsw\tx0, [sp, 28]\n\tstr\tx0, [sp]\n\tnop\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global swap5\n.type swap5, %function\nswap5:\n.LFB24:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global swap5\n.type swap5, %function\nswap5:\n.LFB39:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[74, 125, 4, 29, 101, 95, 14, 37, 105, 58, 82, 10, 109, 103, 88, 4, 87, 23, 33, 72, 125, 119, 61, 9, 118, 55, 108, 47, 105, 24, 118, 82]", "[30, 25, 73, 64, 91, 35, 102, 41, 87, 53, 57, 55, 67, 73, 5, 4, 14, 100, 99, 119, 36, 71, 2, 64, 43, 117, 71, 81, 125, 6, 107, 107]" ], "var": [ "a", "b" ] }, { "value": [ "[74, 119, 63, 30, 58, 37, 44, 10, 84, 25, 122, 63, 81, 37, 36, 32, 125, 85, 25, 6, 28, 27, 114, 86, 39, 8, 99, 2, 105, 126, 83, 37]", "[101, 62, 23, 18, 40, 50, 9, 5, 42, 62, 14, 119, 32, 89, 47, 65, 94, 5, 38, 21, 83, 73, 7, 118, 111, 40, 126, 15, 40, 113, 51, 80]" ], "var": [ "a", "b" ] }, { "value": [ "[100, 89, 58, 67, 16, 126, 42, 106, 69, 86, 102, 36, 100, 81, 100, 31, 58, 92, 32, 30, 50, 21, 92, 12, 28, 65, 72, 120, 126, 10, 6, 41]", "[100, 121, 18, 84, 51, 31, 121, 122, 2, 32, 25, 39, 99, 113, 18, 68, 88, 17, 93, 44, 70, 92, 109, 4, 45, 7, 48, 21, 123, 56, 21, 24]" ], "var": [ "a", "b" ] }, { "value": [ "[11, 15, 59, 32, 4, 73, 71, 38, 106, 75, 8, 102, 37, 26, 100, 37, 36, 55, 9, 123, 103, 44, 85, 89, 104, 121, 54, 66, 62, 41, 113, 105]", "[117, 34, 68, 96, 9, 96, 24, 16, 80, 28, 60, 94, 62, 72, 125, 2, 55, 47, 54, 103, 76, 19, 30, 102, 22, 120, 122, 86, 7, 45, 125, 100]" ], "var": [ "a", "b" ] }, { "value": [ "[76, 61, 76, 29, 40, 100, 125, 83, 112, 111, 59, 83, 68, 94, 7, 24, 80, 36, 110, 110, 26, 119, 1, 120, 126, 33, 61, 52, 46, 47, 40, 123]", "[113, 9, 71, 4, 68, 40, 65, 41, 78, 97, 98, 38, 90, 47, 52, 115, 43, 4, 20, 101, 72, 45, 113, 88, 95, 123, 48, 68, 123, 30, 90, 69]" ], "var": [ "a", "b" ] }, { "value": [ "[23, 58, 125, 61, 24, 86, 8, 68, 89, 90, 19, 36, 57, 71, 98, 102, 59, 70, 45, 10, 1, 113, 61, 41, 1, 5, 111, 81, 20, 18, 62, 91]", "[73, 113, 32, 39, 102, 99, 13, 22, 35, 57, 54, 51, 94, 94, 22, 90, 48, 95, 54, 15, 89, 1, 63, 43, 35, 1, 11, 27, 102, 66, 33, 18]" ], "var": [ "a", "b" ] }, { "value": [ "[28, 89, 73, 59, 24, 115, 115, 40, 67, 106, 102, 47, 119, 119, 37, 7, 107, 92, 77, 45, 116, 40, 102, 33, 11, 90, 41, 4, 13, 14, 3, 28]", "[106, 35, 95, 61, 62, 48, 84, 14, 90, 6, 16, 108, 42, 9, 107, 66, 75, 88, 62, 24, 7, 13, 110, 62, 43, 107, 42, 50, 1, 104, 66, 34]" ], "var": [ "a", "b" ] }, { "value": [ "[28, 0, 44, 32, 91, 96, 59, 25, 52, 124, 110, 77, 71, 86, 124, 76, 65, 66, 1, 58, 13, 11, 52, 108, 82, 1, 80, 112, 39, 57, 52, 124]", "[40, 9, 87, 20, 117, 54, 123, 37, 103, 13, 100, 28, 32, 93, 66, 41, 87, 102, 10, 95, 4, 43, 97, 103, 109, 4, 18, 5, 26, 91, 17, 85]" ], "var": [ "a", "b" ] }, { "value": [ "[8, 10, 1, 115, 102, 47, 84, 82, 122, 73, 105, 40, 21, 13, 58, 25, 66, 4, 22, 61, 16, 52, 112, 17, 81, 89, 45, 106, 114, 54, 29, 54]", "[123, 70, 46, 111, 126, 52, 53, 48, 98, 40, 110, 39, 66, 13, 120, 120, 102, 107, 18, 19, 78, 74, 110, 112, 102, 25, 100, 90, 103, 118, 119, 1]" ], "var": [ "a", "b" ] }, { "value": [ "[102, 38, 89, 8, 97, 38, 46, 34, 8, 39, 96, 60, 119, 28, 48, 119, 3, 0, 16, 67, 53, 83, 41, 104, 97, 34, 57, 68, 20, 63, 99, 25]", "[90, 99, 21, 99, 105, 81, 100, 84, 60, 119, 71, 54, 115, 66, 124, 93, 44, 11, 62, 83, 51, 73, 70, 92, 56, 4, 66, 86, 116, 19, 77, 100]" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "[74, 125, 4, 29, 101, 95, 14, 37, 105, 58, 82, 10, 109, 103, 88, 4, 87, 23, 33, 72, 125, 119, 61, 9, 118, 55, 108, 47, 105, 24, 118, 82]", "[30, 25, 73, 64, 91, 35, 102, 41, 87, 53, 57, 55, 67, 73, 5, 4, 14, 100, 99, 119, 36, 71, 2, 64, 43, 117, 71, 81, 125, 6, 107, 107]" ], "var": [ "a", "b" ] }, { "value": [ "[74, 119, 63, 30, 58, 37, 44, 10, 84, 25, 122, 63, 81, 37, 36, 32, 125, 85, 25, 6, 28, 27, 114, 86, 39, 8, 99, 2, 105, 126, 83, 37]", "[101, 62, 23, 18, 40, 50, 9, 5, 42, 62, 14, 119, 32, 89, 47, 65, 94, 5, 38, 21, 83, 73, 7, 118, 111, 40, 126, 15, 40, 113, 51, 80]" ], "var": [ "a", "b" ] }, { "value": [ "[100, 89, 58, 67, 16, 126, 42, 106, 69, 86, 102, 36, 100, 81, 100, 31, 58, 92, 32, 30, 50, 21, 92, 12, 28, 65, 72, 120, 126, 10, 6, 41]", "[100, 121, 18, 84, 51, 31, 121, 122, 2, 32, 25, 39, 99, 113, 18, 68, 88, 17, 93, 44, 70, 92, 109, 4, 45, 7, 48, 21, 123, 56, 21, 24]" ], "var": [ "a", "b" ] }, { "value": [ "[11, 15, 59, 32, 4, 73, 71, 38, 106, 75, 8, 102, 37, 26, 100, 37, 36, 55, 9, 123, 103, 44, 85, 89, 104, 121, 54, 66, 62, 41, 113, 105]", "[117, 34, 68, 96, 9, 96, 24, 16, 80, 28, 60, 94, 62, 72, 125, 2, 55, 47, 54, 103, 76, 19, 30, 102, 22, 120, 122, 86, 7, 45, 125, 100]" ], "var": [ "a", "b" ] }, { "value": [ "[76, 61, 76, 29, 40, 100, 125, 83, 112, 111, 59, 83, 68, 94, 7, 24, 80, 36, 110, 110, 26, 119, 1, 120, 126, 33, 61, 52, 46, 47, 40, 123]", "[113, 9, 71, 4, 68, 40, 65, 41, 78, 97, 98, 38, 90, 47, 52, 115, 43, 4, 20, 101, 72, 45, 113, 88, 95, 123, 48, 68, 123, 30, 90, 69]" ], "var": [ "a", "b" ] }, { "value": [ "[23, 58, 125, 61, 24, 86, 8, 68, 89, 90, 19, 36, 57, 71, 98, 102, 59, 70, 45, 10, 1, 113, 61, 41, 1, 5, 111, 81, 20, 18, 62, 91]", "[73, 113, 32, 39, 102, 99, 13, 22, 35, 57, 54, 51, 94, 94, 22, 90, 48, 95, 54, 15, 89, 1, 63, 43, 35, 1, 11, 27, 102, 66, 33, 18]" ], "var": [ "a", "b" ] }, { "value": [ "[28, 89, 73, 59, 24, 115, 115, 40, 67, 106, 102, 47, 119, 119, 37, 7, 107, 92, 77, 45, 116, 40, 102, 33, 11, 90, 41, 4, 13, 14, 3, 28]", "[106, 35, 95, 61, 62, 48, 84, 14, 90, 6, 16, 108, 42, 9, 107, 66, 75, 88, 62, 24, 7, 13, 110, 62, 43, 107, 42, 50, 1, 104, 66, 34]" ], "var": [ "a", "b" ] }, { "value": [ "[28, 0, 44, 32, 91, 96, 59, 25, 52, 124, 110, 77, 71, 86, 124, 76, 65, 66, 1, 58, 13, 11, 52, 108, 82, 1, 80, 112, 39, 57, 52, 124]", "[40, 9, 87, 20, 117, 54, 123, 37, 103, 13, 100, 28, 32, 93, 66, 41, 87, 102, 10, 95, 4, 43, 97, 103, 109, 4, 18, 5, 26, 91, 17, 85]" ], "var": [ "a", "b" ] }, { "value": [ "[8, 10, 1, 115, 102, 47, 84, 82, 122, 73, 105, 40, 21, 13, 58, 25, 66, 4, 22, 61, 16, 52, 112, 17, 81, 89, 45, 106, 114, 54, 29, 54]", "[123, 70, 46, 111, 126, 52, 53, 48, 98, 40, 110, 39, 66, 13, 120, 120, 102, 107, 18, 19, 78, 74, 110, 112, 102, 25, 100, 90, 103, 118, 119, 1]" ], "var": [ "a", "b" ] }, { "value": [ "[102, 38, 89, 8, 97, 38, 46, 34, 8, 39, 96, 60, 119, 28, 48, 119, 3, 0, 16, 67, 53, 83, 41, 104, 97, 34, 57, 68, 20, 63, 99, 25]", "[90, 99, 21, 99, 105, 81, 100, 84, 60, 119, 71, 54, 115, 66, 124, 93, 44, 11, 62, 83, 51, 73, 70, 92, 56, 4, 66, 86, 116, 19, 77, 100]" ], "var": [ "a", "b" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55b3qnq83z.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* a, int* b) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = a[i4]; output_temp_3.push_back(output_temp_5); } output_json["a"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = b[i7]; output_temp_6.push_back(output_temp_8); } output_json["b"] = output_temp_6; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["a"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* a = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["b"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* b = &input_temp_2_vec[0]; clock_t begin = clock(); swap5(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b); }
master
null
{"livein": ["a", "b"], "liveout": ["a", "b"], "returnvarname": [], "execcmd": "", "funname": "swap5", "funargs": ["a", "b"], "typemap": {"a": "array(int32#32)", "b": "array(int32#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55b3qnq83z.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Siarkowy/CP/Sem1/recurrence.c
unsigned int power(int x, unsigned int k) { return k == 0 ? 1 : x * power(x, k - 1); }
unsigned int power(intx, unsigned intk)
unsigned int power(int x, unsigned int k)
power
[ "unsigned int", "int", "unsigned int" ]
{ "code": [ ".globl power\n.type power, @function\npower:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tcmpl\t$0, -8(%rbp)\n\tje\t.L2\n\tmovl\t-8(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\tpower\n\tmovl\t-4(%rbp), %edx\n\timull\t%edx, %eax\n\tjmp\t.L4\n.L2:\n\tmovl\t$1, %eax\n.L4:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl power\n.type power, @function\npower:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L3:\n\ttestl\t%esi, %esi\n\tje\t.L1\n\timull\t%edi, %eax\n\tdecl\t%esi\n\tjmp\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl power\n.type power, @function\npower:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestl\t%esi, %esi\n\tje\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\timull\t%edi, %eax\n\tsubl\t$1, %esi\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global power\n.type power, %function\npower:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tstr\tw1, [sp, 24]\n\tldr\tw0, [sp, 24]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tldr\tw0, [sp, 24]\n\tsub\tw0, w0, #1\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tbl\tpower\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tmul\tw0, w1, w0\n\tb\t.L4\n.L2:\n\tmov\tw0, 1\n.L4:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global power\n.type power, %function\npower:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw0, 1\n.L3:\n\tcbz\tw1, .L1\n\tmul\tw0, w0, w2\n\tsub\tw1, w1, #1\n\tb\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global power\n.type power, %function\npower:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tcbz\tw1, .L7\n\tsub\tw0, w1, #1\n\tcmp\tw0, 9\n\tbls\t.L8\n\tdup\tv1.4s, w3\n\tlsr\tw0, w1, 2\n\tmovi\tv0.4s, 0x1\n\tmov\tw2, 0\n\t.p2align 3,,7\n.L4:\n\tmul\tv0.4s, v0.4s, v1.4s\n\tadd\tw2, w2, 1\n\tcmp\tw2, w0\n\tbne\t.L4\n\tmovi\tv1.4s, 0\n\ttst\tx1, 3\n\tand\tw1, w1, 3\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n.L3:\n\tmul\tw0, w0, w3\n\tcmp\tw1, 1\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 2\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 3\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 4\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 5\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 6\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 7\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 8\n\tbeq\t.L1\n\tmul\tw0, w0, w3\n\tcmp\tw1, 9\n\tmul\tw3, w0, w3\n\tcsel\tw0, w3, w0, ne\n.L1:\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 1\n\tret\n.L8:\n\tmov\tw0, 1\n\tb\t.L3\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "112", "689" ], "var": [ "x", "k" ] }, { "value": [ "21", "556" ], "var": [ "x", "k" ] }, { "value": [ "37", "9" ], "var": [ "x", "k" ] }, { "value": [ "91", "86" ], "var": [ "x", "k" ] }, { "value": [ "24", "218" ], "var": [ "x", "k" ] }, { "value": [ "9", "26" ], "var": [ "x", "k" ] }, { "value": [ "78", "339" ], "var": [ "x", "k" ] }, { "value": [ "27", "723" ], "var": [ "x", "k" ] }, { "value": [ "49", "748" ], "var": [ "x", "k" ] }, { "value": [ "84", "103" ], "var": [ "x", "k" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "2408385425" ], "var": [ "returnv" ] }, { "value": [ "324385413" ], "var": [ "returnv" ] }, { "value": [ "1889099913" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1435304465" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "3535121699" ], "var": [ "returnv" ] }, { "value": [ "3962482241" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_39h9r5525a.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, unsigned int k, unsigned int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; unsigned int k = input_json["k"]; clock_t begin = clock(); unsigned int returnv = power(x, k); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, k, returnv); }
master
null
{"livein": ["x", "k"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "power", "funargs": ["x", "k"], "typemap": {"x": "int32", "k": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_39h9r5525a.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
luisbg/befstools/src/device_info.c
int is_device_mounted(const char *path) { # 331 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/luisbg/befstools/refs/heads/master/src/device_info.c" (void) path; return 0; }
int is_device_mounted(const char *path)
int is_device_mounted(const char *path)
is_device_mounted
[ "int", "const char *" ]
{ "code": [ ".globl is_device_mounted\n.type is_device_mounted, @function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl is_device_mounted\n.type is_device_mounted, @function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl is_device_mounted\n.type is_device_mounted, @function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global is_device_mounted\n.type is_device_mounted, %function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global is_device_mounted\n.type is_device_mounted, %function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global is_device_mounted\n.type is_device_mounted, %function\nis_device_mounted:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"ttqphrackbad\"" ], "var": [ "path" ] }, { "value": [ "\"oekurtebrwugiexrsrkphzn\"" ], "var": [ "path" ] }, { "value": [ "\"utab\"" ], "var": [ "path" ] }, { "value": [ "\"niaagmcaw\"" ], "var": [ "path" ] }, { "value": [ "\"lvlkrvgqulfqtyae\"" ], "var": [ "path" ] }, { "value": [ "\"cnpcnvvihhywzzzjhiabkvxcbhgchak\"" ], "var": [ "path" ] }, { "value": [ "\"knnqfbevpxxg\"" ], "var": [ "path" ] }, { "value": [ "\"ujrsuitfwzrp\"" ], "var": [ "path" ] }, { "value": [ "\"hqmodneeugrmuahrcrndxmovxwkp\"" ], "var": [ "path" ] }, { "value": [ "\"tyhyrgdy\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"ttqphrackbad\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"oekurtebrwugiexrsrkphzn\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"utab\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"niaagmcaw\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lvlkrvgqulfqtyae\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"cnpcnvvihhywzzzjhiabkvxcbhgchak\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"knnqfbevpxxg\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ujrsuitfwzrp\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"hqmodneeugrmuahrcrndxmovxwkp\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"tyhyrgdy\"", "0" ], "var": [ "path", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62_2u_02li.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path, int returnv) { json output_json; output_json["path"] = path; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = is_device_mounted(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path, returnv); }
master
null
{"livein": ["path"], "liveout": ["path"], "returnvarname": ["returnv"], "execcmd": "", "funname": "is_device_mounted", "funargs": ["path"], "typemap": {"path": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62_2u_02li.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
auag92/Masters-Project/isotropic_growth_fluid_flow/2D_new.c
double zeta(double phi) { return((1.0)*phi + (2.0)*(1.0-phi)); }
double zeta(doublephi)
double zeta(double phi)
zeta
[ "double", "double" ]
{ "code": [ ".globl zeta\n.type zeta, @function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t-8(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm0\n\taddsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl zeta\n.type zeta, @function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t%xmm1, %xmm0\n\taddsd\t%xmm0, %xmm0\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl zeta\n.type zeta, @function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t%xmm1, %xmm0\n\taddsd\t%xmm0, %xmm0\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global zeta\n.type zeta, %function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tfmov\td1, 1.0e+0\n\tldr\td0, [sp, 8]\n\tfsub\td0, d1, d0\n\tfadd\td1, d0, d0\n\tldr\td0, [sp, 8]\n\tfadd\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global zeta\n.type zeta, %function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tfmov\td1, 1.0e+0\n\tfmov\td2, 2.0e+0\n\tfsub\td1, d1, d0\n\tfmadd\td0, d1, d2, d0\n\tret\n\t.cfi_endproc\n\n", ".global zeta\n.type zeta, %function\nzeta:\n.LFB0:\n\t.cfi_startproc\n\tfmov\td1, 1.0e+0\n\tfmov\td2, 2.0e+0\n\tfsub\td1, d1, d0\n\tfmadd\td0, d1, d2, d0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "48.8121616177" ], "var": [ "phi" ] }, { "value": [ "45.0668793282" ], "var": [ "phi" ] }, { "value": [ "26.1958608933" ], "var": [ "phi" ] }, { "value": [ "80.8855821412" ], "var": [ "phi" ] }, { "value": [ "90.5560104668" ], "var": [ "phi" ] }, { "value": [ "13.7948362267" ], "var": [ "phi" ] }, { "value": [ "43.113133806" ], "var": [ "phi" ] }, { "value": [ "44.2071196293" ], "var": [ "phi" ] }, { "value": [ "49.5177353255" ], "var": [ "phi" ] }, { "value": [ "57.5915298571" ], "var": [ "phi" ] } ], "output": [ { "value": [ "-46.8121616177" ], "var": [ "returnv" ] }, { "value": [ "-43.0668793282" ], "var": [ "returnv" ] }, { "value": [ "-24.1958608933" ], "var": [ "returnv" ] }, { "value": [ "-78.8855821412" ], "var": [ "returnv" ] }, { "value": [ "-88.5560104668" ], "var": [ "returnv" ] }, { "value": [ "-11.7948362267" ], "var": [ "returnv" ] }, { "value": [ "-41.113133806" ], "var": [ "returnv" ] }, { "value": [ "-42.2071196293" ], "var": [ "returnv" ] }, { "value": [ "-47.5177353255" ], "var": [ "returnv" ] }, { "value": [ "-55.5915298571" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_36q1194nwy.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double phi, double returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); double phi = input_json["phi"]; clock_t begin = clock(); double returnv = zeta(phi); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(phi, returnv); }
master
null
{"livein": ["phi"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "zeta", "funargs": ["phi"], "typemap": {"phi": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_36q1194nwy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
fstrozzi/bioruby-faster/ext/faster.c
int check_header(char *header, char *firstline) { if (*header == *firstline) return 1; else { return 0; } }
int check_header(char *header, char *firstline)
int check_header(char *header, char *firstline)
check_header
[ "int", "char *", "char *" ]
{ "code": [ ".globl check_header\n.type check_header, @function\ncheck_header:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %dl\n\tjne\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl check_header\n.type check_header, @function\ncheck_header:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rsi), %al\n\tcmpb\t%al, (%rdi)\n\tsete\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl check_header\n.type check_header, @function\ncheck_header:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rsi), %eax\n\tcmpb\t%al, (%rdi)\n\tsete\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".global check_header\n.type check_header, %function\ncheck_header:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tldrb\tw1, [x0]\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbne\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global check_header\n.type check_header, %function\ncheck_header:\n.LFB35:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tldrb\tw0, [x1]\n\tcmp\tw2, w0\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n", ".global check_header\n.type check_header, %function\ncheck_header:\n.LFB50:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tldrb\tw0, [x1]\n\tcmp\tw2, w0\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <string.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"kmhxbkxhsm\"", "\"hxpzuwrmsgmikiioohnlywkiogqd\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"erdpnhjqaxxr\"", "\"eaiehepkhelcikw\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"ip\"", "\"pkzoxdqotuxetpnas\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"bydlgjukmccsyybsftpnufgxvrvatqs\"", "\"iptqzumezh\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"itflftqy\"", "\"km\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"nmwbbrkhglgxbmwfl\"", "\"jnxkldzbmjojekuijjylzxm\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"lpimutbrqzpsrwtpbfrw\"", "\"oms\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"yczusrqccnbzcdkecmrpyjfunz\"", "\"lsgvskraotvhcttroyfgsvkunafwpl\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"rzbnvuzjjfhuupqwxjx\"", "\"asxracnfrtkkfayblbqnzz\"" ], "var": [ "header", "firstline" ] }, { "value": [ "\"rkfvzrleqlpytpx\"", "\"tilmycqlzheylytevkt\"" ], "var": [ "header", "firstline" ] } ], "output": [ { "value": [ "\"hxpzuwrmsgmikiioohnlywkiogqd\"", "\"kmhxbkxhsm\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"eaiehepkhelcikw\"", "\"erdpnhjqaxxr\"", "1" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"pkzoxdqotuxetpnas\"", "\"ip\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"iptqzumezh\"", "\"bydlgjukmccsyybsftpnufgxvrvatqs\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"km\"", "\"itflftqy\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"jnxkldzbmjojekuijjylzxm\"", "\"nmwbbrkhglgxbmwfl\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"oms\"", "\"lpimutbrqzpsrwtpbfrw\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"lsgvskraotvhcttroyfgsvkunafwpl\"", "\"yczusrqccnbzcdkecmrpyjfunz\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"asxracnfrtkkfayblbqnzz\"", "\"rzbnvuzjjfhuupqwxjx\"", "0" ], "var": [ "firstline", "header", "returnv" ] }, { "value": [ "\"tilmycqlzheylytevkt\"", "\"rkfvzrleqlpytpx\"", "0" ], "var": [ "firstline", "header", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60bokkkdok.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* header, char* firstline, int returnv) { json output_json; output_json["header"] = header; output_json["firstline"] = firstline; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* header = strdup(input_json["header"].get<std::string>().c_str()); char* firstline = strdup(input_json["firstline"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = check_header(header, firstline); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(header, firstline, returnv); }
master
null
{"livein": ["header", "firstline"], "liveout": ["header", "firstline"], "returnvarname": ["returnv"], "execcmd": "", "funname": "check_header", "funargs": ["header", "firstline"], "typemap": {"header": "string", "firstline": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60bokkkdok.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TulipCharts/tulipnode/external/tiamalgamation.c
int ti_sinh_start(double const *options) { (void)options; return 0; }
int ti_sinh_start(const double *options)
int ti_sinh_start(double const *options)
ti_sinh_start
[ "int", "const double *" ]
{ "code": [ ".globl ti_sinh_start\n.type ti_sinh_start, @function\nti_sinh_start:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ti_sinh_start\n.type ti_sinh_start, @function\nti_sinh_start:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl ti_sinh_start\n.type ti_sinh_start, @function\nti_sinh_start:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ti_sinh_start\n.type ti_sinh_start, %function\nti_sinh_start:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ti_sinh_start\n.type ti_sinh_start, %function\nti_sinh_start:\n.LFB22:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global ti_sinh_start\n.type ti_sinh_start, %function\nti_sinh_start:\n.LFB27:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <math.h> #include <assert.h> #include <string.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]" ], "var": [ "options" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]" ], "var": [ "options" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]" ], "var": [ "options" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]" ], "var": [ "options" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]" ], "var": [ "options" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]" ], "var": [ "options" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]" ], "var": [ "options" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]" ], "var": [ "options" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]" ], "var": [ "options" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]" ], "var": [ "options" ] } ], "output": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]", "0" ], "var": [ "options", "returnv" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]", "0" ], "var": [ "options", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48hr0vxlqh.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double* options, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = options[i3]; output_temp_2.push_back(output_temp_4); } output_json["options"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<double> input_temp_1_vec; for (auto& elem : input_json["options"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* options = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = ti_sinh_start(options); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(options, returnv); }
master
null
{"livein": ["options"], "liveout": ["options"], "returnvarname": ["returnv"], "execcmd": "", "funname": "ti_sinh_start", "funargs": ["options"], "typemap": {"options": "array(float64#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48hr0vxlqh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
HenryL-study/A-simple-compiler-for-C/test_ct12.c
char getChar(){ char ch; ch='m'; return (ch+1); }
char getChar()
char getChar()
getChar
[ "char", "" ]
{ "code": [ ".globl getChar\n.type getChar, @function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovb\t$109, -1(%rbp)\n\tmovzbl\t-1(%rbp), %eax\n\taddl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl getChar\n.type getChar, @function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t$110, %al\n\tret\n\t.cfi_endproc\n\n", ".globl getChar\n.type getChar, @function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$110, %eax\n\tret\n\t.cfi_endproc\n\n", ".global getChar\n.type getChar, %function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tmov\tw0, 109\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tadd\tw0, w0, 1\n\tand\tw0, w0, 255\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global getChar\n.type getChar, %function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 110\n\tret\n\t.cfi_endproc\n\n", ".global getChar\n.type getChar, %function\ngetChar:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 110\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] }, { "value": [ "110" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52un_0jb7g.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); char returnv = getChar(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "getChar", "funargs": [], "typemap": {"returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52un_0jb7g.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_908() { return 908; }
int do_908()
int do_908()
do_908
[ "int", "" ]
{ "code": [ ".globl do_908\n.type do_908, @function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$908, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_908\n.type do_908, @function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$908, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_908\n.type do_908, @function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$908, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_908\n.type do_908, %function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 908\n\tret\n\t.cfi_endproc\n\n", ".global do_908\n.type do_908, %function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 908\n\tret\n\t.cfi_endproc\n\n", ".global do_908\n.type do_908, %function\ndo_908:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 908\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] }, { "value": [ "908" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53pbdg3pr3.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = do_908(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "do_908", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53pbdg3pr3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.target/aarch64/lr_free_2.c
int cal (int a, int b) { int sum = a + b; int sum1 = a * b; return (a + b + sum + sum1); }
int cal(inta, intb)
int cal (int a, int b)
cal
[ "int", "int", "int" ]
{ "code": [ ".globl cal\n.type cal, @function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t-20(%rbp), %edx\n\tmovl\t-24(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-20(%rbp), %eax\n\timull\t-24(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-20(%rbp), %edx\n\tmovl\t-24(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl cal\n.type cal, @function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\timull\t%esi, %edi\n\tleal\t(%rdi,%rax,2), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl cal\n.type cal, @function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\timull\t%esi, %edi\n\tleal\t(%rdi,%rax,2), %eax\n\tret\n\t.cfi_endproc\n\n", ".global cal\n.type cal, %function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 24]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global cal\n.type cal, %function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw2, w0, w1\n\tmul\tw0, w0, w1\n\tadd\tw0, w0, w2, lsl 1\n\tret\n\t.cfi_endproc\n\n", ".global cal\n.type cal, %function\ncal:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw2, w0, w1\n\tmul\tw0, w0, w1\n\tadd\tw0, w0, w2, lsl 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "7", "81" ], "var": [ "a", "b" ] }, { "value": [ "102", "80" ], "var": [ "a", "b" ] }, { "value": [ "6", "50" ], "var": [ "a", "b" ] }, { "value": [ "32", "42" ], "var": [ "a", "b" ] }, { "value": [ "103", "47" ], "var": [ "a", "b" ] }, { "value": [ "41", "23" ], "var": [ "a", "b" ] }, { "value": [ "58", "99" ], "var": [ "a", "b" ] }, { "value": [ "32", "34" ], "var": [ "a", "b" ] }, { "value": [ "97", "114" ], "var": [ "a", "b" ] }, { "value": [ "96", "109" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "743" ], "var": [ "returnv" ] }, { "value": [ "8524" ], "var": [ "returnv" ] }, { "value": [ "412" ], "var": [ "returnv" ] }, { "value": [ "1492" ], "var": [ "returnv" ] }, { "value": [ "5141" ], "var": [ "returnv" ] }, { "value": [ "1071" ], "var": [ "returnv" ] }, { "value": [ "6056" ], "var": [ "returnv" ] }, { "value": [ "1220" ], "var": [ "returnv" ] }, { "value": [ "11480" ], "var": [ "returnv" ] }, { "value": [ "10874" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_467pxdn3pr.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = cal(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
arm-hot-cold
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "cal", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_467pxdn3pr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
trealla-lang/trealla/src/utf8.c
int put_len_utf8(int _ch) { unsigned int ch = (unsigned int)_ch; int len = 0; if (ch <= 0x7F) len = 1; else if (ch <= 0x07FF) len = 2; else if (ch <= 0xFFFF) len = 3; else if (ch <= 0x01FFFFF) len = 4; else if (ch <= 0x03FFFFFF) len = 5; else if (ch <= 0x7FFFFFFF) len = 6; return len; }
int put_len_utf8(int_ch)
int put_len_utf8(int _ch)
put_len_utf8
[ "int", "int" ]
{ "code": [ ".globl put_len_utf8\n.type put_len_utf8, @function\nput_len_utf8:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tcmpl\t$127, -4(%rbp)\n\tja\t.L2\n\tmovl\t$1, -8(%rbp)\n\tjmp\t.L3\n.L2:\n\tcmpl\t$2047, -4(%rbp)\n\tja\t.L4\n\tmovl\t$2, -8(%rbp)\n\tjmp\t.L3\n.L4:\n\tcmpl\t$65535, -4(%rbp)\n\tja\t.L5\n\tmovl\t$3, -8(%rbp)\n\tjmp\t.L3\n.L5:\n\tcmpl\t$2097151, -4(%rbp)\n\tja\t.L6\n\tmovl\t$4, -8(%rbp)\n\tjmp\t.L3\n.L6:\n\tcmpl\t$67108863, -4(%rbp)\n\tja\t.L7\n\tmovl\t$5, -8(%rbp)\n\tjmp\t.L3\n.L7:\n\tmovl\t-4(%rbp), %eax\n\ttestl\t%eax, %eax\n\tjs\t.L3\n\tmovl\t$6, -8(%rbp)\n.L3:\n\tmovl\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl put_len_utf8\n.type put_len_utf8, @function\nput_len_utf8:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpl\t$127, %edi\n\tjbe\t.L1\n\tmovl\t$2, %eax\n\tcmpl\t$2047, %edi\n\tjbe\t.L1\n\tmovl\t$3, %eax\n\tcmpl\t$65535, %edi\n\tjbe\t.L1\n\tmovl\t$4, %eax\n\tcmpl\t$2097151, %edi\n\tjbe\t.L1\n\tmovl\t$5, %eax\n\tcmpl\t$67108863, %edi\n\tjbe\t.L1\n\tmovl\t%edi, %eax\n\tsarl\t$31, %eax\n\tnotl\t%eax\n\tandl\t$6, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl put_len_utf8\n.type put_len_utf8, @function\nput_len_utf8:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpl\t$127, %edi\n\tjbe\t.L1\n\tmovl\t$2, %eax\n\tcmpl\t$2047, %edi\n\tjbe\t.L1\n\tmovl\t$3, %eax\n\tcmpl\t$65535, %edi\n\tjbe\t.L1\n\tmovl\t$4, %eax\n\tcmpl\t$2097151, %edi\n\tjbe\t.L1\n\tmovl\t$5, %eax\n\tcmpl\t$67108863, %edi\n\tjbe\t.L1\n\tmovl\t%edi, %eax\n\tsarl\t$31, %eax\n\tnotl\t%eax\n\tandl\t$6, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global put_len_utf8\n.type put_len_utf8, %function\nput_len_utf8:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tstr\tw0, [sp, 28]\n\tstr\twzr, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 127\n\tbhi\t.L2\n\tmov\tw0, 1\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 2047\n\tbhi\t.L4\n\tmov\tw0, 2\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L4:\n\tldr\tw1, [sp, 28]\n\tmov\tw0, 65535\n\tcmp\tw1, w0\n\tbhi\t.L5\n\tmov\tw0, 3\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L5:\n\tldr\tw1, [sp, 28]\n\tmov\tw0, 2097151\n\tcmp\tw1, w0\n\tbhi\t.L6\n\tmov\tw0, 4\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L6:\n\tldr\tw1, [sp, 28]\n\tmov\tw0, 67108863\n\tcmp\tw1, w0\n\tbhi\t.L7\n\tmov\tw0, 5\n\tstr\tw0, [sp, 24]\n\tb\t.L3\n.L7:\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tblt\t.L3\n\tmov\tw0, 6\n\tstr\tw0, [sp, 24]\n.L3:\n\tldr\tw0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global put_len_utf8\n.type put_len_utf8, %function\nput_len_utf8:\n.LFB35:\n\t.cfi_startproc\n\tcmp\tw0, 127\n\tbls\t.L3\n\tcmp\tw0, 2047\n\tbls\t.L4\n\tmov\tw1, 65535\n\tcmp\tw0, w1\n\tbls\t.L5\n\tmov\tw1, 2097151\n\tcmp\tw0, w1\n\tbls\t.L6\n\tmov\tw1, 67108863\n\tcmp\tw0, w1\n\tbls\t.L7\n\tcmp\tw0, 0\n\tmov\tw0, 6\n\tcsel\tw0, wzr, w0, lt\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n.L4:\n\tmov\tw0, 2\n\tb\t.L1\n.L5:\n\tmov\tw0, 3\n\tb\t.L1\n.L6:\n\tmov\tw0, 4\n\tb\t.L1\n.L7:\n\tmov\tw0, 5\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global put_len_utf8\n.type put_len_utf8, %function\nput_len_utf8:\n.LFB52:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n\tcmp\tw1, 127\n\tbls\t.L1\n\tcmp\tw1, 2047\n\tmov\tw0, 2\n\tbls\t.L1\n\tmov\tw2, 65535\n\tmov\tw0, 3\n\tcmp\tw1, w2\n\tbls\t.L1\n\tmov\tw2, 2097151\n\tmov\tw0, 4\n\tcmp\tw1, w2\n\tbls\t.L1\n\tmov\tw2, 67108863\n\tmov\tw0, 5\n\tcmp\tw1, w2\n\tbls\t.L1\n\tcmp\tw1, 0\n\tmov\tw0, 6\n\tcsel\tw0, wzr, w0, lt\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "113" ], "var": [ "_ch" ] }, { "value": [ "68" ], "var": [ "_ch" ] }, { "value": [ "13" ], "var": [ "_ch" ] }, { "value": [ "71" ], "var": [ "_ch" ] }, { "value": [ "18" ], "var": [ "_ch" ] }, { "value": [ "63" ], "var": [ "_ch" ] }, { "value": [ "95" ], "var": [ "_ch" ] }, { "value": [ "10" ], "var": [ "_ch" ] }, { "value": [ "78" ], "var": [ "_ch" ] }, { "value": [ "38" ], "var": [ "_ch" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_634hecziwb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int _ch, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int _ch = input_json["_ch"]; clock_t begin = clock(); int returnv = put_len_utf8(_ch); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(_ch, returnv); }
master
null
{"livein": ["_ch"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "put_len_utf8", "funargs": ["_ch"], "typemap": {"_ch": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_634hecziwb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dspinellis/cscout/src/test/c/c20-implicit-fdecl.c
int b() {return 0;}
int b()
int b()
b
[ "int", "" ]
{ "code": [ ".globl b\n.type b, @function\nb:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl b\n.type b, @function\nb:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl b\n.type b, @function\nb:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global b\n.type b, %function\nb:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global b\n.type b, %function\nb:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global b\n.type b, %function\nb:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52tdonv4jt.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = b(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "b", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52tdonv4jt.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Njialll/Libft/src/ft_isdigit.c
int ft_isdigit(int c) { if (c >= (int)'0' && c <= (int)'9') return (1); else return (0); }
int ft_isdigit(intc)
int ft_isdigit(int c)
ft_isdigit
[ "int", "int" ]
{ "code": [ ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$47, -4(%rbp)\n\tjle\t.L2\n\tcmpl\t$57, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl ft_isdigit\n.type ft_isdigit, @function\nft_isdigit:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpl\t$9, %edi\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 47\n\tble\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 57\n\tbgt\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB11:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global ft_isdigit\n.type ft_isdigit, %function\nft_isdigit:\n.LFB11:\n\t.cfi_startproc\n\tsub\tw0, w0, #48\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "60" ], "var": [ "c" ] }, { "value": [ "32" ], "var": [ "c" ] }, { "value": [ "15" ], "var": [ "c" ] }, { "value": [ "92" ], "var": [ "c" ] }, { "value": [ "67" ], "var": [ "c" ] }, { "value": [ "100" ], "var": [ "c" ] }, { "value": [ "99" ], "var": [ "c" ] }, { "value": [ "37" ], "var": [ "c" ] }, { "value": [ "90" ], "var": [ "c" ] }, { "value": [ "5" ], "var": [ "c" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_513rypgpqm.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int c, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int c = input_json["c"]; clock_t begin = clock(); int returnv = ft_isdigit(c); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, returnv); }
master
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ft_isdigit", "funargs": ["c"], "typemap": {"c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_513rypgpqm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bardibardi/cheap_random/examples2/cr.c
int cr_has_byte_in_string(char byte, char *arg) { int c; c = -1; while (0 != c) { c = (int)*arg++; if ((char)c == byte) { return 1; } } return 0; }
int cr_has_byte_in_string(charbyte, char *arg)
int cr_has_byte_in_string(char byte, char *arg)
cr_has_byte_in_string
[ "int", "char", "char *" ]
{ "code": [ ".globl cr_has_byte_in_string\n.type cr_has_byte_in_string, @function\ncr_has_byte_in_string:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovq\t%rsi, -32(%rbp)\n\tmovb\t%al, -20(%rbp)\n\tmovl\t$-1, -4(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovq\t-32(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -32(%rbp)\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpb\t%al, -20(%rbp)\n\tjne\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L4\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl cr_has_byte_in_string\n.type cr_has_byte_in_string, @function\ncr_has_byte_in_string:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n.L3:\n\tmovb\t(%rsi), %al\n\tincq\t%rsi\n\tcmpb\t%dil, %al\n\tje\t.L4\n\ttestb\t%al, %al\n\tjne\t.L3\n\txorl\t%eax, %eax\n\tret\n.L4:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl cr_has_byte_in_string\n.type cr_has_byte_in_string, @function\ncr_has_byte_in_string:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovzbl\t(%rsi), %eax\n\taddq\t$1, %rsi\n\tcmpb\t%dil, %al\n\tje\t.L4\n\ttestb\t%al, %al\n\tjne\t.L3\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global cr_has_byte_in_string\n.type cr_has_byte_in_string, %function\ncr_has_byte_in_string:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tstr\tx1, [sp]\n\tmov\tw0, -1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\n.L4:\n\tldr\tx0, [sp]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp]\n\tldrb\tw0, [x0]\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tand\tw0, w0, 255\n\tldrb\tw1, [sp, 15]\n\tcmp\tw1, w0\n\tbne\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbne\t.L4\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global cr_has_byte_in_string\n.type cr_has_byte_in_string, %function\ncr_has_byte_in_string:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n.L3:\n\tldrb\tw2, [x1], 1\n\tcmp\tw2, w0\n\tbeq\t.L4\n\tcbnz\tw2, .L3\n\tmov\tw0, 0\n.L1:\n\tret\n.L4:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global cr_has_byte_in_string\n.type cr_has_byte_in_string, %function\ncr_has_byte_in_string:\n.LFB39:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\t.p2align 3,,7\n.L3:\n\tldrb\tw2, [x1], 1\n\tcmp\tw2, w0\n\tbeq\t.L4\n\tcbnz\tw2, .L3\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "49", "\"gvh\"" ], "var": [ "byte", "arg" ] }, { "value": [ "112", "\"kflgtvrjvkmjrdumcvirdtsim\"" ], "var": [ "byte", "arg" ] }, { "value": [ "51", "\"xncbkysibixqyr\"" ], "var": [ "byte", "arg" ] }, { "value": [ "39", "\"a\"" ], "var": [ "byte", "arg" ] }, { "value": [ "74", "\"staosqgtagxkvpsdahzlkcmf\"" ], "var": [ "byte", "arg" ] }, { "value": [ "1", "\"obyivdldtqihrdft\"" ], "var": [ "byte", "arg" ] }, { "value": [ "76", "\"xhhflgdia\"" ], "var": [ "byte", "arg" ] }, { "value": [ "78", "\"ctwdwyxztvvwsqvyjjmwxhdntfgwn\"" ], "var": [ "byte", "arg" ] }, { "value": [ "126", "\"ooginqag\"" ], "var": [ "byte", "arg" ] }, { "value": [ "110", "\"gmsxvjwddmlqwbxfzwkrz\"" ], "var": [ "byte", "arg" ] } ], "output": [ { "value": [ "\"gvh\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"kflgtvrjvkmjrdumcvirdtsim\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"xncbkysibixqyr\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"a\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"staosqgtagxkvpsdahzlkcmf\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"obyivdldtqihrdft\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"xhhflgdia\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"ctwdwyxztvvwsqvyjjmwxhdntfgwn\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"ooginqag\"", "0" ], "var": [ "arg", "returnv" ] }, { "value": [ "\"gmsxvjwddmlqwbxfzwkrz\"", "0" ], "var": [ "arg", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55jkfguvgz.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char byte, char* arg, int returnv) { json output_json; output_json["arg"] = arg; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char byte = input_json["byte"].get<char>(); char* arg = strdup(input_json["arg"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = cr_has_byte_in_string(byte, arg); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(byte, arg, returnv); }
master
null
{"livein": ["byte", "arg"], "liveout": ["arg"], "returnvarname": ["returnv"], "execcmd": "", "funname": "cr_has_byte_in_string", "funargs": ["byte", "arg"], "typemap": {"byte": "int8", "arg": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55jkfguvgz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
joezuntz/cmbview/src/Other_sources/cfitsio/drvrmem.c
int mem_setoptions(int options) { options = 0; return(options); }
int mem_setoptions(intoptions)
int mem_setoptions(int options)
mem_setoptions
[ "int", "int" ]
{ "code": [ ".globl mem_setoptions\n.type mem_setoptions, @function\nmem_setoptions:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl mem_setoptions\n.type mem_setoptions, @function\nmem_setoptions:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl mem_setoptions\n.type mem_setoptions, @function\nmem_setoptions:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global mem_setoptions\n.type mem_setoptions, %function\nmem_setoptions:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\twzr, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global mem_setoptions\n.type mem_setoptions, %function\nmem_setoptions:\n.LFB22:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global mem_setoptions\n.type mem_setoptions, %function\nmem_setoptions:\n.LFB27:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <string.h> #include <stdlib.h> #include <stddef.h> /* apparently needed to define size_t */ # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "34" ], "var": [ "options" ] }, { "value": [ "2" ], "var": [ "options" ] }, { "value": [ "100" ], "var": [ "options" ] }, { "value": [ "27" ], "var": [ "options" ] }, { "value": [ "39" ], "var": [ "options" ] }, { "value": [ "28" ], "var": [ "options" ] }, { "value": [ "8" ], "var": [ "options" ] }, { "value": [ "30" ], "var": [ "options" ] }, { "value": [ "34" ], "var": [ "options" ] }, { "value": [ "82" ], "var": [ "options" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_350r5r4w9a.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int options, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int options = input_json["options"]; clock_t begin = clock(); int returnv = mem_setoptions(options); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(options, returnv); }
master
null
{"livein": ["options"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "mem_setoptions", "funargs": ["options"], "typemap": {"options": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_350r5r4w9a.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
qwertzdenek/glucose/evo.c
float evaluation_avg(float new_val, float old_val, int i) { return old_val * i / (i + 1) + new_val / (i + 1); }
float evaluation_avg(floatnew_val, floatold_val, inti)
float evaluation_avg(float new_val, float old_val, int i)
evaluation_avg
[ "float", "float", "float", "int" ]
{ "code": [ ".globl evaluation_avg\n.type evaluation_avg, @function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t%xmm1, -8(%rbp)\n\tmovl\t%edi, -12(%rbp)\n\tcvtsi2ssl\t-12(%rbp), %xmm0\n\tmulss\t-8(%rbp), %xmm0\n\tmovl\t-12(%rbp), %eax\n\taddl\t$1, %eax\n\tcvtsi2ssl\t%eax, %xmm1\n\tdivss\t%xmm1, %xmm0\n\tmovaps\t%xmm0, %xmm1\n\tmovl\t-12(%rbp), %eax\n\taddl\t$1, %eax\n\tcvtsi2ssl\t%eax, %xmm2\n\tmovss\t-4(%rbp), %xmm0\n\tdivss\t%xmm2, %xmm0\n\taddss\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl evaluation_avg\n.type evaluation_avg, @function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcvtsi2ssl\t%edi, %xmm2\n\tleal\t1(%rdi), %eax\n\tcvtsi2ssl\t%eax, %xmm3\n\tmulss\t%xmm1, %xmm2\n\tdivss\t%xmm3, %xmm0\n\tdivss\t%xmm3, %xmm2\n\taddss\t%xmm2, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl evaluation_avg\n.type evaluation_avg, @function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm2, %xmm2\n\tleal\t1(%rdi), %eax\n\tpxor\t%xmm3, %xmm3\n\tcvtsi2ssl\t%edi, %xmm2\n\tcvtsi2ssl\t%eax, %xmm3\n\tmulss\t%xmm1, %xmm2\n\tdivss\t%xmm3, %xmm0\n\tdivss\t%xmm3, %xmm2\n\taddss\t%xmm2, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global evaluation_avg\n.type evaluation_avg, %function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tstr\ts1, [sp, 8]\n\tstr\tw0, [sp, 4]\n\tldr\ts0, [sp, 4]\n\tscvtf\ts1, s0\n\tldr\ts0, [sp, 8]\n\tfmul\ts1, s1, s0\n\tldr\tw0, [sp, 4]\n\tadd\tw0, w0, 1\n\tscvtf\ts0, w0\n\tfdiv\ts1, s1, s0\n\tldr\tw0, [sp, 4]\n\tadd\tw0, w0, 1\n\tscvtf\ts0, w0\n\tldr\ts2, [sp, 12]\n\tfdiv\ts0, s2, s0\n\tfadd\ts0, s1, s0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global evaluation_avg\n.type evaluation_avg, %function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tscvtf\ts2, w0\n\tadd\tw1, w0, 1\n\tscvtf\ts3, w1\n\tfmul\ts2, s2, s1\n\tfdiv\ts0, s0, s3\n\tfdiv\ts2, s2, s3\n\tfadd\ts0, s2, s0\n\tret\n\t.cfi_endproc\n\n", ".global evaluation_avg\n.type evaluation_avg, %function\nevaluation_avg:\n.LFB0:\n\t.cfi_startproc\n\tscvtf\ts2, w0\n\tadd\tw1, w0, 1\n\tscvtf\ts3, w1\n\tfmul\ts2, s2, s1\n\tfdiv\ts0, s0, s3\n\tfdiv\ts2, s2, s3\n\tfadd\ts0, s2, s0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "58.2560608688", "33.1740633482", "102" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "47.279333379", "94.5458707816", "66" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "34.6640120147", "98.6078328884", "33" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "38.7169548217", "24.9587868433", "73" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "93.3169059331", "57.783449738", "50" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "54.7162676082", "55.743664275", "40" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "67.3471811075", "64.7392718", "9" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "79.6161042497", "89.3604380759", "28" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "39.6870608036", "53.6261815557", "50" ], "var": [ "new_val", "old_val", "i" ] }, { "value": [ "85.4507206015", "80.5049046315", "53" ], "var": [ "new_val", "old_val", "i" ] } ], "output": [ { "value": [ "33.417579650878906" ], "var": [ "returnv" ] }, { "value": [ "93.84039306640625" ], "var": [ "returnv" ] }, { "value": [ "96.72713470458984" ], "var": [ "returnv" ] }, { "value": [ "25.14470672607422" ], "var": [ "returnv" ] }, { "value": [ "58.480186462402344" ], "var": [ "returnv" ] }, { "value": [ "55.718605041503906" ], "var": [ "returnv" ] }, { "value": [ "65.00006103515625" ], "var": [ "returnv" ] }, { "value": [ "89.02442932128906" ], "var": [ "returnv" ] }, { "value": [ "53.352867126464844" ], "var": [ "returnv" ] }, { "value": [ "80.59648895263672" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_31pwugea7n.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(float new_val, float old_val, int i, float returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); float new_val = input_json["new_val"]; float old_val = input_json["old_val"]; int i = input_json["i"]; clock_t begin = clock(); float returnv = evaluation_avg(new_val, old_val, i); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(new_val, old_val, i, returnv); }
master
null
{"livein": ["new_val", "old_val", "i"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "evaluation_avg", "funargs": ["new_val", "old_val", "i"], "typemap": {"new_val": "float32", "old_val": "float32", "i": "int32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31pwugea7n.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
JasonVann/ComputerArchitecture/CSAPP/Practice/pointer.c
int fun(int x, int *p) { return x + *p; }
int fun(intx, int *p)
int fun(int x, int *p)
fun
[ "int", "int", "int *" ]
{ "code": [ ".globl fun\n.type fun, @function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t-16(%rbp), %rax\n\tmovl\t(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fun\n.type fun, @function\nfun:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\taddl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fun\n.type fun, @function\nfun:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rsi), %eax\n\taddl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global fun\n.type fun, %function\nfun:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp]\n\tldr\tw1, [x0]\n\tldr\tw0, [sp, 12]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fun\n.type fun, %function\nfun:\n.LFB13:\n\t.cfi_startproc\n\tldr\tw1, [x1]\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global fun\n.type fun, %function\nfun:\n.LFB23:\n\t.cfi_startproc\n\tldr\tw1, [x1]\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "72", "[81, 54, 110, 12, 47, 3, 60, 28, 43, 74, 0, 91, 116, 74, 106, 36, 39, 18, 114, 25, 29, 92, 99, 27, 29, 19, 123, 72, 54, 53, 55, 28]" ], "var": [ "x", "p" ] }, { "value": [ "110", "[48, 35, 40, 49, 123, 109, 83, 56, 117, 32, 63, 78, 103, 15, 56, 35, 82, 71, 58, 84, 113, 6, 84, 89, 65, 123, 41, 98, 21, 7, 106, 103]" ], "var": [ "x", "p" ] }, { "value": [ "77", "[94, 49, 57, 82, 86, 63, 107, 2, 98, 103, 102, 76, 99, 51, 117, 120, 33, 4, 13, 124, 39, 82, 121, 7, 16, 106, 115, 87, 38, 6, 86, 47]" ], "var": [ "x", "p" ] }, { "value": [ "114", "[46, 61, 92, 71, 69, 44, 99, 87, 8, 80, 25, 12, 108, 15, 76, 61, 114, 88, 45, 59, 117, 24, 64, 103, 74, 93, 40, 50, 31, 64, 70, 29]" ], "var": [ "x", "p" ] }, { "value": [ "5", "[90, 79, 63, 114, 103, 35, 66, 82, 83, 119, 24, 2, 102, 115, 43, 3, 119, 109, 48, 90, 86, 26, 59, 23, 106, 13, 28, 103, 72, 29, 95, 86]" ], "var": [ "x", "p" ] }, { "value": [ "97", "[21, 47, 123, 72, 61, 124, 52, 103, 104, 2, 20, 3, 78, 117, 30, 8, 103, 8, 91, 108, 78, 78, 13, 64, 28, 87, 102, 75, 118, 120, 42, 53]" ], "var": [ "x", "p" ] }, { "value": [ "10", "[20, 32, 36, 60, 117, 95, 1, 33, 97, 30, 98, 107, 120, 115, 7, 44, 41, 88, 76, 87, 110, 52, 35, 66, 118, 54, 118, 36, 2, 98, 119, 83]" ], "var": [ "x", "p" ] }, { "value": [ "79", "[97, 87, 79, 22, 49, 76, 48, 48, 99, 43, 62, 114, 4, 12, 0, 54, 97, 59, 78, 4, 18, 16, 120, 96, 72, 112, 41, 33, 65, 89, 81, 50]" ], "var": [ "x", "p" ] }, { "value": [ "27", "[54, 38, 91, 125, 90, 103, 107, 93, 10, 103, 70, 64, 126, 5, 111, 80, 70, 32, 120, 22, 68, 72, 92, 126, 44, 46, 4, 106, 102, 55, 74, 3]" ], "var": [ "x", "p" ] }, { "value": [ "71", "[35, 93, 126, 59, 71, 83, 50, 124, 26, 63, 53, 112, 82, 6, 42, 61, 3, 37, 88, 39, 90, 58, 100, 24, 79, 32, 40, 102, 50, 17, 47, 52]" ], "var": [ "x", "p" ] } ], "output": [ { "value": [ "[81, 54, 110, 12, 47, 3, 60, 28, 43, 74, 0, 91, 116, 74, 106, 36, 39, 18, 114, 25, 29, 92, 99, 27, 29, 19, 123, 72, 54, 53, 55, 28]", "153" ], "var": [ "p", "returnv" ] }, { "value": [ "[48, 35, 40, 49, 123, 109, 83, 56, 117, 32, 63, 78, 103, 15, 56, 35, 82, 71, 58, 84, 113, 6, 84, 89, 65, 123, 41, 98, 21, 7, 106, 103]", "158" ], "var": [ "p", "returnv" ] }, { "value": [ "[94, 49, 57, 82, 86, 63, 107, 2, 98, 103, 102, 76, 99, 51, 117, 120, 33, 4, 13, 124, 39, 82, 121, 7, 16, 106, 115, 87, 38, 6, 86, 47]", "171" ], "var": [ "p", "returnv" ] }, { "value": [ "[46, 61, 92, 71, 69, 44, 99, 87, 8, 80, 25, 12, 108, 15, 76, 61, 114, 88, 45, 59, 117, 24, 64, 103, 74, 93, 40, 50, 31, 64, 70, 29]", "160" ], "var": [ "p", "returnv" ] }, { "value": [ "[90, 79, 63, 114, 103, 35, 66, 82, 83, 119, 24, 2, 102, 115, 43, 3, 119, 109, 48, 90, 86, 26, 59, 23, 106, 13, 28, 103, 72, 29, 95, 86]", "95" ], "var": [ "p", "returnv" ] }, { "value": [ "[21, 47, 123, 72, 61, 124, 52, 103, 104, 2, 20, 3, 78, 117, 30, 8, 103, 8, 91, 108, 78, 78, 13, 64, 28, 87, 102, 75, 118, 120, 42, 53]", "118" ], "var": [ "p", "returnv" ] }, { "value": [ "[20, 32, 36, 60, 117, 95, 1, 33, 97, 30, 98, 107, 120, 115, 7, 44, 41, 88, 76, 87, 110, 52, 35, 66, 118, 54, 118, 36, 2, 98, 119, 83]", "30" ], "var": [ "p", "returnv" ] }, { "value": [ "[97, 87, 79, 22, 49, 76, 48, 48, 99, 43, 62, 114, 4, 12, 0, 54, 97, 59, 78, 4, 18, 16, 120, 96, 72, 112, 41, 33, 65, 89, 81, 50]", "176" ], "var": [ "p", "returnv" ] }, { "value": [ "[54, 38, 91, 125, 90, 103, 107, 93, 10, 103, 70, 64, 126, 5, 111, 80, 70, 32, 120, 22, 68, 72, 92, 126, 44, 46, 4, 106, 102, 55, 74, 3]", "81" ], "var": [ "p", "returnv" ] }, { "value": [ "[35, 93, 126, 59, 71, 83, 50, 124, 26, 63, 53, 112, 82, 6, 42, 61, 3, 37, 88, 39, 90, 58, 100, 24, 79, 32, 40, 102, 50, 17, 47, 52]", "106" ], "var": [ "p", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54kwcwsbo7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int* p, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = p[i3]; output_temp_2.push_back(output_temp_4); } output_json["p"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; std::vector<int> input_temp_1_vec; for (auto& elem : input_json["p"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* p = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = fun(x, p); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, p, returnv); }
master
null
{"livein": ["x", "p"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "fun", "funargs": ["x", "p"], "typemap": {"x": "int32", "p": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54kwcwsbo7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
snake5/sgscript/src/sgs_xpc.c
int sgsXPC_SetCurrentDirectory( char* path ) { # 235 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/snake5/sgscript/refs/heads/apidev/src/sgs_xpc.c" return chdir( path ); }
int sgsXPC_SetCurrentDirectory(char *path)
int sgsXPC_SetCurrentDirectory( char* path )
sgsXPC_SetCurrentDirectory
[ "int", "char *" ]
{ "code": [ ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovq\t%rax, %rdi\n\tcall\tchdir@PLT\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovq\t%rax, %rdi\n\tmovl\t$0, %eax\n\tcall\tchdir@PLT\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tjmp\tchdir@PLT\n\t.cfi_endproc\n\n", ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tjmp\tchdir@PLT\n\t.cfi_endproc\n\n", ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tjmp\tchdir@PLT\n\t.cfi_endproc\n\n", ".globl sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, @function\nsgsXPC_SetCurrentDirectory:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tjmp\tchdir@PLT\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tx0, [sp, 24]\n\tldr\tx0, [sp, 24]\n\tbl\tchdir\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tx0, [sp, 24]\n\tldr\tx0, [sp, 24]\n\tbl\tchdir\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tb\tchdir\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB11:\n\t.cfi_startproc\n\tb\tchdir\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB0:\n\t.cfi_startproc\n\tb\tchdir\n\t.cfi_endproc\n\n", ".global sgsXPC_SetCurrentDirectory\n.type sgsXPC_SetCurrentDirectory, %function\nsgsXPC_SetCurrentDirectory:\n.LFB16:\n\t.cfi_startproc\n\tb\tchdir\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */ int chdir (char*) ;
#include <stdlib.h> #include <errno.h> # 1
{ "dummy_funcs": [ "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "#define MAX_STRING_SIZE 32\nint chdir (char * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n" ], "dummy_funcs_seed": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], "input": [ { "value": [ "\"ymgnptyhejnhboayaaryzmr\"" ], "var": [ "path" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"" ], "var": [ "path" ] }, { "value": [ "\"lfgj\"" ], "var": [ "path" ] }, { "value": [ "\"bmwt\"" ], "var": [ "path" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"" ], "var": [ "path" ] }, { "value": [ "\"byyoikvrbnv\"" ], "var": [ "path" ] }, { "value": [ "\"qiihcfzbn\"" ], "var": [ "path" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"ymgnptyhejnhboayaaryzmr\"" ], "var": [ "path" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"" ], "var": [ "path" ] }, { "value": [ "\"lfgj\"" ], "var": [ "path" ] }, { "value": [ "\"bmwt\"" ], "var": [ "path" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"" ], "var": [ "path" ] }, { "value": [ "\"byyoikvrbnv\"" ], "var": [ "path" ] }, { "value": [ "\"qiihcfzbn\"" ], "var": [ "path" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"ymgnptyhejnhboayaaryzmr\"" ], "var": [ "path" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"" ], "var": [ "path" ] }, { "value": [ "\"lfgj\"" ], "var": [ "path" ] }, { "value": [ "\"bmwt\"" ], "var": [ "path" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"" ], "var": [ "path" ] }, { "value": [ "\"byyoikvrbnv\"" ], "var": [ "path" ] }, { "value": [ "\"qiihcfzbn\"" ], "var": [ "path" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"ymgnptyhejnhboayaaryzmr\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lfgj\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"bmwt\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"byyoikvrbnv\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"qiihcfzbn\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "45" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ymgnptyhejnhboayaaryzmr\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lfgj\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"bmwt\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"byyoikvrbnv\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"qiihcfzbn\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "74" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ymgnptyhejnhboayaaryzmr\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lfgj\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"bmwt\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"byyoikvrbnv\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"qiihcfzbn\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "113" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "113" ], "var": [ "path", "returnv" ] } ] }
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"ymgnptyhejnhboayaaryzmr\"" ], "var": [ "path" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"" ], "var": [ "path" ] }, { "value": [ "\"lfgj\"" ], "var": [ "path" ] }, { "value": [ "\"bmwt\"" ], "var": [ "path" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"" ], "var": [ "path" ] }, { "value": [ "\"byyoikvrbnv\"" ], "var": [ "path" ] }, { "value": [ "\"qiihcfzbn\"" ], "var": [ "path" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] }, { "value": [ "\"\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"ymgnptyhejnhboayaaryzmr\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"ieqmjhjnwgfdqkkfccmpnalw\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lfgj\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"bmwt\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"gboejuidjfcpigqyyrssokaoj\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"byyoikvrbnv\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"qiihcfzbn\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"koafhprdqixxrfggxshuzecw\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "-1" ], "var": [ "path", "returnv" ] }, { "value": [ "\"\"", "-1" ], "var": [ "path", "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577744ugoanpuv.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path, int returnv) { json output_json; output_json["path"] = path; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = sgsXPC_SetCurrentDirectory(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_63fl6s1x2z.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path, int returnv) { json output_json; output_json["path"] = path; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = sgsXPC_SetCurrentDirectory(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path, returnv); }
apidev
null
{"livein": ["path"], "liveout": ["path"], "returnvarname": ["returnv"], "execcmd": "", "funname": "sgsXPC_SetCurrentDirectory", "funargs": ["path"], "typemap": {"path": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63fl6s1x2z.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
221V/kphp-kdb/targ/targ-import-dump.c
char *fname_last (char *ptr) { char *s = ptr; while (*ptr) { if (*ptr++ == '/') { s = ptr; } } return s; }
char * fname_last(char *ptr)
char *fname_last (char *ptr)
fname_last
[ "char *", "char *" ]
{ "code": [ ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$47, %al\n\tjne\t.L2\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n.L2:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$47, %al\n\tjne\t.L2\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n.L2:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n.L2:\n\tmovb\t(%rdi), %dl\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tincq\t%rdi\n\tcmpb\t$47, %dl\n\tcmove\t%rdi, %rax\n\tjmp\t.L2\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB48:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n.L2:\n\tmovb\t(%rdi), %dl\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tincq\t%rdi\n\tcmpb\t$47, %dl\n\tcmove\t%rdi, %rax\n\tjmp\t.L2\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %eax\n\tmovq\t%rdi, %r8\n\ttestb\t%al, %al\n\tje\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\taddq\t$1, %rdi\n\tcmpb\t$47, %al\n\tmovzbl\t(%rdi), %eax\n\tcmove\t%rdi, %r8\n\ttestb\t%al, %al\n\tjne\t.L4\n.L1:\n\tmovq\t%r8, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl fname_last\n.type fname_last, @function\nfname_last:\n.LFB63:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %eax\n\tmovq\t%rdi, %r8\n\ttestb\t%al, %al\n\tje\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\taddq\t$1, %rdi\n\tcmpb\t$47, %al\n\tmovzbl\t(%rdi), %eax\n\tcmove\t%rdi, %r8\n\ttestb\t%al, %al\n\tjne\t.L4\n.L1:\n\tmovq\t%r8, %rax\n\tret\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbne\t.L2\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tx0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbne\t.L2\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tx0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx1, x0\n.L2:\n\tldrb\tw2, [x1]\n\tcbnz\tw2, .L4\n\tret\n.L4:\n\tadd\tx1, x1, 1\n\tcmp\tw2, 47\n\tcsel\tx0, x0, x1, ne\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB48:\n\t.cfi_startproc\n\tmov\tx1, x0\n.L2:\n\tldrb\tw2, [x1]\n\tcbnz\tw2, .L4\n\tret\n.L4:\n\tadd\tx1, x1, 1\n\tcmp\tw2, 47\n\tcsel\tx0, x0, x1, ne\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tmov\tx1, x0\n\tcbz\tw2, .L1\n\t.p2align 3,,7\n.L4:\n\tadd\tx1, x1, 1\n\tcmp\tw2, 47\n\tcsel\tx0, x0, x1, ne\n\tldrb\tw2, [x1]\n\tcbnz\tw2, .L4\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global fname_last\n.type fname_last, %function\nfname_last:\n.LFB63:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tmov\tx1, x0\n\tcbz\tw2, .L1\n\t.p2align 3,,7\n.L4:\n\tadd\tx1, x1, 1\n\tcmp\tw2, 47\n\tcsel\tx0, x0, x1, ne\n\tldrb\tw2, [x1]\n\tcbnz\tw2, .L4\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */
#include <assert.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> # 1
{ "dummy_funcs": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ], "dummy_funcs_seed": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], "input": [ { "value": [ "\"ygzywiuakgapx\"" ], "var": [ "ptr" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr" ] }, { "value": [ "\"\"" ], "var": [ "ptr" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr" ] }, { "value": [ "\"bfz\"" ], "var": [ "ptr" ] }, { "value": [ "\"gznuqq\"" ], "var": [ "ptr" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr" ] }, { "value": [ "\"ayyj\"" ], "var": [ "ptr" ] }, { "value": [ "\"ygzywiuakgapx\"" ], "var": [ "ptr" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr" ] }, { "value": [ "\"\"" ], "var": [ "ptr" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr" ] }, { "value": [ "\"bfz\"" ], "var": [ "ptr" ] }, { "value": [ "\"gznuqq\"" ], "var": [ "ptr" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr" ] }, { "value": [ "\"ayyj\"" ], "var": [ "ptr" ] }, { "value": [ "\"ygzywiuakgapx\"" ], "var": [ "ptr" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr" ] }, { "value": [ "\"\"" ], "var": [ "ptr" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr" ] }, { "value": [ "\"bfz\"" ], "var": [ "ptr" ] }, { "value": [ "\"gznuqq\"" ], "var": [ "ptr" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr" ] }, { "value": [ "\"ayyj\"" ], "var": [ "ptr" ] } ], "output": [ { "value": [ "\"ygzywiuakgapx\"", "\"ygzywiuakgapx\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"", "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"", "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"\"", "\"\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"", "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"", "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"bfz\"", "\"bfz\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"gznuqq\"", "\"gznuqq\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"", "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ayyj\"", "\"ayyj\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ygzywiuakgapx\"", "\"ygzywiuakgapx\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"", "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"", "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"\"", "\"\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"", "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"", "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"bfz\"", "\"bfz\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"gznuqq\"", "\"gznuqq\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"", "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ayyj\"", "\"ayyj\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ygzywiuakgapx\"", "\"ygzywiuakgapx\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"", "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"", "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"\"", "\"\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"", "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"", "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"bfz\"", "\"bfz\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"gznuqq\"", "\"gznuqq\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"", "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ayyj\"", "\"ayyj\"" ], "var": [ "ptr", "returnv" ] } ] }
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"ygzywiuakgapx\"" ], "var": [ "ptr" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr" ] }, { "value": [ "\"\"" ], "var": [ "ptr" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr" ] }, { "value": [ "\"bfz\"" ], "var": [ "ptr" ] }, { "value": [ "\"gznuqq\"" ], "var": [ "ptr" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr" ] }, { "value": [ "\"ayyj\"" ], "var": [ "ptr" ] } ], "output": [ { "value": [ "\"ygzywiuakgapx\"", "\"ygzywiuakgapx\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"blpumglnzroywchzcxltqfurpbp\"", "\"blpumglnzroywchzcxltqfurpbp\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"", "\"uakgkkgcqyijdxsjnpjenbgvzgfej\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"\"", "\"\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"fkimbbilpyqruzwkl\"", "\"fkimbbilpyqruzwkl\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"xbvkvzxjpmtuudokequzwdyid\"", "\"xbvkvzxjpmtuudokequzwdyid\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"bfz\"", "\"bfz\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"gznuqq\"", "\"gznuqq\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"", "\"umbvcnuimkfkmecbnqmcmqhiaofhboe\"" ], "var": [ "ptr", "returnv" ] }, { "value": [ "\"ayyj\"", "\"ayyj\"" ], "var": [ "ptr", "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577740ib7nlsd_.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* ptr, char* returnv) { json output_json; output_json["ptr"] = ptr; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* ptr = strdup(input_json["ptr"].get<std::string>().c_str()); clock_t begin = clock(); char* returnv = fname_last(ptr); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ptr, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46uuddars8.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* ptr, char* returnv) { json output_json; output_json["ptr"] = ptr; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* ptr = strdup(input_json["ptr"].get<std::string>().c_str()); clock_t begin = clock(); char* returnv = fname_last(ptr); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ptr, returnv); }
master
null
{"livein": ["ptr"], "liveout": ["ptr"], "returnvarname": ["returnv"], "execcmd": "", "funname": "fname_last", "funargs": ["ptr"], "typemap": {"ptr": "string", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46uuddars8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
lorin/umdinst/test/testsource/loop.c
int do_sum(int n) { int i, sum; sum = 0; for(i=0;i<n;++i) { sum += i; } return sum; }
int do_sum(intn)
int do_sum(int n)
do_sum
[ "int", "int" ]
{ "code": [ ".globl do_sum\n.type do_sum, @function\ndo_sum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-8(%rbp), %eax\n\taddl\t%eax, -4(%rbp)\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjl\t.L3\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_sum\n.type do_sum, @function\ndo_sum:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%r8d, %r8d\n\txorl\t%eax, %eax\n.L2:\n\tcmpl\t%edi, %eax\n\tjge\t.L5\n\taddl\t%eax, %r8d\n\tincl\t%eax\n\tjmp\t.L2\n.L5:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_sum\n.type do_sum, @function\ndo_sum:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tjle\t.L8\n\tleal\t-1(%rdi), %eax\n\tcmpl\t$17, %eax\n\tjbe\t.L9\n\tmovl\t%edi, %edx\n\tmovdqa\t.LC0(%rip), %xmm1\n\txorl\t%eax, %eax\n\tpxor\t%xmm0, %xmm0\n\tmovdqa\t.LC1(%rip), %xmm3\n\tshrl\t$2, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovdqa\t%xmm1, %xmm2\n\taddl\t$1, %eax\n\tpaddd\t%xmm3, %xmm1\n\tpaddd\t%xmm2, %xmm0\n\tcmpl\t%edx, %eax\n\tjne\t.L4\n\tmovdqa\t%xmm0, %xmm1\n\tmovl\t%edi, %edx\n\tpsrldq\t$8, %xmm1\n\tandl\t$-4, %edx\n\tpaddd\t%xmm1, %xmm0\n\tmovdqa\t%xmm0, %xmm1\n\tpsrldq\t$4, %xmm1\n\tpaddd\t%xmm1, %xmm0\n\tmovd\t%xmm0, %eax\n\ttestb\t$3, %dil\n\tje\t.L13\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\taddl\t%edx, %eax\n\taddl\t$1, %edx\n\tcmpl\t%edx, %edi\n\tjg\t.L7\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L13:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\txorl\t%eax, %eax\n\tret\n.L9:\n\txorl\t%eax, %eax\n\txorl\t%edx, %edx\n\tjmp\t.L7\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t4\n", ".global do_sum\n.type do_sum, %function\ndo_sum:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\twzr, [sp, 28]\n\tstr\twzr, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tblt\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global do_sum\n.type do_sum, %function\ndo_sum:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw1, 0\n\tmov\tw0, 0\n.L2:\n\tcmp\tw1, w2\n\tblt\t.L3\n\tret\n.L3:\n\tadd\tw0, w0, w1\n\tadd\tw1, w1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global do_sum\n.type do_sum, %function\ndo_sum:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 0\n\tble\t.L7\n\tsub\tw0, w0, #1\n\tcmp\tw0, 11\n\tbls\t.L8\n\tadrp\tx1, .LC0\n\tlsr\tw0, w2, 2\n\tmovi\tv0.4s, 0\n\tmovi\tv3.4s, 0x4\n\tldr\tq1, [x1, #:lo12:.LC0]\n\tmov\tw1, 0\n\t.p2align 3,,7\n.L4:\n\tmov\tv2.16b, v1.16b\n\tadd\tw1, w1, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw1, w0\n\tadd\tv0.4s, v0.4s, v2.4s\n\tbne\t.L4\n\taddv\ts0, v0.4s\n\ttst\tx2, 3\n\tand\tw1, w2, -4\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n.L3:\n\tadd\tw3, w1, 1\n\tadd\tw0, w0, w1\n\tcmp\tw2, w3\n\tble\t.L1\n\tadd\tw4, w1, 2\n\tadd\tw0, w0, w3\n\tcmp\tw2, w4\n\tble\t.L1\n\tadd\tw3, w1, 3\n\tadd\tw0, w0, w4\n\tcmp\tw2, w3\n\tble\t.L1\n\tadd\tw4, w1, 4\n\tadd\tw0, w0, w3\n\tcmp\tw2, w4\n\tble\t.L1\n\tadd\tw3, w1, 5\n\tadd\tw0, w0, w4\n\tcmp\tw2, w3\n\tble\t.L1\n\tadd\tw4, w1, 6\n\tadd\tw0, w0, w3\n\tcmp\tw2, w4\n\tble\t.L1\n\tadd\tw3, w1, 7\n\tadd\tw0, w0, w4\n\tcmp\tw2, w3\n\tble\t.L1\n\tadd\tw4, w1, 8\n\tadd\tw0, w0, w3\n\tcmp\tw2, w4\n\tble\t.L1\n\tadd\tw3, w1, 9\n\tadd\tw0, w0, w4\n\tcmp\tw2, w3\n\tble\t.L1\n\tadd\tw4, w1, 10\n\tadd\tw0, w0, w3\n\tcmp\tw2, w4\n\tble\t.L1\n\tadd\tw0, w0, w4\n\tadd\tw1, w1, 11\n\tcmp\tw2, w1\n\tadd\tw1, w0, w1\n\tcsel\tw0, w1, w0, gt\n.L1:\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 0\n\tret\n.L8:\n\tmov\tw0, 0\n\tmov\tw1, 0\n\tb\t.L3\n\t.cfi_endproc\n.LC0: \t.word\t0\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "45" ], "var": [ "n" ] }, { "value": [ "101" ], "var": [ "n" ] }, { "value": [ "20" ], "var": [ "n" ] }, { "value": [ "107" ], "var": [ "n" ] }, { "value": [ "37" ], "var": [ "n" ] }, { "value": [ "89" ], "var": [ "n" ] }, { "value": [ "4" ], "var": [ "n" ] }, { "value": [ "70" ], "var": [ "n" ] }, { "value": [ "67" ], "var": [ "n" ] }, { "value": [ "47" ], "var": [ "n" ] } ], "output": [ { "value": [ "990" ], "var": [ "returnv" ] }, { "value": [ "5050" ], "var": [ "returnv" ] }, { "value": [ "190" ], "var": [ "returnv" ] }, { "value": [ "5671" ], "var": [ "returnv" ] }, { "value": [ "666" ], "var": [ "returnv" ] }, { "value": [ "3916" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "2415" ], "var": [ "returnv" ] }, { "value": [ "2211" ], "var": [ "returnv" ] }, { "value": [ "1081" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_575wzrxkwv.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = do_sum(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "do_sum", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_575wzrxkwv.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dc-square/SimpleMessage/paho/Heap.c
int Heap_initialize() { return 0; }
int Heap_initialize()
int Heap_initialize()
Heap_initialize
[ "int", "" ]
{ "code": [ ".globl Heap_initialize\n.type Heap_initialize, @function\nHeap_initialize:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl Heap_initialize\n.type Heap_initialize, @function\nHeap_initialize:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl Heap_initialize\n.type Heap_initialize, @function\nHeap_initialize:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global Heap_initialize\n.type Heap_initialize, %function\nHeap_initialize:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global Heap_initialize\n.type Heap_initialize, %function\nHeap_initialize:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global Heap_initialize\n.type Heap_initialize, %function\nHeap_initialize:\n.LFB50:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <memory.h> #include <stdlib.h> #include <string.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_501pmwql__.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = Heap_initialize(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "Heap_initialize", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_501pmwql__.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
yumeyao/zopfli_cgbi/src/zopfli/util.c
int ZopfliGetDistExtraBits(int dist) { if (dist < 5) return 0; else if (dist < 9) return 1; else if (dist < 17) return 2; else if (dist < 33) return 3; else if (dist < 65) return 4; else if (dist < 129) return 5; else if (dist < 257) return 6; else if (dist < 513) return 7; else if (dist < 1025) return 8; else if (dist < 2049) return 9; else if (dist < 4097) return 10; else if (dist < 8193) return 11; else if (dist < 16385) return 12; else return 13; }
int ZopfliGetDistExtraBits(intdist)
int ZopfliGetDistExtraBits(int dist)
ZopfliGetDistExtraBits
[ "int", "int" ]
{ "code": [ ".globl ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, @function\nZopfliGetDistExtraBits:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$4, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$8, -4(%rbp)\n\tjg\t.L4\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L4:\n\tcmpl\t$16, -4(%rbp)\n\tjg\t.L5\n\tmovl\t$2, %eax\n\tjmp\t.L3\n.L5:\n\tcmpl\t$32, -4(%rbp)\n\tjg\t.L6\n\tmovl\t$3, %eax\n\tjmp\t.L3\n.L6:\n\tcmpl\t$64, -4(%rbp)\n\tjg\t.L7\n\tmovl\t$4, %eax\n\tjmp\t.L3\n.L7:\n\tcmpl\t$128, -4(%rbp)\n\tjg\t.L8\n\tmovl\t$5, %eax\n\tjmp\t.L3\n.L8:\n\tcmpl\t$256, -4(%rbp)\n\tjg\t.L9\n\tmovl\t$6, %eax\n\tjmp\t.L3\n.L9:\n\tcmpl\t$512, -4(%rbp)\n\tjg\t.L10\n\tmovl\t$7, %eax\n\tjmp\t.L3\n.L10:\n\tcmpl\t$1024, -4(%rbp)\n\tjg\t.L11\n\tmovl\t$8, %eax\n\tjmp\t.L3\n.L11:\n\tcmpl\t$2048, -4(%rbp)\n\tjg\t.L12\n\tmovl\t$9, %eax\n\tjmp\t.L3\n.L12:\n\tcmpl\t$4096, -4(%rbp)\n\tjg\t.L13\n\tmovl\t$10, %eax\n\tjmp\t.L3\n.L13:\n\tcmpl\t$8192, -4(%rbp)\n\tjg\t.L14\n\tmovl\t$11, %eax\n\tjmp\t.L3\n.L14:\n\tcmpl\t$16384, -4(%rbp)\n\tjg\t.L15\n\tmovl\t$12, %eax\n\tjmp\t.L3\n.L15:\n\tmovl\t$13, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, @function\nZopfliGetDistExtraBits:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$4, %edi\n\tjle\t.L1\n\tmovl\t$1, %eax\n\tcmpl\t$8, %edi\n\tjle\t.L1\n\tmovl\t$2, %eax\n\tcmpl\t$16, %edi\n\tjle\t.L1\n\tmovl\t$3, %eax\n\tcmpl\t$32, %edi\n\tjle\t.L1\n\tmovl\t$4, %eax\n\tcmpl\t$64, %edi\n\tjle\t.L1\n\tmovl\t$5, %eax\n\tcmpl\t$128, %edi\n\tjle\t.L1\n\tmovl\t$6, %eax\n\tcmpl\t$256, %edi\n\tjle\t.L1\n\tmovl\t$7, %eax\n\tcmpl\t$512, %edi\n\tjle\t.L1\n\tmovl\t$8, %eax\n\tcmpl\t$1024, %edi\n\tjle\t.L1\n\tmovl\t$9, %eax\n\tcmpl\t$2048, %edi\n\tjle\t.L1\n\tmovl\t$10, %eax\n\tcmpl\t$4096, %edi\n\tjle\t.L1\n\tmovl\t$11, %eax\n\tcmpl\t$8192, %edi\n\tjle\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$16385, %edi\n\tsetge\t%al\n\taddl\t$12, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, @function\nZopfliGetDistExtraBits:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$4, %edi\n\tjle\t.L1\n\tmovl\t$1, %eax\n\tcmpl\t$8, %edi\n\tjle\t.L1\n\tmovl\t$2, %eax\n\tcmpl\t$16, %edi\n\tjle\t.L1\n\tmovl\t$3, %eax\n\tcmpl\t$32, %edi\n\tjle\t.L1\n\tmovl\t$4, %eax\n\tcmpl\t$64, %edi\n\tjle\t.L1\n\tmovl\t$5, %eax\n\tcmpl\t$128, %edi\n\tjle\t.L1\n\tmovl\t$6, %eax\n\tcmpl\t$256, %edi\n\tjle\t.L1\n\tmovl\t$7, %eax\n\tcmpl\t$512, %edi\n\tjle\t.L1\n\tmovl\t$8, %eax\n\tcmpl\t$1024, %edi\n\tjle\t.L1\n\tmovl\t$9, %eax\n\tcmpl\t$2048, %edi\n\tjle\t.L1\n\tmovl\t$10, %eax\n\tcmpl\t$4096, %edi\n\tjle\t.L1\n\tmovl\t$11, %eax\n\tcmpl\t$8192, %edi\n\tjle\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$16384, %edi\n\tsetg\t%al\n\taddl\t$12, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, %function\nZopfliGetDistExtraBits:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4\n\tbgt\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 8\n\tbgt\t.L4\n\tmov\tw0, 1\n\tb\t.L3\n.L4:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 16\n\tbgt\t.L5\n\tmov\tw0, 2\n\tb\t.L3\n.L5:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 32\n\tbgt\t.L6\n\tmov\tw0, 3\n\tb\t.L3\n.L6:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 64\n\tbgt\t.L7\n\tmov\tw0, 4\n\tb\t.L3\n.L7:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 128\n\tbgt\t.L8\n\tmov\tw0, 5\n\tb\t.L3\n.L8:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 256\n\tbgt\t.L9\n\tmov\tw0, 6\n\tb\t.L3\n.L9:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 512\n\tbgt\t.L10\n\tmov\tw0, 7\n\tb\t.L3\n.L10:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1024\n\tbgt\t.L11\n\tmov\tw0, 8\n\tb\t.L3\n.L11:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2048\n\tbgt\t.L12\n\tmov\tw0, 9\n\tb\t.L3\n.L12:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4096\n\tbgt\t.L13\n\tmov\tw0, 10\n\tb\t.L3\n.L13:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 8192\n\tbgt\t.L14\n\tmov\tw0, 11\n\tb\t.L3\n.L14:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 16384\n\tbgt\t.L15\n\tmov\tw0, 12\n\tb\t.L3\n.L15:\n\tmov\tw0, 13\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, %function\nZopfliGetDistExtraBits:\n.LFB24:\n\t.cfi_startproc\n\tcmp\tw0, 4\n\tble\t.L3\n\tcmp\tw0, 8\n\tble\t.L4\n\tcmp\tw0, 16\n\tble\t.L5\n\tcmp\tw0, 32\n\tble\t.L6\n\tcmp\tw0, 64\n\tble\t.L7\n\tcmp\tw0, 128\n\tble\t.L8\n\tcmp\tw0, 256\n\tble\t.L9\n\tcmp\tw0, 512\n\tble\t.L10\n\tcmp\tw0, 1024\n\tble\t.L11\n\tcmp\tw0, 2048\n\tble\t.L12\n\tcmp\tw0, 4096\n\tble\t.L13\n\tcmp\tw0, 8192\n\tble\t.L14\n\tcmp\tw0, 16384\n\tcset\tw0, gt\n\tadd\tw0, w0, 12\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n.L4:\n\tmov\tw0, 1\n\tb\t.L1\n.L5:\n\tmov\tw0, 2\n\tb\t.L1\n.L6:\n\tmov\tw0, 3\n\tb\t.L1\n.L7:\n\tmov\tw0, 4\n\tb\t.L1\n.L8:\n\tmov\tw0, 5\n\tb\t.L1\n.L9:\n\tmov\tw0, 6\n\tb\t.L1\n.L10:\n\tmov\tw0, 7\n\tb\t.L1\n.L11:\n\tmov\tw0, 8\n\tb\t.L1\n.L12:\n\tmov\tw0, 9\n\tb\t.L1\n.L13:\n\tmov\tw0, 10\n\tb\t.L1\n.L14:\n\tmov\tw0, 11\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global ZopfliGetDistExtraBits\n.type ZopfliGetDistExtraBits, %function\nZopfliGetDistExtraBits:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 0\n\tcmp\tw1, 4\n\tble\t.L1\n\tcmp\tw1, 8\n\tmov\tw0, 1\n\tble\t.L1\n\tcmp\tw1, 16\n\tmov\tw0, 2\n\tble\t.L1\n\tcmp\tw1, 32\n\tmov\tw0, 3\n\tble\t.L1\n\tcmp\tw1, 64\n\tmov\tw0, 4\n\tble\t.L1\n\tcmp\tw1, 128\n\tmov\tw0, 5\n\tble\t.L1\n\tcmp\tw1, 256\n\tmov\tw0, 6\n\tble\t.L1\n\tcmp\tw1, 512\n\tmov\tw0, 7\n\tble\t.L1\n\tcmp\tw1, 1024\n\tmov\tw0, 8\n\tble\t.L1\n\tcmp\tw1, 2048\n\tmov\tw0, 9\n\tble\t.L1\n\tcmp\tw1, 4096\n\tmov\tw0, 10\n\tble\t.L1\n\tcmp\tw1, 8192\n\tmov\tw0, 11\n\tble\t.L1\n\tcmp\tw1, 16384\n\tcset\tw0, gt\n\tadd\tw0, w0, 12\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <assert.h> #include <stdio.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "31" ], "var": [ "dist" ] }, { "value": [ "101" ], "var": [ "dist" ] }, { "value": [ "23" ], "var": [ "dist" ] }, { "value": [ "21" ], "var": [ "dist" ] }, { "value": [ "31" ], "var": [ "dist" ] }, { "value": [ "10" ], "var": [ "dist" ] }, { "value": [ "38" ], "var": [ "dist" ] }, { "value": [ "50" ], "var": [ "dist" ] }, { "value": [ "69" ], "var": [ "dist" ] }, { "value": [ "108" ], "var": [ "dist" ] } ], "output": [ { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_370gltfdlb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int dist, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int dist = input_json["dist"]; clock_t begin = clock(); int returnv = ZopfliGetDistExtraBits(dist); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(dist, returnv); }
master
null
{"livein": ["dist"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ZopfliGetDistExtraBits", "funargs": ["dist"], "typemap": {"dist": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_370gltfdlb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
PeterStan/SysLabCache/CacheTest.c
int testAll(void){ return 0; }
int testAll()
int testAll(void)
testAll
[ "int", "" ]
{ "code": [ ".globl testAll\n.type testAll, @function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl testAll\n.type testAll, @function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl testAll\n.type testAll, @function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global testAll\n.type testAll, %function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global testAll\n.type testAll, %function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global testAll\n.type testAll, %function\ntestAll:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <assert.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_34koqvqjfb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = testAll(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "testAll", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_34koqvqjfb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
BreakawayLabs/mom/src/tools/shared/mpp.c
void mpp_recv_double(double* data, int size, int from_pe) { }
void mpp_recv_double(double *data, intsize, intfrom_pe)
void mpp_recv_double(double* data, int size, int from_pe)
mpp_recv_double
[ "void", "double *", "int", "int" ]
{ "code": [ ".globl mpp_recv_double\n.type mpp_recv_double, @function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t%esi, -12(%rbp)\n\tmovl\t%edx, -16(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl mpp_recv_double\n.type mpp_recv_double, @function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl mpp_recv_double\n.type mpp_recv_double, @function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global mpp_recv_double\n.type mpp_recv_double, %function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\tw2, [sp]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global mpp_recv_double\n.type mpp_recv_double, %function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global mpp_recv_double\n.type mpp_recv_double, %function\nmpp_recv_double:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[8.96325799893, 54.8013439659, 29.6815900209, 41.1738622563, 98.2929041271, 44.0605072636, 78.1004647916, 20.3167126756, 10.8760771783, 56.8786154832, 86.0064642099, 10.5356003407, 50.9798121742, 64.6431245944, 58.7579389435, 79.8180171767, 16.8141524594, 29.2763329412, 64.4071185007, 54.0202768726, 28.5534502397, 93.7577378762, 72.4142255186, 18.6856429429, 8.78066802963, 72.5095093341, 35.533214054, 3.86455452927, 38.5915019176, 43.9345899219, 11.5556218554, 94.4603909003]", "23", "109" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[82.5719440466, 67.4655323001, 5.17903065048, 37.17676886, 29.5464696539, 71.4770719891, 11.2815186145, 27.0060482152, 83.5398341273, 73.2050224679, 81.6310536715, 50.9471091174, 30.8832325655, 95.375142694, 7.02489418795, 6.85741335018, 30.0328937008, 1.54053530004, 84.9769901818, 4.64319763514, 52.4411124953, 80.2274443688, 17.4771798729, 68.3237873052, 87.853923802, 91.100023397, 94.3510473034, 77.6235870571, 89.6251215725, 15.9675537262, 24.7228452118, 81.233333651]", "87", "101" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[1.43812926474, 67.3991986419, 75.0614339274, 73.1674585204, 97.7511337449, 76.8328069517, 69.3497114175, 57.6181629729, 27.5664933768, 41.8102654201, 58.0449006604, 52.7118914976, 44.9765646587, 3.85672778818, 98.2213746923, 42.7774479461, 10.9717102159, 15.918163433, 58.1984347456, 50.6780176877, 32.6591649559, 21.8434322505, 77.5649608013, 67.8711249688, 81.0229681471, 43.5729849994, 37.2764852764, 13.7871530588, 15.8386612743, 95.1954229467, 52.8449200776, 84.9603920392]", "88", "67" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[40.8894684535, 60.8620985514, 83.0435785487, 45.4354852413, 54.4777650836, 42.5641185194, 4.49470671208, 94.2291339842, 5.89995979428, 7.21497952031, 7.51065236765, 28.6306758767, 30.5723663236, 27.3625297028, 43.8725732028, 89.110602393, 59.7183649303, 97.3040330824, 81.3938197848, 83.0338003759, 63.2410663031, 38.1536418599, 71.8804739649, 2.63557428369, 75.5307604457, 52.2839655218, 10.234240399, 19.9162950652, 63.3619897733, 76.6149698647, 48.5563148995, 34.8986865343]", "51", "90" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[99.5785251261, 50.110681341, 95.3596114037, 27.536539124, 78.3051842004, 42.4891312094, 56.8388740677, 73.7754436332, 8.03665296289, 2.62202070649, 52.3504098, 48.3608846064, 74.2133956593, 61.4887031349, 9.91298816971, 52.07947721, 93.7514827901, 97.1348577338, 54.2143492264, 28.5410699879, 89.2865790723, 45.6935996651, 3.62516236367, 35.0168320304, 23.8751577065, 29.5474838789, 60.3451760553, 20.5884767275, 44.4260942506, 83.1574485745, 98.0944176254, 45.7573854175]", "3", "50" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[97.6039745319, 6.07221905509, 38.9748907763, 9.74849635696, 86.4040556299, 55.7741820643, 57.5003438194, 40.8036031875, 99.6313554218, 77.8984470066, 77.9946050322, 85.6495401169, 92.9056049774, 17.7169445504, 88.9513920654, 13.986362305, 26.3645207154, 44.3901795191, 27.4147954269, 43.7193789871, 46.0240104209, 34.1402065492, 66.9206104324, 29.9401584199, 20.2099759211, 93.5107240607, 6.9974806573, 91.8262640295, 21.2120767594, 76.03393637, 32.0961595773, 54.9150875991]", "113", "123" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[70.2122852781, 44.2501040005, 65.1080552242, 5.90904675569, 19.0512425666, 4.19411136818, 45.269986288, 15.0801136274, 31.5142772413, 28.8374076963, 63.3438181355, 45.9791891498, 84.3514886588, 87.4748524187, 79.4804928223, 18.1328386972, 58.0689830924, 39.3522622566, 18.6690627116, 97.2885324561, 28.0637617333, 64.2368542686, 18.4995011077, 7.31222213434, 28.005349513, 10.7403520035, 96.1409351455, 51.335999538, 71.8082705089, 8.9276275893, 38.6039674697, 66.3767580167]", "107", "4" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[81.4711998673, 45.8046994695, 15.634222275, 79.9386639222, 65.5770576965, 8.33130112762, 13.2990038717, 38.8631790351, 79.3742791359, 89.7273799865, 80.855295288, 66.0779253937, 24.6311435179, 34.3637989468, 73.0626238454, 6.82310109389, 6.81122900661, 53.3411111364, 68.3507779573, 34.6137881286, 62.1800407833, 53.2185482387, 9.67448053548, 83.2089965845, 87.7660132731, 92.7799230016, 66.245880106, 17.155484776, 16.941419622, 36.3224791178, 21.8077090464, 0.836873880366]", "80", "115" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[43.3748722172, 8.69244679731, 36.997905198, 70.6360442131, 16.6203713435, 78.5854783915, 60.0816205099, 5.04058316498, 42.9047674597, 67.8251278793, 49.05292626, 94.5372153049, 22.7625904166, 16.5007017998, 1.31949119852, 79.51184149, 11.3066953744, 70.4147706189, 96.1222880392, 37.3016015479, 65.0154668327, 75.770272089, 20.0059922883, 80.0204237094, 20.7744246912, 41.5151464669, 48.1291278201, 63.1201984162, 27.012117548, 97.7404671024, 64.6152251757, 56.6786909012]", "66", "13" ], "var": [ "data", "size", "from_pe" ] }, { "value": [ "[10.4082793677, 67.5382771494, 55.7801879306, 2.10136513783, 59.4227172932, 74.909052997, 54.5157868595, 69.3023421045, 26.6059779436, 70.6179007901, 75.7949024294, 45.8416158517, 48.0089226901, 41.9834802949, 42.8784270639, 24.4440426931, 91.3740326563, 35.342683536, 24.6515362748, 42.1849641855, 26.942778612, 71.3429580156, 32.1923300923, 49.3158406195, 13.5798661435, 28.515184387, 79.2373799319, 90.5256971536, 5.95834316538, 17.5257771365, 23.1932579527, 44.0681936467]", "83", "32" ], "var": [ "data", "size", "from_pe" ] } ], "output": [ { "value": [ "[8.96325799893, 54.8013439659, 29.6815900209, 41.1738622563, 98.2929041271, 44.0605072636, 78.1004647916, 20.3167126756, 10.8760771783, 56.8786154832, 86.0064642099, 10.5356003407, 50.9798121742, 64.6431245944, 58.7579389435, 79.8180171767, 16.8141524594, 29.2763329412, 64.4071185007, 54.0202768726, 28.5534502397, 93.7577378762, 72.4142255186, 18.6856429429, 8.78066802963, 72.5095093341, 35.533214054, 3.86455452927, 38.5915019176, 43.9345899219, 11.5556218554, 94.4603909003]" ], "var": [ "data" ] }, { "value": [ "[82.5719440466, 67.4655323001, 5.17903065048, 37.17676886, 29.5464696539, 71.4770719891, 11.2815186145, 27.0060482152, 83.5398341273, 73.2050224679, 81.6310536715, 50.9471091174, 30.8832325655, 95.375142694, 7.02489418795, 6.85741335018, 30.0328937008, 1.54053530004, 84.9769901818, 4.64319763514, 52.4411124953, 80.2274443688, 17.4771798729, 68.3237873052, 87.853923802, 91.100023397, 94.3510473034, 77.6235870571, 89.6251215725, 15.9675537262, 24.7228452118, 81.233333651]" ], "var": [ "data" ] }, { "value": [ "[1.43812926474, 67.3991986419, 75.0614339274, 73.1674585204, 97.7511337449, 76.8328069517, 69.3497114175, 57.6181629729, 27.5664933768, 41.8102654201, 58.0449006604, 52.7118914976, 44.9765646587, 3.85672778818, 98.2213746923, 42.7774479461, 10.9717102159, 15.918163433, 58.1984347456, 50.6780176877, 32.6591649559, 21.8434322505, 77.5649608013, 67.8711249688, 81.0229681471, 43.5729849994, 37.2764852764, 13.7871530588, 15.8386612743, 95.1954229467, 52.8449200776, 84.9603920392]" ], "var": [ "data" ] }, { "value": [ "[40.8894684535, 60.8620985514, 83.0435785487, 45.4354852413, 54.4777650836, 42.5641185194, 4.49470671208, 94.2291339842, 5.89995979428, 7.21497952031, 7.51065236765, 28.6306758767, 30.5723663236, 27.3625297028, 43.8725732028, 89.110602393, 59.7183649303, 97.3040330824, 81.3938197848, 83.0338003759, 63.2410663031, 38.1536418599, 71.8804739649, 2.63557428369, 75.5307604457, 52.2839655218, 10.234240399, 19.9162950652, 63.3619897733, 76.6149698647, 48.5563148995, 34.8986865343]" ], "var": [ "data" ] }, { "value": [ "[99.5785251261, 50.110681341, 95.3596114037, 27.536539124, 78.3051842004, 42.4891312094, 56.8388740677, 73.7754436332, 8.03665296289, 2.62202070649, 52.3504098, 48.3608846064, 74.2133956593, 61.4887031349, 9.91298816971, 52.07947721, 93.7514827901, 97.1348577338, 54.2143492264, 28.5410699879, 89.2865790723, 45.6935996651, 3.62516236367, 35.0168320304, 23.8751577065, 29.5474838789, 60.3451760553, 20.5884767275, 44.4260942506, 83.1574485745, 98.0944176254, 45.7573854175]" ], "var": [ "data" ] }, { "value": [ "[97.6039745319, 6.07221905509, 38.9748907763, 9.74849635696, 86.4040556299, 55.7741820643, 57.5003438194, 40.8036031875, 99.6313554218, 77.8984470066, 77.9946050322, 85.6495401169, 92.9056049774, 17.7169445504, 88.9513920654, 13.986362305, 26.3645207154, 44.3901795191, 27.4147954269, 43.7193789871, 46.0240104209, 34.1402065492, 66.9206104324, 29.9401584199, 20.2099759211, 93.5107240607, 6.9974806573, 91.8262640295, 21.2120767594, 76.03393637, 32.0961595773, 54.9150875991]" ], "var": [ "data" ] }, { "value": [ "[70.2122852781, 44.2501040005, 65.1080552242, 5.90904675569, 19.0512425666, 4.19411136818, 45.269986288, 15.0801136274, 31.5142772413, 28.8374076963, 63.3438181355, 45.9791891498, 84.3514886588, 87.4748524187, 79.4804928223, 18.1328386972, 58.0689830924, 39.3522622566, 18.6690627116, 97.2885324561, 28.0637617333, 64.2368542686, 18.4995011077, 7.31222213434, 28.005349513, 10.7403520035, 96.1409351455, 51.335999538, 71.8082705089, 8.9276275893, 38.6039674697, 66.3767580167]" ], "var": [ "data" ] }, { "value": [ "[81.4711998673, 45.8046994695, 15.634222275, 79.9386639222, 65.5770576965, 8.33130112762, 13.2990038717, 38.8631790351, 79.3742791359, 89.7273799865, 80.855295288, 66.0779253937, 24.6311435179, 34.3637989468, 73.0626238454, 6.82310109389, 6.81122900661, 53.3411111364, 68.3507779573, 34.6137881286, 62.1800407833, 53.2185482387, 9.67448053548, 83.2089965845, 87.7660132731, 92.7799230016, 66.245880106, 17.155484776, 16.941419622, 36.3224791178, 21.8077090464, 0.836873880366]" ], "var": [ "data" ] }, { "value": [ "[43.3748722172, 8.69244679731, 36.997905198, 70.6360442131, 16.6203713435, 78.5854783915, 60.0816205099, 5.04058316498, 42.9047674597, 67.8251278793, 49.05292626, 94.5372153049, 22.7625904166, 16.5007017998, 1.31949119852, 79.51184149, 11.3066953744, 70.4147706189, 96.1222880392, 37.3016015479, 65.0154668327, 75.770272089, 20.0059922883, 80.0204237094, 20.7744246912, 41.5151464669, 48.1291278201, 63.1201984162, 27.012117548, 97.7404671024, 64.6152251757, 56.6786909012]" ], "var": [ "data" ] }, { "value": [ "[10.4082793677, 67.5382771494, 55.7801879306, 2.10136513783, 59.4227172932, 74.909052997, 54.5157868595, 69.3023421045, 26.6059779436, 70.6179007901, 75.7949024294, 45.8416158517, 48.0089226901, 41.9834802949, 42.8784270639, 24.4440426931, 91.3740326563, 35.342683536, 24.6515362748, 42.1849641855, 26.942778612, 71.3429580156, 32.1923300923, 49.3158406195, 13.5798661435, 28.515184387, 79.2373799319, 90.5256971536, 5.95834316538, 17.5257771365, 23.1932579527, 44.0681936467]" ], "var": [ "data" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_44y72i5ub_.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double* data, int size, int from_pe) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = data[i3]; output_temp_2.push_back(output_temp_4); } output_json["data"] = output_temp_2; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<double> input_temp_1_vec; for (auto& elem : input_json["data"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* data = &input_temp_1_vec[0]; int size = input_json["size"]; int from_pe = input_json["from_pe"]; clock_t begin = clock(); mpp_recv_double(data, size, from_pe); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(data, size, from_pe); }
master
null
{"livein": ["data", "size", "from_pe"], "liveout": ["data"], "returnvarname": [], "execcmd": "", "funname": "mpp_recv_double", "funargs": ["data", "size", "from_pe"], "typemap": {"data": "array(float64#32)", "size": "int32", "from_pe": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44y72i5ub_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
FabianKnapp/nexmon/master/utilities/wireshark/wsutil/g711.c
int alaw2linear( unsigned char a_val) { int t; int seg; a_val ^= 0x55; t = (a_val & (0xf)) << 4; seg = ((unsigned)a_val & (0x70)) >> (4); switch (seg) { case 0: t += 8; break; case 1: t += 0x108; break; default: t += 0x108; t <<= seg - 1; } return ((a_val & (0x80)) ? t : -t); }
int alaw2linear(unsigned chara_val)
int alaw2linear( unsigned char a_val)
alaw2linear
[ "int", "unsigned char" ]
{ "code": [ ".globl alaw2linear\n.type alaw2linear, @function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -20(%rbp)\n\txorb\t$85, -20(%rbp)\n\tmovzbl\t-20(%rbp), %eax\n\tsall\t$4, %eax\n\tandl\t$255, %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovzbl\t-20(%rbp), %eax\n\tshrl\t$4, %eax\n\tandl\t$7, %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tje\t.L2\n\tcmpl\t$1, -4(%rbp)\n\tje\t.L3\n\tjmp\t.L9\n.L2:\n\taddl\t$8, -8(%rbp)\n\tjmp\t.L5\n.L3:\n\taddl\t$264, -8(%rbp)\n\tjmp\t.L5\n.L9:\n\taddl\t$264, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %ecx\n\tsall\t%cl, -8(%rbp)\n.L5:\n\tmovzbl\t-20(%rbp), %eax\n\ttestb\t%al, %al\n\tjs\t.L6\n\tmovl\t-8(%rbp), %eax\n\tnegl\t%eax\n\tjmp\t.L8\n.L6:\n\tmovl\t-8(%rbp), %eax\n.L8:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl alaw2linear\n.type alaw2linear, @function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t$85, %edi\n\tmovzbl\t%dil, %ecx\n\tmovl\t%ecx, %edx\n\tshrl\t$4, %ecx\n\tsall\t$4, %edx\n\tmovzbl\t%dl, %edx\n\tleal\t8(%rdx), %eax\n\tandl\t$7, %ecx\n\tje\t.L5\n\tcmpl\t$1, %ecx\n\tleal\t264(%rdx), %eax\n\tje\t.L5\n\tdecl\t%ecx\n\tsall\t%cl, %eax\n.L5:\n\ttestb\t%dil, %dil\n\tjs\t.L1\n\tnegl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl alaw2linear\n.type alaw2linear, @function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t$85, %edi\n\tmovzbl\t%dil, %edx\n\tmovl\t%edx, %ecx\n\tshrl\t$4, %edx\n\tsall\t$4, %ecx\n\tmovzbl\t%cl, %ecx\n\tleal\t8(%rcx), %eax\n\tandl\t$7, %edx\n\tje\t.L5\n\tleal\t264(%rcx), %eax\n\tleal\t-1(%rdx), %ecx\n\tmovl\t%eax, %esi\n\tsall\t%cl, %eax\n\tcmpl\t$1, %edx\n\tcmove\t%esi, %eax\n.L5:\n\tmovl\t%eax, %edx\n\tnegl\t%edx\n\ttestb\t%dil, %dil\n\tcmovns\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global alaw2linear\n.type alaw2linear, %function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tldrb\tw1, [sp, 15]\n\tmov\tw0, 85\n\teor\tw0, w1, w0\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tlsl\tw0, w0, 4\n\tand\tw0, w0, 255\n\tstr\tw0, [sp, 24]\n\tldrb\tw0, [sp, 15]\n\tlsr\tw0, w0, 4\n\tand\tw0, w0, 7\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 1\n\tbeq\t.L3\n\tb\t.L9\n.L2:\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 8\n\tstr\tw0, [sp, 24]\n\tb\t.L5\n.L3:\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 264\n\tstr\tw0, [sp, 24]\n\tb\t.L5\n.L9:\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 264\n\tstr\tw0, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tldr\tw1, [sp, 24]\n\tlsl\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n.L5:\n\tldrsb\tw0, [sp, 15]\n\tcmp\tw0, 0\n\tblt\t.L6\n\tldr\tw0, [sp, 24]\n\tneg\tw0, w0\n\tb\t.L8\n.L6:\n\tldr\tw0, [sp, 24]\n.L8:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global alaw2linear\n.type alaw2linear, %function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tmov\tw1, 85\n\teor\tw1, w0, w1\n\tubfiz\tw0, w1, 4, 4\n\tubfx\tx3, x1, 4, 3\n\tcbz\tw3, .L2\n\tadd\tw0, w0, 264\n\tsub\tw2, w3, #1\n\tcmp\tw3, 1\n\tlsl\tw2, w0, w2\n\tcsel\tw0, w2, w0, ne\n.L5:\n\ttbnz\tx1, 7, .L1\n\tneg\tw0, w0\n.L1:\n\tret\n.L2:\n\tadd\tw0, w0, 8\n\tb\t.L5\n\t.cfi_endproc\n\n", ".global alaw2linear\n.type alaw2linear, %function\nalaw2linear:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tmov\tw2, 85\n\teor\tw2, w0, w2\n\tubfiz\tw1, w2, 4, 4\n\tubfx\tx3, x2, 4, 3\n\tadd\tw0, w1, 8\n\tcbz\tw3, .L5\n\tadd\tw1, w1, 264\n\tsubs\tw0, w3, 1\n\tlsl\tw0, w1, w0\n\tcsel\tw0, w1, w0, eq\n.L5:\n\ttst\tx2, 128\n\tcsneg\tw0, w0, w0, ne\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "117" ], "var": [ "a_val" ] }, { "value": [ "907" ], "var": [ "a_val" ] }, { "value": [ "774" ], "var": [ "a_val" ] }, { "value": [ "302" ], "var": [ "a_val" ] }, { "value": [ "963" ], "var": [ "a_val" ] }, { "value": [ "10" ], "var": [ "a_val" ] }, { "value": [ "138" ], "var": [ "a_val" ] }, { "value": [ "407" ], "var": [ "a_val" ] }, { "value": [ "809" ], "var": [ "a_val" ] }, { "value": [ "830" ], "var": [ "a_val" ] } ], "output": [ { "value": [ "-528" ], "var": [ "returnv" ] }, { "value": [ "7808" ], "var": [ "returnv" ] }, { "value": [ "-4992" ], "var": [ "returnv" ] }, { "value": [ "-28160" ], "var": [ "returnv" ] }, { "value": [ "360" ], "var": [ "returnv" ] }, { "value": [ "-8064" ], "var": [ "returnv" ] }, { "value": [ "8064" ], "var": [ "returnv" ] }, { "value": [ "2368" ], "var": [ "returnv" ] }, { "value": [ "-29184" ], "var": [ "returnv" ] }, { "value": [ "-14080" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43r1siffso.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned char a_val, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned char a_val = input_json["a_val"]; clock_t begin = clock(); int returnv = alaw2linear(a_val); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a_val, returnv); }
fork
null
{"livein": ["a_val"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "alaw2linear", "funargs": ["a_val"], "typemap": {"a_val": "uint8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43r1siffso.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cr88192/bgbtech_misc/sh2emu/tk_qsrc/tst_btic1h2/snd_btac1c.c
int BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize(int sz) { return((sz-4)*2); }
int BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize(intsz)
int BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize(int sz)
BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize
[ "int", "int" ]
{ "code": [ ".globl BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, @function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$4, %eax\n\taddl\t%eax, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, @function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-8(%rdi,%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, @function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-8(%rdi,%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, %function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #4\n\tlsl\tw0, w0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, %function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #4\n\tlsl\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n", ".global BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize\n.type BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize, %function\nBGBDT_MsImaAdpcm_MonoSamplesFromBlockSize:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #4\n\tlsl\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "98" ], "var": [ "sz" ] }, { "value": [ "38" ], "var": [ "sz" ] }, { "value": [ "38" ], "var": [ "sz" ] }, { "value": [ "77" ], "var": [ "sz" ] }, { "value": [ "12" ], "var": [ "sz" ] }, { "value": [ "85" ], "var": [ "sz" ] }, { "value": [ "21" ], "var": [ "sz" ] }, { "value": [ "86" ], "var": [ "sz" ] }, { "value": [ "126" ], "var": [ "sz" ] }, { "value": [ "26" ], "var": [ "sz" ] } ], "output": [ { "value": [ "188" ], "var": [ "returnv" ] }, { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "146" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "162" ], "var": [ "returnv" ] }, { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "164" ], "var": [ "returnv" ] }, { "value": [ "244" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_44mknaqr_7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int sz, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int sz = input_json["sz"]; clock_t begin = clock(); int returnv = BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize(sz); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(sz, returnv); }
master
null
{"livein": ["sz"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "BGBDT_MsImaAdpcm_MonoSamplesFromBlockSize", "funargs": ["sz"], "typemap": {"sz": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44mknaqr_7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/c-c++-common/rotate-1.c
unsigned int f89 (unsigned int x, unsigned int y) { return (x << (8 * sizeof (unsigned int) - y)) + (x >> y); }
unsigned int f89(unsigned intx, unsigned inty)
unsigned int f89 (unsigned int x, unsigned int y)
f89
[ "unsigned int", "unsigned int", "unsigned int" ]
{ "code": [ ".globl f89\n.type f89, @function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t$32, %eax\n\tsubl\t-8(%rbp), %eax\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %esi\n\tmovl\t-8(%rbp), %eax\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%eax, %ecx\n\tshrl\t%cl, %edx\n\tmovl\t%edx, %eax\n\taddl\t%esi, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f89\n.type f89, @function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trorl\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl f89\n.type f89, @function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trorl\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f89\n.type f89, %function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tmov\tw1, 32\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w1, w0\n\tldr\tw1, [sp, 12]\n\tlsl\tw1, w1, w0\n\tldr\tw0, [sp, 8]\n\tldr\tw2, [sp, 12]\n\tlsr\tw0, w2, w0\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f89\n.type f89, %function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tror\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global f89\n.type f89, %function\nf89:\n.LFB0:\n\t.cfi_startproc\n\tror\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "892", "492" ], "var": [ "x", "y" ] }, { "value": [ "197", "413" ], "var": [ "x", "y" ] }, { "value": [ "515", "692" ], "var": [ "x", "y" ] }, { "value": [ "196", "948" ], "var": [ "x", "y" ] }, { "value": [ "784", "560" ], "var": [ "x", "y" ] }, { "value": [ "21", "482" ], "var": [ "x", "y" ] }, { "value": [ "707", "933" ], "var": [ "x", "y" ] }, { "value": [ "126", "887" ], "var": [ "x", "y" ] }, { "value": [ "143", "326" ], "var": [ "x", "y" ] }, { "value": [ "916", "0" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "935329792" ], "var": [ "returnv" ] }, { "value": [ "1576" ], "var": [ "returnv" ] }, { "value": [ "2109440" ], "var": [ "returnv" ] }, { "value": [ "802816" ], "var": [ "returnv" ] }, { "value": [ "51380224" ], "var": [ "returnv" ] }, { "value": [ "1073741829" ], "var": [ "returnv" ] }, { "value": [ "402653206" ], "var": [ "returnv" ] }, { "value": [ "64512" ], "var": [ "returnv" ] }, { "value": [ "1006632962" ], "var": [ "returnv" ] }, { "value": [ "1832" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46wfeuh161.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned int x, unsigned int y, unsigned int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int x = input_json["x"]; unsigned int y = input_json["y"]; clock_t begin = clock(); unsigned int returnv = f89(x, y); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, returnv); }
arm-hot-cold
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f89", "funargs": ["x", "y"], "typemap": {"x": "uint32", "y": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46wfeuh161.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
JonSteinn/Kattis-Solutions/src/Datum/C/datum.c
int months_to_days(int n) { switch(n) { case 1: return 0; case 2: return 31; case 3: return 59; case 4: return 90; case 5: return 120; case 6: return 151; case 7: return 181; case 8: return 212; case 9: return 243; case 10: return 273; case 11: return 304; case 12: default: return 334; } }
int months_to_days(intn)
int months_to_days(int n)
months_to_days
[ "int", "int" ]
{ "code": [ ".globl months_to_days\n.type months_to_days, @function\nmonths_to_days:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$11, -4(%rbp)\n\tja\t.L2\n\tmovl\t-4(%rbp), %eax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L4(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L4(%rip), %rdx\n\taddq\t%rdx, %rax\n\tnotrack jmp\t*%rax\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L2-.L4\n\t.long\t.L14-.L4\n\t.long\t.L13-.L4\n\t.long\t.L12-.L4\n\t.long\t.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L14:\n\tmovl\t$0, %eax\n\tjmp\t.L15\n.L13:\n\tmovl\t$31, %eax\n\tjmp\t.L15\n.L12:\n\tmovl\t$59, %eax\n\tjmp\t.L15\n.L11:\n\tmovl\t$90, %eax\n\tjmp\t.L15\n.L10:\n\tmovl\t$120, %eax\n\tjmp\t.L15\n.L9:\n\tmovl\t$151, %eax\n\tjmp\t.L15\n.L8:\n\tmovl\t$181, %eax\n\tjmp\t.L15\n.L7:\n\tmovl\t$212, %eax\n\tjmp\t.L15\n.L6:\n\tmovl\t$243, %eax\n\tjmp\t.L15\n.L5:\n\tmovl\t$273, %eax\n\tjmp\t.L15\n.L3:\n\tmovl\t$304, %eax\n\tjmp\t.L15\n.L2:\n\tmovl\t$334, %eax\n.L15:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl months_to_days\n.type months_to_days, @function\nmonths_to_days:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tdecl\t%edi\n\tmovl\t$334, %eax\n\tcmpl\t$10, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovswl\t(%rax,%rdi,2), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl months_to_days\n.type months_to_days, @function\nmonths_to_days:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$1, %edi\n\tmovl\t$334, %eax\n\tcmpl\t$10, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovl\t(%rax,%rdi,4), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global months_to_days\n.type months_to_days, %function\nmonths_to_days:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 11\n\tbeq\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 11\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 10\n\tbeq\t.L4\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 10\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 9\n\tbeq\t.L5\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 9\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 8\n\tbeq\t.L6\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 8\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 7\n\tbeq\t.L7\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 7\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 6\n\tbeq\t.L8\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 6\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 5\n\tbeq\t.L9\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 5\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4\n\tbeq\t.L10\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbeq\t.L11\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbeq\t.L12\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2\n\tbeq\t.L13\n\tb\t.L3\n.L12:\n\tmov\tw0, 0\n\tb\t.L14\n.L13:\n\tmov\tw0, 31\n\tb\t.L14\n.L11:\n\tmov\tw0, 59\n\tb\t.L14\n.L10:\n\tmov\tw0, 90\n\tb\t.L14\n.L9:\n\tmov\tw0, 120\n\tb\t.L14\n.L8:\n\tmov\tw0, 151\n\tb\t.L14\n.L7:\n\tmov\tw0, 181\n\tb\t.L14\n.L6:\n\tmov\tw0, 212\n\tb\t.L14\n.L5:\n\tmov\tw0, 243\n\tb\t.L14\n.L4:\n\tmov\tw0, 273\n\tb\t.L14\n.L2:\n\tmov\tw0, 304\n\tb\t.L14\n.L3:\n\tmov\tw0, 334\n.L14:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global months_to_days\n.type months_to_days, %function\nmonths_to_days:\n.LFB13:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tcmp\tw0, 10\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsh\tw0, [x1, w0, uxtw 1]\n.L1:\n\tret\n.L3:\n\tmov\tw0, 334\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global months_to_days\n.type months_to_days, %function\nmonths_to_days:\n.LFB23:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tcmp\tw0, 10\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw0, [x1, w0, uxtw 2]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 334\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "20" ], "var": [ "n" ] }, { "value": [ "71" ], "var": [ "n" ] }, { "value": [ "2" ], "var": [ "n" ] }, { "value": [ "114" ], "var": [ "n" ] }, { "value": [ "119" ], "var": [ "n" ] }, { "value": [ "58" ], "var": [ "n" ] }, { "value": [ "24" ], "var": [ "n" ] }, { "value": [ "105" ], "var": [ "n" ] }, { "value": [ "75" ], "var": [ "n" ] }, { "value": [ "85" ], "var": [ "n" ] } ], "output": [ { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] }, { "value": [ "334" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_649ohixd9y.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = months_to_days(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "months_to_days", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_649ohixd9y.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
shucommon/little-routine/c/csapp/chapter2/bit_op.c
int bic(int x, int m) { return x & ~m; }
int bic(intx, intm)
int bic(int x, int m)
bic
[ "int", "int", "int" ]
{ "code": [ ".globl bic\n.type bic, @function\nbic:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tnotl\t%eax\n\tandl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl bic\n.type bic, @function\nbic:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tnotl\t%esi\n\tmovl\t%esi, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl bic\n.type bic, @function\nbic:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tnotl\t%esi\n\tmovl\t%esi, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tmvn\tw1, w0\n\tldr\tw0, [sp, 12]\n\tand\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB13:\n\t.cfi_startproc\n\tbic\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB23:\n\t.cfi_startproc\n\tbic\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "72", "49" ], "var": [ "x", "m" ] }, { "value": [ "35", "63" ], "var": [ "x", "m" ] }, { "value": [ "22", "55" ], "var": [ "x", "m" ] }, { "value": [ "86", "21" ], "var": [ "x", "m" ] }, { "value": [ "55", "33" ], "var": [ "x", "m" ] }, { "value": [ "6", "50" ], "var": [ "x", "m" ] }, { "value": [ "92", "52" ], "var": [ "x", "m" ] }, { "value": [ "27", "54" ], "var": [ "x", "m" ] }, { "value": [ "4", "44" ], "var": [ "x", "m" ] }, { "value": [ "60", "59" ], "var": [ "x", "m" ] } ], "output": [ { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "66" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "9" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_44amln22hh.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int m, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; int m = input_json["m"]; clock_t begin = clock(); int returnv = bic(x, m); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, m, returnv); }
master
null
{"livein": ["x", "m"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "bic", "funargs": ["x", "m"], "typemap": {"x": "int32", "m": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44amln22hh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
wilseypa/llamaOS/src/llamaos/xen/fs/ext2/vfs.c
int fs_unlink (const char *path) { return 0; }
int fs_unlink(const char *path)
int fs_unlink (const char *path)
fs_unlink
[ "int", "const char *" ]
{ "code": [ ".globl fs_unlink\n.type fs_unlink, @function\nfs_unlink:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fs_unlink\n.type fs_unlink, @function\nfs_unlink:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fs_unlink\n.type fs_unlink, @function\nfs_unlink:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global fs_unlink\n.type fs_unlink, %function\nfs_unlink:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fs_unlink\n.type fs_unlink, %function\nfs_unlink:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global fs_unlink\n.type fs_unlink, %function\nfs_unlink:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <errno.h> #include <stdbool.h> #include <stddef.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"rrvdordtjknbow\"" ], "var": [ "path" ] }, { "value": [ "\"xsnpxjvnusgjo\"" ], "var": [ "path" ] }, { "value": [ "\"jepxfpfophpbrugysqnevhnk\"" ], "var": [ "path" ] }, { "value": [ "\"pmng\"" ], "var": [ "path" ] }, { "value": [ "\"dttcxolvdcwhqrdzk\"" ], "var": [ "path" ] }, { "value": [ "\"oh\"" ], "var": [ "path" ] }, { "value": [ "\"lirookhxoa\"" ], "var": [ "path" ] }, { "value": [ "\"aggtmtyxdovz\"" ], "var": [ "path" ] }, { "value": [ "\"isxhmmakygzxabiuzrxmrcwvwcoqq\"" ], "var": [ "path" ] }, { "value": [ "\"d\"" ], "var": [ "path" ] } ], "output": [ { "value": [ "\"rrvdordtjknbow\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"xsnpxjvnusgjo\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"jepxfpfophpbrugysqnevhnk\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"pmng\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"dttcxolvdcwhqrdzk\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"oh\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"lirookhxoa\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"aggtmtyxdovz\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"isxhmmakygzxabiuzrxmrcwvwcoqq\"", "0" ], "var": [ "path", "returnv" ] }, { "value": [ "\"d\"", "0" ], "var": [ "path", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_3836rhdprn.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* path, int returnv) { json output_json; output_json["path"] = path; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* path = strdup(input_json["path"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = fs_unlink(path); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(path, returnv); }
master
null
{"livein": ["path"], "liveout": ["path"], "returnvarname": ["returnv"], "execcmd": "", "funname": "fs_unlink", "funargs": ["path"], "typemap": {"path": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_3836rhdprn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
DragoonX6/meson/test cases/common/78 file object/subdir1/lib.c
int func() { return 1; }
int func()
int func()
func
[ "int", "" ]
{ "code": [ ".globl func\n.type func, @function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl func\n.type func, @function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl func\n.type func, @function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global func\n.type func, %function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global func\n.type func, %function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global func\n.type func, %function\nfunc:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55c3k9kgr1.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = func(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
gst-msvc
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "func", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55c3k9kgr1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ayyucedemirbas/Minix-Source-Code/common/dist/zlib/contrib/untgz/untgz.c
int getoct (char *p,int width) { int result = 0; char c; while (width--) { c = *p++; if (c == 0) break; if (c == ' ') continue; if (c < '0' || c > '7') return -1; result = result * 8 + (c - '0'); } return result; }
int getoct(char *p, intwidth)
int getoct (char *p,int width)
getoct
[ "int", "char *", "int" ]
{ "code": [ ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, -28(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L9:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tmovb\t%al, -5(%rbp)\n\tcmpb\t$0, -5(%rbp)\n\tje\t.L10\n\tcmpb\t$32, -5(%rbp)\n\tjne\t.L5\n\tjmp\t.L2\n.L5:\n\tcmpb\t$47, -5(%rbp)\n\tjle\t.L6\n\tcmpb\t$55, -5(%rbp)\n\tjle\t.L7\n.L6:\n\tmovl\t$-1, %eax\n\tjmp\t.L8\n.L7:\n\tmovl\t-4(%rbp), %eax\n\tleal\t0(,%rax,8), %edx\n\tmovsbl\t-5(%rbp), %eax\n\tsubl\t$48, %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n.L2:\n\tmovl\t-28(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t%edx, -28(%rbp)\n\ttestl\t%eax, %eax\n\tjne\t.L9\n\tjmp\t.L4\n.L10:\n\tnop\n.L4:\n\tmovl\t-4(%rbp), %eax\n.L8:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, -28(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L9:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tmovb\t%al, -5(%rbp)\n\tcmpb\t$0, -5(%rbp)\n\tje\t.L10\n\tcmpb\t$32, -5(%rbp)\n\tjne\t.L5\n\tjmp\t.L2\n.L5:\n\tcmpb\t$47, -5(%rbp)\n\tjle\t.L6\n\tcmpb\t$55, -5(%rbp)\n\tjle\t.L7\n.L6:\n\tmovl\t$-1, %eax\n\tjmp\t.L8\n.L7:\n\tmovl\t-4(%rbp), %eax\n\tleal\t0(,%rax,8), %edx\n\tmovsbl\t-5(%rbp), %eax\n\tsubl\t$48, %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n.L2:\n\tmovl\t-28(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t%edx, -28(%rbp)\n\ttestl\t%eax, %eax\n\tjne\t.L9\n\tjmp\t.L4\n.L10:\n\tnop\n.L4:\n\tmovl\t-4(%rbp), %eax\n.L8:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %esi\n\txorl\t%edx, %edx\n\txorl\t%r8d, %r8d\n.L2:\n\tcmpq\t%rdx, %rsi\n\tje\t.L1\n\tmovsbl\t(%rdi,%rdx), %eax\n\ttestb\t%al, %al\n\tje\t.L1\n\tcmpb\t$32, %al\n\tje\t.L4\n\tleal\t-48(%rax), %ecx\n\tcmpb\t$7, %cl\n\tja\t.L6\n\tleal\t-48(%rax,%r8,8), %r8d\n.L4:\n\tincq\t%rdx\n\tjmp\t.L2\n.L6:\n\torl\t$-1, %r8d\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %esi\n\txorl\t%edx, %edx\n\txorl\t%r8d, %r8d\n.L2:\n\tcmpq\t%rdx, %rsi\n\tje\t.L1\n\tmovsbl\t(%rdi,%rdx), %eax\n\ttestb\t%al, %al\n\tje\t.L1\n\tcmpb\t$32, %al\n\tje\t.L4\n\tleal\t-48(%rax), %ecx\n\tcmpb\t$7, %cl\n\tja\t.L6\n\tleal\t-48(%rax,%r8,8), %r8d\n.L4:\n\tincq\t%rdx\n\tjmp\t.L2\n.L6:\n\torl\t$-1, %r8d\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tje\t.L5\n\tleal\t-1(%rsi), %eax\n\txorl\t%r8d, %r8d\n\tleaq\t1(%rdi,%rax), %rcx\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\tcmpb\t$32, %al\n\tje\t.L3\n\tleal\t-48(%rax), %edx\n\tcmpb\t$7, %dl\n\tja\t.L6\n\tleal\t-48(%rax,%r8,8), %r8d\n.L3:\n\tcmpq\t%rcx, %rdi\n\tje\t.L1\n.L4:\n\tmovsbl\t(%rdi), %eax\n\taddq\t$1, %rdi\n\ttestb\t%al, %al\n\tjne\t.L15\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tmovl\t$-1, %r8d\n\tmovl\t%r8d, %eax\n\tret\n.L5:\n\txorl\t%r8d, %r8d\n\tjmp\t.L1\n\t.cfi_endproc\n\n", ".globl getoct\n.type getoct, @function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tje\t.L5\n\tleal\t-1(%rsi), %eax\n\txorl\t%r8d, %r8d\n\tleaq\t1(%rdi,%rax), %rcx\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\tcmpb\t$32, %al\n\tje\t.L3\n\tleal\t-48(%rax), %edx\n\tcmpb\t$7, %dl\n\tja\t.L6\n\tleal\t-48(%rax,%r8,8), %r8d\n.L3:\n\tcmpq\t%rcx, %rdi\n\tje\t.L1\n.L4:\n\tmovsbl\t(%rdi), %eax\n\taddq\t$1, %rdi\n\ttestb\t%al, %al\n\tjne\t.L15\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tmovl\t$-1, %r8d\n\tmovl\t%r8d, %eax\n\tret\n.L5:\n\txorl\t%r8d, %r8d\n\tjmp\t.L1\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L9:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tstrb\tw0, [sp, 27]\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 0\n\tbeq\t.L10\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 32\n\tbne\t.L5\n\tb\t.L2\n.L5:\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 47\n\tbls\t.L6\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 55\n\tbls\t.L7\n.L6:\n\tmov\tw0, -1\n\tb\t.L8\n.L7:\n\tldr\tw0, [sp, 28]\n\tlsl\tw1, w0, 3\n\tldrb\tw0, [sp, 27]\n\tsub\tw0, w0, #48\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tw0, [sp, 4]\n\tsub\tw1, w0, #1\n\tstr\tw1, [sp, 4]\n\tcmp\tw0, 0\n\tbne\t.L9\n\tb\t.L4\n.L10:\n\tnop\n.L4:\n\tldr\tw0, [sp, 28]\n.L8:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L9:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tstrb\tw0, [sp, 27]\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 0\n\tbeq\t.L10\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 32\n\tbne\t.L5\n\tb\t.L2\n.L5:\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 47\n\tbls\t.L6\n\tldrb\tw0, [sp, 27]\n\tcmp\tw0, 55\n\tbls\t.L7\n.L6:\n\tmov\tw0, -1\n\tb\t.L8\n.L7:\n\tldr\tw0, [sp, 28]\n\tlsl\tw1, w0, 3\n\tldrb\tw0, [sp, 27]\n\tsub\tw0, w0, #48\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tw0, [sp, 4]\n\tsub\tw1, w0, #1\n\tstr\tw1, [sp, 4]\n\tcmp\tw0, 0\n\tbne\t.L9\n\tb\t.L4\n.L10:\n\tnop\n.L4:\n\tldr\tw0, [sp, 28]\n.L8:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tuxtw\tx1, w1\n\tmov\tx4, x0\n\tmov\tx3, 0\n\tmov\tw0, 0\n.L2:\n\tcmp\tx1, x3\n\tbne\t.L5\n.L1:\n\tret\n.L5:\n\tldrb\tw2, [x4, x3]\n\tcbz\tw2, .L1\n\tcmp\tw2, 32\n\tbeq\t.L4\n\tsub\tw2, w2, #48\n\tand\tw5, w2, 255\n\tcmp\tw5, 7\n\tbhi\t.L6\n\tadd\tw0, w2, w0, lsl 3\n.L4:\n\tadd\tx3, x3, 1\n\tb\t.L2\n.L6:\n\tmov\tw0, -1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tuxtw\tx1, w1\n\tmov\tx4, x0\n\tmov\tx3, 0\n\tmov\tw0, 0\n.L2:\n\tcmp\tx1, x3\n\tbne\t.L5\n.L1:\n\tret\n.L5:\n\tldrb\tw2, [x4, x3]\n\tcbz\tw2, .L1\n\tcmp\tw2, 32\n\tbeq\t.L4\n\tsub\tw2, w2, #48\n\tand\tw5, w2, 255\n\tcmp\tw5, 7\n\tbhi\t.L6\n\tadd\tw0, w2, w0, lsl 3\n.L4:\n\tadd\tx3, x3, 1\n\tb\t.L2\n.L6:\n\tmov\tw0, -1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx2, x0\n\tcbz\tw1, .L5\n\tsub\tw4, w1, #1\n\tmov\tw0, 0\n\tadd\tx4, x4, 1\n\tadd\tx4, x2, x4\n\tb\t.L4\n\t.p2align 2,,3\n.L15:\n\tbeq\t.L3\n\tadd\tw0, w3, w0, lsl 3\n\tcmp\tw5, 7\n\tbhi\t.L6\n.L3:\n\tcmp\tx2, x4\n\tbeq\t.L1\n.L4:\n\tldrb\tw1, [x2], 1\n\tsub\tw3, w1, #48\n\tcmp\tw1, 32\n\tand\tw5, w3, 255\n\tcbnz\tw1, .L15\n.L1:\n\tret\n\t.p2align 2,,3\n.L6:\n\tmov\tw0, -1\n\tret\n.L5:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global getoct\n.type getoct, %function\ngetoct:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx2, x0\n\tcbz\tw1, .L5\n\tsub\tw4, w1, #1\n\tmov\tw0, 0\n\tadd\tx4, x4, 1\n\tadd\tx4, x2, x4\n\tb\t.L4\n\t.p2align 2,,3\n.L15:\n\tbeq\t.L3\n\tadd\tw0, w3, w0, lsl 3\n\tcmp\tw5, 7\n\tbhi\t.L6\n.L3:\n\tcmp\tx2, x4\n\tbeq\t.L1\n.L4:\n\tldrb\tw1, [x2], 1\n\tsub\tw3, w1, #48\n\tcmp\tw1, 32\n\tand\tw5, w3, 255\n\tcbnz\tw1, .L15\n.L1:\n\tret\n\t.p2align 2,,3\n.L6:\n\tmov\tw0, -1\n\tret\n.L5:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */
# 1
{ "dummy_funcs": [ "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ], "dummy_funcs_seed": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], "input": [ { "value": [ "\"sxi\"", "11" ], "var": [ "p", "width" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "width" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "8" ], "var": [ "p", "width" ] }, { "value": [ "\"ehfstxvivuxsf\"", "9" ], "var": [ "p", "width" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "68" ], "var": [ "p", "width" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "118" ], "var": [ "p", "width" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "94" ], "var": [ "p", "width" ] }, { "value": [ "\"f\"", "63" ], "var": [ "p", "width" ] }, { "value": [ "\"pczdsapszv\"", "93" ], "var": [ "p", "width" ] }, { "value": [ "\"o\"", "119" ], "var": [ "p", "width" ] }, { "value": [ "\"sxi\"", "11" ], "var": [ "p", "width" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "width" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "8" ], "var": [ "p", "width" ] }, { "value": [ "\"ehfstxvivuxsf\"", "9" ], "var": [ "p", "width" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "68" ], "var": [ "p", "width" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "118" ], "var": [ "p", "width" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "94" ], "var": [ "p", "width" ] }, { "value": [ "\"f\"", "63" ], "var": [ "p", "width" ] }, { "value": [ "\"pczdsapszv\"", "93" ], "var": [ "p", "width" ] }, { "value": [ "\"o\"", "119" ], "var": [ "p", "width" ] }, { "value": [ "\"sxi\"", "11" ], "var": [ "p", "width" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "width" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "8" ], "var": [ "p", "width" ] }, { "value": [ "\"ehfstxvivuxsf\"", "9" ], "var": [ "p", "width" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "68" ], "var": [ "p", "width" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "118" ], "var": [ "p", "width" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "94" ], "var": [ "p", "width" ] }, { "value": [ "\"f\"", "63" ], "var": [ "p", "width" ] }, { "value": [ "\"pczdsapszv\"", "93" ], "var": [ "p", "width" ] }, { "value": [ "\"o\"", "119" ], "var": [ "p", "width" ] } ], "output": [ { "value": [ "\"sxi\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ehfstxvivuxsf\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"f\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"pczdsapszv\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"o\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"sxi\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ehfstxvivuxsf\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"f\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"pczdsapszv\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"o\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"sxi\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ehfstxvivuxsf\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"f\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"pczdsapszv\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"o\"", "-1" ], "var": [ "p", "returnv" ] } ] }
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"sxi\"", "11" ], "var": [ "p", "width" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "width" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "8" ], "var": [ "p", "width" ] }, { "value": [ "\"ehfstxvivuxsf\"", "9" ], "var": [ "p", "width" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "68" ], "var": [ "p", "width" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "118" ], "var": [ "p", "width" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "94" ], "var": [ "p", "width" ] }, { "value": [ "\"f\"", "63" ], "var": [ "p", "width" ] }, { "value": [ "\"pczdsapszv\"", "93" ], "var": [ "p", "width" ] }, { "value": [ "\"o\"", "119" ], "var": [ "p", "width" ] } ], "output": [ { "value": [ "\"sxi\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ubvofquxpckk\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"wtahwgspqmqfkmxu\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ehfstxvivuxsf\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"oafcrpjeetiwnwzmvssxkt\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mtyxsswujrfztyncypfx\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"dadoeqzhyxrnrulxadfgqphe\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"f\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"pczdsapszv\"", "-1" ], "var": [ "p", "returnv" ] }, { "value": [ "\"o\"", "-1" ], "var": [ "p", "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577735k5vlq10v.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* p, int width, int returnv) { json output_json; output_json["p"] = p; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* p = strdup(input_json["p"].get<std::string>().c_str()); int width = input_json["width"]; clock_t begin = clock(); int returnv = getoct(p, width); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, width, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_408dxjc241.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* p, int width, int returnv) { json output_json; output_json["p"] = p; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* p = strdup(input_json["p"].get<std::string>().c_str()); int width = input_json["width"]; clock_t begin = clock(); int returnv = getoct(p, width); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, width, returnv); }
master
null
{"livein": ["p", "width"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "getoct", "funargs": ["p", "width"], "typemap": {"p": "string", "width": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_408dxjc241.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
dbushong/crush-tools/src/libcrush/qsort_helper.c
int qsort_intcmp(const int *a, const int *b) { return *a - *b; }
int qsort_intcmp(const int *a, const int *b)
int qsort_intcmp(const int *a, const int *b)
qsort_intcmp
[ "int", "const int *", "const int *" ]
{ "code": [ ".globl qsort_intcmp\n.type qsort_intcmp, @function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovl\t(%rax), %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl qsort_intcmp\n.type qsort_intcmp, @function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl qsort_intcmp\n.type qsort_intcmp, @function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tsubl\t(%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global qsort_intcmp\n.type qsort_intcmp, %function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tldr\tw1, [x0]\n\tldr\tx0, [sp]\n\tldr\tw0, [x0]\n\tsub\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global qsort_intcmp\n.type qsort_intcmp, %function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tldr\tw2, [x0]\n\tldr\tw0, [x1]\n\tsub\tw0, w2, w0\n\tret\n\t.cfi_endproc\n\n", ".global qsort_intcmp\n.type qsort_intcmp, %function\nqsort_intcmp:\n.LFB0:\n\t.cfi_startproc\n\tldr\tw2, [x0]\n\tldr\tw0, [x1]\n\tsub\tw0, w2, w0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[120, 29, 68, 93, 14, 87, 11, 20, 84, 77, 56, 7, 10, 103, 97, 49, 33, 73, 121, 77, 103, 69, 115, 118, 93, 97, 108, 83, 102, 46, 108, 78]", "[112, 24, 19, 124, 101, 118, 4, 6, 83, 75, 109, 43, 125, 75, 20, 86, 3, 104, 51, 25, 95, 125, 3, 86, 8, 43, 58, 114, 24, 117, 101, 69]" ], "var": [ "a", "b" ] }, { "value": [ "[62, 28, 74, 3, 30, 33, 50, 25, 25, 59, 54, 33, 105, 43, 100, 41, 75, 84, 40, 68, 43, 56, 100, 10, 56, 39, 42, 19, 0, 110, 30, 25]", "[27, 11, 70, 56, 42, 45, 78, 103, 57, 16, 26, 105, 42, 84, 64, 12, 99, 11, 82, 21, 33, 8, 84, 120, 70, 105, 41, 49, 24, 84, 31, 30]" ], "var": [ "a", "b" ] }, { "value": [ "[108, 68, 119, 92, 103, 81, 121, 10, 106, 74, 33, 74, 114, 111, 35, 81, 52, 14, 19, 16, 17, 119, 21, 119, 108, 3, 54, 125, 45, 98, 59, 6]", "[49, 41, 2, 12, 7, 57, 46, 80, 82, 66, 73, 43, 112, 12, 92, 6, 70, 12, 22, 104, 50, 16, 1, 100, 72, 59, 100, 124, 61, 36, 7, 26]" ], "var": [ "a", "b" ] }, { "value": [ "[70, 60, 37, 69, 52, 95, 25, 120, 80, 53, 45, 78, 97, 116, 74, 34, 125, 4, 38, 14, 45, 56, 66, 106, 102, 26, 23, 50, 73, 16, 19, 2]", "[55, 67, 8, 44, 3, 3, 0, 94, 18, 106, 41, 53, 32, 46, 65, 45, 110, 2, 20, 122, 82, 121, 119, 20, 76, 70, 0, 17, 112, 53, 107, 117]" ], "var": [ "a", "b" ] }, { "value": [ "[0, 98, 5, 8, 96, 58, 64, 12, 49, 26, 23, 29, 90, 116, 22, 44, 58, 107, 0, 109, 56, 66, 4, 82, 18, 70, 74, 75, 35, 112, 67, 46]", "[73, 30, 36, 15, 114, 39, 76, 8, 51, 116, 34, 48, 20, 29, 104, 0, 20, 67, 69, 106, 84, 55, 106, 21, 42, 89, 106, 20, 59, 16, 57, 9]" ], "var": [ "a", "b" ] }, { "value": [ "[36, 68, 21, 97, 7, 31, 85, 112, 55, 17, 72, 100, 102, 78, 10, 114, 101, 40, 107, 125, 119, 66, 38, 93, 37, 18, 21, 125, 46, 38, 59, 84]", "[105, 101, 24, 7, 30, 11, 30, 70, 38, 7, 31, 19, 58, 40, 96, 55, 117, 31, 115, 109, 64, 8, 8, 58, 79, 34, 76, 71, 48, 17, 68, 21]" ], "var": [ "a", "b" ] }, { "value": [ "[12, 38, 77, 1, 5, 103, 86, 30, 67, 45, 110, 101, 76, 105, 58, 90, 63, 10, 72, 29, 71, 113, 18, 75, 80, 39, 115, 43, 108, 28, 37, 53]", "[113, 111, 74, 39, 23, 47, 82, 3, 48, 37, 69, 59, 22, 111, 62, 65, 31, 45, 60, 74, 29, 115, 8, 99, 81, 54, 64, 121, 108, 126, 88, 51]" ], "var": [ "a", "b" ] }, { "value": [ "[61, 43, 96, 4, 91, 81, 0, 123, 95, 126, 102, 81, 89, 101, 35, 92, 24, 111, 18, 32, 90, 27, 95, 118, 30, 79, 80, 98, 54, 49, 43, 67]", "[74, 26, 47, 116, 34, 52, 61, 119, 21, 100, 52, 100, 42, 44, 116, 81, 75, 120, 42, 104, 104, 31, 52, 87, 114, 29, 103, 20, 0, 44, 75, 40]" ], "var": [ "a", "b" ] }, { "value": [ "[32, 43, 111, 30, 32, 11, 107, 111, 22, 91, 52, 52, 80, 115, 101, 6, 113, 70, 67, 68, 53, 125, 47, 112, 98, 117, 111, 53, 3, 28, 121, 86]", "[47, 73, 98, 65, 65, 101, 106, 124, 13, 21, 59, 31, 41, 91, 59, 52, 21, 30, 1, 86, 10, 56, 31, 13, 55, 92, 99, 40, 12, 76, 69, 53]" ], "var": [ "a", "b" ] }, { "value": [ "[45, 13, 103, 29, 87, 57, 24, 18, 119, 47, 50, 83, 7, 50, 0, 22, 42, 3, 19, 30, 103, 11, 17, 117, 5, 78, 112, 66, 112, 114, 108, 108]", "[43, 113, 16, 16, 16, 97, 9, 85, 53, 21, 85, 51, 57, 77, 122, 119, 110, 49, 83, 0, 80, 67, 9, 57, 73, 92, 101, 93, 36, 13, 8, 30]" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "[120, 29, 68, 93, 14, 87, 11, 20, 84, 77, 56, 7, 10, 103, 97, 49, 33, 73, 121, 77, 103, 69, 115, 118, 93, 97, 108, 83, 102, 46, 108, 78]", "[112, 24, 19, 124, 101, 118, 4, 6, 83, 75, 109, 43, 125, 75, 20, 86, 3, 104, 51, 25, 95, 125, 3, 86, 8, 43, 58, 114, 24, 117, 101, 69]", "8" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[62, 28, 74, 3, 30, 33, 50, 25, 25, 59, 54, 33, 105, 43, 100, 41, 75, 84, 40, 68, 43, 56, 100, 10, 56, 39, 42, 19, 0, 110, 30, 25]", "[27, 11, 70, 56, 42, 45, 78, 103, 57, 16, 26, 105, 42, 84, 64, 12, 99, 11, 82, 21, 33, 8, 84, 120, 70, 105, 41, 49, 24, 84, 31, 30]", "35" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[108, 68, 119, 92, 103, 81, 121, 10, 106, 74, 33, 74, 114, 111, 35, 81, 52, 14, 19, 16, 17, 119, 21, 119, 108, 3, 54, 125, 45, 98, 59, 6]", "[49, 41, 2, 12, 7, 57, 46, 80, 82, 66, 73, 43, 112, 12, 92, 6, 70, 12, 22, 104, 50, 16, 1, 100, 72, 59, 100, 124, 61, 36, 7, 26]", "59" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[70, 60, 37, 69, 52, 95, 25, 120, 80, 53, 45, 78, 97, 116, 74, 34, 125, 4, 38, 14, 45, 56, 66, 106, 102, 26, 23, 50, 73, 16, 19, 2]", "[55, 67, 8, 44, 3, 3, 0, 94, 18, 106, 41, 53, 32, 46, 65, 45, 110, 2, 20, 122, 82, 121, 119, 20, 76, 70, 0, 17, 112, 53, 107, 117]", "15" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[0, 98, 5, 8, 96, 58, 64, 12, 49, 26, 23, 29, 90, 116, 22, 44, 58, 107, 0, 109, 56, 66, 4, 82, 18, 70, 74, 75, 35, 112, 67, 46]", "[73, 30, 36, 15, 114, 39, 76, 8, 51, 116, 34, 48, 20, 29, 104, 0, 20, 67, 69, 106, 84, 55, 106, 21, 42, 89, 106, 20, 59, 16, 57, 9]", "-73" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[36, 68, 21, 97, 7, 31, 85, 112, 55, 17, 72, 100, 102, 78, 10, 114, 101, 40, 107, 125, 119, 66, 38, 93, 37, 18, 21, 125, 46, 38, 59, 84]", "[105, 101, 24, 7, 30, 11, 30, 70, 38, 7, 31, 19, 58, 40, 96, 55, 117, 31, 115, 109, 64, 8, 8, 58, 79, 34, 76, 71, 48, 17, 68, 21]", "-69" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[12, 38, 77, 1, 5, 103, 86, 30, 67, 45, 110, 101, 76, 105, 58, 90, 63, 10, 72, 29, 71, 113, 18, 75, 80, 39, 115, 43, 108, 28, 37, 53]", "[113, 111, 74, 39, 23, 47, 82, 3, 48, 37, 69, 59, 22, 111, 62, 65, 31, 45, 60, 74, 29, 115, 8, 99, 81, 54, 64, 121, 108, 126, 88, 51]", "-101" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[61, 43, 96, 4, 91, 81, 0, 123, 95, 126, 102, 81, 89, 101, 35, 92, 24, 111, 18, 32, 90, 27, 95, 118, 30, 79, 80, 98, 54, 49, 43, 67]", "[74, 26, 47, 116, 34, 52, 61, 119, 21, 100, 52, 100, 42, 44, 116, 81, 75, 120, 42, 104, 104, 31, 52, 87, 114, 29, 103, 20, 0, 44, 75, 40]", "-13" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[32, 43, 111, 30, 32, 11, 107, 111, 22, 91, 52, 52, 80, 115, 101, 6, 113, 70, 67, 68, 53, 125, 47, 112, 98, 117, 111, 53, 3, 28, 121, 86]", "[47, 73, 98, 65, 65, 101, 106, 124, 13, 21, 59, 31, 41, 91, 59, 52, 21, 30, 1, 86, 10, 56, 31, 13, 55, 92, 99, 40, 12, 76, 69, 53]", "-15" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[45, 13, 103, 29, 87, 57, 24, 18, 119, 47, 50, 83, 7, 50, 0, 22, 42, 3, 19, 30, 103, 11, 17, 117, 5, 78, 112, 66, 112, 114, 108, 108]", "[43, 113, 16, 16, 16, 97, 9, 85, 53, 21, 85, 51, 57, 77, 122, 119, 110, 49, 83, 0, 80, 67, 9, 57, 73, 92, 101, 93, 36, 13, 8, 30]", "2" ], "var": [ "a", "b", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37k5dkk2v4.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int* a, int* b, int returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 32; i4++) { int output_temp_5 = a[i4]; output_temp_3.push_back(output_temp_5); } output_json["a"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 32; i7++) { int output_temp_8 = b[i7]; output_temp_6.push_back(output_temp_8); } output_json["b"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["a"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* a = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["b"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* b = &input_temp_2_vec[0]; clock_t begin = clock(); int returnv = qsort_intcmp(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": ["a", "b"], "returnvarname": ["returnv"], "execcmd": "", "funname": "qsort_intcmp", "funargs": ["a", "b"], "typemap": {"a": "array(int32#32)", "b": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37k5dkk2v4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
8l/AutoCorres/c-parser/testfiles/simple_fn.c
int fact(int n) { unsigned factor, total; total = 1; factor = 2; while (factor <= n) { total = total * factor; factor = factor + 1; } return total; }
int fact(intn)
int fact(int n)
fact
[ "int", "int" ]
{ "code": [ ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$1, -4(%rbp)\n\tmovl\t$2, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-4(%rbp), %eax\n\timull\t-8(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-20(%rbp), %eax\n\tcmpl\t%eax, -8(%rbp)\n\tjbe\t.L3\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %r8d\n\tmovl\t$2, %eax\n.L2:\n\tcmpl\t%eax, %edi\n\tjb\t.L5\n\timull\t%eax, %r8d\n\tincl\t%eax\n\tjmp\t.L2\n.L5:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tjbe\t.L4\n\tmovl\t$2, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\timull\t%edx, %eax\n\taddl\t$1, %edx\n\tcmpl\t%edi, %edx\n\tjbe\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw0, [sp, 12]\n\tldr\tw1, [sp, 24]\n\tcmp\tw1, w0\n\tbls\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw1, 2\n\tmov\tw0, 1\n.L2:\n\tcmp\tw2, w1\n\tbcs\t.L3\n\tret\n.L3:\n\tmul\tw0, w0, w1\n\tadd\tw1, w1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 1\n\tbls\t.L7\n\tsub\tw0, w0, #2\n\tcmp\tw0, 35\n\tccmn\tw2, #1, 4, hi\n\tbeq\t.L8\n\tadrp\tx0, .LC0\n\tsub\tw3, w2, #1\n\tmovi\tv0.4s, 0x1\n\tmov\tw1, 0\n\tmovi\tv3.4s, 0x4\n\tldr\tq1, [x0, #:lo12:.LC0]\n\tlsr\tw0, w3, 2\n\t.p2align 3,,7\n.L4:\n\tmov\tv2.16b, v1.16b\n\tadd\tw1, w1, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw0, w1\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbhi\t.L4\n\tmovi\tv1.4s, 0\n\tand\tw1, w3, -4\n\tcmp\tw3, w1\n\tadd\tw4, w1, 2\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\tadd\tw3, w1, 3\n\tmul\tw0, w0, w4\n\tcmp\tw3, w2\n\tbhi\t.L1\n\tmul\tw0, w0, w3\n\tadd\tw1, w1, 4\n\tcmp\tw2, w1\n\tmul\tw1, w0, w1\n\tcsel\tw0, w1, w0, cs\n.L1:\n\tret\n\t.p2align 2,,3\n.L8:\n\tmov\tw0, 1\n\tmov\tw1, 2\n\t.p2align 3,,7\n.L3:\n\tmul\tw0, w0, w1\n\tadd\tw1, w1, 1\n\tcmp\tw2, w1\n\tbcs\t.L3\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "118" ], "var": [ "n" ] }, { "value": [ "71" ], "var": [ "n" ] }, { "value": [ "103" ], "var": [ "n" ] }, { "value": [ "122" ], "var": [ "n" ] }, { "value": [ "52" ], "var": [ "n" ] }, { "value": [ "88" ], "var": [ "n" ] }, { "value": [ "83" ], "var": [ "n" ] }, { "value": [ "56" ], "var": [ "n" ] }, { "value": [ "95" ], "var": [ "n" ] }, { "value": [ "29" ], "var": [ "n" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "-1241513984" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60em0mc38z.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = fact(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fact", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60em0mc38z.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Rutgers-SE/tic-tac-toe/comm.c
int parse_motion_command(char *cmd, int *gid, int *pid, int *row, int *col) { int outcome = 0; return outcome; }
int parse_motion_command(char *cmd, int *gid, int *pid, int *row, int *col)
int parse_motion_command(char *cmd, int *gid, int *pid, int *row, int *col)
parse_motion_command
[ "int", "char *", "int *", "int *", "int *", "int *" ]
{ "code": [ ".globl parse_motion_command\n.type parse_motion_command, @function\nparse_motion_command:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovq\t%rdx, -40(%rbp)\n\tmovq\t%rcx, -48(%rbp)\n\tmovq\t%r8, -56(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl parse_motion_command\n.type parse_motion_command, @function\nparse_motion_command:\n.LFB48:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl parse_motion_command\n.type parse_motion_command, @function\nparse_motion_command:\n.LFB64:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global parse_motion_command\n.type parse_motion_command, %function\nparse_motion_command:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #64\n\t.cfi_def_cfa_offset 64\n\tstr\tx0, [sp, 40]\n\tstr\tx1, [sp, 32]\n\tstr\tx2, [sp, 24]\n\tstr\tx3, [sp, 16]\n\tstr\tx4, [sp, 8]\n\tstr\twzr, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tadd\tsp, sp, 64\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global parse_motion_command\n.type parse_motion_command, %function\nparse_motion_command:\n.LFB48:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global parse_motion_command\n.type parse_motion_command, %function\nparse_motion_command:\n.LFB64:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <assert.h> #include <errno.h> #include <netdb.h> #include <netinet/in.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <sys/select.h> #include <sys/socket.h> #include <sys/types.h> #include <unistd.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"izjoq\"", "[90, 82, 31, 6, 95, 49, 38, 12, 107, 120, 9, 64, 44, 28, 15, 42, 121, 11, 105, 82, 56, 88, 63, 84, 108, 21, 47, 91, 48, 74, 65, 21]", "[75, 95, 106, 78, 62, 124, 92, 89, 42, 59, 61, 73, 56, 18, 31, 95, 109, 45, 0, 84, 97, 9, 92, 55, 84, 81, 95, 114, 90, 110, 56, 21]", "[109, 119, 22, 82, 29, 95, 105, 46, 67, 28, 22, 2, 122, 111, 69, 78, 92, 65, 62, 37, 97, 41, 98, 46, 33, 56, 71, 33, 89, 1, 107, 28]", "[44, 93, 20, 86, 100, 1, 16, 47, 72, 3, 88, 84, 126, 36, 6, 40, 24, 11, 40, 55, 1, 6, 83, 10, 62, 66, 124, 108, 76, 91, 67, 112]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"bkkco\"", "[82, 25, 112, 24, 93, 26, 44, 84, 13, 47, 42, 78, 64, 13, 90, 57, 51, 98, 28, 27, 47, 8, 66, 92, 106, 48, 28, 43, 3, 101, 49, 55]", "[74, 80, 117, 106, 54, 81, 105, 120, 99, 31, 37, 111, 111, 116, 23, 88, 75, 43, 20, 45, 61, 104, 117, 82, 93, 122, 83, 94, 11, 115, 126, 79]", "[1, 16, 30, 90, 73, 45, 65, 44, 15, 36, 31, 16, 101, 94, 25, 53, 108, 55, 79, 55, 78, 36, 17, 26, 72, 67, 83, 68, 69, 81, 71, 78]", "[48, 59, 70, 57, 45, 87, 13, 96, 80, 58, 47, 37, 65, 5, 7, 98, 57, 23, 4, 79, 22, 17, 104, 74, 106, 115, 45, 8, 16, 29, 102, 49]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"ktywldcoroaotgh\"", "[68, 80, 18, 63, 105, 104, 111, 78, 112, 82, 83, 16, 68, 43, 106, 75, 119, 32, 116, 37, 2, 122, 9, 12, 28, 30, 28, 111, 65, 123, 124, 61]", "[4, 31, 97, 26, 75, 13, 58, 72, 63, 93, 77, 57, 7, 5, 33, 29, 47, 9, 1, 80, 11, 63, 15, 122, 115, 49, 49, 46, 94, 92, 12, 124]", "[105, 28, 51, 126, 55, 16, 22, 69, 113, 58, 104, 8, 2, 41, 47, 90, 13, 22, 54, 62, 75, 6, 55, 104, 81, 17, 87, 40, 92, 90, 78, 49]", "[117, 116, 56, 44, 10, 71, 91, 29, 66, 118, 65, 32, 106, 52, 67, 119, 57, 120, 119, 27, 80, 64, 104, 64, 47, 2, 48, 21, 104, 99, 121, 95]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"kllqfrpuftznxneavnxmuwvyuos\"", "[94, 96, 101, 21, 74, 90, 31, 43, 80, 1, 118, 89, 93, 82, 53, 108, 114, 25, 4, 45, 119, 101, 0, 33, 122, 5, 103, 93, 37, 114, 29, 115]", "[70, 76, 22, 72, 106, 83, 49, 89, 53, 119, 22, 108, 118, 84, 26, 26, 17, 92, 54, 40, 14, 11, 109, 65, 80, 90, 2, 87, 77, 42, 20, 33]", "[90, 123, 18, 79, 38, 120, 92, 13, 7, 29, 45, 102, 70, 15, 54, 15, 97, 30, 14, 50, 17, 16, 42, 20, 36, 24, 42, 77, 113, 70, 22, 6]", "[108, 46, 57, 28, 94, 119, 51, 20, 114, 120, 30, 83, 41, 42, 104, 45, 112, 26, 29, 85, 59, 44, 67, 112, 1, 58, 35, 35, 54, 87, 18, 87]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"so\"", "[102, 23, 81, 33, 114, 31, 119, 79, 122, 29, 63, 0, 121, 79, 43, 87, 60, 29, 114, 75, 27, 44, 118, 68, 55, 40, 120, 24, 64, 118, 61, 53]", "[75, 118, 95, 71, 105, 27, 97, 19, 3, 113, 111, 61, 67, 90, 102, 9, 96, 4, 52, 5, 44, 46, 77, 8, 58, 76, 63, 68, 33, 63, 5, 52]", "[124, 14, 91, 70, 112, 3, 80, 55, 2, 106, 7, 90, 24, 77, 71, 10, 46, 22, 45, 113, 8, 22, 70, 126, 61, 30, 12, 9, 99, 110, 62, 124]", "[104, 69, 124, 51, 92, 62, 67, 106, 80, 78, 83, 54, 11, 116, 3, 110, 104, 107, 42, 30, 93, 62, 46, 75, 24, 80, 66, 91, 119, 26, 39, 113]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"sorzxqwdbqzgpcdgfmfxzoup\"", "[37, 7, 68, 0, 68, 81, 53, 112, 88, 116, 91, 69, 119, 19, 8, 84, 83, 24, 63, 28, 3, 41, 20, 14, 56, 69, 41, 51, 48, 7, 52, 61]", "[111, 32, 122, 58, 109, 113, 72, 66, 6, 70, 93, 28, 9, 44, 123, 58, 69, 60, 40, 43, 89, 72, 95, 80, 76, 120, 44, 121, 75, 104, 46, 70]", "[27, 103, 21, 93, 0, 88, 20, 74, 93, 12, 62, 11, 83, 19, 52, 108, 26, 87, 89, 22, 87, 122, 1, 51, 48, 35, 48, 57, 103, 121, 20, 37]", "[31, 104, 108, 116, 7, 17, 13, 47, 78, 88, 31, 60, 69, 30, 54, 90, 62, 21, 9, 54, 96, 52, 104, 64, 17, 59, 11, 89, 55, 14, 125, 112]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"jfjfyplfgdtsldhabcfctwdiuiutnoy\"", "[99, 83, 109, 63, 113, 47, 87, 15, 31, 45, 65, 27, 53, 126, 112, 71, 101, 58, 67, 29, 82, 36, 48, 36, 51, 35, 88, 59, 98, 103, 88, 113]", "[92, 54, 78, 121, 102, 47, 27, 57, 92, 77, 5, 4, 96, 24, 110, 107, 122, 106, 64, 59, 126, 69, 73, 29, 91, 62, 2, 89, 14, 20, 2, 111]", "[77, 14, 41, 10, 49, 34, 1, 79, 12, 92, 12, 62, 44, 35, 30, 42, 17, 126, 112, 103, 19, 52, 126, 47, 10, 84, 71, 3, 50, 24, 10, 56]", "[95, 34, 24, 36, 57, 111, 71, 14, 64, 80, 108, 36, 80, 90, 80, 100, 51, 112, 46, 42, 67, 112, 35, 99, 95, 0, 6, 93, 26, 12, 5, 91]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"ibrotsaomdeooipwvzwskx\"", "[55, 65, 103, 38, 14, 13, 29, 41, 95, 29, 112, 125, 40, 13, 87, 106, 110, 14, 63, 85, 25, 90, 122, 55, 4, 80, 33, 116, 53, 50, 33, 30]", "[117, 103, 70, 96, 96, 36, 0, 83, 71, 111, 1, 15, 43, 83, 7, 10, 69, 28, 119, 15, 101, 101, 47, 44, 125, 117, 17, 87, 78, 46, 78, 92]", "[103, 45, 114, 18, 28, 87, 70, 54, 92, 72, 89, 74, 72, 3, 54, 48, 116, 25, 23, 23, 27, 83, 58, 115, 115, 112, 57, 49, 92, 81, 45, 55]", "[31, 102, 29, 60, 14, 80, 90, 22, 122, 101, 97, 50, 108, 97, 111, 106, 22, 41, 114, 86, 6, 15, 48, 100, 37, 54, 68, 108, 35, 111, 113, 121]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"jmlqetfwprekoaorfilgqqrthvu\"", "[1, 86, 94, 60, 87, 58, 96, 55, 81, 87, 118, 70, 106, 63, 83, 29, 61, 46, 58, 5, 92, 125, 54, 14, 49, 47, 124, 124, 49, 45, 102, 88]", "[66, 86, 90, 13, 24, 61, 29, 18, 111, 118, 40, 60, 30, 70, 22, 37, 34, 61, 110, 80, 5, 10, 79, 75, 119, 91, 45, 122, 99, 63, 26, 17]", "[56, 66, 51, 13, 6, 85, 47, 47, 32, 91, 67, 107, 63, 52, 50, 55, 114, 0, 101, 66, 36, 57, 46, 50, 48, 32, 31, 15, 125, 63, 46, 23]", "[65, 99, 76, 59, 31, 55, 85, 73, 14, 40, 59, 45, 45, 116, 104, 110, 87, 18, 51, 2, 5, 84, 59, 71, 99, 107, 8, 120, 9, 78, 70, 101]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] }, { "value": [ "\"oiqczymvzvvtnngdv\"", "[12, 93, 95, 50, 121, 23, 33, 101, 65, 55, 88, 119, 37, 42, 26, 91, 26, 10, 45, 11, 4, 62, 15, 70, 117, 29, 14, 104, 79, 54, 86, 31]", "[124, 87, 65, 109, 70, 12, 66, 4, 69, 19, 3, 32, 96, 2, 105, 113, 39, 95, 5, 125, 47, 103, 17, 106, 104, 112, 28, 75, 64, 113, 18, 88]", "[2, 8, 99, 107, 33, 65, 97, 97, 28, 53, 35, 102, 62, 7, 47, 17, 0, 20, 108, 122, 14, 111, 30, 81, 90, 63, 37, 32, 12, 84, 82, 55]", "[10, 102, 12, 23, 72, 73, 64, 62, 32, 33, 83, 107, 110, 68, 6, 80, 12, 15, 75, 87, 111, 39, 49, 85, 76, 122, 125, 53, 16, 44, 22, 40]" ], "var": [ "cmd", "gid", "pid", "row", "col" ] } ], "output": [ { "value": [ "\"izjoq\"", "[44, 93, 20, 86, 100, 1, 16, 47, 72, 3, 88, 84, 126, 36, 6, 40, 24, 11, 40, 55, 1, 6, 83, 10, 62, 66, 124, 108, 76, 91, 67, 112]", "[90, 82, 31, 6, 95, 49, 38, 12, 107, 120, 9, 64, 44, 28, 15, 42, 121, 11, 105, 82, 56, 88, 63, 84, 108, 21, 47, 91, 48, 74, 65, 21]", "[75, 95, 106, 78, 62, 124, 92, 89, 42, 59, 61, 73, 56, 18, 31, 95, 109, 45, 0, 84, 97, 9, 92, 55, 84, 81, 95, 114, 90, 110, 56, 21]", "0", "[109, 119, 22, 82, 29, 95, 105, 46, 67, 28, 22, 2, 122, 111, 69, 78, 92, 65, 62, 37, 97, 41, 98, 46, 33, 56, 71, 33, 89, 1, 107, 28]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"bkkco\"", "[48, 59, 70, 57, 45, 87, 13, 96, 80, 58, 47, 37, 65, 5, 7, 98, 57, 23, 4, 79, 22, 17, 104, 74, 106, 115, 45, 8, 16, 29, 102, 49]", "[82, 25, 112, 24, 93, 26, 44, 84, 13, 47, 42, 78, 64, 13, 90, 57, 51, 98, 28, 27, 47, 8, 66, 92, 106, 48, 28, 43, 3, 101, 49, 55]", "[74, 80, 117, 106, 54, 81, 105, 120, 99, 31, 37, 111, 111, 116, 23, 88, 75, 43, 20, 45, 61, 104, 117, 82, 93, 122, 83, 94, 11, 115, 126, 79]", "0", "[1, 16, 30, 90, 73, 45, 65, 44, 15, 36, 31, 16, 101, 94, 25, 53, 108, 55, 79, 55, 78, 36, 17, 26, 72, 67, 83, 68, 69, 81, 71, 78]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"ktywldcoroaotgh\"", "[117, 116, 56, 44, 10, 71, 91, 29, 66, 118, 65, 32, 106, 52, 67, 119, 57, 120, 119, 27, 80, 64, 104, 64, 47, 2, 48, 21, 104, 99, 121, 95]", "[68, 80, 18, 63, 105, 104, 111, 78, 112, 82, 83, 16, 68, 43, 106, 75, 119, 32, 116, 37, 2, 122, 9, 12, 28, 30, 28, 111, 65, 123, 124, 61]", "[4, 31, 97, 26, 75, 13, 58, 72, 63, 93, 77, 57, 7, 5, 33, 29, 47, 9, 1, 80, 11, 63, 15, 122, 115, 49, 49, 46, 94, 92, 12, 124]", "0", "[105, 28, 51, 126, 55, 16, 22, 69, 113, 58, 104, 8, 2, 41, 47, 90, 13, 22, 54, 62, 75, 6, 55, 104, 81, 17, 87, 40, 92, 90, 78, 49]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"kllqfrpuftznxneavnxmuwvyuos\"", "[108, 46, 57, 28, 94, 119, 51, 20, 114, 120, 30, 83, 41, 42, 104, 45, 112, 26, 29, 85, 59, 44, 67, 112, 1, 58, 35, 35, 54, 87, 18, 87]", "[94, 96, 101, 21, 74, 90, 31, 43, 80, 1, 118, 89, 93, 82, 53, 108, 114, 25, 4, 45, 119, 101, 0, 33, 122, 5, 103, 93, 37, 114, 29, 115]", "[70, 76, 22, 72, 106, 83, 49, 89, 53, 119, 22, 108, 118, 84, 26, 26, 17, 92, 54, 40, 14, 11, 109, 65, 80, 90, 2, 87, 77, 42, 20, 33]", "0", "[90, 123, 18, 79, 38, 120, 92, 13, 7, 29, 45, 102, 70, 15, 54, 15, 97, 30, 14, 50, 17, 16, 42, 20, 36, 24, 42, 77, 113, 70, 22, 6]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"so\"", "[104, 69, 124, 51, 92, 62, 67, 106, 80, 78, 83, 54, 11, 116, 3, 110, 104, 107, 42, 30, 93, 62, 46, 75, 24, 80, 66, 91, 119, 26, 39, 113]", "[102, 23, 81, 33, 114, 31, 119, 79, 122, 29, 63, 0, 121, 79, 43, 87, 60, 29, 114, 75, 27, 44, 118, 68, 55, 40, 120, 24, 64, 118, 61, 53]", "[75, 118, 95, 71, 105, 27, 97, 19, 3, 113, 111, 61, 67, 90, 102, 9, 96, 4, 52, 5, 44, 46, 77, 8, 58, 76, 63, 68, 33, 63, 5, 52]", "0", "[124, 14, 91, 70, 112, 3, 80, 55, 2, 106, 7, 90, 24, 77, 71, 10, 46, 22, 45, 113, 8, 22, 70, 126, 61, 30, 12, 9, 99, 110, 62, 124]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"sorzxqwdbqzgpcdgfmfxzoup\"", "[31, 104, 108, 116, 7, 17, 13, 47, 78, 88, 31, 60, 69, 30, 54, 90, 62, 21, 9, 54, 96, 52, 104, 64, 17, 59, 11, 89, 55, 14, 125, 112]", "[37, 7, 68, 0, 68, 81, 53, 112, 88, 116, 91, 69, 119, 19, 8, 84, 83, 24, 63, 28, 3, 41, 20, 14, 56, 69, 41, 51, 48, 7, 52, 61]", "[111, 32, 122, 58, 109, 113, 72, 66, 6, 70, 93, 28, 9, 44, 123, 58, 69, 60, 40, 43, 89, 72, 95, 80, 76, 120, 44, 121, 75, 104, 46, 70]", "0", "[27, 103, 21, 93, 0, 88, 20, 74, 93, 12, 62, 11, 83, 19, 52, 108, 26, 87, 89, 22, 87, 122, 1, 51, 48, 35, 48, 57, 103, 121, 20, 37]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"jfjfyplfgdtsldhabcfctwdiuiutnoy\"", "[95, 34, 24, 36, 57, 111, 71, 14, 64, 80, 108, 36, 80, 90, 80, 100, 51, 112, 46, 42, 67, 112, 35, 99, 95, 0, 6, 93, 26, 12, 5, 91]", "[99, 83, 109, 63, 113, 47, 87, 15, 31, 45, 65, 27, 53, 126, 112, 71, 101, 58, 67, 29, 82, 36, 48, 36, 51, 35, 88, 59, 98, 103, 88, 113]", "[92, 54, 78, 121, 102, 47, 27, 57, 92, 77, 5, 4, 96, 24, 110, 107, 122, 106, 64, 59, 126, 69, 73, 29, 91, 62, 2, 89, 14, 20, 2, 111]", "0", "[77, 14, 41, 10, 49, 34, 1, 79, 12, 92, 12, 62, 44, 35, 30, 42, 17, 126, 112, 103, 19, 52, 126, 47, 10, 84, 71, 3, 50, 24, 10, 56]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"ibrotsaomdeooipwvzwskx\"", "[31, 102, 29, 60, 14, 80, 90, 22, 122, 101, 97, 50, 108, 97, 111, 106, 22, 41, 114, 86, 6, 15, 48, 100, 37, 54, 68, 108, 35, 111, 113, 121]", "[55, 65, 103, 38, 14, 13, 29, 41, 95, 29, 112, 125, 40, 13, 87, 106, 110, 14, 63, 85, 25, 90, 122, 55, 4, 80, 33, 116, 53, 50, 33, 30]", "[117, 103, 70, 96, 96, 36, 0, 83, 71, 111, 1, 15, 43, 83, 7, 10, 69, 28, 119, 15, 101, 101, 47, 44, 125, 117, 17, 87, 78, 46, 78, 92]", "0", "[103, 45, 114, 18, 28, 87, 70, 54, 92, 72, 89, 74, 72, 3, 54, 48, 116, 25, 23, 23, 27, 83, 58, 115, 115, 112, 57, 49, 92, 81, 45, 55]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"jmlqetfwprekoaorfilgqqrthvu\"", "[65, 99, 76, 59, 31, 55, 85, 73, 14, 40, 59, 45, 45, 116, 104, 110, 87, 18, 51, 2, 5, 84, 59, 71, 99, 107, 8, 120, 9, 78, 70, 101]", "[1, 86, 94, 60, 87, 58, 96, 55, 81, 87, 118, 70, 106, 63, 83, 29, 61, 46, 58, 5, 92, 125, 54, 14, 49, 47, 124, 124, 49, 45, 102, 88]", "[66, 86, 90, 13, 24, 61, 29, 18, 111, 118, 40, 60, 30, 70, 22, 37, 34, 61, 110, 80, 5, 10, 79, 75, 119, 91, 45, 122, 99, 63, 26, 17]", "0", "[56, 66, 51, 13, 6, 85, 47, 47, 32, 91, 67, 107, 63, 52, 50, 55, 114, 0, 101, 66, 36, 57, 46, 50, 48, 32, 31, 15, 125, 63, 46, 23]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] }, { "value": [ "\"oiqczymvzvvtnngdv\"", "[10, 102, 12, 23, 72, 73, 64, 62, 32, 33, 83, 107, 110, 68, 6, 80, 12, 15, 75, 87, 111, 39, 49, 85, 76, 122, 125, 53, 16, 44, 22, 40]", "[12, 93, 95, 50, 121, 23, 33, 101, 65, 55, 88, 119, 37, 42, 26, 91, 26, 10, 45, 11, 4, 62, 15, 70, 117, 29, 14, 104, 79, 54, 86, 31]", "[124, 87, 65, 109, 70, 12, 66, 4, 69, 19, 3, 32, 96, 2, 105, 113, 39, 95, 5, 125, 47, 103, 17, 106, 104, 112, 28, 75, 64, 113, 18, 88]", "0", "[2, 8, 99, 107, 33, 65, 97, 97, 28, 53, 35, 102, 62, 7, 47, 17, 0, 20, 108, 122, 14, 111, 30, 81, 90, 63, 37, 32, 12, 84, 82, 55]" ], "var": [ "cmd", "col", "gid", "pid", "returnv", "row" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46vwnwj0s7.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* cmd, int* gid, int* pid, int* row, int* col, int returnv) { json output_json; output_json["cmd"] = cmd; std::vector<json> output_temp_5; for (unsigned int i6 = 0; i6 < 32; i6++) { int output_temp_7 = gid[i6]; output_temp_5.push_back(output_temp_7); } output_json["gid"] = output_temp_5; std::vector<json> output_temp_8; for (unsigned int i9 = 0; i9 < 32; i9++) { int output_temp_10 = pid[i9]; output_temp_8.push_back(output_temp_10); } output_json["pid"] = output_temp_8; std::vector<json> output_temp_11; for (unsigned int i12 = 0; i12 < 32; i12++) { int output_temp_13 = row[i12]; output_temp_11.push_back(output_temp_13); } output_json["row"] = output_temp_11; std::vector<json> output_temp_14; for (unsigned int i15 = 0; i15 < 32; i15++) { int output_temp_16 = col[i15]; output_temp_14.push_back(output_temp_16); } output_json["col"] = output_temp_14; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* cmd = strdup(input_json["cmd"].get<std::string>().c_str()); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["gid"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* gid = &input_temp_1_vec[0]; std::vector<int> input_temp_2_vec; for (auto& elem : input_json["pid"]) { int input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } int* pid = &input_temp_2_vec[0]; std::vector<int> input_temp_3_vec; for (auto& elem : input_json["row"]) { int input_temp_3_inner = elem; input_temp_3_vec.push_back(input_temp_3_inner); } int* row = &input_temp_3_vec[0]; std::vector<int> input_temp_4_vec; for (auto& elem : input_json["col"]) { int input_temp_4_inner = elem; input_temp_4_vec.push_back(input_temp_4_inner); } int* col = &input_temp_4_vec[0]; clock_t begin = clock(); int returnv = parse_motion_command(cmd, gid, pid, row, col); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(cmd, gid, pid, row, col, returnv); }
master
null
{"livein": ["cmd", "gid", "pid", "row", "col"], "liveout": ["cmd", "gid", "pid", "row", "col"], "returnvarname": ["returnv"], "execcmd": "", "funname": "parse_motion_command", "funargs": ["cmd", "gid", "pid", "row", "col"], "typemap": {"cmd": "string", "gid": "array(int32#32)", "pid": "array(int32#32)", "row": "array(int32#32)", "col": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46vwnwj0s7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hangmann/Temperature-Management-and-Prediction/TMS_Host/TemperatureModel/main.c
int heater_position_to_sensor_position(int i) { int k = i/5; int ret = 5*i - 24 * k; return ret; }
int heater_position_to_sensor_position(inti)
int heater_position_to_sensor_position(int i)
heater_position_to_sensor_position
[ "int", "int" ]
{ "code": [ ".globl heater_position_to_sensor_position\n.type heater_position_to_sensor_position, @function\nheater_position_to_sensor_position:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\timulq\t$1717986919, %rdx, %rdx\n\tshrq\t$32, %rdx\n\tsarl\t%edx\n\tsarl\t$31, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-20(%rbp), %edx\n\tmovl\t%edx, %eax\n\tsall\t$2, %eax\n\tleal\t(%rax,%rdx), %ecx\n\tmovl\t-8(%rbp), %edx\n\tmovl\t%edx, %eax\n\tsall\t$2, %edx\n\tsubl\t%edx, %eax\n\tsall\t$3, %eax\n\taddl\t%ecx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl heater_position_to_sensor_position\n.type heater_position_to_sensor_position, @function\nheater_position_to_sensor_position:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$5, %ecx\n\tleal\t(%rdi,%rdi,4), %edi\n\tcltd\n\tidivl\t%ecx\n\timull\t$-24, %eax, %eax\n\taddl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl heater_position_to_sensor_position\n.type heater_position_to_sensor_position, @function\nheater_position_to_sensor_position:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovslq\t%edi, %rax\n\tmovl\t%edi, %edx\n\timulq\t$1717986919, %rax, %rax\n\tsarl\t$31, %edx\n\tsarq\t$33, %rax\n\tsubl\t%edx, %eax\n\tleal\t0(,%rax,4), %edx\n\tsubl\t%edx, %eax\n\tleal\t(%rdi,%rdi,4), %edx\n\tleal\t(%rdx,%rax,8), %eax\n\tret\n\t.cfi_endproc\n\n", ".global heater_position_to_sensor_position\n.type heater_position_to_sensor_position, %function\nheater_position_to_sensor_position:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tmov\tw1, 26215\n\tmovk\tw1, 0x6666, lsl 16\n\tsmull\tx1, w0, w1\n\tlsr\tx1, x1, 32\n\tasr\tw1, w1, 1\n\tasr\tw0, w0, 31\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 12]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw2, w0, w1\n\tldr\tw1, [sp, 24]\n\tmov\tw0, w1\n\tlsl\tw1, w1, 2\n\tsub\tw0, w0, w1\n\tlsl\tw0, w0, 3\n\tadd\tw0, w2, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global heater_position_to_sensor_position\n.type heater_position_to_sensor_position, %function\nheater_position_to_sensor_position:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw1, 5\n\tmov\tw2, -24\n\tsdiv\tw1, w0, w1\n\tadd\tw0, w0, w0, lsl 2\n\tmadd\tw0, w1, w2, w0\n\tret\n\t.cfi_endproc\n\n", ".global heater_position_to_sensor_position\n.type heater_position_to_sensor_position, %function\nheater_position_to_sensor_position:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw1, 26215\n\tadd\tw2, w0, w0, lsl 2\n\tmovk\tw1, 0x6666, lsl 16\n\tsmull\tx1, w0, w1\n\tasr\tx1, x1, 33\n\tsub\tw0, w1, w0, asr 31\n\tsub\tw0, w0, w0, lsl 2\n\tadd\tw0, w2, w0, lsl 3\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include <time.h> #include <limits.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "43" ], "var": [ "i" ] }, { "value": [ "40" ], "var": [ "i" ] }, { "value": [ "121" ], "var": [ "i" ] }, { "value": [ "114" ], "var": [ "i" ] }, { "value": [ "97" ], "var": [ "i" ] }, { "value": [ "28" ], "var": [ "i" ] }, { "value": [ "48" ], "var": [ "i" ] }, { "value": [ "91" ], "var": [ "i" ] }, { "value": [ "52" ], "var": [ "i" ] }, { "value": [ "90" ], "var": [ "i" ] } ], "output": [ { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "42" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "20" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] }, { "value": [ "20" ], "var": [ "returnv" ] }, { "value": [ "18" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_45rhr8_mnk.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int i, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int i = input_json["i"]; clock_t begin = clock(); int returnv = heater_position_to_sensor_position(i); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(i, returnv); }
master
null
{"livein": ["i"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "heater_position_to_sensor_position", "funargs": ["i"], "typemap": {"i": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45rhr8_mnk.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
kote2ster/ConsoleChess/move.c
int Decrement(int a) { return --a; }
int Decrement(inta)
int Decrement(int a)
Decrement
[ "int", "int" ]
{ "code": [ ".globl Decrement\n.type Decrement, @function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tsubl\t$1, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl Decrement\n.type Decrement, @function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl Decrement\n.type Decrement, @function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global Decrement\n.type Decrement, %function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global Decrement\n.type Decrement, %function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tret\n\t.cfi_endproc\n\n", ".global Decrement\n.type Decrement, %function\nDecrement:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "109" ], "var": [ "a" ] }, { "value": [ "18" ], "var": [ "a" ] }, { "value": [ "81" ], "var": [ "a" ] }, { "value": [ "7" ], "var": [ "a" ] }, { "value": [ "26" ], "var": [ "a" ] }, { "value": [ "75" ], "var": [ "a" ] }, { "value": [ "59" ], "var": [ "a" ] }, { "value": [ "15" ], "var": [ "a" ] }, { "value": [ "14" ], "var": [ "a" ] }, { "value": [ "30" ], "var": [ "a" ] } ], "output": [ { "value": [ "108" ], "var": [ "returnv" ] }, { "value": [ "17" ], "var": [ "returnv" ] }, { "value": [ "80" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "25" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "58" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] }, { "value": [ "13" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42ww45x0fy.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; clock_t begin = clock(); int returnv = Decrement(a); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, returnv); }
master
null
{"livein": ["a"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "Decrement", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42ww45x0fy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
OpenNurbsFit/OpenNurbsFit/TomGine/ply.c
int equal_strings(char *s1, char *s2) { while (*s1 && *s2) if (*s1++ != *s2++) return (0); if (*s1 != *s2) return (0); else return (1); }
int equal_strings(char *s1, char *s2)
int equal_strings(char *s1, char *s2)
equal_strings
[ "int", "char *", "char *" ]
{ "code": [ ".globl equal_strings\n.type equal_strings, @function\nequal_strings:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tjmp\t.L2\n.L5:\n\tmovq\t-8(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -8(%rbp)\n\tmovzbl\t(%rax), %ecx\n\tmovq\t-16(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -16(%rbp)\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %cl\n\tje\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L4\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n.L4:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %dl\n\tje\t.L6\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L6:\n\tmovl\t$1, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl equal_strings\n.type equal_strings, @function\nequal_strings:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tmovb\t(%rdi,%rax), %cl\n\tmovb\t(%rsi,%rax), %dl\n\ttestb\t%cl, %cl\n\tje\t.L4\n\ttestb\t%dl, %dl\n\tje\t.L4\n\tincq\t%rax\n\tcmpb\t%dl, %cl\n\tje\t.L2\n\txorl\t%eax, %eax\n\tret\n.L4:\n\txorl\t%eax, %eax\n\tcmpb\t%dl, %cl\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl equal_strings\n.type equal_strings, @function\nequal_strings:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\ttestb\t%cl, %cl\n\tje\t.L4\n\taddq\t$1, %rax\n\tcmpb\t%cl, %dl\n\tjne\t.L6\n.L2:\n\tmovzbl\t(%rdi,%rax), %edx\n\tmovzbl\t(%rsi,%rax), %ecx\n\ttestb\t%dl, %dl\n\tjne\t.L11\n.L4:\n\txorl\t%eax, %eax\n\tcmpb\t%cl, %dl\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global equal_strings\n.type equal_strings, %function\nequal_strings:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tb\t.L2\n.L5:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw1, [x0]\n\tldr\tx0, [sp]\n\tadd\tx2, x0, 1\n\tstr\tx2, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbeq\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L4\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n.L4:\n\tldr\tx0, [sp, 8]\n\tldrb\tw1, [x0]\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbeq\t.L6\n\tmov\tw0, 0\n\tb\t.L3\n.L6:\n\tmov\tw0, 1\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global equal_strings\n.type equal_strings, %function\nequal_strings:\n.LFB35:\n\t.cfi_startproc\n\tmov\tx2, 0\n.L2:\n\tldrb\tw4, [x0, x2]\n\tldrb\tw3, [x1, x2]\n\tcbz\tw4, .L4\n\tcbnz\tw3, .L5\n.L4:\n\tcmp\tw4, w3\n\tcset\tw0, eq\n.L1:\n\tret\n.L5:\n\tadd\tx2, x2, 1\n\tcmp\tw4, w3\n\tbeq\t.L2\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global equal_strings\n.type equal_strings, %function\nequal_strings:\n.LFB50:\n\t.cfi_startproc\n\tmov\tx2, 0\n\tb\t.L2\n\t.p2align 2,,3\n.L11:\n\tcbz\tw4, .L4\n\tbne\t.L6\n.L2:\n\tldrb\tw3, [x0, x2]\n\tldrb\tw4, [x1, x2]\n\tadd\tx2, x2, 1\n\tcmp\tw3, w4\n\tcbnz\tw3, .L11\n.L4:\n\tcmp\tw3, w4\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L6:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"enstohphsltvzxzqsdlxqhtwcoaqtq\"", "\"xdxqiomdkwwamevmsdrochfukdl\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"unsdrm\"", "\"kquslmnhustirfphqyzzqaiadmttbb\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"rkwogodyflqiuldqul\"", "\"durlkksoiitluglbfvk\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"qepwnxbludmndirwzifchvacnobiqji\"", "\"fvuzsqlgdbpfwaqdeabpudpehptnofd\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"irlltcshtavknhb\"", "\"ztrexfdbeko\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"moedlsqcqazusnemnotm\"", "\"qoknxdentgxaksiybmeb\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"payaanbypgcluleuhdvpkx\"", "\"cvoknpmhvbhkecvjfnuzxsizhsounwb\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"t\"", "\"kqwxtxmgyghaisezedwjhhfaxoklxo\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"ctgaswctctilkvbnjx\"", "\"ingtwixtzuofnsjdc\"" ], "var": [ "s1", "s2" ] }, { "value": [ "\"chahyadblisiijab\"", "\"upltilgmkkfsfp\"" ], "var": [ "s1", "s2" ] } ], "output": [ { "value": [ "0", "\"enstohphsltvzxzqsdlxqhtwcoaqtq\"", "\"xdxqiomdkwwamevmsdrochfukdl\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"unsdrm\"", "\"kquslmnhustirfphqyzzqaiadmttbb\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"rkwogodyflqiuldqul\"", "\"durlkksoiitluglbfvk\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"qepwnxbludmndirwzifchvacnobiqji\"", "\"fvuzsqlgdbpfwaqdeabpudpehptnofd\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"irlltcshtavknhb\"", "\"ztrexfdbeko\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"moedlsqcqazusnemnotm\"", "\"qoknxdentgxaksiybmeb\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"payaanbypgcluleuhdvpkx\"", "\"cvoknpmhvbhkecvjfnuzxsizhsounwb\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"t\"", "\"kqwxtxmgyghaisezedwjhhfaxoklxo\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"ctgaswctctilkvbnjx\"", "\"ingtwixtzuofnsjdc\"" ], "var": [ "returnv", "s1", "s2" ] }, { "value": [ "0", "\"chahyadblisiijab\"", "\"upltilgmkkfsfp\"" ], "var": [ "returnv", "s1", "s2" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52i98symri.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* s1, char* s2, int returnv) { json output_json; output_json["s1"] = s1; output_json["s2"] = s2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* s1 = strdup(input_json["s1"].get<std::string>().c_str()); char* s2 = strdup(input_json["s2"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = equal_strings(s1, s2); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(s1, s2, returnv); }
master
null
{"livein": ["s1", "s2"], "liveout": ["s1", "s2"], "returnvarname": ["returnv"], "execcmd": "", "funname": "equal_strings", "funargs": ["s1", "s2"], "typemap": {"s1": "string", "s2": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52i98symri.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jlspyaozhongkai/Uter/examples/example_base/src/so_release.c
int fun_2_in_release_so(int x, int y) { return 20 + x + y; }
int fun_2_in_release_so(intx, inty)
int fun_2_in_release_so(int x, int y)
fun_2_in_release_so
[ "int", "int", "int" ]
{ "code": [ ".globl fun_2_in_release_so\n.type fun_2_in_release_so, @function\nfun_2_in_release_so:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tleal\t20(%rax), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fun_2_in_release_so\n.type fun_2_in_release_so, @function\nfun_2_in_release_so:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t20(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl fun_2_in_release_so\n.type fun_2_in_release_so, @function\nfun_2_in_release_so:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t20(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global fun_2_in_release_so\n.type fun_2_in_release_so, %function\nfun_2_in_release_so:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tadd\tw1, w0, 20\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fun_2_in_release_so\n.type fun_2_in_release_so, %function\nfun_2_in_release_so:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 20\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global fun_2_in_release_so\n.type fun_2_in_release_so, %function\nfun_2_in_release_so:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, 20\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "30", "107" ], "var": [ "x", "y" ] }, { "value": [ "7", "37" ], "var": [ "x", "y" ] }, { "value": [ "67", "120" ], "var": [ "x", "y" ] }, { "value": [ "14", "13" ], "var": [ "x", "y" ] }, { "value": [ "103", "82" ], "var": [ "x", "y" ] }, { "value": [ "113", "48" ], "var": [ "x", "y" ] }, { "value": [ "45", "87" ], "var": [ "x", "y" ] }, { "value": [ "10", "6" ], "var": [ "x", "y" ] }, { "value": [ "74", "56" ], "var": [ "x", "y" ] }, { "value": [ "104", "107" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "157" ], "var": [ "returnv" ] }, { "value": [ "64" ], "var": [ "returnv" ] }, { "value": [ "207" ], "var": [ "returnv" ] }, { "value": [ "47" ], "var": [ "returnv" ] }, { "value": [ "205" ], "var": [ "returnv" ] }, { "value": [ "181" ], "var": [ "returnv" ] }, { "value": [ "152" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "150" ], "var": [ "returnv" ] }, { "value": [ "231" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_317ma9qexb.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int y, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; int y = input_json["y"]; clock_t begin = clock(); int returnv = fun_2_in_release_so(x, y); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, returnv); }
master
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fun_2_in_release_so", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_317ma9qexb.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
theme/exe_ustc_c1/e1/exe1.3.c
int factorial(int n){ int i,f; f = 1; for(i=2;i<=n;i++){ f *= i; } return f; }
int factorial(intn)
int factorial(int n)
factorial
[ "int", "int" ]
{ "code": [ ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$1, -4(%rbp)\n\tmovl\t$2, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-4(%rbp), %eax\n\timull\t-8(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjle\t.L3\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %r8d\n\tmovl\t$2, %eax\n.L2:\n\tcmpl\t%edi, %eax\n\tjg\t.L5\n\timull\t%eax, %r8d\n\tincl\t%eax\n\tjmp\t.L2\n.L5:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl factorial\n.type factorial, @function\nfactorial:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\taddl\t$1, %edi\n\tmovl\t$1, %r8d\n\tmovl\t$2, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\timull\t%eax, %r8d\n\taddl\t$1, %eax\n\tcmpl\t%edi, %eax\n\tjne\t.L3\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$1, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tble\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw1, 2\n\tmov\tw0, 1\n.L2:\n\tcmp\tw1, w2\n\tble\t.L3\n\tret\n.L3:\n\tmul\tw0, w0, w1\n\tadd\tw1, w1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global factorial\n.type factorial, %function\nfactorial:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tcmp\tw0, 1\n\tble\t.L8\n\tsub\tw0, w0, #2\n\tsub\tw3, w2, #1\n\tcmp\tw0, 17\n\tbls\t.L9\n\tadrp\tx1, .LC0\n\tlsr\tw0, w3, 2\n\tmovi\tv0.4s, 0x1\n\tmovi\tv3.4s, 0x4\n\tldr\tq1, [x1, #:lo12:.LC0]\n\tmov\tw1, 0\n\t.p2align 3,,7\n.L4:\n\tmov\tv2.16b, v1.16b\n\tadd\tw1, w1, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw1, w0\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbne\t.L4\n\tmovi\tv1.4s, 0\n\tand\tw1, w3, -4\n\tcmp\tw3, w1\n\tadd\tw1, w1, 2\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\t.p2align 3,,7\n.L7:\n\tmul\tw0, w0, w1\n\tadd\tw1, w1, 1\n\tcmp\tw2, w1\n\tbge\t.L7\n.L1:\n\tret\n\t.p2align 2,,3\n.L8:\n\tmov\tw0, 1\n\tret\n.L9:\n\tmov\tw0, 1\n\tmov\tw1, 2\n\tb\t.L7\n\t.cfi_endproc\n.LC0: \t.word\t2\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "118" ], "var": [ "n" ] }, { "value": [ "62" ], "var": [ "n" ] }, { "value": [ "30" ], "var": [ "n" ] }, { "value": [ "69" ], "var": [ "n" ] }, { "value": [ "108" ], "var": [ "n" ] }, { "value": [ "42" ], "var": [ "n" ] }, { "value": [ "119" ], "var": [ "n" ] }, { "value": [ "51" ], "var": [ "n" ] }, { "value": [ "75" ], "var": [ "n" ] }, { "value": [ "58" ], "var": [ "n" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1409286144" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48rqrindot.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = factorial(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "factorial", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48rqrindot.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hlin09/renjin/tools/gcc-bridge/compiler/src/test/resources/org/renjin/gcc/fpcmp.c
int truncate(double x) { int y = (int)x; return y; }
int truncate(doublex)
int truncate(double x)
truncate
[ "int", "double" ]
{ "code": [ ".globl truncate\n.type truncate, @function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -24(%rbp)\n\tmovsd\t-24(%rbp), %xmm0\n\tcvttsd2sil\t%xmm0, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl truncate\n.type truncate, @function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcvttsd2sil\t%xmm0, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl truncate\n.type truncate, @function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcvttsd2sil\t%xmm0, %eax\n\tret\n\t.cfi_endproc\n\n", ".global truncate\n.type truncate, %function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tfcvtzs\tw0, d0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global truncate\n.type truncate, %function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tfcvtzs\tw0, d0\n\tret\n\t.cfi_endproc\n\n", ".global truncate\n.type truncate, %function\ntruncate:\n.LFB0:\n\t.cfi_startproc\n\tfcvtzs\tw0, d0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "39.4782090918" ], "var": [ "x" ] }, { "value": [ "75.8129564219" ], "var": [ "x" ] }, { "value": [ "68.2256354905" ], "var": [ "x" ] }, { "value": [ "61.2887883942" ], "var": [ "x" ] }, { "value": [ "45.2227290318" ], "var": [ "x" ] }, { "value": [ "28.6842262851" ], "var": [ "x" ] }, { "value": [ "28.1681553667" ], "var": [ "x" ] }, { "value": [ "78.2748997874" ], "var": [ "x" ] }, { "value": [ "3.08367782854" ], "var": [ "x" ] }, { "value": [ "43.8653108653" ], "var": [ "x" ] } ], "output": [ { "value": [ "39" ], "var": [ "returnv" ] }, { "value": [ "75" ], "var": [ "returnv" ] }, { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "61" ], "var": [ "returnv" ] }, { "value": [ "45" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "78" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54pha6d8kh.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double x, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); double x = input_json["x"]; clock_t begin = clock(); int returnv = truncate(x); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, returnv); }
master
null
{"livein": ["x"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "truncate", "funargs": ["x"], "typemap": {"x": "float64", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54pha6d8kh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
parklab/NGSCheckMate/ngscheckmate_fastq-source/stringhash2.c
int base2int(char b){ switch(b){ case 'A': return(0); case 'C': return(1); case 'G': return(2); case 'T': return(3); default: return(4); } }
int base2int(charb)
int base2int(char b)
base2int
[ "int", "char" ]
{ "code": [ ".globl base2int\n.type base2int, @function\nbase2int:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovsbl\t-4(%rbp), %eax\n\tcmpl\t$84, %eax\n\tje\t.L2\n\tcmpl\t$84, %eax\n\tjg\t.L3\n\tcmpl\t$71, %eax\n\tje\t.L4\n\tcmpl\t$71, %eax\n\tjg\t.L3\n\tcmpl\t$65, %eax\n\tje\t.L5\n\tcmpl\t$67, %eax\n\tje\t.L6\n\tjmp\t.L3\n.L5:\n\tmovl\t$0, %eax\n\tjmp\t.L7\n.L6:\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L4:\n\tmovl\t$2, %eax\n\tjmp\t.L7\n.L2:\n\tmovl\t$3, %eax\n\tjmp\t.L7\n.L3:\n\tmovl\t$4, %eax\n.L7:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl base2int\n.type base2int, @function\nbase2int:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$65, %edi\n\tmovl\t$4, %eax\n\tcmpb\t$19, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl base2int\n.type base2int, @function\nbase2int:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$65, %edi\n\tmovl\t$4, %eax\n\tcmpb\t$19, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovl\t(%rax,%rdi,4), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global base2int\n.type base2int, %function\nbase2int:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 84\n\tbeq\t.L2\n\tcmp\tw0, 84\n\tbgt\t.L3\n\tcmp\tw0, 71\n\tbeq\t.L4\n\tcmp\tw0, 71\n\tbgt\t.L3\n\tcmp\tw0, 65\n\tbeq\t.L5\n\tcmp\tw0, 67\n\tbeq\t.L6\n\tb\t.L3\n.L5:\n\tmov\tw0, 0\n\tb\t.L7\n.L6:\n\tmov\tw0, 1\n\tb\t.L7\n.L4:\n\tmov\tw0, 2\n\tb\t.L7\n.L2:\n\tmov\tw0, 3\n\tb\t.L7\n.L3:\n\tmov\tw0, 4\n.L7:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global base2int\n.type base2int, %function\nbase2int:\n.LFB35:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #65\n\tand\tw0, w0, 255\n\tcmp\tw0, 19\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, x0]\n.L1:\n\tret\n.L3:\n\tmov\tw0, 4\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global base2int\n.type base2int, %function\nbase2int:\n.LFB50:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #65\n\tand\tw0, w0, 255\n\tcmp\tw0, 19\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw0, [x1, x0, lsl 2]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "111" ], "var": [ "b" ] }, { "value": [ "88" ], "var": [ "b" ] }, { "value": [ "110" ], "var": [ "b" ] }, { "value": [ "64" ], "var": [ "b" ] }, { "value": [ "5" ], "var": [ "b" ] }, { "value": [ "78" ], "var": [ "b" ] }, { "value": [ "5" ], "var": [ "b" ] }, { "value": [ "61" ], "var": [ "b" ] }, { "value": [ "52" ], "var": [ "b" ] }, { "value": [ "70" ], "var": [ "b" ] } ], "output": [ { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38n_mya6hj.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char b = input_json["b"].get<char>(); clock_t begin = clock(); int returnv = base2int(b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(b, returnv); }
master
null
{"livein": ["b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "base2int", "funargs": ["b"], "typemap": {"b": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38n_mya6hj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Asquera/rubyspec/environments/ruby/rubyspec/optional/ffi/fixtures/NumberTest.c
double sub_double(double arg1, double arg2) { return arg1 - arg2; }
double sub_double(doublearg1, doublearg2)
double sub_double(double arg1, double arg2)
sub_double
[ "double", "double", "double" ]
{ "code": [ ".globl sub_double\n.type sub_double, @function\nsub_double:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t%xmm1, -16(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tsubsd\t-16(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sub_double\n.type sub_double, @function\nsub_double:\n.LFB30:\n\t.cfi_startproc\n\tendbr64\n\tsubsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl sub_double\n.type sub_double, @function\nsub_double:\n.LFB40:\n\t.cfi_startproc\n\tendbr64\n\tsubsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global sub_double\n.type sub_double, %function\nsub_double:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tstr\td1, [sp]\n\tldr\td1, [sp, 8]\n\tldr\td0, [sp]\n\tfsub\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sub_double\n.type sub_double, %function\nsub_double:\n.LFB30:\n\t.cfi_startproc\n\tfsub\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n", ".global sub_double\n.type sub_double, %function\nsub_double:\n.LFB40:\n\t.cfi_startproc\n\tfsub\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <sys/types.h> #include <stdio.h> #include <string.h> #include <stdint.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "13.2497195067", "16.6479829455" ], "var": [ "arg1", "arg2" ] }, { "value": [ "46.6493397757", "75.5096179261" ], "var": [ "arg1", "arg2" ] }, { "value": [ "66.3558221728", "12.9187109741" ], "var": [ "arg1", "arg2" ] }, { "value": [ "33.0835680845", "56.9600818257" ], "var": [ "arg1", "arg2" ] }, { "value": [ "66.7682060278", "39.4765168247" ], "var": [ "arg1", "arg2" ] }, { "value": [ "32.587969596", "86.179732188" ], "var": [ "arg1", "arg2" ] }, { "value": [ "3.94871845417", "38.2632414739" ], "var": [ "arg1", "arg2" ] }, { "value": [ "99.5341144343", "58.2764425937" ], "var": [ "arg1", "arg2" ] }, { "value": [ "80.7516270658", "62.5031300686" ], "var": [ "arg1", "arg2" ] }, { "value": [ "90.3932499452", "22.6674485952" ], "var": [ "arg1", "arg2" ] } ], "output": [ { "value": [ "-3.398263438800001" ], "var": [ "returnv" ] }, { "value": [ "-28.860278150400006" ], "var": [ "returnv" ] }, { "value": [ "53.4371111987" ], "var": [ "returnv" ] }, { "value": [ "-23.8765137412" ], "var": [ "returnv" ] }, { "value": [ "27.291689203100006" ], "var": [ "returnv" ] }, { "value": [ "-53.591762592" ], "var": [ "returnv" ] }, { "value": [ "-34.314523019730004" ], "var": [ "returnv" ] }, { "value": [ "41.2576718406" ], "var": [ "returnv" ] }, { "value": [ "18.248496997199993" ], "var": [ "returnv" ] }, { "value": [ "67.72580135" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_30v6mh6iyi.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double arg1, double arg2, double returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); double arg1 = input_json["arg1"]; double arg2 = input_json["arg2"]; clock_t begin = clock(); double returnv = sub_double(arg1, arg2); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(arg1, arg2, returnv); }
master
null
{"livein": ["arg1", "arg2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sub_double", "funargs": ["arg1", "arg2"], "typemap": {"arg1": "float64", "arg2": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30v6mh6iyi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Boshin/workspace/ARMToolChain/source/glibc-2.21/elf/reldep6mod4.c
int weak (void) { return 30; }
int weak()
int weak (void)
weak
[ "int", "" ]
{ "code": [ ".globl weak\n.type weak, @function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$30, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl weak\n.type weak, @function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$30, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl weak\n.type weak, @function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$30, %eax\n\tret\n\t.cfi_endproc\n\n", ".global weak\n.type weak, %function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 30\n\tret\n\t.cfi_endproc\n\n", ".global weak\n.type weak, %function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 30\n\tret\n\t.cfi_endproc\n\n", ".global weak\n.type weak, %function\nweak:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 30\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_565a8cih31.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = weak(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
baseline
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "weak", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_565a8cih31.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Medeah/CART/l2/pra.c
int bic(int x, int m) { return x & (~m); }
int bic(intx, intm)
int bic(int x, int m)
bic
[ "int", "int", "int" ]
{ "code": [ ".globl bic\n.type bic, @function\nbic:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tnotl\t%eax\n\tandl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl bic\n.type bic, @function\nbic:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tnotl\t%esi\n\tmovl\t%esi, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl bic\n.type bic, @function\nbic:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tnotl\t%esi\n\tmovl\t%esi, %eax\n\tandl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tmvn\tw1, w0\n\tldr\tw0, [sp, 12]\n\tand\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB13:\n\t.cfi_startproc\n\tbic\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global bic\n.type bic, %function\nbic:\n.LFB23:\n\t.cfi_startproc\n\tbic\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <assert.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "40", "38" ], "var": [ "x", "m" ] }, { "value": [ "91", "20" ], "var": [ "x", "m" ] }, { "value": [ "19", "72" ], "var": [ "x", "m" ] }, { "value": [ "39", "123" ], "var": [ "x", "m" ] }, { "value": [ "73", "108" ], "var": [ "x", "m" ] }, { "value": [ "17", "86" ], "var": [ "x", "m" ] }, { "value": [ "111", "65" ], "var": [ "x", "m" ] }, { "value": [ "23", "87" ], "var": [ "x", "m" ] }, { "value": [ "109", "122" ], "var": [ "x", "m" ] }, { "value": [ "15", "48" ], "var": [ "x", "m" ] } ], "output": [ { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "75" ], "var": [ "returnv" ] }, { "value": [ "19" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "46" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29l8hdx0sc.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int m, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; int m = input_json["m"]; clock_t begin = clock(); int returnv = bic(x, m); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, m, returnv); }
master
null
{"livein": ["x", "m"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "bic", "funargs": ["x", "m"], "typemap": {"x": "int32", "m": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29l8hdx0sc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tonussi/org/mips/fact.c
int fact (int n) { if (n < 1) { return 1; } else { return n * fact(n-1); } }
int fact(intn)
int fact (int n)
fact
[ "int", "int" ]
{ "code": [ ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tfact\n\timull\t-4(%rbp), %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L3:\n\ttestl\t%edi, %edi\n\tjle\t.L4\n\timull\t%edi, %eax\n\tdecl\t%edi\n\tjmp\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\timull\t%edi, %eax\n\tsubl\t$1, %edi\n\tjne\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbgt\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tbl\tfact\n\tmov\tw1, w0\n\tldr\tw0, [sp, 28]\n\tmul\tw0, w1, w0\n.L3:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n.L3:\n\tcmp\tw1, 0\n\tble\t.L4\n\tmul\tw0, w0, w1\n\tsub\tw1, w1, #1\n\tb\t.L3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n\tcmp\tw1, 0\n\tble\t.L1\n\tcmp\tw1, 18\n\tmov\tw3, w1\n\tble\t.L9\n\tadrp\tx0, .LC0\n\tdup\tv1.4s, w1\n\tmovi\tv0.4s, 0x1\n\tlsr\tw2, w1, 2\n\tldr\tq2, [x0, #:lo12:.LC0]\n\tmov\tw0, 0\n\tmvni\tv3.4s, 0x3\n\tadd\tv1.4s, v1.4s, v2.4s\n\t.p2align 3,,7\n.L5:\n\tmov\tv2.16b, v1.16b\n\tadd\tw0, w0, 1\n\tadd\tv1.4s, v1.4s, v3.4s\n\tcmp\tw0, w2\n\tmul\tv0.4s, v0.4s, v2.4s\n\tbne\t.L5\n\tmovi\tv1.4s, 0\n\tand\tw0, w1, -4\n\tsub\tw1, w1, w0\n\tcmp\tw3, w0\n\text\tv2.16b, v0.16b, v1.16b, #8\n\tmul\tv0.4s, v0.4s, v2.4s\n\text\tv1.16b, v0.16b, v1.16b, #4\n\tmul\tv0.4s, v0.4s, v1.4s\n\tumov\tw0, v0.s[0]\n\tbeq\t.L1\n\t.p2align 3,,7\n.L8:\n\tmov\tw2, w1\n\tsubs\tw1, w1, #1\n\tmul\tw0, w0, w2\n\tbne\t.L8\n.L1:\n\tret\n.L9:\n\tmov\tw0, 1\n\tb\t.L8\n\t.cfi_endproc\n.LC0: \t.word\t0\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "97" ], "var": [ "n" ] }, { "value": [ "1" ], "var": [ "n" ] }, { "value": [ "123" ], "var": [ "n" ] }, { "value": [ "86" ], "var": [ "n" ] }, { "value": [ "70" ], "var": [ "n" ] }, { "value": [ "124" ], "var": [ "n" ] }, { "value": [ "46" ], "var": [ "n" ] }, { "value": [ "115" ], "var": [ "n" ] }, { "value": [ "89" ], "var": [ "n" ] }, { "value": [ "59" ], "var": [ "n" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_33xg77rksu.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = fact(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fact", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33xg77rksu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
luzhuomi/cpp-obs/test/const.c
int f(int x) { const int i = x; if (x > 0) { x = x + i; } return x; }
int f(intx)
int f(int x)
f
[ "int", "int" ]
{ "code": [ ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\taddl\t%eax, -20(%rbp)\n.L2:\n\tmovl\t-20(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%edi, %edi\n\tjle\t.L2\n\taddl\t%eax, %eax\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rdi), %eax\n\ttestl\t%edi, %edi\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tble\t.L2\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 12]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tble\t.L2\n\tlsl\tw0, w0, 1\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tlsl\tw1, w0, 1\n\tcsel\tw0, w1, w0, gt\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "51" ], "var": [ "x" ] }, { "value": [ "46" ], "var": [ "x" ] }, { "value": [ "58" ], "var": [ "x" ] }, { "value": [ "125" ], "var": [ "x" ] }, { "value": [ "86" ], "var": [ "x" ] }, { "value": [ "3" ], "var": [ "x" ] }, { "value": [ "18" ], "var": [ "x" ] }, { "value": [ "51" ], "var": [ "x" ] }, { "value": [ "92" ], "var": [ "x" ] }, { "value": [ "87" ], "var": [ "x" ] } ], "output": [ { "value": [ "102" ], "var": [ "returnv" ] }, { "value": [ "92" ], "var": [ "returnv" ] }, { "value": [ "116" ], "var": [ "returnv" ] }, { "value": [ "250" ], "var": [ "returnv" ] }, { "value": [ "172" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "102" ], "var": [ "returnv" ] }, { "value": [ "184" ], "var": [ "returnv" ] }, { "value": [ "174" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_4486f2fd2r.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; clock_t begin = clock(); int returnv = f(x); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, returnv); }
master
null
{"livein": ["x"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_4486f2fd2r.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.dg/zero_sign_ext_test.c
__attribute__((noinline, noclone)) short foo4 (short arg){ short ret = 1; if (arg + 1 < 12 || arg + 1 > ((!0) ? ((1 << (sizeof (short) * 8 - 1)) - 1) : ((1 << (sizeof (short) * 8)) - 1)) + 1) return ret; arg = arg + 1; ret = (char)arg; return arg; }
short foo4(shortarg)
__attribute__((no, noclone)) short foo4 (short arg)
foo4
[ "short", "short" ]
{ "code": [ ".globl foo4\n.type foo4, @function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovw\t%ax, -20(%rbp)\n\tmovw\t$1, -2(%rbp)\n\tcmpw\t$10, -20(%rbp)\n\tjg\t.L2\n\tmovzwl\t-2(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovzwl\t-20(%rbp), %eax\n\taddl\t$1, %eax\n\tmovw\t%ax, -20(%rbp)\n\tmovzwl\t-20(%rbp), %eax\n\tcbtw\n\tmovw\t%ax, -2(%rbp)\n\tmovzwl\t-20(%rbp), %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl foo4\n.type foo4, @function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tcmpw\t$10, %di\n\tmovl\t$1, %edx\n\tcmovle\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl foo4\n.type foo4, @function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tcmpw\t$10, %di\n\tmovl\t$1, %edx\n\tcmovle\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global foo4\n.type foo4, %function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrh\tw0, [sp, 14]\n\tmov\tw0, 1\n\tstrh\tw0, [sp, 30]\n\tldrsh\tw0, [sp, 14]\n\tcmp\tw0, 10\n\tbgt\t.L2\n\tldrsh\tw0, [sp, 30]\n\tb\t.L3\n.L2:\n\tldrh\tw0, [sp, 14]\n\tadd\tw0, w0, 1\n\tand\tw0, w0, 65535\n\tstrh\tw0, [sp, 14]\n\tldrh\tw0, [sp, 14]\n\tand\tw0, w0, 255\n\tstrh\tw0, [sp, 30]\n\tldrsh\tw0, [sp, 14]\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global foo4\n.type foo4, %function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tsxth\tw1, w0\n\tadd\tw0, w1, 1\n\tcmp\tw1, 10\n\tsxth\tw0, w0\n\tcsinc\tw0, w0, wzr, gt\n\tret\n\t.cfi_endproc\n\n", ".global foo4\n.type foo4, %function\nfoo4:\n.LFB0:\n\t.cfi_startproc\n\tsxth\tw0, w0\n\tadd\tw1, w0, 1\n\tcmp\tw0, 10\n\tsxth\tw0, w1\n\tcsinc\tw0, w0, wzr, gt\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "113" ], "var": [ "arg" ] }, { "value": [ "15" ], "var": [ "arg" ] }, { "value": [ "113" ], "var": [ "arg" ] }, { "value": [ "125" ], "var": [ "arg" ] }, { "value": [ "54" ], "var": [ "arg" ] }, { "value": [ "104" ], "var": [ "arg" ] }, { "value": [ "24" ], "var": [ "arg" ] }, { "value": [ "103" ], "var": [ "arg" ] }, { "value": [ "112" ], "var": [ "arg" ] }, { "value": [ "15" ], "var": [ "arg" ] } ], "output": [ { "value": [ "114" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "114" ], "var": [ "returnv" ] }, { "value": [ "126" ], "var": [ "returnv" ] }, { "value": [ "55" ], "var": [ "returnv" ] }, { "value": [ "105" ], "var": [ "returnv" ] }, { "value": [ "25" ], "var": [ "returnv" ] }, { "value": [ "104" ], "var": [ "returnv" ] }, { "value": [ "113" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_47x3hn3mxk.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(short arg, short returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); short arg = input_json["arg"]; clock_t begin = clock(); short returnv = foo4(arg); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(arg, returnv); }
arm-hot-cold
null
{"livein": ["arg"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "foo4", "funargs": ["arg"], "typemap": {"arg": "int16", "returnv": "int16"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47x3hn3mxk.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elominp/BSQ/src/my_get_el.c
int my_get_el(char c, char *base) { int lp; lp = 0; while (base[lp] != '\0') { if (c == base[lp]) return (lp); ++lp; } return (-1); }
int my_get_el(charc, char *base)
int my_get_el(char c, char *base)
my_get_el
[ "int", "char", "char *" ]
{ "code": [ ".globl my_get_el\n.type my_get_el, @function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovq\t%rsi, -32(%rbp)\n\tmovb\t%al, -20(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -20(%rbp)\n\tjne\t.L3\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L4\n.L3:\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovl\t$-1, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl my_get_el\n.type my_get_el, @function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tmovb\t(%rsi,%rax), %dl\n\tmovl\t%eax, %r8d\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tincq\t%rax\n\tcmpb\t%dil, %dl\n\tjne\t.L2\n\tjmp\t.L1\n.L6:\n\torl\t$-1, %r8d\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl my_get_el\n.type my_get_el, @function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rsi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L4\n\txorl\t%eax, %eax\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\taddq\t$1, %rax\n\tmovzbl\t(%rsi,%rax), %edx\n\ttestb\t%dl, %dl\n\tje\t.L4\n.L3:\n\tmovl\t%eax, %r8d\n\tcmpb\t%dl, %dil\n\tjne\t.L7\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$-1, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global my_get_el\n.type my_get_el, %function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tstr\tx1, [sp]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L5:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 15]\n\tcmp\tw1, w0\n\tbne\t.L3\n\tldr\tw0, [sp, 28]\n\tb\t.L4\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n.L2:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tmov\tw0, -1\n.L4:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global my_get_el\n.type my_get_el, %function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tand\tw4, w0, 255\n\tmov\tx2, 0\n.L2:\n\tldrb\tw3, [x1, x2]\n\tmov\tw0, w2\n\tcbnz\tw3, .L4\n\tmov\tw0, -1\n\tb\t.L1\n.L4:\n\tadd\tx2, x2, 1\n\tcmp\tw3, w4\n\tbne\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global my_get_el\n.type my_get_el, %function\nmy_get_el:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw3, [x1]\n\tand\tw4, w0, 255\n\tcbz\tw3, .L4\n\tmov\tx2, 0\n\tb\t.L3\n\t.p2align 2,,3\n.L7:\n\tldrb\tw3, [x1, x2]\n\tcbz\tw3, .L4\n.L3:\n\tmov\tw0, w2\n\tcmp\tw4, w3\n\tadd\tx2, x2, 1\n\tbne\t.L7\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "25", "\"wdftgzuppjndsr\"" ], "var": [ "c", "base" ] }, { "value": [ "51", "\"hyyou\"" ], "var": [ "c", "base" ] }, { "value": [ "117", "\"ks\"" ], "var": [ "c", "base" ] }, { "value": [ "21", "\"sruzufkikbukodgkmmjnkdggyxqb\"" ], "var": [ "c", "base" ] }, { "value": [ "24", "\"tglxvwjixmdbskucstwh\"" ], "var": [ "c", "base" ] }, { "value": [ "109", "\"hffbmipoggwidjwtdwcskuiulxqwtj\"" ], "var": [ "c", "base" ] }, { "value": [ "55", "\"mqsnmhvm\"" ], "var": [ "c", "base" ] }, { "value": [ "109", "\"nbsxzxdhoflqrlwvnnyuchjbrssgw\"" ], "var": [ "c", "base" ] }, { "value": [ "13", "\"wecbwkswppdwirsmc\"" ], "var": [ "c", "base" ] }, { "value": [ "83", "\"ekqxiijermtgljeuxvpiisu\"" ], "var": [ "c", "base" ] } ], "output": [ { "value": [ "\"wdftgzuppjndsr\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"hyyou\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"ks\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"sruzufkikbukodgkmmjnkdggyxqb\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"tglxvwjixmdbskucstwh\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"hffbmipoggwidjwtdwcskuiulxqwtj\"", "4" ], "var": [ "base", "returnv" ] }, { "value": [ "\"mqsnmhvm\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"nbsxzxdhoflqrlwvnnyuchjbrssgw\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"wecbwkswppdwirsmc\"", "-1" ], "var": [ "base", "returnv" ] }, { "value": [ "\"ekqxiijermtgljeuxvpiisu\"", "-1" ], "var": [ "base", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55sm73txj0.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char c, char* base, int returnv) { json output_json; output_json["base"] = base; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char c = input_json["c"].get<char>(); char* base = strdup(input_json["base"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = my_get_el(c, base); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(c, base, returnv); }
master
null
{"livein": ["c", "base"], "liveout": ["base"], "returnvarname": ["returnv"], "execcmd": "", "funname": "my_get_el", "funargs": ["c", "base"], "typemap": {"c": "int8", "base": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55sm73txj0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bairyn/opencurry/src/util.c
int proc_false(void) { return 0; }
int proc_false()
int proc_false(void)
proc_false
[ "int", "" ]
{ "code": [ ".globl proc_false\n.type proc_false, @function\nproc_false:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl proc_false\n.type proc_false, @function\nproc_false:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl proc_false\n.type proc_false, @function\nproc_false:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global proc_false\n.type proc_false, %function\nproc_false:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global proc_false\n.type proc_false, %function\nproc_false:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global proc_false\n.type proc_false, %function\nproc_false:\n.LFB50:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_50pkozoqgm.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = proc_false(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "proc_false", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50pkozoqgm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
mirohs/prog1lib/lib/double_array.c
double double_plus(double x, double y, int index) { return x + y; }
double double_plus(doublex, doubley, intindex)
double double_plus(double x, double y, int index)
double_plus
[ "double", "double", "double", "int" ]
{ "code": [ ".globl double_plus\n.type double_plus, @function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t%xmm1, -16(%rbp)\n\tmovl\t%edi, -20(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\taddsd\t-16(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl double_plus\n.type double_plus, @function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl double_plus\n.type double_plus, @function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global double_plus\n.type double_plus, %function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\td0, [sp, 24]\n\tstr\td1, [sp, 16]\n\tstr\tw0, [sp, 12]\n\tldr\td1, [sp, 24]\n\tldr\td0, [sp, 16]\n\tfadd\td0, d1, d0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global double_plus\n.type double_plus, %function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tfadd\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n", ".global double_plus\n.type double_plus, %function\ndouble_plus:\n.LFB0:\n\t.cfi_startproc\n\tfadd\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdarg.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "49.7114378072", "56.1452283942", "92" ], "var": [ "x", "y", "index" ] }, { "value": [ "31.5927554062", "4.04331709493", "75" ], "var": [ "x", "y", "index" ] }, { "value": [ "63.8620139829", "47.2563768916", "0" ], "var": [ "x", "y", "index" ] }, { "value": [ "46.8557466996", "96.2513337226", "26" ], "var": [ "x", "y", "index" ] }, { "value": [ "32.4718459088", "52.9554698876", "42" ], "var": [ "x", "y", "index" ] }, { "value": [ "65.1374263774", "57.6308967369", "39" ], "var": [ "x", "y", "index" ] }, { "value": [ "39.6606112899", "96.9683351786", "93" ], "var": [ "x", "y", "index" ] }, { "value": [ "14.8537173593", "94.9471416877", "78" ], "var": [ "x", "y", "index" ] }, { "value": [ "62.2799991177", "16.6212682387", "47" ], "var": [ "x", "y", "index" ] }, { "value": [ "67.8419247343", "3.29138742994", "43" ], "var": [ "x", "y", "index" ] } ], "output": [ { "value": [ "105.8566662014" ], "var": [ "returnv" ] }, { "value": [ "35.63607250113" ], "var": [ "returnv" ] }, { "value": [ "111.1183908745" ], "var": [ "returnv" ] }, { "value": [ "143.1070804222" ], "var": [ "returnv" ] }, { "value": [ "85.4273157964" ], "var": [ "returnv" ] }, { "value": [ "122.7683231143" ], "var": [ "returnv" ] }, { "value": [ "136.6289464685" ], "var": [ "returnv" ] }, { "value": [ "109.80085904699999" ], "var": [ "returnv" ] }, { "value": [ "78.9012673564" ], "var": [ "returnv" ] }, { "value": [ "71.13331216424" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_40uidbv33d.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double x, double y, int index, double returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); double x = input_json["x"]; double y = input_json["y"]; int index = input_json["index"]; clock_t begin = clock(); double returnv = double_plus(x, y, index); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, index, returnv); }
master
null
{"livein": ["x", "y", "index"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "double_plus", "funargs": ["x", "y", "index"], "typemap": {"x": "float64", "y": "float64", "index": "int32", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40uidbv33d.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
bazelbuild/rules_go/tests/core/cgo/split_import_c.c
int half (int x) { return x / 2; }
int half(intx)
int half (int x)
half
[ "int", "int" ]
{ "code": [ ".globl half\n.type half, @function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl half\n.type half, @function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$2, %ecx\n\tcltd\n\tidivl\t%ecx\n\tret\n\t.cfi_endproc\n\n", ".globl half\n.type half, @function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tshrl\t$31, %eax\n\taddl\t%edi, %eax\n\tsarl\t%eax\n\tret\n\t.cfi_endproc\n\n", ".global half\n.type half, %function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global half\n.type half, %function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, 2\n\tsdiv\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n", ".global half\n.type half, %function\nhalf:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w0, lsr 31\n\tasr\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "53" ], "var": [ "x" ] }, { "value": [ "21" ], "var": [ "x" ] }, { "value": [ "32" ], "var": [ "x" ] }, { "value": [ "23" ], "var": [ "x" ] }, { "value": [ "115" ], "var": [ "x" ] }, { "value": [ "35" ], "var": [ "x" ] }, { "value": [ "37" ], "var": [ "x" ] }, { "value": [ "45" ], "var": [ "x" ] }, { "value": [ "125" ], "var": [ "x" ] }, { "value": [ "86" ], "var": [ "x" ] } ], "output": [ { "value": [ "26" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "11" ], "var": [ "returnv" ] }, { "value": [ "57" ], "var": [ "returnv" ] }, { "value": [ "17" ], "var": [ "returnv" ] }, { "value": [ "18" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_34m682gfcl.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int x, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int x = input_json["x"]; clock_t begin = clock(); int returnv = half(x); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, returnv); }
master
null
{"livein": ["x"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "half", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_34m682gfcl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nicaraguabinary/lib-tlali-openstreetmap/src/tests/tests-main.c
double TLAString_toDouble(const char* string){ const char sign= (*string); double value = 0; if(sign=='-' || sign=='+') string++; while((*string)!='\0' && (*string)!='.'){ value = (value * 10.0f) + ((*string) - 48.0f); string++; } if((*string)=='.'){ float factorDivisor = 10.0f; string++; while((*string)!='\0'){ value += (((*string) - 48.0f) / factorDivisor); factorDivisor *= 10.0f; string++; } } if(sign=='-') value = -value; return value; }
double TLAString_toDouble(const char *string)
double TLAString_toDouble(const char* string)
TLAString_toDouble
[ "double", "const char *" ]
{ "code": [ ".globl TLAString_toDouble\n.type TLAString_toDouble, @function\nTLAString_toDouble:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovb\t%al, -13(%rbp)\n\tpxor\t%xmm0, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tcmpb\t$45, -13(%rbp)\n\tje\t.L2\n\tcmpb\t$43, -13(%rbp)\n\tjne\t.L4\n.L2:\n\taddq\t$1, -24(%rbp)\n\tjmp\t.L4\n.L6:\n\tmovsd\t-8(%rbp), %xmm1\n\tmovsd\t.LC1(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tcvtsi2ssl\t%eax, %xmm0\n\tmovss\t.LC2(%rip), %xmm2\n\tsubss\t%xmm2, %xmm0\n\tcvtss2sd\t%xmm0, %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\taddq\t$1, -24(%rbp)\n.L4:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L5\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$46, %al\n\tjne\t.L6\n.L5:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$46, %al\n\tjne\t.L7\n\tmovss\t.LC3(%rip), %xmm0\n\tmovss\t%xmm0, -12(%rbp)\n\taddq\t$1, -24(%rbp)\n\tjmp\t.L8\n.L9:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tcvtsi2ssl\t%eax, %xmm0\n\tmovss\t.LC2(%rip), %xmm1\n\tsubss\t%xmm1, %xmm0\n\tdivss\t-12(%rbp), %xmm0\n\tcvtss2sd\t%xmm0, %xmm0\n\tmovsd\t-8(%rbp), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovss\t-12(%rbp), %xmm1\n\tmovss\t.LC3(%rip), %xmm0\n\tmulss\t%xmm1, %xmm0\n\tmovss\t%xmm0, -12(%rbp)\n\taddq\t$1, -24(%rbp)\n.L8:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L9\n.L7:\n\tcmpb\t$45, -13(%rbp)\n\tjne\t.L10\n\tmovsd\t-8(%rbp), %xmm0\n\tmovq\t.LC4(%rip), %xmm1\n\txorpd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n.L10:\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC4: \t.long\t0\n.LC2: \t.long\t1111490560\n.LC3: \t.long\t1092616192\n.LC1: \t.long\t0\n", ".globl TLAString_toDouble\n.type TLAString_toDouble, @function\nTLAString_toDouble:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rdi), %dl\n\tmovsd\t.LC2(%rip), %xmm3\n\txorps\t%xmm0, %xmm0\n\tmovss\t.LC3(%rip), %xmm4\n\tleal\t-43(%rdx), %eax\n\tandl\t$-3, %eax\n\tcmpb\t$1, %al\n\tadcq\t$0, %rdi\n.L3:\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L10\n\tcmpb\t$46, %al\n\tje\t.L14\n\tcvtsi2ssl\t%eax, %xmm1\n\tmovapd\t%xmm0, %xmm2\n\tincq\t%rdi\n\tmulsd\t%xmm3, %xmm2\n\tsubss\t%xmm4, %xmm1\n\tcvtss2sd\t%xmm1, %xmm0\n\taddsd\t%xmm2, %xmm0\n\tjmp\t.L3\n.L10:\n\tcmpb\t$46, %al\n\tjne\t.L6\n.L14:\n\tmovss\t.LC1(%rip), %xmm2\n\tmovss\t.LC3(%rip), %xmm4\n\tincq\t%rdi\n\tmovaps\t%xmm2, %xmm3\n.L7:\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L6\n\tcvtsi2ssl\t%eax, %xmm1\n\tincq\t%rdi\n\tsubss\t%xmm4, %xmm1\n\tdivss\t%xmm2, %xmm1\n\tmulss\t%xmm3, %xmm2\n\tcvtss2sd\t%xmm1, %xmm1\n\taddsd\t%xmm1, %xmm0\n\tjmp\t.L7\n.L6:\n\tcmpb\t$45, %dl\n\tjne\t.L1\n\txorps\t.LC4(%rip), %xmm0\n.L1:\n\tret\n\t.cfi_endproc\n.LC4: \t.long\t0\n.LC2: \t.long\t0\n.LC3: \t.long\t1111490560\n.LC1: \t.long\t1092616192\n", ".globl TLAString_toDouble\n.type TLAString_toDouble, @function\nTLAString_toDouble:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %ecx\n\tleal\t-43(%rcx), %edx\n\tmovsbl\t%cl, %eax\n\tandl\t$253, %edx\n\tjne\t.L2\n\tmovsbl\t1(%rdi), %eax\n\taddq\t$1, %rdi\n.L2:\n\tpxor\t%xmm0, %xmm0\n\ttestb\t%al, %al\n\tje\t.L3\n\tcmpb\t$46, %al\n\tje\t.L3\n\tmovsd\t.LC2(%rip), %xmm4\n\tmovss\t.LC3(%rip), %xmm3\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tpxor\t%xmm1, %xmm1\n\tmovapd\t%xmm0, %xmm2\n\tpxor\t%xmm0, %xmm0\n\taddq\t$1, %rdi\n\tcvtsi2ssl\t%eax, %xmm1\n\tmulsd\t%xmm4, %xmm2\n\tmovsbl\t(%rdi), %eax\n\tsubss\t%xmm3, %xmm1\n\tcvtss2sd\t%xmm1, %xmm0\n\taddsd\t%xmm2, %xmm0\n\ttestb\t%al, %al\n\tje\t.L3\n\tcmpb\t$46, %al\n\tjne\t.L4\n.L25:\n\tmovsbl\t1(%rdi), %eax\n\tleaq\t1(%rdi), %rdx\n\ttestb\t%al, %al\n\tje\t.L6\n\tmovss\t.LC1(%rip), %xmm4\n\tmovss\t.LC3(%rip), %xmm3\n\tmovaps\t%xmm4, %xmm2\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tpxor\t%xmm1, %xmm1\n\taddq\t$1, %rdx\n\tcvtsi2ssl\t%eax, %xmm1\n\tmovsbl\t(%rdx), %eax\n\tsubss\t%xmm3, %xmm1\n\tdivss\t%xmm2, %xmm1\n\tmulss\t%xmm4, %xmm2\n\tcvtss2sd\t%xmm1, %xmm1\n\taddsd\t%xmm1, %xmm0\n\ttestb\t%al, %al\n\tjne\t.L7\n.L6:\n\tcmpb\t$45, %cl\n\tje\t.L28\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tcmpb\t$46, %al\n\tje\t.L25\n\tcmpb\t$45, %cl\n\tjne\t.L1\n.L28:\n\txorpd\t.LC4(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC4: \t.long\t0\n.LC2: \t.long\t0\n.LC3: \t.long\t1111490560\n.LC1: \t.long\t1092616192\n", ".global TLAString_toDouble\n.type TLAString_toDouble, %function\nTLAString_toDouble:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tstrb\tw0, [sp, 19]\n\tstr\txzr, [sp, 24]\n\tldrb\tw0, [sp, 19]\n\tcmp\tw0, 45\n\tbeq\t.L2\n\tldrb\tw0, [sp, 19]\n\tcmp\tw0, 43\n\tbne\t.L4\n.L2:\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tb\t.L4\n.L6:\n\tldr\td1, [sp, 24]\n\tfmov\td0, 1.0e+1\n\tfmul\td1, d1, d0\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tfmov\ts0, w0\n\tscvtf\ts0, s0\n\tmov\tw0, 1111490560\n\tfmov\ts2, w0\n\tfsub\ts0, s0, s2\n\tfcvt\td0, s0\n\tfadd\td0, d1, d0\n\tstr\td0, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L4:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 46\n\tbne\t.L6\n.L5:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 46\n\tbne\t.L7\n\tfmov\ts0, 1.0e+1\n\tstr\ts0, [sp, 20]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tb\t.L8\n.L9:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tfmov\ts0, w0\n\tscvtf\ts0, s0\n\tmov\tw0, 1111490560\n\tfmov\ts1, w0\n\tfsub\ts1, s0, s1\n\tldr\ts0, [sp, 20]\n\tfdiv\ts0, s1, s0\n\tfcvt\td0, s0\n\tldr\td1, [sp, 24]\n\tfadd\td0, d1, d0\n\tstr\td0, [sp, 24]\n\tldr\ts1, [sp, 20]\n\tfmov\ts0, 1.0e+1\n\tfmul\ts0, s1, s0\n\tstr\ts0, [sp, 20]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L8:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L9\n.L7:\n\tldrb\tw0, [sp, 19]\n\tcmp\tw0, 45\n\tbne\t.L10\n\tldr\td0, [sp, 24]\n\tfneg\td0, d0\n\tstr\td0, [sp, 24]\n.L10:\n\tldr\td0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global TLAString_toDouble\n.type TLAString_toDouble, %function\nTLAString_toDouble:\n.LFB13:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tmov\tw1, 43\n\tmovi\td0, #0\n\tfmov\td3, 1.0e+1\n\tcmp\tw2, 45\n\tccmp\tw2, w1, 4, ne\n\tcset\tx1, eq\n\tadd\tx0, x0, x1\n\tadrp\tx1, .LC0\n\tldr\ts2, [x1, #:lo12:.LC0]\n.L3:\n\tldrb\tw1, [x0]\n\tcmp\tw1, 46\n\tccmp\tw1, 0, 4, ne\n\tbne\t.L4\n\tcmp\tw1, 46\n\tbne\t.L5\n\tfmov\ts2, 1.0e+1\n\tadrp\tx1, .LC0\n\tadd\tx0, x0, 1\n\tfmov\ts3, s2\n\tldr\ts4, [x1, #:lo12:.LC0]\n.L6:\n\tldrb\tw1, [x0]\n\tcbnz\tw1, .L7\n.L5:\n\tcmp\tw2, 45\n\tbne\t.L1\n\tfneg\td0, d0\n.L1:\n\tret\n.L4:\n\tscvtf\ts1, w1\n\tadd\tx0, x0, 1\n\tfsub\ts1, s1, s2\n\tfcvt\td1, s1\n\tfmadd\td0, d0, d3, d1\n\tb\t.L3\n.L7:\n\tscvtf\ts1, w1\n\tadd\tx0, x0, 1\n\tfsub\ts1, s1, s4\n\tfdiv\ts1, s1, s2\n\tfmul\ts2, s2, s3\n\tfcvt\td1, s1\n\tfadd\td0, d0, d1\n\tb\t.L6\n\t.cfi_endproc\n.LC0: \t.word\t1111490560\n", ".global TLAString_toDouble\n.type TLAString_toDouble, %function\nTLAString_toDouble:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw3, [x0]\n\tmov\tw2, 253\n\tsub\tw4, w3, #43\n\tmov\tw1, w3\n\ttst\tw4, w2\n\tbne\t.L2\n\tldrb\tw1, [x0, 1]\n\tadd\tx0, x0, 1\n.L2:\n\tcmp\tw1, 46\n\tmovi\td0, #0\n\tccmp\tw1, 0, 4, ne\n\tbeq\t.L3\n\tmov\tw2, 1111490560\n\tfmov\td3, 1.0e+1\n\tfmov\ts2, w2\n\t.p2align 3,,7\n.L4:\n\tscvtf\ts1, w1\n\tldrb\tw1, [x0, 1]!\n\tcmp\tw1, 46\n\tccmp\tw1, 0, 4, ne\n\tfsub\ts1, s1, s2\n\tfcvt\td1, s1\n\tfmadd\td0, d0, d3, d1\n\tbne\t.L4\n.L3:\n\tcmp\tw1, 46\n\tbeq\t.L16\n.L5:\n\tfneg\td1, d0\n\tcmp\tw3, 45\n\tfcsel\td0, d1, d0, eq\n\tret\n\t.p2align 2,,3\n.L16:\n\tldrb\tw1, [x0, 1]\n\tadd\tx0, x0, 1\n\tcbz\tw1, .L5\n\tfmov\ts2, 1.0e+1\n\tmov\tw2, 1111490560\n\tfmov\ts3, w2\n\tfmov\ts4, s2\n\t.p2align 3,,7\n.L6:\n\tscvtf\ts1, w1\n\tldrb\tw1, [x0, 1]!\n\tfsub\ts1, s1, s3\n\tfdiv\ts1, s1, s2\n\tfmul\ts2, s2, s4\n\tfcvt\td1, s1\n\tfadd\td0, d0, d1\n\tcbnz\tw1, .L6\n\tfneg\td1, d0\n\tcmp\tw3, 45\n\tfcsel\td0, d1, d0, eq\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> //FILE* #include <time.h> //clock_t, clock() # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"\"" ], "var": [ "string" ] }, { "value": [ "\"nixcitwfgzwnxbdrc\"" ], "var": [ "string" ] }, { "value": [ "\"qcvvrsnqtuqreekmgfhzbwikcxdosj\"" ], "var": [ "string" ] }, { "value": [ "\"cslbednqkqbmoslcihogk\"" ], "var": [ "string" ] }, { "value": [ "\"kyl\"" ], "var": [ "string" ] }, { "value": [ "\"uspkzhxvcjahoxoytzfdxpocvz\"" ], "var": [ "string" ] }, { "value": [ "\"elbspryvfjjvdefoqfybcaoerkotquq\"" ], "var": [ "string" ] }, { "value": [ "\"btccredwijzbanfqxh\"" ], "var": [ "string" ] }, { "value": [ "\"ndjalp\"" ], "var": [ "string" ] }, { "value": [ "\"zwvwqqormn\"" ], "var": [ "string" ] } ], "output": [ { "value": [ "0.0", "\"\"" ], "var": [ "returnv", "string" ] }, { "value": [ "6.847745703179758e+17", "\"nixcitwfgzwnxbdrc\"" ], "var": [ "returnv", "string" ] }, { "value": [ "7.087733925621895e+30", "\"qcvvrsnqtuqreekmgfhzbwikcxdosj\"" ], "var": [ "returnv", "string" ] }, { "value": [ "5.835588916068034e+21", "\"cslbednqkqbmoslcihogk\"" ], "var": [ "returnv", "string" ] }, { "value": [ "6690.0", "\"kyl\"" ], "var": [ "returnv", "string" ] }, { "value": [ "7.640703957353091e+26", "\"uspkzhxvcjahoxoytzfdxpocvz\"" ], "var": [ "returnv", "string" ] }, { "value": [ "5.957414060455792e+31", "\"elbspryvfjjvdefoqfybcaoerkotquq\"" ], "var": [ "returnv", "string" ] }, { "value": [ "5.736818973595581e+18", "\"btccredwijzbanfqxh\"" ], "var": [ "returnv", "string" ] }, { "value": [ "6783564.0", "\"ndjalp\"" ], "var": [ "returnv", "string" ] }, { "value": [ "81878220272.0", "\"zwvwqqormn\"" ], "var": [ "returnv", "string" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_56v1kwm80m.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* string, double returnv) { json output_json; output_json["string"] = string; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* string = strdup(input_json["string"].get<std::string>().c_str()); clock_t begin = clock(); double returnv = TLAString_toDouble(string); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(string, returnv); }
master
null
{"livein": ["string"], "liveout": ["string"], "returnvarname": ["returnv"], "execcmd": "", "funname": "TLAString_toDouble", "funargs": ["string"], "typemap": {"string": "string", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_56v1kwm80m.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
andrewjsi/amisms/src/pdu/charset.c
char prch(char ch) { if ((unsigned char) ch >= ' ') return ch; return '.'; }
char prch(charch)
char prch(char ch)
prch
[ "char", "char" ]
{ "code": [ ".globl prch\n.type prch, @function\nprch:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovzbl\t-4(%rbp), %eax\n\tcmpb\t$31, %al\n\tjbe\t.L2\n\tmovzbl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$46, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl prch\n.type prch, @function\nprch:\n.LFB37:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$31, %dil\n\tmovb\t$46, %al\n\tcmova\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl prch\n.type prch, @function\nprch:\n.LFB54:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$32, %dil\n\tmovl\t$46, %eax\n\tcmovnb\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global prch\n.type prch, %function\nprch:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 31\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tb\t.L3\n.L2:\n\tmov\tw0, 46\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global prch\n.type prch, %function\nprch:\n.LFB37:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tmov\tw1, 46\n\tcmp\tw0, 31\n\tcsel\tw0, w0, w1, hi\n\tret\n\t.cfi_endproc\n\n", ".global prch\n.type prch, %function\nprch:\n.LFB54:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tmov\tw1, 46\n\tcmp\tw0, 31\n\tcsel\tw0, w0, w1, hi\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include <syslog.h> #include <ctype.h> #include <iconv.h> #include <errno.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "119" ], "var": [ "ch" ] }, { "value": [ "81" ], "var": [ "ch" ] }, { "value": [ "44" ], "var": [ "ch" ] }, { "value": [ "62" ], "var": [ "ch" ] }, { "value": [ "50" ], "var": [ "ch" ] }, { "value": [ "124" ], "var": [ "ch" ] }, { "value": [ "51" ], "var": [ "ch" ] }, { "value": [ "80" ], "var": [ "ch" ] }, { "value": [ "72" ], "var": [ "ch" ] }, { "value": [ "7" ], "var": [ "ch" ] } ], "output": [ { "value": [ "119" ], "var": [ "returnv" ] }, { "value": [ "81" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "50" ], "var": [ "returnv" ] }, { "value": [ "124" ], "var": [ "returnv" ] }, { "value": [ "51" ], "var": [ "returnv" ] }, { "value": [ "80" ], "var": [ "returnv" ] }, { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "46" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_57lh_2ap3h.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char ch, char returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char ch = input_json["ch"].get<char>(); clock_t begin = clock(); char returnv = prch(ch); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ch, returnv); }
master
null
{"livein": ["ch"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "prch", "funargs": ["ch"], "typemap": {"ch": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57lh_2ap3h.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
AirTweak/gimp-dds/mktables.c
int mul8bit(int a, int b) { int t = a * b + 128; return((t + (t >> 8)) >> 8); }
int mul8bit(inta, intb)
int mul8bit(int a, int b)
mul8bit
[ "int", "int", "int" ]
{ "code": [ ".globl mul8bit\n.type mul8bit, @function\nmul8bit:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t-20(%rbp), %eax\n\timull\t-24(%rbp), %eax\n\tsubl\t$-128, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$8, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tsarl\t$8, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl mul8bit\n.type mul8bit, @function\nmul8bit:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\timull\t%esi, %edi\n\tleal\t128(%rdi), %esi\n\tmovl\t%esi, %eax\n\tsarl\t$8, %eax\n\taddl\t%esi, %eax\n\tsarl\t$8, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl mul8bit\n.type mul8bit, @function\nmul8bit:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\timull\t%esi, %edi\n\tleal\t128(%rdi), %esi\n\tmovl\t%esi, %eax\n\tsarl\t$8, %eax\n\taddl\t%esi, %eax\n\tsarl\t$8, %eax\n\tret\n\t.cfi_endproc\n\n", ".global mul8bit\n.type mul8bit, %function\nmul8bit:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tmul\tw0, w1, w0\n\tadd\tw0, w0, 128\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tasr\tw1, w0, 8\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 8\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global mul8bit\n.type mul8bit, %function\nmul8bit:\n.LFB24:\n\t.cfi_startproc\n\tmul\tw0, w0, w1\n\tadd\tw0, w0, 128\n\tadd\tw0, w0, w0, asr 8\n\tasr\tw0, w0, 8\n\tret\n\t.cfi_endproc\n\n", ".global mul8bit\n.type mul8bit, %function\nmul8bit:\n.LFB39:\n\t.cfi_startproc\n\tmul\tw0, w0, w1\n\tadd\tw0, w0, 128\n\tadd\tw0, w0, w0, asr 8\n\tasr\tw0, w0, 8\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "94", "13" ], "var": [ "a", "b" ] }, { "value": [ "73", "24" ], "var": [ "a", "b" ] }, { "value": [ "70", "38" ], "var": [ "a", "b" ] }, { "value": [ "118", "71" ], "var": [ "a", "b" ] }, { "value": [ "34", "16" ], "var": [ "a", "b" ] }, { "value": [ "11", "11" ], "var": [ "a", "b" ] }, { "value": [ "91", "68" ], "var": [ "a", "b" ] }, { "value": [ "122", "85" ], "var": [ "a", "b" ] }, { "value": [ "1", "78" ], "var": [ "a", "b" ] }, { "value": [ "99", "52" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "33" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "41" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "20" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_593k06qb7q.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = mul8bit(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "mul8bit", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_593k06qb7q.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
emilio77/Brauerei/Digitemp/userial/owllu.c
int owHasOverDrive(int portnum) { portnum = 0; return 1; }
int owHasOverDrive(intportnum)
int owHasOverDrive(int portnum)
owHasOverDrive
[ "int", "int" ]
{ "code": [ ".globl owHasOverDrive\n.type owHasOverDrive, @function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl owHasOverDrive\n.type owHasOverDrive, @function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl owHasOverDrive\n.type owHasOverDrive, @function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global owHasOverDrive\n.type owHasOverDrive, %function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\twzr, [sp, 12]\n\tmov\tw0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global owHasOverDrive\n.type owHasOverDrive, %function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global owHasOverDrive\n.type owHasOverDrive, %function\nowHasOverDrive:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "19" ], "var": [ "portnum" ] }, { "value": [ "12" ], "var": [ "portnum" ] }, { "value": [ "49" ], "var": [ "portnum" ] }, { "value": [ "43" ], "var": [ "portnum" ] }, { "value": [ "105" ], "var": [ "portnum" ] }, { "value": [ "30" ], "var": [ "portnum" ] }, { "value": [ "14" ], "var": [ "portnum" ] }, { "value": [ "19" ], "var": [ "portnum" ] }, { "value": [ "64" ], "var": [ "portnum" ] }, { "value": [ "31" ], "var": [ "portnum" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_57kjh9dmy2.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int portnum, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int portnum = input_json["portnum"]; clock_t begin = clock(); int returnv = owHasOverDrive(portnum); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(portnum, returnv); }
master
null
{"livein": ["portnum"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "owHasOverDrive", "funargs": ["portnum"], "typemap": {"portnum": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57kjh9dmy2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
imgix/levee/src/dns.c
int dns_v_abi(void) { return 0x20160608; }
int dns_v_abi()
int dns_v_abi(void)
dns_v_abi
[ "int", "" ]
{ "code": [ ".globl dns_v_abi\n.type dns_v_abi, @function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t$538314248, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl dns_v_abi\n.type dns_v_abi, @function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$538314248, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl dns_v_abi\n.type dns_v_abi, @function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$538314248, %eax\n\tret\n\t.cfi_endproc\n\n", ".global dns_v_abi\n.type dns_v_abi, %function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1544\n\tmovk\tw0, 0x2016, lsl 16\n\tret\n\t.cfi_endproc\n\n", ".global dns_v_abi\n.type dns_v_abi, %function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1544\n\tmovk\tw0, 0x2016, lsl 16\n\tret\n\t.cfi_endproc\n\n", ".global dns_v_abi\n.type dns_v_abi, %function\ndns_v_abi:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1544\n\tmovk\tw0, 0x2016, lsl 16\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] }, { "value": [ "538314248" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_35vutpiu5v.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); int returnv = dns_v_abi(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "dns_v_abi", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35vutpiu5v.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
blastmaster/heat_eaquation_openshmem/src/sharedblk.c
bool have_north_neighbor (unsigned int ypos) { if (ypos == 0) return false; else return true; }
int have_north_neighbor(unsigned intypos)
bool have_north_neighbor (unsigned int ypos)
have_north_neighbor
[ "int", "unsigned int" ]
{ "code": [ ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$1, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$1, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl have_north_neighbor\n.type have_north_neighbor, @function\nhave_north_neighbor:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tmov\tw0, 1\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tmov\tw0, 1\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB35:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.cfi_endproc\n\n", ".global have_north_neighbor\n.type have_north_neighbor, %function\nhave_north_neighbor:\n.LFB50:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <assert.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "628" ], "var": [ "ypos" ] }, { "value": [ "548" ], "var": [ "ypos" ] }, { "value": [ "955" ], "var": [ "ypos" ] }, { "value": [ "794" ], "var": [ "ypos" ] }, { "value": [ "553" ], "var": [ "ypos" ] }, { "value": [ "8" ], "var": [ "ypos" ] }, { "value": [ "904" ], "var": [ "ypos" ] }, { "value": [ "658" ], "var": [ "ypos" ] }, { "value": [ "169" ], "var": [ "ypos" ] }, { "value": [ "951" ], "var": [ "ypos" ] } ], "output": [ { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] }, { "value": [ "true" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_491xkjvgd_.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned int ypos, bool returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int ypos = input_json["ypos"]; clock_t begin = clock(); bool returnv = have_north_neighbor(ypos); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ypos, returnv); }
master
null
{"livein": ["ypos"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "have_north_neighbor", "funargs": ["ypos"], "typemap": {"ypos": "uint32", "returnv": "bool"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_491xkjvgd_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
windelbouwman/ppci-mirror/test/data/c/test8.c
int add(int a, int b) { return a + b + 2; }
int add(inta, intb)
int add(int a, int b)
add
[ "int", "int", "int" ]
{ "code": [ ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\taddl\t$2, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t2(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl add\n.type add, @function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t2(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw0, w1, w0\n\tadd\tw0, w0, 2\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tadd\tw0, w0, 2\n\tret\n\t.cfi_endproc\n\n", ".global add\n.type add, %function\nadd:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tadd\tw0, w0, 2\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "99", "1" ], "var": [ "a", "b" ] }, { "value": [ "18", "16" ], "var": [ "a", "b" ] }, { "value": [ "75", "25" ], "var": [ "a", "b" ] }, { "value": [ "85", "54" ], "var": [ "a", "b" ] }, { "value": [ "56", "99" ], "var": [ "a", "b" ] }, { "value": [ "78", "96" ], "var": [ "a", "b" ] }, { "value": [ "19", "12" ], "var": [ "a", "b" ] }, { "value": [ "116", "91" ], "var": [ "a", "b" ] }, { "value": [ "53", "54" ], "var": [ "a", "b" ] }, { "value": [ "27", "19" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "102" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "102" ], "var": [ "returnv" ] }, { "value": [ "141" ], "var": [ "returnv" ] }, { "value": [ "157" ], "var": [ "returnv" ] }, { "value": [ "176" ], "var": [ "returnv" ] }, { "value": [ "33" ], "var": [ "returnv" ] }, { "value": [ "209" ], "var": [ "returnv" ] }, { "value": [ "109" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37j2g6r5it.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int a, int b, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int a = input_json["a"]; int b = input_json["b"]; clock_t begin = clock(); int returnv = add(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "add", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37j2g6r5it.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
parr0tr1ver/usaco/sec1.1/1.1.2.c
int get_mod(char *p) { int mul=1; while (*p != '\0') mul *= ((*p++) - 'A' + 1); return mul % 47; }
int get_mod(char *p)
int get_mod(char *p)
get_mod
[ "int", "char *" ]
{ "code": [ ".globl get_mod\n.type get_mod, @function\nget_mod:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t$1, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tleal\t-64(%rax), %edx\n\tmovl\t-4(%rbp), %eax\n\timull\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n.L2:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\timulq\t$-1370734243, %rdx, %rdx\n\tshrq\t$32, %rdx\n\taddl\t%eax, %edx\n\tmovl\t%edx, %ecx\n\tsarl\t$5, %ecx\n\tcltd\n\tsubl\t%edx, %ecx\n\tmovl\t%ecx, %edx\n\timull\t$47, %edx, %edx\n\tsubl\t%edx, %eax\n\tmovl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl get_mod\n.type get_mod, @function\nget_mod:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n.L2:\n\tmovsbl\t(%rdi), %ecx\n\ttestb\t%cl, %cl\n\tje\t.L5\n\tsubl\t$64, %ecx\n\tincq\t%rdi\n\timull\t%ecx, %eax\n\tjmp\t.L2\n.L5:\n\tmovl\t$47, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl get_mod\n.type get_mod, @function\nget_mod:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L4\n\tmovl\t$1, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tsubl\t$64, %eax\n\taddq\t$1, %rdi\n\timull\t%eax, %edx\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovslq\t%edx, %rax\n\tmovl\t%edx, %ecx\n\timulq\t$-1370734243, %rax, %rax\n\tsarl\t$31, %ecx\n\tshrq\t$32, %rax\n\taddl\t%edx, %eax\n\tsarl\t$5, %eax\n\tsubl\t%ecx, %eax\n\timull\t$47, %eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global get_mod\n.type get_mod, %function\nget_mod:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\n.L3:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #64\n\tldr\tw1, [sp, 28]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tw0, [sp, 28]\n\tmov\tw1, 16733\n\tmovk\tw1, 0xae4c, lsl 16\n\tsmull\tx1, w0, w1\n\tlsr\tx1, x1, 32\n\tadd\tw1, w0, w1\n\tasr\tw2, w1, 5\n\tasr\tw1, w0, 31\n\tsub\tw1, w2, w1\n\tmov\tw2, 47\n\tmul\tw1, w1, w2\n\tsub\tw1, w0, w1\n\tmov\tw0, w1\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_mod\n.type get_mod, %function\nget_mod:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw1, 1\n.L2:\n\tldrb\tw2, [x0]\n\tcbnz\tw2, .L3\n\tmov\tw0, 47\n\tsdiv\tw2, w1, w0\n\tmsub\tw0, w2, w0, w1\n\tret\n.L3:\n\tsub\tw2, w2, #64\n\tadd\tx0, x0, 1\n\tmul\tw1, w1, w2\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global get_mod\n.type get_mod, %function\nget_mod:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L4\n\tmov\tw2, 1\n\t.p2align 3,,7\n.L3:\n\tsub\tw3, w1, #64\n\tldrb\tw1, [x0, 1]!\n\tmul\tw2, w2, w3\n\tcbnz\tw1, .L3\n\tmov\tw0, 16733\n\tmov\tw1, 47\n\tmovk\tw0, 0xae4c, lsl 16\n\tsmull\tx0, w2, w0\n\tlsr\tx0, x0, 32\n\tadd\tw0, w2, w0\n\tasr\tw0, w0, 5\n\tsub\tw0, w0, w2, asr 31\n\tmsub\tw0, w0, w1, w2\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <assert.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"stxftscluqsiyuqwazxvynz\"" ], "var": [ "p" ] }, { "value": [ "\"ztsxivrmjit\"" ], "var": [ "p" ] }, { "value": [ "\"chobioxuneynj\"" ], "var": [ "p" ] }, { "value": [ "\"mdozpajyzqc\"" ], "var": [ "p" ] }, { "value": [ "\"blhrkwgsh\"" ], "var": [ "p" ] }, { "value": [ "\"goba\"" ], "var": [ "p" ] }, { "value": [ "\"jvebewdrlnyqvacrttq\"" ], "var": [ "p" ] }, { "value": [ "\"ythlrlobts\"" ], "var": [ "p" ] }, { "value": [ "\"mymfitif\"" ], "var": [ "p" ] }, { "value": [ "\"xrornjwhhebk\"" ], "var": [ "p" ] } ], "output": [ { "value": [ "\"stxftscluqsiyuqwazxvynz\"", "34" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ztsxivrmjit\"", "40" ], "var": [ "p", "returnv" ] }, { "value": [ "\"chobioxuneynj\"", "3" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mdozpajyzqc\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"blhrkwgsh\"", "27" ], "var": [ "p", "returnv" ] }, { "value": [ "\"goba\"", "0" ], "var": [ "p", "returnv" ] }, { "value": [ "\"jvebewdrlnyqvacrttq\"", "-33" ], "var": [ "p", "returnv" ] }, { "value": [ "\"ythlrlobts\"", "11" ], "var": [ "p", "returnv" ] }, { "value": [ "\"mymfitif\"", "17" ], "var": [ "p", "returnv" ] }, { "value": [ "\"xrornjwhhebk\"", "35" ], "var": [ "p", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_50dy8slmpj.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* p, int returnv) { json output_json; output_json["p"] = p; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); char* p = strdup(input_json["p"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = get_mod(p); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(p, returnv); }
master
null
{"livein": ["p"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "get_mod", "funargs": ["p"], "typemap": {"p": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50dy8slmpj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cckayne/ALEPH/C/aleph.c
char* aleph_Name(void) { return "ALEPH16"; }
char * aleph_Name()
char* aleph_Name(void)
aleph_Name
[ "char *", "" ]
{ "code": [ ".globl aleph_Name\n.type aleph_Name, @function\naleph_Name:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tleaq\t.LC0(%rip), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n", ".globl aleph_Name\n.type aleph_Name, @function\naleph_Name:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n", ".globl aleph_Name\n.type aleph_Name, @function\naleph_Name:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n", ".global aleph_Name\n.type aleph_Name, %function\naleph_Name:\n.LFB0:\n\t.cfi_startproc\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n", ".global aleph_Name\n.type aleph_Name, %function\naleph_Name:\n.LFB24:\n\t.cfi_startproc\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n", ".global aleph_Name\n.type aleph_Name, %function\naleph_Name:\n.LFB34:\n\t.cfi_startproc\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"ALEPH16\"\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stddef.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] }, { "value": [ "\"ALEPH16\"" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_563t9zgs9g.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char* returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); clock_t begin = clock(); char* returnv = aleph_Name(); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(returnv); }
master
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "aleph_Name", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_563t9zgs9g.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
MaestracciDamien/Dora/metaheuristiques.c
int isInTable(int nombre, int * tab, int nb) { int i=0; int retour =0; while (i < nb && !retour) { if(tab[i] == nombre) retour=1; i++; } return retour; }
int isInTable(intnombre, int *tab, intnb)
int isInTable(int nombre, int * tab, int nb)
isInTable
[ "int", "int", "int *", "int" ]
{ "code": [ ".globl isInTable\n.type isInTable, @function\nisInTable:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t%edx, -24(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L5:\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovl\t(%rax), %eax\n\tcmpl\t%eax, -20(%rbp)\n\tjne\t.L3\n\tmovl\t$1, -4(%rbp)\n.L3:\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjge\t.L4\n\tcmpl\t$0, -4(%rbp)\n\tje\t.L5\n.L4:\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl isInTable\n.type isInTable, @function\nisInTable:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\txorl\t%r8d, %r8d\n.L2:\n\tcmpl\t%eax, %edx\n\tjle\t.L1\n\ttestl\t%r8d, %r8d\n\tjne\t.L1\n\txorl\t%r8d, %r8d\n\tcmpl\t%edi, (%rsi,%rax,4)\n\tsete\t%r8b\n\tincq\t%rax\n\tjmp\t.L2\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl isInTable\n.type isInTable, @function\nisInTable:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edx, %edx\n\tjle\t.L4\n\tmovl\t$1, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t-4(%rsi,%rax,4), %ecx\n\tcmpl\t%eax, %edx\n\tsetg\t%r9b\n\tcmpl\t%edi, %ecx\n\tsetne\t%r8b\n\taddq\t$1, %rax\n\ttestb\t%r8b, %r9b\n\tjne\t.L3\n\txorl\t%eax, %eax\n\tcmpl\t%edi, %ecx\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global isInTable\n.type isInTable, %function\nisInTable:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tx1, [sp]\n\tstr\tw2, [sp, 8]\n\tstr\twzr, [sp, 24]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L5:\n\tldrsw\tx0, [sp, 24]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldr\tw0, [x0]\n\tldr\tw1, [sp, 12]\n\tcmp\tw1, w0\n\tbne\t.L3\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n.L3:\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbge\t.L4\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L5\n.L4:\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global isInTable\n.type isInTable, %function\nisInTable:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw4, w0\n\tmov\tx3, 0\n\tmov\tw0, 0\n.L2:\n\tcmp\tw2, w3\n\teor\tw5, w0, 1\n\tcset\tw6, gt\n\ttst\tw6, w5\n\tbne\t.L3\n\tret\n.L3:\n\tldr\tw0, [x1, x3, lsl 2]\n\tadd\tx3, x3, 1\n\tcmp\tw0, w4\n\tcset\tw0, eq\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global isInTable\n.type isInTable, %function\nisInTable:\n.LFB16:\n\t.cfi_startproc\n\tcmp\tw2, 0\n\tble\t.L4\n\tsub\tx5, x1, #4\n\tmov\tx1, 1\n\t.p2align 3,,7\n.L3:\n\tldr\tw4, [x5, x1, lsl 2]\n\tcmp\tw2, w1\n\tcset\tw3, gt\n\tadd\tx1, x1, 1\n\tcmp\tw4, w0\n\tcsel\tw3, w3, wzr, ne\n\tcbnz\tw3, .L3\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <time.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "10", "[50, 107, 30, 50, 37, 94, 29, 15, 66, 94, 114, 37, 67, 93, 119, 23, 60, 99, 122, 95, 3, 37, 77, 58, 28, 47, 12, 106, 40, 65, 80, 87]", "35" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "36", "[84, 96, 111, 101, 108, 53, 113, 96, 112, 88, 1, 28, 64, 120, 59, 100, 76, 101, 83, 16, 106, 100, 19, 63, 54, 57, 26, 77, 48, 18, 114, 36]", "0" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "75", "[72, 14, 87, 35, 56, 11, 102, 19, 84, 64, 28, 35, 14, 54, 17, 0, 87, 79, 71, 55, 62, 100, 50, 67, 93, 63, 98, 105, 7, 121, 121, 5]", "90" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "14", "[72, 90, 50, 81, 102, 99, 88, 100, 88, 67, 49, 80, 57, 120, 48, 30, 98, 4, 30, 89, 3, 19, 73, 51, 12, 64, 6, 31, 75, 122, 34, 30]", "47" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "70", "[76, 64, 66, 107, 108, 43, 78, 35, 115, 29, 109, 104, 37, 110, 64, 99, 72, 67, 45, 47, 105, 125, 7, 49, 92, 6, 110, 27, 112, 116, 83, 62]", "124" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "73", "[114, 46, 7, 91, 35, 59, 114, 92, 25, 19, 105, 60, 99, 98, 108, 126, 13, 82, 108, 66, 0, 100, 57, 51, 5, 101, 40, 117, 111, 75, 20, 29]", "85" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "22", "[100, 122, 91, 5, 1, 13, 59, 39, 97, 101, 51, 64, 62, 9, 39, 18, 103, 0, 2, 58, 64, 40, 55, 124, 0, 53, 102, 11, 97, 33, 59, 66]", "104" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "86", "[125, 111, 9, 47, 56, 15, 89, 45, 27, 27, 84, 88, 92, 102, 32, 126, 20, 117, 100, 22, 35, 86, 82, 95, 35, 92, 110, 93, 105, 81, 37, 71]", "5" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "100", "[50, 11, 117, 91, 41, 57, 14, 73, 126, 63, 89, 19, 20, 60, 55, 67, 42, 81, 15, 26, 95, 8, 4, 76, 29, 72, 108, 64, 55, 79, 78, 45]", "83" ], "var": [ "nombre", "tab", "nb" ] }, { "value": [ "81", "[97, 109, 31, 48, 79, 24, 3, 86, 84, 124, 102, 52, 70, 18, 65, 74, 22, 112, 23, 40, 85, 4, 17, 23, 34, 32, 57, 89, 119, 114, 39, 115]", "19" ], "var": [ "nombre", "tab", "nb" ] } ], "output": [ { "value": [ "0", "[50, 107, 30, 50, 37, 94, 29, 15, 66, 94, 114, 37, 67, 93, 119, 23, 60, 99, 122, 95, 3, 37, 77, 58, 28, 47, 12, 106, 40, 65, 80, 87]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[84, 96, 111, 101, 108, 53, 113, 96, 112, 88, 1, 28, 64, 120, 59, 100, 76, 101, 83, 16, 106, 100, 19, 63, 54, 57, 26, 77, 48, 18, 114, 36]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[72, 14, 87, 35, 56, 11, 102, 19, 84, 64, 28, 35, 14, 54, 17, 0, 87, 79, 71, 55, 62, 100, 50, 67, 93, 63, 98, 105, 7, 121, 121, 5]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[72, 90, 50, 81, 102, 99, 88, 100, 88, 67, 49, 80, 57, 120, 48, 30, 98, 4, 30, 89, 3, 19, 73, 51, 12, 64, 6, 31, 75, 122, 34, 30]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[76, 64, 66, 107, 108, 43, 78, 35, 115, 29, 109, 104, 37, 110, 64, 99, 72, 67, 45, 47, 105, 125, 7, 49, 92, 6, 110, 27, 112, 116, 83, 62]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[114, 46, 7, 91, 35, 59, 114, 92, 25, 19, 105, 60, 99, 98, 108, 126, 13, 82, 108, 66, 0, 100, 57, 51, 5, 101, 40, 117, 111, 75, 20, 29]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[100, 122, 91, 5, 1, 13, 59, 39, 97, 101, 51, 64, 62, 9, 39, 18, 103, 0, 2, 58, 64, 40, 55, 124, 0, 53, 102, 11, 97, 33, 59, 66]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[125, 111, 9, 47, 56, 15, 89, 45, 27, 27, 84, 88, 92, 102, 32, 126, 20, 117, 100, 22, 35, 86, 82, 95, 35, 92, 110, 93, 105, 81, 37, 71]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[50, 11, 117, 91, 41, 57, 14, 73, 126, 63, 89, 19, 20, 60, 55, 67, 42, 81, 15, 26, 95, 8, 4, 76, 29, 72, 108, 64, 55, 79, 78, 45]" ], "var": [ "returnv", "tab" ] }, { "value": [ "0", "[97, 109, 31, 48, 79, 24, 3, 86, 84, 124, 102, 52, 70, 18, 65, 74, 22, 112, 23, 40, 85, 4, 17, 23, 34, 32, 57, 89, 119, 114, 39, 115]" ], "var": [ "returnv", "tab" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_31j5mre3b5.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int nombre, int* tab, int nb, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = tab[i3]; output_temp_2.push_back(output_temp_4); } output_json["tab"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int nombre = input_json["nombre"]; std::vector<int> input_temp_1_vec; for (auto& elem : input_json["tab"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* tab = &input_temp_1_vec[0]; int nb = input_json["nb"]; clock_t begin = clock(); int returnv = isInTable(nombre, tab, nb); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(nombre, tab, nb, returnv); }
master
null
{"livein": ["nombre", "tab", "nb"], "liveout": ["tab"], "returnvarname": ["returnv"], "execcmd": "", "funname": "isInTable", "funargs": ["nombre", "tab", "nb"], "typemap": {"nombre": "int32", "tab": "array(int32#32)", "nb": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31j5mre3b5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
hackmac89/cMovies/src/dbutils.c
void updateSeriesTitle(unsigned int seriesID, char *title) { return; }
void updateSeriesTitle(unsigned intseriesID, char *title)
void updateSeriesTitle(unsigned int seriesID, char *title)
updateSeriesTitle
[ "void", "unsigned int", "char *" ]
{ "code": [ ".globl updateSeriesTitle\n.type updateSeriesTitle, @function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl updateSeriesTitle\n.type updateSeriesTitle, @function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl updateSeriesTitle\n.type updateSeriesTitle, @function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global updateSeriesTitle\n.type updateSeriesTitle, %function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tx1, [sp]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global updateSeriesTitle\n.type updateSeriesTitle, %function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global updateSeriesTitle\n.type updateSeriesTitle, %function\nupdateSeriesTitle:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "968", "\"czlvpkptdyahjrijlsqaezqtgdlvvuq\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "554", "\"nsmhubjnxcwikbewswlnjw\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "51", "\"l\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "13", "\"bxqfmfgsaoxerxtjfqypabkwbbc\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "303", "\"hyezwgcrdwpoxuzyawjsuvc\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "583", "\"mbhupbfmcykolqrcmdfjfdnscg\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "926", "\"ajkfynnxkzfydjpanxkxueclkpvxec\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "123", "\"qpgmcuqrqshoy\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "466", "\"js\"" ], "var": [ "seriesID", "title" ] }, { "value": [ "956", "\"yixk\"" ], "var": [ "seriesID", "title" ] } ], "output": [ { "value": [ "\"czlvpkptdyahjrijlsqaezqtgdlvvuq\"" ], "var": [ "title" ] }, { "value": [ "\"nsmhubjnxcwikbewswlnjw\"" ], "var": [ "title" ] }, { "value": [ "\"l\"" ], "var": [ "title" ] }, { "value": [ "\"bxqfmfgsaoxerxtjfqypabkwbbc\"" ], "var": [ "title" ] }, { "value": [ "\"hyezwgcrdwpoxuzyawjsuvc\"" ], "var": [ "title" ] }, { "value": [ "\"mbhupbfmcykolqrcmdfjfdnscg\"" ], "var": [ "title" ] }, { "value": [ "\"ajkfynnxkzfydjpanxkxueclkpvxec\"" ], "var": [ "title" ] }, { "value": [ "\"qpgmcuqrqshoy\"" ], "var": [ "title" ] }, { "value": [ "\"js\"" ], "var": [ "title" ] }, { "value": [ "\"yixk\"" ], "var": [ "title" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_509t8ena30.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(unsigned int seriesID, char* title) { json output_json; output_json["title"] = title; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int seriesID = input_json["seriesID"]; char* title = strdup(input_json["title"].get<std::string>().c_str()); clock_t begin = clock(); updateSeriesTitle(seriesID, title); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(seriesID, title); }
master
null
{"livein": ["seriesID", "title"], "liveout": ["title"], "returnvarname": [], "execcmd": "", "funname": "updateSeriesTitle", "funargs": ["seriesID", "title"], "typemap": {"seriesID": "uint32", "title": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_509t8ena30.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
zzarcon/WebAssembly-demo/fibonacci.c
int fibonacci(int n) { int a = 1; int b = 1; while (n-- > 1) { int t = a; a = b; b += t; } return b; }
int fibonacci(intn)
int fibonacci(int n)
fibonacci
[ "int", "int" ]
{ "code": [ ".globl fibonacci\n.type fibonacci, @function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$1, -12(%rbp)\n\tmovl\t$1, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-12(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tmovl\t%eax, -12(%rbp)\n\tmovl\t-4(%rbp), %eax\n\taddl\t%eax, -8(%rbp)\n.L2:\n\tmovl\t-20(%rbp), %eax\n\tleal\t-1(%rax), %edx\n\tmovl\t%edx, -20(%rbp)\n\tcmpl\t$1, %eax\n\tjg\t.L3\n\tmovl\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fibonacci\n.type fibonacci, @function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tmovl\t$1, %edx\n.L2:\n\tcmpl\t$1, %edi\n\tjle\t.L5\n\tleal\t(%rdx,%rax), %ecx\n\tdecl\t%edi\n\tmovl\t%eax, %edx\n\tmovl\t%ecx, %eax\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n\n", ".globl fibonacci\n.type fibonacci, @function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rdi), %edx\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\tmovl\t$1, %ecx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%eax, %esi\n\taddl\t%ecx, %eax\n\tmovl\t%esi, %ecx\n\tsubl\t$1, %edx\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n\n", ".global fibonacci\n.type fibonacci, %function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 20]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw0, [sp, 20]\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tstr\tw0, [sp, 20]\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n.L2:\n\tldr\tw0, [sp, 12]\n\tsub\tw1, w0, #1\n\tstr\tw1, [sp, 12]\n\tcmp\tw0, 1\n\tbgt\t.L3\n\tldr\tw0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fibonacci\n.type fibonacci, %function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw0, 1\n\tmov\tw2, w0\n.L2:\n\tcmp\tw1, 1\n\tbgt\t.L3\n\tret\n.L3:\n\tadd\tw3, w2, w0\n\tsub\tw1, w1, #1\n\tmov\tw2, w0\n\tmov\tw0, w3\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fibonacci\n.type fibonacci, %function\nfibonacci:\n.LFB0:\n\t.cfi_startproc\n\tsubs\tw1, w0, 1\n\tmov\tw0, 1\n\tble\t.L1\n\tmov\tw2, w0\n\t.p2align 3,,7\n.L3:\n\tmov\tw3, w0\n\tsubs\tw1, w1, #1\n\tadd\tw0, w0, w2\n\tmov\tw2, w3\n\tbne\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "83" ], "var": [ "n" ] }, { "value": [ "73" ], "var": [ "n" ] }, { "value": [ "83" ], "var": [ "n" ] }, { "value": [ "3" ], "var": [ "n" ] }, { "value": [ "41" ], "var": [ "n" ] }, { "value": [ "62" ], "var": [ "n" ] }, { "value": [ "72" ], "var": [ "n" ] }, { "value": [ "66" ], "var": [ "n" ] }, { "value": [ "87" ], "var": [ "n" ] }, { "value": [ "101" ], "var": [ "n" ] } ], "output": [ { "value": [ "887448560" ], "var": [ "returnv" ] }, { "value": [ "-433386095" ], "var": [ "returnv" ] }, { "value": [ "887448560" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "267914296" ], "var": [ "returnv" ] }, { "value": [ "-944741150" ], "var": [ "returnv" ] }, { "value": [ "-2015728079" ], "var": [ "returnv" ] }, { "value": [ "-1262539787" ], "var": [ "returnv" ] }, { "value": [ "-2092787285" ], "var": [ "returnv" ] }, { "value": [ "1445263496" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_30maamd3nz.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = fibonacci(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fibonacci", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30maamd3nz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}