path
stringlengths 12
169
| func_def
stringlengths 15
23.2k
| func_head
stringlengths 7
435
| func_head_types
stringlengths 7
477
| fname
stringlengths 1
71
| signature
listlengths 2
43
| asm
dict | synth_deps
stringclasses 254
values | real_deps
stringlengths 5
561
| synth_io_pairs
dict | real_io_pairs
dict | synth_exe_wrapper
stringclasses 704
values | real_exe_wrapper
stringlengths 1.23k
6.64k
| ref
stringclasses 220
values | synth_iospec
stringclasses 1
value | real_iospec
stringlengths 262
1.6k
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
YifanCheng/VIC/external/VIC/src/modify_Ksat.c
|
double linear_interp(double x,double lx,double ux,double ly,double uy) {
return((x-lx)/(ux-lx)*(uy-ly)+ly);
}
|
double linear_interp(doublex, doublelx, doubleux, doublely, doubleuy)
|
double linear_interp(double x,double lx,double ux,double ly,double uy)
|
linear_interp
|
[
"double",
"double",
"double",
"double",
"double",
"double"
] |
{
"code": [
".globl linear_interp\n.type linear_interp, @function\nlinear_interp:\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\tmovsd\t%xmm2, -24(%rbp)\n\tmovsd\t%xmm3, -32(%rbp)\n\tmovsd\t%xmm4, -40(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tsubsd\t-16(%rbp), %xmm0\n\tmovsd\t-24(%rbp), %xmm1\n\tsubsd\t-16(%rbp), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t-40(%rbp), %xmm0\n\tsubsd\t-32(%rbp), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\taddsd\t-32(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl linear_interp\n.type linear_interp, @function\nlinear_interp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubsd\t%xmm1, %xmm0\n\tsubsd\t%xmm1, %xmm2\n\tsubsd\t%xmm3, %xmm4\n\tdivsd\t%xmm2, %xmm0\n\tmulsd\t%xmm4, %xmm0\n\taddsd\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl linear_interp\n.type linear_interp, @function\nlinear_interp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubsd\t%xmm1, %xmm0\n\tsubsd\t%xmm1, %xmm2\n\tsubsd\t%xmm3, %xmm4\n\tdivsd\t%xmm2, %xmm0\n\tmulsd\t%xmm4, %xmm0\n\taddsd\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global linear_interp\n.type linear_interp, %function\nlinear_interp:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #48\n\t.cfi_def_cfa_offset 48\n\tstr\td0, [sp, 40]\n\tstr\td1, [sp, 32]\n\tstr\td2, [sp, 24]\n\tstr\td3, [sp, 16]\n\tstr\td4, [sp, 8]\n\tldr\td1, [sp, 40]\n\tldr\td0, [sp, 32]\n\tfsub\td1, d1, d0\n\tldr\td2, [sp, 24]\n\tldr\td0, [sp, 32]\n\tfsub\td0, d2, d0\n\tfdiv\td1, d1, d0\n\tldr\td2, [sp, 8]\n\tldr\td0, [sp, 16]\n\tfsub\td0, d2, d0\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 16]\n\tfadd\td0, d1, d0\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global linear_interp\n.type linear_interp, %function\nlinear_interp:\n.LFB0:\n\t.cfi_startproc\n\tfsub\td0, d0, d1\n\tfsub\td1, d2, d1\n\tfsub\td4, d4, d3\n\tfdiv\td0, d0, d1\n\tfmadd\td0, d4, d0, d3\n\tret\n\t.cfi_endproc\n\n",
".global linear_interp\n.type linear_interp, %function\nlinear_interp:\n.LFB0:\n\t.cfi_startproc\n\tfsub\td5, d0, d1\n\tfsub\td1, d2, d1\n\tfsub\td4, d4, d3\n\tfdiv\td5, d5, d1\n\tfmadd\td0, d4, d5, d3\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": [
"95.277482052",
"33.213713997",
"7.33061620803",
"39.7722739555",
"8.03821910158"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"5.31732394091",
"38.4423607565",
"34.1751579927",
"32.4862249193",
"43.6940951569"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"28.8566138684",
"25.1434763626",
"1.1105897772",
"99.9803222875",
"5.86987429083"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"41.9822100709",
"31.3663074181",
"74.5969855541",
"58.5791316628",
"3.47793586636"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"26.7256849127",
"42.3575828386",
"32.6367949561",
"58.7057420478",
"96.0743989224"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"58.2019528008",
"61.4790052154",
"92.2333120128",
"25.712354192",
"5.996360119"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"48.9505069905",
"81.140763959",
"17.2033366462",
"98.4059427767",
"25.4167297095"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"24.8987555755",
"1.97018181023",
"58.6636054836",
"22.1837505973",
"75.8961767664"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"62.7352302943",
"2.49594633383",
"84.1302700202",
"13.0899029488",
"31.6091421316"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
},
{
"value": [
"87.0428438096",
"16.5031356078",
"41.132164486",
"90.2904935929",
"52.5916394194"
],
"var": [
"x",
"lx",
"ux",
"ly",
"uy"
]
}
],
"output": [
{
"value": [
"115.86575534464225"
],
"var": [
"returnv"
]
},
{
"value": [
"119.4896167886478"
],
"var": [
"returnv"
]
},
{
"value": [
"114.52060786253217"
],
"var": [
"returnv"
]
},
{
"value": [
"45.048256001130284"
],
"var": [
"returnv"
]
},
{
"value": [
"118.79789064239498"
],
"var": [
"returnv"
]
},
{
"value": [
"27.813209412337013"
],
"var": [
"returnv"
]
},
{
"value": [
"61.65842847545758"
],
"var": [
"returnv"
]
},
{
"value": [
"43.90671678514571"
],
"var": [
"returnv"
]
},
{
"value": [
"26.75554820055107"
],
"var": [
"returnv"
]
},
{
"value": [
"-17.68234553494348"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_59yogos2dy.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 lx, double ux, double ly, double uy, 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 lx = input_json["lx"];
double ux = input_json["ux"];
double ly = input_json["ly"];
double uy = input_json["uy"];
clock_t begin = clock();
double returnv = linear_interp(x, lx, ux, ly, uy);
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, lx, ux, ly, uy, returnv);
}
|
master
|
null
|
{"livein": ["x", "lx", "ux", "ly", "uy"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "linear_interp", "funargs": ["x", "lx", "ux", "ly", "uy"], "typemap": {"x": "float64", "lx": "float64", "ux": "float64", "ly": "float64", "uy": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_59yogos2dy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
CAAP/Lua/src/lcdf/dcdflib.c
|
double gam1(double *a)
{
static double s1 = .273076135303957e+00;
static double s2 = .559398236957378e-01;
static double p[7] = {
.577215664901533e+00,-.409078193005776e+00,-.230975380857675e+00,
.597275330452234e-01,.766968181649490e-02,-.514889771323592e-02,
.589597428611429e-03
};
static double q[5] = {
.100000000000000e+01,.427569613095214e+00,.158451672430138e+00,
.261132021441447e-01,.423244297896961e-02
};
static double r[9] = {
-.422784335098468e+00,-.771330383816272e+00,-.244757765222226e+00,
.118378989872749e+00,.930357293360349e-03,-.118290993445146e-01,
.223047661158249e-02,.266505979058923e-03,-.132674909766242e-03
};
static double gam1,bot,d,t,top,w,T1;
t = *a;
d = *a-0.5e0;
if(d > 0.0e0) t = d-0.5e0;
T1 = t;
if(T1 < 0) goto S40;
else if(T1 == 0) goto S10;
else goto S20;
S10:
gam1 = 0.0e0;
return gam1;
S20:
top = (((((p[6]*t+p[5])*t+p[4])*t+p[3])*t+p[2])*t+p[1])*t+p[0];
bot = (((q[4]*t+q[3])*t+q[2])*t+q[1])*t+1.0e0;
w = top/bot;
if(d > 0.0e0) goto S30;
gam1 = *a*w;
return gam1;
S30:
gam1 = t/ *a*(w-0.5e0-0.5e0);
return gam1;
S40:
top = (((((((r[8]*t+r[7])*t+r[6])*t+r[5])*t+r[4])*t+r[3])*t+r[2])*t+r[1])*t+
r[0];
bot = (s2*t+s1)*t+1.0e0;
w = top/bot;
if(d > 0.0e0) goto S50;
gam1 = *a*(w+0.5e0+0.5e0);
return gam1;
S50:
gam1 = t*w/ *a;
return gam1;
}
|
double gam1(double *a)
|
double gam1(double *a)
|
gam1
|
[
"double",
"double *"
] |
{
"code": [
".globl gam1\n.type gam1, @function\ngam1:\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-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm0\n\tmovsd\t%xmm0, t.3894(%rip)\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm0\n\tmovsd\t.LC0(%rip), %xmm1\n\tsubsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, d.3893(%rip)\n\tmovsd\td.3893(%rip), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjbe\t.L2\n\tmovsd\td.3893(%rip), %xmm0\n\tmovsd\t.LC0(%rip), %xmm1\n\tsubsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, t.3894(%rip)\n.L2:\n\tmovsd\tt.3894(%rip), %xmm0\n\tmovsd\t%xmm0, T1.3897(%rip)\n\tmovsd\tT1.3897(%rip), %xmm1\n\tpxor\t%xmm0, %xmm0\n\tcomisd\t%xmm1, %xmm0\n\tja\t.L19\n\tmovsd\tT1.3897(%rip), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tucomisd\t%xmm1, %xmm0\n\tjp\t.L20\n\tpxor\t%xmm1, %xmm1\n\tucomisd\t%xmm1, %xmm0\n\tje\t.L21\n\tjmp\t.L20\n.L21:\n\tnop\n.L9:\n\tendbr64\n\tpxor\t%xmm0, %xmm0\n\tmovsd\t%xmm0, gam1.3891(%rip)\n\tmovsd\tgam1.3891(%rip), %xmm0\n\tjmp\t.L11\n.L20:\n\tnop\n.L10:\n\tendbr64\n\tmovsd\t48+p.3888(%rip), %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t40+p.3888(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t32+p.3888(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t24+p.3888(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t16+p.3888(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t8+p.3888(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\tp.3888(%rip), %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, top.3895(%rip)\n\tmovsd\t32+q.3889(%rip), %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t24+q.3889(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t16+q.3889(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t8+q.3889(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t.LC2(%rip), %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, bot.3892(%rip)\n\tmovsd\ttop.3895(%rip), %xmm0\n\tmovsd\tbot.3892(%rip), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, w.3896(%rip)\n\tmovsd\td.3893(%rip), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tja\t.L22\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm1\n\tmovsd\tw.3896(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, gam1.3891(%rip)\n\tmovsd\tgam1.3891(%rip), %xmm0\n\tjmp\t.L11\n.L22:\n\tnop\n.L14:\n\tendbr64\n\tmovsd\tt.3894(%rip), %xmm0\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\tw.3896(%rip), %xmm0\n\tmovsd\t.LC0(%rip), %xmm2\n\tsubsd\t%xmm2, %xmm0\n\tmovsd\t.LC0(%rip), %xmm2\n\tsubsd\t%xmm2, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, gam1.3891(%rip)\n\tmovsd\tgam1.3891(%rip), %xmm0\n\tjmp\t.L11\n.L19:\n\tnop\n.L6:\n\tendbr64\n\tmovsd\t64+r.3890(%rip), %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t56+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t48+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t40+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t32+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t24+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t16+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t8+r.3890(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\tr.3890(%rip), %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, top.3895(%rip)\n\tmovsd\ts2.3887(%rip), %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\ts1.3886(%rip), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\tt.3894(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t.LC2(%rip), %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, bot.3892(%rip)\n\tmovsd\ttop.3895(%rip), %xmm0\n\tmovsd\tbot.3892(%rip), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, w.3896(%rip)\n\tmovsd\td.3893(%rip), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tja\t.L23\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm1\n\tmovsd\tw.3896(%rip), %xmm2\n\tmovsd\t.LC0(%rip), %xmm0\n\taddsd\t%xmm0, %xmm2\n\tmovsd\t.LC0(%rip), %xmm0\n\taddsd\t%xmm2, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, gam1.3891(%rip)\n\tmovsd\tgam1.3891(%rip), %xmm0\n\tjmp\t.L11\n.L23:\n\tnop\n.L17:\n\tendbr64\n\tmovsd\tt.3894(%rip), %xmm1\n\tmovsd\tw.3896(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, gam1.3891(%rip)\n\tmovsd\tgam1.3891(%rip), %xmm0\n.L11:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC2: \t.long\t0\n",
".globl gam1\n.type gam1, @function\ngam1:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t(%rdi), %xmm2\n\tmovsd\t.LC1(%rip), %xmm4\n\txorps\t%xmm0, %xmm0\n\tmovapd\t%xmm2, %xmm5\n\tsubsd\t%xmm4, %xmm5\n\tcomisd\t%xmm0, %xmm5\n\tja\t.L2\n\tmovsd\t%xmm2, t.4140(%rip)\n\tjmp\t.L3\n.L2:\n\tmovapd\t%xmm5, %xmm0\n\tsubsd\t%xmm4, %xmm0\n\tmovsd\t%xmm0, t.4140(%rip)\n.L3:\n\tmovsd\tt.4140(%rip), %xmm3\n\txorps\t%xmm0, %xmm0\n\tcomisd\t%xmm3, %xmm0\n\tjbe\t.L16\n\tmovsd\t.LC2(%rip), %xmm1\n\tmovsd\t.LC11(%rip), %xmm6\n\tcomisd\t%xmm0, %xmm5\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC3(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm6\n\taddsd\t.LC12(%rip), %xmm6\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC4(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm6\n\taddsd\t.LC13(%rip), %xmm6\n\tmulsd\t%xmm3, %xmm1\n\tsubsd\t.LC5(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC6(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC7(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm1\n\tsubsd\t.LC8(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm1\n\tsubsd\t.LC9(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm1\n\tsubsd\t.LC10(%rip), %xmm1\n\tdivsd\t%xmm6, %xmm1\n\tjbe\t.L17\n\tmulsd\t%xmm1, %xmm3\n\tmovapd\t%xmm3, %xmm0\n\tdivsd\t%xmm2, %xmm0\n\tret\n.L16:\n\tucomisd\t%xmm0, %xmm3\n\tjp\t.L14\n\txorps\t%xmm0, %xmm0\n\tje\t.L1\n.L14:\n\tmovsd\t.LC14(%rip), %xmm0\n\tmovsd\t.LC21(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm0\n\tsubsd\t.LC15(%rip), %xmm0\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC22(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm0\n\taddsd\t.LC16(%rip), %xmm0\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC23(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm0\n\taddsd\t.LC17(%rip), %xmm0\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC24(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm0\n\tsubsd\t.LC18(%rip), %xmm0\n\tmulsd\t%xmm3, %xmm1\n\taddsd\t.LC13(%rip), %xmm1\n\tmulsd\t%xmm3, %xmm0\n\tsubsd\t.LC19(%rip), %xmm0\n\tmulsd\t%xmm3, %xmm0\n\taddsd\t.LC20(%rip), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\txorps\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm5\n\tjbe\t.L19\n\tsubsd\t%xmm4, %xmm0\n\tsubsd\t%xmm4, %xmm0\n\tdivsd\t%xmm2, %xmm3\n\tmulsd\t%xmm3, %xmm0\n\tret\n.L17:\n\tmovapd\t%xmm1, %xmm0\n\taddsd\t%xmm4, %xmm0\n\taddsd\t%xmm4, %xmm0\n.L19:\n\tmulsd\t%xmm2, %xmm0\n.L1:\n\tret\n\t.cfi_endproc\n.LC4: \t.long\t54352644\n.LC14: \t.long\t3594225734\n.LC12: \t.long\t1402778960\n.LC6: \t.long\t319068346\n.LC22: \t.long\t1422905121\n.LC10: \t.long\t119575518\n.LC24: \t.long\t4030756836\n.LC2: \t.long\t3422623020\n.LC1: \t.long\t0\n.LC13: \t.long\t0\n.LC21: \t.long\t3268700776\n.LC3: \t.long\t1993923686\n.LC16: \t.long\t2301182131\n.LC19: \t.long\t1293802627\n.LC9: \t.long\t245161296\n.LC18: \t.long\t3984294012\n.LC5: \t.long\t3600501316\n.LC23: \t.long\t4153065163\n.LC20: \t.long\t4235179546\n.LC7: \t.long\t3792271106\n.LC17: \t.long\t1915957859\n.LC15: \t.long\t3030313495\n.LC11: \t.long\t44197888\n.LC8: \t.long\t4069074723\n",
".globl gam1\n.type gam1, @function\ngam1:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t(%rdi), %xmm3\n\tmovsd\t.LC1(%rip), %xmm5\n\tpxor\t%xmm0, %xmm0\n\tmovapd\t%xmm3, %xmm4\n\tsubsd\t%xmm5, %xmm4\n\tcomisd\t%xmm0, %xmm4\n\tjbe\t.L20\n\tmovapd\t%xmm4, %xmm2\n\tsubsd\t%xmm5, %xmm2\n\tcomisd\t%xmm2, %xmm0\n\tmovsd\t%xmm2, t.4205(%rip)\n\tja\t.L21\n.L16:\n\tucomisd\t%xmm0, %xmm2\n\tjp\t.L14\n\tjne\t.L14\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L14:\n\tmovsd\t.LC14(%rip), %xmm1\n\tmovsd\t.LC21(%rip), %xmm6\n\tcomisd\t%xmm0, %xmm4\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC15(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC22(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC16(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC23(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC17(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC24(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC18(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC13(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC19(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC20(%rip), %xmm1\n\tdivsd\t%xmm6, %xmm1\n\tja\t.L22\n\tmulsd\t%xmm1, %xmm3\n\tmovapd\t%xmm3, %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L20:\n\tmovapd\t%xmm3, %xmm2\n\tmovsd\t%xmm3, t.4205(%rip)\n\tcomisd\t%xmm2, %xmm0\n\tjbe\t.L16\n.L21:\n\tmovsd\t.LC2(%rip), %xmm1\n\tmovsd\t.LC11(%rip), %xmm6\n\tcomisd\t%xmm0, %xmm4\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC3(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC12(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC4(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t.LC13(%rip), %xmm6\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC5(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC6(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t.LC7(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC8(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC9(%rip), %xmm1\n\tmulsd\t%xmm2, %xmm1\n\tsubsd\t.LC10(%rip), %xmm1\n\tdivsd\t%xmm6, %xmm1\n\tja\t.L23\n\taddsd\t%xmm5, %xmm1\n\taddsd\t%xmm5, %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tmulsd\t%xmm3, %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L23:\n\tmulsd\t%xmm2, %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tdivsd\t%xmm3, %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L22:\n\tmovapd\t%xmm2, %xmm0\n\tsubsd\t%xmm5, %xmm1\n\tdivsd\t%xmm3, %xmm0\n\tsubsd\t%xmm5, %xmm1\n\tmulsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC4: \t.long\t54352644\n.LC14: \t.long\t3594225734\n.LC12: \t.long\t1402778960\n.LC6: \t.long\t319068346\n.LC22: \t.long\t1422905121\n.LC10: \t.long\t119575518\n.LC24: \t.long\t4030756836\n.LC2: \t.long\t3422623020\n.LC1: \t.long\t0\n.LC13: \t.long\t0\n.LC21: \t.long\t3268700776\n.LC3: \t.long\t1993923686\n.LC16: \t.long\t2301182131\n.LC19: \t.long\t1293802627\n.LC9: \t.long\t245161296\n.LC5: \t.long\t3600501316\n.LC23: \t.long\t4153065163\n.LC20: \t.long\t4235179546\n.LC7: \t.long\t3792271106\n.LC8: \t.long\t4069074723\n.LC17: \t.long\t1915957859\n.LC15: \t.long\t3030313495\n.LC11: \t.long\t44197888\n.LC18: \t.long\t3984294012\n",
".global gam1\n.type gam1, %function\ngam1:\n.LFB6:\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\tldr\td0, [x0]\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tstr\td0, [x0]\n\tldr\tx0, [sp, 8]\n\tldr\td1, [x0]\n\tfmov\td0, 5.0e-1\n\tfsub\td0, d1, d0\n\tadrp\tx0, d.5421\n\tadd\tx0, x0, :lo12:d.5421\n\tstr\td0, [x0]\n\tadrp\tx0, d.5421\n\tadd\tx0, x0, :lo12:d.5421\n\tldr\td0, [x0]\n\tfcmpe\td0, #0.0\n\tble\t.L2\n\tadrp\tx0, d.5421\n\tadd\tx0, x0, :lo12:d.5421\n\tldr\td1, [x0]\n\tfmov\td0, 5.0e-1\n\tfsub\td0, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tstr\td0, [x0]\n.L2:\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tadrp\tx0, T1.5425\n\tadd\tx0, x0, :lo12:T1.5425\n\tstr\td0, [x0]\n\tadrp\tx0, T1.5425\n\tadd\tx0, x0, :lo12:T1.5425\n\tldr\td0, [x0]\n\tfcmpe\td0, #0.0\n\tbmi\t.L18\n\tadrp\tx0, T1.5425\n\tadd\tx0, x0, :lo12:T1.5425\n\tldr\td0, [x0]\n\tfcmp\td0, #0.0\n\tbne\t.L19\n\tnop\n.L8:\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tstr\txzr, [x0]\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tldr\td0, [x0]\n\tb\t.L10\n.L19:\n\tnop\n.L9:\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td1, [x0, 48]\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0, 40]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0, 32]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0, 24]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0, 16]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0, 8]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, p.5416\n\tadd\tx0, x0, :lo12:p.5416\n\tldr\td0, [x0]\n\tfadd\td0, d1, d0\n\tadrp\tx0, top.5423\n\tadd\tx0, x0, :lo12:top.5423\n\tstr\td0, [x0]\n\tadrp\tx0, q.5417\n\tadd\tx0, x0, :lo12:q.5417\n\tldr\td1, [x0, 32]\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, q.5417\n\tadd\tx0, x0, :lo12:q.5417\n\tldr\td0, [x0, 24]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, q.5417\n\tadd\tx0, x0, :lo12:q.5417\n\tldr\td0, [x0, 16]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, q.5417\n\tadd\tx0, x0, :lo12:q.5417\n\tldr\td0, [x0, 8]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tfmov\td0, 1.0e+0\n\tfadd\td0, d1, d0\n\tadrp\tx0, bot.5420\n\tadd\tx0, x0, :lo12:bot.5420\n\tstr\td0, [x0]\n\tadrp\tx0, top.5423\n\tadd\tx0, x0, :lo12:top.5423\n\tldr\td1, [x0]\n\tadrp\tx0, bot.5420\n\tadd\tx0, x0, :lo12:bot.5420\n\tldr\td0, [x0]\n\tfdiv\td0, d1, d0\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tstr\td0, [x0]\n\tadrp\tx0, d.5421\n\tadd\tx0, x0, :lo12:d.5421\n\tldr\td0, [x0]\n\tfcmpe\td0, #0.0\n\tbgt\t.L20\n\tldr\tx0, [sp, 8]\n\tldr\td1, [x0]\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tldr\td0, [x0]\n\tfmul\td0, d1, d0\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tstr\td0, [x0]\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tldr\td0, [x0]\n\tb\t.L10\n.L20:\n\tnop\n.L13:\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td1, [x0]\n\tldr\tx0, [sp, 8]\n\tldr\td0, [x0]\n\tfdiv\td1, d1, d0\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tldr\td2, [x0]\n\tfmov\td0, 5.0e-1\n\tfsub\td2, d2, d0\n\tfmov\td0, 5.0e-1\n\tfsub\td0, d2, d0\n\tfmul\td0, d1, d0\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tstr\td0, [x0]\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tldr\td0, [x0]\n\tb\t.L10\n.L18:\n\tnop\n.L6:\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td1, [x0, 64]\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 56]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 48]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 40]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 32]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 24]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 16]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0, 8]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, r.5418\n\tadd\tx0, x0, :lo12:r.5418\n\tldr\td0, [x0]\n\tfadd\td0, d1, d0\n\tadrp\tx0, top.5423\n\tadd\tx0, x0, :lo12:top.5423\n\tstr\td0, [x0]\n\tadrp\tx0, s2.5415\n\tadd\tx0, x0, :lo12:s2.5415\n\tldr\td1, [x0]\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tadrp\tx0, s1.5414\n\tadd\tx0, x0, :lo12:s1.5414\n\tldr\td0, [x0]\n\tfadd\td1, d1, d0\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tfmov\td0, 1.0e+0\n\tfadd\td0, d1, d0\n\tadrp\tx0, bot.5420\n\tadd\tx0, x0, :lo12:bot.5420\n\tstr\td0, [x0]\n\tadrp\tx0, top.5423\n\tadd\tx0, x0, :lo12:top.5423\n\tldr\td1, [x0]\n\tadrp\tx0, bot.5420\n\tadd\tx0, x0, :lo12:bot.5420\n\tldr\td0, [x0]\n\tfdiv\td0, d1, d0\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tstr\td0, [x0]\n\tadrp\tx0, d.5421\n\tadd\tx0, x0, :lo12:d.5421\n\tldr\td0, [x0]\n\tfcmpe\td0, #0.0\n\tbgt\t.L21\n\tldr\tx0, [sp, 8]\n\tldr\td1, [x0]\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tldr\td2, [x0]\n\tfmov\td0, 5.0e-1\n\tfadd\td2, d2, d0\n\tfmov\td0, 5.0e-1\n\tfadd\td0, d2, d0\n\tfmul\td0, d1, d0\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tstr\td0, [x0]\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tldr\td0, [x0]\n\tb\t.L10\n.L21:\n\tnop\n.L16:\n\tadrp\tx0, t.5422\n\tadd\tx0, x0, :lo12:t.5422\n\tldr\td1, [x0]\n\tadrp\tx0, w.5424\n\tadd\tx0, x0, :lo12:w.5424\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tldr\tx0, [sp, 8]\n\tldr\td0, [x0]\n\tfdiv\td0, d1, d0\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tstr\td0, [x0]\n\tadrp\tx0, gam1.5419\n\tadd\tx0, x0, :lo12:gam1.5419\n\tldr\td0, [x0]\n.L10:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global gam1\n.type gam1, %function\ngam1:\n.LFB24:\n\t.cfi_startproc\n\tldr\td0, [x0]\n\tfmov\td1, 5.0e-1\n\tadrp\tx0, .LANCHOR0\n\tfmov\td5, d1\n\tfsub\td6, d0, d1\n\tfcmpe\td6, #0.0\n\tbgt\t.L2\n\tstr\td0, [x0, #:lo12:.LANCHOR0]\n.L3:\n\tldr\td1, [x0, #:lo12:.LANCHOR0]\n\tfcmpe\td1, #0.0\n\tbpl\t.L14\n\tadrp\tx0, .LC0\n\tfcmpe\td6, #0.0\n\tldr\td2, [x0, #:lo12:.LC0]\n\tadrp\tx0, .LC1\n\tldr\td3, [x0, #:lo12:.LC1]\n\tadrp\tx0, .LC2\n\tfmadd\td2, d1, d2, d3\n\tldr\td3, [x0, #:lo12:.LC2]\n\tadrp\tx0, .LC3\n\tfmadd\td3, d1, d2, d3\n\tldr\td2, [x0, #:lo12:.LC3]\n\tadrp\tx0, .LC4\n\tfmadd\td3, d1, d3, d2\n\tldr\td2, [x0, #:lo12:.LC4]\n\tadrp\tx0, .LC5\n\tfmadd\td2, d1, d3, d2\n\tldr\td3, [x0, #:lo12:.LC5]\n\tadrp\tx0, .LC6\n\tfmadd\td2, d1, d2, d3\n\tldr\td3, [x0, #:lo12:.LC6]\n\tadrp\tx0, .LC7\n\tfmadd\td3, d1, d2, d3\n\tldr\td2, [x0, #:lo12:.LC7]\n\tadrp\tx0, .LC8\n\tfmadd\td3, d1, d3, d2\n\tldr\td2, [x0, #:lo12:.LC8]\n\tadrp\tx0, .LC9\n\tldr\td4, [x0, #:lo12:.LC9]\n\tadrp\tx0, .LC10\n\tfmadd\td2, d1, d3, d2\n\tldr\td3, [x0, #:lo12:.LC10]\n\tfmadd\td4, d1, d4, d3\n\tfmov\td3, 1.0e+0\n\tfmadd\td3, d1, d4, d3\n\tfdiv\td2, d2, d3\n\tble\t.L15\n\tfmul\td1, d1, d2\n\tfdiv\td0, d1, d0\n\tb\t.L1\n.L2:\n\tfsub\td1, d6, d1\n\tstr\td1, [x0, #:lo12:.LANCHOR0]\n\tb\t.L3\n.L14:\n\tfcmp\td1, #0.0\n\tbeq\t.L11\n\tadrp\tx0, .LC11\n\tfcmpe\td6, #0.0\n\tldr\td4, [x0, #:lo12:.LC11]\n\tadrp\tx0, .LC12\n\tldr\td3, [x0, #:lo12:.LC12]\n\tadrp\tx0, .LC13\n\tfmadd\td3, d1, d4, d3\n\tldr\td4, [x0, #:lo12:.LC13]\n\tadrp\tx0, .LC14\n\tfmadd\td4, d1, d3, d4\n\tldr\td3, [x0, #:lo12:.LC14]\n\tadrp\tx0, .LC15\n\tfmadd\td3, d1, d4, d3\n\tldr\td4, [x0, #:lo12:.LC15]\n\tadrp\tx0, .LC16\n\tfmadd\td4, d1, d3, d4\n\tldr\td3, [x0, #:lo12:.LC16]\n\tadrp\tx0, .LC17\n\tfmadd\td3, d1, d4, d3\n\tldr\td4, [x0, #:lo12:.LC17]\n\tadrp\tx0, .LC18\n\tfmadd\td4, d1, d3, d4\n\tldr\td3, [x0, #:lo12:.LC18]\n\tadrp\tx0, .LC19\n\tldr\td2, [x0, #:lo12:.LC19]\n\tadrp\tx0, .LC20\n\tfmadd\td3, d1, d3, d2\n\tldr\td2, [x0, #:lo12:.LC20]\n\tadrp\tx0, .LC21\n\tfmadd\td2, d1, d3, d2\n\tldr\td3, [x0, #:lo12:.LC21]\n\tfmadd\td2, d1, d2, d3\n\tfmov\td3, 1.0e+0\n\tfmadd\td3, d1, d2, d3\n\tfdiv\td3, d4, d3\n\tble\t.L16\n\tfdiv\td0, d1, d0\n\tfsub\td3, d3, d5\n\tfsub\td3, d3, d5\n.L16:\n\tfmul\td0, d0, d3\n.L1:\n\tret\n.L15:\n\tfadd\td1, d2, d5\n\tfadd\td1, d1, d5\n\tfmul\td0, d1, d0\n\tb\t.L1\n.L11:\n\tmovi\td0, #0\n\tb\t.L1\n\t.cfi_endproc\n.LC4: \t.word\t319068346\n.LC14: \t.word\t1915957859\n.LC12: \t.word\t3030313495\n.LC6: \t.word\t4069074723\n.LC0: \t.word\t3422623020\n.LC10: \t.word\t1402778960\n.LC2: \t.word\t54352644\n.LC1: \t.word\t1993923686\n.LC13: \t.word\t2301182131\n.LC21: \t.word\t4030756836\n.LC3: \t.word\t3600501316\n.LC16: \t.word\t1293802627\n.LC19: \t.word\t1422905121\n.LC9: \t.word\t44197888\n.LC5: \t.word\t3792271106\n.LC20: \t.word\t4153065163\n.LC7: \t.word\t245161296\n.LC8: \t.word\t119575518\n.LC17: \t.word\t4235179546\n.LC15: \t.word\t3984294012\n.LC11: \t.word\t3594225734\n.LC18: \t.word\t3268700776\n",
".global gam1\n.type gam1, %function\ngam1:\n.LFB39:\n\t.cfi_startproc\n\tldr\td3, [x0]\n\tfmov\td1, 5.0e-1\n\tfsub\td2, d3, d1\n\tfcmpe\td2, #0.0\n\tble\t.L19\n\tfsub\td1, d2, d1\n\tadrp\tx0, .LANCHOR0\n\tfcmpe\td1, #0.0\n\tstr\td1, [x0, #:lo12:.LANCHOR0]\n\tbmi\t.L20\n.L14:\n\tfcmp\td1, #0.0\n\tmovi\td0, #0\n\tbne\t.L21\n\tret\n\t.p2align 2,,3\n.L21:\n\tadrp\tx0, .LC11\n\tfcmpe\td2, #0.0\n\tfmov\td4, 1.0e+0\n\tldr\td16, [x0, #:lo12:.LC11]\n\tadrp\tx0, .LC12\n\tldr\td20, [x0, #:lo12:.LC12]\n\tadrp\tx0, .LC13\n\tfmadd\td20, d1, d16, d20\n\tldr\td18, [x0, #:lo12:.LC13]\n\tadrp\tx0, .LC14\n\tldr\td0, [x0, #:lo12:.LC14]\n\tadrp\tx0, .LC15\n\tldr\td16, [x0, #:lo12:.LC15]\n\tadrp\tx0, .LC16\n\tldr\td19, [x0, #:lo12:.LC16]\n\tadrp\tx0, .LC17\n\tfmadd\td19, d1, d0, d19\n\tfmadd\td18, d20, d1, d18\n\tldr\td6, [x0, #:lo12:.LC17]\n\tadrp\tx0, .LC18\n\tldr\td17, [x0, #:lo12:.LC18]\n\tadrp\tx0, .LC19\n\tldr\td5, [x0, #:lo12:.LC19]\n\tadrp\tx0, .LC20\n\tldr\td7, [x0, #:lo12:.LC20]\n\tadrp\tx0, .LC21\n\tfmadd\td2, d19, d1, d17\n\tfmadd\td16, d18, d1, d16\n\tldr\td0, [x0, #:lo12:.LC21]\n\tfmadd\td2, d2, d1, d7\n\tfmadd\td6, d16, d1, d6\n\tfmadd\td2, d2, d1, d4\n\tfmadd\td4, d6, d1, d5\n\tfmadd\td0, d4, d1, d0\n\tfdiv\td0, d0, d2\n\tbgt\t.L22\n\tfmul\td0, d0, d3\n.L24:\n\tret\n\t.p2align 2,,3\n.L19:\n\tfmov\td1, d3\n\tadrp\tx0, .LANCHOR0\n\tstr\td3, [x0, #:lo12:.LANCHOR0]\n\tfcmpe\td1, #0.0\n\tbpl\t.L14\n.L20:\n\tadrp\tx0, .LC0\n\tfcmpe\td2, #0.0\n\tldr\td4, [x0, #:lo12:.LC0]\n\tadrp\tx0, .LC1\n\tldr\td20, [x0, #:lo12:.LC1]\n\tadrp\tx0, .LC2\n\tfmadd\td20, d1, d4, d20\n\tldr\td18, [x0, #:lo12:.LC2]\n\tadrp\tx0, .LC3\n\tldr\td17, [x0, #:lo12:.LC3]\n\tadrp\tx0, .LC4\n\tldr\td16, [x0, #:lo12:.LC4]\n\tadrp\tx0, .LC5\n\tldr\td7, [x0, #:lo12:.LC5]\n\tadrp\tx0, .LC6\n\tfmadd\td18, d20, d1, d18\n\tldr\td6, [x0, #:lo12:.LC6]\n\tadrp\tx0, .LC7\n\tldr\td4, [x0, #:lo12:.LC7]\n\tadrp\tx0, .LC8\n\tldr\td5, [x0, #:lo12:.LC8]\n\tadrp\tx0, .LC9\n\tldr\td19, [x0, #:lo12:.LC9]\n\tadrp\tx0, .LC10\n\tfmadd\td19, d1, d4, d19\n\tfmov\td4, 1.0e+0\n\tldr\td0, [x0, #:lo12:.LC10]\n\tfmadd\td2, d19, d1, d4\n\tfmadd\td4, d18, d1, d17\n\tfmadd\td4, d4, d1, d16\n\tfmadd\td4, d4, d1, d7\n\tfmadd\td4, d4, d1, d6\n\tfmadd\td4, d4, d1, d5\n\tfmadd\td0, d4, d1, d0\n\tfdiv\td0, d0, d2\n\tbgt\t.L23\n\tfmov\td1, 5.0e-1\n\tfadd\td0, d0, d1\n\tfadd\td0, d0, d1\n\tfmul\td0, d0, d3\n\tb\t.L24\n\t.p2align 2,,3\n.L22:\n\tfdiv\td1, d1, d3\n\tfmov\td2, 5.0e-1\n\tfsub\td0, d0, d2\n\tfsub\td0, d0, d2\n\tfmul\td0, d0, d1\n\tret\n\t.p2align 2,,3\n.L23:\n\tfmul\td0, d0, d1\n\tfdiv\td0, d0, d3\n\tret\n\t.cfi_endproc\n.LC4: \t.word\t319068346\n.LC14: \t.word\t3268700776\n.LC12: \t.word\t3030313495\n.LC6: \t.word\t4069074723\n.LC0: \t.word\t3422623020\n.LC10: \t.word\t119575518\n.LC2: \t.word\t54352644\n.LC1: \t.word\t1993923686\n.LC13: \t.word\t2301182131\n.LC21: \t.word\t4235179546\n.LC3: \t.word\t3600501316\n.LC16: \t.word\t1422905121\n.LC19: \t.word\t1293802627\n.LC9: \t.word\t1402778960\n.LC5: \t.word\t3792271106\n.LC20: \t.word\t4030756836\n.LC7: \t.word\t44197888\n.LC8: \t.word\t245161296\n.LC17: \t.word\t3984294012\n.LC15: \t.word\t1915957859\n.LC11: \t.word\t3594225734\n.LC18: \t.word\t4153065163\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": [
"[51.7233135909, 45.0878654279, 13.8868488002, 78.0354734752, 43.7151406014, 14.5723487285, 84.1686368738, 16.3899840842, 30.0554991269, 82.9277873016, 79.0266403356, 31.8299079376, 19.8367575099, 46.2343864153, 31.3247803285, 14.7740288883, 38.0478005658, 78.1235530252, 89.7363618536, 89.6765602188, 72.4532396938, 23.4767088426, 90.3382326193, 50.1130596087, 49.1330603832, 61.3968347725, 84.4288447753, 69.4229226313, 65.8968541506, 26.6295222485, 52.3385601539, 84.4075698339]"
],
"var": [
"a"
]
},
{
"value": [
"[17.3238469178, 54.0965236429, 75.2511439769, 64.1867841193, 27.57436577, 39.0251424453, 29.7323529854, 70.1208093079, 96.6454502462, 76.8287152094, 45.674847207, 46.3318070584, 46.3871395879, 80.3853091718, 8.30467665321, 8.47915683993, 92.2561031862, 95.09586786, 49.6272234983, 77.7316358728, 61.5576642334, 82.2402586708, 13.4068718359, 27.9835251223, 48.4304523097, 0.75024184538, 77.0674363046, 59.483776025, 61.3341615197, 49.1721952655, 88.1986755725, 7.79954928222]"
],
"var": [
"a"
]
},
{
"value": [
"[42.4152328461, 13.8119696483, 69.8118391759, 85.1733838334, 31.9373267761, 37.1249089796, 2.24420160218, 41.2794268321, 78.7591600248, 26.090801014, 38.5393165022, 44.5242426548, 53.9641514723, 37.8685650055, 53.0880193598, 92.6096929187, 46.514274958, 27.6502951683, 58.1099413553, 84.6886526361, 26.9625496458, 77.5945164946, 41.9356699267, 61.3861785864, 99.7695269845, 59.5839638903, 85.4089531517, 14.0360719379, 44.457046498, 73.4713577215, 8.16544100912, 41.6818265596]"
],
"var": [
"a"
]
},
{
"value": [
"[82.3451801759, 95.0321272666, 81.5032957796, 67.0970965619, 54.3615088007, 64.5590111779, 98.0816314358, 58.8713531212, 13.196011143, 29.2228345467, 68.2306501484, 91.9768275299, 37.3279493887, 34.2948570246, 81.2777326165, 97.9115034053, 27.2394331404, 18.6104565157, 35.4636591627, 54.6952599549, 93.0352899348, 54.3442541392, 53.5226864685, 68.3683173214, 4.38509916743, 36.1476877177, 15.5252079068, 22.4888548084, 5.19569545954, 42.677121823, 4.4624066565, 39.903568537]"
],
"var": [
"a"
]
},
{
"value": [
"[76.6862999335, 65.9858581864, 46.131251846, 85.7954374432, 62.1060406713, 48.6409228116, 89.7884093727, 80.1785136182, 72.5465211355, 88.1730242604, 45.1401856899, 60.750093693, 17.5173883505, 69.8067232388, 46.996529413, 72.0288963955, 97.5607393289, 21.1910728379, 82.6390938285, 67.3351011457, 42.5059332869, 29.6050412184, 93.5842439031, 20.9823249727, 56.6472421769, 98.7857951552, 96.0233740654, 85.6719755305, 65.2613384595, 14.1726258544, 87.6105291705, 89.6136954034]"
],
"var": [
"a"
]
},
{
"value": [
"[39.4162592507, 71.5056111629, 18.4282304483, 83.5317317032, 14.3111582309, 76.4679728252, 57.4462418226, 5.76994790232, 70.7537116299, 45.2602981514, 58.8292302825, 20.3919335253, 52.7136908888, 88.1875578415, 61.9815103825, 2.36005271748, 52.1322692452, 50.8545836041, 43.1233727274, 85.4002000402, 21.0868400574, 35.5495113602, 95.0358214049, 37.6579616139, 76.1386840376, 8.76651402721, 56.3945471083, 7.77153282942, 67.0962813237, 87.0842029897, 70.4796374593, 11.0401773694]"
],
"var": [
"a"
]
},
{
"value": [
"[68.5123344165, 86.1731877888, 15.9027996754, 45.4546173737, 3.14443237353, 61.831319212, 79.1288846769, 66.4103835025, 13.2161496992, 32.5434721247, 5.62012484322, 7.45349673107, 88.935661095, 98.0976428543, 64.8442491761, 12.6204661548, 99.9431338747, 94.4145677317, 95.5222839559, 94.4634189866, 29.2038834647, 86.3186073451, 70.9687524254, 77.5730105883, 91.2743109679, 93.7702126822, 63.175215627, 85.6989990082, 4.7408353141, 16.435829256, 16.910756082, 15.1424174738]"
],
"var": [
"a"
]
},
{
"value": [
"[5.18258101465, 88.4798307668, 90.3156300628, 28.6210526751, 89.8834591624, 37.3642233689, 97.1770077772, 21.8267416945, 57.7668771667, 88.7037166761, 72.5273954659, 56.0699954179, 88.1311875062, 84.3697090214, 3.19002634873, 59.3574857797, 33.025759658, 98.8476606236, 32.9591595611, 46.2640988425, 94.4316043423, 82.2696763684, 91.537710246, 58.4518075245, 96.1280568896, 34.0550656041, 97.0745315051, 15.8391869221, 29.7640182016, 69.6812893942, 53.3405067339, 2.55581754072]"
],
"var": [
"a"
]
},
{
"value": [
"[46.7928414621, 43.6687253124, 6.0506313867, 99.2843565808, 52.046358536, 89.3194677995, 98.82746324, 55.3711005789, 79.4589409241, 24.8199178201, 67.3048452455, 90.7924278345, 55.9155927636, 13.0461501104, 30.4515187517, 46.0927367397, 39.6473854346, 85.4588886084, 60.5638618095, 48.7962261381, 8.95714766128, 27.6062928683, 14.276357125, 48.2446595363, 99.827781746, 26.3670291212, 67.1013955033, 5.6047018175, 84.4980597521, 69.5267727195, 49.7261086819, 0.376951084823]"
],
"var": [
"a"
]
},
{
"value": [
"[41.9474181904, 5.4836056513, 71.1801348993, 3.75177641199, 56.0363118148, 70.1605688399, 26.8799200273, 71.3807515561, 40.4466738876, 86.0186834644, 98.7953446669, 73.9741142541, 45.3399300143, 62.7081216725, 57.2790115493, 94.9644421093, 85.5896591242, 98.5760064681, 54.6316140188, 58.3185841625, 6.56871786757, 87.7475872365, 41.8169277757, 58.5285790552, 15.6173834594, 68.9279330291, 40.6288743829, 73.4207325445, 78.3890723132, 17.1854756476, 33.3836294044, 61.7081915016]"
],
"var": [
"a"
]
}
],
"output": [
{
"value": [
"[51.7233135909, 45.0878654279, 13.8868488002, 78.0354734752, 43.7151406014, 14.5723487285, 84.1686368738, 16.3899840842, 30.0554991269, 82.9277873016, 79.0266403356, 31.8299079376, 19.8367575099, 46.2343864153, 31.3247803285, 14.7740288883, 38.0478005658, 78.1235530252, 89.7363618536, 89.6765602188, 72.4532396938, 23.4767088426, 90.3382326193, 50.1130596087, 49.1330603832, 61.3968347725, 84.4288447753, 69.4229226313, 65.8968541506, 26.6295222485, 52.3385601539, 84.4075698339]",
"256.71162208681085"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[17.3238469178, 54.0965236429, 75.2511439769, 64.1867841193, 27.57436577, 39.0251424453, 29.7323529854, 70.1208093079, 96.6454502462, 76.8287152094, 45.674847207, 46.3318070584, 46.3871395879, 80.3853091718, 8.30467665321, 8.47915683993, 92.2561031862, 95.09586786, 49.6272234983, 77.7316358728, 61.5576642334, 82.2402586708, 13.4068718359, 27.9835251223, 48.4304523097, 0.75024184538, 77.0674363046, 59.483776025, 61.3341615197, 49.1721952655, 88.1986755725, 7.79954928222]",
"11.08048284560031"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[42.4152328461, 13.8119696483, 69.8118391759, 85.1733838334, 31.9373267761, 37.1249089796, 2.24420160218, 41.2794268321, 78.7591600248, 26.090801014, 38.5393165022, 44.5242426548, 53.9641514723, 37.8685650055, 53.0880193598, 92.6096929187, 46.514274958, 27.6502951683, 58.1099413553, 84.6886526361, 26.9625496458, 77.5945164946, 41.9356699267, 61.3861785864, 99.7695269845, 59.5839638903, 85.4089531517, 14.0360719379, 44.457046498, 73.4713577215, 8.16544100912, 41.6818265596]",
"157.83847022595918"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[82.3451801759, 95.0321272666, 81.5032957796, 67.0970965619, 54.3615088007, 64.5590111779, 98.0816314358, 58.8713531212, 13.196011143, 29.2228345467, 68.2306501484, 91.9768275299, 37.3279493887, 34.2948570246, 81.2777326165, 97.9115034053, 27.2394331404, 18.6104565157, 35.4636591627, 54.6952599549, 93.0352899348, 54.3442541392, 53.5226864685, 68.3683173214, 4.38509916743, 36.1476877177, 15.5252079068, 22.4888548084, 5.19569545954, 42.677121823, 4.4624066565, 39.903568537]",
"752.2574623251222"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[76.6862999335, 65.9858581864, 46.131251846, 85.7954374432, 62.1060406713, 48.6409228116, 89.7884093727, 80.1785136182, 72.5465211355, 88.1730242604, 45.1401856899, 60.750093693, 17.5173883505, 69.8067232388, 46.996529413, 72.0288963955, 97.5607393289, 21.1910728379, 82.6390938285, 67.3351011457, 42.5059332869, 29.6050412184, 93.5842439031, 20.9823249727, 56.6472421769, 98.7857951552, 96.0233740654, 85.6719755305, 65.2613384595, 14.1726258544, 87.6105291705, 89.6136954034]",
"641.0052292976081"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[39.4162592507, 71.5056111629, 18.4282304483, 83.5317317032, 14.3111582309, 76.4679728252, 57.4462418226, 5.76994790232, 70.7537116299, 45.2602981514, 58.8292302825, 20.3919335253, 52.7136908888, 88.1875578415, 61.9815103825, 2.36005271748, 52.1322692452, 50.8545836041, 43.1233727274, 85.4002000402, 21.0868400574, 35.5495113602, 95.0358214049, 37.6579616139, 76.1386840376, 8.76651402721, 56.3945471083, 7.77153282942, 67.0962813237, 87.0842029897, 70.4796374593, 11.0401773694]",
"131.11858521139237"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[68.5123344165, 86.1731877888, 15.9027996754, 45.4546173737, 3.14443237353, 61.831319212, 79.1288846769, 66.4103835025, 13.2161496992, 32.5434721247, 5.62012484322, 7.45349673107, 88.935661095, 98.0976428543, 64.8442491761, 12.6204661548, 99.9431338747, 94.4145677317, 95.5222839559, 94.4634189866, 29.2038834647, 86.3186073451, 70.9687524254, 77.5730105883, 91.2743109679, 93.7702126822, 63.175215627, 85.6989990082, 4.7408353141, 16.435829256, 16.910756082, 15.1424174738]",
"496.05694437777913"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[5.18258101465, 88.4798307668, 90.3156300628, 28.6210526751, 89.8834591624, 37.3642233689, 97.1770077772, 21.8267416945, 57.7668771667, 88.7037166761, 72.5273954659, 56.0699954179, 88.1311875062, 84.3697090214, 3.19002634873, 59.3574857797, 33.025759658, 98.8476606236, 32.9591595611, 46.2640988425, 94.4316043423, 82.2696763684, 91.537710246, 58.4518075245, 96.1280568896, 34.0550656041, 97.0745315051, 15.8391869221, 29.7640182016, 69.6812893942, 53.3405067339, 2.55581754072]",
"-0.981147912689488"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[46.7928414621, 43.6687253124, 6.0506313867, 99.2843565808, 52.046358536, 89.3194677995, 98.82746324, 55.3711005789, 79.4589409241, 24.8199178201, 67.3048452455, 90.7924278345, 55.9155927636, 13.0461501104, 30.4515187517, 46.0927367397, 39.6473854346, 85.4588886084, 60.5638618095, 48.7962261381, 8.95714766128, 27.6062928683, 14.276357125, 48.2446595363, 99.827781746, 26.3670291212, 67.1013955033, 5.6047018175, 84.4980597521, 69.5267727195, 49.7261086819, 0.376951084823]",
"201.33444522749107"
],
"var": [
"a",
"returnv"
]
},
{
"value": [
"[41.9474181904, 5.4836056513, 71.1801348993, 3.75177641199, 56.0363118148, 70.1605688399, 26.8799200273, 71.3807515561, 40.4466738876, 86.0186834644, 98.7953446669, 73.9741142541, 45.3399300143, 62.7081216725, 57.2790115493, 94.9644421093, 85.5896591242, 98.5760064681, 54.6316140188, 58.3185841625, 6.56871786757, 87.7475872365, 41.8169277757, 58.5285790552, 15.6173834594, 68.9279330291, 40.6288743829, 73.4207325445, 78.3890723132, 17.1854756476, 33.3836294044, 61.7081915016]",
"153.50567688314902"
],
"var": [
"a",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_43zama530i.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* a, double returnv) {
json output_json;
std::vector<json> output_temp_2;
for (unsigned int i3 = 0; i3 < 32; i3++) {
double output_temp_4 = a[i3];
output_temp_2.push_back(output_temp_4);
}
output_json["a"] = 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["a"]) {
double input_temp_1_inner = elem;
input_temp_1_vec.push_back(input_temp_1_inner);
}
double* a = &input_temp_1_vec[0];
clock_t begin = clock();
double returnv = gam1(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": ["a"], "returnvarname": ["returnv"], "execcmd": "", "funname": "gam1", "funargs": ["a"], "typemap": {"a": "array(float64#32)", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43zama530i.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
LTMana/code/LZWeather/LZWeather/Classes/Public/YXEasing/Easing.c
|
double QuinticEaseIn(double p)
{
return p * p * p * p * p;
}
|
double QuinticEaseIn(doublep)
|
double QuinticEaseIn(double p)
|
QuinticEaseIn
|
[
"double",
"double"
] |
{
"code": [
".globl QuinticEaseIn\n.type QuinticEaseIn, @function\nQuinticEaseIn:\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-8(%rbp), %xmm0\n\tmulsd\t%xmm0, %xmm0\n\tmulsd\t-8(%rbp), %xmm0\n\tmulsd\t-8(%rbp), %xmm0\n\tmulsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl QuinticEaseIn\n.type QuinticEaseIn, @function\nQuinticEaseIn:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmulsd\t%xmm0, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl QuinticEaseIn\n.type QuinticEaseIn, @function\nQuinticEaseIn:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmulsd\t%xmm0, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global QuinticEaseIn\n.type QuinticEaseIn, %function\nQuinticEaseIn:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tfmul\td1, d0, d0\n\tldr\td0, [sp, 8]\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 8]\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 8]\n\tfmul\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global QuinticEaseIn\n.type QuinticEaseIn, %function\nQuinticEaseIn:\n.LFB0:\n\t.cfi_startproc\n\tfmul\td1, d0, d0\n\tfmul\td1, d1, d0\n\tfmul\td1, d1, d0\n\tfmul\td0, d1, d0\n\tret\n\t.cfi_endproc\n\n",
".global QuinticEaseIn\n.type QuinticEaseIn, %function\nQuinticEaseIn:\n.LFB0:\n\t.cfi_startproc\n\tfmul\td1, d0, d0\n\tfmul\td1, d1, d0\n\tfmul\td1, d1, d0\n\tfmul\td0, d1, 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": [
"80.3278461514"
],
"var": [
"p"
]
},
{
"value": [
"17.639486865"
],
"var": [
"p"
]
},
{
"value": [
"53.4896858588"
],
"var": [
"p"
]
},
{
"value": [
"27.1950800407"
],
"var": [
"p"
]
},
{
"value": [
"97.7983564217"
],
"var": [
"p"
]
},
{
"value": [
"0.42657061448"
],
"var": [
"p"
]
},
{
"value": [
"60.8674966375"
],
"var": [
"p"
]
},
{
"value": [
"80.885597799"
],
"var": [
"p"
]
},
{
"value": [
"11.6375909146"
],
"var": [
"p"
]
},
{
"value": [
"16.3311550309"
],
"var": [
"p"
]
}
],
"output": [
{
"value": [
"3344495465.1252723"
],
"var": [
"returnv"
]
},
{
"value": [
"1707771.4012387856"
],
"var": [
"returnv"
]
},
{
"value": [
"437875086.99189013"
],
"var": [
"returnv"
]
},
{
"value": [
"14874819.582607776"
],
"var": [
"returnv"
]
},
{
"value": [
"8946595063.161444"
],
"var": [
"returnv"
]
},
{
"value": [
"0.014123901258775011"
],
"var": [
"returnv"
]
},
{
"value": [
"835462963.4580468"
],
"var": [
"returnv"
]
},
{
"value": [
"3462230658.9647818"
],
"var": [
"returnv"
]
},
{
"value": [
"213459.47349046526"
],
"var": [
"returnv"
]
},
{
"value": [
"1161674.6380025982"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_559ffqkrlu.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 p, 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 p = input_json["p"];
clock_t begin = clock();
double returnv = QuinticEaseIn(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": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "QuinticEaseIn", "funargs": ["p"], "typemap": {"p": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_559ffqkrlu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
gentooinit/solution_for_c_book/Chapter1/e1-24/check.c
|
int dec_lv(char x, char c, int lv)
{
if (x == c)
--lv;
return lv;
}
|
int dec_lv(charx, charc, intlv)
|
int dec_lv(char x, char c, int lv)
|
dec_lv
|
[
"int",
"char",
"char",
"int"
] |
{
"code": [
".globl dec_lv\n.type dec_lv, @function\ndec_lv:\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, %ecx\n\tmovl\t%esi, %eax\n\tmovl\t%edx, -12(%rbp)\n\tmovl\t%ecx, %edx\n\tmovb\t%dl, -4(%rbp)\n\tmovb\t%al, -8(%rbp)\n\tmovzbl\t-4(%rbp), %eax\n\tcmpb\t-8(%rbp), %al\n\tjne\t.L2\n\tsubl\t$1, -12(%rbp)\n.L2:\n\tmovl\t-12(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl dec_lv\n.type dec_lv, @function\ndec_lv:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %eax\n\tcmpb\t%sil, %dil\n\tjne\t.L2\n\tdecl\t%eax\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".globl dec_lv\n.type dec_lv, @function\ndec_lv:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpb\t%sil, %dil\n\tsete\t%al\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".global dec_lv\n.type dec_lv, %function\ndec_lv:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstrb\tw1, [sp, 14]\n\tstr\tw2, [sp, 8]\n\tldrb\tw1, [sp, 15]\n\tldrb\tw0, [sp, 14]\n\tcmp\tw1, w0\n\tbne\t.L2\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 8]\n.L2:\n\tldr\tw0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global dec_lv\n.type dec_lv, %function\ndec_lv:\n.LFB13:\n\t.cfi_startproc\n\tand\tw1, w1, 255\n\tcmp\tw1, w0, uxtb\n\tcset\tw0, eq\n\tsub\tw0, w2, w0\n\tret\n\t.cfi_endproc\n\n",
".global dec_lv\n.type dec_lv, %function\ndec_lv:\n.LFB23:\n\t.cfi_startproc\n\tand\tw1, w1, 255\n\tcmp\tw1, w0, uxtb\n\tcset\tw0, eq\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 |
#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": [
"123",
"77",
"120"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"76",
"36",
"103"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"31",
"29",
"44"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"71",
"66",
"29"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"27",
"15",
"16"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"2",
"87",
"7"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"99",
"50",
"76"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"123",
"1",
"76"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"97",
"112",
"22"
],
"var": [
"x",
"c",
"lv"
]
},
{
"value": [
"87",
"3",
"103"
],
"var": [
"x",
"c",
"lv"
]
}
],
"output": [
{
"value": [
"120"
],
"var": [
"returnv"
]
},
{
"value": [
"103"
],
"var": [
"returnv"
]
},
{
"value": [
"44"
],
"var": [
"returnv"
]
},
{
"value": [
"29"
],
"var": [
"returnv"
]
},
{
"value": [
"16"
],
"var": [
"returnv"
]
},
{
"value": [
"7"
],
"var": [
"returnv"
]
},
{
"value": [
"76"
],
"var": [
"returnv"
]
},
{
"value": [
"76"
],
"var": [
"returnv"
]
},
{
"value": [
"22"
],
"var": [
"returnv"
]
},
{
"value": [
"103"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_52ycmuk6_f.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 x, char c, int lv, 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 x = input_json["x"].get<char>();
char c = input_json["c"].get<char>();
int lv = input_json["lv"];
clock_t begin = clock();
int returnv = dec_lv(x, c, lv);
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, c, lv, returnv);
}
|
master
|
null
|
{"livein": ["x", "c", "lv"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "dec_lv", "funargs": ["x", "c", "lv"], "typemap": {"x": "int8", "c": "int8", "lv": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52ycmuk6_f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Shapeways/puppetarium/modules/profiles/files/cron/cronjobber.c
|
int
prefix_of(char *special, char *s)
{
for (; *special != '\0'; ++special)
if (*special != *s++)
return 0;
return (*s == '=' || *s == '\0');
}
|
int prefix_of(char *special, char *s)
|
int prefix_of(char *special, char *s)
|
prefix_of
|
[
"int",
"char *",
"char *"
] |
{
"code": [
".globl prefix_of\n.type prefix_of, @function\nprefix_of:\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\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.L3\n\tmovl\t$0, %eax\n\tjmp\t.L4\n.L3:\n\taddq\t$1, -8(%rbp)\n.L2:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$61, %al\n\tje\t.L6\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L7\n.L6:\n\tmovl\t$1, %eax\n\tjmp\t.L4\n.L7:\n\tmovl\t$0, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl prefix_of\n.type prefix_of, @function\nprefix_of:\n.LFB48:\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.L7\n\tincq\t%rax\n\tcmpb\t%dl, %cl\n\tje\t.L2\n\txorl\t%eax, %eax\n\tret\n.L7:\n\tcmpb\t$61, %dl\n\tsete\t%al\n\ttestb\t%dl, %dl\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl prefix_of\n.type prefix_of, @function\nprefix_of:\n.LFB69:\n\t.cfi_startproc\n\tendbr64\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\taddq\t$1, %rsi\n\tcmpb\t%al, -1(%rsi)\n\tjne\t.L5\n\taddq\t$1, %rdi\n.L10:\n\tmovzbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L4\n\tmovzbl\t(%rsi), %edx\n\tcmpb\t$61, %dl\n\tsete\t%al\n\ttestb\t%dl, %dl\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global prefix_of\n.type prefix_of, %function\nprefix_of:\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\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.L3\n\tmov\tw0, 0\n\tb\t.L4\n.L3:\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 61\n\tbeq\t.L6\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L7\n.L6:\n\tmov\tw0, 1\n\tb\t.L4\n.L7:\n\tmov\tw0, 0\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global prefix_of\n.type prefix_of, %function\nprefix_of:\n.LFB48:\n\t.cfi_startproc\n\tmov\tx2, 0\n.L2:\n\tldrb\tw4, [x0, x2]\n\tldrb\tw3, [x1, x2]\n\tcbnz\tw4, .L4\n\tcmp\tw3, 61\n\tccmp\tw3, 0, 4, ne\n\tcset\tw0, eq\n.L1:\n\tret\n.L4:\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 prefix_of\n.type prefix_of, %function\nprefix_of:\n.LFB69:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcbnz\tw2, .L4\n\tb\t.L2\n\t.p2align 2,,3\n.L11:\n\tldrb\tw2, [x0, 1]!\n\tcbz\tw2, .L2\n.L4:\n\tldrb\tw3, [x1], 1\n\tcmp\tw3, w2\n\tbeq\t.L11\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L2:\n\tldrb\tw0, [x1]\n\tcmp\tw0, 61\n\tccmp\tw0, 0, 4, ne\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>
#include <unistd.h>
#include <limits.h>
#include <errno.h>
#include <stdarg.h>
#include <fcntl.h>
#include <time.h>
#include <signal.h>
#include <dirent.h>
#include <pwd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.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": [
"\"rkpdpvgyshuebbedxz\"",
"\"boqikefo\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"hrzujb\"",
"\"jsye\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"s\"",
"\"qebuznjsnfjwcooytzzayyuqtvwnie\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"onpaaufwombosmiaebe\"",
"\"inbt\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"wgpnoktjkoztnckrtnngmrlu\"",
"\"jevbqzocksnnbgzrdhf\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"\"",
"\"cnehtdc\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"tttsyeb\"",
"\"rqivozmtvwgeipfiqhrzhvb\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"jmieyqroxzw\"",
"\"ijko\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"b\"",
"\"obftg\""
],
"var": [
"special",
"s"
]
},
{
"value": [
"\"rzlcozcssuczhssoatglr\"",
"\"agmfteqdlkwclczrjzerwupiyilzdn\""
],
"var": [
"special",
"s"
]
}
],
"output": [
{
"value": [
"0",
"\"boqikefo\"",
"\"rkpdpvgyshuebbedxz\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"jsye\"",
"\"hrzujb\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"qebuznjsnfjwcooytzzayyuqtvwnie\"",
"\"s\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"inbt\"",
"\"onpaaufwombosmiaebe\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"jevbqzocksnnbgzrdhf\"",
"\"wgpnoktjkoztnckrtnngmrlu\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"cnehtdc\"",
"\"\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"rqivozmtvwgeipfiqhrzhvb\"",
"\"tttsyeb\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"ijko\"",
"\"jmieyqroxzw\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"obftg\"",
"\"b\""
],
"var": [
"returnv",
"s",
"special"
]
},
{
"value": [
"0",
"\"agmfteqdlkwclczrjzerwupiyilzdn\"",
"\"rzlcozcssuczhssoatglr\""
],
"var": [
"returnv",
"s",
"special"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_35014pti0y.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* special, char* s, int returnv) {
json output_json;
output_json["special"] = special;
output_json["s"] = s;
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* special = strdup(input_json["special"].get<std::string>().c_str());
char* s = strdup(input_json["s"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = prefix_of(special, s);
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(special, s, returnv);
}
|
master
|
null
|
{"livein": ["special", "s"], "liveout": ["special", "s"], "returnvarname": ["returnv"], "execcmd": "", "funname": "prefix_of", "funargs": ["special", "s"], "typemap": {"special": "string", "s": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35014pti0y.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
nolink/algorithm/training/012fan_metting.c
|
int* sub(int* a, int sizeA, int* b, int sizeB, int* resultSize){
}
|
int * sub(int *a, intsizeA, int *b, intsizeB, int *resultSize)
|
int* sub(int* a, int sizeA, int* b, int sizeB, int* resultSize)
|
sub
|
[
"int *",
"int *",
"int",
"int *",
"int",
"int *"
] |
{
"code": [
".globl sub\n.type sub, @function\nsub:\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%esi, -12(%rbp)\n\tmovq\t%rdx, -24(%rbp)\n\tmovl\t%ecx, -16(%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 sub\n.type sub, @function\nsub:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".globl sub\n.type sub, @function\nsub:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".global sub\n.type sub, %function\nsub:\n.LFB6:\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\tx2, [sp, 8]\n\tstr\tw3, [sp, 16]\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 sub\n.type sub, %function\nsub:\n.LFB35:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global sub\n.type sub, %function\nsub:\n.LFB50:\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>
#include <memory.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": [
"[51, 2, 6, 32, 76, 97, 116, 94, 107, 83, 25, 73, 106, 7, 82, 114, 63, 63, 61, 0, 35, 4, 17, 21, 125, 37, 46, 35, 37, 30, 72, 87]",
"90",
"[84, 110, 3, 107, 59, 111, 50, 120, 93, 65, 115, 19, 12, 10, 122, 99, 79, 13, 21, 67, 99, 12, 17, 61, 49, 86, 97, 18, 49, 65, 70, 55]",
"2",
"[62, 91, 47, 55, 38, 74, 37, 6, 98, 47, 20, 37, 26, 102, 117, 48, 52, 102, 0, 96, 111, 1, 18, 65, 94, 118, 105, 54, 19, 30, 108, 6]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[4, 76, 113, 7, 17, 30, 16, 93, 26, 110, 69, 85, 75, 106, 118, 92, 59, 120, 110, 68, 59, 42, 65, 74, 22, 102, 10, 16, 6, 3, 79, 44]",
"101",
"[40, 66, 58, 77, 69, 21, 62, 32, 100, 109, 79, 83, 18, 89, 39, 103, 100, 45, 18, 2, 8, 80, 25, 48, 110, 9, 26, 19, 66, 110, 20, 34]",
"0",
"[0, 34, 54, 122, 31, 92, 99, 116, 31, 21, 73, 29, 115, 111, 93, 59, 52, 13, 2, 19, 67, 25, 50, 66, 106, 74, 2, 122, 95, 43, 81, 124]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[72, 59, 87, 103, 88, 55, 126, 118, 126, 30, 12, 2, 71, 66, 125, 92, 3, 28, 2, 63, 125, 89, 126, 68, 18, 14, 81, 80, 49, 43, 64, 40]",
"41",
"[43, 114, 73, 35, 75, 31, 94, 102, 47, 67, 64, 95, 108, 110, 97, 11, 51, 72, 32, 0, 43, 46, 85, 91, 52, 39, 0, 116, 72, 2, 27, 80]",
"13",
"[76, 90, 8, 30, 40, 107, 78, 58, 22, 82, 71, 96, 39, 27, 66, 33, 96, 55, 71, 111, 11, 9, 62, 14, 72, 31, 9, 25, 122, 47, 69, 5]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[24, 82, 45, 19, 47, 79, 90, 43, 47, 115, 69, 111, 34, 19, 53, 41, 110, 45, 79, 16, 3, 111, 79, 75, 77, 54, 37, 107, 16, 32, 57, 31]",
"27",
"[14, 9, 4, 8, 121, 51, 47, 23, 96, 122, 68, 90, 116, 54, 56, 48, 38, 33, 13, 63, 18, 20, 96, 116, 84, 11, 73, 120, 39, 88, 91, 16]",
"86",
"[98, 21, 116, 81, 66, 8, 19, 76, 84, 103, 93, 11, 101, 120, 86, 41, 107, 55, 53, 83, 115, 29, 104, 21, 85, 112, 38, 18, 20, 54, 45, 97]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[20, 98, 57, 41, 13, 64, 61, 0, 74, 104, 50, 114, 92, 70, 81, 38, 121, 43, 69, 79, 75, 115, 82, 56, 88, 39, 105, 107, 61, 79, 9, 93]",
"109",
"[56, 53, 22, 100, 14, 59, 71, 59, 79, 49, 89, 124, 20, 55, 15, 106, 89, 21, 122, 0, 63, 20, 111, 116, 36, 45, 52, 14, 69, 77, 40, 44]",
"107",
"[24, 69, 85, 10, 110, 44, 95, 102, 24, 72, 2, 20, 78, 62, 21, 8, 106, 59, 28, 10, 66, 92, 78, 122, 75, 0, 80, 10, 121, 101, 67, 81]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[120, 104, 51, 108, 28, 109, 39, 118, 57, 30, 16, 106, 59, 110, 14, 15, 69, 24, 72, 74, 30, 71, 35, 46, 105, 37, 11, 70, 123, 19, 76, 76]",
"7",
"[12, 90, 23, 84, 28, 2, 88, 78, 105, 92, 28, 97, 33, 76, 97, 39, 18, 41, 75, 101, 22, 90, 100, 125, 51, 61, 29, 1, 126, 62, 50, 49]",
"108",
"[3, 3, 3, 13, 100, 35, 19, 36, 74, 18, 114, 8, 27, 20, 73, 53, 0, 97, 46, 63, 17, 30, 67, 1, 41, 78, 25, 76, 27, 8, 83, 96]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[36, 59, 37, 117, 46, 2, 77, 115, 25, 119, 37, 15, 8, 58, 123, 6, 118, 48, 78, 69, 98, 86, 9, 36, 44, 24, 101, 122, 110, 58, 8, 125]",
"28",
"[39, 53, 115, 109, 17, 30, 12, 102, 7, 3, 124, 45, 6, 93, 84, 56, 117, 42, 54, 59, 34, 103, 79, 89, 115, 1, 27, 47, 76, 122, 39, 38]",
"86",
"[28, 115, 77, 29, 31, 85, 52, 55, 85, 26, 82, 118, 125, 99, 7, 19, 37, 41, 90, 112, 97, 115, 9, 57, 23, 11, 81, 118, 53, 20, 97, 29]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[49, 93, 20, 69, 124, 86, 72, 98, 66, 124, 48, 93, 17, 51, 72, 0, 99, 122, 61, 103, 106, 63, 97, 73, 118, 43, 62, 65, 10, 1, 29, 101]",
"123",
"[63, 104, 80, 58, 54, 29, 33, 68, 27, 124, 5, 85, 54, 67, 126, 2, 20, 6, 94, 121, 1, 65, 23, 8, 95, 125, 8, 74, 109, 79, 80, 54]",
"29",
"[61, 54, 110, 114, 32, 26, 23, 65, 104, 80, 0, 45, 70, 105, 73, 42, 4, 106, 106, 103, 118, 4, 9, 87, 88, 110, 39, 99, 85, 90, 33, 71]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[68, 125, 108, 114, 71, 47, 19, 0, 19, 36, 57, 6, 72, 11, 15, 55, 124, 20, 47, 102, 0, 60, 68, 23, 109, 79, 17, 39, 96, 100, 19, 53]",
"88",
"[17, 11, 3, 23, 52, 22, 41, 33, 91, 112, 91, 11, 107, 91, 76, 122, 59, 54, 69, 99, 5, 21, 42, 62, 8, 32, 42, 121, 23, 24, 84, 67]",
"59",
"[20, 100, 71, 38, 85, 37, 98, 25, 68, 20, 37, 51, 72, 111, 120, 72, 95, 81, 120, 31, 92, 22, 2, 55, 46, 18, 94, 31, 120, 85, 14, 17]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
},
{
"value": [
"[113, 20, 1, 10, 121, 57, 92, 79, 55, 49, 17, 78, 8, 32, 42, 46, 27, 22, 70, 40, 55, 81, 54, 92, 120, 57, 119, 14, 12, 36, 2, 28]",
"38",
"[80, 18, 92, 21, 45, 3, 98, 61, 26, 91, 57, 38, 67, 1, 122, 120, 92, 24, 32, 112, 126, 99, 102, 89, 14, 16, 3, 94, 65, 92, 103, 114]",
"27",
"[43, 5, 88, 48, 124, 68, 47, 42, 113, 99, 32, 58, 53, 105, 43, 8, 34, 121, 44, 106, 9, 21, 83, 30, 82, 99, 4, 97, 73, 35, 52, 2]"
],
"var": [
"a",
"sizeA",
"b",
"sizeB",
"resultSize"
]
}
],
"output": [
{
"value": [
"[51, 2, 6, 32, 76, 97, 116, 94, 107, 83, 25, 73, 106, 7, 82, 114, 63, 63, 61, 0, 35, 4, 17, 21, 125, 37, 46, 35, 37, 30, 72, 87]",
"[84, 110, 3, 107, 59, 111, 50, 120, 93, 65, 115, 19, 12, 10, 122, 99, 79, 13, 21, 67, 99, 12, 17, 61, 49, 86, 97, 18, 49, 65, 70, 55]",
"[62, 91, 47, 55, 38, 74, 37, 6, 98, 47, 20, 37, 26, 102, 117, 48, 52, 102, 0, 96, 111, 1, 18, 65, 94, 118, 105, 54, 19, 30, 108, 6]",
"[51, 2, 6, 32, 76, 97, 116, 94, 107, 83, 25, 73, 106, 7, 82, 114, 63, 63, 61, 0, 35, 4, 17, 21, 125, 37, 46, 35, 37, 30, 72, 87]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[4, 76, 113, 7, 17, 30, 16, 93, 26, 110, 69, 85, 75, 106, 118, 92, 59, 120, 110, 68, 59, 42, 65, 74, 22, 102, 10, 16, 6, 3, 79, 44]",
"[40, 66, 58, 77, 69, 21, 62, 32, 100, 109, 79, 83, 18, 89, 39, 103, 100, 45, 18, 2, 8, 80, 25, 48, 110, 9, 26, 19, 66, 110, 20, 34]",
"[0, 34, 54, 122, 31, 92, 99, 116, 31, 21, 73, 29, 115, 111, 93, 59, 52, 13, 2, 19, 67, 25, 50, 66, 106, 74, 2, 122, 95, 43, 81, 124]",
"[4, 76, 113, 7, 17, 30, 16, 93, 26, 110, 69, 85, 75, 106, 118, 92, 59, 120, 110, 68, 59, 42, 65, 74, 22, 102, 10, 16, 6, 3, 79, 44]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[72, 59, 87, 103, 88, 55, 126, 118, 126, 30, 12, 2, 71, 66, 125, 92, 3, 28, 2, 63, 125, 89, 126, 68, 18, 14, 81, 80, 49, 43, 64, 40]",
"[43, 114, 73, 35, 75, 31, 94, 102, 47, 67, 64, 95, 108, 110, 97, 11, 51, 72, 32, 0, 43, 46, 85, 91, 52, 39, 0, 116, 72, 2, 27, 80]",
"[76, 90, 8, 30, 40, 107, 78, 58, 22, 82, 71, 96, 39, 27, 66, 33, 96, 55, 71, 111, 11, 9, 62, 14, 72, 31, 9, 25, 122, 47, 69, 5]",
"[72, 59, 87, 103, 88, 55, 126, 118, 126, 30, 12, 2, 71, 66, 125, 92, 3, 28, 2, 63, 125, 89, 126, 68, 18, 14, 81, 80, 49, 43, 64, 40]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[24, 82, 45, 19, 47, 79, 90, 43, 47, 115, 69, 111, 34, 19, 53, 41, 110, 45, 79, 16, 3, 111, 79, 75, 77, 54, 37, 107, 16, 32, 57, 31]",
"[14, 9, 4, 8, 121, 51, 47, 23, 96, 122, 68, 90, 116, 54, 56, 48, 38, 33, 13, 63, 18, 20, 96, 116, 84, 11, 73, 120, 39, 88, 91, 16]",
"[98, 21, 116, 81, 66, 8, 19, 76, 84, 103, 93, 11, 101, 120, 86, 41, 107, 55, 53, 83, 115, 29, 104, 21, 85, 112, 38, 18, 20, 54, 45, 97]",
"[24, 82, 45, 19, 47, 79, 90, 43, 47, 115, 69, 111, 34, 19, 53, 41, 110, 45, 79, 16, 3, 111, 79, 75, 77, 54, 37, 107, 16, 32, 57, 31]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[20, 98, 57, 41, 13, 64, 61, 0, 74, 104, 50, 114, 92, 70, 81, 38, 121, 43, 69, 79, 75, 115, 82, 56, 88, 39, 105, 107, 61, 79, 9, 93]",
"[56, 53, 22, 100, 14, 59, 71, 59, 79, 49, 89, 124, 20, 55, 15, 106, 89, 21, 122, 0, 63, 20, 111, 116, 36, 45, 52, 14, 69, 77, 40, 44]",
"[24, 69, 85, 10, 110, 44, 95, 102, 24, 72, 2, 20, 78, 62, 21, 8, 106, 59, 28, 10, 66, 92, 78, 122, 75, 0, 80, 10, 121, 101, 67, 81]",
"[20, 98, 57, 41, 13, 64, 61, 0, 74, 104, 50, 114, 92, 70, 81, 38, 121, 43, 69, 79, 75, 115, 82, 56, 88, 39, 105, 107, 61, 79, 9, 93]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[120, 104, 51, 108, 28, 109, 39, 118, 57, 30, 16, 106, 59, 110, 14, 15, 69, 24, 72, 74, 30, 71, 35, 46, 105, 37, 11, 70, 123, 19, 76, 76]",
"[12, 90, 23, 84, 28, 2, 88, 78, 105, 92, 28, 97, 33, 76, 97, 39, 18, 41, 75, 101, 22, 90, 100, 125, 51, 61, 29, 1, 126, 62, 50, 49]",
"[3, 3, 3, 13, 100, 35, 19, 36, 74, 18, 114, 8, 27, 20, 73, 53, 0, 97, 46, 63, 17, 30, 67, 1, 41, 78, 25, 76, 27, 8, 83, 96]",
"[120, 104, 51, 108, 28, 109, 39, 118, 57, 30, 16, 106, 59, 110, 14, 15, 69, 24, 72, 74, 30, 71, 35, 46, 105, 37, 11, 70, 123, 19, 76, 76]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[36, 59, 37, 117, 46, 2, 77, 115, 25, 119, 37, 15, 8, 58, 123, 6, 118, 48, 78, 69, 98, 86, 9, 36, 44, 24, 101, 122, 110, 58, 8, 125]",
"[39, 53, 115, 109, 17, 30, 12, 102, 7, 3, 124, 45, 6, 93, 84, 56, 117, 42, 54, 59, 34, 103, 79, 89, 115, 1, 27, 47, 76, 122, 39, 38]",
"[28, 115, 77, 29, 31, 85, 52, 55, 85, 26, 82, 118, 125, 99, 7, 19, 37, 41, 90, 112, 97, 115, 9, 57, 23, 11, 81, 118, 53, 20, 97, 29]",
"[36, 59, 37, 117, 46, 2, 77, 115, 25, 119, 37, 15, 8, 58, 123, 6, 118, 48, 78, 69, 98, 86, 9, 36, 44, 24, 101, 122, 110, 58, 8, 125]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[49, 93, 20, 69, 124, 86, 72, 98, 66, 124, 48, 93, 17, 51, 72, 0, 99, 122, 61, 103, 106, 63, 97, 73, 118, 43, 62, 65, 10, 1, 29, 101]",
"[63, 104, 80, 58, 54, 29, 33, 68, 27, 124, 5, 85, 54, 67, 126, 2, 20, 6, 94, 121, 1, 65, 23, 8, 95, 125, 8, 74, 109, 79, 80, 54]",
"[61, 54, 110, 114, 32, 26, 23, 65, 104, 80, 0, 45, 70, 105, 73, 42, 4, 106, 106, 103, 118, 4, 9, 87, 88, 110, 39, 99, 85, 90, 33, 71]",
"[49, 93, 20, 69, 124, 86, 72, 98, 66, 124, 48, 93, 17, 51, 72, 0, 99, 122, 61, 103, 106, 63, 97, 73, 118, 43, 62, 65, 10, 1, 29, 101]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[68, 125, 108, 114, 71, 47, 19, 0, 19, 36, 57, 6, 72, 11, 15, 55, 124, 20, 47, 102, 0, 60, 68, 23, 109, 79, 17, 39, 96, 100, 19, 53]",
"[17, 11, 3, 23, 52, 22, 41, 33, 91, 112, 91, 11, 107, 91, 76, 122, 59, 54, 69, 99, 5, 21, 42, 62, 8, 32, 42, 121, 23, 24, 84, 67]",
"[20, 100, 71, 38, 85, 37, 98, 25, 68, 20, 37, 51, 72, 111, 120, 72, 95, 81, 120, 31, 92, 22, 2, 55, 46, 18, 94, 31, 120, 85, 14, 17]",
"[68, 125, 108, 114, 71, 47, 19, 0, 19, 36, 57, 6, 72, 11, 15, 55, 124, 20, 47, 102, 0, 60, 68, 23, 109, 79, 17, 39, 96, 100, 19, 53]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
},
{
"value": [
"[113, 20, 1, 10, 121, 57, 92, 79, 55, 49, 17, 78, 8, 32, 42, 46, 27, 22, 70, 40, 55, 81, 54, 92, 120, 57, 119, 14, 12, 36, 2, 28]",
"[80, 18, 92, 21, 45, 3, 98, 61, 26, 91, 57, 38, 67, 1, 122, 120, 92, 24, 32, 112, 126, 99, 102, 89, 14, 16, 3, 94, 65, 92, 103, 114]",
"[43, 5, 88, 48, 124, 68, 47, 42, 113, 99, 32, 58, 53, 105, 43, 8, 34, 121, 44, 106, 9, 21, 83, 30, 82, 99, 4, 97, 73, 35, 52, 2]",
"[113, 20, 1, 10, 121, 57, 92, 79, 55, 49, 17, 78, 8, 32, 42, 46, 27, 22, 70, 40, 55, 81, 54, 92, 120, 57, 119, 14, 12, 36, 2, 28]"
],
"var": [
"a",
"b",
"resultSize",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_61o37fvp_i.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 sizeA, int* b, int sizeB, int* resultSize, int* returnv) {
json output_json;
std::vector<json> output_temp_4;
for (unsigned int i5 = 0; i5 < 32; i5++) {
int output_temp_6 = a[i5];
output_temp_4.push_back(output_temp_6);
}
output_json["a"] = output_temp_4;
std::vector<json> output_temp_7;
for (unsigned int i8 = 0; i8 < 32; i8++) {
int output_temp_9 = b[i8];
output_temp_7.push_back(output_temp_9);
}
output_json["b"] = output_temp_7;
std::vector<json> output_temp_10;
for (unsigned int i11 = 0; i11 < 32; i11++) {
int output_temp_12 = resultSize[i11];
output_temp_10.push_back(output_temp_12);
}
output_json["resultSize"] = output_temp_10;
std::vector<json> output_temp_13;
for (unsigned int i14 = 0; i14 < 32; i14++) {
int output_temp_15 = returnv[i14];
output_temp_13.push_back(output_temp_15);
}
output_json["returnv"] = output_temp_13;
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];
int sizeA = input_json["sizeA"];
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];
int sizeB = input_json["sizeB"];
std::vector<int> input_temp_3_vec;
for (auto& elem : input_json["resultSize"]) {
int input_temp_3_inner = elem;
input_temp_3_vec.push_back(input_temp_3_inner);
}
int* resultSize = &input_temp_3_vec[0];
clock_t begin = clock();
int* returnv = sub(a, sizeA, b, sizeB, resultSize);
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, sizeA, b, sizeB, resultSize, returnv);
}
|
master
|
null
|
{"livein": ["a", "sizeA", "b", "sizeB", "resultSize"], "liveout": ["a", "b", "resultSize"], "returnvarname": ["returnv"], "execcmd": "", "funname": "sub", "funargs": ["a", "sizeA", "b", "sizeB", "resultSize"], "typemap": {"a": "array(int32#32)", "sizeA": "int32", "b": "array(int32#32)", "sizeB": "int32", "resultSize": "array(int32#32)", "returnv": "array(int32#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61o37fvp_i.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Lydux/gcc-4.6.2-human68k/build_dir/toolchain-mips_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.12/gcc/testsuite/gcc.target/arm/wmul-2.c
|
void vec_mpy(int y[], const short x[], short scaler)
{
int i;
for (i = 0; i < 150; i++)
y[i] += ((scaler * x[i]) >> 31);
}
|
void vec_mpy(int *y, const short *x, shortscaler)
|
void vec_mpy(int y[], const short x[], short scaler)
|
vec_mpy
|
[
"void",
"int *",
"const short *",
"short"
] |
{
"code": [
".globl vec_mpy\n.type vec_mpy, @function\nvec_mpy:\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%edx, %eax\n\tmovw\t%ax, -36(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L3:\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\tmovswl\t-36(%rbp), %ecx\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t(%rax,%rax), %rsi\n\tmovq\t-32(%rbp), %rax\n\taddq\t%rsi, %rax\n\tmovzwl\t(%rax), %eax\n\tcwtl\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\tmovl\t%eax, %ecx\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rsi\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rsi, %rax\n\taddl\t%ecx, %edx\n\tmovl\t%edx, (%rax)\n\taddl\t$1, -4(%rbp)\n.L2:\n\tcmpl\t$149, -4(%rbp)\n\tjle\t.L3\n\tnop\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl vec_mpy\n.type vec_mpy, @function\nvec_mpy:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tmovswl\t%dx, %edx\n.L2:\n\tmovswl\t(%rsi,%rax,2), %ecx\n\timull\t%edx, %ecx\n\tsarl\t$31, %ecx\n\taddl\t%ecx, (%rdi,%rax,4)\n\tincq\t%rax\n\tcmpq\t$150, %rax\n\tjne\t.L2\n\tret\n\t.cfi_endproc\n\n",
".globl vec_mpy\n.type vec_mpy, @function\nvec_mpy:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovd\t%edx, %xmm3\n\tmovswl\t%dx, %ecx\n\txorl\t%eax, %eax\n\tpunpcklwd\t%xmm3, %xmm3\n\tpshufd\t$0, %xmm3, %xmm3\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovdqu\t(%rsi,%rax), %xmm0\n\tmovdqu\t(%rsi,%rax), %xmm2\n\tmovdqu\t16(%rdi,%rax,2), %xmm4\n\tmovdqu\t(%rdi,%rax,2), %xmm5\n\tpmullw\t%xmm3, %xmm0\n\tpmulhw\t%xmm3, %xmm2\n\tmovdqa\t%xmm0, %xmm1\n\tpunpcklwd\t%xmm2, %xmm0\n\tpunpckhwd\t%xmm2, %xmm1\n\tpsrad\t$31, %xmm0\n\tpsrad\t$31, %xmm1\n\tpaddd\t%xmm5, %xmm0\n\tpaddd\t%xmm4, %xmm1\n\tmovups\t%xmm0, (%rdi,%rax,2)\n\tmovups\t%xmm1, 16(%rdi,%rax,2)\n\taddq\t$16, %rax\n\tcmpq\t$288, %rax\n\tjne\t.L2\n\tmovswl\t288(%rsi), %eax\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\taddl\t%eax, 576(%rdi)\n\tmovswl\t290(%rsi), %eax\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\taddl\t%eax, 580(%rdi)\n\tmovswl\t292(%rsi), %eax\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\taddl\t%eax, 584(%rdi)\n\tmovswl\t294(%rsi), %eax\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\taddl\t%eax, 588(%rdi)\n\tmovswl\t296(%rsi), %eax\n\timull\t%ecx, %eax\n\tsarl\t$31, %eax\n\taddl\t%eax, 592(%rdi)\n\tmovswl\t298(%rsi), %eax\n\timull\t%eax, %ecx\n\tsarl\t$31, %ecx\n\taddl\t%ecx, 596(%rdi)\n\tret\n\t.cfi_endproc\n\n",
".global vec_mpy\n.type vec_mpy, %function\nvec_mpy:\n.LFB0:\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\tstrh\tw2, [sp, 14]\n\tstr\twzr, [sp, 44]\n\tb\t.L2\n.L3:\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\tw2, [x0]\n\tldrsh\tw0, [sp, 14]\n\tldrsw\tx1, [sp, 44]\n\tlsl\tx1, x1, 1\n\tldr\tx3, [sp, 16]\n\tadd\tx1, x3, x1\n\tldrsh\tw1, [x1]\n\tmul\tw0, w0, w1\n\tasr\tw1, w0, 31\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tldr\tx3, [sp, 24]\n\tadd\tx0, x3, x0\n\tadd\tw1, w2, w1\n\tstr\tw1, [x0]\n\tldr\tw0, [sp, 44]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw0, [sp, 44]\n\tcmp\tw0, 149\n\tble\t.L3\n\tnop\n\tnop\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global vec_mpy\n.type vec_mpy, %function\nvec_mpy:\n.LFB0:\n\t.cfi_startproc\n\tsxth\tw2, w2\n\tmov\tx3, 0\n.L2:\n\tldrsh\tw4, [x1, x3, lsl 1]\n\tldr\tw5, [x0, x3, lsl 2]\n\tmul\tw4, w4, w2\n\tadd\tw4, w5, w4, asr 31\n\tstr\tw4, [x0, x3, lsl 2]\n\tadd\tx3, x3, 1\n\tcmp\tx3, 150\n\tbne\t.L2\n\tret\n\t.cfi_endproc\n\n",
".global vec_mpy\n.type vec_mpy, %function\nvec_mpy:\n.LFB0:\n\t.cfi_startproc\n\tdup\tv2.8h, w2\n\tmov\tx3, x0\n\tmov\tx4, x1\n\tadd\tx5, x0, 576\n\tsxth\tw2, w2\n\t.p2align 3,,7\n.L2:\n\tldr\tq0, [x4], 16\n\tldp\tq3, q4, [x3]\n\tsmull2\tv1.4s, v0.8h, v2.8h\n\tsmull\tv0.4s, v0.4h, v2.4h\n\tsshr\tv1.4s, v1.4s, 31\n\tsshr\tv0.4s, v0.4s, 31\n\tadd\tv1.4s, v1.4s, v4.4s\n\tadd\tv0.4s, v0.4s, v3.4s\n\tstp\tq0, q1, [x3]\n\tadd\tx3, x3, 32\n\tcmp\tx5, x3\n\tbne\t.L2\n\tldrsh\tw7, [x1, 288]\n\tldrsh\tw6, [x1, 290]\n\tldrsh\tw5, [x1, 292]\n\tldrsh\tw4, [x1, 294]\n\tldrsh\tw3, [x1, 296]\n\tmul\tw7, w7, w2\n\tldrsh\tw1, [x1, 298]\n\tmul\tw6, w6, w2\n\tmul\tw5, w5, w2\n\tldr\tw8, [x0, 592]\n\tmul\tw4, w4, w2\n\tmul\tw3, w3, w2\n\tmul\tw1, w1, w2\n\tadd\tx2, x0, 584\n\tadd\tw3, w8, w3, asr 31\n\tadd\tx8, x0, 584\n\tldp\tw12, w11, [x2, -8]\n\tldp\tw10, w9, [x2]\n\tldr\tw2, [x0, 596]\n\tadd\tw7, w12, w7, asr 31\n\tadd\tw6, w11, w6, asr 31\n\tstp\tw7, w6, [x8, -8]\n\tadd\tw5, w10, w5, asr 31\n\tadd\tw4, w9, w4, asr 31\n\tstp\tw5, w4, [x8]\n\tadd\tw1, w2, w1, asr 31\n\tstr\tw3, [x0, 592]\n\tstr\tw1, [x0, 596]\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, 72, 88, 91, 123, 65, 31, 88, 87, 36, 81, 24, 20, 17, 64, 83, 88, 33, 33, 122, 86, 11, 115, 14, 12, 96, 114, 11, 96, 54, 102, 6]",
"[118, 70, 94, 52, 74, 53, 66, 85, 23, 23, 124, 16, 90, 37, 20, 74, 124, 87, 51, 11, 105, 42, 115, 51, 27, 80, 92, 66, 106, 1, 84, 50]",
"101"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[101, 70, 40, 114, 32, 44, 112, 51, 75, 87, 115, 80, 70, 56, 56, 49, 75, 27, 61, 21, 39, 4, 19, 126, 28, 78, 101, 27, 83, 58, 57, 10]",
"[119, 115, 118, 53, 122, 5, 18, 36, 76, 16, 65, 80, 32, 120, 13, 1, 98, 106, 26, 13, 99, 40, 69, 11, 16, 2, 27, 97, 91, 35, 61, 74]",
"64"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[22, 0, 99, 21, 114, 40, 77, 69, 34, 91, 83, 119, 65, 119, 77, 63, 40, 1, 24, 56, 95, 71, 121, 121, 101, 51, 17, 66, 64, 125, 124, 28]",
"[40, 22, 82, 69, 52, 77, 31, 6, 112, 90, 51, 120, 126, 55, 32, 34, 109, 19, 106, 94, 97, 122, 90, 102, 68, 0, 71, 40, 50, 70, 89, 56]",
"117"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[10, 122, 21, 123, 0, 73, 59, 65, 84, 99, 38, 60, 117, 125, 83, 41, 95, 71, 123, 30, 25, 20, 122, 113, 102, 116, 117, 113, 112, 103, 93, 105]",
"[21, 123, 125, 70, 108, 42, 41, 125, 1, 117, 50, 66, 71, 115, 45, 14, 100, 92, 45, 13, 57, 69, 18, 113, 111, 7, 94, 126, 52, 2, 44, 121]",
"112"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[88, 118, 102, 17, 79, 84, 13, 64, 87, 96, 53, 98, 64, 24, 62, 59, 125, 122, 31, 6, 49, 118, 72, 125, 104, 20, 58, 7, 15, 76, 97, 99]",
"[115, 72, 102, 18, 81, 111, 60, 15, 55, 76, 52, 103, 124, 70, 39, 119, 92, 39, 22, 77, 107, 79, 85, 49, 6, 45, 14, 87, 27, 122, 40, 72]",
"33"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[103, 73, 64, 14, 60, 33, 10, 31, 33, 104, 83, 103, 51, 33, 63, 30, 31, 40, 118, 94, 93, 75, 109, 34, 42, 31, 68, 92, 74, 87, 39, 96]",
"[108, 9, 121, 20, 36, 102, 26, 48, 107, 19, 109, 121, 81, 51, 106, 100, 3, 40, 76, 23, 69, 39, 123, 18, 104, 119, 106, 122, 5, 50, 6, 29]",
"103"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[68, 67, 17, 1, 99, 102, 38, 2, 39, 33, 41, 109, 113, 6, 83, 118, 69, 16, 2, 26, 108, 10, 62, 70, 59, 33, 56, 110, 91, 16, 52, 105]",
"[38, 75, 56, 82, 73, 4, 94, 32, 59, 120, 43, 94, 103, 86, 115, 98, 124, 5, 0, 47, 22, 71, 41, 112, 95, 73, 102, 76, 116, 75, 106, 70]",
"93"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[99, 111, 31, 18, 54, 78, 82, 25, 95, 70, 5, 30, 84, 85, 55, 106, 104, 117, 78, 104, 13, 4, 11, 36, 13, 17, 40, 90, 83, 30, 116, 26]",
"[66, 7, 75, 42, 84, 42, 44, 121, 85, 20, 86, 66, 35, 4, 103, 95, 92, 114, 39, 77, 36, 125, 96, 111, 125, 58, 108, 5, 115, 49, 40, 34]",
"94"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[6, 65, 59, 32, 1, 51, 19, 93, 126, 33, 97, 5, 35, 120, 43, 89, 115, 48, 5, 77, 87, 40, 83, 120, 55, 95, 81, 97, 34, 17, 86, 80]",
"[8, 14, 21, 117, 126, 25, 29, 21, 78, 84, 91, 119, 55, 118, 10, 84, 12, 29, 13, 15, 53, 101, 65, 60, 6, 10, 121, 47, 54, 92, 34, 3]",
"59"
],
"var": [
"y",
"x",
"scaler"
]
},
{
"value": [
"[103, 125, 56, 58, 84, 101, 40, 35, 7, 82, 66, 3, 36, 4, 104, 55, 6, 27, 52, 78, 124, 22, 119, 125, 4, 43, 69, 50, 62, 112, 19, 91]",
"[42, 126, 89, 74, 5, 27, 6, 103, 121, 76, 94, 85, 95, 120, 69, 6, 58, 28, 49, 10, 82, 78, 64, 95, 49, 114, 106, 22, 68, 65, 15, 22]",
"91"
],
"var": [
"y",
"x",
"scaler"
]
}
],
"output": [
{
"value": [
"[118, 70, 94, 52, 74, 53, 66, 85, 23, 23, 124, 16, 90, 37, 20, 74, 124, 87, 51, 11, 105, 42, 115, 51, 27, 80, 92, 66, 106, 1, 84, 50]",
"[39, 72, 88, 91, 123, 65, 31, 88, 87, 36, 81, 24, 20, 17, 64, 83, 88, 33, 33, 122, 86, 11, 115, 14, 12, 96, 114, 11, 96, 54, 102, 6]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[119, 115, 118, 53, 122, 5, 18, 36, 76, 16, 65, 80, 32, 120, 13, 1, 98, 106, 26, 13, 99, 40, 69, 11, 16, 2, 27, 97, 91, 35, 61, 74]",
"[101, 70, 40, 114, 32, 44, 112, 51, 75, 87, 115, 80, 70, 56, 56, 49, 75, 27, 61, 21, 39, 4, 19, 126, 28, 78, 101, 27, 83, 58, 57, 10]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[40, 22, 82, 69, 52, 77, 31, 6, 112, 90, 51, 120, 126, 55, 32, 34, 109, 19, 106, 94, 97, 122, 90, 102, 68, 0, 71, 40, 50, 70, 89, 56]",
"[22, 0, 99, 21, 114, 40, 77, 69, 34, 91, 83, 119, 65, 119, 77, 63, 40, 1, 24, 56, 95, 71, 121, 121, 101, 51, 17, 66, 64, 125, 124, 28]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[21, 123, 125, 70, 108, 42, 41, 125, 1, 117, 50, 66, 71, 115, 45, 14, 100, 92, 45, 13, 57, 69, 18, 113, 111, 7, 94, 126, 52, 2, 44, 121]",
"[10, 122, 21, 123, 0, 73, 59, 65, 84, 99, 38, 60, 117, 125, 83, 41, 95, 71, 123, 30, 25, 20, 122, 113, 102, 116, 117, 113, 112, 103, 93, 105]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[115, 72, 102, 18, 81, 111, 60, 15, 55, 76, 52, 103, 124, 70, 39, 119, 92, 39, 22, 77, 107, 79, 85, 49, 6, 45, 14, 87, 27, 122, 40, 72]",
"[88, 118, 102, 17, 79, 84, 13, 64, 87, 96, 53, 98, 64, 24, 62, 59, 125, 122, 31, 6, 49, 118, 72, 125, 104, 20, 58, 7, 15, 76, 97, 99]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[108, 9, 121, 20, 36, 102, 26, 48, 107, 19, 109, 121, 81, 51, 106, 100, 3, 40, 76, 23, 69, 39, 123, 18, 104, 119, 106, 122, 5, 50, 6, 29]",
"[103, 73, 64, 14, 60, 33, 10, 31, 33, 104, 83, 103, 51, 33, 63, 30, 31, 40, 118, 94, 93, 75, 109, 34, 42, 31, 68, 92, 74, 87, 39, 96]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[38, 75, 56, 82, 73, 4, 94, 32, 59, 120, 43, 94, 103, 86, 115, 98, 124, 5, 0, 47, 22, 71, 41, 112, 95, 73, 102, 76, 116, 75, 106, 70]",
"[68, 67, 17, 1, 99, 102, 38, 2, 39, 33, 41, 109, 113, 6, 83, 118, 69, 16, 2, 26, 108, 10, 62, 70, 59, 33, 56, 110, 91, 16, 52, 105]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[66, 7, 75, 42, 84, 42, 44, 121, 85, 20, 86, 66, 35, 4, 103, 95, 92, 114, 39, 77, 36, 125, 96, 111, 125, 58, 108, 5, 115, 49, 40, 34]",
"[99, 111, 31, 18, 54, 78, 82, 25, 95, 70, 5, 30, 84, 85, 55, 106, 104, 117, 78, 104, 13, 4, 11, 36, 13, 17, 40, 90, 83, 30, 116, 26]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[8, 14, 21, 117, 126, 25, 29, 21, 78, 84, 91, 119, 55, 118, 10, 84, 12, 29, 13, 15, 53, 101, 65, 60, 6, 10, 121, 47, 54, 92, 34, 3]",
"[6, 65, 59, 32, 1, 51, 19, 93, 126, 33, 97, 5, 35, 120, 43, 89, 115, 48, 5, 77, 87, 40, 83, 120, 55, 95, 81, 97, 34, 17, 86, 80]"
],
"var": [
"x",
"y"
]
},
{
"value": [
"[42, 126, 89, 74, 5, 27, 6, 103, 121, 76, 94, 85, 95, 120, 69, 6, 58, 28, 49, 10, 82, 78, 64, 95, 49, 114, 106, 22, 68, 65, 15, 22]",
"[103, 125, 56, 58, 84, 101, 40, 35, 7, 82, 66, 3, 36, 4, 104, 55, 6, 27, 52, 78, 124, 22, 119, 125, 4, 43, 69, 50, 62, 112, 19, 91]"
],
"var": [
"x",
"y"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_58oaf_3veu.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* y, short* x, short scaler) {
json output_json;
std::vector<json> output_temp_3;
for (unsigned int i4 = 0; i4 < 32; i4++) {
int output_temp_5 = y[i4];
output_temp_3.push_back(output_temp_5);
}
output_json["y"] = output_temp_3;
std::vector<json> output_temp_6;
for (unsigned int i7 = 0; i7 < 32; i7++) {
short output_temp_8 = x[i7];
output_temp_6.push_back(output_temp_8);
}
output_json["x"] = 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["y"]) {
int input_temp_1_inner = elem;
input_temp_1_vec.push_back(input_temp_1_inner);
}
int* y = &input_temp_1_vec[0];
std::vector<short> input_temp_2_vec;
for (auto& elem : input_json["x"]) {
short input_temp_2_inner = elem;
input_temp_2_vec.push_back(input_temp_2_inner);
}
short* x = &input_temp_2_vec[0];
short scaler = input_json["scaler"];
clock_t begin = clock();
vec_mpy(y, x, scaler);
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(y, x, scaler);
}
|
ar9344
|
null
|
{"livein": ["y", "x", "scaler"], "liveout": ["y", "x"], "returnvarname": [], "execcmd": "", "funname": "vec_mpy", "funargs": ["y", "x", "scaler"], "typemap": {"y": "array(int32#32)", "x": "array(int16#32)", "scaler": "int16"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58oaf_3veu.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
bairyn/opencurry/src/bits.c
|
int sign_int(int num)
{
return (( ((((num))) <= (((0)))) ? ( ((((num))) < (((0)))) ? ((-1)) : ((0)) ) : ((1)) ));
}
|
int sign_int(intnum)
|
int sign_int(int num)
|
sign_int
|
[
"int",
"int"
] |
{
"code": [
".globl sign_int\n.type sign_int, @function\nsign_int:\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\tjg\t.L2\n\tcmpl\t$0, -4(%rbp)\n\tjns\t.L3\n\tmovl\t$-1, %eax\n\tjmp\t.L6\n.L3:\n\tmovl\t$0, %eax\n\tjmp\t.L6\n.L2:\n\tmovl\t$1, %eax\n.L6:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl sign_int\n.type sign_int, @function\nsign_int:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestl\t%edi, %edi\n\tjg\t.L1\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n\tnegl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl sign_int\n.type sign_int, @function\nsign_int:\n.LFB0:\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\tnegl\t%eax\n\ttestl\t%edi, %edi\n\tcmovg\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".global sign_int\n.type sign_int, %function\nsign_int:\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\tbgt\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbge\t.L3\n\tmov\tw0, -1\n\tb\t.L6\n.L3:\n\tmov\tw0, 0\n\tb\t.L6\n.L2:\n\tmov\tw0, 1\n.L6:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global sign_int\n.type sign_int, %function\nsign_int:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsetm\tw1, ne\n\tcsinc\tw0, w1, wzr, le\n\tret\n\t.cfi_endproc\n\n",
".global sign_int\n.type sign_int, %function\nsign_int:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tmov\tw2, 1\n\tcsetm\tw1, ne\n\tcsel\tw0, w1, w2, 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": [
"40"
],
"var": [
"num"
]
},
{
"value": [
"89"
],
"var": [
"num"
]
},
{
"value": [
"43"
],
"var": [
"num"
]
},
{
"value": [
"44"
],
"var": [
"num"
]
},
{
"value": [
"77"
],
"var": [
"num"
]
},
{
"value": [
"117"
],
"var": [
"num"
]
},
{
"value": [
"30"
],
"var": [
"num"
]
},
{
"value": [
"69"
],
"var": [
"num"
]
},
{
"value": [
"93"
],
"var": [
"num"
]
},
{
"value": [
"81"
],
"var": [
"num"
]
}
],
"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_50hs9llu_2.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 num, 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 num = input_json["num"];
clock_t begin = clock();
int returnv = sign_int(num);
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(num, returnv);
}
|
master
|
null
|
{"livein": ["num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sign_int", "funargs": ["num"], "typemap": {"num": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50hs9llu_2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
MasayukiNagase/samples/AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/src/bigend.c
|
int big_endian(
void)
{
union {
long l;
char c[sizeof(long)];
} u;
u.l = 1;
return (u.c[sizeof(long) - 1] == 1);
}
|
int big_endian()
|
int big_endian( void)
|
big_endian
|
[
"int",
""
] |
{
"code": [
".globl big_endian\n.type big_endian, @function\nbig_endian:\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%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovq\t$1, -16(%rbp)\n\tmovzbl\t-9(%rbp), %eax\n\tcmpb\t$1, %al\n\tsete\t%al\n\tmovzbl\t%al, %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 big_endian\n.type big_endian, @function\nbig_endian:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl big_endian\n.type big_endian, @function\nbig_endian:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global big_endian\n.type big_endian, %function\nbig_endian:\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\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 24]\n\tmov\tx1,0\n\tmov\tx0, 1\n\tstr\tx0, [sp, 16]\n\tldrb\tw0, [sp, 23]\n\tcmp\tw0, 1\n\tcset\tw0, eq\n\tand\tw0, w0, 255\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 24]\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], 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 big_endian\n.type big_endian, %function\nbig_endian:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global big_endian\n.type big_endian, %function\nbig_endian:\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_45ukzaevw0.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 = big_endian();
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);
}
|
develop
|
null
|
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "big_endian", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45ukzaevw0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
joshuaspence/ThesisCode/TopN_Outlier_Pruning_Block/FPGA/SDK/standalone_bsp_0/ps7_cortexa9_0/libsrc/standalone_v3_06_a/src/isatty.c
|
int _isatty(int fd)
{
(void)fd;
return (1);
}
|
int _isatty(intfd)
|
int _isatty(int fd)
|
_isatty
|
[
"int",
"int"
] |
{
"code": [
".globl _isatty\n.type _isatty, @function\n_isatty:\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$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl _isatty\n.type _isatty, @function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl _isatty\n.type _isatty, @function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n",
".global _isatty\n.type _isatty, %function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [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 _isatty\n.type _isatty, %function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n",
".global _isatty\n.type _isatty, %function\n_isatty:\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": [
"110"
],
"var": [
"fd"
]
},
{
"value": [
"6"
],
"var": [
"fd"
]
},
{
"value": [
"26"
],
"var": [
"fd"
]
},
{
"value": [
"54"
],
"var": [
"fd"
]
},
{
"value": [
"17"
],
"var": [
"fd"
]
},
{
"value": [
"49"
],
"var": [
"fd"
]
},
{
"value": [
"15"
],
"var": [
"fd"
]
},
{
"value": [
"110"
],
"var": [
"fd"
]
},
{
"value": [
"22"
],
"var": [
"fd"
]
},
{
"value": [
"20"
],
"var": [
"fd"
]
}
],
"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_54gqo0ij47.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 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 fd = input_json["fd"];
clock_t begin = clock();
int returnv = _isatty(fd);
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, returnv);
}
|
master
|
null
|
{"livein": ["fd"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "_isatty", "funargs": ["fd"], "typemap": {"fd": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54gqo0ij47.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jonathanunderwood/limapack/src/jkmarray.h
|
extern inline int
JKMarray_idx (const int J, const int K, const int M)
{
return (((4 * J * J + 5) * J) / 3 + 2 * J * J + K * (2 * J + 1) + M);
}
|
int JKMarray_idx(const intJ, const intK, const intM)
|
extern int JKMarray_idx (const int J, const int K, const int M)
|
JKMarray_idx
|
[
"int",
"const int",
"const int",
"const int"
] |
{
"code": [
".globl JKMarray_idx\n.type JKMarray_idx, @function\nJKMarray_idx:\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-4(%rbp), %eax\n\timull\t%eax, %eax\n\tsall\t$2, %eax\n\taddl\t$5, %eax\n\timull\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\timulq\t$1431655766, %rdx, %rdx\n\tshrq\t$32, %rdx\n\tsarl\t$31, %eax\n\tsubl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\timull\t%eax, %eax\n\taddl\t%eax, %eax\n\taddl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%eax, %eax\n\taddl\t$1, %eax\n\timull\t-8(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-12(%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 JKMarray_idx\n.type JKMarray_idx, @function\nJKMarray_idx:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %ecx\n\tmovl\t%edx, %r9d\n\tmovl\t$3, %r8d\n\tmovl\t%esi, %r10d\n\timull\t%edi, %ecx\n\tleal\t1(%rdi,%rdi), %esi\n\timull\t%r10d, %esi\n\tleal\t5(,%rcx,4), %eax\n\timull\t%edi, %eax\n\tcltd\n\tidivl\t%r8d\n\tleal\t(%rax,%rcx,2), %eax\n\taddl\t%esi, %eax\n\taddl\t%r9d, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl JKMarray_idx\n.type JKMarray_idx, @function\nJKMarray_idx:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %r8d\n\tmovl\t%edx, %r9d\n\tmovl\t%esi, %r10d\n\timull\t%edi, %r8d\n\tleal\t1(%rdi,%rdi), %esi\n\timull\t%r10d, %esi\n\tleal\t5(,%r8,4), %ecx\n\timull\t%edi, %ecx\n\tmovslq\t%ecx, %rdx\n\tsarl\t$31, %ecx\n\timulq\t$1431655766, %rdx, %rdx\n\tshrq\t$32, %rdx\n\tsubl\t%ecx, %edx\n\tleal\t(%rdx,%r8,2), %edx\n\taddl\t%esi, %edx\n\tleal\t(%rdx,%r9), %eax\n\tret\n\t.cfi_endproc\n\n",
".global JKMarray_idx\n.type JKMarray_idx, %function\nJKMarray_idx:\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\tldr\tw0, [sp, 12]\n\tmul\tw0, w0, w0\n\tlsl\tw0, w0, 2\n\tadd\tw1, w0, 5\n\tldr\tw0, [sp, 12]\n\tmul\tw0, w1, w0\n\tmov\tw1, 21846\n\tmovk\tw1, 0x5555, lsl 16\n\tsmull\tx1, w0, w1\n\tlsr\tx1, x1, 32\n\tasr\tw0, w0, 31\n\tsub\tw1, w1, w0\n\tldr\tw0, [sp, 12]\n\tmul\tw0, w0, w0\n\tlsl\tw0, w0, 1\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 12]\n\tlsl\tw0, w0, 1\n\tadd\tw2, w0, 1\n\tldr\tw0, [sp, 8]\n\tmul\tw0, w2, w0\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 4]\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 JKMarray_idx\n.type JKMarray_idx, %function\nJKMarray_idx:\n.LFB0:\n\t.cfi_startproc\n\tmul\tw4, w0, w0\n\tmov\tw5, 3\n\tlsl\tw3, w4, 2\n\tadd\tw3, w3, 5\n\tmul\tw3, w3, w0\n\tlsl\tw0, w0, 1\n\tmadd\tw0, w0, w1, w1\n\tsdiv\tw3, w3, w5\n\tadd\tw3, w3, w4, lsl 1\n\tadd\tw0, w3, w0\n\tadd\tw0, w0, w2\n\tret\n\t.cfi_endproc\n\n",
".global JKMarray_idx\n.type JKMarray_idx, %function\nJKMarray_idx:\n.LFB0:\n\t.cfi_startproc\n\tmul\tw5, w0, w0\n\tlsl\tw3, w0, 1\n\tmov\tw6, 21846\n\tmovk\tw6, 0x5555, lsl 16\n\tlsl\tw4, w5, 2\n\tmadd\tw1, w3, w1, w1\n\tadd\tw4, w4, 5\n\tmul\tw3, w4, w0\n\tsmull\tx6, w3, w6\n\tlsr\tx6, x6, 32\n\tsub\tw3, w6, w3, asr 31\n\tadd\tw3, w3, w5, lsl 1\n\tadd\tw3, w3, w1\n\tadd\tw0, w3, w2\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": [
"92",
"35",
"120"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"117",
"76",
"92"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"72",
"1",
"33"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"111",
"48",
"35"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"1",
"69",
"27"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"103",
"57",
"3"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"14",
"124",
"57"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"53",
"50",
"47"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"0",
"78",
"86"
],
"var": [
"J",
"K",
"M"
]
},
{
"value": [
"107",
"47",
"68"
],
"var": [
"J",
"K",
"M"
]
}
],
"output": [
{
"value": [
"1061927"
],
"var": [
"returnv"
]
},
{
"value": [
"2181009"
],
"var": [
"returnv"
]
},
{
"value": [
"508330"
],
"var": [
"returnv"
]
},
{
"value": [
"1859074"
],
"var": [
"returnv"
]
},
{
"value": [
"239"
],
"var": [
"returnv"
]
},
{
"value": [
"1490161"
],
"var": [
"returnv"
]
},
{
"value": [
"7727"
],
"var": [
"returnv"
]
},
{
"value": [
"209606"
],
"var": [
"returnv"
]
},
{
"value": [
"164"
],
"var": [
"returnv"
]
},
{
"value": [
"1666640"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_475jedd62m.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 J, int K, 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 J = input_json["J"];
int K = input_json["K"];
int M = input_json["M"];
clock_t begin = clock();
int returnv = JKMarray_idx(J, K, 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(J, K, M, returnv);
}
|
master
|
null
|
{"livein": ["J", "K", "M"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "JKMarray_idx", "funargs": ["J", "K", "M"], "typemap": {"J": "int32", "K": "int32", "M": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_475jedd62m.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
bairyn/opencurry/src/bits.c
|
long sign_long(long num)
{
return (( ((((num))) <= (((0)))) ? ( ((((num))) < (((0)))) ? ((-1)) : ((0)) ) : ((1)) ));
}
|
long sign_long(longnum)
|
long sign_long(long num)
|
sign_long
|
[
"long",
"long"
] |
{
"code": [
".globl sign_long\n.type sign_long, @function\nsign_long:\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\tjg\t.L2\n\tcmpq\t$0, -8(%rbp)\n\tjns\t.L3\n\tmovq\t$-1, %rax\n\tjmp\t.L6\n.L3:\n\tmovl\t$0, %eax\n\tjmp\t.L6\n.L2:\n\tmovl\t$1, %eax\n.L6:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl sign_long\n.type sign_long, @function\nsign_long:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestq\t%rdi, %rdi\n\tjg\t.L1\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n\tnegq\t%rax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl sign_long\n.type sign_long, @function\nsign_long:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestq\t%rdi, %rdi\n\tmovl\t$1, %edx\n\tsetne\t%al\n\tnegq\t%rax\n\ttestq\t%rdi, %rdi\n\tcmovg\t%rdx, %rax\n\tret\n\t.cfi_endproc\n\n",
".global sign_long\n.type sign_long, %function\nsign_long:\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\tbgt\t.L2\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 0\n\tbge\t.L3\n\tmov\tx0, -1\n\tb\t.L6\n.L3:\n\tmov\tx0, 0\n\tb\t.L6\n.L2:\n\tmov\tx0, 1\n.L6:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global sign_long\n.type sign_long, %function\nsign_long:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tx0, 0\n\tcsetm\tx1, ne\n\tcsinc\tx0, x1, xzr, le\n\tret\n\t.cfi_endproc\n\n",
".global sign_long\n.type sign_long, %function\nsign_long:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tx0, 0\n\tmov\tx2, 1\n\tcsetm\tx1, ne\n\tcsel\tx0, x1, x2, 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": [
"40"
],
"var": [
"num"
]
},
{
"value": [
"89"
],
"var": [
"num"
]
},
{
"value": [
"43"
],
"var": [
"num"
]
},
{
"value": [
"44"
],
"var": [
"num"
]
},
{
"value": [
"77"
],
"var": [
"num"
]
},
{
"value": [
"117"
],
"var": [
"num"
]
},
{
"value": [
"30"
],
"var": [
"num"
]
},
{
"value": [
"69"
],
"var": [
"num"
]
},
{
"value": [
"93"
],
"var": [
"num"
]
},
{
"value": [
"81"
],
"var": [
"num"
]
}
],
"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_508mwdtduf.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(long int num, 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);
long int num = input_json["num"];
clock_t begin = clock();
long int returnv = sign_long(num);
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(num, returnv);
}
|
master
|
null
|
{"livein": ["num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sign_long", "funargs": ["num"], "typemap": {"num": "int64", "returnv": "int64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_508mwdtduf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
christetreault/dmp-photo-booth-legacy-module-templates/dmp_pb_camera_module_template/dmp_camera_module.c
|
int dmp_cm_edit_config(void)
{
return 0;
}
|
int dmp_cm_edit_config()
|
int dmp_cm_edit_config(void)
|
dmp_cm_edit_config
|
[
"int",
""
] |
{
"code": [
".globl dmp_cm_edit_config\n.type dmp_cm_edit_config, @function\ndmp_cm_edit_config:\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 dmp_cm_edit_config\n.type dmp_cm_edit_config, @function\ndmp_cm_edit_config:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl dmp_cm_edit_config\n.type dmp_cm_edit_config, @function\ndmp_cm_edit_config:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global dmp_cm_edit_config\n.type dmp_cm_edit_config, %function\ndmp_cm_edit_config:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global dmp_cm_edit_config\n.type dmp_cm_edit_config, %function\ndmp_cm_edit_config:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global dmp_cm_edit_config\n.type dmp_cm_edit_config, %function\ndmp_cm_edit_config:\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_61yycphbwn.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 = dmp_cm_edit_config();
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": "dmp_cm_edit_config", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61yycphbwn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
mapleez/libez/unit/math_unit.c
|
int _cmp (int _a, int _b) {
int a = _a;
int b = _b;
return (a > b ? (-1) : (1));
}
|
int _cmp(int_a, int_b)
|
int _cmp (int _a, int _b)
|
_cmp
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl _cmp\n.type _cmp, @function\n_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\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-4(%rbp), %eax\n\tjle\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L4\n.L2:\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 _cmp\n.type _cmp, @function\n_cmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t%esi, %edi\n\tsetle\t%al\n\tleal\t-1(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl _cmp\n.type _cmp, @function\n_cmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t%esi, %edi\n\tsetle\t%al\n\tleal\t-1(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n\n",
".global _cmp\n.type _cmp, %function\n_cmp:\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\tstr\tw0, [sp, 24]\n\tldr\tw0, [sp, 8]\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw1, w0\n\tble\t.L2\n\tmov\tw0, -1\n\tb\t.L4\n.L2:\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 _cmp\n.type _cmp, %function\n_cmp:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tmov\tw2, 1\n\tcsneg\tw0, w2, w2, le\n\tret\n\t.cfi_endproc\n\n",
".global _cmp\n.type _cmp, %function\n_cmp:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tmov\tw0, 1\n\tcsneg\tw0, w0, w0, 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": [
"33",
"5"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"20",
"44"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"33",
"25"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"45",
"24"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"113",
"68"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"23",
"45"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"15",
"53"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"57",
"76"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"76",
"115"
],
"var": [
"_a",
"_b"
]
},
{
"value": [
"90",
"88"
],
"var": [
"_a",
"_b"
]
}
],
"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_31fnryi_v3.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 = _cmp(_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": "_cmp", "funargs": ["_a", "_b"], "typemap": {"_a": "int32", "_b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31fnryi_v3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
bright-tools/ccsm/test/src/simple_include.h
|
int safe(void) {
extern int q;
int lp;
return 0;
}
|
int safe()
|
int safe(void)
|
safe
|
[
"int",
""
] |
{
"code": [
".globl safe\n.type safe, @function\nsafe:\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 safe\n.type safe, @function\nsafe:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl safe\n.type safe, @function\nsafe:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global safe\n.type safe, %function\nsafe:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global safe\n.type safe, %function\nsafe:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global safe\n.type safe, %function\nsafe:\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_38lpduj1iy.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 = safe();
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": "safe", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38lpduj1iy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
kmatheussen/radium/amiga/instrprop/Amiga_instrprop_temp_help.c
|
int HelpItem146( void )
{
return 0;
}
|
int HelpItem146()
|
int HelpItem146( void )
|
HelpItem146
|
[
"int",
""
] |
{
"code": [
".globl HelpItem146\n.type HelpItem146, @function\nHelpItem146:\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 HelpItem146\n.type HelpItem146, @function\nHelpItem146:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl HelpItem146\n.type HelpItem146, @function\nHelpItem146:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global HelpItem146\n.type HelpItem146, %function\nHelpItem146:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global HelpItem146\n.type HelpItem146, %function\nHelpItem146:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global HelpItem146\n.type HelpItem146, %function\nHelpItem146:\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_57fyx3jq3b.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 = HelpItem146();
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": "HelpItem146", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57fyx3jq3b.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
AlphaStaxLLC/nagioscore/NagiosCore/t-tap/stub_statusdata.c
|
int update_program_status(int aggregated_dump) {}
|
int update_program_status(intaggregated_dump)
|
int update_program_status(int aggregated_dump)
|
update_program_status
|
[
"int",
"int"
] |
{
"code": [
".globl update_program_status\n.type update_program_status, @function\nupdate_program_status:\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\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl update_program_status\n.type update_program_status, @function\nupdate_program_status:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".globl update_program_status\n.type update_program_status, @function\nupdate_program_status:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".global update_program_status\n.type update_program_status, %function\nupdate_program_status:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global update_program_status\n.type update_program_status, %function\nupdate_program_status:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global update_program_status\n.type update_program_status, %function\nupdate_program_status:\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": [
"84"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"30"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"69"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"16"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"9"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"102"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"59"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"28"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"43"
],
"var": [
"aggregated_dump"
]
},
{
"value": [
"30"
],
"var": [
"aggregated_dump"
]
}
],
"output": [
{
"value": [
"84"
],
"var": [
"returnv"
]
},
{
"value": [
"30"
],
"var": [
"returnv"
]
},
{
"value": [
"69"
],
"var": [
"returnv"
]
},
{
"value": [
"16"
],
"var": [
"returnv"
]
},
{
"value": [
"9"
],
"var": [
"returnv"
]
},
{
"value": [
"102"
],
"var": [
"returnv"
]
},
{
"value": [
"59"
],
"var": [
"returnv"
]
},
{
"value": [
"28"
],
"var": [
"returnv"
]
},
{
"value": [
"43"
],
"var": [
"returnv"
]
},
{
"value": [
"30"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_64zd_c3vlq.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 aggregated_dump, 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 aggregated_dump = input_json["aggregated_dump"];
clock_t begin = clock();
int returnv = update_program_status(aggregated_dump);
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(aggregated_dump, returnv);
}
|
master
|
null
|
{"livein": ["aggregated_dump"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "update_program_status", "funargs": ["aggregated_dump"], "typemap": {"aggregated_dump": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_64zd_c3vlq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
shubhmsng/Codes/grietcode/major.c
|
int printArray(int arr[], int n)
{
int i=1;
while(arr[i]==arr[0])
{
i++;
}
return i;
}
|
int printArray(int *arr, intn)
|
int printArray(int arr[], int n)
|
printArray
|
[
"int",
"int *",
"int"
] |
{
"code": [
".globl printArray\n.type printArray, @function\nprintArray:\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%esi, -28(%rbp)\n\tmovl\t$1, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\taddl\t$1, -4(%rbp)\n.L2:\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\tmovq\t-24(%rbp), %rax\n\tmovl\t(%rax), %eax\n\tcmpl\t%eax, %edx\n\tje\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 printArray\n.type printArray, @function\nprintArray:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %edx\n\tmovl\t$1, %eax\n.L2:\n\tmovl\t%eax, %r8d\n\tincq\t%rax\n\tcmpl\t%edx, -4(%rdi,%rax,4)\n\tje\t.L2\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl printArray\n.type printArray, @function\nprintArray:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %edx\n\tcmpl\t%edx, 4(%rdi)\n\tjne\t.L4\n\tmovl\t$2, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%eax, %r8d\n\taddq\t$1, %rax\n\tcmpl\t%edx, -4(%rdi,%rax,4)\n\tje\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 printArray\n.type printArray, %function\nprintArray:\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\tw1, [sp, 4]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\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\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldr\tw1, [x0]\n\tldr\tx0, [sp, 8]\n\tldr\tw0, [x0]\n\tcmp\tw1, w0\n\tbeq\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 printArray\n.type printArray, %function\nprintArray:\n.LFB11:\n\t.cfi_startproc\n\tmov\tx1, x0\n\tmov\tx2, 1\n\tldr\tw3, [x1], -4\n.L2:\n\tmov\tw0, w2\n\tadd\tx2, x2, 1\n\tldr\tw4, [x1, x2, lsl 2]\n\tcmp\tw4, w3\n\tbeq\t.L2\n\tret\n\t.cfi_endproc\n\n",
".global printArray\n.type printArray, %function\nprintArray:\n.LFB16:\n\t.cfi_startproc\n\tldp\tw4, w1, [x0]\n\tcmp\tw1, w4\n\tbne\t.L4\n\tsub\tx3, x0, #4\n\tmov\tx1, 2\n\t.p2align 3,,7\n.L3:\n\tmov\tw0, w1\n\tadd\tx1, x1, 1\n\tldr\tw2, [x3, x1, lsl 2]\n\tcmp\tw2, w4\n\tbeq\t.L3\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 <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": [
"[109, 36, 72, 49, 100, 49, 15, 21, 21, 46, 42, 78, 32, 57, 63, 15, 118, 22, 94, 24, 4, 26, 40, 17, 106, 80, 62, 105, 118, 61, 35, 37]",
"108"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[51, 15, 73, 42, 8, 32, 89, 3, 5, 17, 49, 39, 12, 65, 64, 123, 51, 125, 65, 73, 55, 77, 125, 69, 122, 92, 42, 93, 2, 39, 71, 96]",
"44"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[22, 60, 91, 89, 120, 94, 6, 97, 124, 59, 66, 71, 0, 56, 12, 97, 35, 8, 88, 32, 0, 10, 45, 16, 17, 92, 124, 118, 46, 10, 104, 108]",
"44"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[80, 93, 15, 94, 123, 46, 67, 38, 91, 68, 108, 53, 68, 84, 73, 86, 78, 9, 87, 83, 110, 33, 25, 15, 66, 34, 3, 14, 113, 96, 122, 88]",
"11"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[18, 85, 78, 97, 115, 8, 78, 126, 112, 28, 66, 111, 109, 101, 47, 56, 61, 52, 26, 14, 5, 1, 3, 48, 119, 54, 97, 71, 42, 4, 27, 97]",
"122"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[102, 48, 92, 5, 86, 5, 96, 25, 15, 69, 45, 122, 125, 24, 99, 71, 56, 106, 21, 37, 108, 1, 103, 10, 24, 17, 31, 54, 3, 73, 83, 84]",
"126"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[53, 1, 94, 126, 11, 105, 2, 12, 91, 110, 90, 55, 112, 121, 102, 26, 6, 64, 51, 60, 37, 71, 75, 36, 38, 2, 57, 29, 16, 65, 21, 45]",
"116"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[53, 79, 26, 104, 0, 46, 32, 48, 75, 119, 113, 19, 74, 89, 42, 71, 110, 123, 53, 37, 26, 60, 6, 30, 4, 75, 119, 21, 43, 104, 116, 33]",
"105"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[108, 31, 92, 96, 106, 122, 24, 87, 83, 102, 39, 14, 45, 99, 101, 106, 58, 47, 24, 0, 104, 18, 75, 68, 52, 107, 32, 87, 14, 16, 120, 9]",
"48"
],
"var": [
"arr",
"n"
]
},
{
"value": [
"[82, 62, 61, 20, 38, 45, 115, 74, 7, 27, 41, 66, 122, 24, 114, 103, 115, 66, 75, 51, 97, 51, 33, 100, 102, 123, 1, 69, 14, 72, 33, 76]",
"114"
],
"var": [
"arr",
"n"
]
}
],
"output": [
{
"value": [
"[109, 36, 72, 49, 100, 49, 15, 21, 21, 46, 42, 78, 32, 57, 63, 15, 118, 22, 94, 24, 4, 26, 40, 17, 106, 80, 62, 105, 118, 61, 35, 37]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[51, 15, 73, 42, 8, 32, 89, 3, 5, 17, 49, 39, 12, 65, 64, 123, 51, 125, 65, 73, 55, 77, 125, 69, 122, 92, 42, 93, 2, 39, 71, 96]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[22, 60, 91, 89, 120, 94, 6, 97, 124, 59, 66, 71, 0, 56, 12, 97, 35, 8, 88, 32, 0, 10, 45, 16, 17, 92, 124, 118, 46, 10, 104, 108]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[80, 93, 15, 94, 123, 46, 67, 38, 91, 68, 108, 53, 68, 84, 73, 86, 78, 9, 87, 83, 110, 33, 25, 15, 66, 34, 3, 14, 113, 96, 122, 88]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[18, 85, 78, 97, 115, 8, 78, 126, 112, 28, 66, 111, 109, 101, 47, 56, 61, 52, 26, 14, 5, 1, 3, 48, 119, 54, 97, 71, 42, 4, 27, 97]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[102, 48, 92, 5, 86, 5, 96, 25, 15, 69, 45, 122, 125, 24, 99, 71, 56, 106, 21, 37, 108, 1, 103, 10, 24, 17, 31, 54, 3, 73, 83, 84]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[53, 1, 94, 126, 11, 105, 2, 12, 91, 110, 90, 55, 112, 121, 102, 26, 6, 64, 51, 60, 37, 71, 75, 36, 38, 2, 57, 29, 16, 65, 21, 45]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[53, 79, 26, 104, 0, 46, 32, 48, 75, 119, 113, 19, 74, 89, 42, 71, 110, 123, 53, 37, 26, 60, 6, 30, 4, 75, 119, 21, 43, 104, 116, 33]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[108, 31, 92, 96, 106, 122, 24, 87, 83, 102, 39, 14, 45, 99, 101, 106, 58, 47, 24, 0, 104, 18, 75, 68, 52, 107, 32, 87, 14, 16, 120, 9]",
"1"
],
"var": [
"arr",
"returnv"
]
},
{
"value": [
"[82, 62, 61, 20, 38, 45, 115, 74, 7, 27, 41, 66, 122, 24, 114, 103, 115, 66, 75, 51, 97, 51, 33, 100, 102, 123, 1, 69, 14, 72, 33, 76]",
"1"
],
"var": [
"arr",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_60oexnar5g.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* arr, 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 = arr[i3];
output_temp_2.push_back(output_temp_4);
}
output_json["arr"] = 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["arr"]) {
int input_temp_1_inner = elem;
input_temp_1_vec.push_back(input_temp_1_inner);
}
int* arr = &input_temp_1_vec[0];
int n = input_json["n"];
clock_t begin = clock();
int returnv = printArray(arr, 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(arr, n, returnv);
}
|
master
|
null
|
{"livein": ["arr", "n"], "liveout": ["arr"], "returnvarname": ["returnv"], "execcmd": "", "funname": "printArray", "funargs": ["arr", "n"], "typemap": {"arr": "array(int32#32)", "n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60oexnar5g.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
nyuszika7h/weechat/tests/ncurses-fake.c
|
int
COLORS()
{
return 256;
}
|
int COLORS()
|
int COLORS()
|
COLORS
|
[
"int",
""
] |
{
"code": [
".globl COLORS\n.type COLORS, @function\nCOLORS:\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$256, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl COLORS\n.type COLORS, @function\nCOLORS:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$256, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl COLORS\n.type COLORS, @function\nCOLORS:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$256, %eax\n\tret\n\t.cfi_endproc\n\n",
".global COLORS\n.type COLORS, %function\nCOLORS:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 256\n\tret\n\t.cfi_endproc\n\n",
".global COLORS\n.type COLORS, %function\nCOLORS:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 256\n\tret\n\t.cfi_endproc\n\n",
".global COLORS\n.type COLORS, %function\nCOLORS:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 256\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": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
},
{
"value": [
"256"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_36l3zupkgf.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 = COLORS();
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": "COLORS", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_36l3zupkgf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
GaloisInc/saw-script/heapster-saw/examples/fun_ptr.c
|
int bar( int x )
{
return x+1;
}
|
int bar(intx)
|
int bar( int x )
|
bar
|
[
"int",
"int"
] |
{
"code": [
".globl bar\n.type bar, @function\nbar:\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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl bar\n.type bar, @function\nbar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl bar\n.type bar, @function\nbar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".global bar\n.type bar, %function\nbar:\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\tw0, w0, 1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global bar\n.type bar, %function\nbar:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n",
".global bar\n.type bar, %function\nbar:\n.LFB0:\n\t.cfi_startproc\n\tadd\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": [
"72"
],
"var": [
"x"
]
},
{
"value": [
"73"
],
"var": [
"x"
]
},
{
"value": [
"95"
],
"var": [
"x"
]
},
{
"value": [
"17"
],
"var": [
"x"
]
},
{
"value": [
"11"
],
"var": [
"x"
]
},
{
"value": [
"4"
],
"var": [
"x"
]
},
{
"value": [
"16"
],
"var": [
"x"
]
},
{
"value": [
"115"
],
"var": [
"x"
]
},
{
"value": [
"74"
],
"var": [
"x"
]
},
{
"value": [
"62"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"73"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"96"
],
"var": [
"returnv"
]
},
{
"value": [
"18"
],
"var": [
"returnv"
]
},
{
"value": [
"12"
],
"var": [
"returnv"
]
},
{
"value": [
"5"
],
"var": [
"returnv"
]
},
{
"value": [
"17"
],
"var": [
"returnv"
]
},
{
"value": [
"116"
],
"var": [
"returnv"
]
},
{
"value": [
"75"
],
"var": [
"returnv"
]
},
{
"value": [
"63"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_417628kx2n.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 = bar(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": "bar", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_417628kx2n.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
neosam/s3d/src/compiler.c
|
char *skipSpaces(char *pc)
{
while((*pc == ' ' || *pc == '\n' || *pc == '\t' || *pc == '\r') &&
*pc != '\0')
pc++;
return pc;
}
|
char * skipSpaces(char *pc)
|
char *skipSpaces(char *pc)
|
skipSpaces
|
[
"char *",
"char *"
] |
{
"code": [
".globl skipSpaces\n.type skipSpaces, @function\nskipSpaces:\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\tjmp\t.L2\n.L5:\n\taddq\t$1, -8(%rbp)\n.L2:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$32, %al\n\tje\t.L3\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$10, %al\n\tje\t.L3\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$9, %al\n\tje\t.L3\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$13, %al\n\tjne\t.L4\n.L3:\n\tmovq\t-8(%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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl skipSpaces\n.type skipSpaces, @function\nskipSpaces:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$8388627, %ecx\n\tmovq\t%rdi, %rax\n\tsalq\t$9, %rcx\n.L2:\n\tmovb\t(%rax), %dl\n\tcmpb\t$32, %dl\n\tja\t.L1\n\tbtq\t%rdx, %rcx\n\tjnc\t.L1\n\ttestb\t%dl, %dl\n\tje\t.L1\n\tincq\t%rax\n\tjmp\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl skipSpaces\n.type skipSpaces, @function\nskipSpaces:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %edx\n\tmovq\t%rdi, %rax\n\tcmpb\t$32, %dl\n\tja\t.L2\n\tmovabsq\t$4294977024, %rcx\n\tbtq\t%rdx, %rcx\n\tjnc\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\ttestb\t%dl, %dl\n\tje\t.L2\n\tmovzbl\t1(%rax), %edx\n\taddq\t$1, %rax\n\tcmpb\t$32, %dl\n\tja\t.L2\n\tbtq\t%rdx, %rcx\n\tjc\t.L3\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".global skipSpaces\n.type skipSpaces, %function\nskipSpaces:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tb\t.L2\n.L5:\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 32\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 10\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 9\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 13\n\tbne\t.L4\n.L3:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n.L4:\n\tldr\tx0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global skipSpaces\n.type skipSpaces, %function\nskipSpaces:\n.LFB35:\n\t.cfi_startproc\n.L2:\n\tldrb\tw1, [x0]\n\tcmp\tw1, 32\n\tccmp\tw1, 10, 4, ne\n\tbeq\t.L3\n\tand\tw1, w1, -5\n\tcmp\tw1, 9\n\tbne\t.L1\n.L4:\n\tadd\tx0, x0, 1\n\tb\t.L2\n.L3:\n\tcbnz\tw1, .L4\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global skipSpaces\n.type skipSpaces, %function\nskipSpaces:\n.LFB50:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tb\t.L9\n\t.p2align 2,,3\n.L4:\n\tldrb\tw1, [x0, 1]!\n.L9:\n\tcmp\tw1, 32\n\tsub\tw2, w1, #9\n\tccmp\tw1, 13, 4, ne\n\tand\tw2, w2, 255\n\tccmp\tw2, 1, 0, ne\n\tbhi\t.L3\n\tcbnz\tw1, .L4\n.L3:\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 <string.h>
#include <stdlib.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": [
"\"\""
],
"var": [
"pc"
]
},
{
"value": [
"\"yxdfnoreqga\""
],
"var": [
"pc"
]
},
{
"value": [
"\"wxavasguxqpzxdyxdbfuxutr\""
],
"var": [
"pc"
]
},
{
"value": [
"\"bkonuumcibecwevrkcn\""
],
"var": [
"pc"
]
},
{
"value": [
"\"vp\""
],
"var": [
"pc"
]
},
{
"value": [
"\"nnlfjhnnurqtdwuzy\""
],
"var": [
"pc"
]
},
{
"value": [
"\"ilxrzumkwteaixcyg\""
],
"var": [
"pc"
]
},
{
"value": [
"\"mhjcznnymljxxsdzpwwytntme\""
],
"var": [
"pc"
]
},
{
"value": [
"\"ydldjkf\""
],
"var": [
"pc"
]
},
{
"value": [
"\"zceqaqcmechtkocgdvpnxafvmxwe\""
],
"var": [
"pc"
]
}
],
"output": [
{
"value": [
"\"\"",
"\"\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"yxdfnoreqga\"",
"\"yxdfnoreqga\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"wxavasguxqpzxdyxdbfuxutr\"",
"\"wxavasguxqpzxdyxdbfuxutr\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"bkonuumcibecwevrkcn\"",
"\"bkonuumcibecwevrkcn\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"vp\"",
"\"vp\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"nnlfjhnnurqtdwuzy\"",
"\"nnlfjhnnurqtdwuzy\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"ilxrzumkwteaixcyg\"",
"\"ilxrzumkwteaixcyg\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"mhjcznnymljxxsdzpwwytntme\"",
"\"mhjcznnymljxxsdzpwwytntme\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"ydldjkf\"",
"\"ydldjkf\""
],
"var": [
"pc",
"returnv"
]
},
{
"value": [
"\"zceqaqcmechtkocgdvpnxafvmxwe\"",
"\"zceqaqcmechtkocgdvpnxafvmxwe\""
],
"var": [
"pc",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_50r9scjlyd.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* pc, char* returnv) {
json output_json;
output_json["pc"] = pc;
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* pc = strdup(input_json["pc"].get<std::string>().c_str());
clock_t begin = clock();
char* returnv = skipSpaces(pc);
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(pc, returnv);
}
|
master
|
null
|
{"livein": ["pc"], "liveout": ["pc"], "returnvarname": ["returnv"], "execcmd": "", "funname": "skipSpaces", "funargs": ["pc"], "typemap": {"pc": "string", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50r9scjlyd.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Ne02ptzero/msh/srcs/read/termcap.c
|
char *init_buffer(char *buffer)
{
int i;
i = 0;
while (buffer[i])
buffer[i++] = 0;
return (buffer);
}
|
char * init_buffer(char *buffer)
|
char *init_buffer(char *buffer)
|
init_buffer
|
[
"char *",
"char *"
] |
{
"code": [
".globl init_buffer\n.type init_buffer, @function\ninit_buffer:\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, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-4(%rbp), %eax\n\tleal\t1(%rax), %edx\n\tmovl\t%edx, -4(%rbp)\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovb\t$0, (%rax)\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.L3\n\tmovq\t-24(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl init_buffer\n.type init_buffer, @function\ninit_buffer:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tmovq\t%rdi, %rdx\n.L2:\n\tcmpb\t$0, (%rdx)\n\tje\t.L5\n\tmovb\t$0, (%rdx)\n\tincq\t%rdx\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n\n",
".globl init_buffer\n.type init_buffer, @function\ninit_buffer:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$0, (%rdi)\n\tmovq\t%rdi, %rax\n\tje\t.L2\n\tmovq\t%rdi, %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovb\t$0, (%rdx)\n\taddq\t$1, %rdx\n\tcmpb\t$0, (%rdx)\n\tjne\t.L3\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".global init_buffer\n.type init_buffer, %function\ninit_buffer:\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, 28]\n\tb\t.L2\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw1, w0, 1\n\tstr\tw1, [sp, 28]\n\tsxtw\tx0, w0\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tstrb\twzr, [x0]\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.L3\n\tldr\tx0, [sp, 8]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global init_buffer\n.type init_buffer, %function\ninit_buffer:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx1, x0\n.L2:\n\tldrb\tw2, [x1]\n\tcbnz\tw2, .L3\n\tret\n.L3:\n\tstrb\twzr, [x1], 1\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global init_buffer\n.type init_buffer, %function\ninit_buffer:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L2\n\tmov\tx1, x0\n\t.p2align 3,,7\n.L3:\n\tstrb\twzr, [x1]\n\tldrb\tw2, [x1, 1]!\n\tcbnz\tw2, .L3\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": [
"\"mqe\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"ppadwsazrzdeg\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"nhfhewcmzwcwp\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"usozipln\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"owsyaquqloryxpdazevuuiyjnsjaoxt\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"fvrdcxzhyuxarvseke\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"elznap\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"agvhdgakshbnij\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"ehalkwlchaspppuhwdxgazroufs\""
],
"var": [
"buffer"
]
},
{
"value": [
"\"zpogpqfojjowbdnfbita\""
],
"var": [
"buffer"
]
}
],
"output": [
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
},
{
"value": [
"\"\"",
"\"\""
],
"var": [
"buffer",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_31ea_v4q6v.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* buffer, char* returnv) {
json output_json;
output_json["buffer"] = buffer;
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* buffer = strdup(input_json["buffer"].get<std::string>().c_str());
clock_t begin = clock();
char* returnv = init_buffer(buffer);
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(buffer, returnv);
}
|
master
|
null
|
{"livein": ["buffer"], "liveout": ["buffer"], "returnvarname": ["returnv"], "execcmd": "", "funname": "init_buffer", "funargs": ["buffer"], "typemap": {"buffer": "string", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31ea_v4q6v.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
thought-machine/please/test/go_rules/cgo/cgo.c
|
int GetAnswer() {
return 42;
}
|
int GetAnswer()
|
int GetAnswer()
|
GetAnswer
|
[
"int",
""
] |
{
"code": [
".globl GetAnswer\n.type GetAnswer, @function\nGetAnswer:\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$42, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl GetAnswer\n.type GetAnswer, @function\nGetAnswer:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$42, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl GetAnswer\n.type GetAnswer, @function\nGetAnswer:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$42, %eax\n\tret\n\t.cfi_endproc\n\n",
".global GetAnswer\n.type GetAnswer, %function\nGetAnswer:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 42\n\tret\n\t.cfi_endproc\n\n",
".global GetAnswer\n.type GetAnswer, %function\nGetAnswer:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 42\n\tret\n\t.cfi_endproc\n\n",
".global GetAnswer\n.type GetAnswer, %function\nGetAnswer:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 42\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": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_582jn9wjde.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 = GetAnswer();
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": "GetAnswer", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_582jn9wjde.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jessek/colorize/src/helpers.c
|
unsigned char padding(void)
{
return 0xff;
}
|
unsigned char padding()
|
unsigned char padding(void)
|
padding
|
[
"unsigned char",
""
] |
{
"code": [
".globl padding\n.type padding, @function\npadding:\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 padding\n.type padding, @function\npadding:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t$-1, %al\n\tret\n\t.cfi_endproc\n\n",
".globl padding\n.type padding, @function\npadding:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n",
".global padding\n.type padding, %function\npadding:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 255\n\tret\n\t.cfi_endproc\n\n",
".global padding\n.type padding, %function\npadding:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n",
".global padding\n.type padding, %function\npadding:\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": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
},
{
"value": [
"255"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_35hzqd3z7s.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 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();
unsigned char returnv = padding();
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": "padding", "funargs": [], "typemap": {"returnv": "uint8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35hzqd3z7s.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
amrme/quafios/calc/fix.c
|
int getPrec(char op) {
switch(op) {
case '+':
case '-':
return 1;
case '*':
case '/':
return 2;
case '(':
case ')':
return 3;
default:
return 0;
}
}
|
int getPrec(charop)
|
int getPrec(char op)
|
getPrec
|
[
"int",
"char"
] |
{
"code": [
".globl getPrec\n.type getPrec, @function\ngetPrec:\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\tsubl\t$40, %eax\n\tcmpl\t$7, %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.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L3-.L4\n\t.long\t.L5-.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.text\n.L5:\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L3:\n\tmovl\t$2, %eax\n\tjmp\t.L7\n.L6:\n\tmovl\t$3, %eax\n\tjmp\t.L7\n.L2:\n\tmovl\t$0, %eax\n.L7:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl getPrec\n.type getPrec, @function\ngetPrec:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$40, %edi\n\tcmpb\t$7, %dil\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovzbl\t%dil, %edi\n\tmovslq\t(%rdx,%rdi,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.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L3-.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.L3-.L4\n\t.text\n.L3:\n\tmovl\t$2, %eax\n\tret\n.L6:\n\tmovl\t$3, %eax\n\tret\n.L2:\n\txorl\t%eax, %eax\n\tret\n.L7:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl getPrec\n.type getPrec, @function\ngetPrec:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$40, %edi\n\tcmpb\t$7, %dil\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovzbl\t%dil, %edi\n\tmovslq\t(%rdx,%rdi,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.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L3-.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.L3-.L4\n\t.text\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovl\t$1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t$2, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tmovl\t$3, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global getPrec\n.type getPrec, %function\ngetPrec:\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, 47\n\tbeq\t.L2\n\tcmp\tw0, 47\n\tbgt\t.L3\n\tcmp\tw0, 45\n\tbeq\t.L4\n\tcmp\tw0, 45\n\tbgt\t.L3\n\tcmp\tw0, 43\n\tbeq\t.L4\n\tcmp\tw0, 43\n\tbgt\t.L3\n\tcmp\tw0, 41\n\tbgt\t.L5\n\tcmp\tw0, 40\n\tbge\t.L6\n\tb\t.L3\n.L5:\n\tcmp\tw0, 42\n\tbeq\t.L2\n\tb\t.L3\n.L4:\n\tmov\tw0, 1\n\tb\t.L7\n.L2:\n\tmov\tw0, 2\n\tb\t.L7\n.L6:\n\tmov\tw0, 3\n\tb\t.L7\n.L3:\n\tmov\tw0, 0\n.L7:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global getPrec\n.type getPrec, %function\ngetPrec:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #40\n\tcmp\tw0, 7\n\tbhi\t.L2\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldrb\tw0, [x1,w0,uxtw]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.byte\t(.L6 - .Lrtx4) / 4\n\t.byte\t(.L6 - .Lrtx4) / 4\n\t.byte\t(.L3 - .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(.L3 - .Lrtx4) / 4\n\t.text\n.L3:\n\tmov\tw0, 2\n.L1:\n\tret\n.L6:\n\tmov\tw0, 3\n\tb\t.L1\n.L2:\n\tmov\tw0, 0\n\tb\t.L1\n.L7:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global getPrec\n.type getPrec, %function\ngetPrec:\n.LFB39:\n\t.cfi_startproc\n\tand\tw1, w0, 255\n\tcmp\tw1, 43\n\tbeq\t.L4\n\tbhi\t.L3\n\tcmp\tw1, 42\n\tmov\tw0, 2\n\tbeq\t.L1\n\tcmp\tw1, 40\n\tmov\tw0, 3\n\tcsel\tw0, wzr, w0, cc\n.L1:\n\tret\n\t.p2align 2,,3\n.L3:\n\tcmp\tw1, 45\n\tmov\tw0, 1\n\tbeq\t.L1\n\tcmp\tw1, 47\n\tcset\tw0, eq\n\tlsl\tw0, w0, 1\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": [
"17"
],
"var": [
"op"
]
},
{
"value": [
"91"
],
"var": [
"op"
]
},
{
"value": [
"121"
],
"var": [
"op"
]
},
{
"value": [
"5"
],
"var": [
"op"
]
},
{
"value": [
"80"
],
"var": [
"op"
]
},
{
"value": [
"46"
],
"var": [
"op"
]
},
{
"value": [
"118"
],
"var": [
"op"
]
},
{
"value": [
"18"
],
"var": [
"op"
]
},
{
"value": [
"37"
],
"var": [
"op"
]
},
{
"value": [
"38"
],
"var": [
"op"
]
}
],
"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_63k5_033ll.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 op, 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 op = input_json["op"].get<char>();
clock_t begin = clock();
int returnv = getPrec(op);
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(op, returnv);
}
|
master
|
null
|
{"livein": ["op"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "getPrec", "funargs": ["op"], "typemap": {"op": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63k5_033ll.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
awm/cortex-gnat-rts-code/arduino-due/adainclude/syscalls.c
|
int _isatty(int file)
{
return 0;
}
|
int _isatty(intfile)
|
int _isatty(int file)
|
_isatty
|
[
"int",
"int"
] |
{
"code": [
".globl _isatty\n.type _isatty, @function\n_isatty:\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, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl _isatty\n.type _isatty, @function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl _isatty\n.type _isatty, @function\n_isatty:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global _isatty\n.type _isatty, %function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\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 _isatty\n.type _isatty, %function\n_isatty:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global _isatty\n.type _isatty, %function\n_isatty:\n.LFB6:\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 <sys/stat.h>
#include <errno.h>
#include <sys/times.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": [
"file"
]
},
{
"value": [
"13"
],
"var": [
"file"
]
},
{
"value": [
"70"
],
"var": [
"file"
]
},
{
"value": [
"122"
],
"var": [
"file"
]
},
{
"value": [
"110"
],
"var": [
"file"
]
},
{
"value": [
"119"
],
"var": [
"file"
]
},
{
"value": [
"108"
],
"var": [
"file"
]
},
{
"value": [
"27"
],
"var": [
"file"
]
},
{
"value": [
"28"
],
"var": [
"file"
]
},
{
"value": [
"46"
],
"var": [
"file"
]
}
],
"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_36tf4z2np9.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 file, 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 file = input_json["file"];
clock_t begin = clock();
int returnv = _isatty(file);
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(file, returnv);
}
|
master
|
null
|
{"livein": ["file"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "_isatty", "funargs": ["file"], "typemap": {"file": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_36tf4z2np9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jloughry/experiments/optimal_gray_code_banker_sequence/optimal_gray_code_banker_sequence.c
|
char flip_bit (char bit_character) {
if ('0' == bit_character)
return '1';
else
return '0';
}
|
char flip_bit(charbit_character)
|
char flip_bit (char bit_character)
|
flip_bit
|
[
"char",
"char"
] |
{
"code": [
".globl flip_bit\n.type flip_bit, @function\nflip_bit:\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\tcmpb\t$48, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$49, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$48, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl flip_bit\n.type flip_bit, @function\nflip_bit:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$48, %dil\n\tsete\t%al\n\taddl\t$48, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl flip_bit\n.type flip_bit, @function\nflip_bit:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$48, %dil\n\tsete\t%al\n\taddl\t$48, %eax\n\tret\n\t.cfi_endproc\n\n",
".global flip_bit\n.type flip_bit, %function\nflip_bit:\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, 48\n\tbne\t.L2\n\tmov\tw0, 49\n\tb\t.L3\n.L2:\n\tmov\tw0, 48\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global flip_bit\n.type flip_bit, %function\nflip_bit:\n.LFB35:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 48\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\n\tret\n\t.cfi_endproc\n\n",
".global flip_bit\n.type flip_bit, %function\nflip_bit:\n.LFB50:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 48\n\tcset\tw0, eq\n\tadd\tw0, w0, 48\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 <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": [
"29"
],
"var": [
"bit_character"
]
},
{
"value": [
"25"
],
"var": [
"bit_character"
]
},
{
"value": [
"42"
],
"var": [
"bit_character"
]
},
{
"value": [
"119"
],
"var": [
"bit_character"
]
},
{
"value": [
"85"
],
"var": [
"bit_character"
]
},
{
"value": [
"115"
],
"var": [
"bit_character"
]
},
{
"value": [
"67"
],
"var": [
"bit_character"
]
},
{
"value": [
"109"
],
"var": [
"bit_character"
]
},
{
"value": [
"117"
],
"var": [
"bit_character"
]
},
{
"value": [
"99"
],
"var": [
"bit_character"
]
}
],
"output": [
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_61nd4p4ftc.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 bit_character, 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 bit_character = input_json["bit_character"].get<char>();
clock_t begin = clock();
char returnv = flip_bit(bit_character);
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(bit_character, returnv);
}
|
master
|
null
|
{"livein": ["bit_character"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "flip_bit", "funargs": ["bit_character"], "typemap": {"bit_character": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61nd4p4ftc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
119/aircam-openwrt/build_dir/toolchain-arm_v5te_gcc-linaro_uClibc-0.9.32_eabi/gcc-linaro-4.5-2011.02-0/gcc/testsuite/gcc.dg/tree-ssa/pr15349.c
|
int
foo (int a, int b)
{
int t;
if (b)
{
if (a)
t = 3;
else
t = 5;
a = 0;
}
else
t = 7;
return t;
}
|
int foo(inta, intb)
|
int foo (int a, int b)
|
foo
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl foo\n.type foo, @function\nfoo:\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, -24(%rbp)\n\tje\t.L2\n\tcmpl\t$0, -20(%rbp)\n\tje\t.L3\n\tmovl\t$3, -4(%rbp)\n\tjmp\t.L4\n.L3:\n\tmovl\t$5, -4(%rbp)\n.L4:\n\tmovl\t$0, -20(%rbp)\n\tjmp\t.L5\n.L2:\n\tmovl\t$7, -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 foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$7, %eax\n\ttestl\t%esi, %esi\n\tje\t.L1\n\tcmpl\t$1, %edi\n\tsbbl\t%eax, %eax\n\tandl\t$2, %eax\n\taddl\t$3, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$7, %eax\n\ttestl\t%esi, %esi\n\tje\t.L1\n\tcmpl\t$1, %edi\n\tsbbl\t%eax, %eax\n\tandl\t$2, %eax\n\taddl\t$3, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global foo\n.type foo, %function\nfoo:\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, 8]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbeq\t.L3\n\tmov\tw0, 3\n\tstr\tw0, [sp, 28]\n\tb\t.L4\n.L3:\n\tmov\tw0, 5\n\tstr\tw0, [sp, 28]\n.L4:\n\tstr\twzr, [sp, 12]\n\tb\t.L5\n.L2:\n\tmov\tw0, 7\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 foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tw1, .L3\n\tcmp\tw0, 0\n\tmov\tw1, 5\n\tmov\tw0, 3\n\tcsel\tw0, w0, w1, ne\n.L1:\n\tret\n.L3:\n\tmov\tw0, 7\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tw1, .L3\n\tcmp\tw0, 0\n\tmov\tw1, 5\n\tmov\tw0, 3\n\tcsel\tw0, w0, w1, ne\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 7\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": [
"6",
"80"
],
"var": [
"a",
"b"
]
},
{
"value": [
"48",
"98"
],
"var": [
"a",
"b"
]
},
{
"value": [
"67",
"110"
],
"var": [
"a",
"b"
]
},
{
"value": [
"24",
"66"
],
"var": [
"a",
"b"
]
},
{
"value": [
"79",
"24"
],
"var": [
"a",
"b"
]
},
{
"value": [
"82",
"14"
],
"var": [
"a",
"b"
]
},
{
"value": [
"78",
"54"
],
"var": [
"a",
"b"
]
},
{
"value": [
"118",
"17"
],
"var": [
"a",
"b"
]
},
{
"value": [
"15",
"76"
],
"var": [
"a",
"b"
]
},
{
"value": [
"100",
"59"
],
"var": [
"a",
"b"
]
}
],
"output": [
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_30cbh7opu6.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 = foo(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);
}
|
ar9344
|
null
|
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "foo", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30cbh7opu6.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
csrhau/sandpit/c/reverse_polish_notation/src/operators.c
|
double opTimes(double lhs, double rhs) { return lhs * rhs; }
|
double opTimes(doublelhs, doublerhs)
|
double opTimes(double lhs, double rhs)
|
opTimes
|
[
"double",
"double",
"double"
] |
{
"code": [
".globl opTimes\n.type opTimes, @function\nopTimes:\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\tmovsd\t-8(%rbp), %xmm0\n\tmulsd\t-16(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl opTimes\n.type opTimes, @function\nopTimes:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl opTimes\n.type opTimes, @function\nopTimes:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global opTimes\n.type opTimes, %function\nopTimes:\n.LFB0:\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\tfmul\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global opTimes\n.type opTimes, %function\nopTimes:\n.LFB0:\n\t.cfi_startproc\n\tfmul\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n",
".global opTimes\n.type opTimes, %function\nopTimes:\n.LFB0:\n\t.cfi_startproc\n\tfmul\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 <math.h>
#include <stddef.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": [
"35.4176195283",
"18.1414148661"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"4.34068002759",
"51.098113946"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"32.8754763785",
"74.0966904781"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"33.7941515011",
"91.5261176998"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"48.1623789576",
"37.5797205071"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"89.1799270144",
"44.6629580391"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"21.5194748856",
"45.9852040713"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"45.1248958448",
"6.02671480569"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"20.325449317",
"9.70256827693"
],
"var": [
"lhs",
"rhs"
]
},
{
"value": [
"36.962257043",
"70.6942276845"
],
"var": [
"lhs",
"rhs"
]
}
],
"output": [
{
"value": [
"642.5257294325753"
],
"var": [
"returnv"
]
},
{
"value": [
"221.80056265292026"
],
"var": [
"returnv"
]
},
{
"value": [
"2435.9639975378022"
],
"var": [
"returnv"
]
},
{
"value": [
"3093.0474878545515"
],
"var": [
"returnv"
]
},
{
"value": [
"1809.928740183642"
],
"var": [
"returnv"
]
},
{
"value": [
"3983.0393381741474"
],
"var": [
"returnv"
]
},
{
"value": [
"989.5774441215312"
],
"var": [
"returnv"
]
},
{
"value": [
"271.9548778930753"
],
"var": [
"returnv"
]
},
{
"value": [
"197.20905975747274"
],
"var": [
"returnv"
]
},
{
"value": [
"2613.018215130856"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_629pm8gzoo.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 lhs, double rhs, 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 lhs = input_json["lhs"];
double rhs = input_json["rhs"];
clock_t begin = clock();
double returnv = opTimes(lhs, rhs);
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(lhs, rhs, returnv);
}
|
master
|
null
|
{"livein": ["lhs", "rhs"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "opTimes", "funargs": ["lhs", "rhs"], "typemap": {"lhs": "float64", "rhs": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_629pm8gzoo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
neilslater/ru_ne_ne/ext/ru_ne_ne/core_transfer_functions.c
|
float raw_linear_derivative_at( float y ) {
return 1.0;
}
|
float raw_linear_derivative_at(floaty)
|
float raw_linear_derivative_at( float y )
|
raw_linear_derivative_at
|
[
"float",
"float"
] |
{
"code": [
".globl raw_linear_derivative_at\n.type raw_linear_derivative_at, @function\nraw_linear_derivative_at:\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.LC0(%rip), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1065353216\n",
".globl raw_linear_derivative_at\n.type raw_linear_derivative_at, @function\nraw_linear_derivative_at:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovss\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1065353216\n",
".globl raw_linear_derivative_at\n.type raw_linear_derivative_at, @function\nraw_linear_derivative_at:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovss\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1065353216\n",
".global raw_linear_derivative_at\n.type raw_linear_derivative_at, %function\nraw_linear_derivative_at:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tfmov\ts0, 1.0e+0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global raw_linear_derivative_at\n.type raw_linear_derivative_at, %function\nraw_linear_derivative_at:\n.LFB0:\n\t.cfi_startproc\n\tfmov\ts0, 1.0e+0\n\tret\n\t.cfi_endproc\n\n",
".global raw_linear_derivative_at\n.type raw_linear_derivative_at, %function\nraw_linear_derivative_at:\n.LFB0:\n\t.cfi_startproc\n\tfmov\ts0, 1.0e+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": [
"10.5508776879"
],
"var": [
"y"
]
},
{
"value": [
"7.7692479384"
],
"var": [
"y"
]
},
{
"value": [
"87.6587329211"
],
"var": [
"y"
]
},
{
"value": [
"9.88650624292"
],
"var": [
"y"
]
},
{
"value": [
"45.2023712279"
],
"var": [
"y"
]
},
{
"value": [
"99.7219197419"
],
"var": [
"y"
]
},
{
"value": [
"93.0618224699"
],
"var": [
"y"
]
},
{
"value": [
"0.277579324692"
],
"var": [
"y"
]
},
{
"value": [
"40.2684057527"
],
"var": [
"y"
]
},
{
"value": [
"44.8137069669"
],
"var": [
"y"
]
}
],
"output": [
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_44v8zyk14x.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 y, 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 y = input_json["y"];
clock_t begin = clock();
float returnv = raw_linear_derivative_at(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(y, returnv);
}
|
master
|
null
|
{"livein": ["y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "raw_linear_derivative_at", "funargs": ["y"], "typemap": {"y": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44v8zyk14x.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
newcoo1/learningthings/csapp/datalab-handout/test.c
|
int bitCount(int x) {
return 2;
}
|
int bitCount(intx)
|
int bitCount(int x)
|
bitCount
|
[
"int",
"int"
] |
{
"code": [
".globl bitCount\n.type bitCount, @function\nbitCount:\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$2, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl bitCount\n.type bitCount, @function\nbitCount:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl bitCount\n.type bitCount, @function\nbitCount:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$2, %eax\n\tret\n\t.cfi_endproc\n\n",
".global bitCount\n.type bitCount, %function\nbitCount:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 2\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global bitCount\n.type bitCount, %function\nbitCount:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 2\n\tret\n\t.cfi_endproc\n\n",
".global bitCount\n.type bitCount, %function\nbitCount:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 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": [
"57"
],
"var": [
"x"
]
},
{
"value": [
"121"
],
"var": [
"x"
]
},
{
"value": [
"70"
],
"var": [
"x"
]
},
{
"value": [
"99"
],
"var": [
"x"
]
},
{
"value": [
"19"
],
"var": [
"x"
]
},
{
"value": [
"87"
],
"var": [
"x"
]
},
{
"value": [
"90"
],
"var": [
"x"
]
},
{
"value": [
"107"
],
"var": [
"x"
]
},
{
"value": [
"0"
],
"var": [
"x"
]
},
{
"value": [
"33"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_564ja543_f.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 = bitCount(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": "bitCount", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_564ja543_f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
grev-uv/hpg-methyl/containers/cprops/util.c
|
int xtoi(char *p)
{
int curr;
int res = 0;
while (*p)
{
curr = ((*p) >= '0' && (*p) <= '9' ? (*p) - '0' : (*p) >= 'A' && (*p) <= 'F' ? (*p) - 'A' + 10 : (*p) >= 'a' && (*p) <= 'f' ? (*p) - 'a' + 10 : -1);
if (curr == -1) break;
res = res * 0x10 + curr;
p++;
}
return res;
}
|
int xtoi(char *p)
|
int xtoi(char *p)
|
xtoi
|
[
"int",
"char *"
] |
{
"code": [
".globl xtoi\n.type xtoi, @function\nxtoi:\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\tjmp\t.L2\n.L11:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$47, %al\n\tjle\t.L3\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$57, %al\n\tjg\t.L3\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t$48, %eax\n\tjmp\t.L4\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$64, %al\n\tjle\t.L5\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$70, %al\n\tjg\t.L5\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t$55, %eax\n\tjmp\t.L4\n.L5:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$96, %al\n\tjle\t.L7\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$102, %al\n\tjg\t.L7\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t$87, %eax\n\tjmp\t.L4\n.L7:\n\tmovl\t$-1, %eax\n.L4:\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$-1, -4(%rbp)\n\tje\t.L13\n\tmovl\t-8(%rbp), %eax\n\tsall\t$4, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -8(%rbp)\n\taddq\t$1, -24(%rbp)\n.L2:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L11\n\tjmp\t.L10\n.L13:\n\tnop\n.L10:\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 xtoi\n.type xtoi, @function\nxtoi:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tmovsbl\t(%rdi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L1\n\tleal\t-48(%rdx), %ecx\n\tcmpb\t$9, %cl\n\tja\t.L3\n\tsubl\t$48, %edx\n\tjmp\t.L4\n.L3:\n\tleal\t-65(%rdx), %ecx\n\tcmpb\t$5, %cl\n\tja\t.L5\n\tsubl\t$55, %edx\n\tjmp\t.L4\n.L5:\n\tleal\t-97(%rdx), %ecx\n\tcmpb\t$5, %cl\n\tja\t.L1\n\tsubl\t$87, %edx\n.L4:\n\tsall\t$4, %eax\n\tincq\t%rdi\n\taddl\t%edx, %eax\n\tjmp\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl xtoi\n.type xtoi, @function\nxtoi:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t(%rdi), %edx\n\txorl\t%eax, %eax\n\ttestb\t%dl, %dl\n\tjne\t.L6\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tsubl\t$48, %edx\n.L4:\n\tsall\t$4, %eax\n\taddq\t$1, %rdi\n\taddl\t%edx, %eax\n\tmovsbl\t(%rdi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L10\n.L6:\n\tleal\t-48(%rdx), %ecx\n\tcmpb\t$9, %cl\n\tjbe\t.L11\n\tleal\t-65(%rdx), %ecx\n\tcmpb\t$5, %cl\n\tja\t.L5\n\tsubl\t$55, %edx\n\tsall\t$4, %eax\n\taddq\t$1, %rdi\n\taddl\t%edx, %eax\n\tmovsbl\t(%rdi), %edx\n\ttestb\t%dl, %dl\n\tjne\t.L6\n.L10:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tleal\t-97(%rdx), %ecx\n\tcmpb\t$5, %cl\n\tja\t.L1\n\tsubl\t$87, %edx\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global xtoi\n.type xtoi, %function\nxtoi:\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\tb\t.L2\n.L11:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbls\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbhi\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #48\n\tb\t.L4\n.L3:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 64\n\tbls\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 70\n\tbhi\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #55\n\tb\t.L4\n.L5:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 96\n\tbls\t.L7\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 102\n\tbhi\t.L7\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #87\n\tb\t.L4\n.L7:\n\tmov\tw0, -1\n.L4:\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmn\tw0, #1\n\tbeq\t.L13\n\tldr\tw0, [sp, 24]\n\tlsl\tw0, w0, 4\n\tldr\tw1, [sp, 28]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L11\n\tb\t.L10\n.L13:\n\tnop\n.L10:\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 xtoi\n.type xtoi, %function\nxtoi:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tmov\tw0, 0\n.L2:\n\tldrb\tw1, [x3]\n\tcbnz\tw1, .L7\n.L1:\n\tret\n.L7:\n\tsub\tw2, w1, #48\n\tand\tw4, w2, 255\n\tcmp\tw4, 9\n\tbhi\t.L3\n\tmov\tw1, w2\n.L4:\n\tadd\tw0, w1, w0, lsl 4\n\tadd\tx3, x3, 1\n\tb\t.L2\n.L3:\n\tsub\tw2, w1, #65\n\tand\tw2, w2, 255\n\tcmp\tw2, 5\n\tbhi\t.L5\n\tsub\tw1, w1, #55\n\tb\t.L4\n.L5:\n\tsub\tw2, w1, #97\n\tand\tw2, w2, 255\n\tcmp\tw2, 5\n\tbhi\t.L1\n\tsub\tw1, w1, #87\n\tb\t.L4\n\t.cfi_endproc\n\n",
".global xtoi\n.type xtoi, %function\nxtoi:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tmov\tx4, x0\n\tmov\tw0, 0\n\tcbnz\tw2, .L6\n\tb\t.L1\n\t.p2align 2,,3\n.L10:\n\tsub\tw3, w2, #55\n.L4:\n\tldrb\tw2, [x4, 1]!\n\tadd\tw0, w3, w0, lsl 4\n\tcbz\tw2, .L1\n.L6:\n\tsub\tw3, w2, #48\n\tsub\tw1, w2, #65\n\tand\tw5, w3, 255\n\tand\tw1, w1, 255\n\tcmp\tw5, 9\n\tbls\t.L4\n\tsub\tw5, w2, #97\n\tsub\tw3, w2, #87\n\tand\tw5, w5, 255\n\tcmp\tw1, 5\n\tbls\t.L10\n\tcmp\tw5, 5\n\tbls\t.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": [
"\"blnyowntfwxpqul\""
],
"var": [
"p"
]
},
{
"value": [
"\"hsnwlgdkvzrljdpvcwp\""
],
"var": [
"p"
]
},
{
"value": [
"\"nqgsgphxzoavusxaihal\""
],
"var": [
"p"
]
},
{
"value": [
"\"hobbaovyewzcnavmmqcdwppa\""
],
"var": [
"p"
]
},
{
"value": [
"\"xbntfkulfoqcvaig\""
],
"var": [
"p"
]
},
{
"value": [
"\"dhaoztwfug\""
],
"var": [
"p"
]
},
{
"value": [
"\"slespfuhzfwo\""
],
"var": [
"p"
]
},
{
"value": [
"\"wkucjyawocamdd\""
],
"var": [
"p"
]
},
{
"value": [
"\"ccyyrpjhw\""
],
"var": [
"p"
]
},
{
"value": [
"\"pknyytmvhrypajaphyfcn\""
],
"var": [
"p"
]
}
],
"output": [
{
"value": [
"\"blnyowntfwxpqul\"",
"11"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"hsnwlgdkvzrljdpvcwp\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"nqgsgphxzoavusxaihal\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"hobbaovyewzcnavmmqcdwppa\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"xbntfkulfoqcvaig\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"dhaoztwfug\"",
"13"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"slespfuhzfwo\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"wkucjyawocamdd\"",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"ccyyrpjhw\"",
"204"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"\"pknyytmvhrypajaphyfcn\"",
"0"
],
"var": [
"p",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_366iymz6nn.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 = xtoi(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);
}
|
develop
|
null
|
{"livein": ["p"], "liveout": ["p"], "returnvarname": ["returnv"], "execcmd": "", "funname": "xtoi", "funargs": ["p"], "typemap": {"p": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_366iymz6nn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
EmulatorArchive/yabause-rr/src/cdbase.c
|
int DummyCDInit(__attribute ((unused)) const char *cdrom_name)
{
return 0;
}
|
int DummyCDInit(const char *cdrom_name)
|
int DummyCDInit(__attribute ((unused)) const char *cdrom_name)
|
DummyCDInit
|
[
"int",
"const char *"
] |
{
"code": [
".globl DummyCDInit\n.type DummyCDInit, @function\nDummyCDInit:\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 DummyCDInit\n.type DummyCDInit, @function\nDummyCDInit:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl DummyCDInit\n.type DummyCDInit, @function\nDummyCDInit:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global DummyCDInit\n.type DummyCDInit, %function\nDummyCDInit:\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 DummyCDInit\n.type DummyCDInit, %function\nDummyCDInit:\n.LFB22:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global DummyCDInit\n.type DummyCDInit, %function\nDummyCDInit:\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 <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": [
"\"jsqoxtpxdudbn\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"wwcfiygptehw\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"tfrrroywot\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"dzmuh\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"qcexbqyoyqth\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"rebwdkzgnzrlmbglerbrddhnvepbo\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"wg\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"onirit\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"xzlunuhqncvdjolxpmfx\""
],
"var": [
"cdrom_name"
]
},
{
"value": [
"\"ciqnyjjot\""
],
"var": [
"cdrom_name"
]
}
],
"output": [
{
"value": [
"\"jsqoxtpxdudbn\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"wwcfiygptehw\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"tfrrroywot\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"dzmuh\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"qcexbqyoyqth\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"rebwdkzgnzrlmbglerbrddhnvepbo\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"wg\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"onirit\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"xzlunuhqncvdjolxpmfx\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
},
{
"value": [
"\"ciqnyjjot\"",
"0"
],
"var": [
"cdrom_name",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_32u57ky21d.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* cdrom_name, int returnv) {
json output_json;
output_json["cdrom_name"] = cdrom_name;
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* cdrom_name = strdup(input_json["cdrom_name"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = DummyCDInit(cdrom_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(cdrom_name, returnv);
}
|
master
|
null
|
{"livein": ["cdrom_name"], "liveout": ["cdrom_name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "DummyCDInit", "funargs": ["cdrom_name"], "typemap": {"cdrom_name": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32u57ky21d.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jpmrno/ITBA-PI/TP07/Encripta.c
|
int retPosVector(char letra, char alfabeto[]) {
int i;
for( i = 0; alfabeto[i]; i++) {
if(alfabeto[i] == letra) {
return i;
}
}
}
|
int retPosVector(charletra, char *alfabeto)
|
int retPosVector(char letra, char alfabeto[])
|
retPosVector
|
[
"int",
"char",
"char *"
] |
{
"code": [
".globl retPosVector\n.type retPosVector, @function\nretPosVector:\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$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.L1\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.L1:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl retPosVector\n.type retPosVector, @function\nretPosVector:\n.LFB24:\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.L1\n\tincq\t%rax\n\tcmpb\t%dil, %dl\n\tjne\t.L2\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl retPosVector\n.type retPosVector, @function\nretPosVector:\n.LFB41:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rsi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L1\n\txorl\t%eax, %eax\n\tjmp\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\taddq\t$1, %rax\n\tmovzbl\t(%rsi,%rax), %edx\n\ttestb\t%dl, %dl\n\tje\t.L1\n.L4:\n\tmovl\t%eax, %r8d\n\tcmpb\t%dl, %dil\n\tjne\t.L10\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global retPosVector\n.type retPosVector, %function\nretPosVector:\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\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.L1\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.L1:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global retPosVector\n.type retPosVector, %function\nretPosVector:\n.LFB24:\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\tcbz\tw3, .L1\n\tadd\tx2, x2, 1\n\tcmp\tw3, w4\n\tbne\t.L2\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global retPosVector\n.type retPosVector, %function\nretPosVector:\n.LFB41:\n\t.cfi_startproc\n\tldrb\tw3, [x1]\n\tand\tw4, w0, 255\n\tcbz\tw3, .L1\n\tmov\tx2, 0\n\tb\t.L4\n\t.p2align 2,,3\n.L10:\n\tldrb\tw3, [x1, x2]\n\tcbz\tw3, .L1\n.L4:\n\tmov\tw0, w2\n\tcmp\tw4, w3\n\tadd\tx2, x2, 1\n\tbne\t.L10\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 <stdio.h>
#include <time.h>
#include <stdlib.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": [
"106",
"\"ptaqhvndi\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"99",
"\"jurqsxuesmjlmwlc\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"17",
"\"mmoszdvagdxqayyhyajkfzdhsx\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"41",
"\"znjojsqtz\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"16",
"\"oixivofxqfcmaaoevtbxdmlp\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"41",
"\"dsfysbai\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"74",
"\"lofbchkxjyoayaclznxiellufkqjjmu\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"68",
"\"mehyidijhagahxqm\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"0",
"\"voavbhynavqjnui\""
],
"var": [
"letra",
"alfabeto"
]
},
{
"value": [
"11",
"\"pjanmmdo\""
],
"var": [
"letra",
"alfabeto"
]
}
],
"output": [
{
"value": [
"\"ptaqhvndi\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"jurqsxuesmjlmwlc\"",
"15"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"mmoszdvagdxqayyhyajkfzdhsx\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"znjojsqtz\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"oixivofxqfcmaaoevtbxdmlp\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"dsfysbai\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"lofbchkxjyoayaclznxiellufkqjjmu\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"mehyidijhagahxqm\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"voavbhynavqjnui\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
},
{
"value": [
"\"pjanmmdo\"",
"0"
],
"var": [
"alfabeto",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_42xwvm1t5e.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 letra, char* alfabeto, int returnv) {
json output_json;
output_json["alfabeto"] = alfabeto;
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 letra = input_json["letra"].get<char>();
char* alfabeto = strdup(input_json["alfabeto"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = retPosVector(letra, alfabeto);
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(letra, alfabeto, returnv);
}
|
master
|
null
|
{"livein": ["letra", "alfabeto"], "liveout": ["alfabeto"], "returnvarname": ["returnv"], "execcmd": "", "funname": "retPosVector", "funargs": ["letra", "alfabeto"], "typemap": {"letra": "int8", "alfabeto": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42xwvm1t5e.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
patholden/linux/drivers/CgosLib/Cgos.c
|
unsigned int CgosStrLen(const char *s)
{
const char *ss=s;
if (!s) return 0;
while (*s++);
return s-ss-1;
}
|
unsigned int CgosStrLen(const char *s)
|
unsigned int CgosStrLen(const char *s)
|
CgosStrLen
|
[
"unsigned int",
"const char *"
] |
{
"code": [
".globl CgosStrLen\n.type CgosStrLen, @function\nCgosStrLen:\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\tcmpq\t$0, -24(%rbp)\n\tjne\t.L5\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L5:\n\tnop\n.L4:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L4\n\tmovq\t-24(%rbp), %rax\n\tsubq\t-8(%rbp), %rax\n\tsubl\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 CgosStrLen\n.type CgosStrLen, @function\nCgosStrLen:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestq\t%rdi, %rdi\n\tje\t.L1\n\tmovq\t%rdi, %rax\n.L3:\n\tincq\t%rax\n\tcmpb\t$0, -1(%rax)\n\tjne\t.L3\n\tsubq\t%rdi, %rax\n\tdecl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl CgosStrLen\n.type CgosStrLen, @function\nCgosStrLen:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rdi, %rdi\n\tje\t.L4\n\tmovq\t%rdi, %rax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\taddq\t$1, %rax\n\tcmpb\t$0, -1(%rax)\n\tjne\t.L3\n\tsubq\t%rdi, %rax\n\tsubl\t$1, %eax\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 CgosStrLen\n.type CgosStrLen, %function\nCgosStrLen:\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\tldr\tx0, [sp, 8]\n\tcmp\tx0, 0\n\tbne\t.L5\n\tmov\tw0, 0\n\tb\t.L3\n.L5:\n\tnop\n.L4:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L4\n\tldr\tx1, [sp, 8]\n\tldr\tx0, [sp, 24]\n\tsub\tx0, x1, x0\n\tsub\tw0, w0, #1\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global CgosStrLen\n.type CgosStrLen, %function\nCgosStrLen:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tx0, .L4\n\tmov\tx1, x0\n.L3:\n\tldrb\tw2, [x1], 1\n\tcbnz\tw2, .L3\n\tsub\tx0, x1, x0\n\tsub\tw0, w0, #1\n.L1:\n\tret\n.L4:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global CgosStrLen\n.type CgosStrLen, %function\nCgosStrLen:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tx0, .L4\n\tmov\tx1, x0\n\t.p2align 3,,7\n.L3:\n\tldrb\tw2, [x1], 1\n\tcbnz\tw2, .L3\n\tsub\tx0, x1, x0\n\tsub\tw0, w0, #1\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 |
# 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": [
"\"zyhvcma\""
],
"var": [
"s"
]
},
{
"value": [
"\"xrkcjmjnwgti\""
],
"var": [
"s"
]
},
{
"value": [
"\"wyufmgwdyjtoivwda\""
],
"var": [
"s"
]
},
{
"value": [
"\"ynj\""
],
"var": [
"s"
]
},
{
"value": [
"\"\""
],
"var": [
"s"
]
},
{
"value": [
"\"pnugbokhleroshkispjohjezaheimkt\""
],
"var": [
"s"
]
},
{
"value": [
"\"bn\""
],
"var": [
"s"
]
},
{
"value": [
"\"t\""
],
"var": [
"s"
]
},
{
"value": [
"\"ooskqiwlvhcaryz\""
],
"var": [
"s"
]
},
{
"value": [
"\"ewgaqsuvpfy\""
],
"var": [
"s"
]
}
],
"output": [
{
"value": [
"7",
"\"zyhvcma\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"12",
"\"xrkcjmjnwgti\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"17",
"\"wyufmgwdyjtoivwda\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"3",
"\"ynj\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"0",
"\"\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"31",
"\"pnugbokhleroshkispjohjezaheimkt\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"2",
"\"bn\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"1",
"\"t\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"15",
"\"ooskqiwlvhcaryz\""
],
"var": [
"returnv",
"s"
]
},
{
"value": [
"11",
"\"ewgaqsuvpfy\""
],
"var": [
"returnv",
"s"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_36p06yur55.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* s, unsigned int returnv) {
json output_json;
output_json["s"] = s;
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* s = strdup(input_json["s"].get<std::string>().c_str());
clock_t begin = clock();
unsigned int returnv = CgosStrLen(s);
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(s, returnv);
}
|
master
|
null
|
{"livein": ["s"], "liveout": ["s"], "returnvarname": ["returnv"], "execcmd": "", "funname": "CgosStrLen", "funargs": ["s"], "typemap": {"s": "string", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_36p06yur55.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
scateu/gps-sdr-sim/gpssim.c
|
int checkExpDesignator(char *str, int len)
{
int i,n=0;
for (i=0; i<len; i++)
{
if (str[i]=='D')
{
n++;
str[i] = 'E';
}
}
return(n);
}
|
int checkExpDesignator(char *str, intlen)
|
int checkExpDesignator(char *str, int len)
|
checkExpDesignator
|
[
"int",
"char *",
"int"
] |
{
"code": [
".globl checkExpDesignator\n.type checkExpDesignator, @function\ncheckExpDesignator:\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%esi, -28(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tjmp\t.L2\n.L4:\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\tcmpb\t$68, %al\n\tjne\t.L3\n\taddl\t$1, -4(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovb\t$69, (%rax)\n.L3:\n\taddl\t$1, -8(%rbp)\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjl\t.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 checkExpDesignator\n.type checkExpDesignator, @function\ncheckExpDesignator:\n.LFB46:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\txorl\t%r8d, %r8d\n.L2:\n\tcmpl\t%eax, %esi\n\tjle\t.L6\n\tcmpb\t$68, (%rdi,%rax)\n\tjne\t.L3\n\tmovb\t$69, (%rdi,%rax)\n\tincl\t%r8d\n.L3:\n\tincq\t%rax\n\tjmp\t.L2\n.L6:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl checkExpDesignator\n.type checkExpDesignator, @function\ncheckExpDesignator:\n.LFB61:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%esi, %esi\n\tjle\t.L5\n\tleal\t-1(%rsi), %eax\n\txorl\t%r8d, %r8d\n\tleaq\t1(%rdi,%rax), %rax\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tcmpb\t$68, (%rdi)\n\tjne\t.L3\n\tmovb\t$69, (%rdi)\n\taddl\t$1, %r8d\n.L3:\n\taddq\t$1, %rdi\n\tcmpq\t%rax, %rdi\n\tjne\t.L4\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\txorl\t%r8d, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global checkExpDesignator\n.type checkExpDesignator, %function\ncheckExpDesignator:\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\tw1, [sp, 4]\n\tstr\twzr, [sp, 28]\n\tstr\twzr, [sp, 24]\n\tb\t.L2\n.L4:\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 68\n\tbne\t.L3\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tmov\tw1, 69\n\tstrb\tw1, [x0]\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, 4]\n\tcmp\tw1, w0\n\tblt\t.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 checkExpDesignator\n.type checkExpDesignator, %function\ncheckExpDesignator:\n.LFB46:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tmov\tx2, 0\n\tmov\tw0, 0\n\tmov\tw4, 69\n.L2:\n\tcmp\tw1, w2\n\tbgt\t.L4\n\tret\n.L4:\n\tldrb\tw5, [x3, x2]\n\tcmp\tw5, 68\n\tbne\t.L3\n\tadd\tw0, w0, 1\n\tstrb\tw4, [x3, x2]\n.L3:\n\tadd\tx2, x2, 1\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global checkExpDesignator\n.type checkExpDesignator, %function\ncheckExpDesignator:\n.LFB61:\n\t.cfi_startproc\n\tcmp\tw1, 0\n\tble\t.L5\n\tadd\tx3, x0, 1\n\tsub\tw1, w1, #1\n\tadd\tx3, x3, x1\n\tmov\tx2, x0\n\tmov\tw4, 69\n\tmov\tw0, 0\n\t.p2align 3,,7\n.L4:\n\tldrb\tw1, [x2]\n\tcmp\tw1, 68\n\tbne\t.L3\n\tadd\tw0, w0, 1\n\tstrb\tw4, [x2]\n.L3:\n\tadd\tx2, x2, 1\n\tcmp\tx2, x3\n\tbne\t.L4\n\tret\n\t.p2align 2,,3\n.L5:\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 <string.h>
#include <math.h>
#include <time.h>
#include <omp.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": [
"\"hbiwitvyfuqdltdkfkzq\"",
"113"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"oyxvszkqxnvmulknalnkzpcnixadcxk\"",
"81"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"ptyllryst\"",
"24"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"qeurbxkoohoojsxsduzgxpkpgjgsebx\"",
"124"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"bdd\"",
"53"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"gcxhtrqihsohfmvkuqtqm\"",
"69"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"ziufpojtqlnxmze\"",
"64"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"zcuvkpajawsmamhtfyvseutwchf\"",
"40"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"k\"",
"60"
],
"var": [
"str",
"len"
]
},
{
"value": [
"\"qztlfxluhqivheodmvhn\"",
"62"
],
"var": [
"str",
"len"
]
}
],
"output": [
{
"value": [
"0",
"\"hbiwitvyfuqdltdkfkzq\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"oyxvszkqxnvmulknalnkzpcnixadcxk\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"ptyllryst\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"qeurbxkoohoojsxsduzgxpkpgjgsebx\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"bdd\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"gcxhtrqihsohfmvkuqtqm\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"ziufpojtqlnxmze\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"zcuvkpajawsmamhtfyvseutwchf\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"k\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"0",
"\"qztlfxluhqivheodmvhn\""
],
"var": [
"returnv",
"str"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_48murrzju8.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* str, int len, int returnv) {
json output_json;
output_json["str"] = str;
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* str = strdup(input_json["str"].get<std::string>().c_str());
int len = input_json["len"];
clock_t begin = clock();
int returnv = checkExpDesignator(str, len);
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(str, len, returnv);
}
|
master
|
null
|
{"livein": ["str", "len"], "liveout": ["str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "checkExpDesignator", "funargs": ["str", "len"], "typemap": {"str": "string", "len": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48murrzju8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
IMGJulian/incubator-mynewt-core/net/oic/src/port/mynewt/storage.c
|
int oc_storage_config(const char *store) {
return -1;
}
|
int oc_storage_config(const char *store)
|
int oc_storage_config(const char *store)
|
oc_storage_config
|
[
"int",
"const char *"
] |
{
"code": [
".globl oc_storage_config\n.type oc_storage_config, @function\noc_storage_config:\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$-1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl oc_storage_config\n.type oc_storage_config, @function\noc_storage_config:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl oc_storage_config\n.type oc_storage_config, @function\noc_storage_config:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n",
".global oc_storage_config\n.type oc_storage_config, %function\noc_storage_config:\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, -1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global oc_storage_config\n.type oc_storage_config, %function\noc_storage_config:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n",
".global oc_storage_config\n.type oc_storage_config, %function\noc_storage_config:\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 |
#include <stddef.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": [
"\"twfxohawclwgybhsnvrxjytxlvat\""
],
"var": [
"store"
]
},
{
"value": [
"\"bgiwcwp\""
],
"var": [
"store"
]
},
{
"value": [
"\"hqymfjvofjwfidvkhg\""
],
"var": [
"store"
]
},
{
"value": [
"\"whngyzuj\""
],
"var": [
"store"
]
},
{
"value": [
"\"fsdlyjlthxhsaffllabwxfocs\""
],
"var": [
"store"
]
},
{
"value": [
"\"duvdfrzodsquhruidqcyxk\""
],
"var": [
"store"
]
},
{
"value": [
"\"udjqnlzlwdd\""
],
"var": [
"store"
]
},
{
"value": [
"\"yedtzdatsulffrf\""
],
"var": [
"store"
]
},
{
"value": [
"\"phpbhlqppoqbanreywepwytbrl\""
],
"var": [
"store"
]
},
{
"value": [
"\"ujtmekftlc\""
],
"var": [
"store"
]
}
],
"output": [
{
"value": [
"-1",
"\"twfxohawclwgybhsnvrxjytxlvat\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"bgiwcwp\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"hqymfjvofjwfidvkhg\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"whngyzuj\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"fsdlyjlthxhsaffllabwxfocs\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"duvdfrzodsquhruidqcyxk\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"udjqnlzlwdd\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"yedtzdatsulffrf\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"phpbhlqppoqbanreywepwytbrl\""
],
"var": [
"returnv",
"store"
]
},
{
"value": [
"-1",
"\"ujtmekftlc\""
],
"var": [
"returnv",
"store"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_40p8geyabz.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* store, int returnv) {
json output_json;
output_json["store"] = store;
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* store = strdup(input_json["store"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = oc_storage_config(store);
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(store, returnv);
}
|
master
|
null
|
{"livein": ["store"], "liveout": ["store"], "returnvarname": ["returnv"], "execcmd": "", "funname": "oc_storage_config", "funargs": ["store"], "typemap": {"store": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40p8geyabz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
RagEmu/PreRenewal/src/char/int_mercenary.c
|
int inter_mercenary_sql_init(void)
{
return 0;
}
|
int inter_mercenary_sql_init()
|
int inter_mercenary_sql_init(void)
|
inter_mercenary_sql_init
|
[
"int",
""
] |
{
"code": [
".globl inter_mercenary_sql_init\n.type inter_mercenary_sql_init, @function\ninter_mercenary_sql_init:\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 inter_mercenary_sql_init\n.type inter_mercenary_sql_init, @function\ninter_mercenary_sql_init:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl inter_mercenary_sql_init\n.type inter_mercenary_sql_init, @function\ninter_mercenary_sql_init:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global inter_mercenary_sql_init\n.type inter_mercenary_sql_init, %function\ninter_mercenary_sql_init:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global inter_mercenary_sql_init\n.type inter_mercenary_sql_init, %function\ninter_mercenary_sql_init:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global inter_mercenary_sql_init\n.type inter_mercenary_sql_init, %function\ninter_mercenary_sql_init:\n.LFB39:\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>
# 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_552v5qfg4w.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 = inter_mercenary_sql_init();
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": "inter_mercenary_sql_init", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_552v5qfg4w.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
beaukams/controleDistance/testes/test2.c
|
int tester(int num){
return num;
}
|
int tester(intnum)
|
int tester(int num)
|
tester
|
[
"int",
"int"
] |
{
"code": [
".globl tester\n.type tester, @function\ntester:\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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl tester\n.type tester, @function\ntester:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl tester\n.type tester, @function\ntester:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global tester\n.type tester, %function\ntester:\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\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global tester\n.type tester, %function\ntester:\n.LFB13:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global tester\n.type tester, %function\ntester:\n.LFB23:\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>
# 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": [
"num"
]
},
{
"value": [
"111"
],
"var": [
"num"
]
},
{
"value": [
"10"
],
"var": [
"num"
]
},
{
"value": [
"96"
],
"var": [
"num"
]
},
{
"value": [
"91"
],
"var": [
"num"
]
},
{
"value": [
"44"
],
"var": [
"num"
]
},
{
"value": [
"29"
],
"var": [
"num"
]
},
{
"value": [
"75"
],
"var": [
"num"
]
},
{
"value": [
"23"
],
"var": [
"num"
]
},
{
"value": [
"52"
],
"var": [
"num"
]
}
],
"output": [
{
"value": [
"19"
],
"var": [
"returnv"
]
},
{
"value": [
"111"
],
"var": [
"returnv"
]
},
{
"value": [
"10"
],
"var": [
"returnv"
]
},
{
"value": [
"96"
],
"var": [
"returnv"
]
},
{
"value": [
"91"
],
"var": [
"returnv"
]
},
{
"value": [
"44"
],
"var": [
"returnv"
]
},
{
"value": [
"29"
],
"var": [
"returnv"
]
},
{
"value": [
"75"
],
"var": [
"returnv"
]
},
{
"value": [
"23"
],
"var": [
"returnv"
]
},
{
"value": [
"52"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_38djbczs8z.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 num, 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 num = input_json["num"];
clock_t begin = clock();
int returnv = tester(num);
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(num, returnv);
}
|
master
|
null
|
{"livein": ["num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "tester", "funargs": ["num"], "typemap": {"num": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38djbczs8z.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
torchhound/projects/c/logicJunk.c
|
int logicOr(int x, int y) {
if (x || y == 1) {
return 1;
}
else {
return 0;
}
}
|
int logicOr(intx, inty)
|
int logicOr(int x, int y)
|
logicOr
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl logicOr\n.type logicOr, @function\nlogicOr:\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$0, -4(%rbp)\n\tjne\t.L2\n\tcmpl\t$1, -8(%rbp)\n\tjne\t.L3\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L4\n.L3:\n\tmovl\t$0, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl logicOr\n.type logicOr, @function\nlogicOr:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tdecl\t%esi\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl logicOr\n.type logicOr, @function\nlogicOr:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tsetne\t%al\n\tcmpl\t$1, %esi\n\tsete\t%dl\n\torl\t%edx, %eax\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n",
".global logicOr\n.type logicOr, %function\nlogicOr:\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\tcmp\tw0, 0\n\tbne\t.L2\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 1\n\tbne\t.L3\n.L2:\n\tmov\tw0, 1\n\tb\t.L4\n.L3:\n\tmov\tw0, 0\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global logicOr\n.type logicOr, %function\nlogicOr:\n.LFB13:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tccmp\tw1, 1, 4, eq\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n",
".global logicOr\n.type logicOr, %function\nlogicOr:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tccmp\tw1, 1, 4, eq\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>
# 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": [
"85",
"61"
],
"var": [
"x",
"y"
]
},
{
"value": [
"80",
"25"
],
"var": [
"x",
"y"
]
},
{
"value": [
"123",
"86"
],
"var": [
"x",
"y"
]
},
{
"value": [
"78",
"38"
],
"var": [
"x",
"y"
]
},
{
"value": [
"17",
"6"
],
"var": [
"x",
"y"
]
},
{
"value": [
"49",
"2"
],
"var": [
"x",
"y"
]
},
{
"value": [
"75",
"44"
],
"var": [
"x",
"y"
]
},
{
"value": [
"114",
"68"
],
"var": [
"x",
"y"
]
},
{
"value": [
"90",
"10"
],
"var": [
"x",
"y"
]
},
{
"value": [
"50",
"96"
],
"var": [
"x",
"y"
]
}
],
"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_488dei5klo.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 = logicOr(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": "logicOr", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_488dei5klo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
apple/swift-clang/3rd/templight/llvm/tools/clang/test/CodeGen/ubsan-shift.c
|
int f6(int c, int shamt) {
return c << shamt;
}
|
int f6(intc, intshamt)
|
int f6(int c, int shamt)
|
f6
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl f6\n.type f6, @function\nf6:\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\tmovl\t-4(%rbp), %edx\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %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 f6\n.type f6, @function\nf6:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\tsall\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl f6\n.type f6, @function\nf6:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\tsall\t%cl, %eax\n\tret\n\t.cfi_endproc\n\n",
".global f6\n.type f6, %function\nf6:\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\tldr\tw1, [sp, 12]\n\tlsl\tw0, w1, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global f6\n.type f6, %function\nf6:\n.LFB0:\n\t.cfi_startproc\n\tlsl\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n",
".global f6\n.type f6, %function\nf6:\n.LFB0:\n\t.cfi_startproc\n\tlsl\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": [
"64",
"67"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"84",
"34"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"39",
"52"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"87",
"1"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"11",
"97"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"62",
"35"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"86",
"21"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"46",
"21"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"120",
"1"
],
"var": [
"c",
"shamt"
]
},
{
"value": [
"84",
"69"
],
"var": [
"c",
"shamt"
]
}
],
"output": [
{
"value": [
"512"
],
"var": [
"returnv"
]
},
{
"value": [
"336"
],
"var": [
"returnv"
]
},
{
"value": [
"40894464"
],
"var": [
"returnv"
]
},
{
"value": [
"174"
],
"var": [
"returnv"
]
},
{
"value": [
"22"
],
"var": [
"returnv"
]
},
{
"value": [
"496"
],
"var": [
"returnv"
]
},
{
"value": [
"180355072"
],
"var": [
"returnv"
]
},
{
"value": [
"96468992"
],
"var": [
"returnv"
]
},
{
"value": [
"240"
],
"var": [
"returnv"
]
},
{
"value": [
"2688"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_4580f4d212.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 shamt, 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"];
int shamt = input_json["shamt"];
clock_t begin = clock();
int returnv = f6(c, shamt);
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, shamt, returnv);
}
|
bb-clusters
|
null
|
{"livein": ["c", "shamt"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f6", "funargs": ["c", "shamt"], "typemap": {"c": "int32", "shamt": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_4580f4d212.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Cnidarias/al-go-rithms/cryptography/atbash_cipher/c/atbash_cipher.c
|
char cipher (char c){
if(c >= 65 && c<= 90){
c = c - 65;
c = 90 - c;
}else if( c >= 97 && c<= 122){
c = c-97;
c = 122 - c;
}
return c;
}
|
char cipher(charc)
|
char cipher (char c)
|
cipher
|
[
"char",
"char"
] |
{
"code": [
".globl cipher\n.type cipher, @function\ncipher:\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\tcmpb\t$64, -4(%rbp)\n\tjle\t.L2\n\tcmpb\t$90, -4(%rbp)\n\tjg\t.L2\n\tmovzbl\t-4(%rbp), %eax\n\tsubl\t$65, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovzbl\t-4(%rbp), %eax\n\tmovl\t$90, %edx\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovb\t%al, -4(%rbp)\n\tjmp\t.L3\n.L2:\n\tcmpb\t$96, -4(%rbp)\n\tjle\t.L3\n\tcmpb\t$122, -4(%rbp)\n\tjg\t.L3\n\tmovzbl\t-4(%rbp), %eax\n\tsubl\t$97, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovzbl\t-4(%rbp), %eax\n\tmovl\t$122, %edx\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovb\t%al, -4(%rbp)\n.L3:\n\tmovzbl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl cipher\n.type cipher, @function\ncipher:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %edx\n\tmovl\t%edi, %eax\n\tcmpb\t$25, %dl\n\tja\t.L2\n\tmovb\t$90, %al\n\tsubl\t%edx, %eax\n\tret\n.L2:\n\tsubl\t$97, %edi\n\tcmpb\t$25, %dil\n\tja\t.L3\n\tmovb\t$122, %al\n\tsubl\t%edi, %eax\n.L3:\n\tret\n\t.cfi_endproc\n\n",
".globl cipher\n.type cipher, @function\ncipher:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %eax\n\tcmpb\t$25, %al\n\tja\t.L2\n\tmovl\t$90, %edi\n\tsubl\t%eax, %edi\n\tmovl\t%edi, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tleal\t-97(%rdi), %edx\n\tmovl\t$122, %eax\n\tsubl\t%edx, %eax\n\tcmpb\t$26, %dl\n\tcmovnb\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global cipher\n.type cipher, %function\ncipher:\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, 64\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 90\n\tbhi\t.L2\n\tldrb\tw0, [sp, 15]\n\tsub\tw0, w0, #65\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tmov\tw1, 90\n\tsub\tw0, w1, w0\n\tstrb\tw0, [sp, 15]\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 96\n\tbls\t.L3\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 122\n\tbhi\t.L3\n\tldrb\tw0, [sp, 15]\n\tsub\tw0, w0, #97\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tmov\tw1, 122\n\tsub\tw0, w1, w0\n\tstrb\tw0, [sp, 15]\n.L3:\n\tldrb\tw0, [sp, 15]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global cipher\n.type cipher, %function\ncipher:\n.LFB24:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tand\tw1, w1, 255\n\tcmp\tw1, 25\n\tbhi\t.L2\n\tmov\tw0, 90\n.L4:\n\tsub\tw0, w0, w1\n\tand\tw0, w0, 255\n.L3:\n\tret\n.L2:\n\tsub\tw1, w0, #97\n\tand\tw1, w1, 255\n\tcmp\tw1, 25\n\tbhi\t.L3\n\tmov\tw0, 122\n\tb\t.L4\n\t.cfi_endproc\n\n",
".global cipher\n.type cipher, %function\ncipher:\n.LFB34:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tand\tw1, w1, 255\n\tcmp\tw1, 25\n\tbhi\t.L2\n\tmov\tw0, 90\n\tsub\tw0, w0, w1\n\tand\tw0, w0, 255\n\tret\n\t.p2align 2,,3\n.L2:\n\tsub\tw2, w0, #97\n\tmov\tw1, 122\n\tand\tw3, w2, 255\n\tsub\tw1, w1, w2, uxtb\n\tcmp\tw3, 26\n\tand\tw1, w1, 255\n\tcsel\tw0, w1, w0, cc\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>
# 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": [
"124"
],
"var": [
"c"
]
},
{
"value": [
"106"
],
"var": [
"c"
]
},
{
"value": [
"48"
],
"var": [
"c"
]
},
{
"value": [
"94"
],
"var": [
"c"
]
},
{
"value": [
"92"
],
"var": [
"c"
]
},
{
"value": [
"84"
],
"var": [
"c"
]
},
{
"value": [
"17"
],
"var": [
"c"
]
},
{
"value": [
"75"
],
"var": [
"c"
]
},
{
"value": [
"79"
],
"var": [
"c"
]
},
{
"value": [
"20"
],
"var": [
"c"
]
}
],
"output": [
{
"value": [
"124"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"48"
],
"var": [
"returnv"
]
},
{
"value": [
"94"
],
"var": [
"returnv"
]
},
{
"value": [
"92"
],
"var": [
"returnv"
]
},
{
"value": [
"71"
],
"var": [
"returnv"
]
},
{
"value": [
"17"
],
"var": [
"returnv"
]
},
{
"value": [
"80"
],
"var": [
"returnv"
]
},
{
"value": [
"76"
],
"var": [
"returnv"
]
},
{
"value": [
"20"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_42ecrm7t2u.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 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();
char returnv = cipher(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": "cipher", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42ecrm7t2u.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jeltz/rust-debian-package/external/clang/test/Analysis/inline4.c
|
int
g(int a)
{
return a;
}
|
int g(inta)
|
int g(int a)
|
g
|
[
"int",
"int"
] |
{
"code": [
".globl g\n.type g, @function\ng:\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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl g\n.type g, @function\ng:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl g\n.type g, @function\ng:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global g\n.type g, %function\ng:\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\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global g\n.type g, %function\ng:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global g\n.type g, %function\ng:\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": [
"23"
],
"var": [
"a"
]
},
{
"value": [
"81"
],
"var": [
"a"
]
},
{
"value": [
"124"
],
"var": [
"a"
]
},
{
"value": [
"6"
],
"var": [
"a"
]
},
{
"value": [
"42"
],
"var": [
"a"
]
},
{
"value": [
"23"
],
"var": [
"a"
]
},
{
"value": [
"57"
],
"var": [
"a"
]
},
{
"value": [
"110"
],
"var": [
"a"
]
},
{
"value": [
"93"
],
"var": [
"a"
]
},
{
"value": [
"12"
],
"var": [
"a"
]
}
],
"output": [
{
"value": [
"23"
],
"var": [
"returnv"
]
},
{
"value": [
"81"
],
"var": [
"returnv"
]
},
{
"value": [
"124"
],
"var": [
"returnv"
]
},
{
"value": [
"6"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"23"
],
"var": [
"returnv"
]
},
{
"value": [
"57"
],
"var": [
"returnv"
]
},
{
"value": [
"110"
],
"var": [
"returnv"
]
},
{
"value": [
"93"
],
"var": [
"returnv"
]
},
{
"value": [
"12"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_566ff3cw63.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 = g(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": "g", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_566ff3cw63.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
clemensv/D2C-RPi-OBDLogger/src/obdinfo/obdconvertfunctions.c
|
float obdConvert_44 (unsigned int A, unsigned int B, unsigned int C, unsigned int D) {
return ((float)A*256.0f+(float)B)*0.0000305f;
}
|
float obdConvert_44(unsigned intA, unsigned intB, unsigned intC, unsigned intD)
|
float obdConvert_44 (unsigned int A, unsigned int B, unsigned int C, unsigned int D)
|
obdConvert_44
|
[
"float",
"unsigned int",
"unsigned int",
"unsigned int",
"unsigned int"
] |
{
"code": [
".globl obdConvert_44\n.type obdConvert_44, @function\nobdConvert_44:\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%ecx, -16(%rbp)\n\tmovl\t-4(%rbp), %eax\n\ttestq\t%rax, %rax\n\tjs\t.L2\n\tcvtsi2ssq\t%rax, %xmm0\n\tjmp\t.L3\n.L2:\n\tmovq\t%rax, %rdx\n\tshrq\t%rdx\n\tandl\t$1, %eax\n\torq\t%rax, %rdx\n\tcvtsi2ssq\t%rdx, %xmm0\n\taddss\t%xmm0, %xmm0\n.L3:\n\tmovss\t.LC0(%rip), %xmm1\n\tmulss\t%xmm0, %xmm1\n\tmovl\t-8(%rbp), %eax\n\ttestq\t%rax, %rax\n\tjs\t.L4\n\tcvtsi2ssq\t%rax, %xmm0\n\tjmp\t.L5\n.L4:\n\tmovq\t%rax, %rdx\n\tshrq\t%rdx\n\tandl\t$1, %eax\n\torq\t%rax, %rdx\n\tcvtsi2ssq\t%rdx, %xmm0\n\taddss\t%xmm0, %xmm0\n.L5:\n\taddss\t%xmm0, %xmm1\n\tmovss\t.LC1(%rip), %xmm0\n\tmulss\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1132462080\n.LC1: \t.long\t939514432\n",
".globl obdConvert_44\n.type obdConvert_44, @function\nobdConvert_44:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edi\n\tmovl\t%esi, %esi\n\tcvtsi2ssq\t%rdi, %xmm0\n\tmulss\t.LC0(%rip), %xmm0\n\tcvtsi2ssq\t%rsi, %xmm1\n\taddss\t%xmm1, %xmm0\n\tmulss\t.LC1(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1132462080\n.LC1: \t.long\t939514432\n",
".globl obdConvert_44\n.type obdConvert_44, @function\nobdConvert_44:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edi\n\tpxor\t%xmm0, %xmm0\n\tpxor\t%xmm1, %xmm1\n\tmovl\t%esi, %esi\n\tcvtsi2ssq\t%rdi, %xmm0\n\tmulss\t.LC0(%rip), %xmm0\n\tcvtsi2ssq\t%rsi, %xmm1\n\taddss\t%xmm1, %xmm0\n\tmulss\t.LC1(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t1132462080\n.LC1: \t.long\t939514432\n",
".global obdConvert_44\n.type obdConvert_44, %function\nobdConvert_44:\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\tstr\tw3, [sp]\n\tldr\ts0, [sp, 12]\n\tucvtf\ts0, s0\n\tmov\tw0, 1132462080\n\tfmov\ts1, w0\n\tfmul\ts1, s0, s1\n\tldr\ts0, [sp, 8]\n\tucvtf\ts0, s0\n\tfadd\ts0, s1, s0\n\tmov\tw0, 55872\n\tmovk\tw0, 0x37ff, lsl 16\n\tfmov\ts1, w0\n\tfmul\ts0, s0, s1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global obdConvert_44\n.type obdConvert_44, %function\nobdConvert_44:\n.LFB0:\n\t.cfi_startproc\n\tucvtf\ts1, w0\n\tmov\tw0, 1132462080\n\tfmov\ts2, w0\n\tucvtf\ts0, w1\n\tmov\tw0, 55872\n\tmovk\tw0, 0x37ff, lsl 16\n\tfmadd\ts0, s1, s2, s0\n\tfmov\ts1, w0\n\tfmul\ts0, s0, s1\n\tret\n\t.cfi_endproc\n\n",
".global obdConvert_44\n.type obdConvert_44, %function\nobdConvert_44:\n.LFB0:\n\t.cfi_startproc\n\tucvtf\ts3, w0\n\tmov\tw2, 1132462080\n\tfmov\ts0, w2\n\tucvtf\ts1, w1\n\tmov\tw2, 55872\n\tmovk\tw2, 0x37ff, lsl 16\n\tfmov\ts2, w2\n\tfmadd\ts0, s3, s0, s1\n\tfmul\ts0, s0, s2\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": [
"828",
"245",
"955",
"699"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"669",
"890",
"536",
"954"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"251",
"458",
"807",
"447"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"591",
"606",
"347",
"630"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"392",
"847",
"410",
"964"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"845",
"972",
"302",
"177"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"572",
"60",
"800",
"775"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"870",
"294",
"540",
"682"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"138",
"518",
"64",
"689"
],
"var": [
"A",
"B",
"C",
"D"
]
},
{
"value": [
"912",
"674",
"669",
"15"
],
"var": [
"A",
"B",
"C",
"D"
]
}
],
"output": [
{
"value": [
"6.472496509552002"
],
"var": [
"returnv"
]
},
{
"value": [
"5.250697135925293"
],
"var": [
"returnv"
]
},
{
"value": [
"1.973776936531067"
],
"var": [
"returnv"
]
},
{
"value": [
"4.6330108642578125"
],
"var": [
"returnv"
]
},
{
"value": [
"3.0865695476531982"
],
"var": [
"returnv"
]
},
{
"value": [
"6.627405643463135"
],
"var": [
"returnv"
]
},
{
"value": [
"4.468006134033203"
],
"var": [
"returnv"
]
},
{
"value": [
"6.801927089691162"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0933029651641846"
],
"var": [
"returnv"
]
},
{
"value": [
"7.141452789306641"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_323iizv6_1.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 A, unsigned int B, unsigned int C, unsigned int D, 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);
unsigned int A = input_json["A"];
unsigned int B = input_json["B"];
unsigned int C = input_json["C"];
unsigned int D = input_json["D"];
clock_t begin = clock();
float returnv = obdConvert_44(A, B, C, 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(A, B, C, D, returnv);
}
|
master
|
null
|
{"livein": ["A", "B", "C", "D"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "obdConvert_44", "funargs": ["A", "B", "C", "D"], "typemap": {"A": "uint32", "B": "uint32", "C": "uint32", "D": "uint32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_323iizv6_1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
epiqc/ScaffCC/clang/test/Driver/riscv32-toolchain.c
|
double check_double() { return 0; }
|
double check_double()
|
double check_double()
|
check_double
|
[
"double",
""
] |
{
"code": [
".globl check_double\n.type check_double, @function\ncheck_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\tpxor\t%xmm0, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl check_double\n.type check_double, @function\ncheck_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorps\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl check_double\n.type check_double, @function\ncheck_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global check_double\n.type check_double, %function\ncheck_double:\n.LFB0:\n\t.cfi_startproc\n\tmovi\td0, #0\n\tret\n\t.cfi_endproc\n\n",
".global check_double\n.type check_double, %function\ncheck_double:\n.LFB0:\n\t.cfi_startproc\n\tmovi\td0, #0\n\tret\n\t.cfi_endproc\n\n",
".global check_double\n.type check_double, %function\ncheck_double:\n.LFB0:\n\t.cfi_startproc\n\tmovi\td0, #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.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_30izs7qyt6.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 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();
double returnv = check_double();
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": "check_double", "funargs": [], "typemap": {"returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30izs7qyt6.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
AntonMirgorod/Redcode/COREWAR_SRC/libft/ft_tolower.c
|
int ft_tolower(int c)
{
if (c <= 90 && c >= 65)
return (c + 32);
return (c);
}
|
int ft_tolower(intc)
|
int ft_tolower(int c)
|
ft_tolower
|
[
"int",
"int"
] |
{
"code": [
".globl ft_tolower\n.type ft_tolower, @function\nft_tolower:\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$90, -4(%rbp)\n\tjg\t.L2\n\tcmpl\t$64, -4(%rbp)\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\taddl\t$32, %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 ft_tolower\n.type ft_tolower, @function\nft_tolower:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %edx\n\tmovl\t%edi, %eax\n\tcmpl\t$25, %edx\n\tja\t.L2\n\taddl\t$32, %eax\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".globl ft_tolower\n.type ft_tolower, @function\nft_tolower:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %ecx\n\tmovl\t%edi, %eax\n\tleal\t32(%rdi), %edx\n\tcmpl\t$26, %ecx\n\tcmovb\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".global ft_tolower\n.type ft_tolower, %function\nft_tolower:\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, 90\n\tbgt\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 64\n\tble\t.L2\n\tldr\tw0, [sp, 12]\n\tadd\tw0, w0, 32\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 ft_tolower\n.type ft_tolower, %function\nft_tolower:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw1, w0, #65\n\tcmp\tw1, 25\n\tbhi\t.L2\n\tadd\tw0, w0, 32\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".global ft_tolower\n.type ft_tolower, %function\nft_tolower:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw2, w0, #65\n\tadd\tw1, w0, 32\n\tcmp\tw2, 26\n\tcsel\tw0, w1, w0, cc\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": [
"114"
],
"var": [
"c"
]
},
{
"value": [
"71"
],
"var": [
"c"
]
},
{
"value": [
"60"
],
"var": [
"c"
]
},
{
"value": [
"105"
],
"var": [
"c"
]
},
{
"value": [
"37"
],
"var": [
"c"
]
},
{
"value": [
"109"
],
"var": [
"c"
]
},
{
"value": [
"47"
],
"var": [
"c"
]
},
{
"value": [
"75"
],
"var": [
"c"
]
},
{
"value": [
"76"
],
"var": [
"c"
]
},
{
"value": [
"44"
],
"var": [
"c"
]
}
],
"output": [
{
"value": [
"114"
],
"var": [
"returnv"
]
},
{
"value": [
"103"
],
"var": [
"returnv"
]
},
{
"value": [
"60"
],
"var": [
"returnv"
]
},
{
"value": [
"105"
],
"var": [
"returnv"
]
},
{
"value": [
"37"
],
"var": [
"returnv"
]
},
{
"value": [
"109"
],
"var": [
"returnv"
]
},
{
"value": [
"47"
],
"var": [
"returnv"
]
},
{
"value": [
"107"
],
"var": [
"returnv"
]
},
{
"value": [
"108"
],
"var": [
"returnv"
]
},
{
"value": [
"44"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_62szh8t5oo.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_tolower(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_tolower", "funargs": ["c"], "typemap": {"c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62szh8t5oo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
atphalix/eviltoys/openquartz/utils/lmp2pcx/lmp2pcx.c
|
int SwapLong(int num)
{
return (((num >> 0) & 0xFF) << 24) + (((num >> 8) & 0xFF) << 16) + (((num >> 16) & 0xFF) << 8) + (((num >> 24) & 0xFF) << 0);
}
|
int SwapLong(intnum)
|
int SwapLong(int num)
|
SwapLong
|
[
"int",
"int"
] |
{
"code": [
".globl SwapLong\n.type SwapLong, @function\nSwapLong:\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\tsall\t$24, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$8, %eax\n\tsall\t$16, %eax\n\tandl\t$16711680, %eax\n\taddl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\tsarl\t$16, %eax\n\tsall\t$8, %eax\n\tmovzwl\t%ax, %eax\n\taddl\t%eax, %edx\n\tmovl\t-4(%rbp), %eax\n\tshrl\t$24, %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 SwapLong\n.type SwapLong, @function\nSwapLong:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t%edi, %ecx\n\tmovl\t%edi, %eax\n\tshrl\t$24, %edi\n\tsall\t$8, %edx\n\tsall\t$24, %ecx\n\tandl\t$16711680, %edx\n\tshrl\t$8, %eax\n\tandl\t$65280, %eax\n\taddl\t%edx, %ecx\n\tleal\t(%rcx,%rax), %edx\n\tleal\t(%rdx,%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl SwapLong\n.type SwapLong, @function\nSwapLong:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t%edi, %ecx\n\tmovl\t%edi, %eax\n\tshrl\t$24, %edi\n\tsall\t$8, %edx\n\tsall\t$24, %ecx\n\tandl\t$16711680, %edx\n\tshrl\t$8, %eax\n\tandl\t$65280, %eax\n\taddl\t%edx, %ecx\n\tleal\t(%rcx,%rax), %edx\n\tleal\t(%rdx,%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".global SwapLong\n.type SwapLong, %function\nSwapLong:\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\tlsl\tw1, w0, 24\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 8\n\tlsl\tw0, w0, 16\n\tand\tw0, w0, 16711680\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 16\n\tlsl\tw0, w0, 8\n\tand\tw0, w0, 65535\n\tadd\tw0, w1, w0\n\tldr\tw1, [sp, 12]\n\tlsr\tw1, w1, 24\n\tadd\tw0, w0, w1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global SwapLong\n.type SwapLong, %function\nSwapLong:\n.LFB0:\n\t.cfi_startproc\n\tasr\tw1, w0, 8\n\tasr\tw2, w0, 16\n\tubfiz\tw1, w1, 16, 8\n\tubfiz\tw2, w2, 8, 8\n\tadd\tw1, w1, w0, lsl 24\n\tadd\tw1, w1, w2\n\tadd\tw0, w1, w0, lsr 24\n\tret\n\t.cfi_endproc\n\n",
".global SwapLong\n.type SwapLong, %function\nSwapLong:\n.LFB0:\n\t.cfi_startproc\n\tasr\tw1, w0, 8\n\tasr\tw2, w0, 16\n\tubfiz\tw1, w1, 16, 8\n\tubfiz\tw2, w2, 8, 8\n\tadd\tw1, w1, w0, lsl 24\n\tadd\tw1, w1, w2\n\tadd\tw0, w1, w0, lsr 24\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": [
"62"
],
"var": [
"num"
]
},
{
"value": [
"112"
],
"var": [
"num"
]
},
{
"value": [
"105"
],
"var": [
"num"
]
},
{
"value": [
"81"
],
"var": [
"num"
]
},
{
"value": [
"70"
],
"var": [
"num"
]
},
{
"value": [
"91"
],
"var": [
"num"
]
},
{
"value": [
"10"
],
"var": [
"num"
]
},
{
"value": [
"0"
],
"var": [
"num"
]
},
{
"value": [
"11"
],
"var": [
"num"
]
},
{
"value": [
"79"
],
"var": [
"num"
]
}
],
"output": [
{
"value": [
"1040187392"
],
"var": [
"returnv"
]
},
{
"value": [
"1879048192"
],
"var": [
"returnv"
]
},
{
"value": [
"1761607680"
],
"var": [
"returnv"
]
},
{
"value": [
"1358954496"
],
"var": [
"returnv"
]
},
{
"value": [
"1174405120"
],
"var": [
"returnv"
]
},
{
"value": [
"1526726656"
],
"var": [
"returnv"
]
},
{
"value": [
"167772160"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"184549376"
],
"var": [
"returnv"
]
},
{
"value": [
"1325400064"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_59ws_sqvdi.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 num, 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 num = input_json["num"];
clock_t begin = clock();
int returnv = SwapLong(num);
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(num, returnv);
}
|
master
|
null
|
{"livein": ["num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "SwapLong", "funargs": ["num"], "typemap": {"num": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_59ws_sqvdi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
ucc/OpenDispense2/src/cokebank_sqlite/main.c
|
int Bank_int_IsValidName(const char *Name)
{
if( !Name ) return 0;
while(*Name)
{
if( *Name == '\'' ) return 0;
Name ++;
}
return 1;
}
|
int Bank_int_IsValidName(const char *Name)
|
int Bank_int_IsValidName(const char *Name)
|
Bank_int_IsValidName
|
[
"int",
"const char *"
] |
{
"code": [
".globl Bank_int_IsValidName\n.type Bank_int_IsValidName, @function\nBank_int_IsValidName:\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\tcmpq\t$0, -8(%rbp)\n\tjne\t.L4\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L6:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$39, %al\n\tjne\t.L5\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L5:\n\taddq\t$1, -8(%rbp)\n.L4:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.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 Bank_int_IsValidName\n.type Bank_int_IsValidName, @function\nBank_int_IsValidName:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestq\t%rdi, %rdi\n\tjne\t.L3\n\tret\n.L4:\n\tcmpb\t$39, %al\n\tje\t.L6\n\tincq\t%rdi\n.L3:\n\tmovb\t(%rdi), %al\n\ttestb\t%al, %al\n\tjne\t.L4\n\tmovl\t$1, %eax\n\tret\n.L6:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl Bank_int_IsValidName\n.type Bank_int_IsValidName, @function\nBank_int_IsValidName:\n.LFB54:\n\t.cfi_startproc\n\tendbr64\n\ttestq\t%rdi, %rdi\n\tjne\t.L8\n\tjmp\t.L6\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tcmpb\t$39, %al\n\tje\t.L6\n\taddq\t$1, %rdi\n.L8:\n\tmovzbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovl\t$1, %eax\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 Bank_int_IsValidName\n.type Bank_int_IsValidName, %function\nBank_int_IsValidName:\n.LFB6:\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\tbne\t.L4\n\tmov\tw0, 0\n\tb\t.L3\n.L6:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 39\n\tbne\t.L5\n\tmov\tw0, 0\n\tb\t.L3\n.L5:\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\tbne\t.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 Bank_int_IsValidName\n.type Bank_int_IsValidName, %function\nBank_int_IsValidName:\n.LFB35:\n\t.cfi_startproc\n\tcbnz\tx0, .L3\n.L6:\n\tmov\tw0, 0\n\tb\t.L1\n.L4:\n\tcmp\tw1, 39\n\tbeq\t.L6\n\tadd\tx0, x0, 1\n.L3:\n\tldrb\tw1, [x0]\n\tcbnz\tw1, .L4\n\tmov\tw0, 1\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global Bank_int_IsValidName\n.type Bank_int_IsValidName, %function\nBank_int_IsValidName:\n.LFB54:\n\t.cfi_startproc\n\tcbz\tx0, .L6\n\tldrb\tw1, [x0]\n\tcbnz\tw1, .L3\n\tb\t.L5\n\t.p2align 2,,3\n.L9:\n\tldrb\tw1, [x0, 1]!\n\tcbz\tw1, .L5\n.L3:\n\tcmp\tw1, 39\n\tbne\t.L9\n.L6:\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L5:\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 <inttypes.h>
#include <stdlib.h>
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <sqlite3.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": [
"\"txfvgbgqcqo\""
],
"var": [
"Name"
]
},
{
"value": [
"\"fvaphooavpy\""
],
"var": [
"Name"
]
},
{
"value": [
"\"rfdlcupvseue\""
],
"var": [
"Name"
]
},
{
"value": [
"\"bdezwlelnmy\""
],
"var": [
"Name"
]
},
{
"value": [
"\"qntdgumnbtqiyiylyccbefltyfrgvr\""
],
"var": [
"Name"
]
},
{
"value": [
"\"zhxjrrkiummapokgttc\""
],
"var": [
"Name"
]
},
{
"value": [
"\"pw\""
],
"var": [
"Name"
]
},
{
"value": [
"\"ouiukvejvgieenzhgwptzlwcojndvq\""
],
"var": [
"Name"
]
},
{
"value": [
"\"dmmpurscpuynqgxpugmf\""
],
"var": [
"Name"
]
},
{
"value": [
"\"jbklfwcs\""
],
"var": [
"Name"
]
}
],
"output": [
{
"value": [
"\"txfvgbgqcqo\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"fvaphooavpy\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"rfdlcupvseue\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"bdezwlelnmy\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"qntdgumnbtqiyiylyccbefltyfrgvr\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"zhxjrrkiummapokgttc\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"pw\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"ouiukvejvgieenzhgwptzlwcojndvq\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"dmmpurscpuynqgxpugmf\"",
"1"
],
"var": [
"Name",
"returnv"
]
},
{
"value": [
"\"jbklfwcs\"",
"1"
],
"var": [
"Name",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_55tpzza5zr.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* Name, int returnv) {
json output_json;
output_json["Name"] = Name;
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* Name = strdup(input_json["Name"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = Bank_int_IsValidName(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(Name, returnv);
}
|
master
|
null
|
{"livein": ["Name"], "liveout": ["Name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "Bank_int_IsValidName", "funargs": ["Name"], "typemap": {"Name": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55tpzza5zr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
googleprojectzero/fuzzilli/Sources/libreprl/libreprl-posix.c
|
int RIFSIGNALED(int status)
{
return (status & 0xff) != 0;
}
|
int RIFSIGNALED(intstatus)
|
int RIFSIGNALED(int status)
|
RIFSIGNALED
|
[
"int",
"int"
] |
{
"code": [
".globl RIFSIGNALED\n.type RIFSIGNALED, @function\nRIFSIGNALED:\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\tmovzbl\t%al, %eax\n\ttestl\t%eax, %eax\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl RIFSIGNALED\n.type RIFSIGNALED, @function\nRIFSIGNALED:\n.LFB49:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestb\t%dil, %dil\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n",
".globl RIFSIGNALED\n.type RIFSIGNALED, @function\nRIFSIGNALED:\n.LFB64:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestb\t%dil, %dil\n\tsetne\t%al\n\tret\n\t.cfi_endproc\n\n",
".global RIFSIGNALED\n.type RIFSIGNALED, %function\nRIFSIGNALED:\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, 255\n\tcmp\tw0, 0\n\tcset\tw0, ne\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 RIFSIGNALED\n.type RIFSIGNALED, %function\nRIFSIGNALED:\n.LFB49:\n\t.cfi_startproc\n\ttst\tw0, 255\n\tcset\tw0, ne\n\tret\n\t.cfi_endproc\n\n",
".global RIFSIGNALED\n.type RIFSIGNALED, %function\nRIFSIGNALED:\n.LFB64:\n\t.cfi_startproc\n\ttst\tw0, 255\n\tcset\tw0, 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 |
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.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": [
"14"
],
"var": [
"status"
]
},
{
"value": [
"91"
],
"var": [
"status"
]
},
{
"value": [
"25"
],
"var": [
"status"
]
},
{
"value": [
"100"
],
"var": [
"status"
]
},
{
"value": [
"24"
],
"var": [
"status"
]
},
{
"value": [
"91"
],
"var": [
"status"
]
},
{
"value": [
"126"
],
"var": [
"status"
]
},
{
"value": [
"67"
],
"var": [
"status"
]
},
{
"value": [
"126"
],
"var": [
"status"
]
},
{
"value": [
"82"
],
"var": [
"status"
]
}
],
"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_40u68bo575.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 status, 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 status = input_json["status"];
clock_t begin = clock();
int returnv = RIFSIGNALED(status);
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(status, returnv);
}
|
main
|
null
|
{"livein": ["status"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "RIFSIGNALED", "funargs": ["status"], "typemap": {"status": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40u68bo575.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
directhex/doom64/src/d64bsp/display.c
|
void TextDisplaySetBarText(int barnum, const char *str)
{
}
|
void TextDisplaySetBarText(intbarnum, const char *str)
|
void TextDisplaySetBarText(int barnum, const char *str)
|
TextDisplaySetBarText
|
[
"void",
"int",
"const char *"
] |
{
"code": [
".globl TextDisplaySetBarText\n.type TextDisplaySetBarText, @function\nTextDisplaySetBarText:\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 TextDisplaySetBarText\n.type TextDisplaySetBarText, @function\nTextDisplaySetBarText:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".globl TextDisplaySetBarText\n.type TextDisplaySetBarText, @function\nTextDisplaySetBarText:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".global TextDisplaySetBarText\n.type TextDisplaySetBarText, %function\nTextDisplaySetBarText:\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 TextDisplaySetBarText\n.type TextDisplaySetBarText, %function\nTextDisplaySetBarText:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global TextDisplaySetBarText\n.type TextDisplaySetBarText, %function\nTextDisplaySetBarText:\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": [
"69",
"\"eed\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"114",
"\"tujlrswtwcebwlfgupwukrosidnhrfl\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"53",
"\"mcshghcoeahxiqakbkpms\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"64",
"\"\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"118",
"\"cxtnwjuxaf\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"102",
"\"vnlgpyrikrxjphwwnvzn\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"70",
"\"hykhskvvrccpvzuywthoff\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"114",
"\"aaedlaisowqiscgmvdnvamyigljb\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"31",
"\"osteazzy\""
],
"var": [
"barnum",
"str"
]
},
{
"value": [
"121",
"\"xartcpiecqmnxlcoviytcnf\""
],
"var": [
"barnum",
"str"
]
}
],
"output": [
{
"value": [
"\"eed\""
],
"var": [
"str"
]
},
{
"value": [
"\"tujlrswtwcebwlfgupwukrosidnhrfl\""
],
"var": [
"str"
]
},
{
"value": [
"\"mcshghcoeahxiqakbkpms\""
],
"var": [
"str"
]
},
{
"value": [
"\"\""
],
"var": [
"str"
]
},
{
"value": [
"\"cxtnwjuxaf\""
],
"var": [
"str"
]
},
{
"value": [
"\"vnlgpyrikrxjphwwnvzn\""
],
"var": [
"str"
]
},
{
"value": [
"\"hykhskvvrccpvzuywthoff\""
],
"var": [
"str"
]
},
{
"value": [
"\"aaedlaisowqiscgmvdnvamyigljb\""
],
"var": [
"str"
]
},
{
"value": [
"\"osteazzy\""
],
"var": [
"str"
]
},
{
"value": [
"\"xartcpiecqmnxlcoviytcnf\""
],
"var": [
"str"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_33e_b0gv3u.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 barnum, char* str) {
json output_json;
output_json["str"] = str;
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 barnum = input_json["barnum"];
char* str = strdup(input_json["str"].get<std::string>().c_str());
clock_t begin = clock();
TextDisplaySetBarText(barnum, str);
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(barnum, str);
}
|
master
|
null
|
{"livein": ["barnum", "str"], "liveout": ["str"], "returnvarname": [], "execcmd": "", "funname": "TextDisplaySetBarText", "funargs": ["barnum", "str"], "typemap": {"barnum": "int32", "str": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33e_b0gv3u.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
paxromana96/LispCompiler/src/syntax.c
|
char * getTokenTypeName(int type){
switch(type){
case 1:
return "<LParen>";
case 2:
return "<RParen>";
case 3:
return "<Number>";
case 8:
return "<ID>";
case 6:
return "<Plus>";
case 7:
return "<Minus>";
case -2:
return "<EOF>";
case -1:
return "<Error!>";
default:
return "<Unknown token type!>";
}
}
|
char * getTokenTypeName(inttype)
|
char * getTokenTypeName(int type)
|
getTokenTypeName
|
[
"char *",
"int"
] |
{
"code": [
".globl getTokenTypeName\n.type getTokenTypeName, @function\ngetTokenTypeName:\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$2, %eax\n\tcmpl\t$10, %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.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L2-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L9:\n\tleaq\t.LC0(%rip), %rax\n\tjmp\t.L12\n.L8:\n\tleaq\t.LC1(%rip), %rax\n\tjmp\t.L12\n.L7:\n\tleaq\t.LC2(%rip), %rax\n\tjmp\t.L12\n.L3:\n\tleaq\t.LC3(%rip), %rax\n\tjmp\t.L12\n.L6:\n\tleaq\t.LC4(%rip), %rax\n\tjmp\t.L12\n.L5:\n\tleaq\t.LC5(%rip), %rax\n\tjmp\t.L12\n.L11:\n\tleaq\t.LC6(%rip), %rax\n\tjmp\t.L12\n.L10:\n\tleaq\t.LC7(%rip), %rax\n\tjmp\t.L12\n.L2:\n\tleaq\t.LC8(%rip), %rax\n.L12:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"<Plus>\"\n.LC2: \t.string\t\"<Number>\"\n.LC3: \t.string\t\"<ID>\"\n.LC5: \t.string\t\"<Minus>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC7: \t.string\t\"<Error!>\"\n.LC1: \t.string\t\"<RParen>\"\n.LC0: \t.string\t\"<LParen>\"\n.LC8: \t.string\t\"<Unknown token type!>\"\n",
".globl getTokenTypeName\n.type getTokenTypeName, @function\ngetTokenTypeName:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddl\t$2, %edi\n\tcmpl\t$10, %edi\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovslq\t(%rdx,%rdi,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.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L2-.L4\n\t.long\t.L12-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L8:\n\tleaq\t.LC8(%rip), %rax\n\tret\n.L7:\n\tleaq\t.LC2(%rip), %rax\n\tret\n.L3:\n\tleaq\t.LC3(%rip), %rax\n\tret\n.L6:\n\tleaq\t.LC4(%rip), %rax\n\tret\n.L5:\n\tleaq\t.LC5(%rip), %rax\n\tret\n.L11:\n\tleaq\t.LC6(%rip), %rax\n\tret\n.L10:\n\tleaq\t.LC7(%rip), %rax\n\tret\n.L2:\n\tleaq\t.LC0(%rip), %rax\n\tret\n.L12:\n\tleaq\t.LC1(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"<Plus>\"\n.LC2: \t.string\t\"<Number>\"\n.LC3: \t.string\t\"<ID>\"\n.LC5: \t.string\t\"<Minus>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC7: \t.string\t\"<Error!>\"\n.LC1: \t.string\t\"<LParen>\"\n.LC0: \t.string\t\"<Unknown token type!>\"\n.LC8: \t.string\t\"<RParen>\"\n",
".globl getTokenTypeName\n.type getTokenTypeName, @function\ngetTokenTypeName:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddl\t$2, %edi\n\tcmpl\t$10, %edi\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovslq\t(%rdx,%rdi,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.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L2-.L4\n\t.long\t.L12-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tleaq\t.LC6(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\tleaq\t.LC7(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tleaq\t.LC2(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tleaq\t.LC4(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tleaq\t.LC5(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tleaq\t.LC3(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L12:\n\tleaq\t.LC1(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tleaq\t.LC8(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"<Plus>\"\n.LC2: \t.string\t\"<Number>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC5: \t.string\t\"<Minus>\"\n.LC3: \t.string\t\"<ID>\"\n.LC7: \t.string\t\"<Error!>\"\n.LC1: \t.string\t\"<LParen>\"\n.LC0: \t.string\t\"<Unknown token type!>\"\n.LC8: \t.string\t\"<RParen>\"\n",
".global getTokenTypeName\n.type getTokenTypeName, %function\ngetTokenTypeName:\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, 8\n\tbeq\t.L2\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.L4\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.L5\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 6\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbeq\t.L6\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2\n\tbeq\t.L7\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbeq\t.L8\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmn\tw0, #2\n\tbeq\t.L9\n\tldr\tw0, [sp, 12]\n\tcmn\tw0, #1\n\tbeq\t.L10\n\tb\t.L3\n.L8:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tb\t.L11\n.L7:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tb\t.L11\n.L6:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tb\t.L11\n.L2:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tb\t.L11\n.L5:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tb\t.L11\n.L4:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tb\t.L11\n.L9:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tb\t.L11\n.L10:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tb\t.L11\n.L3:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n.L11:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"<Plus>\"\n.LC2: \t.string\t\"<Number>\"\n.LC3: \t.string\t\"<ID>\"\n.LC5: \t.string\t\"<Minus>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC7: \t.string\t\"<Error!>\"\n.LC1: \t.string\t\"<RParen>\"\n.LC0: \t.string\t\"<LParen>\"\n.LC8: \t.string\t\"<Unknown token type!>\"\n",
".global getTokenTypeName\n.type getTokenTypeName, %function\ngetTokenTypeName:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 2\n\tcmp\tw0, 10\n\tbhi\t.L2\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldrb\tw0, [x1,w0,uxtw]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.byte\t(.L11 - .Lrtx4) / 4\n\t.byte\t(.L10 - .Lrtx4) / 4\n\t.byte\t(.L2 - .Lrtx4) / 4\n\t.byte\t(.L12 - .Lrtx4) / 4\n\t.byte\t(.L8 - .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(.L6 - .Lrtx4) / 4\n\t.byte\t(.L5 - .Lrtx4) / 4\n\t.byte\t(.L3 - .Lrtx4) / 4\n\t.text\n.L8:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n.L1:\n\tret\n.L7:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tb\t.L1\n.L3:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tb\t.L1\n.L6:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tb\t.L1\n.L5:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tb\t.L1\n.L11:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tb\t.L1\n.L10:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tb\t.L1\n.L2:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tb\t.L1\n.L12:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tb\t.L1\n\t.cfi_endproc\n.LC4: \t.string\t\"<Plus>\"\n.LC2: \t.string\t\"<Number>\"\n.LC3: \t.string\t\"<ID>\"\n.LC5: \t.string\t\"<Minus>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC7: \t.string\t\"<Error!>\"\n.LC1: \t.string\t\"<LParen>\"\n.LC0: \t.string\t\"<Unknown token type!>\"\n.LC8: \t.string\t\"<RParen>\"\n",
".global getTokenTypeName\n.type getTokenTypeName, %function\ngetTokenTypeName:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 3\n\tbeq\t.L4\n\tbgt\t.L3\n\tcmp\tw0, 1\n\tbeq\t.L5\n\tcmp\tw0, 2\n\tbne\t.L13\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tret\n\t.p2align 2,,3\n.L13:\n\tcmn\tw0, #2\n\tbeq\t.L7\n\tcmn\tw0, #1\n\tbne\t.L11\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tret\n\t.p2align 2,,3\n.L3:\n\tcmp\tw0, 7\n\tbeq\t.L9\n\tcmp\tw0, 8\n\tbne\t.L14\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tret\n.L14:\n\tcmp\tw0, 6\n\tbne\t.L11\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tret\n\t.p2align 2,,3\n.L7:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tret\n\t.p2align 2,,3\n.L9:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tret\n\t.p2align 2,,3\n.L5:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tret\n\t.p2align 2,,3\n.L4:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tret\n.L11:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n\t.cfi_endproc\n.LC4: \t.string\t\"<Error!>\"\n.LC2: \t.string\t\"<Minus>\"\n.LC5: \t.string\t\"<RParen>\"\n.LC6: \t.string\t\"<EOF>\"\n.LC3: \t.string\t\"<ID>\"\n.LC7: \t.string\t\"<Number>\"\n.LC1: \t.string\t\"<LParen>\"\n.LC0: \t.string\t\"<Unknown token type!>\"\n.LC8: \t.string\t\"<Plus>\"\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": [
"13"
],
"var": [
"type"
]
},
{
"value": [
"54"
],
"var": [
"type"
]
},
{
"value": [
"102"
],
"var": [
"type"
]
},
{
"value": [
"14"
],
"var": [
"type"
]
},
{
"value": [
"124"
],
"var": [
"type"
]
},
{
"value": [
"121"
],
"var": [
"type"
]
},
{
"value": [
"121"
],
"var": [
"type"
]
},
{
"value": [
"108"
],
"var": [
"type"
]
},
{
"value": [
"12"
],
"var": [
"type"
]
},
{
"value": [
"108"
],
"var": [
"type"
]
}
],
"output": [
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"<Unknown token type!>\""
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_64leyo_aie.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 type, 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);
int type = input_json["type"];
clock_t begin = clock();
char* returnv = getTokenTypeName(type);
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(type, returnv);
}
|
master
|
null
|
{"livein": ["type"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "getTokenTypeName", "funargs": ["type"], "typemap": {"type": "int32", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_64leyo_aie.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
CLOUDS-Interactive-Documentary/RTCmix/RTcmix-pd-4.0.1.6/src/sndlib/io.c
|
int mus_iclamp(int lo, int val, int hi)
{
if (val > hi)
return(hi);
else
if (val < lo)
return(lo);
else return(val);
}
|
int mus_iclamp(intlo, intval, inthi)
|
int mus_iclamp(int lo, int val, int hi)
|
mus_iclamp
|
[
"int",
"int",
"int",
"int"
] |
{
"code": [
".globl mus_iclamp\n.type mus_iclamp, @function\nmus_iclamp:\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%edx, -12(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-12(%rbp), %eax\n\tjle\t.L2\n\tmovl\t-12(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-4(%rbp), %eax\n\tjge\t.L4\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L4:\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 mus_iclamp\n.type mus_iclamp, @function\nmus_iclamp:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %eax\n\tcmpl\t%edx, %esi\n\tjg\t.L2\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".globl mus_iclamp\n.type mus_iclamp, @function\nmus_iclamp:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %eax\n\tcmpl\t%edx, %esi\n\tjg\t.L1\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global mus_iclamp\n.type mus_iclamp, %function\nmus_iclamp:\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\tstr\tw2, [sp, 4]\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tble\t.L2\n\tldr\tw0, [sp, 4]\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tbge\t.L4\n\tldr\tw0, [sp, 12]\n\tb\t.L3\n.L4:\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 mus_iclamp\n.type mus_iclamp, %function\nmus_iclamp:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tcmp\tw1, w2\n\tmov\tw0, w2\n\tbgt\t.L2\n\tcmp\tw1, w3\n\tcsel\tw0, w1, w3, ge\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".global mus_iclamp\n.type mus_iclamp, %function\nmus_iclamp:\n.LFB39:\n\t.cfi_startproc\n\tcmp\tw1, w2\n\tbgt\t.L3\n\tcmp\tw1, w0\n\tcsel\tw0, w1, w0, ge\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, w2\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 <stdio.h>
#include <errno.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": [
"48",
"98",
"6"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"103",
"89",
"116"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"1",
"21",
"113"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"39",
"97",
"4"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"69",
"84",
"54"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"105",
"9",
"59"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"25",
"23",
"94"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"89",
"28",
"72"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"113",
"40",
"0"
],
"var": [
"lo",
"val",
"hi"
]
},
{
"value": [
"97",
"119",
"24"
],
"var": [
"lo",
"val",
"hi"
]
}
],
"output": [
{
"value": [
"6"
],
"var": [
"returnv"
]
},
{
"value": [
"103"
],
"var": [
"returnv"
]
},
{
"value": [
"21"
],
"var": [
"returnv"
]
},
{
"value": [
"4"
],
"var": [
"returnv"
]
},
{
"value": [
"54"
],
"var": [
"returnv"
]
},
{
"value": [
"105"
],
"var": [
"returnv"
]
},
{
"value": [
"25"
],
"var": [
"returnv"
]
},
{
"value": [
"89"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"24"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_38fxdefwn6.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 lo, int val, int hi, 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 lo = input_json["lo"];
int val = input_json["val"];
int hi = input_json["hi"];
clock_t begin = clock();
int returnv = mus_iclamp(lo, val, hi);
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(lo, val, hi, returnv);
}
|
master
|
null
|
{"livein": ["lo", "val", "hi"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "mus_iclamp", "funargs": ["lo", "val", "hi"], "typemap": {"lo": "int32", "val": "int32", "hi": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38fxdefwn6.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
LuckyBro/sgfork/code/ui/ui_atoms.c
|
float UI_ClampCvar( float min, float max, float value )
{
if ( value < min ) return min;
if ( value > max ) return max;
return value;
}
|
float UI_ClampCvar(floatmin, floatmax, floatvalue)
|
float UI_ClampCvar( float min, float max, float value )
|
UI_ClampCvar
|
[
"float",
"float",
"float",
"float"
] |
{
"code": [
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\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\tmovss\t%xmm2, -12(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tcomiss\t-12(%rbp), %xmm0\n\tjbe\t.L9\n\tmovss\t-4(%rbp), %xmm0\n\tjmp\t.L4\n.L9:\n\tmovss\t-12(%rbp), %xmm0\n\tcomiss\t-8(%rbp), %xmm0\n\tjbe\t.L10\n\tmovss\t-8(%rbp), %xmm0\n\tjmp\t.L4\n.L10:\n\tmovss\t-12(%rbp), %xmm0\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\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\tmovss\t%xmm2, -12(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tcomiss\t-12(%rbp), %xmm0\n\tjbe\t.L9\n\tmovss\t-4(%rbp), %xmm0\n\tjmp\t.L4\n.L9:\n\tmovss\t-12(%rbp), %xmm0\n\tcomiss\t-8(%rbp), %xmm0\n\tjbe\t.L10\n\tmovss\t-8(%rbp), %xmm0\n\tjmp\t.L4\n.L10:\n\tmovss\t-12(%rbp), %xmm0\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcomiss\t%xmm2, %xmm0\n\tmovaps\t%xmm0, %xmm3\n\tja\t.L4\n\tminss\t%xmm2, %xmm1\n\tmovaps\t%xmm1, %xmm0\n\tret\n.L4:\n\tmovaps\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcomiss\t%xmm2, %xmm0\n\tmovaps\t%xmm0, %xmm3\n\tja\t.L4\n\tminss\t%xmm2, %xmm1\n\tmovaps\t%xmm1, %xmm0\n\tret\n.L4:\n\tmovaps\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcomiss\t%xmm2, %xmm0\n\tja\t.L1\n\tminss\t%xmm2, %xmm1\n\tmovaps\t%xmm1, %xmm0\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl UI_ClampCvar\n.type UI_ClampCvar, @function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcomiss\t%xmm2, %xmm0\n\tja\t.L1\n\tminss\t%xmm2, %xmm1\n\tmovaps\t%xmm1, %xmm0\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\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\ts2, [sp, 4]\n\tldr\ts1, [sp, 4]\n\tldr\ts0, [sp, 12]\n\tfcmpe\ts1, s0\n\tbpl\t.L9\n\tldr\ts0, [sp, 12]\n\tb\t.L4\n.L9:\n\tldr\ts1, [sp, 4]\n\tldr\ts0, [sp, 8]\n\tfcmpe\ts1, s0\n\tble\t.L10\n\tldr\ts0, [sp, 8]\n\tb\t.L4\n.L10:\n\tldr\ts0, [sp, 4]\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\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\ts2, [sp, 4]\n\tldr\ts1, [sp, 4]\n\tldr\ts0, [sp, 12]\n\tfcmpe\ts1, s0\n\tbpl\t.L9\n\tldr\ts0, [sp, 12]\n\tb\t.L4\n.L9:\n\tldr\ts1, [sp, 4]\n\tldr\ts0, [sp, 8]\n\tfcmpe\ts1, s0\n\tble\t.L10\n\tldr\ts0, [sp, 8]\n\tb\t.L4\n.L10:\n\tldr\ts0, [sp, 4]\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tfcmpe\ts2, s0\n\tfmov\ts3, s0\n\tbmi\t.L4\n\tfcmp\ts2, s1\n\tfcsel\ts0, s2, s1, le\n.L2:\n\tret\n.L4:\n\tfmov\ts0, s3\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tfcmpe\ts2, s0\n\tfmov\ts3, s0\n\tbmi\t.L4\n\tfcmp\ts2, s1\n\tfcsel\ts0, s2, s1, le\n.L2:\n\tret\n.L4:\n\tfmov\ts0, s3\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tfcmpe\ts2, s0\n\tbmi\t.L1\n\tfcmpe\ts2, s1\n\tfcsel\ts0, s1, s2, gt\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global UI_ClampCvar\n.type UI_ClampCvar, %function\nUI_ClampCvar:\n.LFB0:\n\t.cfi_startproc\n\tfcmpe\ts2, s0\n\tbmi\t.L1\n\tfcmpe\ts2, s1\n\tfcsel\ts0, s1, s2, gt\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 */
|
# 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": [
"95.4411079276",
"74.7868930507",
"6.27660469527"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"29.4143603935",
"57.6062047988",
"99.3318614604"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"19.6225840726",
"45.8731658662",
"9.07927694574"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"54.8636803933",
"62.6356720053",
"54.1013580413"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"63.480537726",
"36.6345593829",
"89.8321641611"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"8.61098345193",
"79.6327213687",
"86.3904950219"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"26.1881366509",
"16.4153564353",
"19.0908777532"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"5.72779353113",
"60.0413007457",
"96.374319877"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"33.197321089",
"90.2147579885",
"32.9305590725"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"1.4237144375",
"99.5072529468",
"76.7461661808"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"95.4411079276",
"74.7868930507",
"6.27660469527"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"29.4143603935",
"57.6062047988",
"99.3318614604"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"19.6225840726",
"45.8731658662",
"9.07927694574"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"54.8636803933",
"62.6356720053",
"54.1013580413"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"63.480537726",
"36.6345593829",
"89.8321641611"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"8.61098345193",
"79.6327213687",
"86.3904950219"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"26.1881366509",
"16.4153564353",
"19.0908777532"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"5.72779353113",
"60.0413007457",
"96.374319877"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"33.197321089",
"90.2147579885",
"32.9305590725"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"1.4237144375",
"99.5072529468",
"76.7461661808"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"95.4411079276",
"74.7868930507",
"6.27660469527"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"29.4143603935",
"57.6062047988",
"99.3318614604"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"19.6225840726",
"45.8731658662",
"9.07927694574"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"54.8636803933",
"62.6356720053",
"54.1013580413"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"63.480537726",
"36.6345593829",
"89.8321641611"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"8.61098345193",
"79.6327213687",
"86.3904950219"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"26.1881366509",
"16.4153564353",
"19.0908777532"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"5.72779353113",
"60.0413007457",
"96.374319877"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"33.197321089",
"90.2147579885",
"32.9305590725"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"1.4237144375",
"99.5072529468",
"76.7461661808"
],
"var": [
"min",
"max",
"value"
]
}
],
"output": [
{
"value": [
"95.44110870361328"
],
"var": [
"returnv"
]
},
{
"value": [
"57.606204986572266"
],
"var": [
"returnv"
]
},
{
"value": [
"19.622583389282227"
],
"var": [
"returnv"
]
},
{
"value": [
"54.86368179321289"
],
"var": [
"returnv"
]
},
{
"value": [
"36.634559631347656"
],
"var": [
"returnv"
]
},
{
"value": [
"79.63272094726562"
],
"var": [
"returnv"
]
},
{
"value": [
"26.18813705444336"
],
"var": [
"returnv"
]
},
{
"value": [
"60.04130172729492"
],
"var": [
"returnv"
]
},
{
"value": [
"33.197322845458984"
],
"var": [
"returnv"
]
},
{
"value": [
"76.74616241455078"
],
"var": [
"returnv"
]
},
{
"value": [
"95.44110870361328"
],
"var": [
"returnv"
]
},
{
"value": [
"57.606204986572266"
],
"var": [
"returnv"
]
},
{
"value": [
"19.622583389282227"
],
"var": [
"returnv"
]
},
{
"value": [
"54.86368179321289"
],
"var": [
"returnv"
]
},
{
"value": [
"36.634559631347656"
],
"var": [
"returnv"
]
},
{
"value": [
"79.63272094726562"
],
"var": [
"returnv"
]
},
{
"value": [
"26.18813705444336"
],
"var": [
"returnv"
]
},
{
"value": [
"60.04130172729492"
],
"var": [
"returnv"
]
},
{
"value": [
"33.197322845458984"
],
"var": [
"returnv"
]
},
{
"value": [
"76.74616241455078"
],
"var": [
"returnv"
]
},
{
"value": [
"95.44110870361328"
],
"var": [
"returnv"
]
},
{
"value": [
"57.606204986572266"
],
"var": [
"returnv"
]
},
{
"value": [
"19.622583389282227"
],
"var": [
"returnv"
]
},
{
"value": [
"54.86368179321289"
],
"var": [
"returnv"
]
},
{
"value": [
"36.634559631347656"
],
"var": [
"returnv"
]
},
{
"value": [
"79.63272094726562"
],
"var": [
"returnv"
]
},
{
"value": [
"26.18813705444336"
],
"var": [
"returnv"
]
},
{
"value": [
"60.04130172729492"
],
"var": [
"returnv"
]
},
{
"value": [
"33.197322845458984"
],
"var": [
"returnv"
]
},
{
"value": [
"76.74616241455078"
],
"var": [
"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": [
"95.4411079276",
"74.7868930507",
"6.27660469527"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"29.4143603935",
"57.6062047988",
"99.3318614604"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"19.6225840726",
"45.8731658662",
"9.07927694574"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"54.8636803933",
"62.6356720053",
"54.1013580413"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"63.480537726",
"36.6345593829",
"89.8321641611"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"8.61098345193",
"79.6327213687",
"86.3904950219"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"26.1881366509",
"16.4153564353",
"19.0908777532"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"5.72779353113",
"60.0413007457",
"96.374319877"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"33.197321089",
"90.2147579885",
"32.9305590725"
],
"var": [
"min",
"max",
"value"
]
},
{
"value": [
"1.4237144375",
"99.5072529468",
"76.7461661808"
],
"var": [
"min",
"max",
"value"
]
}
],
"output": [
{
"value": [
"95.44110870361328"
],
"var": [
"returnv"
]
},
{
"value": [
"57.606204986572266"
],
"var": [
"returnv"
]
},
{
"value": [
"19.622583389282227"
],
"var": [
"returnv"
]
},
{
"value": [
"54.86368179321289"
],
"var": [
"returnv"
]
},
{
"value": [
"36.634559631347656"
],
"var": [
"returnv"
]
},
{
"value": [
"79.63272094726562"
],
"var": [
"returnv"
]
},
{
"value": [
"26.18813705444336"
],
"var": [
"returnv"
]
},
{
"value": [
"60.04130172729492"
],
"var": [
"returnv"
]
},
{
"value": [
"33.197322845458984"
],
"var": [
"returnv"
]
},
{
"value": [
"76.74616241455078"
],
"var": [
"returnv"
]
}
]
}
|
extern "C" {
#include "/run/user/1000/pytmpfile_jordiws_35777319awqj9la.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 min, float max, float value, 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 min = input_json["min"];
float max = input_json["max"];
float value = input_json["value"];
clock_t begin = clock();
float returnv = UI_ClampCvar(min, max, value);
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(min, max, value, returnv);
}
|
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_4031h8arhz.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 min, float max, float value, 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 min = input_json["min"];
float max = input_json["max"];
float value = input_json["value"];
clock_t begin = clock();
float returnv = UI_ClampCvar(min, max, value);
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(min, max, value, returnv);
}
|
master
|
null
|
{"livein": ["min", "max", "value"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "UI_ClampCvar", "funargs": ["min", "max", "value"], "typemap": {"min": "float32", "max": "float32", "value": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_4031h8arhz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
danstadelmann/DSVB/App15_DTMF_Detect/Sources/usbstk5505_gpio.c
|
short USBSTK5505_GPIO_init()
{
return 0;
}
|
short USBSTK5505_GPIO_init()
|
short USBSTK5505_GPIO_init()
|
USBSTK5505_GPIO_init
|
[
"short",
""
] |
{
"code": [
".globl USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, @function\nUSBSTK5505_GPIO_init:\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 USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, @function\nUSBSTK5505_GPIO_init:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, @function\nUSBSTK5505_GPIO_init:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, %function\nUSBSTK5505_GPIO_init:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, %function\nUSBSTK5505_GPIO_init:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global USBSTK5505_GPIO_init\n.type USBSTK5505_GPIO_init, %function\nUSBSTK5505_GPIO_init:\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_32zrtdrrp_.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 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();
short returnv = USBSTK5505_GPIO_init();
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": "USBSTK5505_GPIO_init", "funargs": [], "typemap": {"returnv": "int16"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32zrtdrrp_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
CFDEMproject/LAMMPS/libs/lammps/tools/eam_generate/Cu_Mishin1.c
|
double H (double x) {
if (x >= 0) return 1.;
else return 0.;
}
|
double H(doublex)
|
double H (double x)
|
H
|
[
"double",
"double"
] |
{
"code": [
".globl H\n.type H, @function\nH:\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-8(%rbp), %xmm0\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjb\t.L6\n\tmovsd\t.LC1(%rip), %xmm0\n\tjmp\t.L4\n.L6:\n\tpxor\t%xmm0, %xmm0\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC1: \t.long\t0\n",
".globl H\n.type H, @function\nH:\n.LFB46:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\txorps\t%xmm0, %xmm0\n\tcomisd\t%xmm0, %xmm1\n\tjb\t.L1\n\tmovsd\t.LC0(%rip), %xmm0\n.L1:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n",
".globl H\n.type H, @function\nH:\n.LFB61:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm1, %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjb\t.L5\n\tmovsd\t.LC0(%rip), %xmm0\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tpxor\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n",
".global H\n.type H, %function\nH:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tfcmpe\td0, #0.0\n\tblt\t.L6\n\tfmov\td0, 1.0e+0\n\tb\t.L4\n.L6:\n\tmovi\td0, #0\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global H\n.type H, %function\nH:\n.LFB46:\n\t.cfi_startproc\n\tfcmpe\td0, #0.0\n\tmovi\td0, #0\n\tfmov\td1, 1.0e+0\n\tfcsel\td0, d1, d0, ge\n\tret\n\t.cfi_endproc\n\n",
".global H\n.type H, %function\nH:\n.LFB61:\n\t.cfi_startproc\n\tmovi\td1, #0\n\tfmov\td2, 1.0e+0\n\tfcmpe\td0, d1\n\tfcsel\td0, d2, d1, 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 <math.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdarg.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": [
"75.6116792472"
],
"var": [
"x"
]
},
{
"value": [
"62.8513256761"
],
"var": [
"x"
]
},
{
"value": [
"99.8873627694"
],
"var": [
"x"
]
},
{
"value": [
"42.5509904063"
],
"var": [
"x"
]
},
{
"value": [
"90.1372487264"
],
"var": [
"x"
]
},
{
"value": [
"84.5534204926"
],
"var": [
"x"
]
},
{
"value": [
"86.6919157085"
],
"var": [
"x"
]
},
{
"value": [
"6.57286070637"
],
"var": [
"x"
]
},
{
"value": [
"71.9172033094"
],
"var": [
"x"
]
},
{
"value": [
"96.1096029786"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
},
{
"value": [
"1.0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_41jeo7uqtn.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 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();
double returnv = H(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);
}
|
current
|
null
|
{"livein": ["x"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "H", "funargs": ["x"], "typemap": {"x": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41jeo7uqtn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Bitcoinsulting/multigateway-v2/libjl777/deprecated/sophia/sophia.c
|
int LZ4_versionNumber (void) { return (1 *100*100 + 6 *100 + 0); }
|
int LZ4_versionNumber()
|
int LZ4_versionNumber (void)
|
LZ4_versionNumber
|
[
"int",
""
] |
{
"code": [
".globl LZ4_versionNumber\n.type LZ4_versionNumber, @function\nLZ4_versionNumber:\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$10600, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl LZ4_versionNumber\n.type LZ4_versionNumber, @function\nLZ4_versionNumber:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$10600, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl LZ4_versionNumber\n.type LZ4_versionNumber, @function\nLZ4_versionNumber:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$10600, %eax\n\tret\n\t.cfi_endproc\n\n",
".global LZ4_versionNumber\n.type LZ4_versionNumber, %function\nLZ4_versionNumber:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 10600\n\tret\n\t.cfi_endproc\n\n",
".global LZ4_versionNumber\n.type LZ4_versionNumber, %function\nLZ4_versionNumber:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 10600\n\tret\n\t.cfi_endproc\n\n",
".global LZ4_versionNumber\n.type LZ4_versionNumber, %function\nLZ4_versionNumber:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 10600\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": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
},
{
"value": [
"10600"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_49b5ib5nfk.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 = LZ4_versionNumber();
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": "LZ4_versionNumber", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_49b5ib5nfk.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
apple/swift-clang/3rd/templight/llvm/tools/clang/test/CoverageMapping/openmp.c
|
int foo(int time, int n) {
#pragma omp parallel for default(shared) schedule(dynamic, 1) reduction(+ : time)
for (int i = 1; i < n; ++i);
return 0;
}
|
int foo(inttime, intn)
|
int foo(int time, int n)
|
foo
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl foo\n.type foo, @function\nfoo:\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$1, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjl\t.L3\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 foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl foo\n.type foo, @function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global foo\n.type foo, %function\nfoo:\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\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tblt\t.L3\n\tmov\tw0, 0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global foo\n.type foo, %function\nfoo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global foo\n.type foo, %function\nfoo:\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": [
"13",
"75"
],
"var": [
"time",
"n"
]
},
{
"value": [
"91",
"95"
],
"var": [
"time",
"n"
]
},
{
"value": [
"122",
"74"
],
"var": [
"time",
"n"
]
},
{
"value": [
"85",
"39"
],
"var": [
"time",
"n"
]
},
{
"value": [
"78",
"59"
],
"var": [
"time",
"n"
]
},
{
"value": [
"85",
"113"
],
"var": [
"time",
"n"
]
},
{
"value": [
"9",
"36"
],
"var": [
"time",
"n"
]
},
{
"value": [
"17",
"103"
],
"var": [
"time",
"n"
]
},
{
"value": [
"125",
"25"
],
"var": [
"time",
"n"
]
},
{
"value": [
"63",
"101"
],
"var": [
"time",
"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": [
"0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_45wp52d6gk.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 time, 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 time = input_json["time"];
int n = input_json["n"];
clock_t begin = clock();
int returnv = foo(time, 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(time, n, returnv);
}
|
bb-clusters
|
null
|
{"livein": ["time", "n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "foo", "funargs": ["time", "n"], "typemap": {"time": "int32", "n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45wp52d6gk.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
kanner/KnR_solutions/Chapter3/3-03/expand.c
|
int checkrange(char c1, char c2)
{
if (('a' <= c1 && c1 <= 'z') && (c1 <= c2 && c2 <= 'z'))
return 1;
if (('A' <= c1 && c1 <= 'Z') && (c1 <= c2 && c2 <= 'Z'))
return 1;
if (('0' <= c1 && c1 <= '9') && (c1 <= c2 && c2 <= '9'))
return 1;
return 0;
}
|
int checkrange(charc1, charc2)
|
int checkrange(char c1, char c2)
|
checkrange
|
[
"int",
"char",
"char"
] |
{
"code": [
".globl checkrange\n.type checkrange, @function\ncheckrange:\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, %edx\n\tmovl\t%esi, %eax\n\tmovb\t%dl, -4(%rbp)\n\tmovb\t%al, -8(%rbp)\n\tcmpb\t$96, -4(%rbp)\n\tjle\t.L2\n\tcmpb\t$122, -4(%rbp)\n\tjg\t.L2\n\tmovzbl\t-4(%rbp), %eax\n\tcmpb\t-8(%rbp), %al\n\tjg\t.L2\n\tcmpb\t$122, -8(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tcmpb\t$64, -4(%rbp)\n\tjle\t.L4\n\tcmpb\t$90, -4(%rbp)\n\tjg\t.L4\n\tmovzbl\t-4(%rbp), %eax\n\tcmpb\t-8(%rbp), %al\n\tjg\t.L4\n\tcmpb\t$90, -8(%rbp)\n\tjg\t.L4\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L4:\n\tcmpb\t$47, -4(%rbp)\n\tjle\t.L5\n\tcmpb\t$57, -4(%rbp)\n\tjg\t.L5\n\tmovzbl\t-4(%rbp), %eax\n\tcmpb\t-8(%rbp), %al\n\tjg\t.L5\n\tcmpb\t$57, -8(%rbp)\n\tjg\t.L5\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L5:\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 checkrange\n.type checkrange, @function\ncheckrange:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-97(%rdi), %eax\n\tcmpb\t$25, %al\n\tja\t.L2\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\tcmpb\t$122, %sil\n\tjmp\t.L6\n.L2:\n\tleal\t-65(%rdi), %eax\n\tcmpb\t$25, %al\n\tja\t.L4\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\tcmpb\t$90, %sil\n\tjmp\t.L6\n.L4:\n\tleal\t-48(%rdi), %edx\n\txorl\t%eax, %eax\n\tcmpb\t$9, %dl\n\tja\t.L1\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\tcmpb\t$57, %sil\n.L6:\n\tsetle\t%al\n\tmovzbl\t%al, %eax\n\tandl\t%edx, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl checkrange\n.type checkrange, @function\ncheckrange:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-97(%rdi), %eax\n\tcmpb\t$25, %al\n\tja\t.L2\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\txorl\t%eax, %eax\n\tcmpb\t$122, %sil\n\tsetle\t%al\n\tandl\t%edx, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tleal\t-65(%rdi), %eax\n\tcmpb\t$25, %al\n\tja\t.L4\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\txorl\t%eax, %eax\n\tcmpb\t$90, %sil\n\tsetle\t%al\n\tandl\t%edx, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleal\t-48(%rdi), %eax\n\tcmpb\t$9, %al\n\tja\t.L5\n\tcmpb\t%sil, %dil\n\tsetle\t%dl\n\txorl\t%eax, %eax\n\tcmpb\t$57, %sil\n\tsetle\t%al\n\tandl\t%edx, %eax\n\tret\n.L5:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global checkrange\n.type checkrange, %function\ncheckrange:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tstrb\tw1, [sp, 14]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 96\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 122\n\tbhi\t.L2\n\tldrb\tw1, [sp, 15]\n\tldrb\tw0, [sp, 14]\n\tcmp\tw1, w0\n\tbhi\t.L2\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 122\n\tbhi\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 64\n\tbls\t.L4\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 90\n\tbhi\t.L4\n\tldrb\tw1, [sp, 15]\n\tldrb\tw0, [sp, 14]\n\tcmp\tw1, w0\n\tbhi\t.L4\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 90\n\tbhi\t.L4\n\tmov\tw0, 1\n\tb\t.L3\n.L4:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 47\n\tbls\t.L5\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 57\n\tbhi\t.L5\n\tldrb\tw1, [sp, 15]\n\tldrb\tw0, [sp, 14]\n\tcmp\tw1, w0\n\tbhi\t.L5\n\tldrb\tw0, [sp, 14]\n\tcmp\tw0, 57\n\tbhi\t.L5\n\tmov\tw0, 1\n\tb\t.L3\n.L5:\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 checkrange\n.type checkrange, %function\ncheckrange:\n.LFB13:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tand\tw1, w1, 255\n\tsub\tw2, w0, #97\n\tand\tw2, w2, 255\n\tcmp\tw2, 25\n\tbhi\t.L2\n\tcmp\tw1, 122\n.L6:\n\tccmp\tw0, w1, 2, ls\n\tcset\tw0, ls\n.L1:\n\tret\n.L2:\n\tsub\tw2, w0, #65\n\tand\tw2, w2, 255\n\tcmp\tw2, 25\n\tbhi\t.L4\n\tcmp\tw1, 90\n\tb\t.L6\n.L4:\n\tsub\tw2, w0, #48\n\tand\tw2, w2, 255\n\tcmp\tw2, 9\n\tbhi\t.L5\n\tcmp\tw1, 57\n\tb\t.L6\n.L5:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global checkrange\n.type checkrange, %function\ncheckrange:\n.LFB23:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tand\tw1, w1, 255\n\tsub\tw2, w0, #97\n\tand\tw2, w2, 255\n\tcmp\tw2, 25\n\tbhi\t.L2\n\tcmp\tw1, 122\n\tccmp\tw0, w1, 2, ls\n\tcset\tw0, ls\n\tret\n\t.p2align 2,,3\n.L2:\n\tsub\tw2, w0, #65\n\tand\tw2, w2, 255\n\tcmp\tw2, 25\n\tbhi\t.L4\n\tcmp\tw1, 90\n\tccmp\tw0, w1, 2, ls\n\tcset\tw0, ls\n\tret\n\t.p2align 2,,3\n.L4:\n\tsub\tw2, w0, #48\n\tand\tw2, w2, 255\n\tcmp\tw2, 9\n\tbhi\t.L5\n\tcmp\tw1, 57\n\tccmp\tw0, w1, 2, ls\n\tcset\tw0, ls\n\tret\n.L5:\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": [
"4",
"5"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"0",
"54"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"91",
"99"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"126",
"103"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"2",
"50"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"103",
"18"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"73",
"68"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"93",
"25"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"47",
"20"
],
"var": [
"c1",
"c2"
]
},
{
"value": [
"89",
"54"
],
"var": [
"c1",
"c2"
]
}
],
"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_384w2203gi.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 c1, char c2, 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 c1 = input_json["c1"].get<char>();
char c2 = input_json["c2"].get<char>();
clock_t begin = clock();
int returnv = checkrange(c1, c2);
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(c1, c2, returnv);
}
|
master
|
null
|
{"livein": ["c1", "c2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "checkrange", "funargs": ["c1", "c2"], "typemap": {"c1": "int8", "c2": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_384w2203gi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
PeterWolf-tw/NeoPraat/external/gsl/gsl_sys__coerce.c
|
double
gsl_coerce_double (const double x)
{
volatile double y;
y = x;
return y;
}
|
double gsl_coerce_double(const doublex)
|
double gsl_coerce_double (const double x)
|
gsl_coerce_double
|
[
"double",
"const double"
] |
{
"code": [
".globl gsl_coerce_double\n.type gsl_coerce_double, @function\ngsl_coerce_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\tmovsd\t%xmm0, -24(%rbp)\n\tmovsd\t-24(%rbp), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl gsl_coerce_double\n.type gsl_coerce_double, @function\ngsl_coerce_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t%xmm0, -8(%rsp)\n\tmovsd\t-8(%rsp), %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl gsl_coerce_double\n.type gsl_coerce_double, @function\ngsl_coerce_double:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t%xmm0, -8(%rsp)\n\tmovsd\t-8(%rsp), %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global gsl_coerce_double\n.type gsl_coerce_double, %function\ngsl_coerce_double:\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\tstr\td0, [sp, 24]\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 gsl_coerce_double\n.type gsl_coerce_double, %function\ngsl_coerce_double:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global gsl_coerce_double\n.type gsl_coerce_double, %function\ngsl_coerce_double:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\td0, [sp, 8]\n\tldr\td0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 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>
# 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": [
"37.1247093259"
],
"var": [
"x"
]
},
{
"value": [
"49.3458223947"
],
"var": [
"x"
]
},
{
"value": [
"91.6764001597"
],
"var": [
"x"
]
},
{
"value": [
"17.6100428001"
],
"var": [
"x"
]
},
{
"value": [
"90.5913602431"
],
"var": [
"x"
]
},
{
"value": [
"24.139667968"
],
"var": [
"x"
]
},
{
"value": [
"90.1654934013"
],
"var": [
"x"
]
},
{
"value": [
"1.49853098815"
],
"var": [
"x"
]
},
{
"value": [
"81.1644175816"
],
"var": [
"x"
]
},
{
"value": [
"75.1077442267"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"37.1247093259"
],
"var": [
"returnv"
]
},
{
"value": [
"49.3458223947"
],
"var": [
"returnv"
]
},
{
"value": [
"91.6764001597"
],
"var": [
"returnv"
]
},
{
"value": [
"17.6100428001"
],
"var": [
"returnv"
]
},
{
"value": [
"90.5913602431"
],
"var": [
"returnv"
]
},
{
"value": [
"24.139667968"
],
"var": [
"returnv"
]
},
{
"value": [
"90.1654934013"
],
"var": [
"returnv"
]
},
{
"value": [
"1.49853098815"
],
"var": [
"returnv"
]
},
{
"value": [
"81.1644175816"
],
"var": [
"returnv"
]
},
{
"value": [
"75.1077442267"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_484djn8_wi.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 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();
double returnv = gsl_coerce_double(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": "gsl_coerce_double", "funargs": ["x"], "typemap": {"x": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_484djn8_wi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
stevedonovan/Lake/examples/big1/c059.c
|
int c059(void) { return 0; }
|
int c059()
|
int c059(void)
|
c059
|
[
"int",
""
] |
{
"code": [
".globl c059\n.type c059, @function\nc059:\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 c059\n.type c059, @function\nc059:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl c059\n.type c059, @function\nc059:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global c059\n.type c059, %function\nc059:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global c059\n.type c059, %function\nc059:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global c059\n.type c059, %function\nc059:\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 <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_33uymieqyj.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 = c059();
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": "c059", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33uymieqyj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
jw3/jbmcgi/drag/mcdrag.c
|
double mcdrag_rpm(double twist, double velocity)
{
return (velocity/(twist/60.0)*12.0);
}
|
double mcdrag_rpm(doubletwist, doublevelocity)
|
double mcdrag_rpm(double twist, double velocity)
|
mcdrag_rpm
|
[
"double",
"double",
"double"
] |
{
"code": [
".globl mcdrag_rpm\n.type mcdrag_rpm, @function\nmcdrag_rpm:\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\tmovsd\t.LC0(%rip), %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t-16(%rbp), %xmm0\n\tdivsd\t%xmm1, %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC1(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t0\n",
".globl mcdrag_rpm\n.type mcdrag_rpm, @function\nmcdrag_rpm:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tdivsd\t.LC0(%rip), %xmm0\n\tdivsd\t%xmm0, %xmm1\n\tmulsd\t.LC1(%rip), %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t0\n",
".globl mcdrag_rpm\n.type mcdrag_rpm, @function\nmcdrag_rpm:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\tdivsd\t.LC0(%rip), %xmm0\n\tdivsd\t%xmm0, %xmm1\n\tmulsd\t.LC1(%rip), %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t0\n",
".global mcdrag_rpm\n.type mcdrag_rpm, %function\nmcdrag_rpm:\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\tmov\tx0, 4633641066610819072\n\tfmov\td1, x0\n\tldr\td0, [sp, 8]\n\tfdiv\td0, d0, d1\n\tldr\td1, [sp]\n\tfdiv\td1, d1, d0\n\tfmov\td0, 1.2e+1\n\tfmul\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global mcdrag_rpm\n.type mcdrag_rpm, %function\nmcdrag_rpm:\n.LFB11:\n\t.cfi_startproc\n\tmov\tx0, 4633641066610819072\n\tfmov\td2, x0\n\tfdiv\td0, d0, d2\n\tfdiv\td1, d1, d0\n\tfmov\td0, 1.2e+1\n\tfmul\td0, d1, d0\n\tret\n\t.cfi_endproc\n\n",
".global mcdrag_rpm\n.type mcdrag_rpm, %function\nmcdrag_rpm:\n.LFB16:\n\t.cfi_startproc\n\tmov\tx0, 4633641066610819072\n\tfmov\td2, x0\n\tfmov\td3, 1.2e+1\n\tfdiv\td0, d0, d2\n\tfdiv\td0, d1, d0\n\tfmul\td0, d0, d3\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 <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": [
"64.3427017926",
"15.5183706875"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"14.6929138043",
"25.5707431347"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"53.389002155",
"43.5378393968"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"30.5940929261",
"46.8925796531"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"5.77036571963",
"32.579068561"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"93.9830452805",
"6.3863068131"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"1.91673814532",
"43.6600038619"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"91.8571414027",
"72.01966438"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"64.9944865077",
"77.1873124844"
],
"var": [
"twist",
"velocity"
]
},
{
"value": [
"16.5679750836",
"90.4902470587"
],
"var": [
"twist",
"velocity"
]
}
],
"output": [
{
"value": [
"173.65181417179818"
],
"var": [
"returnv"
]
},
{
"value": [
"1253.0485989508693"
],
"var": [
"returnv"
]
},
{
"value": [
"587.1479724361221"
],
"var": [
"returnv"
]
},
{
"value": [
"1103.5678499044132"
],
"var": [
"returnv"
]
},
{
"value": [
"4065.068056973012"
],
"var": [
"returnv"
]
},
{
"value": [
"48.92521722091976"
],
"var": [
"returnv"
]
},
{
"value": [
"16400.363741558387"
],
"var": [
"returnv"
]
},
{
"value": [
"564.5087312947431"
],
"var": [
"returnv"
]
},
{
"value": [
"855.070452509598"
],
"var": [
"returnv"
]
},
{
"value": [
"3932.464743187381"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_584kjdt8vl.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 twist, double velocity, 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 twist = input_json["twist"];
double velocity = input_json["velocity"];
clock_t begin = clock();
double returnv = mcdrag_rpm(twist, velocity);
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(twist, velocity, returnv);
}
|
master
|
null
|
{"livein": ["twist", "velocity"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "mcdrag_rpm", "funargs": ["twist", "velocity"], "typemap": {"twist": "float64", "velocity": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_584kjdt8vl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
mspenceree/Versa-Filter/firmware/recover.c
|
int valid_serial(char *carray)
{
int i, code, num[10], sumo=0, sume=0, sumss=0;
for(i=0;i<10;i++){
code = carray[i];
num[i] = code - 0x30;
if((code<0x30)||(code>0x39)){
return 0;
}
}
sumo = num[0]+num[2]+num[4];
sumo = sumo - (sumo/10)*10;
sume = num[1]+num[3]+num[5];
sume = sume - (sume/10)*10;
sumss = num[0]+num[1]+num[2]+num[3]+num[4]+num[5]+sumo+sume;
if((sumo!=num[6])||(sume!=num[7])||(sumss!=(10*num[8]+num[9]))){
return 0;
}
return 1;
}
|
int valid_serial(char *carray)
|
int valid_serial(char *carray)
|
valid_serial
|
[
"int",
"char *"
] |
{
"code": [
".globl valid_serial\n.type valid_serial, @function\nvalid_serial:\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$96, %rsp\n\tmovq\t%rdi, -88(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovl\t$0, -64(%rbp)\n\tmovl\t$0, -60(%rbp)\n\tmovl\t$0, -56(%rbp)\n\tmovl\t$0, -68(%rbp)\n\tjmp\t.L2\n.L6:\n\tmovl\t-68(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-88(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tmovl\t%eax, -52(%rbp)\n\tmovl\t-52(%rbp), %eax\n\tleal\t-48(%rax), %edx\n\tmovl\t-68(%rbp), %eax\n\tcltq\n\tmovl\t%edx, -48(%rbp,%rax,4)\n\tcmpl\t$47, -52(%rbp)\n\tjle\t.L3\n\tcmpl\t$57, -52(%rbp)\n\tjle\t.L4\n.L3:\n\tmovl\t$0, %eax\n\tjmp\t.L9\n.L4:\n\taddl\t$1, -68(%rbp)\n.L2:\n\tcmpl\t$9, -68(%rbp)\n\tjle\t.L6\n\tmovl\t-48(%rbp), %edx\n\tmovl\t-40(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-32(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -64(%rbp)\n\tmovl\t-64(%rbp), %edx\n\tmovslq\t%edx, %rax\n\timulq\t$1717986919, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %ecx\n\tsarl\t$2, %ecx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\tsall\t$2, %eax\n\taddl\t%ecx, %eax\n\taddl\t%eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -64(%rbp)\n\tmovl\t-44(%rbp), %edx\n\tmovl\t-36(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-28(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -60(%rbp)\n\tmovl\t-60(%rbp), %edx\n\tmovslq\t%edx, %rax\n\timulq\t$1717986919, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %ecx\n\tsarl\t$2, %ecx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\tsall\t$2, %eax\n\taddl\t%ecx, %eax\n\taddl\t%eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -60(%rbp)\n\tmovl\t-48(%rbp), %edx\n\tmovl\t-44(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-40(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-36(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-32(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-28(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-64(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-60(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -56(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tcmpl\t%eax, -64(%rbp)\n\tjne\t.L7\n\tmovl\t-20(%rbp), %eax\n\tcmpl\t%eax, -60(%rbp)\n\tjne\t.L7\n\tmovl\t-16(%rbp), %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\tmovl\t-12(%rbp), %eax\n\taddl\t%edx, %eax\n\tcmpl\t%eax, -56(%rbp)\n\tje\t.L8\n.L7:\n\tmovl\t$0, %eax\n\tjmp\t.L9\n.L8:\n\tmovl\t$1, %eax\n.L9:\n\tmovq\t-8(%rbp), %rsi\n\txorq\t%fs:40, %rsi\n\tje\t.L10\n\tcall\t__stack_chk_fail@PLT\n.L10:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl valid_serial\n.type valid_serial, @function\nvalid_serial:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 3, -24\n\tsubq\t$56, %rsp\n\t.cfi_def_cfa_offset 80\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 40(%rsp)\n\txorl\t%eax, %eax\n.L3:\n\tmovsbl\t(%rdi,%rax), %edx\n\tsubl\t$48, %edx\n\tmovl\t%edx, (%rsp,%rax,4)\n\tcmpl\t$9, %edx\n\tja\t.L5\n\tincq\t%rax\n\tcmpq\t$10, %rax\n\tjne\t.L3\n\tmovl\t(%rsp), %ecx\n\tmovl\t8(%rsp), %r10d\n\tmovl\t$10, %esi\n\txorl\t%r12d, %r12d\n\tmovl\t16(%rsp), %r8d\n\tleal\t(%rcx,%r10), %eax\n\taddl\t%r8d, %eax\n\tcltd\n\tidivl\t%esi\n\tmovl\t%edx, %edi\n\tcmpl\t%edx, 24(%rsp)\n\tjne\t.L1\n\tmovl\t4(%rsp), %ebx\n\tmovl\t12(%rsp), %r11d\n\tmovl\t20(%rsp), %r9d\n\tleal\t(%rbx,%r11), %eax\n\taddl\t%r9d, %eax\n\tcltd\n\tidivl\t%esi\n\tcmpl\t%edx, 28(%rsp)\n\tjne\t.L1\n\taddl\t%ebx, %ecx\n\timull\t$10, 32(%rsp), %eax\n\taddl\t36(%rsp), %eax\n\txorl\t%r12d, %r12d\n\taddl\t%r10d, %ecx\n\taddl\t%r11d, %ecx\n\taddl\t%r8d, %ecx\n\taddl\t%r9d, %ecx\n\taddl\t%edi, %ecx\n\taddl\t%edx, %ecx\n\tcmpl\t%eax, %ecx\n\tsete\t%r12b\n\tjmp\t.L1\n.L5:\n\txorl\t%r12d, %r12d\n.L1:\n\tmovq\t40(%rsp), %rax\n\txorq\t%fs:40, %rax\n\tje\t.L4\n\tcall\t__stack_chk_fail@PLT\n.L4:\n\taddq\t$56, %rsp\n\t.cfi_def_cfa_offset 24\n\tmovl\t%r12d, %eax\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n",
".globl valid_serial\n.type valid_serial, @function\nvalid_serial:\n.LFB29:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t(%rdi), %edx\n\tsubl\t$48, %edx\n\tcmpl\t$9, %edx\n\tja\t.L6\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 6, -32\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tmovsbl\t1(%rdi), %ebx\n\tsubl\t$48, %ebx\n\tcmpl\t$9, %ebx\n\tja\t.L2\n\tmovsbl\t2(%rdi), %eax\n\tleal\t-48(%rax), %ecx\n\tcmpl\t$9, %ecx\n\tja\t.L2\n\tmovsbl\t3(%rdi), %eax\n\tleal\t-48(%rax), %r11d\n\tcmpl\t$9, %r11d\n\tja\t.L2\n\tmovsbl\t4(%rdi), %eax\n\tleal\t-48(%rax), %esi\n\tcmpl\t$9, %esi\n\tja\t.L2\n\tmovsbl\t5(%rdi), %eax\n\tleal\t-48(%rax), %r10d\n\tcmpl\t$9, %r10d\n\tja\t.L2\n\tmovsbl\t6(%rdi), %eax\n\tleal\t-48(%rax), %r9d\n\tcmpl\t$9, %r9d\n\tja\t.L2\n\tmovsbl\t7(%rdi), %eax\n\tleal\t-48(%rax), %r8d\n\tcmpl\t$9, %r8d\n\tja\t.L2\n\tmovsbl\t8(%rdi), %ebp\n\tsubl\t$48, %ebp\n\tcmpl\t$9, %ebp\n\tja\t.L2\n\tmovsbl\t9(%rdi), %r12d\n\tsubl\t$48, %r12d\n\tcmpl\t$9, %r12d\n\tja\t.L2\n\tleal\t(%rdx,%rcx), %edi\n\taddl\t%esi, %edi\n\tmovslq\t%edi, %rax\n\tmovl\t%edi, %r13d\n\timulq\t$1717986919, %rax, %rax\n\tsarl\t$31, %r13d\n\tsarq\t$34, %rax\n\tsubl\t%r13d, %eax\n\tleal\t(%rax,%rax,4), %eax\n\taddl\t%eax, %eax\n\tsubl\t%eax, %edi\n\tcmpl\t%r9d, %edi\n\tje\t.L11\n.L2:\n\txorl\t%eax, %eax\n.L1:\n\tpopq\t%rbx\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 32\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 24\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r13\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\t.cfi_restore_state\n\tleal\t(%rbx,%r11), %edi\n\taddl\t%r10d, %edi\n\tmovslq\t%edi, %rax\n\tmovl\t%edi, %r13d\n\timulq\t$1717986919, %rax, %rax\n\tsarl\t$31, %r13d\n\tsarq\t$34, %rax\n\tsubl\t%r13d, %eax\n\tleal\t(%rax,%rax,4), %eax\n\taddl\t%eax, %eax\n\tsubl\t%eax, %edi\n\tcmpl\t%r8d, %edi\n\tjne\t.L2\n\tleal\t0(%rbp,%rbp,4), %eax\n\taddl\t%ebx, %edx\n\tleal\t(%r12,%rax,2), %edi\n\tleal\t(%rdx,%rcx), %eax\n\taddl\t%r11d, %eax\n\taddl\t%esi, %eax\n\taddl\t%r10d, %eax\n\taddl\t%r9d, %eax\n\tleal\t(%rax,%r8), %edx\n\tmovl\t$1, %eax\n\tcmpl\t%edx, %edi\n\tje\t.L1\n\tjmp\t.L2\n.L6:\n\t.cfi_def_cfa_offset 8\n\t.cfi_restore 3\n\t.cfi_restore 6\n\t.cfi_restore 12\n\t.cfi_restore 13\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global valid_serial\n.type valid_serial, %function\nvalid_serial:\n.LFB6:\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\tstr\tx0, [sp, 24]\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\tstr\twzr, [sp, 48]\n\tstr\twzr, [sp, 52]\n\tstr\twzr, [sp, 56]\n\tstr\twzr, [sp, 44]\n\tb\t.L2\n.L6:\n\tldrsw\tx0, [sp, 44]\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tstr\tw0, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tsub\tw2, w0, #48\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 2\n\tadd\tx1, sp, 64\n\tstr\tw2, [x1, x0]\n\tldr\tw0, [sp, 60]\n\tcmp\tw0, 47\n\tble\t.L3\n\tldr\tw0, [sp, 60]\n\tcmp\tw0, 57\n\tble\t.L4\n.L3:\n\tmov\tw0, 0\n\tb\t.L9\n.L4:\n\tldr\tw0, [sp, 44]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n.L2:\n\tldr\tw0, [sp, 44]\n\tcmp\tw0, 9\n\tble\t.L6\n\tldr\tw1, [sp, 64]\n\tldr\tw0, [sp, 72]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 80]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 48]\n\tldr\tw1, [sp, 48]\n\tmov\tw0, 26215\n\tmovk\tw0, 0x6666, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 2\n\tasr\tw0, w1, 31\n\tsub\tw2, w2, w0\n\tmov\tw0, w2\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w2\n\tlsl\tw0, w0, 1\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 48]\n\tldr\tw1, [sp, 68]\n\tldr\tw0, [sp, 76]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 84]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 52]\n\tldr\tw1, [sp, 52]\n\tmov\tw0, 26215\n\tmovk\tw0, 0x6666, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 2\n\tasr\tw0, w1, 31\n\tsub\tw2, w2, w0\n\tmov\tw0, w2\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w2\n\tlsl\tw0, w0, 1\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 52]\n\tldr\tw1, [sp, 64]\n\tldr\tw0, [sp, 68]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 72]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 76]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 80]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 84]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 48]\n\tadd\tw0, w1, w0\n\tldr\tw1, [sp, 52]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 56]\n\tldr\tw0, [sp, 88]\n\tldr\tw1, [sp, 48]\n\tcmp\tw1, w0\n\tbne\t.L7\n\tldr\tw0, [sp, 92]\n\tldr\tw1, [sp, 52]\n\tcmp\tw1, w0\n\tbne\t.L7\n\tldr\tw1, [sp, 96]\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\tw0, [sp, 100]\n\tadd\tw0, w1, w0\n\tldr\tw1, [sp, 56]\n\tcmp\tw1, w0\n\tbeq\t.L8\n.L7:\n\tmov\tw0, 0\n\tb\t.L9\n.L8:\n\tmov\tw0, 1\n.L9:\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.L10\n\tbl\t__stack_chk_fail\n.L10:\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 valid_serial\n.type valid_serial, %function\nvalid_serial:\n.LFB22:\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\tx3, :got:__stack_chk_guard\n\tmov\tx29, sp\n\tldr\tx1, [x3, #:got_lo12:__stack_chk_guard]\n\tadd\tx4, sp, 16\n\tldr\tx2, [x1]\n\tstr\tx2, [sp, 56]\n\tmov\tx2,0\n\tmov\tx1, 0\n.L3:\n\tldrb\tw2, [x0, x1]\n\tsub\tw2, w2, #48\n\tstr\tw2, [x4, x1, lsl 2]\n\tcmp\tw2, 9\n\tbhi\t.L7\n\tadd\tx1, x1, 1\n\tcmp\tx1, 10\n\tbne\t.L3\n\tldr\tw0, [sp, 16]\n\tmov\tw11, w1\n\tldr\tw9, [sp, 24]\n\tldr\tw7, [sp, 32]\n\tadd\tw2, w0, w9\n\tldr\tw5, [sp, 40]\n\tadd\tw2, w2, w7\n\tsdiv\tw4, w2, w1\n\tmsub\tw2, w4, w1, w2\n\tcmp\tw5, w2\n\tbne\t.L7\n\tldr\tw10, [sp, 20]\n\tldr\tw8, [sp, 28]\n\tldr\tw6, [sp, 36]\n\tadd\tw2, w10, w8\n\tadd\tw2, w2, w6\n\tsdiv\tw4, w2, w1\n\tmsub\tw1, w4, w1, w2\n\tldr\tw2, [sp, 44]\n\tcmp\tw2, w1\n\tbne\t.L7\n\tadd\tw0, w0, w10\n\tadd\tw0, w0, w9\n\tadd\tw0, w0, w8\n\tadd\tw0, w0, w7\n\tadd\tw0, w0, w6\n\tadd\tw0, w0, w5\n\tadd\tw0, w0, w2\n\tldp\tw1, w2, [sp, 48]\n\tmadd\tw1, w1, w11, w2\n\tcmp\tw0, w1\n\tcset\tw0, eq\n.L1:\n\tldr\tx1, [x3, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L4\n\tbl\t__stack_chk_fail\n.L7:\n\tmov\tw0, 0\n\tb\t.L1\n.L4:\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 valid_serial\n.type valid_serial, %function\nvalid_serial:\n.LFB29:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tsub\tw1, w1, #48\n\tcmp\tw1, 9\n\tbhi\t.L2\n\tldrb\tw5, [x0, 1]\n\tsub\tw5, w5, #48\n\tcmp\tw5, 9\n\tbhi\t.L2\n\tldrb\tw4, [x0, 2]\n\tsub\tw4, w4, #48\n\tcmp\tw4, 9\n\tbhi\t.L2\n\tldrb\tw12, [x0, 3]\n\tsub\tw12, w12, #48\n\tcmp\tw12, 9\n\tbhi\t.L2\n\tldrb\tw11, [x0, 4]\n\tsub\tw11, w11, #48\n\tcmp\tw11, 9\n\tbhi\t.L2\n\tldrb\tw10, [x0, 5]\n\tsub\tw10, w10, #48\n\tcmp\tw10, 9\n\tbhi\t.L2\n\tldrb\tw9, [x0, 6]\n\tsub\tw9, w9, #48\n\tcmp\tw9, 9\n\tbhi\t.L2\n\tldrb\tw8, [x0, 7]\n\tsub\tw8, w8, #48\n\tcmp\tw8, 9\n\tbhi\t.L2\n\tldrb\tw6, [x0, 8]\n\tsub\tw6, w6, #48\n\tcmp\tw6, 9\n\tbhi\t.L2\n\tldrb\tw2, [x0, 9]\n\tsub\tw7, w2, #48\n\tcmp\tw7, 9\n\tbhi\t.L2\n\tadd\tw3, w1, w4\n\tmov\tw2, 26215\n\tadd\tw3, w3, w11\n\tmovk\tw2, 0x6666, lsl 16\n\tsmull\tx0, w3, w2\n\tasr\tx0, x0, 34\n\tsub\tw0, w0, w3, asr 31\n\tadd\tw0, w0, w0, lsl 2\n\tsub\tw0, w3, w0, lsl 1\n\tcmp\tw0, w9\n\tbeq\t.L6\n.L2:\n\tmov\tw0, 0\n.L1:\n\tret\n\t.p2align 2,,3\n.L6:\n\tadd\tw3, w5, w12\n\tadd\tw3, w3, w10\n\tsmull\tx0, w3, w2\n\tasr\tx0, x0, 34\n\tsub\tw0, w0, w3, asr 31\n\tadd\tw0, w0, w0, lsl 2\n\tsub\tw0, w3, w0, lsl 1\n\tcmp\tw0, w8\n\tbne\t.L2\n\tadd\tw1, w1, w5\n\tadd\tw6, w6, w6, lsl 2\n\tadd\tw1, w1, w4\n\tmov\tw0, 1\n\tadd\tw1, w1, w12\n\tadd\tw2, w7, w6, lsl 1\n\tadd\tw1, w1, w11\n\tadd\tw1, w1, w10\n\tadd\tw1, w1, w9\n\tadd\tw1, w1, w8\n\tcmp\tw2, w1\n\tbeq\t.L1\n\tmov\tw0, 0\n\tb\t.L1\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 standard library header */
#include <math.h> /* Include math library header */
#include <string.h> /* Include string function header */
#include <ctype.h> /* Include character function header */
#include <limits.h> /* define LONG_MIN and LONG_MAX */
# 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": [
"\"uvrujj\""
],
"var": [
"carray"
]
},
{
"value": [
"\"ekxtwcrmt\""
],
"var": [
"carray"
]
},
{
"value": [
"\"h\""
],
"var": [
"carray"
]
},
{
"value": [
"\"kbpcqcckkuwrzqeaubfwvc\""
],
"var": [
"carray"
]
},
{
"value": [
"\"op\""
],
"var": [
"carray"
]
},
{
"value": [
"\"cdirdoqzqi\""
],
"var": [
"carray"
]
},
{
"value": [
"\"eoolbcjbrcitcqezfewgpj\""
],
"var": [
"carray"
]
},
{
"value": [
"\"imxe\""
],
"var": [
"carray"
]
},
{
"value": [
"\"jivzgiuvedbvaokylgktlpj\""
],
"var": [
"carray"
]
},
{
"value": [
"\"dnzrsnualqeabktaaapdrll\""
],
"var": [
"carray"
]
}
],
"output": [
{
"value": [
"\"uvrujj\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"ekxtwcrmt\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"h\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"kbpcqcckkuwrzqeaubfwvc\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"op\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"cdirdoqzqi\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"eoolbcjbrcitcqezfewgpj\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"imxe\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"jivzgiuvedbvaokylgktlpj\"",
"0"
],
"var": [
"carray",
"returnv"
]
},
{
"value": [
"\"dnzrsnualqeabktaaapdrll\"",
"0"
],
"var": [
"carray",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_44tyhg3423.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* carray, int returnv) {
json output_json;
output_json["carray"] = carray;
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* carray = strdup(input_json["carray"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = valid_serial(carray);
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(carray, returnv);
}
|
master
|
null
|
{"livein": ["carray"], "liveout": ["carray"], "returnvarname": ["returnv"], "execcmd": "", "funname": "valid_serial", "funargs": ["carray"], "typemap": {"carray": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44tyhg3423.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
robbertkrebbers/ch2o/tests/undefined-ellison/unsorted/j075b.c
|
int f(int x) { return x - 5; }
|
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, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$5, %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\tleal\t-5(%rdi), %eax\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-5(%rdi), %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, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #5\n\tadd\tsp, sp, 16\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\tsub\tw0, w0, #5\n\tret\n\t.cfi_endproc\n\n",
".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #5\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": [
"102"
],
"var": [
"x"
]
},
{
"value": [
"31"
],
"var": [
"x"
]
},
{
"value": [
"20"
],
"var": [
"x"
]
},
{
"value": [
"27"
],
"var": [
"x"
]
},
{
"value": [
"124"
],
"var": [
"x"
]
},
{
"value": [
"27"
],
"var": [
"x"
]
},
{
"value": [
"104"
],
"var": [
"x"
]
},
{
"value": [
"122"
],
"var": [
"x"
]
},
{
"value": [
"115"
],
"var": [
"x"
]
},
{
"value": [
"98"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"97"
],
"var": [
"returnv"
]
},
{
"value": [
"26"
],
"var": [
"returnv"
]
},
{
"value": [
"15"
],
"var": [
"returnv"
]
},
{
"value": [
"22"
],
"var": [
"returnv"
]
},
{
"value": [
"119"
],
"var": [
"returnv"
]
},
{
"value": [
"22"
],
"var": [
"returnv"
]
},
{
"value": [
"99"
],
"var": [
"returnv"
]
},
{
"value": [
"117"
],
"var": [
"returnv"
]
},
{
"value": [
"110"
],
"var": [
"returnv"
]
},
{
"value": [
"93"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_42cfqdq3yv.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_42cfqdq3yv.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
cvra/can-bootloader/tests/mocks/timeout_mock.c
|
bool timeout_reached(void)
{
return false;
}
|
int timeout_reached()
|
bool timeout_reached(void)
|
timeout_reached
|
[
"int",
""
] |
{
"code": [
".globl timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\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 timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\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 timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl timeout_reached\n.type timeout_reached, @function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global timeout_reached\n.type timeout_reached, %function\ntimeout_reached:\n.LFB0:\n\t.cfi_startproc\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 */
|
#include <stdbool.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": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
}
],
"output": [
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"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": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
}
],
"output": [
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
},
{
"value": [
"false"
],
"var": [
"returnv"
]
}
]
}
|
extern "C" {
#include "/run/user/1000/pytmpfile_jordiws_3577757ag11br_c.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(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);
clock_t begin = clock();
bool returnv = timeout_reached();
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);
}
|
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_48u7zar473.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(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);
clock_t begin = clock();
bool returnv = timeout_reached();
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": "timeout_reached", "funargs": [], "typemap": {"returnv": "bool"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48u7zar473.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
pokebyte/blueberryMSX/Src/Language/LanguageMinimal.c
|
char* langRomTypeMicrosolFdc() { return "Microsol Disk Controller"; }
|
char * langRomTypeMicrosolFdc()
|
char* langRomTypeMicrosolFdc()
|
langRomTypeMicrosolFdc
|
[
"char *",
""
] |
{
"code": [
".globl langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, @function\nlangRomTypeMicrosolFdc:\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\"Microsol Disk Controller\"\n",
".globl langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, @function\nlangRomTypeMicrosolFdc:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"Microsol Disk Controller\"\n",
".globl langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, @function\nlangRomTypeMicrosolFdc:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"Microsol Disk Controller\"\n",
".global langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, %function\nlangRomTypeMicrosolFdc:\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\"Microsol Disk Controller\"\n",
".global langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, %function\nlangRomTypeMicrosolFdc:\n.LFB11:\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\"Microsol Disk Controller\"\n",
".global langRomTypeMicrosolFdc\n.type langRomTypeMicrosolFdc, %function\nlangRomTypeMicrosolFdc:\n.LFB11:\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\"Microsol Disk Controller\"\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": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
}
],
"output": [
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"Microsol Disk Controller\""
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_62je59lx3x.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 = langRomTypeMicrosolFdc();
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": "langRomTypeMicrosolFdc", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62je59lx3x.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
|
int do_386() { return 386; }
|
int do_386()
|
int do_386()
|
do_386
|
[
"int",
""
] |
{
"code": [
".globl do_386\n.type do_386, @function\ndo_386:\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$386, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl do_386\n.type do_386, @function\ndo_386:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$386, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl do_386\n.type do_386, @function\ndo_386:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$386, %eax\n\tret\n\t.cfi_endproc\n\n",
".global do_386\n.type do_386, %function\ndo_386:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 386\n\tret\n\t.cfi_endproc\n\n",
".global do_386\n.type do_386, %function\ndo_386:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 386\n\tret\n\t.cfi_endproc\n\n",
".global do_386\n.type do_386, %function\ndo_386:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 386\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": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
},
{
"value": [
"386"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_539903td0c.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_386();
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_386", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_539903td0c.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
scottfrazer/cAST/test/cases/3/test.h
|
int function(int a, int b) { return a+b; }
|
int function(inta, intb)
|
int function(int a, int b)
|
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\tmovl\t-4(%rbp), %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 function\n.type function, @function\nfunction:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl function\n.type function, @function\nfunction:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t(%rdi,%rsi), %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\tw1, [sp, 12]\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 function\n.type function, %function\nfunction:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n",
".global function\n.type function, %function\nfunction:\n.LFB0:\n\t.cfi_startproc\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 |
# 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": [
"84",
"111"
],
"var": [
"a",
"b"
]
},
{
"value": [
"13",
"125"
],
"var": [
"a",
"b"
]
},
{
"value": [
"20",
"74"
],
"var": [
"a",
"b"
]
},
{
"value": [
"3",
"24"
],
"var": [
"a",
"b"
]
},
{
"value": [
"9",
"120"
],
"var": [
"a",
"b"
]
},
{
"value": [
"6",
"59"
],
"var": [
"a",
"b"
]
},
{
"value": [
"45",
"57"
],
"var": [
"a",
"b"
]
},
{
"value": [
"41",
"52"
],
"var": [
"a",
"b"
]
},
{
"value": [
"44",
"87"
],
"var": [
"a",
"b"
]
},
{
"value": [
"125",
"100"
],
"var": [
"a",
"b"
]
}
],
"output": [
{
"value": [
"195"
],
"var": [
"returnv"
]
},
{
"value": [
"138"
],
"var": [
"returnv"
]
},
{
"value": [
"94"
],
"var": [
"returnv"
]
},
{
"value": [
"27"
],
"var": [
"returnv"
]
},
{
"value": [
"129"
],
"var": [
"returnv"
]
},
{
"value": [
"65"
],
"var": [
"returnv"
]
},
{
"value": [
"102"
],
"var": [
"returnv"
]
},
{
"value": [
"93"
],
"var": [
"returnv"
]
},
{
"value": [
"131"
],
"var": [
"returnv"
]
},
{
"value": [
"225"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_42mcrr0_ki.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 = function(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": "function", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42mcrr0_ki.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
bert/libtgb1990/src/NEN6772.c
|
double
UC_11_1_11
(
double F_g_s_rep,
double F_g_u_d
)
{
return (F_g_s_rep / F_g_u_d);
}
|
double UC_11_1_11(doubleF_g_s_rep, doubleF_g_u_d)
|
double UC_11_1_11 ( double F_g_s_rep, double F_g_u_d )
|
UC_11_1_11
|
[
"double",
"double",
"double"
] |
{
"code": [
".globl UC_11_1_11\n.type UC_11_1_11, @function\nUC_11_1_11:\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\tdivsd\t-16(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl UC_11_1_11\n.type UC_11_1_11, @function\nUC_11_1_11:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl UC_11_1_11\n.type UC_11_1_11, @function\nUC_11_1_11:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global UC_11_1_11\n.type UC_11_1_11, %function\nUC_11_1_11:\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\td0, [sp]\n\tldr\td1, [sp, 8]\n\tfdiv\td0, d1, d0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global UC_11_1_11\n.type UC_11_1_11, %function\nUC_11_1_11:\n.LFB35:\n\t.cfi_startproc\n\tfdiv\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n",
".global UC_11_1_11\n.type UC_11_1_11, %function\nUC_11_1_11:\n.LFB50:\n\t.cfi_startproc\n\tfdiv\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 <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": [
"7.75117789952",
"60.5701269637"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"95.9909991601",
"78.9394016456"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"25.786150255",
"26.4146298872"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"84.9399805465",
"96.5842208482"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"43.4087108463",
"83.4766302607"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"37.1764148819",
"46.6277024053"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"22.9823658801",
"44.0019562216"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"76.9041565435",
"3.94177294129"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"88.1613567318",
"66.8638190026"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
},
{
"value": [
"84.5640824141",
"74.9867583537"
],
"var": [
"F_g_s_rep",
"F_g_u_d"
]
}
],
"output": [
{
"value": [
"0.1279703095911508"
],
"var": [
"returnv"
]
},
{
"value": [
"1.2160086998258928"
],
"var": [
"returnv"
]
},
{
"value": [
"0.9762071384348812"
],
"var": [
"returnv"
]
},
{
"value": [
"0.8794395171443057"
],
"var": [
"returnv"
]
},
{
"value": [
"0.5200103395493242"
],
"var": [
"returnv"
]
},
{
"value": [
"0.7973031688062394"
],
"var": [
"returnv"
]
},
{
"value": [
"0.5223032758897718"
],
"var": [
"returnv"
]
},
{
"value": [
"19.510042229457294"
],
"var": [
"returnv"
]
},
{
"value": [
"1.3185211082300257"
],
"var": [
"returnv"
]
},
{
"value": [
"1.1277202038155238"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_51cmq99f8l.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 F_g_s_rep, double F_g_u_d, 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 F_g_s_rep = input_json["F_g_s_rep"];
double F_g_u_d = input_json["F_g_u_d"];
clock_t begin = clock();
double returnv = UC_11_1_11(F_g_s_rep, F_g_u_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(F_g_s_rep, F_g_u_d, returnv);
}
|
master
|
null
|
{"livein": ["F_g_s_rep", "F_g_u_d"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "UC_11_1_11", "funargs": ["F_g_s_rep", "F_g_u_d"], "typemap": {"F_g_s_rep": "float64", "F_g_u_d": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_51cmq99f8l.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
astroza/Leela/brain/launcher/launcher.c
|
int stop_process(int pid)
{
return kill(pid, 15);
}
|
int stop_process(intpid)
|
int stop_process(int pid)
|
stop_process
|
[
"int",
"int"
] |
{
"code": [
".globl stop_process\n.type stop_process, @function\nstop_process:\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\tmovl\t-4(%rbp), %eax\n\tmovl\t$15, %esi\n\tmovl\t%eax, %edi\n\tcall\tkill@PLT\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl stop_process\n.type stop_process, @function\nstop_process:\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-4(%rbp), %eax\n\tmovl\t$15, %esi\n\tmovl\t%eax, %edi\n\tcall\tkill@PLT\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl stop_process\n.type stop_process, @function\nstop_process:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$15, %esi\n\tjmp\tkill@PLT\n\t.cfi_endproc\n\n",
".globl stop_process\n.type stop_process, @function\nstop_process:\n.LFB48:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$15, %esi\n\tjmp\tkill@PLT\n\t.cfi_endproc\n\n",
".globl stop_process\n.type stop_process, @function\nstop_process:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$15, %esi\n\tjmp\tkill@PLT\n\t.cfi_endproc\n\n",
".globl stop_process\n.type stop_process, @function\nstop_process:\n.LFB69:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$15, %esi\n\tjmp\tkill@PLT\n\t.cfi_endproc\n\n",
".global stop_process\n.type stop_process, %function\nstop_process:\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\tmov\tw1, 15\n\tldr\tw0, [sp, 28]\n\tbl\tkill\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 stop_process\n.type stop_process, %function\nstop_process:\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\tmov\tw1, 15\n\tldr\tw0, [sp, 28]\n\tbl\tkill\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 stop_process\n.type stop_process, %function\nstop_process:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, 15\n\tb\tkill\n\t.cfi_endproc\n\n",
".global stop_process\n.type stop_process, %function\nstop_process:\n.LFB48:\n\t.cfi_startproc\n\tmov\tw1, 15\n\tb\tkill\n\t.cfi_endproc\n\n",
".global stop_process\n.type stop_process, %function\nstop_process:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, 15\n\tb\tkill\n\t.cfi_endproc\n\n",
".global stop_process\n.type stop_process, %function\nstop_process:\n.LFB69:\n\t.cfi_startproc\n\tmov\tw1, 15\n\tb\tkill\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 kill (int,int) ;
|
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
# 1
|
{
"dummy_funcs": [
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int b, int d) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int m, int z) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n",
"int kill (int s, int z) {\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": [
"113"
],
"var": [
"pid"
]
},
{
"value": [
"98"
],
"var": [
"pid"
]
},
{
"value": [
"3"
],
"var": [
"pid"
]
},
{
"value": [
"71"
],
"var": [
"pid"
]
},
{
"value": [
"78"
],
"var": [
"pid"
]
},
{
"value": [
"69"
],
"var": [
"pid"
]
},
{
"value": [
"124"
],
"var": [
"pid"
]
},
{
"value": [
"84"
],
"var": [
"pid"
]
},
{
"value": [
"95"
],
"var": [
"pid"
]
},
{
"value": [
"122"
],
"var": [
"pid"
]
},
{
"value": [
"113"
],
"var": [
"pid"
]
},
{
"value": [
"98"
],
"var": [
"pid"
]
},
{
"value": [
"3"
],
"var": [
"pid"
]
},
{
"value": [
"71"
],
"var": [
"pid"
]
},
{
"value": [
"78"
],
"var": [
"pid"
]
},
{
"value": [
"69"
],
"var": [
"pid"
]
},
{
"value": [
"124"
],
"var": [
"pid"
]
},
{
"value": [
"84"
],
"var": [
"pid"
]
},
{
"value": [
"95"
],
"var": [
"pid"
]
},
{
"value": [
"122"
],
"var": [
"pid"
]
},
{
"value": [
"113"
],
"var": [
"pid"
]
},
{
"value": [
"98"
],
"var": [
"pid"
]
},
{
"value": [
"3"
],
"var": [
"pid"
]
},
{
"value": [
"71"
],
"var": [
"pid"
]
},
{
"value": [
"78"
],
"var": [
"pid"
]
},
{
"value": [
"69"
],
"var": [
"pid"
]
},
{
"value": [
"124"
],
"var": [
"pid"
]
},
{
"value": [
"84"
],
"var": [
"pid"
]
},
{
"value": [
"95"
],
"var": [
"pid"
]
},
{
"value": [
"122"
],
"var": [
"pid"
]
}
],
"output": [
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"74"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"returnv"
]
},
{
"value": [
"113"
],
"var": [
"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": [
"113"
],
"var": [
"pid"
]
},
{
"value": [
"98"
],
"var": [
"pid"
]
},
{
"value": [
"3"
],
"var": [
"pid"
]
},
{
"value": [
"71"
],
"var": [
"pid"
]
},
{
"value": [
"78"
],
"var": [
"pid"
]
},
{
"value": [
"69"
],
"var": [
"pid"
]
},
{
"value": [
"124"
],
"var": [
"pid"
]
},
{
"value": [
"84"
],
"var": [
"pid"
]
},
{
"value": [
"95"
],
"var": [
"pid"
]
},
{
"value": [
"122"
],
"var": [
"pid"
]
}
],
"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"
]
}
]
}
|
extern "C" {
#include "/run/user/1000/pytmpfile_jordiws_3577735rih14ck5.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 pid, 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 pid = input_json["pid"];
clock_t begin = clock();
int returnv = stop_process(pid);
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(pid, returnv);
}
|
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_45e__pfm2s.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 pid, 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 pid = input_json["pid"];
clock_t begin = clock();
int returnv = stop_process(pid);
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(pid, returnv);
}
|
master
|
null
|
{"livein": ["pid"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "stop_process", "funargs": ["pid"], "typemap": {"pid": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45e__pfm2s.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
dankcushions/pcsx_rearmed/plugins/gpu_neon/vout_pl.c
|
int vout_finish(void)
{
return 0;
}
|
int vout_finish()
|
int vout_finish(void)
|
vout_finish
|
[
"int",
""
] |
{
"code": [
".globl vout_finish\n.type vout_finish, @function\nvout_finish:\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 vout_finish\n.type vout_finish, @function\nvout_finish:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl vout_finish\n.type vout_finish, @function\nvout_finish:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global vout_finish\n.type vout_finish, %function\nvout_finish:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global vout_finish\n.type vout_finish, %function\nvout_finish:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global vout_finish\n.type vout_finish, %function\nvout_finish:\n.LFB11:\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>
# 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_30w_wzwroj.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 = vout_finish();
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": "vout_finish", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30w_wzwroj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
8l/AutoCorres/c-parser/testfiles/ptr_auxupd.c
|
int alloc(int *p)
{
int tmp = 5;
return 0;
}
|
int alloc(int *p)
|
int alloc(int *p)
|
alloc
|
[
"int",
"int *"
] |
{
"code": [
".globl alloc\n.type alloc, @function\nalloc:\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$5, -4(%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 alloc\n.type alloc, @function\nalloc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl alloc\n.type alloc, @function\nalloc:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global alloc\n.type alloc, %function\nalloc:\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, 5\n\tstr\tw0, [sp, 28]\n\tmov\tw0, 0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global alloc\n.type alloc, %function\nalloc:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global alloc\n.type alloc, %function\nalloc:\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": [
"[52, 104, 102, 51, 121, 56, 38, 4, 74, 77, 101, 109, 5, 61, 47, 97, 23, 107, 119, 63, 74, 79, 118, 74, 30, 97, 74, 98, 75, 33, 73, 26]"
],
"var": [
"p"
]
},
{
"value": [
"[103, 115, 107, 111, 18, 79, 117, 57, 75, 2, 85, 7, 96, 20, 85, 66, 72, 99, 36, 5, 13, 100, 123, 70, 113, 91, 28, 48, 61, 20, 72, 17]"
],
"var": [
"p"
]
},
{
"value": [
"[36, 61, 52, 111, 7, 122, 107, 74, 98, 4, 121, 40, 99, 117, 123, 118, 72, 105, 63, 81, 26, 0, 84, 107, 37, 92, 58, 80, 103, 69, 43, 5]"
],
"var": [
"p"
]
},
{
"value": [
"[53, 113, 58, 10, 67, 22, 59, 4, 94, 106, 51, 6, 20, 11, 76, 108, 41, 61, 72, 70, 20, 0, 89, 68, 37, 42, 49, 62, 39, 74, 5, 20]"
],
"var": [
"p"
]
},
{
"value": [
"[8, 46, 38, 56, 10, 17, 26, 106, 103, 32, 121, 54, 64, 118, 45, 123, 106, 116, 58, 126, 14, 104, 54, 19, 71, 2, 30, 116, 45, 25, 41, 25]"
],
"var": [
"p"
]
},
{
"value": [
"[5, 122, 41, 80, 52, 18, 80, 78, 18, 3, 64, 20, 14, 63, 6, 76, 44, 54, 18, 17, 72, 44, 87, 68, 123, 57, 110, 59, 43, 25, 72, 75]"
],
"var": [
"p"
]
},
{
"value": [
"[120, 46, 80, 78, 42, 61, 19, 75, 94, 10, 3, 76, 21, 106, 56, 78, 109, 88, 91, 100, 38, 0, 88, 101, 62, 78, 104, 46, 41, 104, 14, 116]"
],
"var": [
"p"
]
},
{
"value": [
"[111, 94, 123, 56, 44, 12, 28, 72, 12, 95, 24, 93, 53, 105, 6, 16, 112, 125, 114, 9, 106, 47, 3, 63, 112, 76, 97, 46, 112, 47, 67, 93]"
],
"var": [
"p"
]
},
{
"value": [
"[92, 0, 117, 109, 74, 11, 71, 30, 86, 47, 26, 6, 17, 24, 23, 66, 59, 117, 99, 20, 25, 36, 91, 24, 97, 105, 82, 99, 123, 6, 103, 37]"
],
"var": [
"p"
]
},
{
"value": [
"[53, 112, 65, 1, 124, 55, 37, 17, 88, 112, 4, 20, 116, 56, 47, 113, 103, 94, 71, 30, 68, 14, 83, 76, 77, 103, 54, 76, 98, 57, 84, 109]"
],
"var": [
"p"
]
}
],
"output": [
{
"value": [
"[52, 104, 102, 51, 121, 56, 38, 4, 74, 77, 101, 109, 5, 61, 47, 97, 23, 107, 119, 63, 74, 79, 118, 74, 30, 97, 74, 98, 75, 33, 73, 26]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[103, 115, 107, 111, 18, 79, 117, 57, 75, 2, 85, 7, 96, 20, 85, 66, 72, 99, 36, 5, 13, 100, 123, 70, 113, 91, 28, 48, 61, 20, 72, 17]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[36, 61, 52, 111, 7, 122, 107, 74, 98, 4, 121, 40, 99, 117, 123, 118, 72, 105, 63, 81, 26, 0, 84, 107, 37, 92, 58, 80, 103, 69, 43, 5]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[53, 113, 58, 10, 67, 22, 59, 4, 94, 106, 51, 6, 20, 11, 76, 108, 41, 61, 72, 70, 20, 0, 89, 68, 37, 42, 49, 62, 39, 74, 5, 20]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[8, 46, 38, 56, 10, 17, 26, 106, 103, 32, 121, 54, 64, 118, 45, 123, 106, 116, 58, 126, 14, 104, 54, 19, 71, 2, 30, 116, 45, 25, 41, 25]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[5, 122, 41, 80, 52, 18, 80, 78, 18, 3, 64, 20, 14, 63, 6, 76, 44, 54, 18, 17, 72, 44, 87, 68, 123, 57, 110, 59, 43, 25, 72, 75]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[120, 46, 80, 78, 42, 61, 19, 75, 94, 10, 3, 76, 21, 106, 56, 78, 109, 88, 91, 100, 38, 0, 88, 101, 62, 78, 104, 46, 41, 104, 14, 116]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[111, 94, 123, 56, 44, 12, 28, 72, 12, 95, 24, 93, 53, 105, 6, 16, 112, 125, 114, 9, 106, 47, 3, 63, 112, 76, 97, 46, 112, 47, 67, 93]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[92, 0, 117, 109, 74, 11, 71, 30, 86, 47, 26, 6, 17, 24, 23, 66, 59, 117, 99, 20, 25, 36, 91, 24, 97, 105, 82, 99, 123, 6, 103, 37]",
"0"
],
"var": [
"p",
"returnv"
]
},
{
"value": [
"[53, 112, 65, 1, 124, 55, 37, 17, 88, 112, 4, 20, 116, 56, 47, 113, 103, 94, 71, 30, 68, 14, 83, 76, 77, 103, 54, 76, 98, 57, 84, 109]",
"0"
],
"var": [
"p",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_60h77mt3kx.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 = alloc(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": "alloc", "funargs": ["p"], "typemap": {"p": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60h77mt3kx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
cckayne/ALEPH/Tests/PopTrial/mote64.c
|
char* mote64_Name(void) {
return "MOTE64";
}
|
char * mote64_Name()
|
char* mote64_Name(void)
|
mote64_Name
|
[
"char *",
""
] |
{
"code": [
".globl mote64_Name\n.type mote64_Name, @function\nmote64_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\"MOTE64\"\n",
".globl mote64_Name\n.type mote64_Name, @function\nmote64_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\"MOTE64\"\n",
".globl mote64_Name\n.type mote64_Name, @function\nmote64_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\"MOTE64\"\n",
".global mote64_Name\n.type mote64_Name, %function\nmote64_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\"MOTE64\"\n",
".global mote64_Name\n.type mote64_Name, %function\nmote64_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\"MOTE64\"\n",
".global mote64_Name\n.type mote64_Name, %function\nmote64_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\"MOTE64\"\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": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"MOTE64\""
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_56btnueoz4.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 = mote64_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": "mote64_Name", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_56btnueoz4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
mirohs/prog1lib/lecture_examples/function_pointer.c
|
char *hello(void) {
return "hello";
}
|
char * hello()
|
char *hello(void)
|
hello
|
[
"char *",
""
] |
{
"code": [
".globl hello\n.type hello, @function\nhello:\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\"hello\"\n",
".globl hello\n.type hello, @function\nhello:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"hello\"\n",
".globl hello\n.type hello, @function\nhello:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"hello\"\n",
".global hello\n.type hello, %function\nhello:\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\"hello\"\n",
".global hello\n.type hello, %function\nhello:\n.LFB13:\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\"hello\"\n",
".global hello\n.type hello, %function\nhello:\n.LFB23:\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\"hello\"\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": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
}
],
"output": [
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"hello\""
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_40lgil63t8.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 = hello();
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": "hello", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40lgil63t8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
burzumishi/XCompWMaker/WMaker/dockapps/wmbiff/wmbiff/test_wmbiff.c
|
int exists(const char *filename)
{
return (0);
}
|
int exists(const char *filename)
|
int exists(const char *filename)
|
exists
|
[
"int",
"const char *"
] |
{
"code": [
".globl exists\n.type exists, @function\nexists:\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 exists\n.type exists, @function\nexists:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl exists\n.type exists, @function\nexists:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global exists\n.type exists, %function\nexists:\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 exists\n.type exists, %function\nexists:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global exists\n.type exists, %function\nexists:\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": [
"\"mvwoyegjxdvqtohvgbjpx\""
],
"var": [
"filename"
]
},
{
"value": [
"\"c\""
],
"var": [
"filename"
]
},
{
"value": [
"\"ceksxq\""
],
"var": [
"filename"
]
},
{
"value": [
"\"jrxpbbftzjjojuhg\""
],
"var": [
"filename"
]
},
{
"value": [
"\"qmymdtckhbxgl\""
],
"var": [
"filename"
]
},
{
"value": [
"\"becavedstkxtwhou\""
],
"var": [
"filename"
]
},
{
"value": [
"\"uiqw\""
],
"var": [
"filename"
]
},
{
"value": [
"\"apgsxyykmdbwhxcosktjtvsxx\""
],
"var": [
"filename"
]
},
{
"value": [
"\"rojkj\""
],
"var": [
"filename"
]
},
{
"value": [
"\"siihrupchtbyqayzqtcjmyzyzletvgr\""
],
"var": [
"filename"
]
}
],
"output": [
{
"value": [
"\"mvwoyegjxdvqtohvgbjpx\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"c\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"ceksxq\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"jrxpbbftzjjojuhg\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"qmymdtckhbxgl\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"becavedstkxtwhou\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"uiqw\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"apgsxyykmdbwhxcosktjtvsxx\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"rojkj\"",
"0"
],
"var": [
"filename",
"returnv"
]
},
{
"value": [
"\"siihrupchtbyqayzqtcjmyzyzletvgr\"",
"0"
],
"var": [
"filename",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_42v48zvmdz.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 = exists(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": "exists", "funargs": ["filename"], "typemap": {"filename": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42v48zvmdz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
kwagyeman/openmv/src/omv/imlib/fmath.c
|
float fast_cbrtf(float x)
{
union {int ix; float x;} v;
v.x = x;
v.ix = v.ix/4 + v.ix/16;
v.ix = v.ix + v.ix/16;
v.ix = v.ix + v.ix/256;
v.ix = 0x2a511cd0 + v.ix;
return v.x;
}
|
float fast_cbrtf(floatx)
|
float fast_cbrtf(float x)
|
fast_cbrtf
|
[
"float",
"float"
] |
{
"code": [
".globl fast_cbrtf\n.type fast_cbrtf, @function\nfast_cbrtf:\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, -20(%rbp)\n\tmovss\t-20(%rbp), %xmm0\n\tmovss\t%xmm0, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tleal\t3(%rax), %edx\n\ttestl\t%eax, %eax\n\tcmovs\t%edx, %eax\n\tsarl\t$2, %eax\n\tmovl\t%eax, %ecx\n\tmovl\t-4(%rbp), %eax\n\tleal\t15(%rax), %edx\n\ttestl\t%eax, %eax\n\tcmovs\t%edx, %eax\n\tsarl\t$4, %eax\n\taddl\t%ecx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-4(%rbp), %eax\n\tleal\t15(%rax), %ecx\n\ttestl\t%eax, %eax\n\tcmovs\t%ecx, %eax\n\tsarl\t$4, %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %edx\n\tmovl\t-4(%rbp), %eax\n\tleal\t255(%rax), %ecx\n\ttestl\t%eax, %eax\n\tcmovs\t%ecx, %eax\n\tsarl\t$8, %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\taddl\t$709958864, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl fast_cbrtf\n.type fast_cbrtf, @function\nfast_cbrtf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovss\t%xmm0, -4(%rsp)\n\tmovl\t-4(%rsp), %ecx\n\tmovl\t$4, %esi\n\tmovl\t$16, %edi\n\tmovl\t%ecx, %eax\n\tcltd\n\tidivl\t%esi\n\tmovl\t%eax, %esi\n\tmovl\t%ecx, %eax\n\tcltd\n\tidivl\t%edi\n\tmovl\t%eax, %ecx\n\taddl\t%esi, %ecx\n\tmovl\t$256, %esi\n\tmovl\t%ecx, %eax\n\tcltd\n\tidivl\t%edi\n\taddl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\tcltd\n\tidivl\t%esi\n\tleal\t709958864(%rcx,%rax), %eax\n\tmovl\t%eax, -4(%rsp)\n\tmovss\t-4(%rsp), %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl fast_cbrtf\n.type fast_cbrtf, @function\nfast_cbrtf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovd\t%xmm0, %eax\n\ttestl\t%eax, %eax\n\tleal\t3(%rax), %edx\n\tcmovns\t%eax, %edx\n\tmovl\t%edx, %ecx\n\tleal\t15(%rax), %edx\n\tsarl\t$2, %ecx\n\ttestl\t%eax, %eax\n\tcmovs\t%edx, %eax\n\tsarl\t$4, %eax\n\tleal\t(%rcx,%rax), %edx\n\ttestl\t%edx, %edx\n\tleal\t15(%rdx), %eax\n\tcmovns\t%edx, %eax\n\tsarl\t$4, %eax\n\taddl\t%edx, %eax\n\tleal\t255(%rax), %edx\n\tcmovns\t%eax, %edx\n\tsarl\t$8, %edx\n\tleal\t709958864(%rax,%rdx), %eax\n\tmovd\t%eax, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global fast_cbrtf\n.type fast_cbrtf, %function\nfast_cbrtf:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\ts0, [sp, 12]\n\tldr\ts0, [sp, 12]\n\tstr\ts0, [sp, 24]\n\tldr\tw0, [sp, 24]\n\tadd\tw1, w0, 3\n\tcmp\tw0, 0\n\tcsel\tw0, w1, w0, lt\n\tasr\tw0, w0, 2\n\tmov\tw2, w0\n\tldr\tw0, [sp, 24]\n\tadd\tw1, w0, 15\n\tcmp\tw0, 0\n\tcsel\tw0, w1, w0, lt\n\tasr\tw0, w0, 4\n\tadd\tw0, w2, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 24]\n\tadd\tw2, w0, 15\n\tcmp\tw0, 0\n\tcsel\tw0, w2, w0, lt\n\tasr\tw0, w0, 4\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 24]\n\tadd\tw2, w0, 255\n\tcmp\tw0, 0\n\tcsel\tw0, w2, w0, lt\n\tasr\tw0, w0, 8\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 24]\n\tmov\tw0, 7376\n\tmovk\tw0, 0x2a51, lsl 16\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\ts0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global fast_cbrtf\n.type fast_cbrtf, %function\nfast_cbrtf:\n.LFB0:\n\t.cfi_startproc\n\tfmov\tw0, s0\n\tmov\tw2, 16\n\tmov\tw1, 4\n\tsdiv\tw1, w0, w1\n\tsdiv\tw0, w0, w2\n\tadd\tw1, w1, w0\n\tsdiv\tw0, w1, w2\n\tadd\tw1, w0, w1\n\tmov\tw0, 256\n\tsdiv\tw0, w1, w0\n\tadd\tw0, w0, w1\n\tmov\tw1, 7376\n\tmovk\tw1, 0x2a51, lsl 16\n\tadd\tw0, w0, w1\n\tfmov\ts0, w0\n\tret\n\t.cfi_endproc\n\n",
".global fast_cbrtf\n.type fast_cbrtf, %function\nfast_cbrtf:\n.LFB0:\n\t.cfi_startproc\n\tfmov\tw1, s0\n\tmov\tw3, 7376\n\tmovk\tw3, 0x2a51, lsl 16\n\tcmp\tw1, 0\n\tadd\tw0, w1, 3\n\tadd\tw2, w1, 15\n\tcsel\tw0, w0, w1, lt\n\tcsel\tw1, w2, w1, lt\n\tasr\tw1, w1, 4\n\tadds\tw1, w1, w0, asr 2\n\tadd\tw0, w1, 15\n\tcsel\tw0, w0, w1, mi\n\tadds\tw0, w1, w0, asr 4\n\tadd\tw1, w0, 255\n\tcsel\tw1, w1, w0, mi\n\tadd\tw0, w0, w1, asr 8\n\tadd\tw0, w0, w3\n\tfmov\ts0, 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 |
#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": [
"83.6981118425"
],
"var": [
"x"
]
},
{
"value": [
"80.7041118928"
],
"var": [
"x"
]
},
{
"value": [
"97.4329426184"
],
"var": [
"x"
]
},
{
"value": [
"11.5809164665"
],
"var": [
"x"
]
},
{
"value": [
"7.15205529736"
],
"var": [
"x"
]
},
{
"value": [
"54.200680859"
],
"var": [
"x"
]
},
{
"value": [
"86.7097824004"
],
"var": [
"x"
]
},
{
"value": [
"78.3039941128"
],
"var": [
"x"
]
},
{
"value": [
"29.5044404931"
],
"var": [
"x"
]
},
{
"value": [
"50.3424783178"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"4.275764465332031"
],
"var": [
"returnv"
]
},
{
"value": [
"4.213390827178955"
],
"var": [
"returnv"
]
},
{
"value": [
"4.5619025230407715"
],
"var": [
"returnv"
]
},
{
"value": [
"2.2311325073242188"
],
"var": [
"returnv"
]
},
{
"value": [
"1.8957027196884155"
],
"var": [
"returnv"
]
},
{
"value": [
"3.7285473346710205"
],
"var": [
"returnv"
]
},
{
"value": [
"4.338507175445557"
],
"var": [
"returnv"
]
},
{
"value": [
"4.163389205932617"
],
"var": [
"returnv"
]
},
{
"value": [
"3.162060499191284"
],
"var": [
"returnv"
]
},
{
"value": [
"3.64816951751709"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_40irll7bb5.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 x, 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 x = input_json["x"];
clock_t begin = clock();
float returnv = fast_cbrtf(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": "fast_cbrtf", "funargs": ["x"], "typemap": {"x": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40irll7bb5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
NEWPLAN/books/osask/omake/tolsrc/go_0023s/go_lib/strcmp.c
|
int GO_strcmp (char *d, char *s)
{
while ('\0' != *d) {
if (*d != *s)
return *d - *s;
d++;
s++;
}
return *d - *s;
}
|
int GO_strcmp(char *d, char *s)
|
int GO_strcmp (char *d, char *s)
|
GO_strcmp
|
[
"int",
"char *",
"char *"
] |
{
"code": [
".globl GO_strcmp\n.type GO_strcmp, @function\nGO_strcmp:\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\tjmp\t.L2\n.L5:\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.L3\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %edx\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tjmp\t.L4\n.L3:\n\taddq\t$1, -8(%rbp)\n\taddq\t$1, -16(%rbp)\n.L2:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %edx\n\tmovq\t-16(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl GO_strcmp\n.type GO_strcmp, @function\nGO_strcmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n.L2:\n\tmovsbl\t(%rdi,%rcx), %eax\n\tmovsbl\t(%rsi,%rcx), %edx\n\ttestb\t%al, %al\n\tje\t.L7\n\tincq\t%rcx\n\tcmpb\t%dl, %al\n\tje\t.L2\n\tsubl\t%edx, %eax\n\tret\n.L7:\n\tmovsbl\t%dl, %eax\n\tnegl\t%eax\n\tret\n\t.cfi_endproc\n\n",
".globl GO_strcmp\n.type GO_strcmp, @function\nGO_strcmp:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tjmp\t.L10\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovsbl\t(%rsi), %edx\n\tcmpb\t%al, %dl\n\tjne\t.L12\n\taddq\t$1, %rdi\n\taddq\t$1, %rsi\n.L10:\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L5\n\tmovsbl\t(%rsi), %eax\n\tnegl\t%eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L12:\n\tsubl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".global GO_strcmp\n.type GO_strcmp, %function\nGO_strcmp:\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\tb\t.L2\n.L5:\n\tldr\tx0, [sp, 8]\n\tldrb\tw1, [x0]\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tmov\tw1, w0\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tsub\tw0, w1, w0\n\tb\t.L4\n.L3:\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tmov\tw1, w0\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tsub\tw0, w1, w0\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global GO_strcmp\n.type GO_strcmp, %function\nGO_strcmp:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx3, 0\n.L2:\n\tldrb\tw4, [x0, x3]\n\tldrb\tw2, [x1, x3]\n\tcbnz\tw4, .L4\n\tneg\tw0, w2\n\tb\t.L1\n.L4:\n\tadd\tx3, x3, 1\n\tcmp\tw4, w2\n\tbeq\t.L2\n\tsub\tw0, w4, w2\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global GO_strcmp\n.type GO_strcmp, %function\nGO_strcmp:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcbnz\tw2, .L5\n\tb\t.L2\n\t.p2align 2,,3\n.L3:\n\tldrb\tw2, [x0, 1]!\n\tcbz\tw2, .L2\n.L5:\n\tldrb\tw3, [x1]\n\tadd\tx1, x1, 1\n\tcmp\tw3, w2\n\tbeq\t.L3\n\tsub\tw0, w2, w3\n\tret\n\t.p2align 2,,3\n.L2:\n\tldrb\tw0, [x1]\n\tneg\tw0, 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 |
#include <stddef.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": [
"\"rcabex\"",
"\"ortuoehlizvtqbrvo\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"yaqgwocdfiahmxutmxbkbtume\"",
"\"yosxpfiliyektikrwgsvwjarpjecwf\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"kaianwqmftpcpckzx\"",
"\"cikjhswipbxr\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"psyhbwfjqymhrnekd\"",
"\"fsvmjqtzqobcfczscvkoqsh\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"hbdjynacwvbvlhhvtztoqzsudamflf\"",
"\"rvxsvefsnidg\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"\"",
"\"cvlxmyawolddjmuofptilsnk\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"owjnkc\"",
"\"sbirdjjmmsaphnmpon\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"romcbbn\"",
"\"x\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"yzukjvrwqwcfhsbmmkg\"",
"\"biyozarirepqq\""
],
"var": [
"d",
"s"
]
},
{
"value": [
"\"dfvgn\"",
"\"pwqgwgzdwtcf\""
],
"var": [
"d",
"s"
]
}
],
"output": [
{
"value": [
"\"rcabex\"",
"3",
"\"ortuoehlizvtqbrvo\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"yaqgwocdfiahmxutmxbkbtume\"",
"-14",
"\"yosxpfiliyektikrwgsvwjarpjecwf\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"kaianwqmftpcpckzx\"",
"8",
"\"cikjhswipbxr\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"psyhbwfjqymhrnekd\"",
"10",
"\"fsvmjqtzqobcfczscvkoqsh\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"hbdjynacwvbvlhhvtztoqzsudamflf\"",
"-10",
"\"rvxsvefsnidg\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"\"",
"-99",
"\"cvlxmyawolddjmuofptilsnk\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"owjnkc\"",
"-4",
"\"sbirdjjmmsaphnmpon\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"romcbbn\"",
"-6",
"\"x\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"yzukjvrwqwcfhsbmmkg\"",
"23",
"\"biyozarirepqq\""
],
"var": [
"d",
"returnv",
"s"
]
},
{
"value": [
"\"dfvgn\"",
"-12",
"\"pwqgwgzdwtcf\""
],
"var": [
"d",
"returnv",
"s"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_51fz277x0t.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* d, char* s, int returnv) {
json output_json;
output_json["d"] = d;
output_json["s"] = s;
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* d = strdup(input_json["d"].get<std::string>().c_str());
char* s = strdup(input_json["s"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = GO_strcmp(d, s);
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(d, s, returnv);
}
|
master
|
null
|
{"livein": ["d", "s"], "liveout": ["d", "s"], "returnvarname": ["returnv"], "execcmd": "", "funname": "GO_strcmp", "funargs": ["d", "s"], "typemap": {"d": "string", "s": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_51fz277x0t.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Mustaavalkosta/toolchain_gcc-4.9/gcc/testsuite/gcc.target/sh/pr52483-1.c
|
int
test_01 (volatile short* x)
{
return *x;
}
|
int test_01(volatile short *x)
|
int test_01 (volatile short* x)
|
test_01
|
[
"int",
"volatile short *"
] |
{
"code": [
".globl test_01\n.type test_01, @function\ntest_01:\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-8(%rbp), %rax\n\tmovzwl\t(%rax), %eax\n\tcwtl\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl test_01\n.type test_01, @function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovswl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl test_01\n.type test_01, @function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovswl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n",
".global test_01\n.type test_01, %function\ntest_01:\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\tldrh\tw0, [x0]\n\tsxth\tw0, w0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global test_01\n.type test_01, %function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tldrh\tw0, [x0]\n\tsxth\tw0, w0\n\tret\n\t.cfi_endproc\n\n",
".global test_01\n.type test_01, %function\ntest_01:\n.LFB0:\n\t.cfi_startproc\n\tldrh\tw0, [x0]\n\tsxth\tw0, 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, 115, 67, 80, 117, 49, 115, 20, 80, 71, 55, 85, 5, 54, 37, 54, 52, 107, 108, 38, 111, 113, 58, 30, 23, 62, 113, 48, 70, 116, 118, 21]"
],
"var": [
"x"
]
},
{
"value": [
"[3, 10, 115, 59, 125, 62, 90, 82, 75, 83, 68, 104, 86, 47, 36, 109, 84, 73, 93, 123, 125, 106, 80, 17, 7, 10, 96, 111, 124, 36, 105, 103]"
],
"var": [
"x"
]
},
{
"value": [
"[40, 18, 87, 122, 31, 67, 64, 91, 11, 119, 61, 100, 100, 111, 91, 37, 71, 5, 8, 94, 26, 117, 88, 60, 116, 121, 97, 14, 9, 0, 49, 24]"
],
"var": [
"x"
]
},
{
"value": [
"[47, 31, 5, 53, 5, 18, 74, 77, 113, 102, 29, 65, 35, 79, 121, 43, 8, 83, 21, 69, 111, 26, 101, 125, 123, 62, 98, 47, 19, 118, 35, 126]"
],
"var": [
"x"
]
},
{
"value": [
"[94, 38, 75, 52, 60, 15, 107, 95, 77, 18, 46, 58, 109, 0, 19, 111, 90, 31, 81, 7, 93, 41, 119, 32, 33, 119, 108, 59, 122, 1, 20, 100]"
],
"var": [
"x"
]
},
{
"value": [
"[74, 41, 105, 103, 121, 29, 93, 68, 14, 33, 96, 96, 113, 121, 55, 124, 15, 87, 58, 97, 103, 10, 51, 9, 80, 115, 22, 123, 87, 92, 35, 76]"
],
"var": [
"x"
]
},
{
"value": [
"[64, 59, 58, 39, 68, 49, 100, 54, 1, 47, 58, 87, 64, 37, 44, 35, 90, 50, 69, 77, 72, 119, 73, 19, 94, 8, 76, 126, 56, 64, 114, 110]"
],
"var": [
"x"
]
},
{
"value": [
"[77, 123, 0, 75, 104, 92, 14, 76, 59, 23, 113, 66, 23, 100, 46, 32, 64, 100, 119, 5, 19, 56, 87, 3, 65, 84, 126, 106, 27, 95, 65, 37]"
],
"var": [
"x"
]
},
{
"value": [
"[20, 60, 5, 56, 49, 5, 66, 119, 80, 64, 42, 126, 52, 8, 37, 15, 22, 86, 65, 120, 40, 81, 119, 8, 5, 3, 82, 60, 52, 24, 39, 58]"
],
"var": [
"x"
]
},
{
"value": [
"[1, 47, 121, 63, 92, 116, 94, 83, 51, 20, 112, 64, 9, 98, 53, 20, 4, 119, 122, 110, 11, 8, 84, 18, 11, 100, 42, 15, 99, 67, 60, 92]"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"120",
"[120, 115, 67, 80, 117, 49, 115, 20, 80, 71, 55, 85, 5, 54, 37, 54, 52, 107, 108, 38, 111, 113, 58, 30, 23, 62, 113, 48, 70, 116, 118, 21]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"3",
"[3, 10, 115, 59, 125, 62, 90, 82, 75, 83, 68, 104, 86, 47, 36, 109, 84, 73, 93, 123, 125, 106, 80, 17, 7, 10, 96, 111, 124, 36, 105, 103]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"40",
"[40, 18, 87, 122, 31, 67, 64, 91, 11, 119, 61, 100, 100, 111, 91, 37, 71, 5, 8, 94, 26, 117, 88, 60, 116, 121, 97, 14, 9, 0, 49, 24]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"47",
"[47, 31, 5, 53, 5, 18, 74, 77, 113, 102, 29, 65, 35, 79, 121, 43, 8, 83, 21, 69, 111, 26, 101, 125, 123, 62, 98, 47, 19, 118, 35, 126]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"94",
"[94, 38, 75, 52, 60, 15, 107, 95, 77, 18, 46, 58, 109, 0, 19, 111, 90, 31, 81, 7, 93, 41, 119, 32, 33, 119, 108, 59, 122, 1, 20, 100]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"74",
"[74, 41, 105, 103, 121, 29, 93, 68, 14, 33, 96, 96, 113, 121, 55, 124, 15, 87, 58, 97, 103, 10, 51, 9, 80, 115, 22, 123, 87, 92, 35, 76]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"64",
"[64, 59, 58, 39, 68, 49, 100, 54, 1, 47, 58, 87, 64, 37, 44, 35, 90, 50, 69, 77, 72, 119, 73, 19, 94, 8, 76, 126, 56, 64, 114, 110]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"77",
"[77, 123, 0, 75, 104, 92, 14, 76, 59, 23, 113, 66, 23, 100, 46, 32, 64, 100, 119, 5, 19, 56, 87, 3, 65, 84, 126, 106, 27, 95, 65, 37]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"20",
"[20, 60, 5, 56, 49, 5, 66, 119, 80, 64, 42, 126, 52, 8, 37, 15, 22, 86, 65, 120, 40, 81, 119, 8, 5, 3, 82, 60, 52, 24, 39, 58]"
],
"var": [
"returnv",
"x"
]
},
{
"value": [
"1",
"[1, 47, 121, 63, 92, 116, 94, 83, 51, 20, 112, 64, 9, 98, 53, 20, 4, 119, 122, 110, 11, 8, 84, 18, 11, 100, 42, 15, 99, 67, 60, 92]"
],
"var": [
"returnv",
"x"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_40ihmguy23.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* x, int returnv) {
json output_json;
std::vector<json> output_temp_2;
for (unsigned int i3 = 0; i3 < 32; i3++) {
short output_temp_4 = x[i3];
output_temp_2.push_back(output_temp_4);
}
output_json["x"] = 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<short> input_temp_1_vec;
for (auto& elem : input_json["x"]) {
short input_temp_1_inner = elem;
input_temp_1_vec.push_back(input_temp_1_inner);
}
short* x = &input_temp_1_vec[0];
clock_t begin = clock();
int returnv = test_01(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": ["x"], "returnvarname": ["returnv"], "execcmd": "", "funname": "test_01", "funargs": ["x"], "typemap": {"x": "array(int16#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_40ihmguy23.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
gdarko/CProgrammingExercises/zbirka_2/datoteki/zad_383.c
|
int isspec(char c)
{
return (((c >= '!') && (c <= '/')) || (c >= ':' && c <= '@') || ((c >= '[') && (c <= '`')) || ((c >= '{') && (c <= 'DEL')));
}
|
int isspec(charc)
|
int isspec(char c)
|
isspec
|
[
"int",
"char"
] |
{
"code": [
".globl isspec\n.type isspec, @function\nisspec:\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\tcmpb\t$32, -4(%rbp)\n\tjle\t.L2\n\tcmpb\t$47, -4(%rbp)\n\tjle\t.L3\n.L2:\n\tcmpb\t$57, -4(%rbp)\n\tjle\t.L4\n\tcmpb\t$64, -4(%rbp)\n\tjle\t.L3\n.L4:\n\tcmpb\t$90, -4(%rbp)\n\tjle\t.L5\n\tcmpb\t$96, -4(%rbp)\n\tjle\t.L3\n.L5:\n\tcmpb\t$122, -4(%rbp)\n\tjle\t.L6\n.L3:\n\tmovl\t$1, %eax\n\tjmp\t.L8\n.L6:\n\tmovl\t$0, %eax\n.L8:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl isspec\n.type isspec, @function\nisspec:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-33(%rdi), %edx\n\tcmpb\t$63, %dl\n\tja\t.L2\n\tmovabsq\t$-288230371890266113, %rcx\n\tmovl\t$1, %eax\n\tbtq\t%rdx, %rcx\n\tjc\t.L1\n.L2:\n\txorl\t%eax, %eax\n\tcmpb\t$122, %dil\n\tsetg\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl isspec\n.type isspec, @function\nisspec:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-33(%rdi), %eax\n\tcmpb\t$63, %al\n\tja\t.L2\n\tmovabsq\t$-288230371890266113, %rdx\n\tmovl\t$1, %r8d\n\tbtq\t%rax, %rdx\n\tjnc\t.L2\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\txorl\t%r8d, %r8d\n\tcmpb\t$122, %dil\n\tsetg\t%r8b\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global isspec\n.type isspec, %function\nisspec:\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, 32\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 47\n\tbls\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 57\n\tbls\t.L4\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 64\n\tbls\t.L3\n.L4:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 90\n\tbls\t.L5\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 96\n\tbls\t.L3\n.L5:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 122\n\tbls\t.L6\n.L3:\n\tmov\tw0, 1\n\tb\t.L8\n.L6:\n\tmov\tw0, 0\n.L8:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global isspec\n.type isspec, %function\nisspec:\n.LFB35:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #33\n\tand\tw1, w1, 255\n\tcmp\tw1, 63\n\tbhi\t.L2\n\tmov\tw2, 4261445631\n\tmovk\tx2, 0xfc00, lsl 48\n\tlsr\tx1, x2, x1\n\ttbnz\tx1, 0, .L4\n.L2:\n\tcmp\tw0, 122\n\tcset\tw0, hi\n.L1:\n\tret\n.L4:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global isspec\n.type isspec, %function\nisspec:\n.LFB52:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw2, w0, #33\n\tsub\tw1, w0, #58\n\tand\tw2, w2, 255\n\tand\tw1, w1, 255\n\tcmp\tw2, 14\n\tccmp\tw1, 6, 0, hi\n\tbls\t.L3\n\tsub\tw1, w0, #91\n\tcmp\tw0, 122\n\tand\tw1, w1, 255\n\tccmp\tw1, 5, 0, ls\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 |
#include <stdio.h>
#include <stdlib.h>
#include <string.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": [
"69"
],
"var": [
"c"
]
},
{
"value": [
"82"
],
"var": [
"c"
]
},
{
"value": [
"100"
],
"var": [
"c"
]
},
{
"value": [
"108"
],
"var": [
"c"
]
},
{
"value": [
"119"
],
"var": [
"c"
]
},
{
"value": [
"109"
],
"var": [
"c"
]
},
{
"value": [
"91"
],
"var": [
"c"
]
},
{
"value": [
"83"
],
"var": [
"c"
]
},
{
"value": [
"108"
],
"var": [
"c"
]
},
{
"value": [
"91"
],
"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": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_35bvkd2_kn.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 = isspec(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": "isspec", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35bvkd2_kn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
felipecruz/riows/vendor/cdats/src/hash.c
|
int hash_val (int key)
{
return key;
}
|
int hash_val(intkey)
|
int hash_val (int key)
|
hash_val
|
[
"int",
"int"
] |
{
"code": [
".globl hash_val\n.type hash_val, @function\nhash_val:\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\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl hash_val\n.type hash_val, @function\nhash_val:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl hash_val\n.type hash_val, @function\nhash_val:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global hash_val\n.type hash_val, %function\nhash_val:\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\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global hash_val\n.type hash_val, %function\nhash_val:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global hash_val\n.type hash_val, %function\nhash_val:\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": [
"17"
],
"var": [
"key"
]
},
{
"value": [
"16"
],
"var": [
"key"
]
},
{
"value": [
"71"
],
"var": [
"key"
]
},
{
"value": [
"82"
],
"var": [
"key"
]
},
{
"value": [
"85"
],
"var": [
"key"
]
},
{
"value": [
"123"
],
"var": [
"key"
]
},
{
"value": [
"125"
],
"var": [
"key"
]
},
{
"value": [
"92"
],
"var": [
"key"
]
},
{
"value": [
"45"
],
"var": [
"key"
]
},
{
"value": [
"110"
],
"var": [
"key"
]
}
],
"output": [
{
"value": [
"17"
],
"var": [
"returnv"
]
},
{
"value": [
"16"
],
"var": [
"returnv"
]
},
{
"value": [
"71"
],
"var": [
"returnv"
]
},
{
"value": [
"82"
],
"var": [
"returnv"
]
},
{
"value": [
"85"
],
"var": [
"returnv"
]
},
{
"value": [
"123"
],
"var": [
"returnv"
]
},
{
"value": [
"125"
],
"var": [
"returnv"
]
},
{
"value": [
"92"
],
"var": [
"returnv"
]
},
{
"value": [
"45"
],
"var": [
"returnv"
]
},
{
"value": [
"110"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_38xk_dzaq2.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 key, 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 key = input_json["key"];
clock_t begin = clock();
int returnv = hash_val(key);
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(key, returnv);
}
|
master
|
null
|
{"livein": ["key"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "hash_val", "funargs": ["key"], "typemap": {"key": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38xk_dzaq2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
joa-quim/GMT5SAR/preproc/S1A_preproc/lib/xml.c
|
int cat_nums(char *str_out, char *str){
int i=0,j=0;
while(str[i]!='\0'){
if(str[i] >= '0' && str[i] <= '9'){
str_out[j++] = str[i];
}
i++;
}
str_out[j] = '\0';
return(j);
}
|
int cat_nums(char *str_out, char *str)
|
int cat_nums(char *str_out, char *str)
|
cat_nums
|
[
"int",
"char *",
"char *"
] |
{
"code": [
".globl cat_nums\n.type cat_nums, @function\ncat_nums:\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$0, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\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\tcmpb\t$47, %al\n\tjle\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\tcmpb\t$57, %al\n\tjg\t.L3\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rax\n\tleaq\t(%rdx,%rax), %rcx\n\tmovl\t-4(%rbp), %eax\n\tleal\t1(%rax), %edx\n\tmovl\t%edx, -4(%rbp)\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rax, %rdx\n\tmovzbl\t(%rcx), %eax\n\tmovb\t%al, (%rdx)\n.L3:\n\taddl\t$1, -8(%rbp)\n.L2:\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\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovb\t$0, (%rax)\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 cat_nums\n.type cat_nums, @function\ncat_nums:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tmovb\t(%rsi), %cl\n\tmovslq\t%eax, %rdx\n\taddq\t%rdi, %rdx\n\ttestb\t%cl, %cl\n\tje\t.L6\n\tleal\t-48(%rcx), %r8d\n\tcmpb\t$9, %r8b\n\tja\t.L3\n\tmovb\t%cl, (%rdx)\n\tincl\t%eax\n.L3:\n\tincq\t%rsi\n\tjmp\t.L2\n.L6:\n\tmovb\t$0, (%rdx)\n\tret\n\t.cfi_endproc\n\n",
".globl cat_nums\n.type cat_nums, @function\ncat_nums:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rsi), %eax\n\ttestb\t%al, %al\n\tje\t.L7\n\taddq\t$1, %rsi\n\txorl\t%r9d, %r9d\n\txorl\t%ecx, %ecx\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tleal\t-48(%rax), %r8d\n\tleaq\t(%rdi,%rcx), %rdx\n\tcmpb\t$9, %r8b\n\tja\t.L3\n\taddq\t$1, %rsi\n\tmovb\t%al, (%rdx)\n\taddl\t$1, %r9d\n\tmovzbl\t-1(%rsi), %eax\n\tmovslq\t%r9d, %rcx\n\tleaq\t(%rdi,%rcx), %rdx\n\ttestb\t%al, %al\n\tjne\t.L6\n\tmovb\t$0, (%rdx)\n\tmovl\t%r9d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovzbl\t(%rsi), %eax\n\taddq\t$1, %rsi\n\ttestb\t%al, %al\n\tjne\t.L6\n\tmovb\t$0, (%rdx)\n\tmovl\t%r9d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovq\t%rdi, %rdx\n\txorl\t%r9d, %r9d\n\tmovb\t$0, (%rdx)\n\tmovl\t%r9d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global cat_nums\n.type cat_nums, %function\ncat_nums:\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\tstr\twzr, [sp, 24]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbls\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbhi\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp]\n\tadd\tx1, x1, x0\n\tldr\tw0, [sp, 28]\n\tadd\tw2, w0, 1\n\tstr\tw2, [sp, 28]\n\tsxtw\tx0, w0\n\tldr\tx2, [sp, 8]\n\tadd\tx0, x2, x0\n\tldrb\tw1, [x1]\n\tstrb\tw1, [x0]\n.L3:\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]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L4\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tstrb\twzr, [x0]\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 cat_nums\n.type cat_nums, %function\ncat_nums:\n.LFB35:\n\t.cfi_startproc\n\tmov\tx2, x0\n\tmov\tw0, 0\n.L2:\n\tldrb\tw3, [x1]\n\tsxtw\tx5, w0\n\tadd\tx4, x2, x0, sxtw\n\tcbnz\tw3, .L4\n\tstrb\twzr, [x4]\n\tret\n.L4:\n\tsub\tw4, w3, #48\n\tand\tw4, w4, 255\n\tcmp\tw4, 9\n\tbhi\t.L3\n\tadd\tw0, w0, 1\n\tstrb\tw3, [x2, x5]\n.L3:\n\tadd\tx1, x1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global cat_nums\n.type cat_nums, %function\ncat_nums:\n.LFB50:\n\t.cfi_startproc\n\tldrb\tw2, [x1]\n\tmov\tx5, x0\n\tcbz\tw2, .L7\n\tadd\tx3, x1, 1\n\tmov\tw0, 0\n\tmov\tx4, 0\n\t.p2align 3,,7\n.L6:\n\tsub\tw1, w2, #48\n\tadd\tx6, x5, x4\n\tand\tw1, w1, 255\n\tcmp\tw1, 9\n\tbhi\t.L3\n\tstrb\tw2, [x5, x4]\n\tadd\tw0, w0, 1\n\tldrb\tw2, [x3], 1\n\tsxtw\tx4, w0\n\tadd\tx6, x5, x4\n\tcbnz\tw2, .L6\n\tstrb\twzr, [x6]\n\tret\n\t.p2align 2,,3\n.L3:\n\tldrb\tw2, [x3], 1\n\tcbnz\tw2, .L6\n\tstrb\twzr, [x6]\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tx6, x0\n\tmov\tw0, 0\n\tstrb\twzr, [x6]\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>
#include <stdint.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": [
"\"igbdxnvcqjzqy\"",
"\"ulyyofluc\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"fjpbfigoejdhxfzzz\"",
"\"lyiswmdcufuigvbrhjkclapg\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"qeuebuxwmhjgsonhmj\"",
"\"ebzxwnbl\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"rhwrftrituavguzufitookasrr\"",
"\"flwyfiubmbznlgyuhfsbsrwd\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"vdtwgx\"",
"\"wmqtpbfuilklmhobyrxmuchtvq\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"tbchmjdkaaupaxmazvxmpgcbmb\"",
"\"cquyipqnhgm\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"ncpzauvgyckgvxhheqirzwlkzxpcd\"",
"\"zlkfb\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"ybyuersmlrnltwbffqddqmqgm\"",
"\"qplbzbgmqjwrflsyzfo\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"xcgsrvlsouwphegscfcwnz\"",
"\"bbysvkwookldfluweclqbaccullvufg\""
],
"var": [
"str_out",
"str"
]
},
{
"value": [
"\"\"",
"\"gtuqtorspijbyn\""
],
"var": [
"str_out",
"str"
]
}
],
"output": [
{
"value": [
"0",
"\"ulyyofluc\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"lyiswmdcufuigvbrhjkclapg\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"ebzxwnbl\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"flwyfiubmbznlgyuhfsbsrwd\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"wmqtpbfuilklmhobyrxmuchtvq\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"cquyipqnhgm\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"zlkfb\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"qplbzbgmqjwrflsyzfo\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"bbysvkwookldfluweclqbaccullvufg\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
},
{
"value": [
"0",
"\"gtuqtorspijbyn\"",
"\"\""
],
"var": [
"returnv",
"str",
"str_out"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_59v8yufbak.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* str_out, char* str, int returnv) {
json output_json;
output_json["str_out"] = str_out;
output_json["str"] = str;
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* str_out = strdup(input_json["str_out"].get<std::string>().c_str());
char* str = strdup(input_json["str"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = cat_nums(str_out, str);
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(str_out, str, returnv);
}
|
master
|
null
|
{"livein": ["str_out", "str"], "liveout": ["str_out", "str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "cat_nums", "funargs": ["str_out", "str"], "typemap": {"str_out": "string", "str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_59v8yufbak.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
LCRS-UCC/STM32F4Discovery-expansion/OtharSoft/syscalls/syscalls.c
|
__attribute__ ((used))
int _write(int file, char *ptr, int len)
{
# 103 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/LCRS-UCC/STM32F4Discovery-expansion/refs/heads/Working/OtharSoft/syscalls/syscalls.c"
return len;
}
|
int _write(intfile, char *ptr, intlen)
|
__attribute__ ((used)) int _write(int file, char *ptr, int len)
|
_write
|
[
"int",
"int",
"char *",
"int"
] |
{
"code": [
".globl _write\n.type _write, @function\n_write:\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\tmovq\t%rsi, -16(%rbp)\n\tmovl\t%edx, -8(%rbp)\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 _write\n.type _write, @function\n_write:\n.LFB19:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl _write\n.type _write, @function\n_write:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n",
".global _write\n.type _write, %function\n_write:\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\tx1, [sp]\n\tstr\tw2, [sp, 8]\n\tldr\tw0, [sp, 8]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global _write\n.type _write, %function\n_write:\n.LFB19:\n\t.cfi_startproc\n\tmov\tw0, w2\n\tret\n\t.cfi_endproc\n\n",
".global _write\n.type _write, %function\n_write:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw0, w2\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 <stdarg.h>
#include <sys/types.h>
#include <sys/stat.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": [
"16",
"\"otnsxxcxisaobwhltndopwk\"",
"111"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"17",
"\"guzsvjzuvucitkijphghczvgkdpyxz\"",
"23"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"36",
"\"xngbsporxygbbttzceai\"",
"4"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"56",
"\"izstyhfvifpucaddnvxiqenqmp\"",
"71"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"88",
"\"gwzj\"",
"102"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"119",
"\"\"",
"109"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"43",
"\"gaddwtryrnqbhjyqciacbthbtn\"",
"19"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"126",
"\"\"",
"72"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"1",
"\"nvskrlghkacozjuivvloymcjcdxkkk\"",
"107"
],
"var": [
"file",
"ptr",
"len"
]
},
{
"value": [
"85",
"\"zfudiqwpcfevdqscqyaknnqtmovgw\"",
"102"
],
"var": [
"file",
"ptr",
"len"
]
}
],
"output": [
{
"value": [
"\"otnsxxcxisaobwhltndopwk\"",
"111"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"guzsvjzuvucitkijphghczvgkdpyxz\"",
"23"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"xngbsporxygbbttzceai\"",
"4"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"izstyhfvifpucaddnvxiqenqmp\"",
"71"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"gwzj\"",
"102"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"\"",
"109"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"gaddwtryrnqbhjyqciacbthbtn\"",
"19"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"\"",
"72"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"nvskrlghkacozjuivvloymcjcdxkkk\"",
"107"
],
"var": [
"ptr",
"returnv"
]
},
{
"value": [
"\"zfudiqwpcfevdqscqyaknnqtmovgw\"",
"102"
],
"var": [
"ptr",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_63l26s2qok.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 file, char* ptr, int len, int 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);
int file = input_json["file"];
char* ptr = strdup(input_json["ptr"].get<std::string>().c_str());
int len = input_json["len"];
clock_t begin = clock();
int returnv = _write(file, ptr, len);
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(file, ptr, len, returnv);
}
|
Working
|
null
|
{"livein": ["file", "ptr", "len"], "liveout": ["ptr"], "returnvarname": ["returnv"], "execcmd": "", "funname": "_write", "funargs": ["file", "ptr", "len"], "typemap": {"file": "int32", "ptr": "string", "len": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63l26s2qok.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
shehan492/C_programs/pdslab/day1/cs1803-day1-prog1.c
|
int countVowels(char *str)
{
int i,count=0;
for(i=0;str[i]!='\0';++i)
if('a' == str[i] ||
'e' == str[i] ||
'i' == str[i] ||
'o' == str[i] ||
'u' == str[i] ||
'A' == str[i] ||
'E' == str[i] ||
'I' == str[i] ||
'O' == str[i] ||
'U' == str[i] )
count++;
return count;
}
|
int countVowels(char *str)
|
int countVowels(char *str)
|
countVowels
|
[
"int",
"char *"
] |
{
"code": [
".globl countVowels\n.type countVowels, @function\ncountVowels:\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, -4(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tjmp\t.L2\n.L5:\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\tcmpb\t$97, %al\n\tje\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\tcmpb\t$101, %al\n\tje\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\tcmpb\t$105, %al\n\tje\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\tcmpb\t$111, %al\n\tje\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\tcmpb\t$117, %al\n\tje\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\tcmpb\t$65, %al\n\tje\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\tcmpb\t$69, %al\n\tje\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\tcmpb\t$73, %al\n\tje\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\tcmpb\t$79, %al\n\tje\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\tcmpb\t$85, %al\n\tjne\t.L4\n.L3:\n\taddl\t$1, -4(%rbp)\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), %eax\n\ttestb\t%al, %al\n\tjne\t.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 countVowels\n.type countVowels, @function\ncountVowels:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovabsq\t$4575140898685201, %rdx\n\txorl\t%r8d, %r8d\n.L2:\n\tmovb\t(%rdi), %cl\n\ttestb\t%cl, %cl\n\tje\t.L6\n\tsubl\t$65, %ecx\n\tcmpb\t$52, %cl\n\tja\t.L3\n\tmovq\t%rdx, %rax\n\tshrq\t%cl, %rax\n\tnotq\t%rax\n\tandl\t$1, %eax\n\tcmpb\t$1, %al\n\tadcl\t$0, %r8d\n.L3:\n\tincq\t%rdi\n\tjmp\t.L2\n.L6:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl countVowels\n.type countVowels, @function\ncountVowels:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %ecx\n\ttestb\t%cl, %cl\n\tje\t.L5\n\taddq\t$1, %rdi\n\txorl\t%r8d, %r8d\n\tmovabsq\t$4575140898685201, %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tsubl\t$65, %ecx\n\tcmpb\t$52, %cl\n\tja\t.L3\n\tmovq\t%rdx, %rax\n\tshrq\t%cl, %rax\n\tnotq\t%rax\n\tandl\t$1, %eax\n\tcmpb\t$1, %al\n\tadcl\t$0, %r8d\n.L3:\n\tmovzbl\t(%rdi), %ecx\n\taddq\t$1, %rdi\n\ttestb\t%cl, %cl\n\tjne\t.L4\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\txorl\t%r8d, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global countVowels\n.type countVowels, %function\ncountVowels:\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, 28]\n\tstr\twzr, [sp, 24]\n\tb\t.L2\n.L5:\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 97\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 101\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 105\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 111\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 117\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 65\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 69\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 73\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 79\n\tbeq\t.L3\n\tldrsw\tx0, [sp, 24]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 85\n\tbne\t.L4\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\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\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.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 countVowels\n.type countVowels, %function\ncountVowels:\n.LFB13:\n\t.cfi_startproc\n\tmov\tx3, 16657\n\tmov\tx2, x0\n\tmovk\tx3, 0x10, lsl 16\n\tmov\tw0, 0\n\tmovk\tx3, 0x4111, lsl 32\n\tmovk\tx3, 0x10, lsl 48\n.L2:\n\tldrb\tw1, [x2]\n\tcbnz\tw1, .L4\n\tret\n.L4:\n\tsub\tw1, w1, #65\n\tand\tw1, w1, 255\n\tcmp\tw1, 52\n\tbhi\t.L3\n\tlsr\tx1, x3, x1\n\tand\tw1, w1, 1\n\tadd\tw0, w0, w1\n.L3:\n\tadd\tx2, x2, 1\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global countVowels\n.type countVowels, %function\ncountVowels:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L5\n\tadd\tx4, x0, 1\n\tmov\tw7, -37\n\tmov\tw0, 0\n\tmov\tw6, 73\n\tmov\tw5, 79\n\t.p2align 3,,7\n.L4:\n\tand\tw2, w1, w7\n\tand\tw3, w1, -33\n\tcmp\tw2, 65\n\tldrb\tw1, [x4], 1\n\tccmp\tw3, w6, 4, ne\n\tcset\tw2, eq\n\tcmp\tw3, 85\n\tccmp\tw3, w5, 4, ne\n\tcsinc\tw2, w2, wzr, ne\n\tadd\tw0, w0, w2\n\tcbnz\tw1, .L4\n\tret\n\t.p2align 2,,3\n.L5:\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": [
"\"zxwcljdbsyizzobsjazqoqnmmfmh\""
],
"var": [
"str"
]
},
{
"value": [
"\"tdyotmzhvkzhyzcfipwsgeu\""
],
"var": [
"str"
]
},
{
"value": [
"\"inunekttlofermfetrmhjwsjabpur\""
],
"var": [
"str"
]
},
{
"value": [
"\"jraqhhzaboagm\""
],
"var": [
"str"
]
},
{
"value": [
"\"ucaopzsdbjhergblzxxmrwxyrgosn\""
],
"var": [
"str"
]
},
{
"value": [
"\"pesoxuparbswrbnvheouj\""
],
"var": [
"str"
]
},
{
"value": [
"\"ozzodlvcg\""
],
"var": [
"str"
]
},
{
"value": [
"\"qechnidrhkenfx\""
],
"var": [
"str"
]
},
{
"value": [
"\"lyqqbjjygivquqdgsgp\""
],
"var": [
"str"
]
},
{
"value": [
"\"zvjcouevfwwhpzrmimvtkxcxpqcduyv\""
],
"var": [
"str"
]
}
],
"output": [
{
"value": [
"4",
"\"zxwcljdbsyizzobsjazqoqnmmfmh\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"4",
"\"tdyotmzhvkzhyzcfipwsgeu\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"8",
"\"inunekttlofermfetrmhjwsjabpur\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"4",
"\"jraqhhzaboagm\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"5",
"\"ucaopzsdbjhergblzxxmrwxyrgosn\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"7",
"\"pesoxuparbswrbnvheouj\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"2",
"\"ozzodlvcg\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"3",
"\"qechnidrhkenfx\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"2",
"\"lyqqbjjygivquqdgsgp\""
],
"var": [
"returnv",
"str"
]
},
{
"value": [
"5",
"\"zvjcouevfwwhpzrmimvtkxcxpqcduyv\""
],
"var": [
"returnv",
"str"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_61heo1kpe_.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* str, int returnv) {
json output_json;
output_json["str"] = str;
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* str = strdup(input_json["str"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = countVowels(str);
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(str, returnv);
}
|
master
|
null
|
{"livein": ["str"], "liveout": ["str"], "returnvarname": ["returnv"], "execcmd": "", "funname": "countVowels", "funargs": ["str"], "typemap": {"str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61heo1kpe_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
pokebyte/blueberryMSX/Src/Language/LanguageMinimal.c
|
char* langRomTypeMirroredRam1k() { return "1kB Mirrored RAM"; }
|
char * langRomTypeMirroredRam1k()
|
char* langRomTypeMirroredRam1k()
|
langRomTypeMirroredRam1k
|
[
"char *",
""
] |
{
"code": [
".globl langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, @function\nlangRomTypeMirroredRam1k:\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\"1kB Mirrored RAM\"\n",
".globl langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, @function\nlangRomTypeMirroredRam1k:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"1kB Mirrored RAM\"\n",
".globl langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, @function\nlangRomTypeMirroredRam1k:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tleaq\t.LC0(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"1kB Mirrored RAM\"\n",
".global langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, %function\nlangRomTypeMirroredRam1k:\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\"1kB Mirrored RAM\"\n",
".global langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, %function\nlangRomTypeMirroredRam1k:\n.LFB11:\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\"1kB Mirrored RAM\"\n",
".global langRomTypeMirroredRam1k\n.type langRomTypeMirroredRam1k, %function\nlangRomTypeMirroredRam1k:\n.LFB11:\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\"1kB Mirrored RAM\"\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": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
},
{
"value": [],
"var": []
}
],
"output": [
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
},
{
"value": [
"\"1kB Mirrored RAM\""
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_62an58r1gi.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 = langRomTypeMirroredRam1k();
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": "langRomTypeMirroredRam1k", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62an58r1gi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
michaeljklein/CPlug/src/cex3/simple_tests.c
|
unsigned long unsignedlong_id(unsigned long x){return x;}
|
unsigned long unsignedlong_id(unsigned longx)
|
unsigned long unsignedlong_id(unsigned long x)
|
unsignedlong_id
|
[
"unsigned long",
"unsigned long"
] |
{
"code": [
".globl unsignedlong_id\n.type unsignedlong_id, @function\nunsignedlong_id:\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-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl unsignedlong_id\n.type unsignedlong_id, @function\nunsignedlong_id:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n",
".globl unsignedlong_id\n.type unsignedlong_id, @function\nunsignedlong_id:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n",
".global unsignedlong_id\n.type unsignedlong_id, %function\nunsignedlong_id:\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\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global unsignedlong_id\n.type unsignedlong_id, %function\nunsignedlong_id:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global unsignedlong_id\n.type unsignedlong_id, %function\nunsignedlong_id:\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": [
"567"
],
"var": [
"x"
]
},
{
"value": [
"634"
],
"var": [
"x"
]
},
{
"value": [
"764"
],
"var": [
"x"
]
},
{
"value": [
"373"
],
"var": [
"x"
]
},
{
"value": [
"780"
],
"var": [
"x"
]
},
{
"value": [
"693"
],
"var": [
"x"
]
},
{
"value": [
"650"
],
"var": [
"x"
]
},
{
"value": [
"965"
],
"var": [
"x"
]
},
{
"value": [
"852"
],
"var": [
"x"
]
},
{
"value": [
"527"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"567"
],
"var": [
"returnv"
]
},
{
"value": [
"634"
],
"var": [
"returnv"
]
},
{
"value": [
"764"
],
"var": [
"returnv"
]
},
{
"value": [
"373"
],
"var": [
"returnv"
]
},
{
"value": [
"780"
],
"var": [
"returnv"
]
},
{
"value": [
"693"
],
"var": [
"returnv"
]
},
{
"value": [
"650"
],
"var": [
"returnv"
]
},
{
"value": [
"965"
],
"var": [
"returnv"
]
},
{
"value": [
"852"
],
"var": [
"returnv"
]
},
{
"value": [
"527"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_32krhde_2f.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 long int x, unsigned 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);
unsigned long int x = input_json["x"];
clock_t begin = clock();
unsigned long int returnv = unsignedlong_id(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": "unsignedlong_id", "funargs": ["x"], "typemap": {"x": "uint64", "returnv": "uint64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32krhde_2f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
allen-garvey/til/c/pointers_by_value.c
|
void pointerExample1(int *ptr1, int *ptr2){
ptr1 = ptr2;
}
|
void pointerExample1(int *ptr1, int *ptr2)
|
void pointerExample1(int *ptr1, int *ptr2)
|
pointerExample1
|
[
"void",
"int *",
"int *"
] |
{
"code": [
".globl pointerExample1\n.type pointerExample1, @function\npointerExample1:\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-16(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl pointerExample1\n.type pointerExample1, @function\npointerExample1:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".globl pointerExample1\n.type pointerExample1, @function\npointerExample1:\n.LFB16:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n",
".global pointerExample1\n.type pointerExample1, %function\npointerExample1:\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]\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 pointerExample1\n.type pointerExample1, %function\npointerExample1:\n.LFB11:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n",
".global pointerExample1\n.type pointerExample1, %function\npointerExample1:\n.LFB16:\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 <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": [
"[28, 0, 4, 101, 82, 116, 121, 19, 100, 51, 113, 117, 96, 105, 15, 48, 70, 7, 70, 103, 116, 18, 45, 37, 44, 103, 121, 14, 25, 44, 15, 115]",
"[78, 23, 93, 121, 83, 16, 116, 88, 67, 71, 50, 91, 75, 73, 64, 88, 35, 33, 78, 68, 2, 105, 101, 76, 103, 116, 91, 100, 7, 13, 10, 38]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[30, 103, 3, 46, 14, 16, 21, 126, 20, 14, 12, 114, 109, 126, 15, 76, 126, 105, 109, 22, 16, 53, 119, 73, 93, 58, 109, 124, 57, 59, 40, 23]",
"[24, 19, 52, 65, 86, 23, 20, 118, 8, 8, 32, 41, 80, 75, 38, 65, 47, 84, 84, 10, 59, 36, 55, 95, 53, 120, 44, 76, 64, 55, 42, 46]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[103, 79, 1, 96, 98, 42, 33, 34, 44, 58, 4, 86, 122, 27, 3, 70, 61, 36, 10, 100, 100, 117, 85, 82, 80, 66, 31, 106, 11, 35, 77, 20]",
"[26, 115, 17, 19, 95, 52, 2, 75, 98, 74, 39, 121, 23, 92, 24, 76, 91, 28, 105, 84, 108, 83, 57, 32, 20, 41, 78, 99, 58, 2, 48, 82]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[49, 15, 43, 69, 11, 94, 17, 48, 42, 67, 56, 110, 110, 92, 32, 75, 81, 80, 88, 89, 48, 38, 2, 48, 42, 119, 10, 92, 80, 15, 117, 111]",
"[69, 27, 23, 47, 117, 39, 24, 96, 69, 75, 126, 53, 32, 74, 25, 94, 41, 49, 57, 65, 21, 108, 115, 91, 16, 60, 36, 112, 117, 115, 7, 101]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[74, 85, 34, 38, 88, 89, 11, 22, 73, 89, 32, 85, 7, 47, 46, 117, 91, 100, 67, 89, 92, 86, 95, 85, 25, 89, 45, 45, 24, 97, 115, 54]",
"[8, 75, 15, 69, 63, 81, 45, 50, 80, 77, 9, 74, 21, 17, 124, 102, 49, 122, 28, 43, 69, 89, 59, 76, 35, 79, 86, 94, 28, 122, 90, 85]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[101, 45, 24, 46, 82, 31, 80, 58, 63, 76, 53, 102, 45, 58, 114, 112, 40, 27, 62, 67, 86, 43, 110, 5, 5, 102, 41, 8, 10, 26, 31, 76]",
"[42, 104, 29, 70, 116, 48, 108, 13, 103, 39, 26, 108, 111, 104, 54, 41, 109, 119, 74, 57, 73, 96, 80, 126, 43, 75, 69, 88, 65, 99, 16, 95]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[53, 85, 39, 62, 117, 46, 104, 100, 67, 53, 11, 123, 1, 116, 31, 14, 1, 49, 114, 72, 85, 91, 105, 63, 21, 20, 47, 3, 17, 28, 55, 31]",
"[16, 47, 48, 40, 39, 108, 6, 65, 83, 126, 93, 125, 2, 81, 90, 49, 87, 17, 108, 56, 50, 54, 114, 65, 116, 76, 57, 126, 83, 35, 10, 80]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[92, 104, 41, 8, 67, 13, 46, 68, 8, 87, 80, 117, 11, 85, 92, 115, 117, 8, 63, 105, 94, 112, 119, 7, 20, 85, 27, 6, 89, 89, 56, 2]",
"[24, 92, 0, 46, 33, 35, 84, 9, 108, 72, 117, 16, 47, 1, 3, 30, 13, 42, 8, 97, 115, 124, 53, 104, 39, 49, 28, 22, 92, 101, 74, 36]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[41, 70, 10, 75, 49, 72, 20, 43, 90, 119, 120, 31, 19, 79, 26, 59, 11, 92, 51, 64, 13, 12, 72, 77, 114, 98, 2, 52, 94, 94, 89, 85]",
"[88, 93, 93, 6, 17, 111, 115, 1, 50, 67, 31, 120, 115, 18, 117, 16, 4, 20, 7, 9, 124, 111, 32, 33, 41, 33, 3, 25, 20, 122, 114, 49]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[32, 72, 30, 81, 124, 20, 65, 16, 101, 116, 68, 96, 114, 51, 121, 119, 13, 52, 26, 103, 101, 74, 3, 60, 10, 69, 25, 19, 88, 81, 37, 33]",
"[98, 56, 119, 58, 88, 114, 62, 25, 56, 23, 86, 42, 79, 68, 84, 90, 46, 69, 60, 9, 113, 37, 120, 45, 124, 52, 119, 72, 100, 104, 33, 81]"
],
"var": [
"ptr1",
"ptr2"
]
}
],
"output": [
{
"value": [
"[28, 0, 4, 101, 82, 116, 121, 19, 100, 51, 113, 117, 96, 105, 15, 48, 70, 7, 70, 103, 116, 18, 45, 37, 44, 103, 121, 14, 25, 44, 15, 115]",
"[78, 23, 93, 121, 83, 16, 116, 88, 67, 71, 50, 91, 75, 73, 64, 88, 35, 33, 78, 68, 2, 105, 101, 76, 103, 116, 91, 100, 7, 13, 10, 38]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[30, 103, 3, 46, 14, 16, 21, 126, 20, 14, 12, 114, 109, 126, 15, 76, 126, 105, 109, 22, 16, 53, 119, 73, 93, 58, 109, 124, 57, 59, 40, 23]",
"[24, 19, 52, 65, 86, 23, 20, 118, 8, 8, 32, 41, 80, 75, 38, 65, 47, 84, 84, 10, 59, 36, 55, 95, 53, 120, 44, 76, 64, 55, 42, 46]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[103, 79, 1, 96, 98, 42, 33, 34, 44, 58, 4, 86, 122, 27, 3, 70, 61, 36, 10, 100, 100, 117, 85, 82, 80, 66, 31, 106, 11, 35, 77, 20]",
"[26, 115, 17, 19, 95, 52, 2, 75, 98, 74, 39, 121, 23, 92, 24, 76, 91, 28, 105, 84, 108, 83, 57, 32, 20, 41, 78, 99, 58, 2, 48, 82]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[49, 15, 43, 69, 11, 94, 17, 48, 42, 67, 56, 110, 110, 92, 32, 75, 81, 80, 88, 89, 48, 38, 2, 48, 42, 119, 10, 92, 80, 15, 117, 111]",
"[69, 27, 23, 47, 117, 39, 24, 96, 69, 75, 126, 53, 32, 74, 25, 94, 41, 49, 57, 65, 21, 108, 115, 91, 16, 60, 36, 112, 117, 115, 7, 101]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[74, 85, 34, 38, 88, 89, 11, 22, 73, 89, 32, 85, 7, 47, 46, 117, 91, 100, 67, 89, 92, 86, 95, 85, 25, 89, 45, 45, 24, 97, 115, 54]",
"[8, 75, 15, 69, 63, 81, 45, 50, 80, 77, 9, 74, 21, 17, 124, 102, 49, 122, 28, 43, 69, 89, 59, 76, 35, 79, 86, 94, 28, 122, 90, 85]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[101, 45, 24, 46, 82, 31, 80, 58, 63, 76, 53, 102, 45, 58, 114, 112, 40, 27, 62, 67, 86, 43, 110, 5, 5, 102, 41, 8, 10, 26, 31, 76]",
"[42, 104, 29, 70, 116, 48, 108, 13, 103, 39, 26, 108, 111, 104, 54, 41, 109, 119, 74, 57, 73, 96, 80, 126, 43, 75, 69, 88, 65, 99, 16, 95]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[53, 85, 39, 62, 117, 46, 104, 100, 67, 53, 11, 123, 1, 116, 31, 14, 1, 49, 114, 72, 85, 91, 105, 63, 21, 20, 47, 3, 17, 28, 55, 31]",
"[16, 47, 48, 40, 39, 108, 6, 65, 83, 126, 93, 125, 2, 81, 90, 49, 87, 17, 108, 56, 50, 54, 114, 65, 116, 76, 57, 126, 83, 35, 10, 80]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[92, 104, 41, 8, 67, 13, 46, 68, 8, 87, 80, 117, 11, 85, 92, 115, 117, 8, 63, 105, 94, 112, 119, 7, 20, 85, 27, 6, 89, 89, 56, 2]",
"[24, 92, 0, 46, 33, 35, 84, 9, 108, 72, 117, 16, 47, 1, 3, 30, 13, 42, 8, 97, 115, 124, 53, 104, 39, 49, 28, 22, 92, 101, 74, 36]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[41, 70, 10, 75, 49, 72, 20, 43, 90, 119, 120, 31, 19, 79, 26, 59, 11, 92, 51, 64, 13, 12, 72, 77, 114, 98, 2, 52, 94, 94, 89, 85]",
"[88, 93, 93, 6, 17, 111, 115, 1, 50, 67, 31, 120, 115, 18, 117, 16, 4, 20, 7, 9, 124, 111, 32, 33, 41, 33, 3, 25, 20, 122, 114, 49]"
],
"var": [
"ptr1",
"ptr2"
]
},
{
"value": [
"[32, 72, 30, 81, 124, 20, 65, 16, 101, 116, 68, 96, 114, 51, 121, 119, 13, 52, 26, 103, 101, 74, 3, 60, 10, 69, 25, 19, 88, 81, 37, 33]",
"[98, 56, 119, 58, 88, 114, 62, 25, 56, 23, 86, 42, 79, 68, 84, 90, 46, 69, 60, 9, 113, 37, 120, 45, 124, 52, 119, 72, 100, 104, 33, 81]"
],
"var": [
"ptr1",
"ptr2"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_63dakgd19b.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* ptr1, int* ptr2) {
json output_json;
std::vector<json> output_temp_3;
for (unsigned int i4 = 0; i4 < 32; i4++) {
int output_temp_5 = ptr1[i4];
output_temp_3.push_back(output_temp_5);
}
output_json["ptr1"] = output_temp_3;
std::vector<json> output_temp_6;
for (unsigned int i7 = 0; i7 < 32; i7++) {
int output_temp_8 = ptr2[i7];
output_temp_6.push_back(output_temp_8);
}
output_json["ptr2"] = 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["ptr1"]) {
int input_temp_1_inner = elem;
input_temp_1_vec.push_back(input_temp_1_inner);
}
int* ptr1 = &input_temp_1_vec[0];
std::vector<int> input_temp_2_vec;
for (auto& elem : input_json["ptr2"]) {
int input_temp_2_inner = elem;
input_temp_2_vec.push_back(input_temp_2_inner);
}
int* ptr2 = &input_temp_2_vec[0];
clock_t begin = clock();
pointerExample1(ptr1, ptr2);
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(ptr1, ptr2);
}
|
master
|
null
|
{"livein": ["ptr1", "ptr2"], "liveout": ["ptr1", "ptr2"], "returnvarname": [], "execcmd": "", "funname": "pointerExample1", "funargs": ["ptr1", "ptr2"], "typemap": {"ptr1": "array(int32#32)", "ptr2": "array(int32#32)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63dakgd19b.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
IAmAnubhavSaini/blog-posts/c/hcf_via_euclids_division_algorithm.c
|
int hcf_iterative(int a, int b){
int q, r;
if(a > 0 && b > 0){
if(a < b)
return hcf_iterative(b, a);
q = a / b;
r = a % b;
while(r != 0 && r != 1){
a = b;
b = r;
q = a / b;
r = a % b;
}
if(r == 0)
return b;
else if(r == 1)
return 1;
}
return -1;
}
|
int hcf_iterative(inta, intb)
|
int hcf_iterative(int a, int b)
|
hcf_iterative
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl hcf_iterative\n.type hcf_iterative, @function\nhcf_iterative:\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$32, %rsp\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjle\t.L2\n\tcmpl\t$0, -24(%rbp)\n\tjle\t.L2\n\tmovl\t-20(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjge\t.L3\n\tmovl\t-20(%rbp), %edx\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%edx, %esi\n\tmovl\t%eax, %edi\n\tcall\thcf_iterative\n\tjmp\t.L4\n.L3:\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%edx, -8(%rbp)\n\tjmp\t.L5\n.L7:\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\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%edx, -8(%rbp)\n.L5:\n\tcmpl\t$0, -8(%rbp)\n\tje\t.L6\n\tcmpl\t$1, -8(%rbp)\n\tjne\t.L7\n.L6:\n\tcmpl\t$0, -8(%rbp)\n\tjne\t.L8\n\tmovl\t-24(%rbp), %eax\n\tjmp\t.L4\n.L8:\n\tcmpl\t$1, -8(%rbp)\n\tjne\t.L2\n\tmovl\t$1, %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 hcf_iterative\n.type hcf_iterative, @function\nhcf_iterative:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %r8d\n.L3:\n\ttestl\t%eax, %eax\n\tjle\t.L6\n\ttestl\t%r8d, %r8d\n\tjle\t.L6\n\tcmpl\t%r8d, %eax\n\tjge\t.L18\n\tmovl\t%eax, %edx\n\tmovl\t%r8d, %eax\n\tmovl\t%edx, %r8d\n\tjmp\t.L3\n.L18:\n\tcltd\n\tidivl\t%r8d\n.L16:\n\tmovl\t%edx, %edi\n\tcmpl\t$1, %edx\n\tjle\t.L19\n\tmovl\t%r8d, %eax\n\tmovl\t%edi, %r8d\n\tcltd\n\tidivl\t%edi\n\tjmp\t.L16\n.L19:\n\ttestl\t%edx, %edx\n\tmovl\t$1, %eax\n\tcmovne\t%eax, %r8d\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 hcf_iterative\n.type hcf_iterative, @function\nhcf_iterative:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovl\t%edi, %edx\n\tmovl\t%esi, %edi\n\tmovl\t%edx, %esi\n.L3:\n\ttestl\t%edi, %edi\n\tjle\t.L6\n\ttestl\t%esi, %esi\n\tjle\t.L6\n\tcmpl\t%esi, %edi\n\tjl\t.L7\n\tmovl\t%edi, %eax\n\tcltd\n\tidivl\t%esi\n\tcmpl\t$1, %edx\n\tjle\t.L8\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %r8d\n\tcltd\n\tmovl\t%r8d, %esi\n\tidivl\t%r8d\n\tcmpl\t$1, %edx\n\tjg\t.L5\n.L4:\n\ttestl\t%edx, %edx\n\tcmovne\t%edx, %r8d\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.L8:\n\tmovl\t%esi, %r8d\n\tjmp\t.L4\n\t.cfi_endproc\n\n",
".global hcf_iterative\n.type hcf_iterative, %function\nhcf_iterative:\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\tw0, [sp, 28]\n\tstr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tble\t.L2\n\tldr\tw0, [sp, 24]\n\tcmp\tw0, 0\n\tble\t.L2\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tcmp\tw1, w0\n\tbge\t.L3\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tbl\thcf_iterative\n\tb\t.L4\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tsdiv\tw0, w1, w0\n\tstr\tw0, [sp, 44]\n\tldr\tw0, [sp, 28]\n\tldr\tw1, [sp, 24]\n\tsdiv\tw2, w0, w1\n\tldr\tw1, [sp, 24]\n\tmul\tw1, w2, w1\n\tsub\tw0, w0, w1\n\tstr\tw0, [sp, 40]\n\tb\t.L5\n.L7:\n\tldr\tw0, [sp, 24]\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 40]\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 24]\n\tsdiv\tw0, w1, w0\n\tstr\tw0, [sp, 44]\n\tldr\tw0, [sp, 28]\n\tldr\tw1, [sp, 24]\n\tsdiv\tw2, w0, w1\n\tldr\tw1, [sp, 24]\n\tmul\tw1, w2, w1\n\tsub\tw0, w0, w1\n\tstr\tw0, [sp, 40]\n.L5:\n\tldr\tw0, [sp, 40]\n\tcmp\tw0, 0\n\tbeq\t.L6\n\tldr\tw0, [sp, 40]\n\tcmp\tw0, 1\n\tbne\t.L7\n.L6:\n\tldr\tw0, [sp, 40]\n\tcmp\tw0, 0\n\tbne\t.L8\n\tldr\tw0, [sp, 24]\n\tb\t.L4\n.L8:\n\tldr\tw0, [sp, 40]\n\tcmp\tw0, 1\n\tbne\t.L2\n\tmov\tw0, 1\n\tb\t.L4\n.L2:\n\tmov\tw0, -1\n.L4:\n\tldp\tx29, x30, [sp], 48\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 hcf_iterative\n.type hcf_iterative, %function\nhcf_iterative:\n.LFB13:\n\t.cfi_startproc\n.L10:\n\tmov\tw2, w0\n\tmov\tw0, w1\n\tcmp\tw2, 0\n\tccmp\tw1, 0, 4, gt\n\tble\t.L6\n\tcmp\tw2, w1\n\tblt\t.L7\n\tsdiv\tw1, w2, w1\n\tmsub\tw1, w1, w0, w2\n.L4:\n\tcmp\tw1, 1\n\tbgt\t.L5\n\tcmp\tw1, 0\n\tcsinc\tw0, w0, wzr, eq\n.L1:\n\tret\n.L7:\n\tmov\tw1, w2\n\tb\t.L10\n.L5:\n\tudiv\tw2, w0, w1\n\tmsub\tw2, w2, w1, w0\n\tmov\tw0, w1\n\tmov\tw1, w2\n\tb\t.L4\n.L6:\n\tmov\tw0, -1\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global hcf_iterative\n.type hcf_iterative, %function\nhcf_iterative:\n.LFB23:\n\t.cfi_startproc\n\tb\t.L3\n\t.p2align 2,,3\n.L14:\n\tcmp\tw0, w1\n\tbge\t.L13\n\tmov\tw0, w1\n\tmov\tw1, w2\n.L3:\n\tcmp\tw0, 0\n\tmov\tw2, w0\n\tccmp\tw1, 0, 4, gt\n\tbgt\t.L14\n\tmov\tw0, -1\n\tret\n\t.p2align 2,,3\n.L13:\n\tsdiv\tw2, w0, w1\n\tmsub\tw2, w2, w1, w0\n\tcmp\tw2, 1\n\tble\t.L8\n\t.p2align 3,,7\n.L5:\n\tudiv\tw3, w1, w2\n\tmov\tw0, w2\n\tmsub\tw2, w3, w2, w1\n\tmov\tw1, w0\n\tcmp\tw2, 1\n\tbgt\t.L5\n.L4:\n\tcmp\tw2, 0\n\tcsel\tw0, w0, w2, eq\n\tret\n.L8:\n\tmov\tw0, w1\n\tb\t.L4\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": [
"23",
"55"
],
"var": [
"a",
"b"
]
},
{
"value": [
"67",
"93"
],
"var": [
"a",
"b"
]
},
{
"value": [
"87",
"6"
],
"var": [
"a",
"b"
]
},
{
"value": [
"87",
"5"
],
"var": [
"a",
"b"
]
},
{
"value": [
"98",
"107"
],
"var": [
"a",
"b"
]
},
{
"value": [
"106",
"84"
],
"var": [
"a",
"b"
]
},
{
"value": [
"118",
"108"
],
"var": [
"a",
"b"
]
},
{
"value": [
"122",
"84"
],
"var": [
"a",
"b"
]
},
{
"value": [
"91",
"4"
],
"var": [
"a",
"b"
]
},
{
"value": [
"69",
"88"
],
"var": [
"a",
"b"
]
}
],
"output": [
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"3"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"2"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_45dbgpeq0i.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 = hcf_iterative(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": "hcf_iterative", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_45dbgpeq0i.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
danielsanfr/c-study/soma/soma.c
|
int soma3(int a, int b, int c)
{
return a+b+c;
}
|
int soma3(inta, intb, intc)
|
int soma3(int a, int b, int c)
|
soma3
|
[
"int",
"int",
"int",
"int"
] |
{
"code": [
".globl soma3\n.type soma3, @function\nsoma3:\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-4(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%eax, %edx\n\tmovl\t-12(%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 soma3\n.type soma3, @function\nsoma3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddl\t%esi, %edi\n\tleal\t(%rdi,%rdx), %eax\n\tret\n\t.cfi_endproc\n\n",
".globl soma3\n.type soma3, @function\nsoma3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddl\t%esi, %edi\n\tleal\t(%rdi,%rdx), %eax\n\tret\n\t.cfi_endproc\n\n",
".global soma3\n.type soma3, %function\nsoma3:\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\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tadd\tw1, w1, w0\n\tldr\tw0, [sp, 4]\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 soma3\n.type soma3, %function\nsoma3:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tadd\tw0, w0, w2\n\tret\n\t.cfi_endproc\n\n",
".global soma3\n.type soma3, %function\nsoma3:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, w1\n\tadd\tw0, w0, w2\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": [
"125",
"44",
"62"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"49",
"78",
"4"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"24",
"55",
"46"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"23",
"37",
"115"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"108",
"63",
"9"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"42",
"95",
"39"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"45",
"40",
"84"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"113",
"116",
"123"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"63",
"125",
"1"
],
"var": [
"a",
"b",
"c"
]
},
{
"value": [
"46",
"72",
"94"
],
"var": [
"a",
"b",
"c"
]
}
],
"output": [
{
"value": [
"231"
],
"var": [
"returnv"
]
},
{
"value": [
"131"
],
"var": [
"returnv"
]
},
{
"value": [
"125"
],
"var": [
"returnv"
]
},
{
"value": [
"175"
],
"var": [
"returnv"
]
},
{
"value": [
"180"
],
"var": [
"returnv"
]
},
{
"value": [
"176"
],
"var": [
"returnv"
]
},
{
"value": [
"169"
],
"var": [
"returnv"
]
},
{
"value": [
"352"
],
"var": [
"returnv"
]
},
{
"value": [
"189"
],
"var": [
"returnv"
]
},
{
"value": [
"212"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_35lpy2am2k.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 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 a = input_json["a"];
int b = input_json["b"];
int c = input_json["c"];
clock_t begin = clock();
int returnv = soma3(a, b, 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(a, b, c, returnv);
}
|
master
|
null
|
{"livein": ["a", "b", "c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "soma3", "funargs": ["a", "b", "c"], "typemap": {"a": "int32", "b": "int32", "c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35lpy2am2k.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
michalis-/rcu/valtree/v3.19/fake_sched.h
|
unsigned long int_sqrt(unsigned long x)
{
unsigned long b, m, y = 0;
if (x <= 1)
return x;
m = 1UL << ((sizeof(long) * 8) - 2);
while (m != 0) {
b = y + m;
y >>= 1;
if (x >= b) {
x -= b;
y += m;
}
m >>= 2;
}
return y;
}
|
unsigned long int_sqrt(unsigned longx)
|
unsigned long int_sqrt(unsigned long x)
|
int_sqrt
|
[
"unsigned long",
"unsigned long"
] |
{
"code": [
".globl int_sqrt\n.type int_sqrt, @function\nint_sqrt:\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, -40(%rbp)\n\tmovq\t$0, -16(%rbp)\n\tcmpq\t$1, -40(%rbp)\n\tja\t.L2\n\tmovq\t-40(%rbp), %rax\n\tjmp\t.L3\n.L2:\n\tmovabsq\t$4611686018427387904, %rax\n\tmovq\t%rax, -24(%rbp)\n\tjmp\t.L4\n.L6:\n\tmovq\t-16(%rbp), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovq\t%rax, -8(%rbp)\n\tshrq\t-16(%rbp)\n\tmovq\t-40(%rbp), %rax\n\tcmpq\t-8(%rbp), %rax\n\tjb\t.L5\n\tmovq\t-8(%rbp), %rax\n\tsubq\t%rax, -40(%rbp)\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rax, -16(%rbp)\n.L5:\n\tshrq\t$2, -24(%rbp)\n.L4:\n\tcmpq\t$0, -24(%rbp)\n\tjne\t.L6\n\tmovq\t-16(%rbp), %rax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl int_sqrt\n.type int_sqrt, @function\nint_sqrt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tcmpq\t$1, %rdi\n\tjbe\t.L2\n\tmovl\t$1, %edx\n\tmovq\t%rdi, %rsi\n\tmovl\t$32, %ecx\n\txorl\t%eax, %eax\n\tsalq\t$62, %rdx\n.L4:\n\tleaq\t(%rdx,%rax), %rdi\n\tshrq\t%rax\n\tcmpq\t%rsi, %rdi\n\tja\t.L3\n\tsubq\t%rdi, %rsi\n\taddq\t%rdx, %rax\n.L3:\n\tshrq\t$2, %rdx\n\tdecl\t%ecx\n\tjne\t.L4\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".globl int_sqrt\n.type int_sqrt, @function\nint_sqrt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovq\t%rdi, %rax\n\tcmpq\t$1, %rdi\n\tjbe\t.L1\n\tmovl\t$32, %ecx\n\txorl\t%eax, %eax\n\tmovabsq\t$4611686018427387904, %rdx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleaq\t(%rdx,%rax), %rsi\n\tshrq\t%rax\n\tcmpq\t%rsi, %rdi\n\tjb\t.L3\n\tsubq\t%rsi, %rdi\n\taddq\t%rdx, %rax\n.L3:\n\tshrq\t$2, %rdx\n\tsubl\t$1, %ecx\n\tjne\t.L4\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".global int_sqrt\n.type int_sqrt, %function\nint_sqrt:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #48\n\t.cfi_def_cfa_offset 48\n\tstr\tx0, [sp, 8]\n\tstr\txzr, [sp, 32]\n\tldr\tx0, [sp, 8]\n\tcmp\tx0, 1\n\tbhi\t.L2\n\tldr\tx0, [sp, 8]\n\tb\t.L3\n.L2:\n\tmov\tx0, 4611686018427387904\n\tstr\tx0, [sp, 24]\n\tb\t.L4\n.L6:\n\tldr\tx1, [sp, 32]\n\tldr\tx0, [sp, 24]\n\tadd\tx0, x1, x0\n\tstr\tx0, [sp, 40]\n\tldr\tx0, [sp, 32]\n\tlsr\tx0, x0, 1\n\tstr\tx0, [sp, 32]\n\tldr\tx1, [sp, 8]\n\tldr\tx0, [sp, 40]\n\tcmp\tx1, x0\n\tbcc\t.L5\n\tldr\tx1, [sp, 8]\n\tldr\tx0, [sp, 40]\n\tsub\tx0, x1, x0\n\tstr\tx0, [sp, 8]\n\tldr\tx1, [sp, 32]\n\tldr\tx0, [sp, 24]\n\tadd\tx0, x1, x0\n\tstr\tx0, [sp, 32]\n.L5:\n\tldr\tx0, [sp, 24]\n\tlsr\tx0, x0, 2\n\tstr\tx0, [sp, 24]\n.L4:\n\tldr\tx0, [sp, 24]\n\tcmp\tx0, 0\n\tbne\t.L6\n\tldr\tx0, [sp, 32]\n.L3:\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global int_sqrt\n.type int_sqrt, %function\nint_sqrt:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tx0, 1\n\tbls\t.L2\n\tmov\tx3, x0\n\tmov\tw2, 32\n\tmov\tx0, 0\n\tmov\tx1, 4611686018427387904\n.L4:\n\tadd\tx4, x1, x0\n\tlsr\tx0, x0, 1\n\tcmp\tx4, x3\n\tbhi\t.L3\n\tsub\tx3, x3, x4\n\tadd\tx0, x0, x1\n.L3:\n\tlsr\tx1, x1, 2\n\tsubs\tw2, w2, #1\n\tbne\t.L4\n.L2:\n\tret\n\t.cfi_endproc\n\n",
".global int_sqrt\n.type int_sqrt, %function\nint_sqrt:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tcmp\tx0, 1\n\tbls\t.L1\n\tmov\tw2, 32\n\tmov\tx0, 0\n\tmov\tx1, 4611686018427387904\n\t.p2align 3,,7\n.L4:\n\tadd\tx3, x1, x0\n\tlsr\tx0, x0, 1\n\tcmp\tx4, x3\n\tbcc\t.L3\n\tsub\tx4, x4, x3\n\tadd\tx0, x0, x1\n.L3:\n\tlsr\tx1, x1, 2\n\tsubs\tw2, w2, #1\n\tbne\t.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": [
"21"
],
"var": [
"x"
]
},
{
"value": [
"643"
],
"var": [
"x"
]
},
{
"value": [
"636"
],
"var": [
"x"
]
},
{
"value": [
"315"
],
"var": [
"x"
]
},
{
"value": [
"616"
],
"var": [
"x"
]
},
{
"value": [
"889"
],
"var": [
"x"
]
},
{
"value": [
"135"
],
"var": [
"x"
]
},
{
"value": [
"137"
],
"var": [
"x"
]
},
{
"value": [
"334"
],
"var": [
"x"
]
},
{
"value": [
"239"
],
"var": [
"x"
]
}
],
"output": [
{
"value": [
"4"
],
"var": [
"returnv"
]
},
{
"value": [
"25"
],
"var": [
"returnv"
]
},
{
"value": [
"25"
],
"var": [
"returnv"
]
},
{
"value": [
"17"
],
"var": [
"returnv"
]
},
{
"value": [
"24"
],
"var": [
"returnv"
]
},
{
"value": [
"29"
],
"var": [
"returnv"
]
},
{
"value": [
"11"
],
"var": [
"returnv"
]
},
{
"value": [
"11"
],
"var": [
"returnv"
]
},
{
"value": [
"18"
],
"var": [
"returnv"
]
},
{
"value": [
"15"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_54il_hk1o2.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 long int x, unsigned 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);
unsigned long int x = input_json["x"];
clock_t begin = clock();
unsigned long int returnv = int_sqrt(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": "int_sqrt", "funargs": ["x"], "typemap": {"x": "uint64", "returnv": "uint64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54il_hk1o2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
vivekian/algorithms_practice/c_programming/complement.c
|
int comp(int num)
{
int res = 0;
int cnt = 0;
while (num) {
if (!(num & 1)) {
res = res | (1 << cnt);
}
++cnt;
num = num >> 1;
}
return res;
}
|
int comp(intnum)
|
int comp(int num)
|
comp
|
[
"int",
"int"
] |
{
"code": [
".globl comp\n.type comp, @function\ncomp:\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, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovl\t-20(%rbp), %eax\n\tandl\t$1, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L3\n\tmovl\t-4(%rbp), %eax\n\tmovl\t$1, %edx\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %edx\n\tmovl\t%edx, %eax\n\torl\t%eax, -8(%rbp)\n.L3:\n\taddl\t$1, -4(%rbp)\n\tsarl\t-20(%rbp)\n.L2:\n\tcmpl\t$0, -20(%rbp)\n\tjne\t.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 comp\n.type comp, @function\ncomp:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n\txorl\t%eax, %eax\n\tmovl\t$1, %edx\n.L2:\n\ttestl\t%edi, %edi\n\tje\t.L6\n\ttestb\t$1, %dil\n\tjne\t.L3\n\tmovl\t%edx, %esi\n\tsall\t%cl, %esi\n\torl\t%esi, %eax\n.L3:\n\tincl\t%ecx\n\tsarl\t%edi\n\tjmp\t.L2\n.L6:\n\tret\n\t.cfi_endproc\n\n",
".globl comp\n.type comp, @function\ncomp:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tje\t.L5\n\txorl\t%ecx, %ecx\n\txorl\t%eax, %eax\n\tmovl\t$1, %esi\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\ttestb\t$1, %dil\n\tjne\t.L3\n\tmovl\t%esi, %edx\n\tsall\t%cl, %edx\n\torl\t%edx, %eax\n.L3:\n\taddl\t$1, %ecx\n\tsarl\t%edi\n\tjne\t.L4\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global comp\n.type comp, %function\ncomp:\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, 24]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 1\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tw0, [sp, 28]\n\tmov\tw1, 1\n\tlsl\tw0, w1, w0\n\tldr\tw1, [sp, 24]\n\torr\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n.L3:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tasr\tw0, w0, 1\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbne\t.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 comp\n.type comp, %function\ncomp:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw2, 0\n\tmov\tw0, 0\n\tmov\tw3, 1\n.L2:\n\tcbnz\tw1, .L4\n\tret\n.L4:\n\ttbnz\tx1, 0, .L3\n\tlsl\tw4, w3, w2\n\torr\tw0, w0, w4\n.L3:\n\tadd\tw2, w2, 1\n\tasr\tw1, w1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global comp\n.type comp, %function\ncomp:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tcbz\tw0, .L5\n\tmov\tw3, 0\n\tmov\tw0, 0\n\tmov\tw4, 1\n\t.p2align 3,,7\n.L4:\n\ttst\tx1, 1\n\tlsl\tw2, w4, w3\n\torr\tw2, w0, w2\n\tasr\tw1, w1, 1\n\tcsel\tw0, w2, w0, eq\n\tadd\tw3, w3, 1\n\tcbnz\tw1, .L4\n\tret\n\t.p2align 2,,3\n.L5:\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": [
"48"
],
"var": [
"num"
]
},
{
"value": [
"109"
],
"var": [
"num"
]
},
{
"value": [
"1"
],
"var": [
"num"
]
},
{
"value": [
"85"
],
"var": [
"num"
]
},
{
"value": [
"116"
],
"var": [
"num"
]
},
{
"value": [
"54"
],
"var": [
"num"
]
},
{
"value": [
"98"
],
"var": [
"num"
]
},
{
"value": [
"62"
],
"var": [
"num"
]
},
{
"value": [
"94"
],
"var": [
"num"
]
},
{
"value": [
"44"
],
"var": [
"num"
]
}
],
"output": [
{
"value": [
"15"
],
"var": [
"returnv"
]
},
{
"value": [
"18"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"42"
],
"var": [
"returnv"
]
},
{
"value": [
"11"
],
"var": [
"returnv"
]
},
{
"value": [
"9"
],
"var": [
"returnv"
]
},
{
"value": [
"29"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"33"
],
"var": [
"returnv"
]
},
{
"value": [
"19"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_517jmndjjh.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 num, 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 num = input_json["num"];
clock_t begin = clock();
int returnv = comp(num);
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(num, returnv);
}
|
master
|
null
|
{"livein": ["num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "comp", "funargs": ["num"], "typemap": {"num": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_517jmndjjh.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Urinx/Hardware_Software_Interface/lab1/bits.c
|
int logicalShift(int x, int n) {
int a=(x>>31&1)<<32+~n;
return (x^a<<n)>>n^a;
}
|
int logicalShift(intx, intn)
|
int logicalShift(int x, int n)
|
logicalShift
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl logicalShift\n.type logicalShift, @function\nlogicalShift:\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), %eax\n\tshrl\t$31, %eax\n\tmovl\t%eax, %edx\n\tmovl\t$31, %eax\n\tsubl\t-24(%rbp), %eax\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-24(%rbp), %eax\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%eax, %ecx\n\tsall\t%cl, %edx\n\tmovl\t%edx, %eax\n\txorl\t-20(%rbp), %eax\n\tmovl\t%eax, %edx\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, %ecx\n\tsarl\t%cl, %edx\n\tmovl\t%edx, %eax\n\txorl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl logicalShift\n.type logicalShift, @function\nlogicalShift:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$31, %ecx\n\tmovl\t%edi, %edx\n\tsubl\t%esi, %ecx\n\tshrl\t$31, %eax\n\tsall\t%cl, %eax\n\tmovl\t%esi, %ecx\n\tmovl\t%eax, %edi\n\tsall\t%cl, %edi\n\txorl\t%edx, %edi\n\tsarl\t%cl, %edi\n\txorl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl logicalShift\n.type logicalShift, @function\nlogicalShift:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$31, %ecx\n\tmovl\t%edi, %edx\n\tsubl\t%esi, %ecx\n\tshrl\t$31, %eax\n\tsall\t%cl, %eax\n\tmovl\t%esi, %ecx\n\tmovl\t%eax, %edi\n\tsall\t%cl, %edi\n\txorl\t%edx, %edi\n\tsarl\t%cl, %edi\n\txorl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global logicalShift\n.type logicalShift, %function\nlogicalShift:\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\tlsr\tw0, w0, 31\n\tmov\tw2, w0\n\tmov\tw1, 31\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w1, w0\n\tlsl\tw0, w2, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tldr\tw1, [sp, 28]\n\tlsl\tw1, w1, w0\n\tldr\tw0, [sp, 12]\n\teor\tw1, w1, w0\n\tldr\tw0, [sp, 8]\n\tasr\tw1, w1, w0\n\tldr\tw0, [sp, 28]\n\teor\tw0, w1, w0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global logicalShift\n.type logicalShift, %function\nlogicalShift:\n.LFB0:\n\t.cfi_startproc\n\tlsr\tw3, w0, 31\n\tmov\tw2, 31\n\tsub\tw2, w2, w1\n\tlsl\tw3, w3, w2\n\tlsl\tw2, w3, w1\n\teor\tw2, w2, w0\n\tasr\tw1, w2, w1\n\teor\tw0, w1, w3\n\tret\n\t.cfi_endproc\n\n",
".global logicalShift\n.type logicalShift, %function\nlogicalShift:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw3, 31\n\tsub\tw2, w3, w1\n\tlsr\tw3, w0, 31\n\tlsl\tw3, w3, w2\n\tlsl\tw2, w3, w1\n\teor\tw2, w2, w0\n\tasr\tw1, w2, w1\n\teor\tw0, w1, w3\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": [
"114",
"0"
],
"var": [
"x",
"n"
]
},
{
"value": [
"20",
"83"
],
"var": [
"x",
"n"
]
},
{
"value": [
"82",
"103"
],
"var": [
"x",
"n"
]
},
{
"value": [
"112",
"77"
],
"var": [
"x",
"n"
]
},
{
"value": [
"106",
"20"
],
"var": [
"x",
"n"
]
},
{
"value": [
"50",
"98"
],
"var": [
"x",
"n"
]
},
{
"value": [
"123",
"60"
],
"var": [
"x",
"n"
]
},
{
"value": [
"49",
"13"
],
"var": [
"x",
"n"
]
},
{
"value": [
"82",
"28"
],
"var": [
"x",
"n"
]
},
{
"value": [
"107",
"112"
],
"var": [
"x",
"n"
]
}
],
"output": [
{
"value": [
"114"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"12"
],
"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_60nihwinll.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 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 x = input_json["x"];
int n = input_json["n"];
clock_t begin = clock();
int returnv = logicalShift(x, 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(x, n, returnv);
}
|
master
|
null
|
{"livein": ["x", "n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "logicalShift", "funargs": ["x", "n"], "typemap": {"x": "int32", "n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60nihwinll.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
project-lovelace/lovelace-website/pip/src/sqlparse-0.4.2/src/static/code_stubs/c/speed_of_light.c
|
double light_time(double distance) {
double t = 0.0;
return t;
}
|
double light_time(doubledistance)
|
double light_time(double distance)
|
light_time
|
[
"double",
"double"
] |
{
"code": [
".globl light_time\n.type light_time, @function\nlight_time:\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\tpxor\t%xmm0, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl light_time\n.type light_time, @function\nlight_time:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorps\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl light_time\n.type light_time, @function\nlight_time:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpxor\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global light_time\n.type light_time, %function\nlight_time:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\td0, [sp, 8]\n\tstr\txzr, [sp, 24]\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 light_time\n.type light_time, %function\nlight_time:\n.LFB0:\n\t.cfi_startproc\n\tmovi\td0, #0\n\tret\n\t.cfi_endproc\n\n",
".global light_time\n.type light_time, %function\nlight_time:\n.LFB0:\n\t.cfi_startproc\n\tmovi\td0, #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": [
"58.0127576083"
],
"var": [
"distance"
]
},
{
"value": [
"70.1448048961"
],
"var": [
"distance"
]
},
{
"value": [
"77.0263571992"
],
"var": [
"distance"
]
},
{
"value": [
"46.5401674493"
],
"var": [
"distance"
]
},
{
"value": [
"32.4907810802"
],
"var": [
"distance"
]
},
{
"value": [
"49.6204105578"
],
"var": [
"distance"
]
},
{
"value": [
"61.3715271577"
],
"var": [
"distance"
]
},
{
"value": [
"92.3587094394"
],
"var": [
"distance"
]
},
{
"value": [
"44.4441391804"
],
"var": [
"distance"
]
},
{
"value": [
"41.106873926"
],
"var": [
"distance"
]
}
],
"output": [
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
},
{
"value": [
"0.0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_29htpeaylv.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 distance, 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 distance = input_json["distance"];
clock_t begin = clock();
double returnv = light_time(distance);
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(distance, returnv);
}
|
dependabot
|
null
|
{"livein": ["distance"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "light_time", "funargs": ["distance"], "typemap": {"distance": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29htpeaylv.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
arktools/arktoolbox/arktoolbox-xcos/src/c/business_sum.c
|
double business_sum(double in, double in2) {
return in + in2;
}
|
double business_sum(doublein, doublein2)
|
double business_sum(double in, double in2)
|
business_sum
|
[
"double",
"double",
"double"
] |
{
"code": [
".globl business_sum\n.type business_sum, @function\nbusiness_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\tmovsd\t%xmm0, -8(%rbp)\n\tmovsd\t%xmm1, -16(%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 business_sum\n.type business_sum, @function\nbusiness_sum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".globl business_sum\n.type business_sum, @function\nbusiness_sum:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n",
".global business_sum\n.type business_sum, %function\nbusiness_sum:\n.LFB0:\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\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 business_sum\n.type business_sum, %function\nbusiness_sum:\n.LFB0:\n\t.cfi_startproc\n\tfadd\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n",
".global business_sum\n.type business_sum, %function\nbusiness_sum:\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 |
# 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": [
"81.4607745122",
"69.5245241031"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"26.8261626242",
"84.3884633157"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"41.2428339361",
"27.2204900607"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"15.8585701247",
"72.9035740222"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"12.2764481534",
"1.82226858153"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"70.7950679425",
"6.97458695468"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"70.4649738019",
"4.94294049473"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"80.6695289542",
"93.7483065079"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"34.2776322831",
"86.2021501026"
],
"var": [
"in",
"in2"
]
},
{
"value": [
"56.4821062516",
"28.6701463638"
],
"var": [
"in",
"in2"
]
}
],
"output": [
{
"value": [
"150.9852986153"
],
"var": [
"returnv"
]
},
{
"value": [
"111.21462593989999"
],
"var": [
"returnv"
]
},
{
"value": [
"68.4633239968"
],
"var": [
"returnv"
]
},
{
"value": [
"88.7621441469"
],
"var": [
"returnv"
]
},
{
"value": [
"14.09871673493"
],
"var": [
"returnv"
]
},
{
"value": [
"77.76965489718"
],
"var": [
"returnv"
]
},
{
"value": [
"75.40791429663"
],
"var": [
"returnv"
]
},
{
"value": [
"174.41783546210002"
],
"var": [
"returnv"
]
},
{
"value": [
"120.47978238569999"
],
"var": [
"returnv"
]
},
{
"value": [
"85.1522526154"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_29rsp7gy92.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 in, double in2, 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 in = input_json["in"];
double in2 = input_json["in2"];
clock_t begin = clock();
double returnv = business_sum(in, in2);
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(in, in2, returnv);
}
|
master
|
null
|
{"livein": ["in", "in2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "business_sum", "funargs": ["in", "in2"], "typemap": {"in": "float64", "in2": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29rsp7gy92.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
|
int do_961() { return 961; }
|
int do_961()
|
int do_961()
|
do_961
|
[
"int",
""
] |
{
"code": [
".globl do_961\n.type do_961, @function\ndo_961:\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$961, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl do_961\n.type do_961, @function\ndo_961:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$961, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl do_961\n.type do_961, @function\ndo_961:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$961, %eax\n\tret\n\t.cfi_endproc\n\n",
".global do_961\n.type do_961, %function\ndo_961:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 961\n\tret\n\t.cfi_endproc\n\n",
".global do_961\n.type do_961, %function\ndo_961:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 961\n\tret\n\t.cfi_endproc\n\n",
".global do_961\n.type do_961, %function\ndo_961:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 961\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": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
},
{
"value": [
"961"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_534wks31f8.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_961();
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_961", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_534wks31f8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
petterreinholdtsen/cinelerra-hv/cinelerra-4.6/cinelerra-4.6.mod/thirdparty/mjpegtools-1.9.0rc3/lavtools/subsample.c
|
int chroma_sub_implemented(int mode)
{
switch (mode) {
case 0:
case 1:
case 3:
return 1;
case 2:
case 4:
case 5:
case 7:
case 6:
default:
return 0;
}
}
|
int chroma_sub_implemented(intmode)
|
int chroma_sub_implemented(int mode)
|
chroma_sub_implemented
|
[
"int",
"int"
] |
{
"code": [
".globl chroma_sub_implemented\n.type chroma_sub_implemented, @function\nchroma_sub_implemented:\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$1, -4(%rbp)\n\tjg\t.L2\n\tcmpl\t$0, -4(%rbp)\n\tjns\t.L3\n\tjmp\t.L4\n.L2:\n\tcmpl\t$3, -4(%rbp)\n\tjne\t.L4\n.L3:\n\tmovl\t$1, %eax\n\tjmp\t.L5\n.L4:\n\tmovl\t$0, %eax\n.L5:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl chroma_sub_implemented\n.type chroma_sub_implemented, @function\nchroma_sub_implemented:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$1, %edi\n\tjg\t.L2\n\tnotl\t%edi\n\tmovl\t%edi, %eax\n\tshrl\t$31, %eax\n\tret\n.L2:\n\txorl\t%eax, %eax\n\tcmpl\t$3, %edi\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n",
".globl chroma_sub_implemented\n.type chroma_sub_implemented, @function\nchroma_sub_implemented:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$1, %edi\n\tjg\t.L2\n\tnotl\t%edi\n\tmovl\t%edi, %eax\n\tshrl\t$31, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\txorl\t%eax, %eax\n\tcmpl\t$3, %edi\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n",
".global chroma_sub_implemented\n.type chroma_sub_implemented, %function\nchroma_sub_implemented:\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, 1\n\tbgt\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbge\t.L3\n\tb\t.L4\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbne\t.L4\n.L3:\n\tmov\tw0, 1\n\tb\t.L5\n.L4:\n\tmov\tw0, 0\n.L5:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global chroma_sub_implemented\n.type chroma_sub_implemented, %function\nchroma_sub_implemented:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 1\n\tbgt\t.L2\n\tmvn\tw0, w0\n\tlsr\tw0, w0, 31\n.L1:\n\tret\n.L2:\n\tcmp\tw0, 3\n\tcset\tw0, eq\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global chroma_sub_implemented\n.type chroma_sub_implemented, %function\nchroma_sub_implemented:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 1\n\tbgt\t.L2\n\tmvn\tw0, w0\n\tlsr\tw0, w0, 31\n\tret\n\t.p2align 2,,3\n.L2:\n\tcmp\tw0, 3\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 |
# 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"
],
"var": [
"mode"
]
},
{
"value": [
"113"
],
"var": [
"mode"
]
},
{
"value": [
"26"
],
"var": [
"mode"
]
},
{
"value": [
"21"
],
"var": [
"mode"
]
},
{
"value": [
"120"
],
"var": [
"mode"
]
},
{
"value": [
"8"
],
"var": [
"mode"
]
},
{
"value": [
"32"
],
"var": [
"mode"
]
},
{
"value": [
"90"
],
"var": [
"mode"
]
},
{
"value": [
"108"
],
"var": [
"mode"
]
},
{
"value": [
"115"
],
"var": [
"mode"
]
}
],
"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_31w4b9v8ev.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 mode, 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 mode = input_json["mode"];
clock_t begin = clock();
int returnv = chroma_sub_implemented(mode);
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(mode, returnv);
}
|
master
|
null
|
{"livein": ["mode"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "chroma_sub_implemented", "funargs": ["mode"], "typemap": {"mode": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31w4b9v8ev.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
NutshellySima/cpp/SYSU/matrix-C/Calculate the day.c
|
int leapyear(int year) {
if (year % 400 == 0)
return 1;
else if (year % 4 == 0 && year % 100 != 0)
return 1;
else
return 0;
}
|
int leapyear(intyear)
|
int leapyear(int year)
|
leapyear
|
[
"int",
"int"
] |
{
"code": [
".globl leapyear\n.type leapyear, @function\nleapyear:\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), %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.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tandl\t$3, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L4\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\tje\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 leapyear\n.type leapyear, @function\nleapyear:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$400, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovl\t$1, %eax\n\ttestl\t%edx, %edx\n\tje\t.L1\n\txorl\t%eax, %eax\n\ttestb\t$3, %dil\n\tjne\t.L1\n\tmovl\t%edi, %eax\n\tmovl\t$100, %ecx\n\tcltd\n\tidivl\t%ecx\n\txorl\t%eax, %eax\n\ttestl\t%edx, %edx\n\tsetne\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl leapyear\n.type leapyear, @function\nleapyear:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\timull\t$-1030792151, %edi, %eax\n\tmovl\t$1, %r8d\n\taddl\t$85899344, %eax\n\tmovl\t%eax, %edx\n\trorl\t$4, %edx\n\tcmpl\t$10737418, %edx\n\tjbe\t.L1\n\txorl\t%r8d, %r8d\n\tandl\t$3, %edi\n\tjne\t.L1\n\trorl\t$2, %eax\n\txorl\t%r8d, %r8d\n\tcmpl\t$42949672, %eax\n\tseta\t%r8b\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n",
".global leapyear\n.type leapyear, %function\nleapyear:\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\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.L2\n\tmov\tw0, 1\n\tb\t.L3\n.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\tbeq\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 leapyear\n.type leapyear, %function\nleapyear:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, 400\n\tsdiv\tw1, w0, w2\n\tmsub\tw1, w1, w2, w0\n\tcbz\tw1, .L3\n\ttst\tx0, 3\n\tbne\t.L4\n\tmov\tw2, 100\n\tsdiv\tw1, w0, w2\n\tmsub\tw0, w1, w2, w0\n\tcmp\tw0, 0\n\tcset\tw0, ne\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n.L4:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n",
".global leapyear\n.type leapyear, %function\nleapyear:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw1, 23593\n\tmov\tw3, 47184\n\tmovk\tw3, 0x51e, lsl 16\n\tmovk\tw1, 0xc28f, lsl 16\n\tmov\tw2, 55050\n\tmadd\tw1, w0, w1, w3\n\tmovk\tw2, 0xa3, lsl 16\n\tror\tw3, w1, 4\n\tcmp\tw3, w2\n\tbls\t.L3\n\ttst\tx0, 3\n\tmov\tw0, 0\n\tbne\t.L1\n\tmov\tw0, 23592\n\tror\tw1, w1, 2\n\tmovk\tw0, 0x28f, lsl 16\n\tcmp\tw1, w0\n\tcset\tw0, hi\n.L1:\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 |
#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": [
"9"
],
"var": [
"year"
]
},
{
"value": [
"112"
],
"var": [
"year"
]
},
{
"value": [
"5"
],
"var": [
"year"
]
},
{
"value": [
"4"
],
"var": [
"year"
]
},
{
"value": [
"65"
],
"var": [
"year"
]
},
{
"value": [
"120"
],
"var": [
"year"
]
},
{
"value": [
"11"
],
"var": [
"year"
]
},
{
"value": [
"85"
],
"var": [
"year"
]
},
{
"value": [
"15"
],
"var": [
"year"
]
},
{
"value": [
"14"
],
"var": [
"year"
]
}
],
"output": [
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"1"
],
"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_61od0zydej.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 year, 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 year = input_json["year"];
clock_t begin = clock();
int returnv = leapyear(year);
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(year, returnv);
}
|
master
|
null
|
{"livein": ["year"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "leapyear", "funargs": ["year"], "typemap": {"year": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61od0zydej.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
juangod1/ARQUI-TPE/Userland/SampleCodeModule/mathLib.c
|
int subtract(int x, int y) {
return x - y;
}
|
int subtract(intx, inty)
|
int subtract(int x, int y)
|
subtract
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl subtract\n.type subtract, @function\nsubtract:\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\tsubl\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl subtract\n.type subtract, @function\nsubtract:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl subtract\n.type subtract, @function\nsubtract:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tsubl\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n",
".global subtract\n.type subtract, %function\nsubtract:\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\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 subtract\n.type subtract, %function\nsubtract:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, w1\n\tret\n\t.cfi_endproc\n\n",
".global subtract\n.type subtract, %function\nsubtract:\n.LFB0:\n\t.cfi_startproc\n\tsub\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": [
"73",
"20"
],
"var": [
"x",
"y"
]
},
{
"value": [
"4",
"87"
],
"var": [
"x",
"y"
]
},
{
"value": [
"42",
"108"
],
"var": [
"x",
"y"
]
},
{
"value": [
"3",
"95"
],
"var": [
"x",
"y"
]
},
{
"value": [
"56",
"108"
],
"var": [
"x",
"y"
]
},
{
"value": [
"55",
"63"
],
"var": [
"x",
"y"
]
},
{
"value": [
"11",
"36"
],
"var": [
"x",
"y"
]
},
{
"value": [
"70",
"47"
],
"var": [
"x",
"y"
]
},
{
"value": [
"13",
"97"
],
"var": [
"x",
"y"
]
},
{
"value": [
"116",
"14"
],
"var": [
"x",
"y"
]
}
],
"output": [
{
"value": [
"53"
],
"var": [
"returnv"
]
},
{
"value": [
"-83"
],
"var": [
"returnv"
]
},
{
"value": [
"-66"
],
"var": [
"returnv"
]
},
{
"value": [
"-92"
],
"var": [
"returnv"
]
},
{
"value": [
"-52"
],
"var": [
"returnv"
]
},
{
"value": [
"-8"
],
"var": [
"returnv"
]
},
{
"value": [
"-25"
],
"var": [
"returnv"
]
},
{
"value": [
"23"
],
"var": [
"returnv"
]
},
{
"value": [
"-84"
],
"var": [
"returnv"
]
},
{
"value": [
"102"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_47fiwmwtqs.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 = subtract(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": "subtract", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47fiwmwtqs.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
joa-quim/GMT5SAR/preproc/ERS_preproc/ers_line_fixer/ers_line_fixer.c
|
double calc_swst(unsigned short swst_dn, double pri)
{
return ((double) swst_dn * 210.94e-09 + 9.0 * pri - 6.6E-6);
}
|
double calc_swst(unsigned shortswst_dn, doublepri)
|
double calc_swst(unsigned short swst_dn, double pri)
|
calc_swst
|
[
"double",
"unsigned short",
"double"
] |
{
"code": [
".globl calc_swst\n.type calc_swst, @function\ncalc_swst:\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\tmovsd\t%xmm0, -16(%rbp)\n\tmovw\t%ax, -4(%rbp)\n\tmovzwl\t-4(%rbp), %eax\n\tcvtsi2sdl\t%eax, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovsd\t-16(%rbp), %xmm2\n\tmovsd\t.LC1(%rip), %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t.LC2(%rip), %xmm1\n\tsubsd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t3702710872\n.LC2: \t.long\t798135491\n.LC1: \t.long\t0\n",
".globl calc_swst\n.type calc_swst, @function\ncalc_swst:\n.LFB37:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t.LC1(%rip), %xmm0\n\tmovzwl\t%di, %edi\n\tcvtsi2sdl\t%edi, %xmm1\n\tmulsd\t.LC0(%rip), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tsubsd\t.LC2(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t3702710872\n.LC2: \t.long\t798135491\n.LC1: \t.long\t0\n",
".globl calc_swst\n.type calc_swst, @function\ncalc_swst:\n.LFB54:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t.LC1(%rip), %xmm0\n\tmovzwl\t%di, %edi\n\tpxor\t%xmm1, %xmm1\n\tcvtsi2sdl\t%edi, %xmm1\n\tmulsd\t.LC0(%rip), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tsubsd\t.LC2(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t3702710872\n.LC2: \t.long\t798135491\n.LC1: \t.long\t0\n",
".global calc_swst\n.type calc_swst, %function\ncalc_swst:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrh\tw0, [sp, 14]\n\tstr\td0, [sp]\n\tldrh\tw0, [sp, 14]\n\tucvtf\td0, w0\n\tadrp\tx0, .LC0\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfmul\td1, d0, d1\n\tldr\td2, [sp]\n\tfmov\td0, 9.0e+0\n\tfmul\td0, d2, d0\n\tfadd\td0, d1, d0\n\tadrp\tx0, .LC1\n\tldr\td1, [x0, #:lo12:.LC1]\n\tfsub\td0, d0, d1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t3702710872\n.LC1: \t.word\t798135491\n",
".global calc_swst\n.type calc_swst, %function\ncalc_swst:\n.LFB37:\n\t.cfi_startproc\n\tand\tw0, w0, 65535\n\tfmov\td2, 9.0e+0\n\tucvtf\td1, w0\n\tadrp\tx0, .LC0\n\tfmul\td0, d0, d2\n\tldr\td2, [x0, #:lo12:.LC0]\n\tadrp\tx0, .LC1\n\tfmadd\td0, d1, d2, d0\n\tldr\td1, [x0, #:lo12:.LC1]\n\tfsub\td0, d0, d1\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t3702710872\n.LC1: \t.word\t798135491\n",
".global calc_swst\n.type calc_swst, %function\ncalc_swst:\n.LFB54:\n\t.cfi_startproc\n\tand\tw0, w0, 65535\n\tadrp\tx1, .LC0\n\tfmov\td4, 9.0e+0\n\tucvtf\td1, w0\n\tldr\td3, [x1, #:lo12:.LC0]\n\tfmul\td0, d0, d4\n\tadrp\tx0, .LC1\n\tldr\td2, [x0, #:lo12:.LC1]\n\tfmadd\td0, d1, d3, d0\n\tfsub\td0, d0, d2\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t3702710872\n.LC1: \t.word\t798135491\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 <string.h>
#include <stdint.h>
#include <math.h>
#include <time.h>
#include <fcntl.h>
#include <sys/types.h>
#include <errno.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": [
"284",
"12.1639076036"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"654",
"5.46137965138"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"681",
"54.2813223243"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"763",
"62.713511398"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"806",
"2.21892460533"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"808",
"44.4994999873"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"272",
"59.0206439815"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"502",
"24.698691424"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"537",
"52.9850454133"
],
"var": [
"swst_dn",
"pri"
]
},
{
"value": [
"971",
"61.8702708546"
],
"var": [
"swst_dn",
"pri"
]
}
],
"output": [
{
"value": [
"109.47522173936"
],
"var": [
"returnv"
]
},
{
"value": [
"49.15254821718"
],
"var": [
"returnv"
]
},
{
"value": [
"488.53203796884"
],
"var": [
"returnv"
]
},
{
"value": [
"564.42175692922"
],
"var": [
"returnv"
]
},
{
"value": [
"19.970484865609997"
],
"var": [
"returnv"
]
},
{
"value": [
"400.49566372521997"
],
"var": [
"returnv"
]
},
{
"value": [
"531.18584660918"
],
"var": [
"returnv"
]
},
{
"value": [
"222.28832210788"
],
"var": [
"returnv"
]
},
{
"value": [
"476.86551539448"
],
"var": [
"returnv"
]
},
{
"value": [
"556.83263591414"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_596xhkwuf9.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 short swst_dn, double pri, 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);
unsigned short swst_dn = input_json["swst_dn"];
double pri = input_json["pri"];
clock_t begin = clock();
double returnv = calc_swst(swst_dn, pri);
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(swst_dn, pri, returnv);
}
|
master
|
null
|
{"livein": ["swst_dn", "pri"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "calc_swst", "funargs": ["swst_dn", "pri"], "typemap": {"swst_dn": "uint16", "pri": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_596xhkwuf9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
geekboxzone/mmallow_kernel/drivers/input/touchscreen/gsl_point_id.c
|
int gsl_TouchNear(void)
{
return 0;
}
|
int gsl_TouchNear()
|
int gsl_TouchNear(void)
|
gsl_TouchNear
|
[
"int",
""
] |
{
"code": [
".globl gsl_TouchNear\n.type gsl_TouchNear, @function\ngsl_TouchNear:\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 gsl_TouchNear\n.type gsl_TouchNear, @function\ngsl_TouchNear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl gsl_TouchNear\n.type gsl_TouchNear, @function\ngsl_TouchNear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n",
".global gsl_TouchNear\n.type gsl_TouchNear, %function\ngsl_TouchNear:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global gsl_TouchNear\n.type gsl_TouchNear, %function\ngsl_TouchNear:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n",
".global gsl_TouchNear\n.type gsl_TouchNear, %function\ngsl_TouchNear:\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_62vhc89vup.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 = gsl_TouchNear();
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);
}
|
geekbox
|
null
|
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "gsl_TouchNear", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62vhc89vup.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
littlekernel/newlib/master/libgloss/riscv/semihost-sys_link.c
|
int _link (const char *old_name, const char *new_name)
{
return -1;
}
|
int _link(const char *old_name, const char *new_name)
|
int _link (const char *old_name, const char *new_name)
|
_link
|
[
"int",
"const char *",
"const char *"
] |
{
"code": [
".globl _link\n.type _link, @function\n_link:\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\tmovl\t$-1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n",
".globl _link\n.type _link, @function\n_link:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n",
".globl _link\n.type _link, @function\n_link:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n",
".global _link\n.type _link, %function\n_link:\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\tmov\tw0, -1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n",
".global _link\n.type _link, %function\n_link:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n",
".global _link\n.type _link, %function\n_link:\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": [
"\"stskgcfszida\"",
"\"jcuozeslixzyfpjsit\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"awiakwotizqwjdeyzl\"",
"\"dfwgcntgcokrsokmcp\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"yzkrqizxnjaxvuxil\"",
"\"kiyohzqjphmhmynxlmchv\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"ritptjjy\"",
"\"rasnhgxchovwpe\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"ubgizrkgbmwsgdygotry\"",
"\"kovjyvhsx\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"jkqtqypvjrcrwiipadbpcbojhkspef\"",
"\"os\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"ijdxwguecevkdgiitxrokamuzery\"",
"\"mjogjvyjoch\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"pifc\"",
"\"ligbymvnwfxqj\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"nosaeesmgdghg\"",
"\"envz\""
],
"var": [
"old_name",
"new_name"
]
},
{
"value": [
"\"yqjmjjzaexwtbgxcfmpjygzge\"",
"\"unzvlmvn\""
],
"var": [
"old_name",
"new_name"
]
}
],
"output": [
{
"value": [
"\"jcuozeslixzyfpjsit\"",
"\"stskgcfszida\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"dfwgcntgcokrsokmcp\"",
"\"awiakwotizqwjdeyzl\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"kiyohzqjphmhmynxlmchv\"",
"\"yzkrqizxnjaxvuxil\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"rasnhgxchovwpe\"",
"\"ritptjjy\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"kovjyvhsx\"",
"\"ubgizrkgbmwsgdygotry\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"os\"",
"\"jkqtqypvjrcrwiipadbpcbojhkspef\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"mjogjvyjoch\"",
"\"ijdxwguecevkdgiitxrokamuzery\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"ligbymvnwfxqj\"",
"\"pifc\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"envz\"",
"\"nosaeesmgdghg\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
},
{
"value": [
"\"unzvlmvn\"",
"\"yqjmjjzaexwtbgxcfmpjygzge\"",
"-1"
],
"var": [
"new_name",
"old_name",
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_36qtepwhcm.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* old_name, char* new_name, int returnv) {
json output_json;
output_json["old_name"] = old_name;
output_json["new_name"] = new_name;
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* old_name = strdup(input_json["old_name"].get<std::string>().c_str());
char* new_name = strdup(input_json["new_name"].get<std::string>().c_str());
clock_t begin = clock();
int returnv = _link(old_name, new_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(old_name, new_name, returnv);
}
|
cygwin
|
null
|
{"livein": ["old_name", "new_name"], "liveout": ["old_name", "new_name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "_link", "funargs": ["old_name", "new_name"], "typemap": {"old_name": "string", "new_name": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_36qtepwhcm.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
n-t-roff/DWB3.3/text/troff/n4.c
|
int quant(int n, int m)
{
int i, neg;
neg = 0;
if (n < 0) {
neg++;
n = -n;
}
i = n / m;
if (n - m * i > m / 2)
i += 1;
i *= m;
if (neg)
i = -i;
return(i);
}
|
int quant(intn, intm)
|
int quant(int n, int m)
|
quant
|
[
"int",
"int",
"int"
] |
{
"code": [
".globl quant\n.type quant, @function\nquant:\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$0, -4(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjns\t.L2\n\taddl\t$1, -4(%rbp)\n\tnegl\t-20(%rbp)\n.L2:\n\tmovl\t-20(%rbp), %eax\n\tcltd\n\tidivl\t-24(%rbp)\n\tmovl\t%eax, -8(%rbp)\n\tmovl\t-24(%rbp), %eax\n\timull\t-8(%rbp), %eax\n\tmovl\t-20(%rbp), %edx\n\tsubl\t%eax, %edx\n\tmovl\t-24(%rbp), %eax\n\tmovl\t%eax, %ecx\n\tshrl\t$31, %ecx\n\taddl\t%ecx, %eax\n\tsarl\t%eax\n\tcmpl\t%eax, %edx\n\tjle\t.L3\n\taddl\t$1, -8(%rbp)\n.L3:\n\tmovl\t-8(%rbp), %eax\n\timull\t-24(%rbp), %eax\n\tmovl\t%eax, -8(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tje\t.L4\n\tnegl\t-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 quant\n.type quant, @function\nquant:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n\ttestl\t%edi, %edi\n\tjns\t.L2\n\tnegl\t%edi\n\tmovl\t$1, %ecx\n.L2:\n\tmovl\t%edi, %eax\n\tmovl\t$2, %r8d\n\tcltd\n\tidivl\t%esi\n\tmovl\t%eax, %edi\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %r9d\n\tcltd\n\tidivl\t%r8d\n\tcmpl\t%r9d, %eax\n\tjge\t.L3\n\tincl\t%edi\n.L3:\n\tmovl\t%edi, %eax\n\timull\t%esi, %eax\n\ttestl\t%ecx, %ecx\n\tje\t.L1\n\tnegl\t%eax\n.L1:\n\tret\n\t.cfi_endproc\n\n",
".globl quant\n.type quant, @function\nquant:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %ecx\n\tmovl\t%edi, %eax\n\tshrl\t$31, %ecx\n\taddl\t%esi, %ecx\n\tsarl\t%ecx\n\ttestl\t%edi, %edi\n\tjs\t.L10\n\tcltd\n\tidivl\t%esi\n\tcmpl\t%edx, %ecx\n\tjge\t.L8\n\taddl\t$1, %eax\n.L8:\n\timull\t%esi, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\tnegl\t%eax\n\tcltd\n\tidivl\t%esi\n\tcmpl\t%ecx, %edx\n\tjle\t.L7\n\taddl\t$1, %eax\n.L7:\n\timull\t%eax, %esi\n\tmovl\t%esi, %eax\n\tnegl\t%eax\n\tret\n\t.cfi_endproc\n\n",
".global quant\n.type quant, %function\nquant:\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\tstr\twzr, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbge\t.L2\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tneg\tw0, w0\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tsdiv\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw1, [sp, 8]\n\tldr\tw0, [sp, 24]\n\tmul\tw0, w1, w0\n\tldr\tw1, [sp, 12]\n\tsub\tw1, w1, w0\n\tldr\tw0, [sp, 8]\n\tlsr\tw2, w0, 31\n\tadd\tw0, w2, w0\n\tasr\tw0, w0, 1\n\tcmp\tw1, w0\n\tble\t.L3\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 24]\n.L3:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 8]\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbeq\t.L4\n\tldr\tw0, [sp, 24]\n\tneg\tw0, w0\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 quant\n.type quant, %function\nquant:\n.LFB0:\n\t.cfi_startproc\n\ttbz\tw0, #31, .L5\n\tneg\tw0, w0\n\tmov\tw4, 1\n.L2:\n\tsdiv\tw2, w0, w1\n\tmov\tw3, 2\n\tsdiv\tw3, w1, w3\n\tmsub\tw0, w2, w1, w0\n\tcmp\tw3, w0\n\tcinc\tw2, w2, lt\n\tmul\tw0, w2, w1\n\tcbz\tw4, .L1\n\tneg\tw0, w0\n.L1:\n\tret\n.L5:\n\tmov\tw4, 0\n\tb\t.L2\n\t.cfi_endproc\n\n",
".global quant\n.type quant, %function\nquant:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw2, w1, w1, lsr 31\n\tasr\tw2, w2, 1\n\ttbnz\tw0, #31, .L8\n\tsdiv\tw4, w0, w1\n\tmul\tw3, w4, w1\n\tmadd\tw1, w4, w1, w1\n\tsub\tw0, w0, w3\n\tcmp\tw2, w0\n\tcsel\tw0, w1, w3, lt\n\tret\n\t.p2align 2,,3\n.L8:\n\tneg\tw0, w0\n\tsdiv\tw4, w0, w1\n\tmul\tw3, w4, w1\n\tmadd\tw1, w4, w1, w1\n\tsub\tw0, w0, w3\n\tcmp\tw0, w2\n\tcsel\tw0, w1, w3, gt\n\tneg\tw0, 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": [
"115",
"15"
],
"var": [
"n",
"m"
]
},
{
"value": [
"126",
"70"
],
"var": [
"n",
"m"
]
},
{
"value": [
"112",
"51"
],
"var": [
"n",
"m"
]
},
{
"value": [
"72",
"18"
],
"var": [
"n",
"m"
]
},
{
"value": [
"41",
"53"
],
"var": [
"n",
"m"
]
},
{
"value": [
"112",
"96"
],
"var": [
"n",
"m"
]
},
{
"value": [
"118",
"46"
],
"var": [
"n",
"m"
]
},
{
"value": [
"25",
"112"
],
"var": [
"n",
"m"
]
},
{
"value": [
"7",
"55"
],
"var": [
"n",
"m"
]
},
{
"value": [
"23",
"74"
],
"var": [
"n",
"m"
]
}
],
"output": [
{
"value": [
"120"
],
"var": [
"returnv"
]
},
{
"value": [
"140"
],
"var": [
"returnv"
]
},
{
"value": [
"102"
],
"var": [
"returnv"
]
},
{
"value": [
"72"
],
"var": [
"returnv"
]
},
{
"value": [
"53"
],
"var": [
"returnv"
]
},
{
"value": [
"96"
],
"var": [
"returnv"
]
},
{
"value": [
"138"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
},
{
"value": [
"0"
],
"var": [
"returnv"
]
}
]
}
| null |
extern "C" {
#include "/tmp/pytmpfile_2d0c40262005_339ai5d10y.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 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 n = input_json["n"];
int m = input_json["m"];
clock_t begin = clock();
int returnv = quant(n, 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(n, m, returnv);
}
|
master
|
null
|
{"livein": ["n", "m"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "quant", "funargs": ["n", "m"], "typemap": {"n": "int32", "m": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_339ai5d10y.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.