path
stringlengths
13
163
func_def
stringlengths
17
11.2k
func_head
stringlengths
7
184
func_head_types
stringlengths
7
195
fname
stringlengths
1
43
signature
sequencelengths
2
12
asm
dict
synth_deps
stringclasses
26 values
real_deps
stringlengths
5
418
synth_io_pairs
dict
real_io_pairs
dict
synth_exe_wrapper
stringclasses
44 values
real_exe_wrapper
stringlengths
1.23k
3.24k
ref
stringclasses
39 values
synth_iospec
stringclasses
1 value
real_iospec
stringlengths
266
748
salama/salama/test/bench/c/adds.c
int fibo(int n){ int result; int a = 0; int b = 1; int i = 1; while( i < n ) { result = a + b; a = b; b = result; i++; } return result; }
int fibo(intn)
int fibo(int n)
fibo
[ "int", "int" ]
{ "code": [ ".globl fibo\n.type fibo, @function\nfibo:\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, -12(%rbp)\n\tmovl\t$1, -8(%rbp)\n\tmovl\t$1, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-12(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, -16(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tmovl\t%eax, -12(%rbp)\n\tmovl\t-16(%rbp), %eax\n\tmovl\t%eax, -8(%rbp)\n\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjl\t.L3\n\tmovl\t-16(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fibo\n.type fibo, @function\nfibo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tmovl\t$1, %edx\n\tmovl\t$1, %ecx\n\txorl\t%esi, %esi\n.L2:\n\tcmpl\t%edi, %edx\n\tjge\t.L5\n\tleal\t(%rsi,%rcx), %eax\n\tincl\t%edx\n\tmovl\t%ecx, %esi\n\tmovl\t%eax, %ecx\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n\n", ".globl fibo\n.type fibo, @function\nfibo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\tmovl\t$1, %edx\n\tmovl\t$1, %eax\n\txorl\t%ecx, %ecx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%eax, %esi\n\taddl\t$1, %edx\n\taddl\t%ecx, %eax\n\tmovl\t%esi, %ecx\n\tcmpl\t%edx, %edi\n\tjne\t.L3\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 fibo\n.type fibo, %function\nfibo:\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, 20]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 24]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 24]\n\tadd\tw0, w1, w0\n\tstr\tw0, [sp, 16]\n\tldr\tw0, [sp, 24]\n\tstr\tw0, [sp, 20]\n\tldr\tw0, [sp, 16]\n\tstr\tw0, [sp, 24]\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, 12]\n\tcmp\tw1, w0\n\tblt\t.L3\n\tldr\tw0, [sp, 16]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fibo\n.type fibo, %function\nfibo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, 1\n\tmov\tw3, w1\n\tmov\tw2, w0\n\tmov\tw4, 0\n\tmov\tw0, 0\n.L2:\n\tcmp\tw1, w2\n\tblt\t.L3\n\tret\n.L3:\n\tadd\tw0, w4, w3\n\tadd\tw1, w1, 1\n\tmov\tw4, w3\n\tmov\tw3, w0\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fibo\n.type fibo, %function\nfibo:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw4, w0\n\tcmp\tw0, 1\n\tble\t.L4\n\tmov\tw1, 1\n\tmov\tw0, w1\n\tmov\tw2, 0\n\t.p2align 3,,7\n.L3:\n\tmov\tw3, w0\n\tadd\tw1, w1, 1\n\tadd\tw0, w0, w2\n\tcmp\tw4, w1\n\tmov\tw2, w3\n\tbne\t.L3\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": [ "49" ], "var": [ "n" ] }, { "value": [ "101" ], "var": [ "n" ] }, { "value": [ "92" ], "var": [ "n" ] }, { "value": [ "59" ], "var": [ "n" ] }, { "value": [ "77" ], "var": [ "n" ] }, { "value": [ "83" ], "var": [ "n" ] }, { "value": [ "82" ], "var": [ "n" ] }, { "value": [ "108" ], "var": [ "n" ] }, { "value": [ "16" ], "var": [ "n" ] }, { "value": [ "95" ], "var": [ "n" ] } ], "output": [ { "value": [ "-811192543" ], "var": [ "returnv" ] }, { "value": [ "-1869596475" ], "var": [ "returnv" ] }, { "value": [ "1642909629" ], "var": [ "returnv" ] }, { "value": [ "-1055680967" ], "var": [ "returnv" ] }, { "value": [ "-1036647147" ], "var": [ "returnv" ] }, { "value": [ "2118290601" ], "var": [ "returnv" ] }, { "value": [ "-1230842041" ], "var": [ "returnv" ] }, { "value": [ "-463313648" ], "var": [ "returnv" ] }, { "value": [ "987" ], "var": [ "returnv" ] }, { "value": [ "-1507123775" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42s_6jqmo3.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = fibo(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fibo", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42s_6jqmo3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
mngomane/projects/libft/ft/ctype/srcs/ft_tolower.c
int ft_tolower(int c) { if ((unsigned char)c >= 'A' && (unsigned char)c <= 'Z') return (c - ('M' - 'm')); 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\tmovl\t-4(%rbp), %eax\n\tcmpb\t$64, %al\n\tjbe\t.L2\n\tmovl\t-4(%rbp), %eax\n\tcmpb\t$90, %al\n\tja\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\tcmpb\t$25, %dl\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\tcmpb\t$26, %cl\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\tand\tw0, w0, 255\n\tcmp\tw0, 64\n\tbls\t.L2\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 255\n\tcmp\tw0, 90\n\tbhi\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\tand\tw1, w1, 255\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\tw1, w0, #65\n\tadd\tw2, w0, 32\n\tand\tw1, w1, 255\n\tcmp\tw1, 26\n\tcsel\tw0, w2, 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": [ "111" ], "var": [ "c" ] }, { "value": [ "125" ], "var": [ "c" ] }, { "value": [ "123" ], "var": [ "c" ] }, { "value": [ "117" ], "var": [ "c" ] }, { "value": [ "67" ], "var": [ "c" ] }, { "value": [ "31" ], "var": [ "c" ] }, { "value": [ "5" ], "var": [ "c" ] }, { "value": [ "125" ], "var": [ "c" ] }, { "value": [ "26" ], "var": [ "c" ] }, { "value": [ "52" ], "var": [ "c" ] } ], "output": [ { "value": [ "111" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "123" ], "var": [ "returnv" ] }, { "value": [ "117" ], "var": [ "returnv" ] }, { "value": [ "99" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "125" ], "var": [ "returnv" ] }, { "value": [ "26" ], "var": [ "returnv" ] }, { "value": [ "52" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_59dy_nu8ro.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); }
dev
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ft_tolower", "funargs": ["c"], "typemap": {"c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_59dy_nu8ro.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
clemensv/D2C-RPi-OBDLogger/src/obdinfo/obdconvertfunctions.c
float obdConvert_21 (unsigned int A, unsigned int B, unsigned int C, unsigned int D) { return (float)A*256.0f+(float)B; }
float obdConvert_21(unsigned intA, unsigned intB, unsigned intC, unsigned intD)
float obdConvert_21 (unsigned int A, unsigned int B, unsigned int C, unsigned int D)
obdConvert_21
[ "float", "unsigned int", "unsigned int", "unsigned int", "unsigned int" ]
{ "code": [ ".globl obdConvert_21\n.type obdConvert_21, @function\nobdConvert_21:\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%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", ".globl obdConvert_21\n.type obdConvert_21, @function\nobdConvert_21:\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\tret\n\t.cfi_endproc\n.LC0: \t.long\t1132462080\n", ".globl obdConvert_21\n.type obdConvert_21, @function\nobdConvert_21:\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\tret\n\t.cfi_endproc\n.LC0: \t.long\t1132462080\n", ".global obdConvert_21\n.type obdConvert_21, %function\nobdConvert_21:\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\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global obdConvert_21\n.type obdConvert_21, %function\nobdConvert_21:\n.LFB0:\n\t.cfi_startproc\n\tucvtf\ts0, w0\n\tmov\tw0, 1132462080\n\tfmov\ts2, w0\n\tucvtf\ts1, w1\n\tfmadd\ts0, s0, s2, s1\n\tret\n\t.cfi_endproc\n\n", ".global obdConvert_21\n.type obdConvert_21, %function\nobdConvert_21:\n.LFB0:\n\t.cfi_startproc\n\tucvtf\ts2, w0\n\tmov\tw2, 1132462080\n\tfmov\ts0, w2\n\tucvtf\ts1, w1\n\tfmadd\ts0, s2, s0, s1\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": [ "212213.0" ], "var": [ "returnv" ] }, { "value": [ "172154.0" ], "var": [ "returnv" ] }, { "value": [ "64714.0" ], "var": [ "returnv" ] }, { "value": [ "151902.0" ], "var": [ "returnv" ] }, { "value": [ "101199.0" ], "var": [ "returnv" ] }, { "value": [ "217292.0" ], "var": [ "returnv" ] }, { "value": [ "146492.0" ], "var": [ "returnv" ] }, { "value": [ "223014.0" ], "var": [ "returnv" ] }, { "value": [ "35846.0" ], "var": [ "returnv" ] }, { "value": [ "234146.0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_32hsfmgacc.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_21(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_21", "funargs": ["A", "B", "C", "D"], "typemap": {"A": "uint32", "B": "uint32", "C": "uint32", "D": "uint32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32hsfmgacc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
wmfgrey/numerical/src/sequence.c
double bayes(double probBA, double probA, double probBnotA){ double probNotA, probB, probAB; probNotA = 1.0-probA; probB = ( probBA * probA ) + ( probBnotA * probNotA); probAB = ( probBA * probA ) / probB; return probAB; }
double bayes(doubleprobBA, doubleprobA, doubleprobBnotA)
double bayes(double probBA, double probA, double probBnotA)
bayes
[ "double", "double", "double", "double" ]
{ "code": [ ".globl bayes\n.type bayes, @function\nbayes:\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, -40(%rbp)\n\tmovsd\t%xmm1, -48(%rbp)\n\tmovsd\t%xmm2, -56(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t-48(%rbp), %xmm0\n\tmovsd\t%xmm0, -24(%rbp)\n\tmovsd\t-40(%rbp), %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmulsd\t-48(%rbp), %xmm1\n\tmovsd\t-56(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -16(%rbp)\n\tmovsd\t-40(%rbp), %xmm0\n\tmulsd\t-48(%rbp), %xmm0\n\tdivsd\t-16(%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.LC0: \t.long\t0\n", ".globl bayes\n.type bayes, @function\nbayes:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm0\n\tmovapd\t%xmm1, %xmm3\n\tmovsd\t.LC0(%rip), %xmm1\n\tsubsd\t%xmm3, %xmm1\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t%xmm0, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl bayes\n.type bayes, @function\nbayes:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmulsd\t%xmm1, %xmm0\n\tmovapd\t%xmm1, %xmm3\n\tmovsd\t.LC0(%rip), %xmm1\n\tsubsd\t%xmm3, %xmm1\n\tmulsd\t%xmm2, %xmm1\n\taddsd\t%xmm0, %xmm1\n\tdivsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global bayes\n.type bayes, %function\nbayes:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #64\n\t.cfi_def_cfa_offset 64\n\tstr\td0, [sp, 24]\n\tstr\td1, [sp, 16]\n\tstr\td2, [sp, 8]\n\tfmov\td1, 1.0e+0\n\tldr\td0, [sp, 16]\n\tfsub\td0, d1, d0\n\tstr\td0, [sp, 40]\n\tldr\td1, [sp, 24]\n\tldr\td0, [sp, 16]\n\tfmul\td1, d1, d0\n\tldr\td2, [sp, 8]\n\tldr\td0, [sp, 40]\n\tfmul\td0, d2, d0\n\tfadd\td0, d1, d0\n\tstr\td0, [sp, 48]\n\tldr\td1, [sp, 24]\n\tldr\td0, [sp, 16]\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 48]\n\tfdiv\td0, d1, d0\n\tstr\td0, [sp, 56]\n\tldr\td0, [sp, 56]\n\tadd\tsp, sp, 64\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global bayes\n.type bayes, %function\nbayes:\n.LFB35:\n\t.cfi_startproc\n\tfmov\td3, 1.0e+0\n\tfmul\td0, d1, d0\n\tfsub\td1, d3, d1\n\tfmadd\td1, d1, d2, d0\n\tfdiv\td0, d0, d1\n\tret\n\t.cfi_endproc\n\n", ".global bayes\n.type bayes, %function\nbayes:\n.LFB52:\n\t.cfi_startproc\n\tfmov\td3, 1.0e+0\n\tfmul\td0, d1, d0\n\tfsub\td3, d3, d1\n\tfmadd\td3, d3, d2, d0\n\tfdiv\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 <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <ctype.h> #include <sys/time.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "21.8085601002", "41.6511999203", "49.5927883688" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "88.1246507461", "77.7804728757", "81.321162792" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "55.7051778746", "37.7483658578", "80.3535679106" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "53.739616868", "89.972332516", "74.273174447" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "73.141254061", "67.6765989931", "75.4435688855" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "68.3539937225", "86.3648439572", "41.0309818262" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "86.1391203388", "62.6073797462", "42.6925204541" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "79.1300717969", "37.2379066912", "79.4360526798" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "17.5801137955", "90.7457330511", "98.9163261379" ], "var": [ "probBA", "probA", "probBnotA" ] }, { "value": [ "32.9650588441", "6.06748862743", "11.3899912503" ], "var": [ "probBA", "probA", "probBnotA" ] } ], "output": [ { "value": [ "-0.8200692429866293" ], "var": [ "returnv" ] }, { "value": [ "11.22748677753387" ], "var": [ "returnv" ] }, { "value": [ "-2.473616974934482" ], "var": [ "returnv" ] }, { "value": [ "-2.726785599364782" ], "var": [ "returnv" ] }, { "value": [ "-61.59010065465512" ], "var": [ "returnv" ] }, { "value": [ "2.4589447363611723" ], "var": [ "returnv" ] }, { "value": [ "1.9520061518436915" ], "var": [ "returnv" ] }, { "value": [ "43.30618942506893" ], "var": [ "returnv" ] }, { "value": [ "-0.2190772832353929" ], "var": [ "returnv" ] }, { "value": [ "1.4056225128501385" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_3534qpb05g.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 probBA, double probA, double probBnotA, 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 probBA = input_json["probBA"]; double probA = input_json["probA"]; double probBnotA = input_json["probBnotA"]; clock_t begin = clock(); double returnv = bayes(probBA, probA, probBnotA); 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(probBA, probA, probBnotA, returnv); }
master
null
{"livein": ["probBA", "probA", "probBnotA"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "bayes", "funargs": ["probBA", "probA", "probBnotA"], "typemap": {"probBA": "float64", "probA": "float64", "probBnotA": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_3534qpb05g.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
JingqingZ/ucore_lab/related_info/lab4/some-exercises/call.c
int addtwo(int a) { int x = 2; return a + x; }
int addtwo(inta)
int addtwo(int a)
addtwo
[ "int", "int" ]
{ "code": [ ".globl addtwo\n.type addtwo, @function\naddtwo:\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$2, -4(%rbp)\n\tmovl\t-20(%rbp), %edx\n\tmovl\t-4(%rbp), %eax\n\taddl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl addtwo\n.type addtwo, @function\naddtwo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t2(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl addtwo\n.type addtwo, @function\naddtwo:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t2(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global addtwo\n.type addtwo, %function\naddtwo:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w1, w0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global addtwo\n.type addtwo, %function\naddtwo:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 2\n\tret\n\t.cfi_endproc\n\n", ".global addtwo\n.type addtwo, %function\naddtwo:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 2\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "77" ], "var": [ "a" ] }, { "value": [ "52" ], "var": [ "a" ] }, { "value": [ "93" ], "var": [ "a" ] }, { "value": [ "70" ], "var": [ "a" ] }, { "value": [ "34" ], "var": [ "a" ] }, { "value": [ "101" ], "var": [ "a" ] }, { "value": [ "52" ], "var": [ "a" ] }, { "value": [ "46" ], "var": [ "a" ] }, { "value": [ "114" ], "var": [ "a" ] }, { "value": [ "8" ], "var": [ "a" ] } ], "output": [ { "value": [ "79" ], "var": [ "returnv" ] }, { "value": [ "54" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "54" ], "var": [ "returnv" ] }, { "value": [ "48" ], "var": [ "returnv" ] }, { "value": [ "116" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_49mxkes8ph.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 = addtwo(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": "addtwo", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_49mxkes8ph.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
urmyfaith/roadofios/diary/solveoutlines/stage_test_week1/1418-1419-1420/06.c
int is_start_with_number(const char *str) { if(*str>='0' && *str <= '9') return 1; return 0; }
int is_start_with_number(const char *str)
int is_start_with_number(const char *str)
is_start_with_number
[ "int", "const char *" ]
{ "code": [ ".globl is_start_with_number\n.type is_start_with_number, @function\nis_start_with_number:\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\tmovzbl\t(%rax), %eax\n\tcmpb\t$47, %al\n\tjle\t.L2\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$57, %al\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl is_start_with_number\n.type is_start_with_number, @function\nis_start_with_number:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rdi), %al\n\tsubl\t$48, %eax\n\tcmpb\t$9, %al\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl is_start_with_number\n.type is_start_with_number, @function\nis_start_with_number:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %eax\n\tsubl\t$48, %eax\n\tcmpb\t$9, %al\n\tsetbe\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".global is_start_with_number\n.type is_start_with_number, %function\nis_start_with_number:\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\tldrb\tw0, [x0]\n\tcmp\tw0, 47\n\tbls\t.L2\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbhi\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global is_start_with_number\n.type is_start_with_number, %function\nis_start_with_number:\n.LFB13:\n\t.cfi_startproc\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global is_start_with_number\n.type is_start_with_number, %function\nis_start_with_number:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <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": [ "str" ] }, { "value": [ "\"xxdfrlgenjcbrvhctat\"" ], "var": [ "str" ] }, { "value": [ "\"pcwdkfofycoqzmicmydwnsnkjjvmbwv\"" ], "var": [ "str" ] }, { "value": [ "\"a\"" ], "var": [ "str" ] }, { "value": [ "\"jqntehfpyaxhifbrxwbiq\"" ], "var": [ "str" ] }, { "value": [ "\"tiogbevvcwuhvlcwag\"" ], "var": [ "str" ] }, { "value": [ "\"hr\"" ], "var": [ "str" ] }, { "value": [ "\"vcjenfntwmnwunmr\"" ], "var": [ "str" ] }, { "value": [ "\"lvvytyhaxkc\"" ], "var": [ "str" ] }, { "value": [ "\"uxwbvvlxpodihxswtiakbu\"" ], "var": [ "str" ] } ], "output": [ { "value": [ "0", "\"\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"xxdfrlgenjcbrvhctat\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"pcwdkfofycoqzmicmydwnsnkjjvmbwv\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"a\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"jqntehfpyaxhifbrxwbiq\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"tiogbevvcwuhvlcwag\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"vcjenfntwmnwunmr\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"lvvytyhaxkc\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"uxwbvvlxpodihxswtiakbu\"" ], "var": [ "returnv", "str" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_63q2glbrqw.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 = is_start_with_number(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": "is_start_with_number", "funargs": ["str"], "typemap": {"str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63q2glbrqw.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
holbertonschool/Betty/tests/style/spaces/spaces0.c
int func1(int var, __attribute__((unused))int test) { int t; t = sizeof(var); return (t); }
int func1(intvar, inttest)
int func1(int var, __attribute__((unused))int test)
func1
[ "int", "int", "int" ]
{ "code": [ ".globl func1\n.type func1, @function\nfunc1:\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$4, -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 func1\n.type func1, @function\nfunc1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$4, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl func1\n.type func1, @function\nfunc1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$4, %eax\n\tret\n\t.cfi_endproc\n\n", ".global func1\n.type func1, %function\nfunc1:\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, 4\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global func1\n.type func1, %function\nfunc1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n", ".global func1\n.type func1, %function\nfunc1:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 4\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "71", "91" ], "var": [ "var", "test" ] }, { "value": [ "4", "80" ], "var": [ "var", "test" ] }, { "value": [ "55", "102" ], "var": [ "var", "test" ] }, { "value": [ "61", "124" ], "var": [ "var", "test" ] }, { "value": [ "12", "28" ], "var": [ "var", "test" ] }, { "value": [ "12", "53" ], "var": [ "var", "test" ] }, { "value": [ "47", "30" ], "var": [ "var", "test" ] }, { "value": [ "106", "119" ], "var": [ "var", "test" ] }, { "value": [ "90", "111" ], "var": [ "var", "test" ] }, { "value": [ "0", "83" ], "var": [ "var", "test" ] } ], "output": [ { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_31a2bhp0k4.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 var, int test, 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 var = input_json["var"]; int test = input_json["test"]; clock_t begin = clock(); int returnv = func1(var, test); 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(var, test, returnv); }
master
null
{"livein": ["var", "test"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "func1", "funargs": ["var", "test"], "typemap": {"var": "int32", "test": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31a2bhp0k4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
JonSteinn/Kattis-Solutions/src/Bits/C/main.c
int start_div(int n) { if (n > 999999999) return 1000000000; if (n > 99999999) return 100000000; if (n > 9999999) return 10000000; if (n > 999999) return 1000000; if (n > 99999) return 100000; if (n > 9999) return 10000; if (n > 999) return 1000; if (n > 99) return 100; if (n > 9) return 10; return 1; }
int start_div(intn)
int start_div(int n)
start_div
[ "int", "int" ]
{ "code": [ ".globl start_div\n.type start_div, @function\nstart_div:\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$999999999, -4(%rbp)\n\tjle\t.L2\n\tmovl\t$1000000000, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$99999999, -4(%rbp)\n\tjle\t.L4\n\tmovl\t$100000000, %eax\n\tjmp\t.L3\n.L4:\n\tcmpl\t$9999999, -4(%rbp)\n\tjle\t.L5\n\tmovl\t$10000000, %eax\n\tjmp\t.L3\n.L5:\n\tcmpl\t$999999, -4(%rbp)\n\tjle\t.L6\n\tmovl\t$1000000, %eax\n\tjmp\t.L3\n.L6:\n\tcmpl\t$99999, -4(%rbp)\n\tjle\t.L7\n\tmovl\t$100000, %eax\n\tjmp\t.L3\n.L7:\n\tcmpl\t$9999, -4(%rbp)\n\tjle\t.L8\n\tmovl\t$10000, %eax\n\tjmp\t.L3\n.L8:\n\tcmpl\t$999, -4(%rbp)\n\tjle\t.L9\n\tmovl\t$1000, %eax\n\tjmp\t.L3\n.L9:\n\tcmpl\t$99, -4(%rbp)\n\tjle\t.L10\n\tmovl\t$100, %eax\n\tjmp\t.L3\n.L10:\n\tcmpl\t$9, -4(%rbp)\n\tjle\t.L11\n\tmovl\t$10, %eax\n\tjmp\t.L3\n.L11:\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 start_div\n.type start_div, @function\nstart_div:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1000000000, %eax\n\tcmpl\t$999999999, %edi\n\tjg\t.L1\n\tmovl\t$100000000, %eax\n\tcmpl\t$99999999, %edi\n\tjg\t.L1\n\tmovl\t$10000000, %eax\n\tcmpl\t$9999999, %edi\n\tjg\t.L1\n\tmovl\t$1000000, %eax\n\tcmpl\t$999999, %edi\n\tjg\t.L1\n\tmovl\t$100000, %eax\n\tcmpl\t$99999, %edi\n\tjg\t.L1\n\tmovl\t$10000, %eax\n\tcmpl\t$9999, %edi\n\tjg\t.L1\n\tmovl\t$1000, %eax\n\tcmpl\t$999, %edi\n\tjg\t.L1\n\tmovl\t$100, %eax\n\tcmpl\t$99, %edi\n\tjg\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$10, %edi\n\tsetge\t%al\n\tleal\t1(%rax,%rax,8), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl start_div\n.type start_div, @function\nstart_div:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1000000000, %eax\n\tcmpl\t$999999999, %edi\n\tjg\t.L1\n\tmovl\t$100000000, %eax\n\tcmpl\t$99999999, %edi\n\tjg\t.L1\n\tmovl\t$10000000, %eax\n\tcmpl\t$9999999, %edi\n\tjg\t.L1\n\tmovl\t$1000000, %eax\n\tcmpl\t$999999, %edi\n\tjg\t.L1\n\tmovl\t$100000, %eax\n\tcmpl\t$99999, %edi\n\tjg\t.L1\n\tmovl\t$10000, %eax\n\tcmpl\t$9999, %edi\n\tjg\t.L1\n\tmovl\t$1000, %eax\n\tcmpl\t$999, %edi\n\tjg\t.L1\n\tmovl\t$100, %eax\n\tcmpl\t$99, %edi\n\tjg\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$10, %edi\n\tsetge\t%al\n\tleal\t1(%rax,%rax,8), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global start_div\n.type start_div, %function\nstart_div:\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, 51711\n\tmovk\tw0, 0x3b9a, lsl 16\n\tcmp\tw1, w0\n\tble\t.L2\n\tmov\tw0, 51712\n\tmovk\tw0, 0x3b9a, lsl 16\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 57599\n\tmovk\tw0, 0x5f5, lsl 16\n\tcmp\tw1, w0\n\tble\t.L4\n\tmov\tw0, 57600\n\tmovk\tw0, 0x5f5, lsl 16\n\tb\t.L3\n.L4:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 38527\n\tmovk\tw0, 0x98, lsl 16\n\tcmp\tw1, w0\n\tble\t.L5\n\tmov\tw0, 38528\n\tmovk\tw0, 0x98, lsl 16\n\tb\t.L3\n.L5:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 16959\n\tmovk\tw0, 0xf, lsl 16\n\tcmp\tw1, w0\n\tble\t.L6\n\tmov\tw0, 16960\n\tmovk\tw0, 0xf, lsl 16\n\tb\t.L3\n.L6:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 34463\n\tmovk\tw0, 0x1, lsl 16\n\tcmp\tw1, w0\n\tble\t.L7\n\tmov\tw0, 34464\n\tmovk\tw0, 0x1, lsl 16\n\tb\t.L3\n.L7:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 9999\n\tcmp\tw1, w0\n\tble\t.L8\n\tmov\tw0, 10000\n\tb\t.L3\n.L8:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 999\n\tble\t.L9\n\tmov\tw0, 1000\n\tb\t.L3\n.L9:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 99\n\tble\t.L10\n\tmov\tw0, 100\n\tb\t.L3\n.L10:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 9\n\tble\t.L11\n\tmov\tw0, 10\n\tb\t.L3\n.L11:\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 start_div\n.type start_div, %function\nstart_div:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw1, 51711\n\tmovk\tw1, 0x3b9a, lsl 16\n\tcmp\tw0, w1\n\tbgt\t.L3\n\tmov\tw1, 57599\n\tmovk\tw1, 0x5f5, lsl 16\n\tcmp\tw0, w1\n\tbgt\t.L4\n\tmov\tw1, 38527\n\tmovk\tw1, 0x98, lsl 16\n\tcmp\tw0, w1\n\tbgt\t.L5\n\tmov\tw1, 16959\n\tmovk\tw1, 0xf, lsl 16\n\tcmp\tw0, w1\n\tbgt\t.L6\n\tmov\tw1, 34463\n\tmovk\tw1, 0x1, lsl 16\n\tcmp\tw0, w1\n\tbgt\t.L7\n\tmov\tw1, 9999\n\tcmp\tw0, w1\n\tbgt\t.L8\n\tcmp\tw0, 999\n\tbgt\t.L9\n\tcmp\tw0, 99\n\tbgt\t.L10\n\tcmp\tw0, 10\n\tmov\tw0, 10\n\tcsinc\tw0, w0, wzr, ge\n.L1:\n\tret\n.L3:\n\tmov\tw0, 51712\n\tmovk\tw0, 0x3b9a, lsl 16\n\tb\t.L1\n.L4:\n\tmov\tw0, 57600\n\tmovk\tw0, 0x5f5, lsl 16\n\tb\t.L1\n.L5:\n\tmov\tw0, 38528\n\tmovk\tw0, 0x98, lsl 16\n\tb\t.L1\n.L6:\n\tmov\tw0, 16960\n\tmovk\tw0, 0xf, lsl 16\n\tb\t.L1\n.L7:\n\tmov\tw0, 34464\n\tmovk\tw0, 0x1, lsl 16\n\tb\t.L1\n.L8:\n\tmov\tw0, 10000\n\tb\t.L1\n.L9:\n\tmov\tw0, 1000\n\tb\t.L1\n.L10:\n\tmov\tw0, 100\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global start_div\n.type start_div, %function\nstart_div:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw2, 51711\n\tmov\tw1, w0\n\tmovk\tw2, 0x3b9a, lsl 16\n\tcmp\tw0, w2\n\tbgt\t.L3\n\tmov\tw0, 57599\n\tmovk\tw0, 0x5f5, lsl 16\n\tcmp\tw1, w0\n\tbgt\t.L4\n\tmov\tw0, 38527\n\tmovk\tw0, 0x98, lsl 16\n\tcmp\tw1, w0\n\tbgt\t.L5\n\tmov\tw0, 16959\n\tmovk\tw0, 0xf, lsl 16\n\tcmp\tw1, w0\n\tbgt\t.L6\n\tmov\tw0, 34463\n\tmovk\tw0, 0x1, lsl 16\n\tcmp\tw1, w0\n\tbgt\t.L7\n\tmov\tw2, 9999\n\tmov\tw0, 10000\n\tcmp\tw1, w2\n\tbgt\t.L1\n\tcmp\tw1, 999\n\tmov\tw0, 1000\n\tbgt\t.L1\n\tcmp\tw1, 99\n\tmov\tw0, 100\n\tbgt\t.L1\n\tcmp\tw1, 10\n\tmov\tw0, 10\n\tcsinc\tw0, w0, wzr, ge\n.L1:\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 51712\n\tmovk\tw0, 0x3b9a, lsl 16\n\tret\n\t.p2align 2,,3\n.L5:\n\tmov\tw0, 38528\n\tmovk\tw0, 0x98, lsl 16\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 57600\n\tmovk\tw0, 0x5f5, lsl 16\n\tret\n\t.p2align 2,,3\n.L6:\n\tmov\tw0, 16960\n\tmovk\tw0, 0xf, lsl 16\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 34464\n\tmovk\tw0, 0x1, lsl 16\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "28" ], "var": [ "n" ] }, { "value": [ "5" ], "var": [ "n" ] }, { "value": [ "97" ], "var": [ "n" ] }, { "value": [ "92" ], "var": [ "n" ] }, { "value": [ "81" ], "var": [ "n" ] }, { "value": [ "11" ], "var": [ "n" ] }, { "value": [ "18" ], "var": [ "n" ] }, { "value": [ "4" ], "var": [ "n" ] }, { "value": [ "21" ], "var": [ "n" ] }, { "value": [ "91" ], "var": [ "n" ] } ], "output": [ { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_64946u8nkw.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = start_div(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "start_div", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_64946u8nkw.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
mageec/beebs/src/levenshtein/liblevenshtein.c
int verify_benchmark(int r) { int exp = 122; if (r != exp) return 0; return 1; }
int verify_benchmark(intr)
int verify_benchmark(int r)
verify_benchmark
[ "int", "int" ]
{ "code": [ ".globl verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\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$122, -4(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tcmpl\t-4(%rbp), %eax\n\tje\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$1, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$122, %edi\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$122, %edi\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".global verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 122\n\tstr\tw0, [sp, 28]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 28]\n\tcmp\tw1, w0\n\tbeq\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tmov\tw0, 1\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\n.LFB11:\n\t.cfi_startproc\n\tcmp\tw0, 122\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n", ".global verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\n.LFB11:\n\t.cfi_startproc\n\tcmp\tw0, 122\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 <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": [ "115" ], "var": [ "r" ] }, { "value": [ "75" ], "var": [ "r" ] }, { "value": [ "81" ], "var": [ "r" ] }, { "value": [ "108" ], "var": [ "r" ] }, { "value": [ "21" ], "var": [ "r" ] }, { "value": [ "52" ], "var": [ "r" ] }, { "value": [ "31" ], "var": [ "r" ] }, { "value": [ "20" ], "var": [ "r" ] }, { "value": [ "104" ], "var": [ "r" ] }, { "value": [ "76" ], "var": [ "r" ] } ], "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_42gcg0o9kf.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int r, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int r = input_json["r"]; clock_t begin = clock(); int returnv = verify_benchmark(r); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(r, returnv); }
master
null
{"livein": ["r"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "verify_benchmark", "funargs": ["r"], "typemap": {"r": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42gcg0o9kf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jani-hautamaki/gsim/sundial/src/libsundial/src/sun_time2timeofday.c
long sun_time2timeofday(int hour, int min, int sec) { return ((long) hour)*3600 + ((long) min)*60 + ((long) sec); }
long sun_time2timeofday(inthour, intmin, intsec)
long sun_time2timeofday(int hour, int min, int sec)
sun_time2timeofday
[ "long", "int", "int", "int" ]
{ "code": [ ".globl sun_time2timeofday\n.type sun_time2timeofday, @function\nsun_time2timeofday:\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\tcltq\n\timulq\t$3600, %rax, %rcx\n\tmovl\t-8(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t%rdx, %rax\n\tsalq\t$4, %rax\n\tsubq\t%rdx, %rax\n\tsalq\t$2, %rax\n\tleaq\t(%rcx,%rax), %rdx\n\tmovl\t-12(%rbp), %eax\n\tcltq\n\taddq\t%rdx, %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl sun_time2timeofday\n.type sun_time2timeofday, @function\nsun_time2timeofday:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovslq\t%edi, %rdi\n\tmovslq\t%esi, %rsi\n\tmovslq\t%edx, %rax\n\timulq\t$3600, %rdi, %rdi\n\timulq\t$60, %rsi, %rsi\n\taddq\t%rsi, %rdi\n\taddq\t%rdi, %rax\n\tret\n\t.cfi_endproc\n\n", ".globl sun_time2timeofday\n.type sun_time2timeofday, @function\nsun_time2timeofday:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovslq\t%esi, %rsi\n\tmovslq\t%edi, %rdi\n\tmovslq\t%edx, %rdx\n\timulq\t$3600, %rdi, %rdi\n\tmovq\t%rsi, %rax\n\tsalq\t$4, %rax\n\tsubq\t%rsi, %rax\n\tleaq\t(%rdi,%rax,4), %rax\n\taddq\t%rdx, %rax\n\tret\n\t.cfi_endproc\n\n", ".global sun_time2timeofday\n.type sun_time2timeofday, %function\nsun_time2timeofday:\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\tldrsw\tx1, [sp, 12]\n\tmov\tx0, x1\n\tlsl\tx0, x0, 3\n\tsub\tx0, x0, x1\n\tlsl\tx0, x0, 5\n\tadd\tx0, x0, x1\n\tlsl\tx0, x0, 4\n\tmov\tx2, x0\n\tldrsw\tx1, [sp, 8]\n\tmov\tx0, x1\n\tlsl\tx0, x0, 4\n\tsub\tx0, x0, x1\n\tlsl\tx0, x0, 2\n\tadd\tx1, x2, x0\n\tldrsw\tx0, [sp, 4]\n\tadd\tx0, x1, x0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global sun_time2timeofday\n.type sun_time2timeofday, %function\nsun_time2timeofday:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw3, 60\n\tsmull\tx1, w1, w3\n\tmov\tw3, 3600\n\tsmaddl\tx0, w0, w3, x1\n\tadd\tx0, x0, x2, sxtw\n\tret\n\t.cfi_endproc\n\n", ".global sun_time2timeofday\n.type sun_time2timeofday, %function\nsun_time2timeofday:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw4, 60\n\tmov\tw3, 3600\n\tsmull\tx1, w1, w4\n\tsmaddl\tx0, w0, w3, x1\n\tadd\tx0, x0, x2, sxtw\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "113", "16", "56" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "55", "24", "67" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "46", "23", "122" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "17", "0", "36" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "99", "20", "47" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "53", "109", "11" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "67", "86", "4" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "35", "108", "56" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "52", "18", "87" ], "var": [ "hour", "min", "sec" ] }, { "value": [ "57", "62", "124" ], "var": [ "hour", "min", "sec" ] } ], "output": [ { "value": [ "407816" ], "var": [ "returnv" ] }, { "value": [ "199507" ], "var": [ "returnv" ] }, { "value": [ "167102" ], "var": [ "returnv" ] }, { "value": [ "61236" ], "var": [ "returnv" ] }, { "value": [ "357647" ], "var": [ "returnv" ] }, { "value": [ "197351" ], "var": [ "returnv" ] }, { "value": [ "246364" ], "var": [ "returnv" ] }, { "value": [ "132536" ], "var": [ "returnv" ] }, { "value": [ "188367" ], "var": [ "returnv" ] }, { "value": [ "209044" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_39ai__ydmk.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 hour, int min, int sec, long int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int hour = input_json["hour"]; int min = input_json["min"]; int sec = input_json["sec"]; clock_t begin = clock(); long int returnv = sun_time2timeofday(hour, min, sec); 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(hour, min, sec, returnv); }
master
null
{"livein": ["hour", "min", "sec"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sun_time2timeofday", "funargs": ["hour", "min", "sec"], "typemap": {"hour": "int32", "min": "int32", "sec": "int32", "returnv": "int64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_39ai__ydmk.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jassam/falab/src/project/falabaac/libfalabaac/fa_aacstream.c
int fa_bits_sideinfo_est(int chn_num) { int bits; # 283 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/jassam/falab/refs/heads/master/src/project/falabaac/libfalabaac/fa_aacstream.c" bits = 64/chn_num; return bits; }
int fa_bits_sideinfo_est(intchn_num)
int fa_bits_sideinfo_est(int chn_num)
fa_bits_sideinfo_est
[ "int", "int" ]
{ "code": [ ".globl fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, @function\nfa_bits_sideinfo_est:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$64, %eax\n\tcltd\n\tidivl\t-20(%rbp)\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, @function\nfa_bits_sideinfo_est:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$64, %eax\n\tcltd\n\tidivl\t%edi\n\tret\n\t.cfi_endproc\n\n", ".globl fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, @function\nfa_bits_sideinfo_est:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$64, %eax\n\tcltd\n\tidivl\t%edi\n\tret\n\t.cfi_endproc\n\n", ".global fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, %function\nfa_bits_sideinfo_est:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw1, 64\n\tldr\tw0, [sp, 12]\n\tsdiv\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, %function\nfa_bits_sideinfo_est:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw1, 64\n\tsdiv\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n", ".global fa_bits_sideinfo_est\n.type fa_bits_sideinfo_est, %function\nfa_bits_sideinfo_est:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw1, 64\n\tsdiv\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "46" ], "var": [ "chn_num" ] }, { "value": [ "72" ], "var": [ "chn_num" ] }, { "value": [ "106" ], "var": [ "chn_num" ] }, { "value": [ "87" ], "var": [ "chn_num" ] }, { "value": [ "69" ], "var": [ "chn_num" ] }, { "value": [ "84" ], "var": [ "chn_num" ] }, { "value": [ "89" ], "var": [ "chn_num" ] }, { "value": [ "57" ], "var": [ "chn_num" ] }, { "value": [ "89" ], "var": [ "chn_num" ] }, { "value": [ "25" ], "var": [ "chn_num" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54vgo82ryf.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 chn_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 chn_num = input_json["chn_num"]; clock_t begin = clock(); int returnv = fa_bits_sideinfo_est(chn_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(chn_num, returnv); }
master
null
{"livein": ["chn_num"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fa_bits_sideinfo_est", "funargs": ["chn_num"], "typemap": {"chn_num": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54vgo82ryf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LucianoFaretra/Esercizi-Svolti-Pearson-IL-LINGUAGGIO-C/Esercizi Pearson/Capitolo 5/Es 5.25 pag. 212/esercizi.c
float minimoDiDueNumeri( float numero1, float numero2 ) { if( numero1 > numero2 ){ return numero1; } else{ return numero2; } }
float minimoDiDueNumeri(floatnumero1, floatnumero2)
float minimoDiDueNumeri( float numero1, float numero2 )
minimoDiDueNumeri
[ "float", "float", "float" ]
{ "code": [ ".globl minimoDiDueNumeri\n.type minimoDiDueNumeri, @function\nminimoDiDueNumeri:\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\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t%xmm1, -8(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tcomiss\t-8(%rbp), %xmm0\n\tjbe\t.L6\n\tmovss\t-4(%rbp), %xmm0\n\tjmp\t.L4\n.L6:\n\tmovss\t-8(%rbp), %xmm0\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl minimoDiDueNumeri\n.type minimoDiDueNumeri, @function\nminimoDiDueNumeri:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmaxss\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl minimoDiDueNumeri\n.type minimoDiDueNumeri, @function\nminimoDiDueNumeri:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmaxss\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global minimoDiDueNumeri\n.type minimoDiDueNumeri, %function\nminimoDiDueNumeri:\n.LFB6:\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\tldr\ts1, [sp, 12]\n\tldr\ts0, [sp, 8]\n\tfcmpe\ts1, s0\n\tble\t.L6\n\tldr\ts0, [sp, 12]\n\tb\t.L4\n.L6:\n\tldr\ts0, [sp, 8]\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global minimoDiDueNumeri\n.type minimoDiDueNumeri, %function\nminimoDiDueNumeri:\n.LFB24:\n\t.cfi_startproc\n\tfcmpe\ts0, s1\n\tfcsel\ts0, s0, s1, gt\n\tret\n\t.cfi_endproc\n\n", ".global minimoDiDueNumeri\n.type minimoDiDueNumeri, %function\nminimoDiDueNumeri:\n.LFB39:\n\t.cfi_startproc\n\tfcmpe\ts0, s1\n\tfcsel\ts0, s0, s1, gt\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "85.1802189184", "2.07664922194" ], "var": [ "numero1", "numero2" ] }, { "value": [ "55.4964932581", "22.7569602599" ], "var": [ "numero1", "numero2" ] }, { "value": [ "40.2824094703", "25.3531578974" ], "var": [ "numero1", "numero2" ] }, { "value": [ "83.4252886725", "73.4212590556" ], "var": [ "numero1", "numero2" ] }, { "value": [ "68.4730439563", "56.4214774837" ], "var": [ "numero1", "numero2" ] }, { "value": [ "83.8560658149", "63.0721099937" ], "var": [ "numero1", "numero2" ] }, { "value": [ "89.2685884671", "0.0221561662229" ], "var": [ "numero1", "numero2" ] }, { "value": [ "15.8924627363", "77.0829865578" ], "var": [ "numero1", "numero2" ] }, { "value": [ "7.56717509994", "78.3716572239" ], "var": [ "numero1", "numero2" ] }, { "value": [ "50.7054155834", "57.4362040288" ], "var": [ "numero1", "numero2" ] } ], "output": [ { "value": [ "85.18022155761719" ], "var": [ "returnv" ] }, { "value": [ "55.49649429321289" ], "var": [ "returnv" ] }, { "value": [ "40.28240966796875" ], "var": [ "returnv" ] }, { "value": [ "83.42528533935547" ], "var": [ "returnv" ] }, { "value": [ "68.4730453491211" ], "var": [ "returnv" ] }, { "value": [ "83.85606384277344" ], "var": [ "returnv" ] }, { "value": [ "89.26858520507812" ], "var": [ "returnv" ] }, { "value": [ "77.0829849243164" ], "var": [ "returnv" ] }, { "value": [ "78.37165832519531" ], "var": [ "returnv" ] }, { "value": [ "57.43620300292969" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46u9xbw4im.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 numero1, float numero2, 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 numero1 = input_json["numero1"]; float numero2 = input_json["numero2"]; clock_t begin = clock(); float returnv = minimoDiDueNumeri(numero1, numero2); 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(numero1, numero2, returnv); }
master
null
{"livein": ["numero1", "numero2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "minimoDiDueNumeri", "funargs": ["numero1", "numero2"], "typemap": {"numero1": "float32", "numero2": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46u9xbw4im.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
robbertkrebbers/ch2o/tests/defined/recursion.c
int id(int x) { if (x == 0) return 0; else return 1 + id(x - 1); }
int id(intx)
int id(int x)
id
[ "int", "int" ]
{ "code": [ ".globl id\n.type id, @function\nid:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, %edi\n\tcall\tid\n\taddl\t$1, %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl id\n.type id, @function\nid:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl id\n.type id, @function\nid:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global id\n.type id, %function\nid:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tsub\tw0, w0, #1\n\tbl\tid\n\tadd\tw0, w0, 1\n.L3:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global id\n.type id, %function\nid:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global id\n.type id, %function\nid:\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": [ "56" ], "var": [ "x" ] }, { "value": [ "107" ], "var": [ "x" ] }, { "value": [ "62" ], "var": [ "x" ] }, { "value": [ "35" ], "var": [ "x" ] }, { "value": [ "70" ], "var": [ "x" ] }, { "value": [ "28" ], "var": [ "x" ] }, { "value": [ "121" ], "var": [ "x" ] }, { "value": [ "13" ], "var": [ "x" ] }, { "value": [ "84" ], "var": [ "x" ] }, { "value": [ "29" ], "var": [ "x" ] } ], "output": [ { "value": [ "56" ], "var": [ "returnv" ] }, { "value": [ "107" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] }, { "value": [ "35" ], "var": [ "returnv" ] }, { "value": [ "70" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "13" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_5730g9evs_.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 = 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": "id", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_5730g9evs_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
brouhaha/tapeutils/read20.c
int t2uprot (unsigned int prot) { register unsigned tprot, uprot; register int tshift; # 634 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/brouhaha/tapeutils/refs/heads/master/read20.c" { for (tshift=12, uprot=0; tshift >= 0; tshift -= 6) { tprot = prot >> tshift; uprot <<= 3; uprot |= (tprot >> 3) & 07; } } return uprot; }
int t2uprot(unsigned intprot)
int t2uprot (unsigned int prot)
t2uprot
[ "int", "unsigned int" ]
{ "code": [ ".globl t2uprot\n.type t2uprot, @function\nt2uprot:\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\tpushq\t%r13\n\tpushq\t%r12\n\tpushq\t%rbx\n\t.cfi_offset 13, -24\n\t.cfi_offset 12, -32\n\t.cfi_offset 3, -40\n\tmovl\t%edi, -28(%rbp)\n\tmovl\t$12, %r12d\n\tmovl\t$0, %ebx\n\tjmp\t.L2\n.L3:\n\tmovl\t-28(%rbp), %eax\n\tmovl\t%r12d, %ecx\n\tshrl\t%cl, %eax\n\tmovl\t%eax, %r13d\n\tsall\t$3, %ebx\n\tmovl\t%r13d, %eax\n\tshrl\t$3, %eax\n\tandl\t$7, %eax\n\torl\t%eax, %ebx\n\tsubl\t$6, %r12d\n.L2:\n\ttestl\t%r12d, %r12d\n\tjns\t.L3\n\tmovl\t%ebx, %eax\n\tpopq\t%rbx\n\tpopq\t%r12\n\tpopq\t%r13\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl t2uprot\n.type t2uprot, @function\nt2uprot:\n.LFB48:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$12, %ecx\n\txorl\t%eax, %eax\n.L2:\n\tmovl\t%edi, %edx\n\tsall\t$3, %eax\n\tshrl\t%cl, %edx\n\tsubl\t$6, %ecx\n\tshrl\t$3, %edx\n\tandl\t$7, %edx\n\torl\t%edx, %eax\n\tcmpl\t$-6, %ecx\n\tjne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".globl t2uprot\n.type t2uprot, @function\nt2uprot:\n.LFB71:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t%edi, %eax\n\tshrl\t$12, %edx\n\tshrl\t$9, %eax\n\tandl\t$56, %edx\n\tandl\t$7, %eax\n\torl\t%edx, %eax\n\tleal\t0(,%rax,8), %edx\n\tmovl\t%edi, %eax\n\tshrl\t$3, %eax\n\tandl\t$7, %eax\n\torl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global t2uprot\n.type t2uprot, %function\nt2uprot:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx19, x20, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 19, -48\n\t.cfi_offset 20, -40\n\tstr\tx21, [sp, 16]\n\t.cfi_offset 21, -32\n\tstr\tw0, [sp, 44]\n\tmov\tw19, 12\n\tmov\tw20, 0\n\tb\t.L2\n.L3:\n\tldr\tw0, [sp, 44]\n\tlsr\tw21, w0, w19\n\tlsl\tw20, w20, 3\n\tlsr\tw0, w21, 3\n\tand\tw0, w0, 7\n\torr\tw20, w20, w0\n\tsub\tw19, w19, #6\n.L2:\n\tcmp\tw19, 0\n\tbge\t.L3\n\tmov\tw0, w20\n\tldr\tx21, [sp, 16]\n\tldp\tx19, x20, [sp], 48\n\t.cfi_restore 20\n\t.cfi_restore 19\n\t.cfi_restore 21\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global t2uprot\n.type t2uprot, %function\nt2uprot:\n.LFB48:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tmov\tw1, 12\n\tmov\tw0, 0\n.L2:\n\tlsr\tw2, w3, w1\n\tsub\tw1, w1, #6\n\tubfx\tx2, x2, 3, 3\n\tcmn\tw1, #6\n\torr\tw0, w2, w0, lsl 3\n\tbne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".global t2uprot\n.type t2uprot, %function\nt2uprot:\n.LFB71:\n\t.cfi_startproc\n\tlsr\tw2, w0, 15\n\tubfx\tx1, x0, 9, 3\n\tubfx\tx0, x0, 3, 3\n\tubfiz\tw2, w2, 3, 3\n\torr\tw1, w1, w2\n\torr\tw0, w0, w1, lsl 3\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #include <stdarg.h> #include <ctype.h> #include <sys/types.h> #include <sys/stat.h> #include <utime.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <regex.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": [ "405" ], "var": [ "prot" ] }, { "value": [ "524" ], "var": [ "prot" ] }, { "value": [ "577" ], "var": [ "prot" ] }, { "value": [ "314" ], "var": [ "prot" ] }, { "value": [ "37" ], "var": [ "prot" ] }, { "value": [ "314" ], "var": [ "prot" ] }, { "value": [ "518" ], "var": [ "prot" ] }, { "value": [ "170" ], "var": [ "prot" ] }, { "value": [ "366" ], "var": [ "prot" ] }, { "value": [ "279" ], "var": [ "prot" ] } ], "output": [ { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "9" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_52fyfl_xo3.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 prot, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int prot = input_json["prot"]; clock_t begin = clock(); int returnv = t2uprot(prot); 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(prot, returnv); }
master
null
{"livein": ["prot"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "t2uprot", "funargs": ["prot"], "typemap": {"prot": "uint32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_52fyfl_xo3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
stevedonovan/Lake/examples/big1/c055.c
int c055(void) { return 0; }
int c055()
int c055(void)
c055
[ "int", "" ]
{ "code": [ ".globl c055\n.type c055, @function\nc055:\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 c055\n.type c055, @function\nc055:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl c055\n.type c055, @function\nc055:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global c055\n.type c055, %function\nc055:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c055\n.type c055, %function\nc055:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c055\n.type c055, %function\nc055:\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_33qp1h6zyf.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 = c055(); 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": "c055", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33qp1h6zyf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
gmarkall/beebs/src/main.c
int verify_benchmark(int unused) { return -1; }
int verify_benchmark(intunused)
int verify_benchmark(int unused)
verify_benchmark
[ "int", "int" ]
{ "code": [ ".globl verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\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 verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl verify_benchmark\n.type verify_benchmark, @function\nverify_benchmark:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\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 verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global verify_benchmark\n.type verify_benchmark, %function\nverify_benchmark:\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": [ "121" ], "var": [ "unused" ] }, { "value": [ "100" ], "var": [ "unused" ] }, { "value": [ "118" ], "var": [ "unused" ] }, { "value": [ "42" ], "var": [ "unused" ] }, { "value": [ "14" ], "var": [ "unused" ] }, { "value": [ "90" ], "var": [ "unused" ] }, { "value": [ "37" ], "var": [ "unused" ] }, { "value": [ "39" ], "var": [ "unused" ] }, { "value": [ "52" ], "var": [ "unused" ] }, { "value": [ "23" ], "var": [ "unused" ] } ], "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_33xejcexfc.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 unused, 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 unused = input_json["unused"]; clock_t begin = clock(); int returnv = verify_benchmark(unused); 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(unused, returnv); }
master
null
{"livein": ["unused"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "verify_benchmark", "funargs": ["unused"], "typemap": {"unused": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33xejcexfc.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
HongliYu/firefox-ios/ThirdParty/SQLiteLib/sqlite/ext/lsm1/lsm_main.c
int lsmErrorBkpt(int rc){ return rc; }
int lsmErrorBkpt(intrc)
int lsmErrorBkpt(int rc)
lsmErrorBkpt
[ "int", "int" ]
{ "code": [ ".globl lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\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 lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\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 lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lsmErrorBkpt\n.type lsmErrorBkpt, @function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\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 lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\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 lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global lsmErrorBkpt\n.type lsmErrorBkpt, %function\nlsmErrorBkpt:\n.LFB0:\n\t.cfi_startproc\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": [ "47" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "95" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "100" ], "var": [ "rc" ] }, { "value": [ "90" ], "var": [ "rc" ] }, { "value": [ "8" ], "var": [ "rc" ] }, { "value": [ "15" ], "var": [ "rc" ] }, { "value": [ "47" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "95" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "100" ], "var": [ "rc" ] }, { "value": [ "90" ], "var": [ "rc" ] }, { "value": [ "8" ], "var": [ "rc" ] }, { "value": [ "15" ], "var": [ "rc" ] }, { "value": [ "47" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "95" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "100" ], "var": [ "rc" ] }, { "value": [ "90" ], "var": [ "rc" ] }, { "value": [ "8" ], "var": [ "rc" ] }, { "value": [ "15" ], "var": [ "rc" ] } ], "output": [ { "value": [ "47" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "90" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] }, { "value": [ "47" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "90" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] }, { "value": [ "47" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "90" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "15" ], "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": [ "47" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "95" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "24" ], "var": [ "rc" ] }, { "value": [ "74" ], "var": [ "rc" ] }, { "value": [ "100" ], "var": [ "rc" ] }, { "value": [ "90" ], "var": [ "rc" ] }, { "value": [ "8" ], "var": [ "rc" ] }, { "value": [ "15" ], "var": [ "rc" ] } ], "output": [ { "value": [ "47" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "90" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "15" ], "var": [ "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577725fpu9rxvl.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 rc, 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 rc = input_json["rc"]; clock_t begin = clock(); int returnv = lsmErrorBkpt(rc); 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(rc, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58gww_qgat.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 rc, 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 rc = input_json["rc"]; clock_t begin = clock(); int returnv = lsmErrorBkpt(rc); 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(rc, returnv); }
master
null
{"livein": ["rc"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "lsmErrorBkpt", "funargs": ["rc"], "typemap": {"rc": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58gww_qgat.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
netguy204/cmsc313_examples/midterm_code/count.c
int char_count(char* haystack, char needle) { int count = 0; for(char* str = haystack; *str != '\0'; str++) { if(*str == needle) { count++; } } return count; }
int char_count(char *haystack, charneedle)
int char_count(char* haystack, char needle)
char_count
[ "int", "char *", "char" ]
{ "code": [ ".globl char_count\n.type char_count, @function\nchar_count:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, %eax\n\tmovb\t%al, -28(%rbp)\n\tmovl\t$0, -12(%rbp)\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -28(%rbp)\n\tjne\t.L3\n\taddl\t$1, -12(%rbp)\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.L4\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 char_count\n.type char_count, @function\nchar_count:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L2:\n\tmovb\t(%rdi), %dl\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tcmpb\t%sil, %dl\n\tjne\t.L3\n\tincl\t%eax\n.L3:\n\tincq\t%rdi\n\tjmp\t.L2\n.L6:\n\tret\n\t.cfi_endproc\n\n", ".globl char_count\n.type char_count, @function\nchar_count:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %eax\n\txorl\t%r8d, %r8d\n\ttestb\t%al, %al\n\tje\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tcmpb\t%sil, %al\n\tsete\t%al\n\taddq\t$1, %rdi\n\tmovzbl\t%al, %eax\n\taddl\t%eax, %r8d\n\tmovzbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L4\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global char_count\n.type char_count, %function\nchar_count:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstrb\tw1, [sp, 7]\n\tstr\twzr, [sp, 20]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L4:\n\tldr\tx0, [sp, 24]\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 7]\n\tcmp\tw1, w0\n\tbne\t.L3\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n.L3:\n\tldr\tx0, [sp, 24]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 24]\n.L2:\n\tldr\tx0, [sp, 24]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L4\n\tldr\tw0, [sp, 20]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global char_count\n.type char_count, %function\nchar_count:\n.LFB13:\n\t.cfi_startproc\n\tand\tw1, w1, 255\n\tmov\tx2, x0\n\tmov\tw0, 0\n.L2:\n\tldrb\tw3, [x2]\n\tcbnz\tw3, .L4\n\tret\n.L4:\n\tcmp\tw3, w1\n\tadd\tx2, x2, 1\n\tcinc\tw0, w0, eq\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global char_count\n.type char_count, %function\nchar_count:\n.LFB23:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tmov\tx3, x0\n\tand\tw1, w1, 255\n\tmov\tw0, 0\n\tcbz\tw2, .L1\n\t.p2align 3,,7\n.L4:\n\tcmp\tw2, w1\n\tldrb\tw2, [x3, 1]!\n\tcinc\tw0, w0, eq\n\tcbnz\tw2, .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
#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" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"zowusgubwwcfthvnzmbkuyxyn\"", "91" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"vcemykcieprjsgvba\"", "73" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"bnxjcrwjrqghjiiazoizzxucoeatwdo\"", "37" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"uwu\"", "123" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"v\"", "32" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"oetbilu\"", "23" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"iikdcpwbsbkszddlf\"", "126" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"lyozr\"", "124" ], "var": [ "haystack", "needle" ] }, { "value": [ "\"zjhugerxzkcksarpstkemvy\"", "72" ], "var": [ "haystack", "needle" ] } ], "output": [ { "value": [ "\"\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"zowusgubwwcfthvnzmbkuyxyn\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"vcemykcieprjsgvba\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"bnxjcrwjrqghjiiazoizzxucoeatwdo\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"uwu\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"v\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"oetbilu\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"iikdcpwbsbkszddlf\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"lyozr\"", "0" ], "var": [ "haystack", "returnv" ] }, { "value": [ "\"zjhugerxzkcksarpstkemvy\"", "0" ], "var": [ "haystack", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_626p3cqvb1.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* haystack, char needle, int returnv) { json output_json; output_json["haystack"] = haystack; 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* haystack = strdup(input_json["haystack"].get<std::string>().c_str()); char needle = input_json["needle"].get<char>(); clock_t begin = clock(); int returnv = char_count(haystack, needle); 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(haystack, needle, returnv); }
master
null
{"livein": ["haystack", "needle"], "liveout": ["haystack"], "returnvarname": ["returnv"], "execcmd": "", "funname": "char_count", "funargs": ["haystack", "needle"], "typemap": {"haystack": "string", "needle": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_626p3cqvb1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LuccoJ/z80sim/z80dev/ljlos/strings.c
unsigned int Mod(unsigned int Dividend, unsigned int Divisor) { unsigned int Temp; Temp=Dividend; while(Temp>=Divisor) { Temp-=Divisor; } return Temp; }
unsigned int Mod(unsigned intDividend, unsigned intDivisor)
unsigned int Mod(unsigned int Dividend, unsigned int Divisor)
Mod
[ "unsigned int", "unsigned int", "unsigned int" ]
{ "code": [ ".globl Mod\n.type Mod, @function\nMod:\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, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-24(%rbp), %eax\n\tsubl\t%eax, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjnb\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 Mod\n.type Mod, @function\nMod:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n.L2:\n\tcmpl\t%esi, %eax\n\tjb\t.L5\n\tsubl\t%esi, %eax\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n\n", ".globl Mod\n.type Mod, @function\nMod:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tcmpl\t%esi, %edi\n\tjb\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tsubl\t%esi, %eax\n\tcmpl\t%eax, %esi\n\tjbe\t.L3\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".global Mod\n.type Mod, %function\nMod:\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, 28]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n.L2:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbcs\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 Mod\n.type Mod, %function\nMod:\n.LFB0:\n\t.cfi_startproc\n.L2:\n\tcmp\tw0, w1\n\tbcs\t.L3\n\tret\n.L3:\n\tsub\tw0, w0, w1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global Mod\n.type Mod, %function\nMod:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tbcc\t.L2\n\t.p2align 3,,7\n.L3:\n\tsub\tw0, w0, w1\n\tcmp\tw1, w0\n\tbls\t.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": [ "68", "918" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "343", "996" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "97", "334" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "896", "210" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "740", "122" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "461", "170" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "374", "68" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "220", "861" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "598", "849" ], "var": [ "Dividend", "Divisor" ] }, { "value": [ "161", "123" ], "var": [ "Dividend", "Divisor" ] } ], "output": [ { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "343" ], "var": [ "returnv" ] }, { "value": [ "97" ], "var": [ "returnv" ] }, { "value": [ "56" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "220" ], "var": [ "returnv" ] }, { "value": [ "598" ], "var": [ "returnv" ] }, { "value": [ "38" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_42azegme5f.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 Dividend, unsigned int Divisor, unsigned int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); unsigned int Dividend = input_json["Dividend"]; unsigned int Divisor = input_json["Divisor"]; clock_t begin = clock(); unsigned int returnv = Mod(Dividend, Divisor); 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(Dividend, Divisor, returnv); }
master
null
{"livein": ["Dividend", "Divisor"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "Mod", "funargs": ["Dividend", "Divisor"], "typemap": {"Dividend": "uint32", "Divisor": "uint32", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_42azegme5f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Lindem-Data-Acquisition-AS/TM4C129-discontinued/FreeRTOSKeil/FreeRTOSv9.0.0/FreeRTOS/Demo/CORTEX_M4F_ATSAM4E_Atmel_Studio/src/ASF/sam/utils/syscalls/gcc/syscalls.c
extern int _isatty(int file) { ( void ) file; return 1; }
int _isatty(intfile)
extern int _isatty(int file)
_isatty
[ "int", "int" ]
{ "code": [ ".globl _isatty\n.type _isatty, @function\n_isatty:\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$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.LFB19:\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.LFB35:\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.LFB6:\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.LFB19:\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.LFB35:\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 <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": [ "82" ], "var": [ "file" ] }, { "value": [ "39" ], "var": [ "file" ] }, { "value": [ "33" ], "var": [ "file" ] }, { "value": [ "34" ], "var": [ "file" ] }, { "value": [ "44" ], "var": [ "file" ] }, { "value": [ "76" ], "var": [ "file" ] }, { "value": [ "113" ], "var": [ "file" ] }, { "value": [ "100" ], "var": [ "file" ] }, { "value": [ "71" ], "var": [ "file" ] }, { "value": [ "54" ], "var": [ "file" ] } ], "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_426sd07eye.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_426sd07eye.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
junaart/High-Programming/Tasks/Task_3/Rogdestvenskiy/task5_7.c
int invers(int n){ int invN = 0; while (n>0){ invN = invN*10 + n%10; n/=10; } return invN; }
int invers(intn)
int invers(int n)
invers
[ "int", "int" ]
{ "code": [ ".globl invers\n.type invers, @function\ninvers:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-4(%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, %esi\n\tmovl\t-20(%rbp), %ecx\n\tmovslq\t%ecx, %rax\n\timulq\t$1717986919, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %edx\n\tsarl\t$2, %edx\n\tmovl\t%ecx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tsall\t$2, %eax\n\taddl\t%edx, %eax\n\taddl\t%eax, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %edx\n\tleal\t(%rsi,%rdx), %eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\timulq\t$1717986919, %rdx, %rdx\n\tshrq\t$32, %rdx\n\tsarl\t$2, %edx\n\tsarl\t$31, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, -20(%rbp)\n.L2:\n\tcmpl\t$0, -20(%rbp)\n\tjg\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 invers\n.type invers, @function\ninvers:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\txorl\t%r8d, %r8d\n\tmovl\t$10, %ecx\n.L2:\n\ttestl\t%eax, %eax\n\tjle\t.L5\n\tcltd\n\timull\t$10, %r8d, %r8d\n\tidivl\t%ecx\n\taddl\t%edx, %r8d\n\tjmp\t.L2\n.L5:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl invers\n.type invers, @function\ninvers:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%r8d, %r8d\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\tmovl\t$3435973837, %esi\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%edi, %eax\n\tmovl\t%edi, %r9d\n\tleal\t(%r8,%r8,4), %ecx\n\timulq\t%rsi, %rax\n\tshrq\t$35, %rax\n\tleal\t(%rax,%rax,4), %edx\n\taddl\t%edx, %edx\n\tsubl\t%edx, %r9d\n\tmovl\t%edi, %edx\n\tmovl\t%eax, %edi\n\tleal\t(%r9,%rcx,2), %r8d\n\tcmpl\t$9, %edx\n\tjg\t.L3\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global invers\n.type invers, %function\ninvers:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 28]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w1\n\tlsl\tw0, w0, 1\n\tmov\tw3, w0\n\tldr\tw2, [sp, 12]\n\tmov\tw0, 26215\n\tmovk\tw0, 0x6666, lsl 16\n\tsmull\tx0, w2, w0\n\tlsr\tx0, x0, 32\n\tasr\tw1, w0, 2\n\tasr\tw0, w2, 31\n\tsub\tw1, w1, w0\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w1\n\tlsl\tw0, w0, 1\n\tsub\tw1, w2, w0\n\tadd\tw0, w3, w1\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tmov\tw1, 26215\n\tmovk\tw1, 0x6666, lsl 16\n\tsmull\tx1, w0, w1\n\tlsr\tx1, x1, 32\n\tasr\tw1, w1, 2\n\tasr\tw0, w0, 31\n\tsub\tw0, w1, w0\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbgt\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 invers\n.type invers, %function\ninvers:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw2, 10\n\tmov\tw0, 0\n.L2:\n\tcmp\tw1, 0\n\tbgt\t.L3\n\tret\n.L3:\n\tsdiv\tw3, w1, w2\n\tmsub\tw1, w3, w2, w1\n\tmadd\tw0, w0, w2, w1\n\tmov\tw1, w3\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global invers\n.type invers, %function\ninvers:\n.LFB39:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw0, 0\n\tcmp\tw2, 0\n\tble\t.L1\n\tmov\tw4, 52429\n\tmovk\tw4, 0xcccc, lsl 16\n\t.p2align 3,,7\n.L3:\n\tumull\tx1, w2, w4\n\tadd\tw0, w0, w0, lsl 2\n\tcmp\tw2, 9\n\tlsr\tx1, x1, 35\n\tadd\tw3, w1, w1, lsl 2\n\tsub\tw3, w2, w3, lsl 1\n\tmov\tw2, w1\n\tadd\tw0, w3, w0, lsl 1\n\tbgt\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "110" ], "var": [ "n" ] }, { "value": [ "101" ], "var": [ "n" ] }, { "value": [ "89" ], "var": [ "n" ] }, { "value": [ "59" ], "var": [ "n" ] }, { "value": [ "34" ], "var": [ "n" ] }, { "value": [ "44" ], "var": [ "n" ] }, { "value": [ "54" ], "var": [ "n" ] }, { "value": [ "59" ], "var": [ "n" ] }, { "value": [ "61" ], "var": [ "n" ] }, { "value": [ "32" ], "var": [ "n" ] } ], "output": [ { "value": [ "11" ], "var": [ "returnv" ] }, { "value": [ "101" ], "var": [ "returnv" ] }, { "value": [ "98" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "43" ], "var": [ "returnv" ] }, { "value": [ "44" ], "var": [ "returnv" ] }, { "value": [ "45" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "16" ], "var": [ "returnv" ] }, { "value": [ "23" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_57rffb65so.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = invers(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "invers", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57rffb65so.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elly/1k/zed.c
int hasarg(const char *buf) { return buf[1] == ' ' && buf[1] != '\0'; }
int hasarg(const char *buf)
int hasarg(const char *buf)
hasarg
[ "int", "const char *" ]
{ "code": [ ".globl hasarg\n.type hasarg, @function\nhasarg:\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\taddq\t$1, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$32, %al\n\tjne\t.L2\n\tmovq\t-8(%rbp), %rax\n\taddq\t$1, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L4\n.L2:\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 hasarg\n.type hasarg, @function\nhasarg:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpb\t$32, 1(%rdi)\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl hasarg\n.type hasarg, @function\nhasarg:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpb\t$32, 1(%rdi)\n\tsete\t%al\n\tret\n\t.cfi_endproc\n\n", ".global hasarg\n.type hasarg, %function\nhasarg:\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\tadd\tx0, x0, 1\n\tldrb\tw0, [x0]\n\tcmp\tw0, 32\n\tbne\t.L2\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tmov\tw0, 1\n\tb\t.L4\n.L2:\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 hasarg\n.type hasarg, %function\nhasarg:\n.LFB35:\n\t.cfi_startproc\n\tldrb\tw0, [x0, 1]\n\tcmp\tw0, 32\n\tcset\tw0, eq\n\tret\n\t.cfi_endproc\n\n", ".global hasarg\n.type hasarg, %function\nhasarg:\n.LFB50:\n\t.cfi_startproc\n\tldrb\tw0, [x0, 1]\n\tcmp\tw0, 32\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 <err.h> #include <setjmp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"p\"" ], "var": [ "buf" ] }, { "value": [ "\"sdnuzilqzuzkwjkfqutw\"" ], "var": [ "buf" ] }, { "value": [ "\"vyczjozgiig\"" ], "var": [ "buf" ] }, { "value": [ "\"kqg\"" ], "var": [ "buf" ] }, { "value": [ "\"iewmfjarxsprkkfdyhquwmlouddal\"" ], "var": [ "buf" ] }, { "value": [ "\"xlbvvrmfqkhqzdipw\"" ], "var": [ "buf" ] }, { "value": [ "\"ifahcqjjqnafkhjxrfxmpsquebtisxy\"" ], "var": [ "buf" ] }, { "value": [ "\"cbgdoofckjikweyhrpnpnyvotdxrwb\"" ], "var": [ "buf" ] }, { "value": [ "\"ltm\"" ], "var": [ "buf" ] }, { "value": [ "\"wgizg\"" ], "var": [ "buf" ] } ], "output": [ { "value": [ "\"p\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"sdnuzilqzuzkwjkfqutw\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"vyczjozgiig\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"kqg\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"iewmfjarxsprkkfdyhquwmlouddal\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"xlbvvrmfqkhqzdipw\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"ifahcqjjqnafkhjxrfxmpsquebtisxy\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"cbgdoofckjikweyhrpnpnyvotdxrwb\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"ltm\"", "0" ], "var": [ "buf", "returnv" ] }, { "value": [ "\"wgizg\"", "0" ], "var": [ "buf", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38rc0rm87g.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* buf, int returnv) { json output_json; output_json["buf"] = buf; 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* buf = strdup(input_json["buf"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = hasarg(buf); 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(buf, returnv); }
master
null
{"livein": ["buf"], "liveout": ["buf"], "returnvarname": ["returnv"], "execcmd": "", "funname": "hasarg", "funargs": ["buf"], "typemap": {"buf": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38rc0rm87g.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
abh/ezmlm-idx/case_starts.c
int case_starts(const char *s,const char *t) { unsigned char x; unsigned char y; for (;;) { x = *s++ - 'A'; if (x <= 'Z' - 'A') x += 'a'; else x += 'A'; y = *t++ - 'A'; if (y <= 'Z' - 'A') y += 'a'; else y += 'A'; if (!y) return 1; if (x != y) return 0; } }
int case_starts(const char *s, const char *t)
int case_starts(const char *s,const char *t)
case_starts
[ "int", "const char *", "const char *" ]
{ "code": [ ".globl case_starts\n.type case_starts, @function\ncase_starts:\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.L9:\n\tmovq\t-24(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -24(%rbp)\n\tmovzbl\t(%rax), %eax\n\tsubl\t$65, %eax\n\tmovb\t%al, -2(%rbp)\n\tcmpb\t$25, -2(%rbp)\n\tja\t.L2\n\taddb\t$97, -2(%rbp)\n\tjmp\t.L3\n.L2:\n\taddb\t$65, -2(%rbp)\n.L3:\n\tmovq\t-32(%rbp), %rax\n\tleaq\t1(%rax), %rdx\n\tmovq\t%rdx, -32(%rbp)\n\tmovzbl\t(%rax), %eax\n\tsubl\t$65, %eax\n\tmovb\t%al, -1(%rbp)\n\tcmpb\t$25, -1(%rbp)\n\tja\t.L4\n\taddb\t$97, -1(%rbp)\n\tjmp\t.L5\n.L4:\n\taddb\t$65, -1(%rbp)\n.L5:\n\tcmpb\t$0, -1(%rbp)\n\tjne\t.L6\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L6:\n\tmovzbl\t-2(%rbp), %eax\n\tcmpb\t-1(%rbp), %al\n\tje\t.L9\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 case_starts\n.type case_starts, @function\ncase_starts:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n.L6:\n\tmovb\t(%rdi,%rcx), %dl\n\tleal\t-65(%rdx), %eax\n\tcmpb\t$25, %al\n\tja\t.L2\n\taddl\t$32, %edx\n.L2:\n\tmovb\t(%rsi,%rcx), %al\n\tleal\t-65(%rax), %r8d\n\tcmpb\t$25, %r8b\n\tja\t.L3\n\taddl\t$32, %eax\n\tjmp\t.L4\n.L3:\n\ttestb\t%al, %al\n\tje\t.L7\n.L4:\n\tincq\t%rcx\n\tcmpb\t%al, %dl\n\tje\t.L6\n\txorl\t%eax, %eax\n\tret\n.L7:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl case_starts\n.type case_starts, @function\ncase_starts:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%ecx, %ecx\n\tjmp\t.L6\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\taddl\t$32, %edx\n.L4:\n\taddq\t$1, %rcx\n\tcmpb\t%dl, %al\n\tjne\t.L10\n.L6:\n\tmovzbl\t(%rdi,%rcx), %eax\n\tleal\t-65(%rax), %r8d\n\tleal\t32(%rax), %edx\n\tcmpb\t$26, %r8b\n\tcmovb\t%edx, %eax\n\tmovzbl\t(%rsi,%rcx), %edx\n\tleal\t-65(%rdx), %r8d\n\tcmpb\t$25, %r8b\n\tjbe\t.L11\n\ttestb\t%dl, %dl\n\tjne\t.L4\n\tmovl\t$1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global case_starts\n.type case_starts, %function\ncase_starts:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n.L9:\n\tldr\tx0, [sp, 8]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp, 8]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #65\n\tstrb\tw0, [sp, 30]\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 25\n\tbhi\t.L2\n\tldrb\tw0, [sp, 30]\n\tadd\tw0, w0, 97\n\tstrb\tw0, [sp, 30]\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 30]\n\tadd\tw0, w0, 65\n\tstrb\tw0, [sp, 30]\n.L3:\n\tldr\tx0, [sp]\n\tadd\tx1, x0, 1\n\tstr\tx1, [sp]\n\tldrb\tw0, [x0]\n\tsub\tw0, w0, #65\n\tstrb\tw0, [sp, 31]\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 25\n\tbhi\t.L4\n\tldrb\tw0, [sp, 31]\n\tadd\tw0, w0, 97\n\tstrb\tw0, [sp, 31]\n\tb\t.L5\n.L4:\n\tldrb\tw0, [sp, 31]\n\tadd\tw0, w0, 65\n\tstrb\tw0, [sp, 31]\n.L5:\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 0\n\tbne\t.L6\n\tmov\tw0, 1\n\tb\t.L7\n.L6:\n\tldrb\tw1, [sp, 30]\n\tldrb\tw0, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L9\n\tmov\tw0, 0\n.L7:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global case_starts\n.type case_starts, %function\ncase_starts:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx4, 0\n.L6:\n\tldrb\tw3, [x0, x4]\n\tsub\tw2, w3, #65\n\tand\tw2, w2, 255\n\tcmp\tw2, 25\n\tbhi\t.L2\n\tadd\tw3, w3, 32\n\tand\tw3, w3, 255\n.L2:\n\tldrb\tw2, [x1, x4]\n\tsub\tw5, w2, #65\n\tand\tw5, w5, 255\n\tcmp\tw5, 25\n\tbhi\t.L3\n\tadd\tw2, w2, 32\n\tand\tw2, w2, 255\n.L4:\n\tadd\tx4, x4, 1\n\tcmp\tw3, w2\n\tbeq\t.L6\n\tmov\tw0, 0\n.L1:\n\tret\n.L3:\n\tcbnz\tw2, .L4\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global case_starts\n.type case_starts, %function\ncase_starts:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx7, 0\n\tb\t.L6\n\t.p2align 2,,3\n.L11:\n\tand\tw3, w6, 255\n.L4:\n\tadd\tx7, x7, 1\n\tcmp\tw2, w3\n\tbne\t.L10\n.L6:\n\tldrb\tw2, [x0, x7]\n\tldrb\tw3, [x1, x7]\n\tsub\tw6, w2, #65\n\tadd\tw5, w2, 32\n\tand\tw6, w6, 255\n\tsub\tw4, w3, #65\n\tcmp\tw6, 26\n\tand\tw5, w5, 255\n\tand\tw4, w4, 255\n\tcsel\tw2, w5, w2, cc\n\tadd\tw6, w3, 32\n\tcmp\tw4, 25\n\tbls\t.L11\n\tcbnz\tw3, .L4\n\tmov\tw0, 1\n\tret\n\t.p2align 2,,3\n.L10:\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": [ "\"tqivlmhptacnsifikwfzuptgg\"", "\"hmbysdnfrpfwhtcibmgldmww\"" ], "var": [ "s", "t" ] }, { "value": [ "\"takzkaejpxnmwesetobinwdihhztlxh\"", "\"azvlubnoojyhhhhqtnznhi\"" ], "var": [ "s", "t" ] }, { "value": [ "\"ndhmuqglnwupgmunskqaxnh\"", "\"pdwayzowfkdwzzhpcvooenv\"" ], "var": [ "s", "t" ] }, { "value": [ "\"gzagpnvwnrscdtdzeo\"", "\"dfwovpgv\"" ], "var": [ "s", "t" ] }, { "value": [ "\"\"", "\"sfmhfqh\"" ], "var": [ "s", "t" ] }, { "value": [ "\"wynmdcmmuupcloxqdmfrqqkt\"", "\"xbfhirasjfsbpuvpy\"" ], "var": [ "s", "t" ] }, { "value": [ "\"kkdccowd\"", "\"ajsam\"" ], "var": [ "s", "t" ] }, { "value": [ "\"dmcqvijbbkndzbr\"", "\"jtpcvi\"" ], "var": [ "s", "t" ] }, { "value": [ "\"jrhniepsjqeyikgqzdrn\"", "\"nngzysl\"" ], "var": [ "s", "t" ] }, { "value": [ "\"kjsjtkmareiwuiphvgqomsk\"", "\"mzfgcnxydv\"" ], "var": [ "s", "t" ] } ], "output": [ { "value": [ "0", "\"tqivlmhptacnsifikwfzuptgg\"", "\"hmbysdnfrpfwhtcibmgldmww\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"takzkaejpxnmwesetobinwdihhztlxh\"", "\"azvlubnoojyhhhhqtnznhi\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"ndhmuqglnwupgmunskqaxnh\"", "\"pdwayzowfkdwzzhpcvooenv\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"gzagpnvwnrscdtdzeo\"", "\"dfwovpgv\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"\"", "\"sfmhfqh\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"wynmdcmmuupcloxqdmfrqqkt\"", "\"xbfhirasjfsbpuvpy\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"kkdccowd\"", "\"ajsam\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"dmcqvijbbkndzbr\"", "\"jtpcvi\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"jrhniepsjqeyikgqzdrn\"", "\"nngzysl\"" ], "var": [ "returnv", "s", "t" ] }, { "value": [ "0", "\"kjsjtkmareiwuiphvgqomsk\"", "\"mzfgcnxydv\"" ], "var": [ "returnv", "s", "t" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_645qpr0bvd.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, char* t, int returnv) { json output_json; output_json["s"] = s; output_json["t"] = t; 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()); char* t = strdup(input_json["t"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = case_starts(s, t); 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, t, returnv); }
master
null
{"livein": ["s", "t"], "liveout": ["s", "t"], "returnvarname": ["returnv"], "execcmd": "", "funname": "case_starts", "funargs": ["s", "t"], "typemap": {"s": "string", "t": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_645qpr0bvd.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
OLIMEX/DIY-LAPTOP/SOFTWARE/A64-TERES/linux-a64/modules/nand/sun50iw1p1/nfd/nand_lib_cfg.c
int nand_support_two_plane(void) { return 1 ? 1 : 0; }
int nand_support_two_plane()
int nand_support_two_plane(void)
nand_support_two_plane
[ "int", "" ]
{ "code": [ ".globl nand_support_two_plane\n.type nand_support_two_plane, @function\nnand_support_two_plane:\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 nand_support_two_plane\n.type nand_support_two_plane, @function\nnand_support_two_plane:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl nand_support_two_plane\n.type nand_support_two_plane, @function\nnand_support_two_plane:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global nand_support_two_plane\n.type nand_support_two_plane, %function\nnand_support_two_plane:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global nand_support_two_plane\n.type nand_support_two_plane, %function\nnand_support_two_plane:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global nand_support_two_plane\n.type nand_support_two_plane, %function\nnand_support_two_plane:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_5850guhem2.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 = nand_support_two_plane(); 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); }
rel3
null
{"livein": [], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "nand_support_two_plane", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_5850guhem2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Orav/kbengine/kbe/src/lib/dependencies/openssl/crypto/bio/bss_fd.c
int BIO_fd_non_fatal_error(int err) { switch (err) { # 323 "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Orav/kbengine/refs/heads/master/kbe/src/lib/dependencies/openssl/crypto/bio/bss_fd.c" return (1); default: break; } return (0); }
int BIO_fd_non_fatal_error(interr)
int BIO_fd_non_fatal_error(int err)
BIO_fd_non_fatal_error
[ "int", "int" ]
{ "code": [ ".globl BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, @function\nBIO_fd_non_fatal_error:\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\tmovl\t$0, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, @function\nBIO_fd_non_fatal_error:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, @function\nBIO_fd_non_fatal_error:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, %function\nBIO_fd_non_fatal_error:\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\tmov\tw0, 0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, %function\nBIO_fd_non_fatal_error:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global BIO_fd_non_fatal_error\n.type BIO_fd_non_fatal_error, %function\nBIO_fd_non_fatal_error:\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> #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": [ "99" ], "var": [ "err" ] }, { "value": [ "101" ], "var": [ "err" ] }, { "value": [ "83" ], "var": [ "err" ] }, { "value": [ "10" ], "var": [ "err" ] }, { "value": [ "20" ], "var": [ "err" ] }, { "value": [ "50" ], "var": [ "err" ] }, { "value": [ "0" ], "var": [ "err" ] }, { "value": [ "56" ], "var": [ "err" ] }, { "value": [ "21" ], "var": [ "err" ] }, { "value": [ "72" ], "var": [ "err" ] } ], "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_431m1nnsgf.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 err, 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 err = input_json["err"]; clock_t begin = clock(); int returnv = BIO_fd_non_fatal_error(err); 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(err, returnv); }
master
null
{"livein": ["err"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "BIO_fd_non_fatal_error", "funargs": ["err"], "typemap": {"err": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_431m1nnsgf.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
DeadDork/learning_c/KnR/ch_3/3.04/3-4.c
int is_num( char c ) { return ( c >= '0' && c <= '9' ) ? 1 : 0; }
int is_num(charc)
int is_num( char c )
is_num
[ "int", "char" ]
{ "code": [ ".globl is_num\n.type is_num, @function\nis_num:\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$47, -4(%rbp)\n\tjle\t.L2\n\tcmpb\t$57, -4(%rbp)\n\tjg\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L4\n.L2:\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 is_num\n.type is_num, @function\nis_num:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpb\t$9, %dil\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".globl is_num\n.type is_num, @function\nis_num:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$48, %edi\n\txorl\t%eax, %eax\n\tcmpb\t$9, %dil\n\tsetbe\t%al\n\tret\n\t.cfi_endproc\n\n", ".global is_num\n.type is_num, %function\nis_num:\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, 47\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 57\n\tbhi\t.L2\n\tmov\tw0, 1\n\tb\t.L4\n.L2:\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 is_num\n.type is_num, %function\nis_num:\n.LFB13:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n", ".global is_num\n.type is_num, %function\nis_num:\n.LFB23:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #48\n\tand\tw0, w0, 255\n\tcmp\tw0, 9\n\tcset\tw0, ls\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <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": [ "71" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "62" ], "var": [ "c" ] }, { "value": [ "126" ], "var": [ "c" ] }, { "value": [ "63" ], "var": [ "c" ] }, { "value": [ "44" ], "var": [ "c" ] }, { "value": [ "22" ], "var": [ "c" ] }, { "value": [ "10" ], "var": [ "c" ] }, { "value": [ "50" ], "var": [ "c" ] }, { "value": [ "126" ], "var": [ "c" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_403qgqqd5c.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 = is_num(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": "is_num", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_403qgqqd5c.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/c-c++-common/rotate-1.c
unsigned short int f30 (unsigned short int x, unsigned long int y) { return (x >> (8 * sizeof (unsigned short) - y)) ^ (x << y); }
unsigned short f30(unsigned shortx, unsigned longy)
unsigned short int f30 (unsigned short int x, unsigned long int y)
f30
[ "unsigned short", "unsigned short", "unsigned long" ]
{ "code": [ ".globl f30\n.type f30, @function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovq\t%rsi, -16(%rbp)\n\tmovw\t%ax, -4(%rbp)\n\tmovzwl\t-4(%rbp), %edx\n\tmovq\t-16(%rbp), %rax\n\tmovl\t$16, %ecx\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\tmovl\t%eax, %ecx\n\tsarl\t%cl, %edx\n\tmovl\t%edx, %eax\n\tmovl\t%eax, %esi\n\tmovzwl\t-4(%rbp), %eax\n\tmovq\t-16(%rbp), %rdx\n\tmovl\t%edx, %ecx\n\tsall\t%cl, %eax\n\txorl\t%esi, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f30\n.type f30, @function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trolw\t%cl, %ax\n\tret\n\t.cfi_endproc\n\n", ".globl f30\n.type f30, @function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t%esi, %ecx\n\trolw\t%cl, %ax\n\tret\n\t.cfi_endproc\n\n", ".global f30\n.type f30, %function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrh\tw0, [sp, 14]\n\tstr\tx1, [sp]\n\tldrh\tw1, [sp, 14]\n\tldr\tx0, [sp]\n\tmov\tw2, w0\n\tmov\tw0, 16\n\tsub\tw0, w0, w2\n\tasr\tw0, w1, w0\n\tsxth\tw1, w0\n\tldrh\tw0, [sp, 14]\n\tldr\tx2, [sp]\n\tlsl\tw0, w0, w2\n\tsxth\tw0, w0\n\teor\tw0, w1, w0\n\tsxth\tw0, w0\n\tand\tw0, w0, 65535\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f30\n.type f30, %function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 65535\n\tlsl\tw2, w0, w1\n\tneg\tw1, w1\n\tand\tw1, w1, 15\n\tlsr\tw0, w0, w1\n\torr\tw0, w2, w0\n\tret\n\t.cfi_endproc\n\n", ".global f30\n.type f30, %function\nf30:\n.LFB0:\n\t.cfi_startproc\n\tneg\tw2, w1\n\tand\tw0, w0, 65535\n\tand\tw2, w2, 15\n\tlsl\tw1, w0, w1\n\tlsr\tw0, w0, w2\n\torr\tw0, w1, w0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "892", "492" ], "var": [ "x", "y" ] }, { "value": [ "197", "413" ], "var": [ "x", "y" ] }, { "value": [ "515", "692" ], "var": [ "x", "y" ] }, { "value": [ "196", "948" ], "var": [ "x", "y" ] }, { "value": [ "784", "560" ], "var": [ "x", "y" ] }, { "value": [ "21", "482" ], "var": [ "x", "y" ] }, { "value": [ "707", "933" ], "var": [ "x", "y" ] }, { "value": [ "126", "887" ], "var": [ "x", "y" ] }, { "value": [ "143", "326" ], "var": [ "x", "y" ] }, { "value": [ "916", "0" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "49207" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "784" ], "var": [ "returnv" ] }, { "value": [ "84" ], "var": [ "returnv" ] }, { "value": [ "22624" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "9152" ], "var": [ "returnv" ] }, { "value": [ "916" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46rb8oe88n.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 x, unsigned long int y, unsigned 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); unsigned short x = input_json["x"]; unsigned long int y = input_json["y"]; clock_t begin = clock(); unsigned short returnv = f30(x, y); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, returnv); }
arm-hot-cold
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f30", "funargs": ["x", "y"], "typemap": {"x": "uint16", "y": "uint64", "returnv": "uint16"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46rb8oe88n.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
gavinschultz/asterad/src/util.c
float square(float n) { return n*n; }
float square(floatn)
float square(float n)
square
[ "float", "float" ]
{ "code": [ ".globl square\n.type square, @function\nsquare:\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-4(%rbp), %xmm0\n\tmulss\t%xmm0, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl square\n.type square, @function\nsquare:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl square\n.type square, @function\nsquare:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmulss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global square\n.type square, %function\nsquare:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tldr\ts0, [sp, 12]\n\tfmul\ts0, s0, s0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global square\n.type square, %function\nsquare:\n.LFB0:\n\t.cfi_startproc\n\tfmul\ts0, s0, s0\n\tret\n\t.cfi_endproc\n\n", ".global square\n.type square, %function\nsquare:\n.LFB0:\n\t.cfi_startproc\n\tfmul\ts0, s0, s0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "28.7362944287" ], "var": [ "n" ] }, { "value": [ "65.1851149887" ], "var": [ "n" ] }, { "value": [ "61.3928401373" ], "var": [ "n" ] }, { "value": [ "74.2728453443" ], "var": [ "n" ] }, { "value": [ "73.3333479915" ], "var": [ "n" ] }, { "value": [ "70.8163339618" ], "var": [ "n" ] }, { "value": [ "64.9542032966" ], "var": [ "n" ] }, { "value": [ "27.7826185796" ], "var": [ "n" ] }, { "value": [ "66.9235169438" ], "var": [ "n" ] }, { "value": [ "71.8200948069" ], "var": [ "n" ] } ], "output": [ { "value": [ "825.7745971679688" ], "var": [ "returnv" ] }, { "value": [ "4249.0986328125" ], "var": [ "returnv" ] }, { "value": [ "3769.0810546875" ], "var": [ "returnv" ] }, { "value": [ "5516.455078125" ], "var": [ "returnv" ] }, { "value": [ "5377.7802734375" ], "var": [ "returnv" ] }, { "value": [ "5014.95361328125" ], "var": [ "returnv" ] }, { "value": [ "4219.04833984375" ], "var": [ "returnv" ] }, { "value": [ "771.8739624023438" ], "var": [ "returnv" ] }, { "value": [ "4478.7568359375" ], "var": [ "returnv" ] }, { "value": [ "5158.12548828125" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_34isktd5l9.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 n, 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 n = input_json["n"]; clock_t begin = clock(); float returnv = square(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "square", "funargs": ["n"], "typemap": {"n": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_34isktd5l9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
GPUOpen-Drivers/llvm/3rd/templight/llvm/test/tools/llvm-symbolizer/print_context.c
int inc(int a) { return a + 1; }
int inc(inta)
int inc(int a)
inc
[ "int", "int" ]
{ "code": [ ".globl inc\n.type inc, @function\ninc:\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 inc\n.type inc, @function\ninc:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl inc\n.type inc, @function\ninc:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t1(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global inc\n.type inc, %function\ninc:\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 inc\n.type inc, %function\ninc:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 1\n\tret\n\t.cfi_endproc\n\n", ".global inc\n.type inc, %function\ninc:\n.LFB23:\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
#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": [ "73" ], "var": [ "a" ] }, { "value": [ "97" ], "var": [ "a" ] }, { "value": [ "49" ], "var": [ "a" ] }, { "value": [ "39" ], "var": [ "a" ] }, { "value": [ "117" ], "var": [ "a" ] }, { "value": [ "67" ], "var": [ "a" ] }, { "value": [ "55" ], "var": [ "a" ] }, { "value": [ "58" ], "var": [ "a" ] }, { "value": [ "75" ], "var": [ "a" ] }, { "value": [ "21" ], "var": [ "a" ] } ], "output": [ { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "98" ], "var": [ "returnv" ] }, { "value": [ "50" ], "var": [ "returnv" ] }, { "value": [ "40" ], "var": [ "returnv" ] }, { "value": [ "118" ], "var": [ "returnv" ] }, { "value": [ "68" ], "var": [ "returnv" ] }, { "value": [ "56" ], "var": [ "returnv" ] }, { "value": [ "59" ], "var": [ "returnv" ] }, { "value": [ "76" ], "var": [ "returnv" ] }, { "value": [ "22" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_48_g32_t55.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 = inc(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); }
amd-vulkan-dev
null
{"livein": ["a"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "inc", "funargs": ["a"], "typemap": {"a": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_48_g32_t55.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
EmulatorArchive/yabause-rr/src/scsp.c
int SNDDummyReset() { return 0; }
int SNDDummyReset()
int SNDDummyReset()
SNDDummyReset
[ "int", "" ]
{ "code": [ ".globl SNDDummyReset\n.type SNDDummyReset, @function\nSNDDummyReset:\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 SNDDummyReset\n.type SNDDummyReset, @function\nSNDDummyReset:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl SNDDummyReset\n.type SNDDummyReset, @function\nSNDDummyReset:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global SNDDummyReset\n.type SNDDummyReset, %function\nSNDDummyReset:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global SNDDummyReset\n.type SNDDummyReset, %function\nSNDDummyReset:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global SNDDummyReset\n.type SNDDummyReset, %function\nSNDDummyReset:\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> #include <stdarg.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": [], "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_344cjf2fv4.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 = SNDDummyReset(); 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": "SNDDummyReset", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_344cjf2fv4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
lucasbretana/AlgoritmosOrdenacao/AlgoritmosOrdenacao/QuickSort.c
void quickSort(int *vet, int left, int right){ if(left == right) return; int pivot = left; }
void quickSort(int *vet, intleft, intright)
void quickSort(int *vet, int left, int right)
quickSort
[ "void", "int *", "int", "int" ]
{ "code": [ ".globl quickSort\n.type quickSort, @function\nquickSort:\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%edx, -32(%rbp)\n\tmovl\t-28(%rbp), %eax\n\tcmpl\t-32(%rbp), %eax\n\tje\t.L4\n\tmovl\t-28(%rbp), %eax\n\tmovl\t%eax, -4(%rbp)\n\tjmp\t.L1\n.L4:\n\tnop\n.L1:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl quickSort\n.type quickSort, @function\nquickSort:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl quickSort\n.type quickSort, @function\nquickSort:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global quickSort\n.type quickSort, %function\nquickSort:\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\tw2, [sp]\n\tldr\tw1, [sp, 4]\n\tldr\tw0, [sp]\n\tcmp\tw1, w0\n\tbeq\t.L4\n\tldr\tw0, [sp, 4]\n\tstr\tw0, [sp, 28]\n\tb\t.L1\n.L4:\n\tnop\n.L1:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global quickSort\n.type quickSort, %function\nquickSort:\n.LFB24:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global quickSort\n.type quickSort, %function\nquickSort:\n.LFB39:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <time.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[89, 8, 69, 72, 49, 55, 125, 58, 53, 84, 37, 20, 39, 65, 114, 73, 118, 126, 65, 32, 73, 62, 82, 117, 27, 115, 77, 74, 67, 47, 118, 56]", "64", "51" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[7, 99, 21, 31, 116, 26, 34, 103, 65, 113, 23, 34, 62, 3, 126, 9, 95, 37, 125, 41, 26, 9, 118, 29, 92, 63, 78, 75, 79, 19, 17, 59]", "92", "37" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[99, 113, 23, 83, 16, 76, 9, 57, 51, 119, 92, 82, 16, 92, 42, 35, 3, 22, 88, 38, 102, 77, 33, 44, 68, 126, 112, 79, 98, 109, 57, 34]", "13", "115" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[80, 54, 115, 116, 20, 44, 59, 82, 110, 8, 80, 8, 87, 2, 0, 7, 63, 21, 22, 7, 96, 96, 69, 52, 101, 123, 69, 86, 96, 63, 24, 124]", "5", "33" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[0, 73, 37, 64, 110, 65, 19, 92, 78, 102, 36, 89, 37, 105, 84, 118, 9, 69, 77, 4, 114, 41, 24, 80, 92, 18, 28, 31, 5, 123, 82, 118]", "110", "67" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[103, 26, 89, 23, 86, 96, 92, 33, 15, 60, 1, 13, 60, 3, 72, 47, 84, 56, 100, 105, 37, 34, 97, 94, 41, 125, 108, 78, 79, 59, 49, 104]", "107", "32" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[123, 98, 81, 24, 106, 85, 43, 42, 121, 49, 21, 77, 76, 91, 113, 58, 90, 77, 50, 103, 81, 59, 67, 29, 22, 5, 20, 41, 17, 29, 50, 39]", "57", "126" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[69, 78, 103, 34, 24, 46, 91, 8, 87, 64, 51, 79, 53, 94, 21, 13, 124, 38, 114, 30, 126, 95, 84, 50, 5, 125, 35, 115, 122, 108, 91, 21]", "65", "123" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[37, 43, 74, 32, 44, 93, 15, 34, 104, 71, 82, 124, 45, 96, 87, 22, 61, 92, 1, 105, 25, 44, 29, 42, 70, 57, 83, 102, 74, 79, 75, 80]", "6", "25" ], "var": [ "vet", "left", "right" ] }, { "value": [ "[54, 98, 37, 27, 59, 49, 86, 1, 83, 122, 22, 90, 75, 40, 38, 6, 21, 123, 66, 41, 72, 85, 39, 110, 118, 50, 27, 48, 26, 15, 28, 73]", "122", "78" ], "var": [ "vet", "left", "right" ] } ], "output": [ { "value": [ "[89, 8, 69, 72, 49, 55, 125, 58, 53, 84, 37, 20, 39, 65, 114, 73, 118, 126, 65, 32, 73, 62, 82, 117, 27, 115, 77, 74, 67, 47, 118, 56]" ], "var": [ "vet" ] }, { "value": [ "[7, 99, 21, 31, 116, 26, 34, 103, 65, 113, 23, 34, 62, 3, 126, 9, 95, 37, 125, 41, 26, 9, 118, 29, 92, 63, 78, 75, 79, 19, 17, 59]" ], "var": [ "vet" ] }, { "value": [ "[99, 113, 23, 83, 16, 76, 9, 57, 51, 119, 92, 82, 16, 92, 42, 35, 3, 22, 88, 38, 102, 77, 33, 44, 68, 126, 112, 79, 98, 109, 57, 34]" ], "var": [ "vet" ] }, { "value": [ "[80, 54, 115, 116, 20, 44, 59, 82, 110, 8, 80, 8, 87, 2, 0, 7, 63, 21, 22, 7, 96, 96, 69, 52, 101, 123, 69, 86, 96, 63, 24, 124]" ], "var": [ "vet" ] }, { "value": [ "[0, 73, 37, 64, 110, 65, 19, 92, 78, 102, 36, 89, 37, 105, 84, 118, 9, 69, 77, 4, 114, 41, 24, 80, 92, 18, 28, 31, 5, 123, 82, 118]" ], "var": [ "vet" ] }, { "value": [ "[103, 26, 89, 23, 86, 96, 92, 33, 15, 60, 1, 13, 60, 3, 72, 47, 84, 56, 100, 105, 37, 34, 97, 94, 41, 125, 108, 78, 79, 59, 49, 104]" ], "var": [ "vet" ] }, { "value": [ "[123, 98, 81, 24, 106, 85, 43, 42, 121, 49, 21, 77, 76, 91, 113, 58, 90, 77, 50, 103, 81, 59, 67, 29, 22, 5, 20, 41, 17, 29, 50, 39]" ], "var": [ "vet" ] }, { "value": [ "[69, 78, 103, 34, 24, 46, 91, 8, 87, 64, 51, 79, 53, 94, 21, 13, 124, 38, 114, 30, 126, 95, 84, 50, 5, 125, 35, 115, 122, 108, 91, 21]" ], "var": [ "vet" ] }, { "value": [ "[37, 43, 74, 32, 44, 93, 15, 34, 104, 71, 82, 124, 45, 96, 87, 22, 61, 92, 1, 105, 25, 44, 29, 42, 70, 57, 83, 102, 74, 79, 75, 80]" ], "var": [ "vet" ] }, { "value": [ "[54, 98, 37, 27, 59, 49, 86, 1, 83, 122, 22, 90, 75, 40, 38, 6, 21, 123, 66, 41, 72, 85, 39, 110, 118, 50, 27, 48, 26, 15, 28, 73]" ], "var": [ "vet" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_51j2lncyjp.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* vet, int left, int right) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = vet[i3]; output_temp_2.push_back(output_temp_4); } output_json["vet"] = output_temp_2; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["vet"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* vet = &input_temp_1_vec[0]; int left = input_json["left"]; int right = input_json["right"]; clock_t begin = clock(); quickSort(vet, left, right); 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(vet, left, right); }
master
null
{"livein": ["vet", "left", "right"], "liveout": ["vet"], "returnvarname": [], "execcmd": "", "funname": "quickSort", "funargs": ["vet", "left", "right"], "typemap": {"vet": "array(int32#32)", "left": "int32", "right": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_51j2lncyjp.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
baldepro/Ruzzle/Mot.c
int _poids_caractere(char c) { int poids; switch(c) { case 'a': case 'e': case 'i': case 'l': case 'n': case 'o': case 'r': case 's': case 't': case 'u': poids = 1; break; case 'd': case 'g': case 'm': poids = 2;break; case 'b': case 'c': case 'p': poids = 3;break; case 'f': case 'h': case 'v': poids = 4;break; case 'j': case 'q': poids = 8;break; case 'k': case 'w': case 'x': case 'y': case 'z': poids = 10;break; default : poids = 0; } return poids; }
int _poids_caractere(charc)
int _poids_caractere(char c)
_poids_caractere
[ "int", "char" ]
{ "code": [ ".globl _poids_caractere\n.type _poids_caractere, @function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -20(%rbp)\n\tmovsbl\t-20(%rbp), %eax\n\tsubl\t$97, %eax\n\tcmpl\t$25, %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.L8-.L4\n\t.long\t.L8-.L4\n\t.long\t.L9-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L9-.L4\n\t.long\t.L5-.L4\n\t.long\t.L6-.L4\n\t.long\t.L7-.L4\n\t.long\t.L3-.L4\n\t.long\t.L6-.L4\n\t.long\t.L9-.L4\n\t.long\t.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.long\t.L3-.L4\n\t.long\t.L3-.L4\n\t.long\t.L3-.L4\n\t.text\n.L6:\n\tmovl\t$1, -4(%rbp)\n\tjmp\t.L10\n.L9:\n\tmovl\t$2, -4(%rbp)\n\tjmp\t.L10\n.L8:\n\tmovl\t$3, -4(%rbp)\n\tjmp\t.L10\n.L5:\n\tmovl\t$4, -4(%rbp)\n\tjmp\t.L10\n.L7:\n\tmovl\t$8, -4(%rbp)\n\tjmp\t.L10\n.L3:\n\tmovl\t$10, -4(%rbp)\n\tjmp\t.L10\n.L2:\n\tmovl\t$0, -4(%rbp)\n.L10:\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 _poids_caractere\n.type _poids_caractere, @function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$97, %edi\n\txorl\t%eax, %eax\n\tcmpb\t$25, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl _poids_caractere\n.type _poids_caractere, @function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$97, %edi\n\txorl\t%eax, %eax\n\tcmpb\t$25, %dil\n\tja\t.L1\n\tmovzbl\t%dil, %edi\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovl\t(%rax,%rdi,4), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global _poids_caractere\n.type _poids_caractere, %function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tsub\tw0, w0, #97\n\tcmp\tw0, 25\n\tbhi\t.L2\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldr\tw0, [x1,w0,uxtw #2]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxtw #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L8 - .Lrtx4) / 4\n\t.word\t(.L8 - .Lrtx4) / 4\n\t.word\t(.L9 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L5 - .Lrtx4) / 4\n\t.word\t(.L9 - .Lrtx4) / 4\n\t.word\t(.L5 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L7 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L9 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L8 - .Lrtx4) / 4\n\t.word\t(.L7 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L5 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.text\n.L6:\n\tmov\tw0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L9:\n\tmov\tw0, 2\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L8:\n\tmov\tw0, 3\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L5:\n\tmov\tw0, 4\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L7:\n\tmov\tw0, 8\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L3:\n\tmov\tw0, 10\n\tstr\tw0, [sp, 28]\n\tb\t.L10\n.L2:\n\tstr\twzr, [sp, 28]\n.L10:\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 _poids_caractere\n.type _poids_caractere, %function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #97\n\tand\tw0, w0, 255\n\tcmp\tw0, 25\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, x0]\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global _poids_caractere\n.type _poids_caractere, %function\n_poids_caractere:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #97\n\tand\tw0, w0, 255\n\tcmp\tw0, 25\n\tbhi\t.L3\n\tand\tx0, x0, 255\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw0, [x1, x0, lsl 2]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 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": [ "117" ], "var": [ "c" ] }, { "value": [ "96" ], "var": [ "c" ] }, { "value": [ "1" ], "var": [ "c" ] }, { "value": [ "43" ], "var": [ "c" ] }, { "value": [ "3" ], "var": [ "c" ] }, { "value": [ "25" ], "var": [ "c" ] }, { "value": [ "124" ], "var": [ "c" ] }, { "value": [ "111" ], "var": [ "c" ] }, { "value": [ "112" ], "var": [ "c" ] }, { "value": [ "87" ], "var": [ "c" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "3" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_64gbr7c3ei.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 = _poids_caractere(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": "_poids_caractere", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_64gbr7c3ei.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
HopeFOAM/HopeFOAM/ThirdParty-0.1/scotch_6.0.3/src/lidirotch/common_memory.c
int SCOTCH_memMax () { return ((int) -1); }
int SCOTCH_memMax()
int SCOTCH_memMax ()
SCOTCH_memMax
[ "int", "" ]
{ "code": [ ".globl SCOTCH_memMax\n.type SCOTCH_memMax, @function\nSCOTCH_memMax:\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 SCOTCH_memMax\n.type SCOTCH_memMax, @function\nSCOTCH_memMax:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl SCOTCH_memMax\n.type SCOTCH_memMax, @function\nSCOTCH_memMax:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global SCOTCH_memMax\n.type SCOTCH_memMax, %function\nSCOTCH_memMax:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global SCOTCH_memMax\n.type SCOTCH_memMax, %function\nSCOTCH_memMax:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global SCOTCH_memMax\n.type SCOTCH_memMax, %function\nSCOTCH_memMax:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38tt50xzg7.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 = SCOTCH_memMax(); 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": "SCOTCH_memMax", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38tt50xzg7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TulipCharts/tulipnode/external/tiamalgamation.c
int ti_dx_start(double const *options) { return (int)options[0]-1; }
int ti_dx_start(const double *options)
int ti_dx_start(double const *options)
ti_dx_start
[ "int", "const double *" ]
{ "code": [ ".globl ti_dx_start\n.type ti_dx_start, @function\nti_dx_start:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm0\n\tcvttsd2sil\t%xmm0, %eax\n\tsubl\t$1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ti_dx_start\n.type ti_dx_start, @function\nti_dx_start:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tcvttsd2sil\t(%rdi), %eax\n\tdecl\t%eax\n\tret\n\t.cfi_endproc\n\n", ".globl ti_dx_start\n.type ti_dx_start, @function\nti_dx_start:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\tcvttsd2sil\t(%rdi), %eax\n\tsubl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ti_dx_start\n.type ti_dx_start, %function\nti_dx_start:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp, 8]\n\tldr\td0, [x0]\n\tfcvtzs\tw0, d0\n\tsub\tw0, w0, #1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ti_dx_start\n.type ti_dx_start, %function\nti_dx_start:\n.LFB22:\n\t.cfi_startproc\n\tldr\td0, [x0]\n\tfcvtzs\tw0, d0\n\tsub\tw0, w0, #1\n\tret\n\t.cfi_endproc\n\n", ".global ti_dx_start\n.type ti_dx_start, %function\nti_dx_start:\n.LFB27:\n\t.cfi_startproc\n\tldr\td0, [x0]\n\tfcvtzs\tw0, d0\n\tsub\tw0, w0, #1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <math.h> #include <assert.h> #include <string.h> #include <stdlib.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]" ], "var": [ "options" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]" ], "var": [ "options" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]" ], "var": [ "options" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]" ], "var": [ "options" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]" ], "var": [ "options" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]" ], "var": [ "options" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]" ], "var": [ "options" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]" ], "var": [ "options" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]" ], "var": [ "options" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]" ], "var": [ "options" ] } ], "output": [ { "value": [ "[63.1664629532, 53.8432270291, 6.48958563204, 82.3780599705, 7.86720313195, 3.60690076621, 71.4442128238, 90.1457109628, 50.0953836783, 18.9550651736, 59.8197567057, 21.0440622698, 58.1956301899, 40.0060312095, 30.6763760093, 82.6307541147, 6.84077298235, 56.6857428277, 68.4175838525, 44.3474278673, 16.5436115215, 84.5942141899, 80.7243510944, 9.81804908777, 63.4862792986, 32.700041319, 30.4205673438, 55.8821808035, 22.1453112749, 43.5142463016, 11.9850186977, 0.311385900722]", "62" ], "var": [ "options", "returnv" ] }, { "value": [ "[48.7438014786, 84.6590007197, 62.5406240241, 62.2698221249, 28.7954145576, 1.91212155389, 15.6369375404, 32.2966404702, 92.5688516807, 11.1814067844, 31.2253103522, 75.2409702995, 89.2611867795, 81.8943618205, 74.7127959521, 3.55764552413, 22.4907376402, 82.5060482874, 14.3248321739, 75.08249484, 61.5635244153, 12.423978839, 76.1051896752, 53.411980438, 84.2713187884, 99.8431049617, 56.414407569, 13.2702094662, 87.2300665248, 15.4839198725, 82.7360223394, 6.79404322601]", "47" ], "var": [ "options", "returnv" ] }, { "value": [ "[23.1934236912, 97.0069112645, 93.7115278708, 63.9995413953, 21.0826670454, 70.2432967862, 90.6252711733, 52.6796066205, 44.2074384975, 62.8755377618, 18.6629000683, 9.42595635854, 41.9511027508, 12.9782759037, 62.5789623019, 60.4717359823, 25.8967375903, 30.0327887276, 22.9215512832, 17.6567062793, 96.4687421319, 44.8195730397, 72.9979907564, 5.5209058319, 2.72242138504, 40.5228133396, 13.8305880064, 45.4775571504, 83.0060384843, 91.8364344258, 7.04587554214, 23.9920014743]", "22" ], "var": [ "options", "returnv" ] }, { "value": [ "[26.6361699833, 36.4387736626, 72.1005098501, 12.5063702728, 31.9924440288, 46.4852420452, 14.0633701944, 75.3128707144, 35.386354907, 63.7524932036, 80.1236600671, 58.0789295777, 32.1580264746, 64.9811293582, 7.95432803052, 27.9612769801, 27.0106516319, 95.2739172993, 51.7513197222, 37.6907364671, 32.7061115778, 51.2035293357, 90.004020896, 42.2055575158, 14.5686825268, 36.3213893785, 52.5136510606, 45.4016631215, 59.4638080884, 45.9729655659, 74.2704228312, 56.3515327316]", "25" ], "var": [ "options", "returnv" ] }, { "value": [ "[86.6199526854, 78.3308392659, 74.425723442, 25.7040766374, 53.3488154749, 51.8345962019, 64.1739072294, 97.0062059685, 81.7241791886, 78.5697991045, 3.26054125, 61.9952672074, 93.054701242, 99.2927522262, 55.8704694515, 46.1022481897, 88.9374803551, 44.9344931678, 93.6154129307, 31.3148204574, 23.995590476, 4.09242625371, 60.822928918, 9.60494486935, 69.4761977829, 37.6523360145, 50.154728803, 34.6050762743, 14.1778854464, 17.7602272272, 94.5682293086, 14.6345738059]", "85" ], "var": [ "options", "returnv" ] }, { "value": [ "[88.2683268045, 44.3813955601, 92.9617319212, 95.312655536, 98.1680469375, 14.9670370494, 48.3548783769, 27.5370715913, 44.44598022, 95.8981375147, 41.494618401, 25.5085794287, 94.5052266139, 23.3439198042, 35.6899553689, 64.208992178, 93.0951237485, 13.8683798959, 92.7729142556, 5.31130786645, 91.7843213816, 76.2035957166, 60.2592161892, 10.4439268455, 32.326162695, 78.4069647564, 73.3106910273, 26.4240872347, 50.24678482, 71.4740887915, 83.8595194078, 56.4085440333]", "87" ], "var": [ "options", "returnv" ] }, { "value": [ "[25.3849621246, 90.9676813862, 37.802994371, 99.7269151747, 73.2192570469, 46.5818536774, 79.855640653, 26.4411316506, 86.2334368337, 80.3425777941, 30.0104447606, 77.0407399731, 14.193965401, 48.1117289643, 92.5760733219, 70.1769059145, 51.2831453103, 73.83460864, 15.3872366929, 79.0282702686, 90.9533914548, 80.9479903175, 77.6793305004, 1.0361655497, 56.6710341052, 45.1350250565, 55.4518238348, 33.2299646756, 50.6385388221, 55.9957160978, 60.8439739145, 99.3618444259]", "24" ], "var": [ "options", "returnv" ] }, { "value": [ "[56.3113747165, 31.7890789488, 91.2218157196, 94.2114704838, 76.2958295397, 72.8852636575, 39.7304574881, 47.3609227125, 52.8875029305, 68.3843752915, 96.2546864537, 61.1163716447, 89.1187305198, 99.3925729097, 57.571673068, 0.188985541003, 57.5215454508, 63.8010484008, 88.8809415505, 54.1707399284, 60.5446897786, 64.4581373917, 55.161856902, 66.0592225509, 66.4873332396, 26.0968096164, 38.7698626421, 60.8623824553, 41.8910447, 50.1511770591, 38.5033742048, 5.14156920314]", "55" ], "var": [ "options", "returnv" ] }, { "value": [ "[99.3881477041, 90.9540554304, 28.8722749745, 73.2643839461, 51.8808385646, 75.3724326147, 81.8056754369, 68.8773192525, 98.2316729557, 91.1494165031, 83.5530239236, 35.6632243934, 3.30368891984, 16.9108555976, 95.8658923354, 99.5054130263, 48.1364871919, 38.3960557927, 17.5343734907, 90.1193459377, 75.2992603929, 51.2232342211, 8.09642157002, 3.96414942097, 60.063696914, 41.7115674523, 5.49275248573, 66.4946514326, 12.708571742, 89.7265021762, 33.2767581798, 89.3873640082]", "98" ], "var": [ "options", "returnv" ] }, { "value": [ "[64.1753600457, 63.3587827761, 7.51836265434, 46.8073423089, 15.4605562372, 70.3002729673, 87.8308190101, 51.7076112597, 71.9264477245, 84.7577865065, 11.3525390915, 94.8824413277, 45.7489833326, 64.1621456463, 25.7689393098, 48.8392293284, 84.3129800872, 7.6928368544, 6.32000694389, 0.84894150516, 59.0363845227, 90.2997697425, 45.7821331399, 11.5374946641, 48.2908225238, 68.3806252668, 82.6553245951, 61.0069545002, 82.4081357661, 27.0226241346, 89.2556716998, 79.8712610227]", "63" ], "var": [ "options", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_483aqzt9e5.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(double* options, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = options[i3]; output_temp_2.push_back(output_temp_4); } output_json["options"] = output_temp_2; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<double> input_temp_1_vec; for (auto& elem : input_json["options"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* options = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = ti_dx_start(options); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(options, returnv); }
master
null
{"livein": ["options"], "liveout": ["options"], "returnvarname": ["returnv"], "execcmd": "", "funname": "ti_dx_start", "funargs": ["options"], "typemap": {"options": "array(float64#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_483aqzt9e5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
luzhuomi/cpp-obs/test/local_array.c
int f(int x) { if (x == 0) { return x; } else { int a[3]; a[0] = -x; return a[0]; } }
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\tsubq\t$48, %rsp\n\tmovl\t%edi, -36(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tcmpl\t$0, -36(%rbp)\n\tjne\t.L2\n\tmovl\t-36(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-36(%rbp), %eax\n\tnegl\t%eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-20(%rbp), %eax\n.L3:\n\tmovq\t-8(%rbp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L4\n\tcall\t__stack_chk_fail@PLT\n.L4:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%edi, %edi\n\tje\t.L2\n\tnegl\t%eax\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %edx\n\tmovl\t%edi, %eax\n\tnegl\t%edx\n\ttestl\t%edi, %edi\n\tcmovne\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 56]\n\tmov\tx1,0\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tldr\tw0, [sp, 28]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n\tneg\tw0, w0\n\tstr\tw0, [sp, 40]\n\tldr\tw0, [sp, 40]\n.L3:\n\tmov\tw1, w0\n\tadrp\tx0, :got:__stack_chk_guard\n\tldr\tx0, [x0, #:got_lo12:__stack_chk_guard]\n\tldr\tx2, [sp, 56]\n\tldr\tx3, [x0]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L4\n\tbl\t__stack_chk_fail\n.L4:\n\tmov\tw0, w1\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tcbz\tw0, .L2\n\tneg\tw0, w0\n.L2:\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, 0\n\tcsneg\tw0, w0, w0, 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": [ "84" ], "var": [ "x" ] }, { "value": [ "60" ], "var": [ "x" ] }, { "value": [ "116" ], "var": [ "x" ] }, { "value": [ "122" ], "var": [ "x" ] }, { "value": [ "109" ], "var": [ "x" ] }, { "value": [ "16" ], "var": [ "x" ] }, { "value": [ "84" ], "var": [ "x" ] }, { "value": [ "65" ], "var": [ "x" ] }, { "value": [ "79" ], "var": [ "x" ] }, { "value": [ "102" ], "var": [ "x" ] } ], "output": [ { "value": [ "-84" ], "var": [ "returnv" ] }, { "value": [ "-60" ], "var": [ "returnv" ] }, { "value": [ "-116" ], "var": [ "returnv" ] }, { "value": [ "-122" ], "var": [ "returnv" ] }, { "value": [ "-109" ], "var": [ "returnv" ] }, { "value": [ "-16" ], "var": [ "returnv" ] }, { "value": [ "-84" ], "var": [ "returnv" ] }, { "value": [ "-65" ], "var": [ "returnv" ] }, { "value": [ "-79" ], "var": [ "returnv" ] }, { "value": [ "-102" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_441qs3vv2s.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_441qs3vv2s.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
christopherL91/ModuloInverse/extended.c
int extended_gcd(int a,int b){ long long unsigned int y,lasty,quotient,temp1,temp2; y = 1; lasty = 0; while(b != 0){ quotient = a / b; temp1 = a%b; a = b; b = temp1; temp2 = y; y = lasty - (quotient*y); lasty = temp2; } return(lasty); }
int extended_gcd(inta, intb)
int extended_gcd(int a,int b)
extended_gcd
[ "int", "int", "int" ]
{ "code": [ ".globl extended_gcd\n.type extended_gcd, @function\nextended_gcd:\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, -52(%rbp)\n\tmovl\t%esi, -56(%rbp)\n\tmovq\t$1, -40(%rbp)\n\tmovq\t$0, -32(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovl\t-52(%rbp), %eax\n\tcltd\n\tidivl\t-56(%rbp)\n\tcltq\n\tmovq\t%rax, -24(%rbp)\n\tmovl\t-52(%rbp), %eax\n\tcltd\n\tidivl\t-56(%rbp)\n\tmovl\t%edx, %eax\n\tcltq\n\tmovq\t%rax, -16(%rbp)\n\tmovl\t-56(%rbp), %eax\n\tmovl\t%eax, -52(%rbp)\n\tmovq\t-16(%rbp), %rax\n\tmovl\t%eax, -56(%rbp)\n\tmovq\t-40(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tmovq\t-24(%rbp), %rax\n\timulq\t-40(%rbp), %rax\n\tmovq\t-32(%rbp), %rdx\n\tsubq\t%rax, %rdx\n\tmovq\t%rdx, %rax\n\tmovq\t%rax, -40(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovq\t%rax, -32(%rbp)\n.L2:\n\tcmpl\t$0, -56(%rbp)\n\tjne\t.L3\n\tmovq\t-32(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl extended_gcd\n.type extended_gcd, @function\nextended_gcd:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\txorl\t%ecx, %ecx\n\tmovl\t$1, %edi\n.L2:\n\ttestl\t%esi, %esi\n\tje\t.L5\n\tcltd\n\tidivl\t%esi\n\tcltq\n\timulq\t%rdi, %rax\n\tsubq\t%rax, %rcx\n\tmovq\t%rcx, %rax\n\tmovq\t%rdi, %rcx\n\tmovq\t%rax, %rdi\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %esi\n\tjmp\t.L2\n.L5:\n\tmovl\t%ecx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl extended_gcd\n.type extended_gcd, @function\nextended_gcd:\n.LFB50:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\ttestl\t%esi, %esi\n\tje\t.L4\n\txorl\t%r8d, %r8d\n\tmovl\t$1, %edi\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovq\t%rdx, %rdi\n.L3:\n\tcltd\n\tidivl\t%esi\n\tmovslq\t%eax, %rcx\n\tmovl\t%esi, %eax\n\tmovl\t%edx, %esi\n\tmovq\t%r8, %rdx\n\timulq\t%rdi, %rcx\n\tmovq\t%rdi, %r8\n\tsubq\t%rcx, %rdx\n\ttestl\t%esi, %esi\n\tjne\t.L5\n\tmovl\t%edi, %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 extended_gcd\n.type extended_gcd, %function\nextended_gcd:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #64\n\t.cfi_def_cfa_offset 64\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tmov\tx0, 1\n\tstr\tx0, [sp, 24]\n\tstr\txzr, [sp, 32]\n\tb\t.L2\n.L3:\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tsdiv\tw0, w1, w0\n\tsxtw\tx0, w0\n\tstr\tx0, [sp, 40]\n\tldr\tw0, [sp, 12]\n\tldr\tw1, [sp, 8]\n\tsdiv\tw2, w0, w1\n\tldr\tw1, [sp, 8]\n\tmul\tw1, w2, w1\n\tsub\tw0, w0, w1\n\tsxtw\tx0, w0\n\tstr\tx0, [sp, 48]\n\tldr\tw0, [sp, 8]\n\tstr\tw0, [sp, 12]\n\tldr\tx0, [sp, 48]\n\tstr\tw0, [sp, 8]\n\tldr\tx0, [sp, 24]\n\tstr\tx0, [sp, 56]\n\tldr\tx1, [sp, 40]\n\tldr\tx0, [sp, 24]\n\tmul\tx0, x1, x0\n\tldr\tx1, [sp, 32]\n\tsub\tx0, x1, x0\n\tstr\tx0, [sp, 24]\n\tldr\tx0, [sp, 56]\n\tstr\tx0, [sp, 32]\n.L2:\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\tx0, [sp, 32]\n\tadd\tsp, sp, 64\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global extended_gcd\n.type extended_gcd, %function\nextended_gcd:\n.LFB35:\n\t.cfi_startproc\n\tmov\tw3, w0\n\tmov\tx4, 1\n\tmov\tx0, 0\n.L2:\n\tcbnz\tw1, .L3\n\tret\n.L3:\n\tsdiv\tw2, w3, w1\n\tmsub\tw5, w2, w1, w3\n\tsxtw\tx2, w2\n\tmov\tw3, w1\n\tmov\tw1, w5\n\tmsub\tx2, x2, x4, x0\n\tmov\tx0, x4\n\tmov\tx4, x2\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global extended_gcd\n.type extended_gcd, %function\nextended_gcd:\n.LFB50:\n\t.cfi_startproc\n\tcbz\tw1, .L4\n\tmov\tx4, 0\n\tmov\tx3, 1\n\tb\t.L3\n\t.p2align 2,,3\n.L5:\n\tmov\tx3, x2\n.L3:\n\tsdiv\tw2, w0, w1\n\tmov\tw5, w1\n\tmsub\tw1, w2, w1, w0\n\tsxtw\tx2, w2\n\tmov\tw0, w5\n\tmsub\tx2, x2, x3, x4\n\tmov\tx4, x3\n\tcbnz\tw1, .L5\n\tmov\tw0, w3\n\tret\n\t.p2align 2,,3\n.L4:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "122", "30" ], "var": [ "a", "b" ] }, { "value": [ "55", "74" ], "var": [ "a", "b" ] }, { "value": [ "0", "51" ], "var": [ "a", "b" ] }, { "value": [ "123", "22" ], "var": [ "a", "b" ] }, { "value": [ "125", "115" ], "var": [ "a", "b" ] }, { "value": [ "35", "4" ], "var": [ "a", "b" ] }, { "value": [ "92", "64" ], "var": [ "a", "b" ] }, { "value": [ "35", "20" ], "var": [ "a", "b" ] }, { "value": [ "55", "46" ], "var": [ "a", "b" ] }, { "value": [ "40", "53" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "-4" ], "var": [ "returnv" ] }, { "value": [ "-26" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "12" ], "var": [ "returnv" ] }, { "value": [ "9" ], "var": [ "returnv" ] }, { "value": [ "-10" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "-3" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62_5wkjkpl.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 = extended_gcd(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "extended_gcd", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62_5wkjkpl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.target/powerpc/440-mulhhw-2.c
int f(int b, int c) { int a = (b >> 16) * (c >> 16); if (!a) return 10; return a; }
int f(intb, intc)
int f(int b, int c)
f
[ "int", "int", "int" ]
{ "code": [ ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovl\t%esi, -24(%rbp)\n\tmovl\t-20(%rbp), %eax\n\tsarl\t$16, %eax\n\tmovl\t%eax, %edx\n\tmovl\t-24(%rbp), %eax\n\tsarl\t$16, %eax\n\timull\t%edx, %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$10, %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 f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\tsarl\t$16, %edi\n\tsarl\t$16, %eax\n\timull\t%edi, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L1\n\tmovl\t$10, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%esi, %eax\n\tsarl\t$16, %edi\n\tmovl\t$10, %edx\n\tsarl\t$16, %eax\n\timull\t%edi, %eax\n\ttestl\t%eax, %eax\n\tcmove\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tasr\tw1, w0, 16\n\tldr\tw0, [sp, 8]\n\tasr\tw0, w0, 16\n\tmul\tw0, w1, w0\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, 10\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 28]\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tasr\tw1, w1, 16\n\tasr\tw0, w0, 16\n\tmul\tw0, w0, w1\n\tmov\tw1, 10\n\tcmp\tw0, 0\n\tcsel\tw0, w0, w1, ne\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tasr\tw1, w1, 16\n\tasr\tw0, w0, 16\n\tmov\tw2, 10\n\tmul\tw0, w0, w1\n\tcmp\tw0, 0\n\tcsel\tw0, w0, w2, ne\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "64", "18" ], "var": [ "b", "c" ] }, { "value": [ "36", "104" ], "var": [ "b", "c" ] }, { "value": [ "18", "28" ], "var": [ "b", "c" ] }, { "value": [ "40", "22" ], "var": [ "b", "c" ] }, { "value": [ "36", "50" ], "var": [ "b", "c" ] }, { "value": [ "12", "104" ], "var": [ "b", "c" ] }, { "value": [ "108", "39" ], "var": [ "b", "c" ] }, { "value": [ "114", "60" ], "var": [ "b", "c" ] }, { "value": [ "94", "117" ], "var": [ "b", "c" ] }, { "value": [ "91", "77" ], "var": [ "b", "c" ] } ], "output": [ { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_3436gx2cu1.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 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 b = input_json["b"]; int c = input_json["c"]; clock_t begin = clock(); int returnv = f(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(b, c, returnv); }
arm-hot-cold
null
{"livein": ["b", "c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f", "funargs": ["b", "c"], "typemap": {"b": "int32", "c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_3436gx2cu1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
stnava/ANTs/Temporary/topological_numbers.h
int associatedConnectivity(int connectivity) { switch(connectivity) { case 1: return 2; break; case 2: return 1; break; case 3: return 4; break; case 4: return 3; break; default: return 2; break; } return 0; }
int associatedConnectivity(intconnectivity)
int associatedConnectivity(int connectivity)
associatedConnectivity
[ "int", "int" ]
{ "code": [ ".globl associatedConnectivity\n.type associatedConnectivity, @function\nassociatedConnectivity:\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$4, -4(%rbp)\n\tje\t.L2\n\tcmpl\t$4, -4(%rbp)\n\tjg\t.L3\n\tcmpl\t$3, -4(%rbp)\n\tje\t.L4\n\tcmpl\t$3, -4(%rbp)\n\tjg\t.L3\n\tcmpl\t$1, -4(%rbp)\n\tje\t.L5\n\tcmpl\t$2, -4(%rbp)\n\tje\t.L6\n\tjmp\t.L3\n.L5:\n\tmovl\t$2, %eax\n\tjmp\t.L7\n.L6:\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L4:\n\tmovl\t$4, %eax\n\tjmp\t.L7\n.L2:\n\tmovl\t$3, %eax\n\tjmp\t.L7\n.L3:\n\tmovl\t$2, %eax\n.L7:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl associatedConnectivity\n.type associatedConnectivity, @function\nassociatedConnectivity:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$2, %edi\n\tmovl\t$2, %eax\n\tcmpl\t$2, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl associatedConnectivity\n.type associatedConnectivity, @function\nassociatedConnectivity:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$2, %edi\n\tmovl\t$2, %eax\n\tcmpl\t$2, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovl\t(%rax,%rdi,4), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global associatedConnectivity\n.type associatedConnectivity, %function\nassociatedConnectivity:\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, 4\n\tbeq\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbeq\t.L4\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbeq\t.L5\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2\n\tbeq\t.L6\n\tb\t.L3\n.L5:\n\tmov\tw0, 2\n\tb\t.L7\n.L6:\n\tmov\tw0, 1\n\tb\t.L7\n.L4:\n\tmov\tw0, 4\n\tb\t.L7\n.L2:\n\tmov\tw0, 3\n\tb\t.L7\n.L3:\n\tmov\tw0, 2\n.L7:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global associatedConnectivity\n.type associatedConnectivity, %function\nassociatedConnectivity:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #2\n\tcmp\tw0, 2\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, w0, uxtw]\n.L1:\n\tret\n.L3:\n\tmov\tw0, 2\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global associatedConnectivity\n.type associatedConnectivity, %function\nassociatedConnectivity:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #2\n\tcmp\tw0, 2\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw0, [x1, w0, uxtw 2]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 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": [ "38" ], "var": [ "connectivity" ] }, { "value": [ "64" ], "var": [ "connectivity" ] }, { "value": [ "8" ], "var": [ "connectivity" ] }, { "value": [ "86" ], "var": [ "connectivity" ] }, { "value": [ "0" ], "var": [ "connectivity" ] }, { "value": [ "62" ], "var": [ "connectivity" ] }, { "value": [ "52" ], "var": [ "connectivity" ] }, { "value": [ "101" ], "var": [ "connectivity" ] }, { "value": [ "78" ], "var": [ "connectivity" ] }, { "value": [ "35" ], "var": [ "connectivity" ] } ], "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_32ryyux7y7.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 connectivity, 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 connectivity = input_json["connectivity"]; clock_t begin = clock(); int returnv = associatedConnectivity(connectivity); 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(connectivity, returnv); }
master
null
{"livein": ["connectivity"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "associatedConnectivity", "funargs": ["connectivity"], "typemap": {"connectivity": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32ryyux7y7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jbush001/NyuziProcessor/tests/whole-program/meteor-contest-noverilator.c
char first_empty_cell(char *cell, char minimum) { char first_empty = minimum; while(first_empty == cell[0] || first_empty == cell[1] || first_empty == cell[2] || first_empty == cell[3] || first_empty == cell[4]) first_empty++; return first_empty; }
char first_empty_cell(char *cell, charminimum)
char first_empty_cell(char *cell, char minimum)
first_empty_cell
[ "char", "char *", "char" ]
{ "code": [ ".globl first_empty_cell\n.type first_empty_cell, @function\nfirst_empty_cell:\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, %eax\n\tmovb\t%al, -28(%rbp)\n\tmovzbl\t-28(%rbp), %eax\n\tmovb\t%al, -1(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovzbl\t-1(%rbp), %eax\n\taddl\t$1, %eax\n\tmovb\t%al, -1(%rbp)\n.L2:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -1(%rbp)\n\tje\t.L3\n\tmovq\t-24(%rbp), %rax\n\taddq\t$1, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -1(%rbp)\n\tje\t.L3\n\tmovq\t-24(%rbp), %rax\n\taddq\t$2, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -1(%rbp)\n\tje\t.L3\n\tmovq\t-24(%rbp), %rax\n\taddq\t$3, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -1(%rbp)\n\tje\t.L3\n\tmovq\t-24(%rbp), %rax\n\taddq\t$4, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, -1(%rbp)\n\tje\t.L3\n\tmovzbl\t-1(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl first_empty_cell\n.type first_empty_cell, @function\nfirst_empty_cell:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t(%rdi), %dl\n\tmovl\t%esi, %eax\n.L2:\n\tcmpb\t%al, %dl\n\tjne\t.L5\n.L3:\n\tincl\t%eax\n\tjmp\t.L2\n.L5:\n\tcmpb\t1(%rdi), %al\n\tje\t.L3\n\tcmpb\t2(%rdi), %al\n\tje\t.L3\n\tcmpb\t3(%rdi), %al\n\tje\t.L3\n\tcmpb\t4(%rdi), %al\n\tje\t.L3\n\tret\n\t.cfi_endproc\n\n", ".globl first_empty_cell\n.type first_empty_cell, @function\nfirst_empty_cell:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rdi), %edx\n\tmovzbl\t1(%rdi), %ecx\n\tmovl\t%esi, %eax\n\tmovzbl\t3(%rdi), %r8d\n\tmovzbl\t2(%rdi), %esi\n\tmovzbl\t4(%rdi), %edi\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\taddl\t$1, %eax\n.L2:\n\tcmpb\t%al, %dl\n\tje\t.L3\n\tcmpb\t%cl, %al\n\tje\t.L3\n\tcmpb\t%sil, %al\n\tje\t.L3\n\tcmpb\t%r8b, %al\n\tje\t.L3\n\tcmpb\t%dil, %al\n\tje\t.L3\n\tret\n\t.cfi_endproc\n\n", ".global first_empty_cell\n.type first_empty_cell, %function\nfirst_empty_cell:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstrb\tw1, [sp, 7]\n\tldrb\tw0, [sp, 7]\n\tstrb\tw0, [sp, 31]\n\tb\t.L2\n.L3:\n\tldrb\tw0, [sp, 31]\n\tadd\tw0, w0, 1\n\tstrb\tw0, [sp, 31]\n.L2:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 2\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 3\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 4\n\tldrb\tw0, [x0]\n\tldrb\tw1, [sp, 31]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldrb\tw0, [sp, 31]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global first_empty_cell\n.type first_empty_cell, %function\nfirst_empty_cell:\n.LFB24:\n\t.cfi_startproc\n\tmov\tx2, x0\n\tand\tw0, w1, 255\n\tldrb\tw3, [x2]\n.L2:\n\tcmp\tw3, w0\n\tbeq\t.L3\n\tldrb\tw1, [x2, 1]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldrb\tw1, [x2, 2]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldrb\tw1, [x2, 3]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tldrb\tw1, [x2, 4]\n\tcmp\tw1, w0\n\tbeq\t.L3\n\tret\n.L3:\n\tadd\tw1, w0, 1\n\tand\tw0, w1, 255\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global first_empty_cell\n.type first_empty_cell, %function\nfirst_empty_cell:\n.LFB39:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tand\tw1, w1, 255\n\tldrb\tw3, [x0, 1]\n\tldrb\tw4, [x0, 2]\n\tldrb\tw5, [x0, 3]\n\tldrb\tw6, [x0, 4]\n\t.p2align 3,,7\n.L2:\n\tadd\tw0, w1, 1\n\tcmp\tw2, w1\n\tbeq\t.L3\n\tcmp\tw1, w3\n\tbeq\t.L3\n\tcmp\tw1, w4\n\tbeq\t.L3\n\tcmp\tw1, w5\n\tbeq\t.L3\n\tcmp\tw1, w6\n\tbne\t.L5\n\t.p2align 3,,7\n.L3:\n\tand\tw1, w0, 255\n\tb\t.L2\n\t.p2align 2,,3\n.L5:\n\tmov\tw0, w1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "\"kdfarfnaaskenhtcbokloezyhsm\"", "88" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"pwhnvarfrpoxeiezkwshuypmfmiij\"", "124" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"dnadoqsbelzghuubvz\"", "25" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"nyil\"", "65" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"ggghymhsimfc\"", "91" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"vqb\"", "17" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"lrumeruoph\"", "64" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"lzvtulewkftubnpirhzxseievybbn\"", "93" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"yagmdnfwgrr\"", "28" ], "var": [ "cell", "minimum" ] }, { "value": [ "\"tqwlngncwk\"", "112" ], "var": [ "cell", "minimum" ] } ], "output": [ { "value": [ "\"kdfarfnaaskenhtcbokloezyhsm\"", "88" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"pwhnvarfrpoxeiezkwshuypmfmiij\"", "124" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"dnadoqsbelzghuubvz\"", "25" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"nyil\"", "65" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"ggghymhsimfc\"", "91" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"vqb\"", "17" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"lrumeruoph\"", "64" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"lzvtulewkftubnpirhzxseievybbn\"", "93" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"yagmdnfwgrr\"", "28" ], "var": [ "cell", "returnv" ] }, { "value": [ "\"tqwlngncwk\"", "112" ], "var": [ "cell", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60pw9e7no8.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* cell, char minimum, char returnv) { json output_json; output_json["cell"] = cell; 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* cell = strdup(input_json["cell"].get<std::string>().c_str()); char minimum = input_json["minimum"].get<char>(); clock_t begin = clock(); char returnv = first_empty_cell(cell, minimum); 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(cell, minimum, returnv); }
master
null
{"livein": ["cell", "minimum"], "liveout": ["cell"], "returnvarname": ["returnv"], "execcmd": "", "funname": "first_empty_cell", "funargs": ["cell", "minimum"], "typemap": {"cell": "string", "minimum": "int8", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60pw9e7no8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
evan886/learn-c/mysrc/p15.c
int maxof(int x, int y) { if (x > y ) return (x); else return (y); }
int maxof(intx, inty)
int maxof(int x, int y)
maxof
[ "int", "int", "int" ]
{ "code": [ ".globl maxof\n.type maxof, @function\nmaxof:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-8(%rbp), %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl maxof\n.type maxof, @function\nmaxof:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl maxof\n.type maxof, @function\nmaxof:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovge\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global maxof\n.type maxof, %function\nmaxof:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tble\t.L2\n\tldr\tw0, [sp, 12]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 8]\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global maxof\n.type maxof, %function\nmaxof:\n.LFB13:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n", ".global maxof\n.type maxof, %function\nmaxof:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, ge\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> # 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": [ "90", "30" ], "var": [ "x", "y" ] }, { "value": [ "106", "100" ], "var": [ "x", "y" ] }, { "value": [ "121", "27" ], "var": [ "x", "y" ] }, { "value": [ "102", "11" ], "var": [ "x", "y" ] }, { "value": [ "126", "85" ], "var": [ "x", "y" ] }, { "value": [ "16", "56" ], "var": [ "x", "y" ] }, { "value": [ "103", "79" ], "var": [ "x", "y" ] }, { "value": [ "83", "96" ], "var": [ "x", "y" ] }, { "value": [ "95", "75" ], "var": [ "x", "y" ] }, { "value": [ "24", "36" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "90" ], "var": [ "returnv" ] }, { "value": [ "106" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "102" ], "var": [ "returnv" ] }, { "value": [ "126" ], "var": [ "returnv" ] }, { "value": [ "56" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "96" ], "var": [ "returnv" ] }, { "value": [ "95" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_47lpehds_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(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 = maxof(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": "maxof", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47lpehds_1.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
pokebyte/blueberryMSX/Src/Language/LanguageMinimal.c
char* langEnumControlsJoyMouse() { return "Mouse"; }
char * langEnumControlsJoyMouse()
char* langEnumControlsJoyMouse()
langEnumControlsJoyMouse
[ "char *", "" ]
{ "code": [ ".globl langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, @function\nlangEnumControlsJoyMouse:\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\"Mouse\"\n", ".globl langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, @function\nlangEnumControlsJoyMouse:\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\"Mouse\"\n", ".globl langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, @function\nlangEnumControlsJoyMouse:\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\"Mouse\"\n", ".global langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, %function\nlangEnumControlsJoyMouse:\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\"Mouse\"\n", ".global langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, %function\nlangEnumControlsJoyMouse:\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\"Mouse\"\n", ".global langEnumControlsJoyMouse\n.type langEnumControlsJoyMouse, %function\nlangEnumControlsJoyMouse:\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\"Mouse\"\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": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] }, { "value": [ "\"Mouse\"" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62i4r_r6fg.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 = langEnumControlsJoyMouse(); 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": "langEnumControlsJoyMouse", "funargs": [], "typemap": {"returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62i4r_r6fg.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
citronalco/mvpmc/libs/libav/sim.c
int av_reset(void) { return 0; }
int av_reset()
int av_reset(void)
av_reset
[ "int", "" ]
{ "code": [ ".globl av_reset\n.type av_reset, @function\nav_reset:\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 av_reset\n.type av_reset, @function\nav_reset:\n.LFB37:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl av_reset\n.type av_reset, @function\nav_reset:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global av_reset\n.type av_reset, %function\nav_reset:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global av_reset\n.type av_reset, %function\nav_reset:\n.LFB37:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global av_reset\n.type av_reset, %function\nav_reset:\n.LFB52:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.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": [] }, { "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_2959jb2za_.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 = av_reset(); 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": "av_reset", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_2959jb2za_.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
khaledkhunaifer/LightDataC/include/lightdata/set.h
int int_max(int a, int b) { return a > b ? a : b; }
int int_max(inta, intb)
int int_max(int a, int b)
int_max
[ "int", "int", "int" ]
{ "code": [ ".globl int_max\n.type int_max, @function\nint_max:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t%eax, -8(%rbp)\n\tcmovge\t-8(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl int_max\n.type int_max, @function\nint_max:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl int_max\n.type int_max, @function\nint_max:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%edi, %esi\n\tmovl\t%edi, %eax\n\tcmovge\t%esi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global int_max\n.type int_max, %function\nint_max:\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\tldr\tw2, [sp, 8]\n\tldr\tw1, [sp, 8]\n\tcmp\tw2, w0\n\tcsel\tw0, w1, w0, ge\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global int_max\n.type int_max, %function\nint_max:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw1, w0\n\tcsel\tw0, w1, w0, ge\n\tret\n\t.cfi_endproc\n\n", ".global int_max\n.type int_max, %function\nint_max:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw1, w0\n\tcsel\tw0, w1, w0, 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
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "118", "0" ], "var": [ "a", "b" ] }, { "value": [ "74", "32" ], "var": [ "a", "b" ] }, { "value": [ "52", "119" ], "var": [ "a", "b" ] }, { "value": [ "50", "69" ], "var": [ "a", "b" ] }, { "value": [ "21", "122" ], "var": [ "a", "b" ] }, { "value": [ "10", "79" ], "var": [ "a", "b" ] }, { "value": [ "103", "13" ], "var": [ "a", "b" ] }, { "value": [ "74", "26" ], "var": [ "a", "b" ] }, { "value": [ "27", "52" ], "var": [ "a", "b" ] }, { "value": [ "117", "38" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "118" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "119" ], "var": [ "returnv" ] }, { "value": [ "69" ], "var": [ "returnv" ] }, { "value": [ "122" ], "var": [ "returnv" ] }, { "value": [ "79" ], "var": [ "returnv" ] }, { "value": [ "103" ], "var": [ "returnv" ] }, { "value": [ "74" ], "var": [ "returnv" ] }, { "value": [ "52" ], "var": [ "returnv" ] }, { "value": [ "117" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_335fz_opuy.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 = int_max(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": "int_max", "funargs": ["a", "b"], "typemap": {"a": "int32", "b": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_335fz_opuy.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_348() { return 348; }
int do_348()
int do_348()
do_348
[ "int", "" ]
{ "code": [ ".globl do_348\n.type do_348, @function\ndo_348:\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$348, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_348\n.type do_348, @function\ndo_348:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$348, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_348\n.type do_348, @function\ndo_348:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$348, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_348\n.type do_348, %function\ndo_348:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 348\n\tret\n\t.cfi_endproc\n\n", ".global do_348\n.type do_348, %function\ndo_348:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 348\n\tret\n\t.cfi_endproc\n\n", ".global do_348\n.type do_348, %function\ndo_348:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 348\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": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] }, { "value": [ "348" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53he1mp_ll.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_348(); 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_348", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53he1mp_ll.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
feliposz/learning-stuff/c/constructs.c
int do_e() {return 1;}
int do_e()
int do_e()
do_e
[ "int", "" ]
{ "code": [ ".globl do_e\n.type do_e, @function\ndo_e:\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 do_e\n.type do_e, @function\ndo_e:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_e\n.type do_e, @function\ndo_e:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_e\n.type do_e, %function\ndo_e:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global do_e\n.type do_e, %function\ndo_e:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global do_e\n.type do_e, %function\ndo_e:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_29km2hyrq2.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_e(); 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_e", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29km2hyrq2.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.target/powerpc/440-nmacchw-1.c
int f(int a, int b, int c) { a -= (short)b * (c >> 16); return a; }
int f(inta, intb, intc)
int f(int a, int b, int c)
f
[ "int", "int", "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%esi, -8(%rbp)\n\tmovl\t%edx, -12(%rbp)\n\tmovl\t-8(%rbp), %eax\n\tcwtl\n\tmovl\t-12(%rbp), %edx\n\tsarl\t$16, %edx\n\timull\t%edx, %eax\n\tsubl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsarl\t$16, %edx\n\tmovswl\t%si, %esi\n\tmovl\t%edi, %eax\n\timull\t%esi, %edx\n\tsubl\t%edx, %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\tsarl\t$16, %edx\n\tmovswl\t%si, %esi\n\tmovl\t%edi, %eax\n\timull\t%esi, %edx\n\tsubl\t%edx, %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\tstr\tw1, [sp, 8]\n\tstr\tw2, [sp, 4]\n\tldr\tw0, [sp, 8]\n\tsxth\tw0, w0\n\tmov\tw1, w0\n\tldr\tw0, [sp, 4]\n\tasr\tw0, w0, 16\n\tmul\tw0, w1, w0\n\tldr\tw1, [sp, 12]\n\tsub\tw0, w1, w0\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 f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tasr\tw2, w2, 16\n\tsxth\tw1, w1\n\tmsub\tw0, w2, w1, w0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tsxth\tw1, w1\n\tasr\tw2, w2, 16\n\tmsub\tw0, w2, w1, w0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "92", "21", "15" ], "var": [ "a", "b", "c" ] }, { "value": [ "104", "5", "39" ], "var": [ "a", "b", "c" ] }, { "value": [ "82", "13", "69" ], "var": [ "a", "b", "c" ] }, { "value": [ "65", "124", "33" ], "var": [ "a", "b", "c" ] }, { "value": [ "104", "101", "6" ], "var": [ "a", "b", "c" ] }, { "value": [ "0", "29", "74" ], "var": [ "a", "b", "c" ] }, { "value": [ "65", "106", "83" ], "var": [ "a", "b", "c" ] }, { "value": [ "24", "64", "21" ], "var": [ "a", "b", "c" ] }, { "value": [ "126", "29", "35" ], "var": [ "a", "b", "c" ] }, { "value": [ "8", "36", "88" ], "var": [ "a", "b", "c" ] } ], "output": [ { "value": [ "92" ], "var": [ "returnv" ] }, { "value": [ "104" ], "var": [ "returnv" ] }, { "value": [ "82" ], "var": [ "returnv" ] }, { "value": [ "65" ], "var": [ "returnv" ] }, { "value": [ "104" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "65" ], "var": [ "returnv" ] }, { "value": [ "24" ], "var": [ "returnv" ] }, { "value": [ "126" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_34h10ldypr.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 = f(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); }
arm-hot-cold
null
{"livein": ["a", "b", "c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "f", "funargs": ["a", "b", "c"], "typemap": {"a": "int32", "b": "int32", "c": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_34h10ldypr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
meko-algo/algorithms/search/binary_search.c
int _binary_search(int nums[], int l, int r, int x) { if (r >= l) { int mid = (l + r) / 2; if (nums[mid] == x) return mid; else if (nums[mid] > x) return _binary_search(nums, l, mid - 1, x); else return _binary_search(nums, mid + 1, r, x); } return -1; }
int _binary_search(int *nums, intl, intr, intx)
int _binary_search(int nums[], int l, int r, int x)
_binary_search
[ "int", "int *", "int", "int", "int" ]
{ "code": [ ".globl _binary_search\n.type _binary_search, @function\n_binary_search:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$48, %rsp\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, -28(%rbp)\n\tmovl\t%edx, -32(%rbp)\n\tmovl\t%ecx, -36(%rbp)\n\tmovl\t-32(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjl\t.L2\n\tmovl\t-28(%rbp), %edx\n\tmovl\t-32(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovl\t%eax, -4(%rbp)\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), %eax\n\tcmpl\t%eax, -36(%rbp)\n\tjne\t.L3\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L4\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), %eax\n\tcmpl\t%eax, -36(%rbp)\n\tjge\t.L5\n\tmovl\t-4(%rbp), %eax\n\tleal\t-1(%rax), %edi\n\tmovl\t-36(%rbp), %edx\n\tmovl\t-28(%rbp), %esi\n\tmovq\t-24(%rbp), %rax\n\tmovl\t%edx, %ecx\n\tmovl\t%edi, %edx\n\tmovq\t%rax, %rdi\n\tcall\t_binary_search\n\tjmp\t.L4\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tleal\t1(%rax), %esi\n\tmovl\t-36(%rbp), %ecx\n\tmovl\t-32(%rbp), %edx\n\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, %rdi\n\tcall\t_binary_search\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 _binary_search\n.type _binary_search, @function\n_binary_search:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edx, %r8d\n\tmovl\t$2, %r10d\n.L2:\n\tcmpl\t%esi, %r8d\n\tjl\t.L6\n\tleal\t(%r8,%rsi), %eax\n\tcltd\n\tidivl\t%r10d\n\tmovslq\t%eax, %rdx\n\tmovl\t%eax, %r9d\n\tcmpl\t%ecx, (%rdi,%rdx,4)\n\tje\t.L1\n\tjle\t.L4\n\tleal\t-1(%rax), %r8d\n\tjmp\t.L2\n.L4:\n\tleal\t1(%rax), %esi\n\tjmp\t.L2\n.L6:\n\torl\t$-1, %r9d\n.L1:\n\tmovl\t%r9d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl _binary_search\n.type _binary_search, @function\n_binary_search:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\t.p2align 4,,10\n\t.p2align 3\n.L9:\n\tcmpl\t%edx, %esi\n\tjg\t.L7\n.L2:\n\tleal\t(%rdx,%rsi), %r8d\n\tmovl\t%r8d, %eax\n\tshrl\t$31, %eax\n\taddl\t%r8d, %eax\n\tsarl\t%eax\n\tmovslq\t%eax, %r8\n\tcmpl\t%ecx, (%rdi,%r8,4)\n\tje\t.L1\n\tjle\t.L4\n\tleal\t-1(%rax), %edx\n\tcmpl\t%esi, %edx\n\tjge\t.L2\n.L7:\n\tmovl\t$-1, %eax\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleal\t1(%rax), %esi\n\tjmp\t.L9\n\t.cfi_endproc\n\n", ".global _binary_search\n.type _binary_search, %function\n_binary_search:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tx0, [sp, 40]\n\tstr\tw1, [sp, 36]\n\tstr\tw2, [sp, 32]\n\tstr\tw3, [sp, 28]\n\tldr\tw1, [sp, 32]\n\tldr\tw0, [sp, 36]\n\tcmp\tw1, w0\n\tblt\t.L2\n\tldr\tw1, [sp, 36]\n\tldr\tw0, [sp, 32]\n\tadd\tw0, w1, w0\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tstr\tw0, [sp, 60]\n\tldrsw\tx0, [sp, 60]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldr\tw0, [x0]\n\tldr\tw1, [sp, 28]\n\tcmp\tw1, w0\n\tbne\t.L3\n\tldr\tw0, [sp, 60]\n\tb\t.L4\n.L3:\n\tldrsw\tx0, [sp, 60]\n\tlsl\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldr\tw0, [x0]\n\tldr\tw1, [sp, 28]\n\tcmp\tw1, w0\n\tbge\t.L5\n\tldr\tw0, [sp, 60]\n\tsub\tw0, w0, #1\n\tldr\tw3, [sp, 28]\n\tmov\tw2, w0\n\tldr\tw1, [sp, 36]\n\tldr\tx0, [sp, 40]\n\tbl\t_binary_search\n\tb\t.L4\n.L5:\n\tldr\tw0, [sp, 60]\n\tadd\tw0, w0, 1\n\tldr\tw3, [sp, 28]\n\tldr\tw2, [sp, 32]\n\tmov\tw1, w0\n\tldr\tx0, [sp, 40]\n\tbl\t_binary_search\n\tb\t.L4\n.L2:\n\tmov\tw0, -1\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 _binary_search\n.type _binary_search, %function\n_binary_search:\n.LFB13:\n\t.cfi_startproc\n\tmov\tx5, x0\n\tmov\tw6, 2\n.L2:\n\tcmp\tw2, w1\n\tblt\t.L6\n\tadd\tw4, w2, w1\n\tsdiv\tw0, w4, w6\n\tldr\tw4, [x5, w0, sxtw 2]\n\tcmp\tw4, w3\n\tbeq\t.L1\n\tble\t.L4\n\tsub\tw2, w0, #1\n\tb\t.L2\n.L4:\n\tadd\tw1, w0, 1\n\tb\t.L2\n.L6:\n\tmov\tw0, -1\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global _binary_search\n.type _binary_search, %function\n_binary_search:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tw1, w2\n\tmov\tx5, x0\n\tbgt\t.L7\n\t.p2align 3,,7\n.L2:\n\tadd\tw0, w2, w1\n\tadd\tw0, w0, w0, lsr 31\n\tasr\tw0, w0, 1\n\tldr\tw4, [x5, w0, sxtw 2]\n\tcmp\tw4, w3\n\tbeq\t.L1\n\tble\t.L4\n\tsub\tw2, w0, #1\n\tcmp\tw2, w1\n\tbge\t.L2\n.L7:\n\tmov\tw0, -1\n.L1:\n\tret\n\t.p2align 2,,3\n.L4:\n\tadd\tw1, w0, 1\n\tcmp\tw1, w2\n\tble\t.L2\n\tmov\tw0, -1\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 <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": [ "[32, 124, 101, 126, 90, 34, 123, 113, 21, 10, 64, 77, 99, 30, 83, 65, 33, 0, 84, 26, 1, 116, 76, 40, 120, 120, 54, 83, 64, 110, 103, 99]", "10", "83", "25" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[0, 35, 108, 16, 124, 5, 82, 65, 68, 125, 53, 120, 75, 119, 108, 33, 13, 101, 43, 73, 42, 39, 20, 96, 119, 122, 113, 117, 107, 109, 76, 88]", "45", "21", "2" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[27, 58, 53, 33, 102, 77, 60, 29, 111, 24, 76, 75, 6, 111, 13, 97, 60, 51, 78, 106, 58, 123, 18, 48, 88, 84, 18, 118, 11, 66, 121, 63]", "84", "67", "26" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[36, 57, 50, 98, 125, 77, 50, 15, 116, 14, 29, 43, 12, 6, 120, 80, 54, 55, 97, 107, 121, 31, 66, 116, 11, 67, 111, 67, 104, 122, 73, 121]", "18", "54", "86" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[25, 72, 88, 36, 76, 47, 123, 108, 58, 83, 56, 114, 96, 4, 125, 26, 110, 0, 11, 104, 52, 13, 105, 89, 0, 87, 110, 95, 68, 13, 122, 84]", "22", "26", "12" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[16, 90, 71, 51, 91, 117, 11, 84, 6, 27, 110, 39, 111, 67, 99, 71, 125, 75, 2, 85, 121, 120, 8, 123, 11, 40, 26, 33, 23, 90, 97, 3]", "66", "103", "37" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[123, 14, 104, 32, 89, 10, 63, 45, 8, 96, 100, 1, 94, 23, 120, 52, 80, 82, 70, 72, 1, 6, 64, 101, 21, 106, 34, 94, 70, 30, 86, 121]", "3", "118", "125" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[11, 53, 69, 94, 26, 76, 55, 80, 118, 117, 118, 115, 112, 14, 102, 52, 82, 19, 35, 84, 11, 37, 105, 42, 125, 113, 122, 15, 10, 39, 116, 13]", "77", "67", "92" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[47, 11, 0, 115, 109, 13, 47, 62, 118, 72, 64, 22, 18, 124, 14, 96, 85, 64, 82, 110, 21, 87, 46, 8, 88, 21, 79, 30, 122, 99, 105, 100]", "42", "89", "47" ], "var": [ "nums", "l", "r", "x" ] }, { "value": [ "[45, 118, 10, 111, 30, 14, 11, 82, 53, 104, 14, 70, 25, 77, 73, 37, 29, 28, 12, 21, 120, 4, 61, 2, 114, 95, 32, 28, 88, 18, 63, 60]", "63", "123", "91" ], "var": [ "nums", "l", "r", "x" ] } ], "output": [ { "value": [ "[32, 124, 101, 126, 90, 34, 123, 113, 21, 10, 64, 77, 99, 30, 83, 65, 33, 0, 84, 26, 1, 116, 76, 40, 120, 120, 54, 83, 64, 110, 103, 99]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[0, 35, 108, 16, 124, 5, 82, 65, 68, 125, 53, 120, 75, 119, 108, 33, 13, 101, 43, 73, 42, 39, 20, 96, 119, 122, 113, 117, 107, 109, 76, 88]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[27, 58, 53, 33, 102, 77, 60, 29, 111, 24, 76, 75, 6, 111, 13, 97, 60, 51, 78, 106, 58, 123, 18, 48, 88, 84, 18, 118, 11, 66, 121, 63]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[36, 57, 50, 98, 125, 77, 50, 15, 116, 14, 29, 43, 12, 6, 120, 80, 54, 55, 97, 107, 121, 31, 66, 116, 11, 67, 111, 67, 104, 122, 73, 121]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[25, 72, 88, 36, 76, 47, 123, 108, 58, 83, 56, 114, 96, 4, 125, 26, 110, 0, 11, 104, 52, 13, 105, 89, 0, 87, 110, 95, 68, 13, 122, 84]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[16, 90, 71, 51, 91, 117, 11, 84, 6, 27, 110, 39, 111, 67, 99, 71, 125, 75, 2, 85, 121, 120, 8, 123, 11, 40, 26, 33, 23, 90, 97, 3]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[123, 14, 104, 32, 89, 10, 63, 45, 8, 96, 100, 1, 94, 23, 120, 52, 80, 82, 70, 72, 1, 6, 64, 101, 21, 106, 34, 94, 70, 30, 86, 121]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[11, 53, 69, 94, 26, 76, 55, 80, 118, 117, 118, 115, 112, 14, 102, 52, 82, 19, 35, 84, 11, 37, 105, 42, 125, 113, 122, 15, 10, 39, 116, 13]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[47, 11, 0, 115, 109, 13, 47, 62, 118, 72, 64, 22, 18, 124, 14, 96, 85, 64, 82, 110, 21, 87, 46, 8, 88, 21, 79, 30, 122, 99, 105, 100]", "-1" ], "var": [ "nums", "returnv" ] }, { "value": [ "[45, 118, 10, 111, 30, 14, 11, 82, 53, 104, 14, 70, 25, 77, 73, 37, 29, 28, 12, 21, 120, 4, 61, 2, 114, 95, 32, 28, 88, 18, 63, 60]", "-1" ], "var": [ "nums", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46145ele3d.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* nums, int l, int r, int x, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = nums[i3]; output_temp_2.push_back(output_temp_4); } output_json["nums"] = 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["nums"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* nums = &input_temp_1_vec[0]; int l = input_json["l"]; int r = input_json["r"]; int x = input_json["x"]; clock_t begin = clock(); int returnv = _binary_search(nums, l, r, 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(nums, l, r, x, returnv); }
master
null
{"livein": ["nums", "l", "r", "x"], "liveout": ["nums"], "returnvarname": ["returnv"], "execcmd": "", "funname": "_binary_search", "funargs": ["nums", "l", "r", "x"], "typemap": {"nums": "array(int32#32)", "l": "int32", "r": "int32", "x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46145ele3d.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
giovanifss/Caesar-Cipher-Tool/caesar_cipher/caesar_support.c
unsigned int get_length_of_text(char *text) { int i = 0; while (text[i] != '\0') { i++; } return i; }
unsigned int get_length_of_text(char *text)
unsigned int get_length_of_text(char *text)
get_length_of_text
[ "unsigned int", "char *" ]
{ "code": [ ".globl get_length_of_text\n.type get_length_of_text, @function\nget_length_of_text:\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\taddl\t$1, -4(%rbp)\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.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 get_length_of_text\n.type get_length_of_text, @function\nget_length_of_text:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%edx, %edx\n.L2:\n\tmovq\t%rdx, %rax\n\tincq\t%rdx\n\tcmpb\t$0, -1(%rdi,%rdx)\n\tjne\t.L2\n\tret\n\t.cfi_endproc\n\n", ".globl get_length_of_text\n.type get_length_of_text, @function\nget_length_of_text:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$0, (%rdi)\n\tje\t.L4\n\tmovl\t$1, %edx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovq\t%rdx, %rax\n\taddq\t$1, %rdx\n\tcmpb\t$0, -1(%rdi,%rdx)\n\tjne\t.L3\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 get_length_of_text\n.type get_length_of_text, %function\nget_length_of_text:\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\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n.L2:\n\tldrsw\tx0, [sp, 28]\n\tldr\tx1, [sp, 8]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.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 get_length_of_text\n.type get_length_of_text, %function\nget_length_of_text:\n.LFB0:\n\t.cfi_startproc\n\tsub\tx2, x0, #1\n\tmov\tx1, 0\n.L2:\n\tmov\tx0, x1\n\tadd\tx1, x1, 1\n\tldrb\tw3, [x2, x1]\n\tcbnz\tw3, .L2\n\tret\n\t.cfi_endproc\n\n", ".global get_length_of_text\n.type get_length_of_text, %function\nget_length_of_text:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw1, [x0]\n\tcbz\tw1, .L4\n\tsub\tx3, x0, #1\n\tmov\tx1, 1\n\t.p2align 3,,7\n.L3:\n\tmov\tx0, x1\n\tadd\tx1, x1, 1\n\tldrb\tw2, [x3, x1]\n\tcbnz\tw2, .L3\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": [ "\"sufcdkaqxawibyosugrrtp\"" ], "var": [ "text" ] }, { "value": [ "\"lkqzmzpmeyajbsm\"" ], "var": [ "text" ] }, { "value": [ "\"hicizet\"" ], "var": [ "text" ] }, { "value": [ "\"pojjli\"" ], "var": [ "text" ] }, { "value": [ "\"tcepktgfccwe\"" ], "var": [ "text" ] }, { "value": [ "\"wu\"" ], "var": [ "text" ] }, { "value": [ "\"ujgpwndicehtemnigstzvrifnvplkxt\"" ], "var": [ "text" ] }, { "value": [ "\"dyfhelxsblwagkwslfusfhmuf\"" ], "var": [ "text" ] }, { "value": [ "\"dfirlcmrrlizfaynlqwpytl\"" ], "var": [ "text" ] }, { "value": [ "\"sknlhtcndwpbp\"" ], "var": [ "text" ] } ], "output": [ { "value": [ "22", "\"sufcdkaqxawibyosugrrtp\"" ], "var": [ "returnv", "text" ] }, { "value": [ "15", "\"lkqzmzpmeyajbsm\"" ], "var": [ "returnv", "text" ] }, { "value": [ "7", "\"hicizet\"" ], "var": [ "returnv", "text" ] }, { "value": [ "6", "\"pojjli\"" ], "var": [ "returnv", "text" ] }, { "value": [ "12", "\"tcepktgfccwe\"" ], "var": [ "returnv", "text" ] }, { "value": [ "2", "\"wu\"" ], "var": [ "returnv", "text" ] }, { "value": [ "31", "\"ujgpwndicehtemnigstzvrifnvplkxt\"" ], "var": [ "returnv", "text" ] }, { "value": [ "25", "\"dyfhelxsblwagkwslfusfhmuf\"" ], "var": [ "returnv", "text" ] }, { "value": [ "23", "\"dfirlcmrrlizfaynlqwpytl\"" ], "var": [ "returnv", "text" ] }, { "value": [ "13", "\"sknlhtcndwpbp\"" ], "var": [ "returnv", "text" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_33t7mpyfqi.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* text, unsigned int returnv) { json output_json; output_json["text"] = text; 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* text = strdup(input_json["text"].get<std::string>().c_str()); clock_t begin = clock(); unsigned int returnv = get_length_of_text(text); 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(text, returnv); }
master
null
{"livein": ["text"], "liveout": ["text"], "returnvarname": ["returnv"], "execcmd": "", "funname": "get_length_of_text", "funargs": ["text"], "typemap": {"text": "string", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33t7mpyfqi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
0x7F800000/gcc/ARMToolChain/source/gcc-5.2.0/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c
__attribute__ ((noinline)) int order(int x, int y) { return x < y ? 2 : 4; }
int order(intx, inty)
__attribute__ ((no)) int order(int x, int y)
order
[ "int", "int", "int" ]
{ "code": [ ".globl order\n.type order, @function\norder:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjge\t.L2\n\tmovl\t$2, %eax\n\tjmp\t.L4\n.L2:\n\tmovl\t$4, %eax\n.L4:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl order\n.type order, @function\norder:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t%esi, %edi\n\tsetge\t%al\n\tleal\t2(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl order\n.type order, @function\norder:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t%esi, %edi\n\tsetge\t%al\n\tleal\t2(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n\n", ".global order\n.type order, %function\norder:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tmov\tw0, 2\n\tb\t.L4\n.L2:\n\tmov\tw0, 4\n.L4:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global order\n.type order, %function\norder:\n.LFB13:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tmov\tw1, 2\n\tmov\tw0, 4\n\tcsel\tw0, w1, w0, lt\n\tret\n\t.cfi_endproc\n\n", ".global order\n.type order, %function\norder:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tmov\tw1, 2\n\tmov\tw0, 4\n\tcsel\tw0, w1, w0, lt\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": [ "112", "109" ], "var": [ "x", "y" ] }, { "value": [ "106", "71" ], "var": [ "x", "y" ] }, { "value": [ "42", "103" ], "var": [ "x", "y" ] }, { "value": [ "108", "20" ], "var": [ "x", "y" ] }, { "value": [ "24", "63" ], "var": [ "x", "y" ] }, { "value": [ "47", "11" ], "var": [ "x", "y" ] }, { "value": [ "102", "34" ], "var": [ "x", "y" ] }, { "value": [ "119", "69" ], "var": [ "x", "y" ] }, { "value": [ "8", "34" ], "var": [ "x", "y" ] }, { "value": [ "65", "109" ], "var": [ "x", "y" ] } ], "output": [ { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] }, { "value": [ "2" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_47648cxpay.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 = order(x, y); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(x, y, returnv); }
arm-hot-cold
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "order", "funargs": ["x", "y"], "typemap": {"x": "int32", "y": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47648cxpay.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Ashod/SqliteCompressed/sqlite-src/ext/fts3/fts3_tokenizer.c
int sqlite3Fts3IsIdChar(char c){ static const char isFtsIdChar[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, }; return (c&0x80 || isFtsIdChar[(int)(c)]); }
int sqlite3Fts3IsIdChar(charc)
int sqlite3Fts3IsIdChar(char c)
sqlite3Fts3IsIdChar
[ "int", "char" ]
{ "code": [ ".globl sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\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$0, -4(%rbp)\n\tjs\t.L2\n\tmovsbl\t-4(%rbp), %eax\n\tcltq\n\tleaq\tisFtsIdChar.1918(%rip), %rdx\n\tmovzbl\t(%rax,%rdx), %eax\n\ttestb\t%al, %al\n\tje\t.L3\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L5\n.L3:\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 sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\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$0, -4(%rbp)\n\tjs\t.L2\n\tmovsbl\t-4(%rbp), %eax\n\tcltq\n\tleaq\tisFtsIdChar.1913(%rip), %rdx\n\tmovzbl\t(%rax,%rdx), %eax\n\ttestb\t%al, %al\n\tje\t.L3\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L5\n.L3:\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 sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestb\t%dil, %dil\n\tjs\t.L1\n\tleaq\tisFtsIdChar.1918(%rip), %rax\n\tmovsbq\t%dil, %rdi\n\tcmpb\t$0, (%rax,%rdi)\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestb\t%dil, %dil\n\tjs\t.L1\n\tleaq\tisFtsIdChar.1913(%rip), %rax\n\tmovsbq\t%dil, %rdi\n\tcmpb\t$0, (%rax,%rdi)\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestb\t%dil, %dil\n\tjs\t.L1\n\tleaq\tisFtsIdChar.1918(%rip), %rax\n\tmovsbq\t%dil, %rdi\n\tcmpb\t$0, (%rax,%rdi)\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, @function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\ttestb\t%dil, %dil\n\tjs\t.L1\n\tleaq\tisFtsIdChar.1913(%rip), %rax\n\tmovsbq\t%dil, %rdi\n\tcmpb\t$0, (%rax,%rdi)\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tldrsb\tw0, [sp, 15]\n\tcmp\tw0, 0\n\tblt\t.L2\n\tldrb\tw2, [sp, 15]\n\tadrp\tx0, isFtsIdChar.3463\n\tadd\tx1, x0, :lo12:isFtsIdChar.3463\n\tsxtw\tx0, w2\n\tldrb\tw0, [x1, x0]\n\tcmp\tw0, 0\n\tbeq\t.L3\n.L2:\n\tmov\tw0, 1\n\tb\t.L5\n.L3:\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 sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstrb\tw0, [sp, 15]\n\tldrsb\tw0, [sp, 15]\n\tcmp\tw0, 0\n\tblt\t.L2\n\tldrb\tw2, [sp, 15]\n\tadrp\tx0, isFtsIdChar.3458\n\tadd\tx1, x0, :lo12:isFtsIdChar.3458\n\tsxtw\tx0, w2\n\tldrb\tw0, [x1, x0]\n\tcmp\tw0, 0\n\tbeq\t.L3\n.L2:\n\tmov\tw0, 1\n\tb\t.L5\n.L3:\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 sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tand\tw1, w0, 255\n\ttst\tw0, 128\n\tbne\t.L3\n\tadrp\tx0, .LANCHOR0\n\tadd\tx0, x0, :lo12:.LANCHOR0\n\tldrb\tw0, [x0, w1, sxtw]\n\tcmp\tw0, 0\n\tcset\tw0, ne\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\tand\tw1, w0, 255\n\ttst\tw0, 128\n\tbne\t.L3\n\tadrp\tx0, .LANCHOR0\n\tadd\tx0, x0, :lo12:.LANCHOR0\n\tldrb\tw0, [x0, w1, sxtw]\n\tcmp\tw0, 0\n\tcset\tw0, ne\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\ttst\tw0, 128\n\tand\tw0, w0, 255\n\tbne\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrb\tw0, [x1, w0, sxtw]\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global sqlite3Fts3IsIdChar\n.type sqlite3Fts3IsIdChar, %function\nsqlite3Fts3IsIdChar:\n.LFB0:\n\t.cfi_startproc\n\ttst\tw0, 128\n\tand\tw0, w0, 255\n\tbne\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrb\tw0, [x1, w0, sxtw]\n\tcmp\tw0, 0\n\tcset\tw0, ne\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 1\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": [ "103" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "122" ], "var": [ "c" ] }, { "value": [ "65" ], "var": [ "c" ] }, { "value": [ "1" ], "var": [ "c" ] }, { "value": [ "89" ], "var": [ "c" ] }, { "value": [ "104" ], "var": [ "c" ] }, { "value": [ "29" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "22" ], "var": [ "c" ] }, { "value": [ "103" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "122" ], "var": [ "c" ] }, { "value": [ "65" ], "var": [ "c" ] }, { "value": [ "1" ], "var": [ "c" ] }, { "value": [ "89" ], "var": [ "c" ] }, { "value": [ "104" ], "var": [ "c" ] }, { "value": [ "29" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "22" ], "var": [ "c" ] }, { "value": [ "103" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "122" ], "var": [ "c" ] }, { "value": [ "65" ], "var": [ "c" ] }, { "value": [ "1" ], "var": [ "c" ] }, { "value": [ "89" ], "var": [ "c" ] }, { "value": [ "104" ], "var": [ "c" ] }, { "value": [ "29" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "22" ], "var": [ "c" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "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": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "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": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "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": [ "103" ], "var": [ "c" ] }, { "value": [ "16" ], "var": [ "c" ] }, { "value": [ "122" ], "var": [ "c" ] }, { "value": [ "65" ], "var": [ "c" ] }, { "value": [ "1" ], "var": [ "c" ] }, { "value": [ "89" ], "var": [ "c" ] }, { "value": [ "104" ], "var": [ "c" ] }, { "value": [ "29" ], "var": [ "c" ] }, { "value": [ "76" ], "var": [ "c" ] }, { "value": [ "22" ], "var": [ "c" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_357772761nr8d33.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 = sqlite3Fts3IsIdChar(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); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_44xilgnga3.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 = sqlite3Fts3IsIdChar(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": "sqlite3Fts3IsIdChar", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_44xilgnga3.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elsys/po-homework/G/04/03/task1.c
int name_t(char * help,char *bb,char *ab,char * fp,char*pb) { int i= 6; int b; if(help[i]== 57 && help[i+1]== 51&& help[i+2]== 51 && help[i+3]== 51 &&help[i+4]== 52 &&help[i+5]== 54 && help[i+6] == '-') { return b= 1 ; } if(help[i]== 53 &&help[i+1]== 53 && help[i+2]== 53 && help[i+3]== 56 && help[i+4] == 51 && help[i+5] == '-') { return b = 2 ; } if(help[i]== 52 &&help[i+1]== 50 && help[i+2]== 49 && help[i+3]== 48 && help[i+4] == '-') { return b = 3 ; } if(help[i]== 48 &&help[i+1]== 49 && help[i+2] == '-') { return b = 4; } return 0; }
int name_t(char *help, char *bb, char *ab, char *fp, char *pb)
int name_t(char * help,char *bb,char *ab,char * fp,char*pb)
name_t
[ "int", "char *", "char *", "char *", "char *", "char *" ]
{ "code": [ ".globl name_t\n.type name_t, @function\nname_t:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovq\t%rdx, -40(%rbp)\n\tmovq\t%rcx, -48(%rbp)\n\tmovq\t%r8, -56(%rbp)\n\tmovl\t$6, -8(%rbp)\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$57, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t1(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$51, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t2(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$51, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t3(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$51, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t4(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$52, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t5(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$54, %al\n\tjne\t.L2\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t6(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$45, %al\n\tjne\t.L2\n\tmovl\t$1, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\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\tcmpb\t$53, %al\n\tjne\t.L4\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t1(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$53, %al\n\tjne\t.L4\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t2(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$53, %al\n\tjne\t.L4\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t3(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$56, %al\n\tjne\t.L4\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t4(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$51, %al\n\tjne\t.L4\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t5(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$45, %al\n\tjne\t.L4\n\tmovl\t$2, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\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$52, %al\n\tjne\t.L5\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t1(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$50, %al\n\tjne\t.L5\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t2(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$49, %al\n\tjne\t.L5\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t3(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$48, %al\n\tjne\t.L5\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t4(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$45, %al\n\tjne\t.L5\n\tmovl\t$3, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\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$48, %al\n\tjne\t.L6\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t1(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$49, %al\n\tjne\t.L6\n\tmovl\t-8(%rbp), %eax\n\tcltq\n\tleaq\t2(%rax), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$45, %al\n\tjne\t.L6\n\tmovl\t$4, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L6:\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 name_t\n.type name_t, @function\nname_t:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovb\t6(%rdi), %dl\n\txorl\t%eax, %eax\n\tcmpb\t$57, %dl\n\tjne\t.L2\n\tcmpb\t$51, 7(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 9(%rdi)\n\tjne\t.L1\n\tcmpb\t$52, 10(%rdi)\n\tjne\t.L1\n\tcmpb\t$54, 11(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 12(%rdi)\n\tsete\t%al\n\tret\n.L2:\n\tcmpb\t$53, %dl\n\tjne\t.L4\n\tcmpb\t$53, 7(%rdi)\n\tjne\t.L1\n\tcmpb\t$53, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$56, 9(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 10(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 11(%rdi)\n\tsete\t%al\n\taddl\t%eax, %eax\n\tret\n.L4:\n\tcmpb\t$52, %dl\n\tjne\t.L5\n\tcmpb\t$50, 7(%rdi)\n\tjne\t.L1\n\tcmpb\t$49, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$48, 9(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 10(%rdi)\n\tsete\t%al\n\tleal\t(%rax,%rax,2), %eax\n\tret\n.L5:\n\tcmpb\t$48, %dl\n\tjne\t.L1\n\tcmpb\t$49, 7(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 8(%rdi)\n\tsete\t%al\n\tsall\t$2, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl name_t\n.type name_t, @function\nname_t:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t6(%rdi), %eax\n\tcmpb\t$57, %al\n\tje\t.L24\n\tcmpb\t$53, %al\n\tjne\t.L4\n\txorl\t%eax, %eax\n\tcmpb\t$53, 7(%rdi)\n\tje\t.L25\n.L1:\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tcmpb\t$52, %al\n\tjne\t.L5\n\txorl\t%eax, %eax\n\tcmpb\t$50, 7(%rdi)\n\tjne\t.L1\n\tcmpb\t$49, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$48, 9(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 10(%rdi)\n\tsete\t%al\n\tleal\t(%rax,%rax,2), %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tcmpb\t$48, %al\n\tmovl\t$0, %eax\n\tjne\t.L1\n\tcmpb\t$49, 7(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 8(%rdi)\n\tsete\t%al\n\tsall\t$2, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L24:\n\txorl\t%eax, %eax\n\tcmpb\t$51, 7(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 9(%rdi)\n\tjne\t.L1\n\tcmpb\t$52, 10(%rdi)\n\tjne\t.L1\n\tcmpb\t$54, 11(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 12(%rdi)\n\tsete\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L25:\n\tcmpb\t$53, 8(%rdi)\n\tjne\t.L1\n\tcmpb\t$56, 9(%rdi)\n\tjne\t.L1\n\tcmpb\t$51, 10(%rdi)\n\tjne\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$45, 11(%rdi)\n\tsete\t%al\n\taddl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global name_t\n.type name_t, %function\nname_t:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #64\n\t.cfi_def_cfa_offset 64\n\tstr\tx0, [sp, 40]\n\tstr\tx1, [sp, 32]\n\tstr\tx2, [sp, 24]\n\tstr\tx3, [sp, 16]\n\tstr\tx4, [sp, 8]\n\tmov\tw0, 6\n\tstr\tw0, [sp, 56]\n\tldrsw\tx0, [sp, 56]\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 51\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 51\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 51\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 4\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 52\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 5\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 54\n\tbne\t.L2\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 6\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 45\n\tbne\t.L2\n\tmov\tw0, 1\n\tstr\tw0, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tb\t.L3\n.L2:\n\tldrsw\tx0, [sp, 56]\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 53\n\tbne\t.L4\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 53\n\tbne\t.L4\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 53\n\tbne\t.L4\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 56\n\tbne\t.L4\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 4\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 51\n\tbne\t.L4\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 5\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 45\n\tbne\t.L4\n\tmov\tw0, 2\n\tstr\tw0, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tb\t.L3\n.L4:\n\tldrsw\tx0, [sp, 56]\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 52\n\tbne\t.L5\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 50\n\tbne\t.L5\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 49\n\tbne\t.L5\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 3\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 48\n\tbne\t.L5\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 4\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 45\n\tbne\t.L5\n\tmov\tw0, 3\n\tstr\tw0, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tb\t.L3\n.L5:\n\tldrsw\tx0, [sp, 56]\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 48\n\tbne\t.L6\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 1\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 49\n\tbne\t.L6\n\tldrsw\tx0, [sp, 56]\n\tadd\tx0, x0, 2\n\tldr\tx1, [sp, 40]\n\tadd\tx0, x1, x0\n\tldrb\tw0, [x0]\n\tcmp\tw0, 45\n\tbne\t.L6\n\tmov\tw0, 4\n\tstr\tw0, [sp, 60]\n\tldr\tw0, [sp, 60]\n\tb\t.L3\n.L6:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 64\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global name_t\n.type name_t, %function\nname_t:\n.LFB24:\n\t.cfi_startproc\n\tldrb\tw1, [x0, 6]\n\tcmp\tw1, 57\n\tbne\t.L2\n\tldrb\tw1, [x0, 7]\n\tcmp\tw1, 51\n\tbne\t.L21\n\tldrb\tw1, [x0, 8]\n\tcmp\tw1, 51\n\tbne\t.L21\n\tldrb\tw1, [x0, 9]\n\tcmp\tw1, 51\n\tbne\t.L21\n\tldrb\tw1, [x0, 10]\n\tcmp\tw1, 52\n\tbne\t.L21\n\tldrb\tw1, [x0, 11]\n\tcmp\tw1, 54\n\tbne\t.L21\n\tldrb\tw0, [x0, 12]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n.L1:\n\tret\n.L2:\n\tcmp\tw1, 53\n\tbne\t.L4\n\tldrb\tw1, [x0, 7]\n\tcmp\tw1, 53\n\tbne\t.L21\n\tldrb\tw1, [x0, 8]\n\tcmp\tw1, 53\n\tbne\t.L21\n\tldrb\tw1, [x0, 9]\n\tcmp\tw1, 56\n\tbne\t.L21\n\tldrb\tw1, [x0, 10]\n\tcmp\tw1, 51\n\tbne\t.L21\n\tldrb\tw0, [x0, 11]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n\tlsl\tw0, w0, 1\n\tb\t.L1\n.L4:\n\tcmp\tw1, 52\n\tbne\t.L5\n\tldrb\tw1, [x0, 7]\n\tcmp\tw1, 50\n\tbne\t.L21\n\tldrb\tw1, [x0, 8]\n\tcmp\tw1, 49\n\tbne\t.L21\n\tldrb\tw1, [x0, 9]\n\tcmp\tw1, 48\n\tbne\t.L21\n\tldrb\tw0, [x0, 10]\n\tcmp\tw0, 45\n\tmov\tw0, 3\n\tcsel\tw0, wzr, w0, ne\n\tb\t.L1\n.L5:\n\tcmp\tw1, 48\n\tbne\t.L21\n\tldrb\tw1, [x0, 7]\n\tcmp\tw1, 49\n\tbne\t.L21\n\tldrb\tw0, [x0, 8]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n\tlsl\tw0, w0, 2\n\tb\t.L1\n.L21:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global name_t\n.type name_t, %function\nname_t:\n.LFB39:\n\t.cfi_startproc\n\tmov\tx1, x0\n\tldrb\tw0, [x0, 6]\n\tcmp\tw0, 57\n\tbeq\t.L24\n\tcmp\tw0, 53\n\tbne\t.L4\n\tldrb\tw2, [x1, 7]\n\tmov\tw0, 0\n\tcmp\tw2, 53\n\tbeq\t.L25\n.L1:\n\tret\n\t.p2align 2,,3\n.L4:\n\tcmp\tw0, 52\n\tbne\t.L5\n\tldrb\tw2, [x1, 7]\n\tmov\tw0, 0\n\tcmp\tw2, 50\n\tbne\t.L1\n\tldrb\tw2, [x1, 8]\n\tcmp\tw2, 49\n\tbne\t.L1\n\tldrb\tw2, [x1, 9]\n\tcmp\tw2, 48\n\tbne\t.L1\n\tldrb\tw1, [x1, 10]\n\tmov\tw0, 3\n\tcmp\tw1, 45\n\tcsel\tw0, wzr, w0, ne\n\tret\n\t.p2align 2,,3\n.L5:\n\tcmp\tw0, 48\n\tbne\t.L20\n\tldrb\tw2, [x1, 7]\n\tmov\tw0, 0\n\tcmp\tw2, 49\n\tbne\t.L1\n\tldrb\tw0, [x1, 8]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n\tlsl\tw0, w0, 2\n\tret\n\t.p2align 2,,3\n.L24:\n\tldrb\tw2, [x1, 7]\n\tmov\tw0, 0\n\tcmp\tw2, 51\n\tbne\t.L1\n\tldrb\tw2, [x1, 8]\n\tcmp\tw2, 51\n\tbne\t.L1\n\tldrb\tw2, [x1, 9]\n\tcmp\tw2, 51\n\tbne\t.L1\n\tldrb\tw2, [x1, 10]\n\tcmp\tw2, 52\n\tbne\t.L1\n\tldrb\tw2, [x1, 11]\n\tcmp\tw2, 54\n\tbne\t.L1\n\tldrb\tw0, [x1, 12]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n\tret\n\t.p2align 2,,3\n.L25:\n\tldrb\tw2, [x1, 8]\n\tcmp\tw2, 53\n\tbne\t.L1\n\tldrb\tw2, [x1, 9]\n\tcmp\tw2, 56\n\tbne\t.L1\n\tldrb\tw2, [x1, 10]\n\tcmp\tw2, 51\n\tbne\t.L1\n\tldrb\tw0, [x1, 11]\n\tcmp\tw0, 45\n\tcset\tw0, eq\n\tlsl\tw0, w0, 1\n\tret\n.L20:\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": [ "\"evlwqvloqvoyiekpdpuhv\"", "\"ufypqngv\"", "\"dgocpz\"", "\"uhrgp\"", "\"ilqvzefmifmqnzacqqrebran\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"wkjjo\"", "\"jmaqkkgbcajntwzweuucdsxulmcm\"", "\"azipqtjyopenbdw\"", "\"oawy\"", "\"rirmzncudk\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"ssgyexrmxjfyq\"", "\"mbibuttr\"", "\"gej\"", "\"posbvtbhsqlnzuivxnisawnbgzy\"", "\"bg\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"hjubhkehdxyyfyp\"", "\"\"", "\"un\"", "\"pqraalynusduyn\"", "\"jse\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"iptmgxri\"", "\"zmqsoa\"", "\"zkrvognehmgkalrtkqf\"", "\"sjiaswpsibxyuilfmydegzbemgspsry\"", "\"oapxgmsotxvxlbvfod\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"gpcsis\"", "\"umv\"", "\"mgdfylapvdmqgloohwb\"", "\"qsqikfkdcyxi\"", "\"wbynwgfivqsfdyzkrgmajcslay\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"yly\"", "\"xvdjdhafr\"", "\"arrpsyvpemmbpgnpiblh\"", "\"hszzinuhipxvvzvf\"", "\"txdv\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"iqp\"", "\"weduuzfybc\"", "\"cmnmrqtjnd\"", "\"slreci\"", "\"xluqjvbihoochtmsrmycyqdnjymnm\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"igbirmwdrvfhwdnzixafwazqgc\"", "\"hwcdnecasxfme\"", "\"mmyrhugyzmtlzbkzrjmdirhgi\"", "\"ggdihnrnnyzkmjmtkev\"", "\"jpxavxcjovxfdkfaqotrko\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] }, { "value": [ "\"qgfiwotkhrrht\"", "\"sdwzdhtabjqe\"", "\"ttofzfvxioprwxhrstgwwyqzot\"", "\"ifambwzmplq\"", "\"hdmssplthrkkvwdcnziupzjwde\"" ], "var": [ "help", "bb", "ab", "fp", "pb" ] } ], "output": [ { "value": [ "\"dgocpz\"", "\"ufypqngv\"", "\"uhrgp\"", "\"evlwqvloqvoyiekpdpuhv\"", "\"ilqvzefmifmqnzacqqrebran\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"azipqtjyopenbdw\"", "\"jmaqkkgbcajntwzweuucdsxulmcm\"", "\"oawy\"", "\"wkjjo\"", "\"rirmzncudk\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"gej\"", "\"mbibuttr\"", "\"posbvtbhsqlnzuivxnisawnbgzy\"", "\"ssgyexrmxjfyq\"", "\"bg\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"un\"", "\"\"", "\"pqraalynusduyn\"", "\"hjubhkehdxyyfyp\"", "\"jse\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"zkrvognehmgkalrtkqf\"", "\"zmqsoa\"", "\"sjiaswpsibxyuilfmydegzbemgspsry\"", "\"iptmgxri\"", "\"oapxgmsotxvxlbvfod\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"mgdfylapvdmqgloohwb\"", "\"umv\"", "\"qsqikfkdcyxi\"", "\"gpcsis\"", "\"wbynwgfivqsfdyzkrgmajcslay\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"arrpsyvpemmbpgnpiblh\"", "\"xvdjdhafr\"", "\"hszzinuhipxvvzvf\"", "\"yly\"", "\"txdv\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"cmnmrqtjnd\"", "\"weduuzfybc\"", "\"slreci\"", "\"iqp\"", "\"xluqjvbihoochtmsrmycyqdnjymnm\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"mmyrhugyzmtlzbkzrjmdirhgi\"", "\"hwcdnecasxfme\"", "\"ggdihnrnnyzkmjmtkev\"", "\"igbirmwdrvfhwdnzixafwazqgc\"", "\"jpxavxcjovxfdkfaqotrko\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] }, { "value": [ "\"ttofzfvxioprwxhrstgwwyqzot\"", "\"sdwzdhtabjqe\"", "\"ifambwzmplq\"", "\"qgfiwotkhrrht\"", "\"hdmssplthrkkvwdcnziupzjwde\"", "0" ], "var": [ "ab", "bb", "fp", "help", "pb", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43i7pcnxba.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* help, char* bb, char* ab, char* fp, char* pb, int returnv) { json output_json; output_json["help"] = help; output_json["bb"] = bb; output_json["ab"] = ab; output_json["fp"] = fp; output_json["pb"] = pb; 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* help = strdup(input_json["help"].get<std::string>().c_str()); char* bb = strdup(input_json["bb"].get<std::string>().c_str()); char* ab = strdup(input_json["ab"].get<std::string>().c_str()); char* fp = strdup(input_json["fp"].get<std::string>().c_str()); char* pb = strdup(input_json["pb"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = name_t(help, bb, ab, fp, pb); 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(help, bb, ab, fp, pb, returnv); }
master
null
{"livein": ["help", "bb", "ab", "fp", "pb"], "liveout": ["help", "bb", "ab", "fp", "pb"], "returnvarname": ["returnv"], "execcmd": "", "funname": "name_t", "funargs": ["help", "bb", "ab", "fp", "pb"], "typemap": {"help": "string", "bb": "string", "ab": "string", "fp": "string", "pb": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43i7pcnxba.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
damageless/linux-kernel-ican-tab/drivers/video/hdmi/chips/sii9022/SIIVideoModeTable.c
unsigned char ConvertVIC_To_VM_Index(unsigned char VIC, unsigned char _3D_Struct) { unsigned char ConvertedVIC; const unsigned char VIC2Index[] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 5, 7, 7, 8, 8, 10, 10, 11, 12, 12, 13, 14, 15, 15, 16, 16, 19, 19, 20, 20, 23, 23, 24, 25, 26, 27, 28, 28, 29, 29, 30, 31, 32, 33, 33, 34, 34, 35, 36, 37, 37, 38, 38, 39, 39, 40, 40, 41, 41, 42, 42 }; VIC &= 0x7F; if (VIC < 60) { ConvertedVIC = VIC2Index[VIC]; if (_3D_Struct != 0x0F) { switch (VIC) { case 4: switch(_3D_Struct) { case 0x00: ConvertedVIC = 43; break; case 0x03: ConvertedVIC = 44; break; case 0x04: ConvertedVIC = 45; break; } break; case 5: switch(_3D_Struct) { case 0x00: ConvertedVIC = 46; break; case 0x08: ConvertedVIC = 47; break; } break; case 19: switch(_3D_Struct) { case 0x00: ConvertedVIC = 48; break; case 0x03: ConvertedVIC = 49; break; case 0x04: ConvertedVIC = 50; break; } break; case 20: switch(_3D_Struct) { case 0x00: ConvertedVIC = 51; break; case 0x08: ConvertedVIC = 52; break; } break; case 32: switch(_3D_Struct) { case 0x00: ConvertedVIC = 53; break; case 0x03: ConvertedVIC = 54; break; case 0x04: ConvertedVIC = 55; break; } break; } } } else ConvertedVIC = VIC; return ConvertedVIC; }
unsigned char ConvertVIC_To_VM_Index(unsigned charVIC, unsigned char_3D_Struct)
unsigned char ConvertVIC_To_VM_Index(unsigned char VIC, unsigned char _3D_Struct)
ConvertVIC_To_VM_Index
[ "unsigned char", "unsigned char", "unsigned char" ]
{ "code": [ ".globl ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, @function\nConvertVIC_To_VM_Index:\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$112, %rsp\n\tmovl\t%edi, %edx\n\tmovl\t%esi, %eax\n\tmovb\t%dl, -100(%rbp)\n\tmovb\t%al, -104(%rbp)\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovabsq\t$289359583200215040, %rax\n\tmovabsq\t$723399520717047045, %rdx\n\tmovq\t%rax, -80(%rbp)\n\tmovq\t%rdx, -72(%rbp)\n\tmovabsq\t$1157160182280358923, %rax\n\tmovabsq\t$1735881556378194704, %rdx\n\tmovq\t%rax, -64(%rbp)\n\tmovq\t%rdx, -56(%rbp)\n\tmovabsq\t$2169922602030275097, %rax\n\tmovabsq\t$2603962539530330143, %rdx\n\tmovq\t%rax, -48(%rbp)\n\tmovq\t%rdx, -40(%rbp)\n\tmovabsq\t$2893605809682785573, %rax\n\tmovq\t%rax, -32(%rbp)\n\tmovl\t$707406121, -24(%rbp)\n\tandb\t$127, -100(%rbp)\n\tcmpb\t$59, -100(%rbp)\n\tja\t.L2\n\tmovzbl\t-100(%rbp), %eax\n\tcltq\n\tmovzbl\t-80(%rbp,%rax), %eax\n\tmovb\t%al, -81(%rbp)\n\tcmpb\t$15, -104(%rbp)\n\tje\t.L31\n\tmovzbl\t-100(%rbp), %eax\n\tsubl\t$4, %eax\n\tcmpl\t$28, %eax\n\tja\t.L28\n\tmovl\t%eax, %eax\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\t.L5(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcltq\n\tleaq\t.L5(%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.L5:\n\t.long\t.L9-.L5\n\t.long\t.L8-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L7-.L5\n\t.long\t.L6-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L28-.L5\n\t.long\t.L4-.L5\n\t.text\n.L9:\n\tmovzbl\t-104(%rbp), %eax\n\tcmpl\t$4, %eax\n\tje\t.L10\n\tcmpl\t$4, %eax\n\tjg\t.L32\n\ttestl\t%eax, %eax\n\tje\t.L12\n\tcmpl\t$3, %eax\n\tje\t.L13\n\tjmp\t.L32\n.L12:\n\tmovb\t$43, -81(%rbp)\n\tjmp\t.L11\n.L13:\n\tmovb\t$44, -81(%rbp)\n\tjmp\t.L11\n.L10:\n\tmovb\t$45, -81(%rbp)\n\tnop\n.L11:\n\tjmp\t.L32\n.L8:\n\tmovzbl\t-104(%rbp), %eax\n\ttestl\t%eax, %eax\n\tje\t.L14\n\tcmpl\t$8, %eax\n\tje\t.L15\n\tjmp\t.L28\n.L14:\n\tmovb\t$46, -81(%rbp)\n\tjmp\t.L16\n.L15:\n\tmovb\t$47, -81(%rbp)\n\tnop\n.L16:\n\tjmp\t.L28\n.L7:\n\tmovzbl\t-104(%rbp), %eax\n\tcmpl\t$4, %eax\n\tje\t.L17\n\tcmpl\t$4, %eax\n\tjg\t.L33\n\ttestl\t%eax, %eax\n\tje\t.L19\n\tcmpl\t$3, %eax\n\tje\t.L20\n\tjmp\t.L33\n.L19:\n\tmovb\t$48, -81(%rbp)\n\tjmp\t.L18\n.L20:\n\tmovb\t$49, -81(%rbp)\n\tjmp\t.L18\n.L17:\n\tmovb\t$50, -81(%rbp)\n\tnop\n.L18:\n\tjmp\t.L33\n.L6:\n\tmovzbl\t-104(%rbp), %eax\n\ttestl\t%eax, %eax\n\tje\t.L21\n\tcmpl\t$8, %eax\n\tje\t.L22\n\tjmp\t.L28\n.L21:\n\tmovb\t$51, -81(%rbp)\n\tjmp\t.L23\n.L22:\n\tmovb\t$52, -81(%rbp)\n\tnop\n.L23:\n\tjmp\t.L28\n.L4:\n\tmovzbl\t-104(%rbp), %eax\n\tcmpl\t$4, %eax\n\tje\t.L24\n\tcmpl\t$4, %eax\n\tjg\t.L34\n\ttestl\t%eax, %eax\n\tje\t.L26\n\tcmpl\t$3, %eax\n\tje\t.L27\n\tjmp\t.L34\n.L26:\n\tmovb\t$53, -81(%rbp)\n\tjmp\t.L25\n.L27:\n\tmovb\t$54, -81(%rbp)\n\tjmp\t.L25\n.L24:\n\tmovb\t$55, -81(%rbp)\n\tnop\n.L25:\n\tjmp\t.L34\n.L2:\n\tmovzbl\t-100(%rbp), %eax\n\tmovb\t%al, -81(%rbp)\n\tjmp\t.L28\n.L31:\n\tnop\n\tjmp\t.L28\n.L32:\n\tnop\n\tjmp\t.L28\n.L33:\n\tnop\n\tjmp\t.L28\n.L34:\n\tnop\n.L28:\n\tmovzbl\t-81(%rbp), %eax\n\tmovq\t-8(%rbp), %rcx\n\txorq\t%fs:40, %rcx\n\tje\t.L30\n\tcall\t__stack_chk_fail@PLT\n.L30:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, @function\nConvertVIC_To_VM_Index:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$88, %rsp\n\t.cfi_def_cfa_offset 96\n\tmovl\t%edi, %r8d\n\tmovl\t%esi, %edx\n\tmovl\t$15, %ecx\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 72(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t12(%rsp), %rdi\n\tleaq\t.LC0(%rip), %rsi\n\trep movsl\n\tmovl\t%r8d, %ecx\n\tandl\t$127, %ecx\n\tmovl\t%ecx, %eax\n\tcmpb\t$59, %cl\n\tja\t.L1\n\tandl\t$127, %eax\n\tmovb\t12(%rsp,%rax), %al\n\tcmpb\t$15, %dl\n\tje\t.L1\n\tcmpb\t$19, %cl\n\tje\t.L3\n\tja\t.L4\n\tcmpb\t$4, %cl\n\tje\t.L5\n\tcmpb\t$5, %cl\n\tje\t.L6\n\tjmp\t.L1\n.L4:\n\tcmpb\t$20, %cl\n\tje\t.L7\n\tcmpb\t$32, %cl\n\tje\t.L8\n\tjmp\t.L1\n.L5:\n\tcmpb\t$3, %dl\n\tje\t.L11\n\tcmpb\t$4, %dl\n\tje\t.L12\n\ttestb\t%dl, %dl\n\tmovb\t$43, %dl\n\tjmp\t.L21\n.L6:\n\ttestb\t%dl, %dl\n\tje\t.L13\n\tcmpb\t$8, %dl\n\tmovb\t$47, %dl\n.L21:\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n.L3:\n\tcmpb\t$3, %dl\n\tje\t.L14\n\tcmpb\t$4, %dl\n\tje\t.L15\n\ttestb\t%dl, %dl\n\tmovb\t$48, %dl\n\tjmp\t.L21\n.L7:\n\ttestb\t%dl, %dl\n\tje\t.L16\n\tcmpb\t$8, %dl\n\tmovb\t$52, %dl\n\tjmp\t.L21\n.L8:\n\tcmpb\t$3, %dl\n\tje\t.L17\n\tcmpb\t$4, %dl\n\tje\t.L18\n\ttestb\t%dl, %dl\n\tmovb\t$53, %dl\n\tjmp\t.L21\n.L11:\n\tmovb\t$44, %al\n\tjmp\t.L1\n.L12:\n\tmovb\t$45, %al\n\tjmp\t.L1\n.L13:\n\tmovb\t$46, %al\n\tjmp\t.L1\n.L14:\n\tmovb\t$49, %al\n\tjmp\t.L1\n.L15:\n\tmovb\t$50, %al\n\tjmp\t.L1\n.L16:\n\tmovb\t$51, %al\n\tjmp\t.L1\n.L17:\n\tmovb\t$54, %al\n\tjmp\t.L1\n.L18:\n\tmovb\t$55, %al\n.L1:\n\tmovq\t72(%rsp), %rdi\n\txorq\t%fs:40, %rdi\n\tje\t.L9\n\tcall\t__stack_chk_fail@PLT\n.L9:\n\taddq\t$88, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n.LC0: \t.string\t\"\"\n", ".globl ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, @function\nConvertVIC_To_VM_Index:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$88, %rsp\n\t.cfi_def_cfa_offset 96\n\tmovdqa\t.LC0(%rip), %xmm0\n\tandl\t$127, %edi\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 72(%rsp)\n\txorl\t%eax, %eax\n\tmovl\t$707406121, 56(%rsp)\n\tmovabsq\t$2893605809682785573, %rax\n\tmovaps\t%xmm0, (%rsp)\n\tmovdqa\t.LC1(%rip), %xmm0\n\tmovq\t%rax, 48(%rsp)\n\tmovl\t%edi, %eax\n\tmovaps\t%xmm0, 16(%rsp)\n\tmovdqa\t.LC2(%rip), %xmm0\n\tmovaps\t%xmm0, 32(%rsp)\n\tcmpb\t$59, %dil\n\tja\t.L1\n\tandl\t$127, %eax\n\tmovzbl\t(%rsp,%rax), %eax\n\tcmpb\t$15, %sil\n\tje\t.L1\n\tsubl\t$4, %edi\n\tcmpb\t$28, %dil\n\tja\t.L1\n\tleaq\t.L4(%rip), %rcx\n\tmovzbl\t%dil, %edi\n\tmovslq\t(%rcx,%rdi,4), %rdx\n\taddq\t%rcx, %rdx\n\tnotrack jmp\t*%rdx\n\t.section\t.rodata\n\t.align 4\n\t.align 4\n.L4:\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L1-.L4\n\t.long\t.L3-.L4\n\t.text\n.L3:\n\tcmpb\t$3, %sil\n\tje\t.L17\n\tcmpb\t$4, %sil\n\tjne\t.L21\n\tmovl\t$55, %eax\n.L1:\n\tmovq\t72(%rsp), %rcx\n\txorq\t%fs:40, %rcx\n\tjne\t.L22\n\taddq\t$88, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L8:\n\t.cfi_restore_state\n\tcmpb\t$3, %sil\n\tje\t.L11\n\tcmpb\t$4, %sil\n\tje\t.L12\n\ttestb\t%sil, %sil\n\tmovl\t$43, %edx\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n.L6:\n\tcmpb\t$3, %sil\n\tje\t.L14\n\tcmpb\t$4, %sil\n\tje\t.L15\n\ttestb\t%sil, %sil\n\tmovl\t$48, %edx\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n.L7:\n\ttestb\t%sil, %sil\n\tje\t.L13\n\tcmpb\t$8, %sil\n\tmovl\t$47, %edx\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n.L5:\n\ttestb\t%sil, %sil\n\tje\t.L16\n\tcmpb\t$8, %sil\n\tmovl\t$52, %edx\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L21:\n\ttestb\t%sil, %sil\n\tmovl\t$53, %edx\n\tcmove\t%edx, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L15:\n\tmovl\t$50, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L12:\n\tmovl\t$45, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\tmovl\t$51, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L13:\n\tmovl\t$46, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L14:\n\tmovl\t$49, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tmovl\t$44, %eax\n\tjmp\t.L1\n\t.p2align 4,,10\n\t.p2align 3\n.L17:\n\tmovl\t$54, %eax\n\tjmp\t.L1\n.L22:\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n.LC0: \t.quad\t289359583200215040\n.LC2: \t.quad\t2169922602030275097\n.LC1: \t.quad\t1157160182280358923\n", ".global ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, %function\nConvertVIC_To_VM_Index:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -112]!\n\t.cfi_def_cfa_offset 112\n\t.cfi_offset 29, -112\n\t.cfi_offset 30, -104\n\tmov\tx29, sp\n\tstrb\tw0, [sp, 31]\n\tstrb\tw1, [sp, 30]\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\tadrp\tx0, .LC0\n\tadd\tx1, x0, :lo12:.LC0\n\tadd\tx0, sp, 40\n\tldp\tx2, x3, [x1]\n\tstp\tx2, x3, [x0]\n\tldp\tx2, x3, [x1, 16]\n\tstp\tx2, x3, [x0, 16]\n\tldp\tx2, x3, [x1, 32]\n\tstp\tx2, x3, [x0, 32]\n\tldr\tx2, [x1, 48]\n\tstr\tx2, [x0, 48]\n\tldr\tw1, [x1, 56]\n\tstr\tw1, [x0, 56]\n\tldrb\tw0, [sp, 31]\n\tand\tw0, w0, 127\n\tstrb\tw0, [sp, 31]\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 59\n\tbhi\t.L2\n\tldrb\tw0, [sp, 31]\n\tsxtw\tx0, w0\n\tadd\tx1, sp, 40\n\tldrb\tw0, [x1, x0]\n\tstrb\tw0, [sp, 39]\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 15\n\tbeq\t.L30\n\tldrb\tw0, [sp, 31]\n\tcmp\tw0, 32\n\tbeq\t.L4\n\tcmp\tw0, 32\n\tbgt\t.L27\n\tcmp\tw0, 20\n\tbeq\t.L5\n\tcmp\tw0, 20\n\tbgt\t.L27\n\tcmp\tw0, 19\n\tbeq\t.L6\n\tcmp\tw0, 19\n\tbgt\t.L27\n\tcmp\tw0, 4\n\tbeq\t.L7\n\tcmp\tw0, 5\n\tbeq\t.L8\n\tb\t.L27\n.L7:\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 4\n\tbeq\t.L9\n\tcmp\tw0, 4\n\tbgt\t.L31\n\tcmp\tw0, 0\n\tbeq\t.L11\n\tcmp\tw0, 3\n\tbeq\t.L12\n\tb\t.L31\n.L11:\n\tmov\tw0, 43\n\tstrb\tw0, [sp, 39]\n\tb\t.L10\n.L12:\n\tmov\tw0, 44\n\tstrb\tw0, [sp, 39]\n\tb\t.L10\n.L9:\n\tmov\tw0, 45\n\tstrb\tw0, [sp, 39]\n\tnop\n.L10:\n\tb\t.L31\n.L8:\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 0\n\tbeq\t.L13\n\tcmp\tw0, 8\n\tbeq\t.L14\n\tb\t.L27\n.L13:\n\tmov\tw0, 46\n\tstrb\tw0, [sp, 39]\n\tb\t.L15\n.L14:\n\tmov\tw0, 47\n\tstrb\tw0, [sp, 39]\n\tnop\n.L15:\n\tb\t.L27\n.L6:\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 4\n\tbeq\t.L16\n\tcmp\tw0, 4\n\tbgt\t.L32\n\tcmp\tw0, 0\n\tbeq\t.L18\n\tcmp\tw0, 3\n\tbeq\t.L19\n\tb\t.L32\n.L18:\n\tmov\tw0, 48\n\tstrb\tw0, [sp, 39]\n\tb\t.L17\n.L19:\n\tmov\tw0, 49\n\tstrb\tw0, [sp, 39]\n\tb\t.L17\n.L16:\n\tmov\tw0, 50\n\tstrb\tw0, [sp, 39]\n\tnop\n.L17:\n\tb\t.L32\n.L5:\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 0\n\tbeq\t.L20\n\tcmp\tw0, 8\n\tbeq\t.L21\n\tb\t.L27\n.L20:\n\tmov\tw0, 51\n\tstrb\tw0, [sp, 39]\n\tb\t.L22\n.L21:\n\tmov\tw0, 52\n\tstrb\tw0, [sp, 39]\n\tnop\n.L22:\n\tb\t.L27\n.L4:\n\tldrb\tw0, [sp, 30]\n\tcmp\tw0, 4\n\tbeq\t.L23\n\tcmp\tw0, 4\n\tbgt\t.L33\n\tcmp\tw0, 0\n\tbeq\t.L25\n\tcmp\tw0, 3\n\tbeq\t.L26\n\tb\t.L33\n.L25:\n\tmov\tw0, 53\n\tstrb\tw0, [sp, 39]\n\tb\t.L24\n.L26:\n\tmov\tw0, 54\n\tstrb\tw0, [sp, 39]\n\tb\t.L24\n.L23:\n\tmov\tw0, 55\n\tstrb\tw0, [sp, 39]\n\tnop\n.L24:\n\tb\t.L33\n.L2:\n\tldrb\tw0, [sp, 31]\n\tstrb\tw0, [sp, 39]\n\tb\t.L27\n.L30:\n\tnop\n\tb\t.L27\n.L31:\n\tnop\n\tb\t.L27\n.L32:\n\tnop\n\tb\t.L27\n.L33:\n\tnop\n.L27:\n\tldrb\tw0, [sp, 39]\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.L29\n\tbl\t__stack_chk_fail\n.L29:\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.LC0: \t.string\t\"\"\n", ".global ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, %function\nConvertVIC_To_VM_Index:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -128]!\n\t.cfi_def_cfa_offset 128\n\t.cfi_offset 29, -128\n\t.cfi_offset 30, -120\n\tmov\tx2, 60\n\tmov\tx29, sp\n\tstr\tx21, [sp, 32]\n\t.cfi_offset 21, -96\n\tadrp\tx21, :got:__stack_chk_guard\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -112\n\t.cfi_offset 20, -104\n\tand\tw20, w0, 255\n\tadd\tx3, sp, 56\n\tldr\tx0, [x21, #:got_lo12:__stack_chk_guard]\n\tand\tw19, w1, 255\n\tldr\tx1, [x0]\n\tstr\tx1, [sp, 120]\n\tmov\tx1,0\n\tmov\tx0, x3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tbl\tmemcpy\n\tand\tw1, w20, 127\n\tcmp\tw1, 59\n\tbhi\t.L10\n\tldrb\tw0, [x0, w1, sxtw]\n\tcmp\tw19, 15\n\tbeq\t.L2\n\tcmp\tw1, 19\n\tbeq\t.L3\n\tbhi\t.L4\n\tcmp\tw1, 4\n\tbeq\t.L5\n\tcmp\tw1, 5\n\tbeq\t.L6\n.L2:\n\tldr\tx21, [x21, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 120]\n\tldr\tx2, [x21]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbeq\t.L9\n\tbl\t__stack_chk_fail\n.L4:\n\tcmp\tw1, 20\n\tbeq\t.L7\n\tcmp\tw1, 32\n\tbne\t.L2\n\tcmp\tw19, 3\n\tbeq\t.L17\n\tcmp\tw19, 4\n\tbeq\t.L18\n\tcmp\tw19, 0\n\tmov\tw1, 53\n\tb\t.L23\n.L5:\n\tcmp\tw19, 3\n\tbeq\t.L11\n\tcmp\tw19, 4\n\tbeq\t.L12\n\tcmp\tw19, 0\n\tmov\tw1, 43\n.L23:\n\tcsel\tw0, w0, w1, ne\n\tb\t.L2\n.L6:\n\tcbz\tw19, .L13\n\tcmp\tw19, 8\n\tmov\tw1, 47\n\tb\t.L23\n.L3:\n\tcmp\tw19, 3\n\tbeq\t.L14\n\tcmp\tw19, 4\n\tbeq\t.L15\n\tcmp\tw19, 0\n\tmov\tw1, 48\n\tb\t.L23\n.L7:\n\tcbz\tw19, .L16\n\tcmp\tw19, 8\n\tmov\tw1, 52\n\tb\t.L23\n.L10:\n\tmov\tw0, w1\n\tb\t.L2\n.L11:\n\tmov\tw0, 44\n\tb\t.L2\n.L12:\n\tmov\tw0, 45\n\tb\t.L2\n.L13:\n\tmov\tw0, 46\n\tb\t.L2\n.L14:\n\tmov\tw0, 49\n\tb\t.L2\n.L15:\n\tmov\tw0, 50\n\tb\t.L2\n.L16:\n\tmov\tw0, 51\n\tb\t.L2\n.L17:\n\tmov\tw0, 54\n\tb\t.L2\n.L18:\n\tmov\tw0, 55\n\tb\t.L2\n.L9:\n\tldp\tx19, x20, [sp, 16]\n\tldr\tx21, [sp, 32]\n\tldp\tx29, x30, [sp], 128\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ConvertVIC_To_VM_Index\n.type ConvertVIC_To_VM_Index, %function\nConvertVIC_To_VM_Index:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -96]!\n\t.cfi_def_cfa_offset 96\n\t.cfi_offset 29, -96\n\t.cfi_offset 30, -88\n\tadrp\tx3, :got:__stack_chk_guard\n\tadrp\tx2, .LANCHOR0\n\tadd\tx2, x2, :lo12:.LANCHOR0\n\tmov\tx29, sp\n\tldr\tx6, [x3, #:got_lo12:__stack_chk_guard]\n\tand\tw0, w0, 127\n\tldp\tx4, x5, [x2]\n\tldr\tx7, [x6]\n\tstr\tx7, [sp, 88]\n\tmov\tx7,0\n\tstp\tx4, x5, [sp, 24]\n\tcmp\tw0, 59\n\tldr\tw4, [x2, 56]\n\tldp\tx8, x9, [x2, 16]\n\tstp\tx8, x9, [sp, 40]\n\tldp\tx6, x7, [x2, 32]\n\tstp\tx6, x7, [sp, 56]\n\tldr\tx2, [x2, 48]\n\tstr\tx2, [sp, 72]\n\tstr\tw4, [sp, 80]\n\tbhi\t.L2\n\tadd\tx5, sp, 24\n\tand\tw1, w1, 255\n\tcmp\tw1, 15\n\tldrb\tw2, [x5, w0, sxtw]\n\tbeq\t.L10\n\tcmp\tw0, 19\n\tbeq\t.L3\n\tbls\t.L34\n\tcmp\tw0, 20\n\tbeq\t.L7\n\tcmp\tw0, 32\n\tbne\t.L10\n\tcmp\tw1, 3\n\tmov\tw0, 54\n\tbeq\t.L2\n\tcmp\tw1, 4\n\tmov\tw0, 55\n\tbeq\t.L2\n\tcmp\tw1, 0\n\tmov\tw0, 53\n\tcsel\tw0, w2, w0, ne\n\t.p2align 3,,7\n.L2:\n\tldr\tx3, [x3, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [sp, 88]\n\tldr\tx2, [x3]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L35\n\tldp\tx29, x30, [sp], 96\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.p2align 2,,3\n.L34:\n\t.cfi_restore_state\n\tcmp\tw0, 4\n\tbeq\t.L5\n\tcmp\tw0, 5\n\tbne\t.L10\n\tmov\tw0, 46\n\tcbz\tw1, .L2\n\tcmp\tw1, 8\n\tmov\tw0, 47\n\tcsel\tw0, w2, w0, ne\n\tb\t.L2\n\t.p2align 2,,3\n.L10:\n\tmov\tw0, w2\n\tb\t.L2\n\t.p2align 2,,3\n.L5:\n\tcmp\tw1, 3\n\tmov\tw0, 44\n\tbeq\t.L2\n\tcmp\tw1, 4\n\tmov\tw0, 45\n\tbeq\t.L2\n\tcmp\tw1, 0\n\tmov\tw0, 43\n\tcsel\tw0, w2, w0, ne\n\tb\t.L2\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 51\n\tcbz\tw1, .L2\n\tcmp\tw1, 8\n\tmov\tw0, 52\n\tcsel\tw0, w2, w0, ne\n\tb\t.L2\n\t.p2align 2,,3\n.L3:\n\tcmp\tw1, 3\n\tmov\tw0, 49\n\tbeq\t.L2\n\tcmp\tw1, 4\n\tmov\tw0, 50\n\tbeq\t.L2\n\tcmp\tw1, 0\n\tmov\tw0, 48\n\tcsel\tw0, w2, w0, ne\n\tb\t.L2\n.L35:\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "873", "330" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "178", "564" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "27", "229" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "601", "932" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "796", "789" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "197", "558" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "442", "95" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "276", "49" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "565", "682" ], "var": [ "VIC", "_3D_Struct" ] }, { "value": [ "190", "527" ], "var": [ "VIC", "_3D_Struct" ] } ], "output": [ { "value": [ "105" ], "var": [ "returnv" ] }, { "value": [ "38" ], "var": [ "returnv" ] }, { "value": [ "20" ], "var": [ "returnv" ] }, { "value": [ "89" ], "var": [ "returnv" ] }, { "value": [ "20" ], "var": [ "returnv" ] }, { "value": [ "69" ], "var": [ "returnv" ] }, { "value": [ "42" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] }, { "value": [ "39" ], "var": [ "returnv" ] }, { "value": [ "62" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38t4x_aavl.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 VIC, unsigned char _3D_Struct, 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); unsigned char VIC = input_json["VIC"]; unsigned char _3D_Struct = input_json["_3D_Struct"]; clock_t begin = clock(); unsigned char returnv = ConvertVIC_To_VM_Index(VIC, _3D_Struct); 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(VIC, _3D_Struct, returnv); }
master
null
{"livein": ["VIC", "_3D_Struct"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "ConvertVIC_To_VM_Index", "funargs": ["VIC", "_3D_Struct"], "typemap": {"VIC": "uint8", "_3D_Struct": "uint8", "returnv": "uint8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38t4x_aavl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
stevedonovan/Lake/examples/big1/c048.c
int c048(void) { return 0; }
int c048()
int c048(void)
c048
[ "int", "" ]
{ "code": [ ".globl c048\n.type c048, @function\nc048:\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 c048\n.type c048, @function\nc048:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl c048\n.type c048, @function\nc048:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global c048\n.type c048, %function\nc048:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c048\n.type c048, %function\nc048:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global c048\n.type c048, %function\nc048:\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_33fz6ouwev.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 = c048(); 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": "c048", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33fz6ouwev.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ryjen/kata/c/src/ryjen/kata/algorithms/dvr.c
char node_name(int n) { return ('A' + n); }
char node_name(intn)
char node_name(int n)
node_name
[ "char", "int" ]
{ "code": [ ".globl node_name\n.type node_name, @function\nnode_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\tmovl\t%edi, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\taddl\t$65, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl node_name\n.type node_name, @function\nnode_name:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t65(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl node_name\n.type node_name, @function\nnode_name:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t65(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global node_name\n.type node_name, %function\nnode_name:\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\tand\tw0, w0, 255\n\tadd\tw0, w0, 65\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 node_name\n.type node_name, %function\nnode_name:\n.LFB13:\n\t.cfi_startproc\n\tadd\tw0, w0, 65\n\tret\n\t.cfi_endproc\n\n", ".global node_name\n.type node_name, %function\nnode_name:\n.LFB23:\n\t.cfi_startproc\n\tadd\tw0, w0, 65\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": [ "n" ] }, { "value": [ "99" ], "var": [ "n" ] }, { "value": [ "87" ], "var": [ "n" ] }, { "value": [ "83" ], "var": [ "n" ] }, { "value": [ "18" ], "var": [ "n" ] }, { "value": [ "89" ], "var": [ "n" ] }, { "value": [ "44" ], "var": [ "n" ] }, { "value": [ "12" ], "var": [ "n" ] }, { "value": [ "124" ], "var": [ "n" ] }, { "value": [ "65" ], "var": [ "n" ] } ], "output": [ { "value": [ "113" ], "var": [ "returnv" ] }, { "value": [ "-92" ], "var": [ "returnv" ] }, { "value": [ "-104" ], "var": [ "returnv" ] }, { "value": [ "-108" ], "var": [ "returnv" ] }, { "value": [ "83" ], "var": [ "returnv" ] }, { "value": [ "-102" ], "var": [ "returnv" ] }, { "value": [ "109" ], "var": [ "returnv" ] }, { "value": [ "77" ], "var": [ "returnv" ] }, { "value": [ "-67" ], "var": [ "returnv" ] }, { "value": [ "-126" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_61ksjo0cwd.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, 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 n = input_json["n"]; clock_t begin = clock(); char returnv = node_name(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "node_name", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61ksjo0cwd.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
AvinashPatil/3d0c/src/bits/only_setbit.c
int setbit(int n) { return ( n>0 ? 1+ setbit(n/2): 0); }
int setbit(intn)
int setbit(int n)
setbit
[ "int", "int" ]
{ "code": [ ".globl setbit\n.type setbit, @function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovl\t%edi, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjle\t.L2\n\tmovl\t-4(%rbp), %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovl\t%eax, %edi\n\tcall\tsetbit\n\taddl\t$1, %eax\n\tjmp\t.L4\n.L2:\n\tmovl\t$0, %eax\n.L4:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl setbit\n.type setbit, @function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n.L3:\n\tmovl\t%eax, %r8d\n\tincl\t%eax\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\tsarl\t%edi\n\tjmp\t.L3\n.L1:\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl setbit\n.type setbit, @function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\ttestl\t%edi, %edi\n\tjle\t.L4\n\tmovl\t$1, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%eax, %r8d\n\taddl\t$1, %eax\n\tsarl\t%edi\n\tjne\t.L3\n\tmovl\t%r8d, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\txorl\t%r8d, %r8d\n\tmovl\t%r8d, %eax\n\tret\n\t.cfi_endproc\n\n", ".global setbit\n.type setbit, %function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -32]!\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 29, -32\n\t.cfi_offset 30, -24\n\tmov\tx29, sp\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tble\t.L2\n\tldr\tw0, [sp, 28]\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tbl\tsetbit\n\tadd\tw0, w0, 1\n\tb\t.L4\n.L2:\n\tmov\tw0, 0\n.L4:\n\tldp\tx29, x30, [sp], 32\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global setbit\n.type setbit, %function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tmov\tw2, 0\n.L3:\n\tmov\tw0, w2\n\tcmp\tw1, 0\n\tadd\tw2, w2, 1\n\tble\t.L1\n\tasr\tw1, w1, 1\n\tb\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global setbit\n.type setbit, %function\nsetbit:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tcmp\tw0, 0\n\tble\t.L4\n\tmov\tw2, 1\n\t.p2align 3,,7\n.L3:\n\tmov\tw0, w2\n\tasr\tw1, w1, 1\n\tadd\tw2, w2, 1\n\tcbnz\tw1, .L3\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": [ "86" ], "var": [ "n" ] }, { "value": [ "60" ], "var": [ "n" ] }, { "value": [ "118" ], "var": [ "n" ] }, { "value": [ "15" ], "var": [ "n" ] }, { "value": [ "112" ], "var": [ "n" ] }, { "value": [ "61" ], "var": [ "n" ] }, { "value": [ "77" ], "var": [ "n" ] }, { "value": [ "21" ], "var": [ "n" ] }, { "value": [ "88" ], "var": [ "n" ] }, { "value": [ "16" ], "var": [ "n" ] } ], "output": [ { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "4" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "6" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] }, { "value": [ "7" ], "var": [ "returnv" ] }, { "value": [ "5" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_614k6nkggo.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(int n, int returnv) { json output_json; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); int n = input_json["n"]; clock_t begin = clock(); int returnv = setbit(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "setbit", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_614k6nkggo.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
luciferfran/codigos-luciferfran/C/Ejemplos C-C++/Cap12/busquedaBin2.c
int busquedaBin1(double m[], int n, double v) { int mitad, inf = 0, sup = n - 1; if (n == 0) return -1; do { mitad = (inf + sup) / 2; if (v > m[mitad]) inf = mitad + 1; else sup = mitad - 1; } while( m[mitad] != v && inf <= sup); if (m[mitad] == v) return mitad; else return -1; }
int busquedaBin1(double *m, intn, doublev)
int busquedaBin1(double m[], int n, double v)
busquedaBin1
[ "int", "double *", "int", "double" ]
{ "code": [ ".globl busquedaBin1\n.type busquedaBin1, @function\nbusquedaBin1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovl\t%esi, -28(%rbp)\n\tmovsd\t%xmm0, -40(%rbp)\n\tmovl\t$0, -12(%rbp)\n\tmovl\t-28(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, -8(%rbp)\n\tcmpl\t$0, -28(%rbp)\n\tjne\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-12(%rbp), %edx\n\tmovl\t-8(%rbp), %eax\n\taddl\t%edx, %eax\n\tmovl\t%eax, %edx\n\tshrl\t$31, %edx\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovl\t%eax, -4(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,8), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovsd\t(%rax), %xmm1\n\tmovsd\t-40(%rbp), %xmm0\n\tcomisd\t%xmm1, %xmm0\n\tjbe\t.L14\n\tmovl\t-4(%rbp), %eax\n\taddl\t$1, %eax\n\tmovl\t%eax, -12(%rbp)\n\tjmp\t.L6\n.L14:\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$1, %eax\n\tmovl\t%eax, -8(%rbp)\n.L6:\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,8), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovsd\t(%rax), %xmm0\n\tucomisd\t-40(%rbp), %xmm0\n\tjp\t.L12\n\tucomisd\t-40(%rbp), %xmm0\n\tje\t.L7\n.L12:\n\tmovl\t-12(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjle\t.L2\n.L7:\n\tmovl\t-4(%rbp), %eax\n\tcltq\n\tleaq\t0(,%rax,8), %rdx\n\tmovq\t-24(%rbp), %rax\n\taddq\t%rdx, %rax\n\tmovsd\t(%rax), %xmm0\n\tucomisd\t-40(%rbp), %xmm0\n\tjp\t.L9\n\tucomisd\t-40(%rbp), %xmm0\n\tjne\t.L9\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L9:\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 busquedaBin1\n.type busquedaBin1, @function\nbusquedaBin1:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rsi), %r8d\n\torl\t$-1, %eax\n\ttestl\t%esi, %esi\n\tje\t.L1\n\txorl\t%ecx, %ecx\n\tmovl\t$2, %esi\n\tmovb\t$1, %r9b\n.L6:\n\tleal\t(%rcx,%r8), %eax\n\tcltd\n\tidivl\t%esi\n\tmovslq\t%eax, %rdx\n\tmovsd\t(%rdi,%rdx,8), %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjbe\t.L17\n\tleal\t1(%rax), %ecx\n\tjmp\t.L5\n.L17:\n\tleal\t-1(%rax), %r8d\n.L5:\n\tcmpl\t%r8d, %ecx\n\tjg\t.L12\n\tucomisd\t%xmm0, %xmm1\n\tsetp\t%dl\n\tcmovne\t%r9d, %edx\n\ttestb\t%dl, %dl\n\tjne\t.L6\n.L12:\n\tucomisd\t%xmm0, %xmm1\n\tjp\t.L10\n\tje\t.L1\n.L10:\n\torl\t$-1, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl busquedaBin1\n.type busquedaBin1, @function\nbusquedaBin1:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-1(%rsi), %ecx\n\ttestl\t%esi, %esi\n\tje\t.L10\n\txorl\t%esi, %esi\n\tmovl\t$1, %r8d\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tleal\t(%rcx,%rsi), %edx\n\tmovl\t%edx, %eax\n\tshrl\t$31, %eax\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovslq\t%eax, %rdx\n\tmovsd\t(%rdi,%rdx,8), %xmm1\n\tcomisd\t%xmm1, %xmm0\n\tjbe\t.L18\n\tleal\t1(%rax), %esi\n\tcmpl\t%ecx, %esi\n\tjle\t.L7\n.L10:\n\tmovl\t$-1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L18:\n\tucomisd\t%xmm1, %xmm0\n\tleal\t-1(%rax), %ecx\n\tsetp\t%dl\n\tcmovne\t%r8d, %edx\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tcmpl\t%esi, %ecx\n\tjge\t.L7\n.L6:\n\tucomisd\t%xmm1, %xmm0\n\tjp\t.L10\n\tjne\t.L10\n\tret\n\t.cfi_endproc\n\n", ".global busquedaBin1\n.type busquedaBin1, %function\nbusquedaBin1:\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\tw1, [sp, 20]\n\tstr\td0, [sp, 8]\n\tstr\twzr, [sp, 36]\n\tldr\tw0, [sp, 20]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 40]\n\tldr\tw0, [sp, 20]\n\tcmp\tw0, 0\n\tbne\t.L2\n\tmov\tw0, -1\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 36]\n\tldr\tw0, [sp, 40]\n\tadd\tw0, w1, w0\n\tlsr\tw1, w0, 31\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tstr\tw0, [sp, 44]\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 3\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\td0, [x0]\n\tldr\td1, [sp, 8]\n\tfcmpe\td1, d0\n\tble\t.L10\n\tldr\tw0, [sp, 44]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 36]\n\tb\t.L6\n.L10:\n\tldr\tw0, [sp, 44]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 40]\n.L6:\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 3\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\td0, [x0]\n\tldr\td1, [sp, 8]\n\tfcmp\td1, d0\n\tbeq\t.L7\n\tldr\tw1, [sp, 36]\n\tldr\tw0, [sp, 40]\n\tcmp\tw1, w0\n\tble\t.L2\n.L7:\n\tldrsw\tx0, [sp, 44]\n\tlsl\tx0, x0, 3\n\tldr\tx1, [sp, 24]\n\tadd\tx0, x1, x0\n\tldr\td0, [x0]\n\tldr\td1, [sp, 8]\n\tfcmp\td1, d0\n\tbne\t.L8\n\tldr\tw0, [sp, 44]\n\tb\t.L3\n.L8:\n\tmov\tw0, -1\n.L3:\n\tadd\tsp, sp, 48\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global busquedaBin1\n.type busquedaBin1, %function\nbusquedaBin1:\n.LFB13:\n\t.cfi_startproc\n\tmov\tx4, x0\n\tsub\tw3, w1, #1\n\tcbz\tw1, .L7\n\tmov\tw2, 0\n\tmov\tw5, 2\n.L6:\n\tadd\tw1, w2, w3\n\tsdiv\tw0, w1, w5\n\tldr\td1, [x4, w0, sxtw 3]\n\tfcmpe\td1, d0\n\tbpl\t.L10\n\tadd\tw2, w0, 1\n.L5:\n\tcmp\tw3, w2\n\tbge\t.L6\n.L7:\n\tmov\tw0, -1\n\tb\t.L1\n.L10:\n\tfcmp\td1, d0\n\tsub\tw3, w0, #1\n\tbne\t.L5\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global busquedaBin1\n.type busquedaBin1, %function\nbusquedaBin1:\n.LFB23:\n\t.cfi_startproc\n\tmov\tx3, x0\n\tsub\tw2, w1, #1\n\tcbz\tw1, .L8\n\tmov\tw1, 0\n\t.p2align 3,,7\n.L7:\n\tadd\tw0, w2, w1\n\tadd\tw0, w0, w0, lsr 31\n\tasr\tw0, w0, 1\n\tldr\td1, [x3, w0, sxtw 3]\n\tfcmpe\td0, d1\n\tble\t.L11\n\tadd\tw1, w0, 1\n\tcmp\tw1, w2\n\tble\t.L7\n.L8:\n\tmov\tw0, -1\n\tret\n\t.p2align 2,,3\n.L11:\n\tfcmp\td0, d1\n\tsub\tw2, w0, #1\n\tccmp\tw2, w1, 1, ne\n\tbge\t.L7\n\tfcmp\td0, d1\n\tcsinv\tw0, w0, wzr, 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": [ "[87.4516113129, 79.1206637018, 28.0966026377, 0.995458584473, 87.6071239141, 71.6689268962, 80.8627281854, 42.3366044081, 69.5746566884, 78.7627589597, 5.31744541478, 47.00264158, 80.6503482985, 58.4153141708, 24.7902955667, 33.0354371806, 90.9295009285, 81.327579012, 19.8966285287, 75.8498549246, 62.6053553035, 45.4123449882, 40.6228205535, 33.5992650793, 21.3942219926, 92.1081229033, 39.5295504006, 31.0653829635, 46.5521810279, 43.6672542594, 91.1470814169, 9.28467813323]", "59", "52.9965074915" ], "var": [ "m", "n", "v" ] }, { "value": [ "[97.530811092, 83.7375967634, 51.42051735, 43.2404354495, 99.8453726451, 87.1058630727, 4.50765523514, 49.2919235959, 42.2964471659, 64.2417084338, 38.825556041, 24.4821715308, 58.814592103, 75.9967636259, 96.0918145744, 20.8215231539, 56.198524225, 99.4052860144, 80.0742477146, 81.447906187, 93.6583410551, 72.7886564237, 0.77000003347, 91.4107056192, 95.8546941531, 84.3552794711, 3.03494920901, 0.657884401945, 79.9596437778, 42.8999621977, 79.8818533751, 49.2885962725]", "109", "86.5111481559" ], "var": [ "m", "n", "v" ] }, { "value": [ "[79.1132546164, 35.5335035719, 79.1863658355, 23.8976811545, 39.9217258869, 29.239242396, 59.5689826928, 74.1304044469, 39.9393064238, 10.773758833, 55.9674345255, 54.749449565, 77.1750985418, 93.4107149608, 96.6656412637, 88.7442599987, 3.76470152512, 90.2080470454, 27.882630017, 4.99025795108, 88.1572973314, 90.2216999377, 31.6396908787, 16.9194787282, 3.68763197192, 48.9258913099, 72.9090174736, 90.0184985884, 1.55274388966, 56.7945964904, 52.7677175364, 53.4250561266]", "111", "19.4472901864" ], "var": [ "m", "n", "v" ] }, { "value": [ "[51.4703574242, 36.457378895, 25.3685001795, 14.1747036097, 43.2005400027, 46.6273975295, 44.9075875605, 59.0338183012, 16.4916814973, 49.5485501037, 74.5543229093, 27.1862165297, 83.869761226, 40.1704951506, 14.4626703422, 50.9661673889, 8.99711511719, 66.6653481892, 34.2056680804, 76.4996836875, 62.6946840588, 74.3491299332, 65.3674041883, 2.05302512126, 75.6992239814, 33.9599104139, 25.4766365473, 59.8075929342, 46.9703196877, 88.0841034247, 42.96942953, 16.9110306214]", "32", "13.2927446943" ], "var": [ "m", "n", "v" ] }, { "value": [ "[39.169165704, 76.6145867933, 91.2638227752, 47.3718500571, 71.5270372637, 2.21904717045, 78.4079787155, 62.4979002217, 12.1206392933, 25.8152956824, 47.227123729, 34.8617800007, 19.2047008017, 2.7704256182, 25.4577635773, 53.8023513967, 49.569637989, 96.8462918372, 73.0623809439, 73.9594771832, 13.2478607931, 88.3594087655, 95.9734155286, 11.7656179945, 25.7028862, 56.2633927761, 91.0339187581, 95.74619731, 24.9846863173, 30.3399227368, 10.8073820516, 66.2110171292]", "39", "99.0653389145" ], "var": [ "m", "n", "v" ] }, { "value": [ "[74.8710889493, 17.9805005164, 43.0922750074, 38.4411802633, 94.5092690857, 39.8942007337, 72.5658782364, 55.0756378751, 11.0320235225, 21.136458561, 90.3992502826, 37.2409563401, 91.9253108957, 45.3744134818, 55.2107801682, 19.5833964645, 31.5049871879, 65.9081910573, 66.6032854187, 21.5389474281, 80.231799439, 26.2353913099, 81.127789682, 64.978091948, 86.4826706138, 17.1234866468, 56.9098605221, 6.23189977667, 15.7221356098, 68.9535878257, 52.6014137066, 81.231478842]", "123", "5.80239058028" ], "var": [ "m", "n", "v" ] }, { "value": [ "[78.9951973014, 6.65393322833, 84.6102484726, 11.6722644574, 70.9663702562, 64.2677011843, 1.27401836085, 3.09944403384, 56.7155787857, 32.1776008873, 83.8757049661, 40.6882246009, 18.6447896351, 6.53265603804, 93.573151791, 52.5918432415, 79.1950399885, 31.6736014326, 73.5970706816, 14.8810565757, 86.3766949178, 6.26357891036, 10.6335631882, 99.2059757602, 53.9210881356, 48.5429816508, 17.458872104, 68.5446139225, 11.2042125292, 5.56735397613, 18.3282382583, 30.4933565336]", "98", "95.9413043864" ], "var": [ "m", "n", "v" ] }, { "value": [ "[75.7085753039, 31.6514943251, 5.78454216114, 3.39433019629, 30.5455329841, 81.7483488305, 45.5672000319, 9.03272034545, 10.1955797865, 96.7181597621, 93.1290565352, 56.6989171558, 56.3818319407, 29.72160007, 64.2837821818, 24.505155989, 63.5269592586, 56.0945011088, 33.4279968039, 97.6212127897, 74.4146684999, 14.9541027395, 77.8373162355, 7.56878570489, 44.8921851163, 73.3778431256, 92.4317985597, 7.67244508463, 20.3487438449, 84.5937220951, 85.2167938557, 8.91144306203]", "58", "37.8428518951" ], "var": [ "m", "n", "v" ] }, { "value": [ "[56.0658312555, 46.4207139961, 1.91075847576, 63.6329296614, 53.2920746829, 37.1663917789, 87.2945510695, 43.7994717618, 8.22290862502, 18.0889162517, 15.9968401022, 76.7589029641, 8.36191328405, 12.7818172247, 18.012093827, 58.5632494715, 34.7024605303, 85.8448987515, 88.4140262832, 87.8520239603, 97.5616333499, 85.3054136652, 14.5486925094, 4.98944810152, 37.2052865616, 96.2509035864, 92.183485587, 38.154911967, 58.4265950736, 70.8540161692, 67.9678045399, 41.8695772273]", "85", "23.0112913686" ], "var": [ "m", "n", "v" ] }, { "value": [ "[84.5819027635, 30.7398282927, 35.9547892455, 37.0303666271, 39.5955556088, 15.8928772432, 54.66928756, 60.352043749, 99.1267631314, 21.479407649, 36.1581664195, 42.3052505405, 59.9560986683, 30.7365032977, 10.876309046, 23.4333899817, 1.25211796258, 77.3803744609, 1.39654537189, 86.0686691295, 2.78399431987, 42.1535225712, 17.1339092879, 94.8611401209, 27.3384511905, 13.0629678122, 97.3465999516, 94.6555265494, 14.7447221396, 99.378526268, 6.96536800529, 26.71314586]", "114", "93.2732511454" ], "var": [ "m", "n", "v" ] } ], "output": [ { "value": [ "[87.4516113129, 79.1206637018, 28.0966026377, 0.995458584473, 87.6071239141, 71.6689268962, 80.8627281854, 42.3366044081, 69.5746566884, 78.7627589597, 5.31744541478, 47.00264158, 80.6503482985, 58.4153141708, 24.7902955667, 33.0354371806, 90.9295009285, 81.327579012, 19.8966285287, 75.8498549246, 62.6053553035, 45.4123449882, 40.6228205535, 33.5992650793, 21.3942219926, 92.1081229033, 39.5295504006, 31.0653829635, 46.5521810279, 43.6672542594, 91.1470814169, 9.28467813323]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[97.530811092, 83.7375967634, 51.42051735, 43.2404354495, 99.8453726451, 87.1058630727, 4.50765523514, 49.2919235959, 42.2964471659, 64.2417084338, 38.825556041, 24.4821715308, 58.814592103, 75.9967636259, 96.0918145744, 20.8215231539, 56.198524225, 99.4052860144, 80.0742477146, 81.447906187, 93.6583410551, 72.7886564237, 0.77000003347, 91.4107056192, 95.8546941531, 84.3552794711, 3.03494920901, 0.657884401945, 79.9596437778, 42.8999621977, 79.8818533751, 49.2885962725]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[79.1132546164, 35.5335035719, 79.1863658355, 23.8976811545, 39.9217258869, 29.239242396, 59.5689826928, 74.1304044469, 39.9393064238, 10.773758833, 55.9674345255, 54.749449565, 77.1750985418, 93.4107149608, 96.6656412637, 88.7442599987, 3.76470152512, 90.2080470454, 27.882630017, 4.99025795108, 88.1572973314, 90.2216999377, 31.6396908787, 16.9194787282, 3.68763197192, 48.9258913099, 72.9090174736, 90.0184985884, 1.55274388966, 56.7945964904, 52.7677175364, 53.4250561266]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[51.4703574242, 36.457378895, 25.3685001795, 14.1747036097, 43.2005400027, 46.6273975295, 44.9075875605, 59.0338183012, 16.4916814973, 49.5485501037, 74.5543229093, 27.1862165297, 83.869761226, 40.1704951506, 14.4626703422, 50.9661673889, 8.99711511719, 66.6653481892, 34.2056680804, 76.4996836875, 62.6946840588, 74.3491299332, 65.3674041883, 2.05302512126, 75.6992239814, 33.9599104139, 25.4766365473, 59.8075929342, 46.9703196877, 88.0841034247, 42.96942953, 16.9110306214]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[39.169165704, 76.6145867933, 91.2638227752, 47.3718500571, 71.5270372637, 2.21904717045, 78.4079787155, 62.4979002217, 12.1206392933, 25.8152956824, 47.227123729, 34.8617800007, 19.2047008017, 2.7704256182, 25.4577635773, 53.8023513967, 49.569637989, 96.8462918372, 73.0623809439, 73.9594771832, 13.2478607931, 88.3594087655, 95.9734155286, 11.7656179945, 25.7028862, 56.2633927761, 91.0339187581, 95.74619731, 24.9846863173, 30.3399227368, 10.8073820516, 66.2110171292]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[74.8710889493, 17.9805005164, 43.0922750074, 38.4411802633, 94.5092690857, 39.8942007337, 72.5658782364, 55.0756378751, 11.0320235225, 21.136458561, 90.3992502826, 37.2409563401, 91.9253108957, 45.3744134818, 55.2107801682, 19.5833964645, 31.5049871879, 65.9081910573, 66.6032854187, 21.5389474281, 80.231799439, 26.2353913099, 81.127789682, 64.978091948, 86.4826706138, 17.1234866468, 56.9098605221, 6.23189977667, 15.7221356098, 68.9535878257, 52.6014137066, 81.231478842]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[78.9951973014, 6.65393322833, 84.6102484726, 11.6722644574, 70.9663702562, 64.2677011843, 1.27401836085, 3.09944403384, 56.7155787857, 32.1776008873, 83.8757049661, 40.6882246009, 18.6447896351, 6.53265603804, 93.573151791, 52.5918432415, 79.1950399885, 31.6736014326, 73.5970706816, 14.8810565757, 86.3766949178, 6.26357891036, 10.6335631882, 99.2059757602, 53.9210881356, 48.5429816508, 17.458872104, 68.5446139225, 11.2042125292, 5.56735397613, 18.3282382583, 30.4933565336]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[75.7085753039, 31.6514943251, 5.78454216114, 3.39433019629, 30.5455329841, 81.7483488305, 45.5672000319, 9.03272034545, 10.1955797865, 96.7181597621, 93.1290565352, 56.6989171558, 56.3818319407, 29.72160007, 64.2837821818, 24.505155989, 63.5269592586, 56.0945011088, 33.4279968039, 97.6212127897, 74.4146684999, 14.9541027395, 77.8373162355, 7.56878570489, 44.8921851163, 73.3778431256, 92.4317985597, 7.67244508463, 20.3487438449, 84.5937220951, 85.2167938557, 8.91144306203]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[56.0658312555, 46.4207139961, 1.91075847576, 63.6329296614, 53.2920746829, 37.1663917789, 87.2945510695, 43.7994717618, 8.22290862502, 18.0889162517, 15.9968401022, 76.7589029641, 8.36191328405, 12.7818172247, 18.012093827, 58.5632494715, 34.7024605303, 85.8448987515, 88.4140262832, 87.8520239603, 97.5616333499, 85.3054136652, 14.5486925094, 4.98944810152, 37.2052865616, 96.2509035864, 92.183485587, 38.154911967, 58.4265950736, 70.8540161692, 67.9678045399, 41.8695772273]", "-1" ], "var": [ "m", "returnv" ] }, { "value": [ "[84.5819027635, 30.7398282927, 35.9547892455, 37.0303666271, 39.5955556088, 15.8928772432, 54.66928756, 60.352043749, 99.1267631314, 21.479407649, 36.1581664195, 42.3052505405, 59.9560986683, 30.7365032977, 10.876309046, 23.4333899817, 1.25211796258, 77.3803744609, 1.39654537189, 86.0686691295, 2.78399431987, 42.1535225712, 17.1339092879, 94.8611401209, 27.3384511905, 13.0629678122, 97.3465999516, 94.6555265494, 14.7447221396, 99.378526268, 6.96536800529, 26.71314586]", "-1" ], "var": [ "m", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_5129c_0090.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* m, int n, double v, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { double output_temp_4 = m[i3]; output_temp_2.push_back(output_temp_4); } output_json["m"] = 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["m"]) { double input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } double* m = &input_temp_1_vec[0]; int n = input_json["n"]; double v = input_json["v"]; clock_t begin = clock(); int returnv = busquedaBin1(m, n, v); 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(m, n, v, returnv); }
master
null
{"livein": ["m", "n", "v"], "liveout": ["m"], "returnvarname": ["returnv"], "execcmd": "", "funname": "busquedaBin1", "funargs": ["m", "n", "v"], "typemap": {"m": "array(float64#32)", "n": "int32", "v": "float64", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_5129c_0090.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
kapec94/DemOS/src/conio.c
int _isfmt(char c) { switch (c) { case 's': case 'd': case 'x': case 'o': case 'c': return 1; default: return 0; } }
int _isfmt(charc)
int _isfmt(char c)
_isfmt
[ "int", "char" ]
{ "code": [ ".globl _isfmt\n.type _isfmt, @function\n_isfmt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovsbl\t-4(%rbp), %eax\n\tsubl\t$99, %eax\n\tcmpl\t$21, %eax\n\tseta\t%dl\n\ttestb\t%dl, %dl\n\tjne\t.L2\n\tmovl\t$1, %edx\n\tmovl\t%eax, %ecx\n\tsalq\t%cl, %rdx\n\tmovq\t%rdx, %rax\n\tandl\t$2166787, %eax\n\ttestq\t%rax, %rax\n\tsetne\t%al\n\ttestb\t%al, %al\n\tje\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl _isfmt\n.type _isfmt, @function\n_isfmt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-99(%rdi), %ecx\n\txorl\t%eax, %eax\n\tcmpb\t$21, %cl\n\tja\t.L1\n\tmovl\t$1, %eax\n\tsalq\t%cl, %rax\n\ttestl\t$2166787, %eax\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl _isfmt\n.type _isfmt, @function\n_isfmt:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-99(%rdi), %ecx\n\tcmpb\t$21, %cl\n\tja\t.L3\n\tmovl\t$1, %eax\n\tsalq\t%cl, %rax\n\ttestl\t$2166787, %eax\n\tsetne\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global _isfmt\n.type _isfmt, %function\n_isfmt:\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\tsub\tw0, w0, #99\n\tcmp\tw0, 21\n\tcset\tw1, hi\n\tand\tw1, w1, 255\n\tcmp\tw1, 0\n\tbne\t.L2\n\tmov\tx1, 1\n\tlsl\tx1, x1, x0\n\tmov\tx0, 4099\n\tmovk\tx0, 0x21, lsl 16\n\tand\tx0, x1, x0\n\tcmp\tx0, 0\n\tcset\tw0, ne\n\tand\tw0, w0, 255\n\tcmp\tw0, 0\n\tbeq\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global _isfmt\n.type _isfmt, %function\n_isfmt:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #99\n\tand\tw0, w0, 255\n\tcmp\tw0, 21\n\tbhi\t.L3\n\tmov\tx1, 1\n\tlsl\tx0, x1, x0\n\tmov\tx1, 4099\n\tmovk\tx1, 0x21, lsl 16\n\ttst\tx0, x1\n\tcset\tw0, ne\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global _isfmt\n.type _isfmt, %function\n_isfmt:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #99\n\tand\tw0, w0, 255\n\tcmp\tw0, 21\n\tbhi\t.L3\n\tmov\tx1, 1\n\tmov\tx2, 4099\n\tlsl\tx0, x1, x0\n\tmovk\tx2, 0x21, lsl 16\n\ttst\tx0, x2\n\tcset\tw0, ne\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "32" ], "var": [ "c" ] }, { "value": [ "29" ], "var": [ "c" ] }, { "value": [ "28" ], "var": [ "c" ] }, { "value": [ "107" ], "var": [ "c" ] }, { "value": [ "3" ], "var": [ "c" ] }, { "value": [ "72" ], "var": [ "c" ] }, { "value": [ "25" ], "var": [ "c" ] }, { "value": [ "35" ], "var": [ "c" ] }, { "value": [ "15" ], "var": [ "c" ] }, { "value": [ "94" ], "var": [ "c" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38iy7sragr.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 = _isfmt(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": "_isfmt", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38iy7sragr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nolink/algorithm/clrs/priority_q.c
int heap_max(int array[]){ return array[0]; }
int heap_max(int *array)
int heap_max(int array[])
heap_max
[ "int", "int *" ]
{ "code": [ ".globl heap_max\n.type heap_max, @function\nheap_max:\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\tmovl\t(%rax), %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl heap_max\n.type heap_max, @function\nheap_max:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl heap_max\n.type heap_max, @function\nheap_max:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global heap_max\n.type heap_max, %function\nheap_max:\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\tldr\tw0, [x0]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global heap_max\n.type heap_max, %function\nheap_max:\n.LFB13:\n\t.cfi_startproc\n\tldr\tw0, [x0]\n\tret\n\t.cfi_endproc\n\n", ".global heap_max\n.type heap_max, %function\nheap_max:\n.LFB23:\n\t.cfi_startproc\n\tldr\tw0, [x0]\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": [ "[41, 70, 70, 37, 61, 62, 97, 43, 12, 8, 76, 109, 10, 97, 97, 125, 44, 53, 87, 118, 110, 93, 29, 78, 39, 67, 123, 112, 122, 122, 90, 109]" ], "var": [ "array" ] }, { "value": [ "[117, 59, 39, 99, 33, 18, 73, 23, 99, 28, 97, 117, 123, 116, 75, 104, 22, 6, 37, 46, 86, 61, 101, 101, 27, 102, 116, 25, 94, 35, 121, 31]" ], "var": [ "array" ] }, { "value": [ "[90, 20, 72, 30, 10, 24, 1, 28, 84, 101, 80, 46, 2, 35, 34, 25, 93, 119, 36, 9, 57, 39, 70, 42, 110, 25, 104, 103, 105, 116, 10, 48]" ], "var": [ "array" ] }, { "value": [ "[114, 45, 26, 46, 34, 35, 103, 40, 86, 1, 8, 23, 21, 70, 80, 51, 84, 46, 62, 48, 106, 97, 45, 73, 46, 61, 12, 83, 65, 73, 24, 94]" ], "var": [ "array" ] }, { "value": [ "[3, 19, 23, 25, 79, 86, 78, 13, 117, 44, 105, 42, 14, 118, 57, 100, 53, 76, 100, 51, 26, 58, 76, 123, 70, 54, 41, 113, 14, 89, 15, 119]" ], "var": [ "array" ] }, { "value": [ "[126, 92, 5, 49, 112, 77, 73, 78, 122, 117, 14, 25, 92, 77, 95, 91, 55, 26, 26, 102, 8, 56, 1, 108, 123, 2, 52, 13, 23, 48, 21, 61]" ], "var": [ "array" ] }, { "value": [ "[49, 95, 76, 77, 99, 15, 2, 61, 54, 46, 33, 3, 42, 8, 116, 122, 10, 13, 26, 112, 95, 59, 7, 120, 38, 38, 63, 126, 40, 117, 65, 100]" ], "var": [ "array" ] }, { "value": [ "[40, 2, 61, 17, 104, 89, 76, 34, 64, 42, 29, 70, 57, 105, 99, 23, 24, 102, 63, 16, 2, 96, 102, 80, 74, 49, 111, 50, 30, 95, 47, 20]" ], "var": [ "array" ] }, { "value": [ "[108, 63, 86, 74, 61, 29, 26, 121, 125, 45, 7, 53, 107, 27, 63, 92, 126, 7, 2, 81, 77, 45, 27, 81, 96, 37, 77, 34, 116, 9, 85, 54]" ], "var": [ "array" ] }, { "value": [ "[66, 81, 67, 92, 95, 65, 77, 68, 100, 121, 35, 103, 95, 78, 60, 87, 35, 27, 33, 96, 113, 33, 42, 15, 25, 13, 106, 124, 60, 65, 75, 19]" ], "var": [ "array" ] } ], "output": [ { "value": [ "[41, 70, 70, 37, 61, 62, 97, 43, 12, 8, 76, 109, 10, 97, 97, 125, 44, 53, 87, 118, 110, 93, 29, 78, 39, 67, 123, 112, 122, 122, 90, 109]", "41" ], "var": [ "array", "returnv" ] }, { "value": [ "[117, 59, 39, 99, 33, 18, 73, 23, 99, 28, 97, 117, 123, 116, 75, 104, 22, 6, 37, 46, 86, 61, 101, 101, 27, 102, 116, 25, 94, 35, 121, 31]", "117" ], "var": [ "array", "returnv" ] }, { "value": [ "[90, 20, 72, 30, 10, 24, 1, 28, 84, 101, 80, 46, 2, 35, 34, 25, 93, 119, 36, 9, 57, 39, 70, 42, 110, 25, 104, 103, 105, 116, 10, 48]", "90" ], "var": [ "array", "returnv" ] }, { "value": [ "[114, 45, 26, 46, 34, 35, 103, 40, 86, 1, 8, 23, 21, 70, 80, 51, 84, 46, 62, 48, 106, 97, 45, 73, 46, 61, 12, 83, 65, 73, 24, 94]", "114" ], "var": [ "array", "returnv" ] }, { "value": [ "[3, 19, 23, 25, 79, 86, 78, 13, 117, 44, 105, 42, 14, 118, 57, 100, 53, 76, 100, 51, 26, 58, 76, 123, 70, 54, 41, 113, 14, 89, 15, 119]", "3" ], "var": [ "array", "returnv" ] }, { "value": [ "[126, 92, 5, 49, 112, 77, 73, 78, 122, 117, 14, 25, 92, 77, 95, 91, 55, 26, 26, 102, 8, 56, 1, 108, 123, 2, 52, 13, 23, 48, 21, 61]", "126" ], "var": [ "array", "returnv" ] }, { "value": [ "[49, 95, 76, 77, 99, 15, 2, 61, 54, 46, 33, 3, 42, 8, 116, 122, 10, 13, 26, 112, 95, 59, 7, 120, 38, 38, 63, 126, 40, 117, 65, 100]", "49" ], "var": [ "array", "returnv" ] }, { "value": [ "[40, 2, 61, 17, 104, 89, 76, 34, 64, 42, 29, 70, 57, 105, 99, 23, 24, 102, 63, 16, 2, 96, 102, 80, 74, 49, 111, 50, 30, 95, 47, 20]", "40" ], "var": [ "array", "returnv" ] }, { "value": [ "[108, 63, 86, 74, 61, 29, 26, 121, 125, 45, 7, 53, 107, 27, 63, 92, 126, 7, 2, 81, 77, 45, 27, 81, 96, 37, 77, 34, 116, 9, 85, 54]", "108" ], "var": [ "array", "returnv" ] }, { "value": [ "[66, 81, 67, 92, 95, 65, 77, 68, 100, 121, 35, 103, 95, 78, 60, 87, 35, 27, 33, 96, 113, 33, 42, 15, 25, 13, 106, 124, 60, 65, 75, 19]", "66" ], "var": [ "array", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_61o_kobj3y.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* array, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = array[i3]; output_temp_2.push_back(output_temp_4); } output_json["array"] = 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["array"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* array = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = heap_max(array); 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(array, returnv); }
master
null
{"livein": ["array"], "liveout": ["array"], "returnvarname": ["returnv"], "execcmd": "", "funname": "heap_max", "funargs": ["array"], "typemap": {"array": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61o_kobj3y.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tniles/baseballDb/baseball.c
unsigned int hashup(char *s) { unsigned int hashval; hashval = 0; while(*s != '\0'){ hashval = *s + 31 * hashval; s++; } return(hashval % 101); }
unsigned int hashup(char *s)
unsigned int hashup(char *s)
hashup
[ "unsigned int", "char *" ]
{ "code": [ ".globl hashup\n.type hashup, @function\nhashup:\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\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %ecx\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%edx, %eax\n\tsall\t$5, %eax\n\tsubl\t%edx, %eax\n\taddl\t%ecx, %eax\n\tmovl\t%eax, -4(%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.L3\n\tmovl\t-4(%rbp), %edx\n\tmovl\t%edx, %eax\n\timulq\t$1148159575, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%edx, %ecx\n\tsubl\t%eax, %ecx\n\tshrl\t%ecx\n\taddl\t%ecx, %eax\n\tshrl\t$6, %eax\n\timull\t$101, %eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl hashup\n.type hashup, @function\nhashup:\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.L5\n\timull\t$31, %eax, %eax\n\tincq\t%rdi\n\taddl\t%edx, %eax\n\tjmp\t.L2\n.L5:\n\tmovl\t$101, %ecx\n\txorl\t%edx, %edx\n\tdivl\t%ecx\n\tmovl\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl hashup\n.type hashup, @function\nhashup:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L4\n\txorl\t%ecx, %ecx\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t%ecx, %edx\n\taddq\t$1, %rdi\n\tsall\t$5, %edx\n\tsubl\t%ecx, %edx\n\tleal\t(%rax,%rdx), %ecx\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\n\tmovl\t%ecx, %eax\n\timulq\t$1148159575, %rax, %rax\n\tshrq\t$32, %rax\n\tmovq\t%rax, %rdx\n\tmovl\t%ecx, %eax\n\tsubl\t%edx, %eax\n\tshrl\t%eax\n\taddl\t%edx, %eax\n\tshrl\t$6, %eax\n\timull\t$101, %eax, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %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 hashup\n.type hashup, %function\nhashup:\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\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tmov\tw2, w0\n\tldr\tw1, [sp, 28]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 5\n\tsub\tw0, w0, w1\n\tadd\tw0, w2, w0\n\tstr\tw0, [sp, 28]\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.L3\n\tldr\tw0, [sp, 28]\n\tmov\tw1, 34391\n\tmovk\tw1, 0x446f, lsl 16\n\tumull\tx1, w0, w1\n\tlsr\tx1, x1, 32\n\tsub\tw2, w0, w1\n\tlsr\tw2, w2, 1\n\tadd\tw1, w2, w1\n\tlsr\tw1, w1, 6\n\tmov\tw2, 101\n\tmul\tw1, w1, w2\n\tsub\tw1, w0, w1\n\tmov\tw0, w1\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global hashup\n.type hashup, %function\nhashup:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, 0\n\tmov\tw3, 31\n.L2:\n\tldrb\tw2, [x0]\n\tcbnz\tw2, .L3\n\tmov\tw0, 101\n\tudiv\tw2, w1, w0\n\tmsub\tw0, w2, w0, w1\n\tret\n.L3:\n\tmadd\tw1, w1, w3, w2\n\tadd\tx0, x0, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global hashup\n.type hashup, %function\nhashup:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw2, [x0]\n\tcbz\tw2, .L4\n\tmov\tw1, 0\n\t.p2align 3,,7\n.L3:\n\tadd\tw3, w2, w1, lsl 5\n\tldrb\tw2, [x0, 1]!\n\tsub\tw1, w3, w1\n\tcbnz\tw2, .L3\n\tmov\tw0, 34391\n\tmov\tw3, 101\n\tmovk\tw0, 0x446f, lsl 16\n\tumull\tx0, w1, w0\n\tlsr\tx2, x0, 32\n\tsub\tw0, w1, w2\n\tadd\tw0, w2, w0, lsr 1\n\tlsr\tw0, w0, 6\n\tmsub\tw0, w0, w3, w1\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": [ "\"jbjcknbkscevscklgrfr\"" ], "var": [ "s" ] }, { "value": [ "\"ftieuraqodxw\"" ], "var": [ "s" ] }, { "value": [ "\"xurbrnldaitkbgtlueisokgavvyumr\"" ], "var": [ "s" ] }, { "value": [ "\"llsmiidsfawl\"" ], "var": [ "s" ] }, { "value": [ "\"v\"" ], "var": [ "s" ] }, { "value": [ "\"rnqjhcxoxalltzleoxemedfjtcbbk\"" ], "var": [ "s" ] }, { "value": [ "\"zvjcgvtcgpglanistflyib\"" ], "var": [ "s" ] }, { "value": [ "\"dsw\"" ], "var": [ "s" ] }, { "value": [ "\"zpubhww\"" ], "var": [ "s" ] }, { "value": [ "\"unayadaxwrdudoqyyw\"" ], "var": [ "s" ] } ], "output": [ { "value": [ "94", "\"jbjcknbkscevscklgrfr\"" ], "var": [ "returnv", "s" ] }, { "value": [ "87", "\"ftieuraqodxw\"" ], "var": [ "returnv", "s" ] }, { "value": [ "100", "\"xurbrnldaitkbgtlueisokgavvyumr\"" ], "var": [ "returnv", "s" ] }, { "value": [ "9", "\"llsmiidsfawl\"" ], "var": [ "returnv", "s" ] }, { "value": [ "17", "\"v\"" ], "var": [ "returnv", "s" ] }, { "value": [ "64", "\"rnqjhcxoxalltzleoxemedfjtcbbk\"" ], "var": [ "returnv", "s" ] }, { "value": [ "47", "\"zvjcgvtcgpglanistflyib\"" ], "var": [ "returnv", "s" ] }, { "value": [ "97", "\"dsw\"" ], "var": [ "returnv", "s" ] }, { "value": [ "57", "\"zpubhww\"" ], "var": [ "returnv", "s" ] }, { "value": [ "67", "\"unayadaxwrdudoqyyw\"" ], "var": [ "returnv", "s" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_63z2enkrmx.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 = hashup(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": "hashup", "funargs": ["s"], "typemap": {"s": "string", "returnv": "uint32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63z2enkrmx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Shakadak/libft/src/misc/min.c
int imin(int l, int r) { if (l < r) return (l); return (r); }
int imin(intl, intr)
int imin(int l, int r)
imin
[ "int", "int", "int" ]
{ "code": [ ".globl imin\n.type imin, @function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -4(%rbp)\n\tmovl\t%esi, -8(%rbp)\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-8(%rbp), %eax\n\tjge\t.L2\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-8(%rbp), %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl imin\n.type imin, @function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl imin\n.type imin, @function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t%esi, %edi\n\tmovl\t%esi, %eax\n\tcmovle\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global imin\n.type imin, %function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw1, [sp, 12]\n\tldr\tw0, [sp, 8]\n\tcmp\tw1, w0\n\tbge\t.L2\n\tldr\tw0, [sp, 12]\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 8]\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global imin\n.type imin, %function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, le\n\tret\n\t.cfi_endproc\n\n", ".global imin\n.type imin, %function\nimin:\n.LFB0:\n\t.cfi_startproc\n\tcmp\tw0, w1\n\tcsel\tw0, w0, w1, le\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "35", "10" ], "var": [ "l", "r" ] }, { "value": [ "8", "113" ], "var": [ "l", "r" ] }, { "value": [ "56", "36" ], "var": [ "l", "r" ] }, { "value": [ "125", "79" ], "var": [ "l", "r" ] }, { "value": [ "97", "87" ], "var": [ "l", "r" ] }, { "value": [ "69", "31" ], "var": [ "l", "r" ] }, { "value": [ "63", "68" ], "var": [ "l", "r" ] }, { "value": [ "86", "123" ], "var": [ "l", "r" ] }, { "value": [ "10", "28" ], "var": [ "l", "r" ] }, { "value": [ "11", "74" ], "var": [ "l", "r" ] } ], "output": [ { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "8" ], "var": [ "returnv" ] }, { "value": [ "36" ], "var": [ "returnv" ] }, { "value": [ "79" ], "var": [ "returnv" ] }, { "value": [ "87" ], "var": [ "returnv" ] }, { "value": [ "31" ], "var": [ "returnv" ] }, { "value": [ "63" ], "var": [ "returnv" ] }, { "value": [ "86" ], "var": [ "returnv" ] }, { "value": [ "10" ], "var": [ "returnv" ] }, { "value": [ "11" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_60593qruet.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 l, int r, 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 l = input_json["l"]; int r = input_json["r"]; clock_t begin = clock(); int returnv = imin(l, r); 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(l, r, returnv); }
master
null
{"livein": ["l", "r"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "imin", "funargs": ["l", "r"], "typemap": {"l": "int32", "r": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_60593qruet.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cyumeng/CPrimerPlus/plist.6.20.c
double power(double n, int p) { double pow = 1; int i; for (i = 1; i <= p; i++) pow *= n; return pow; }
double power(doublen, intp)
double power(double n, int p)
power
[ "double", "double", "int" ]
{ "code": [ ".globl power\n.type power, @function\npower:\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\tmovl\t%edi, -28(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tmovl\t$1, -12(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovsd\t-8(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\taddl\t$1, -12(%rbp)\n.L2:\n\tmovl\t-12(%rbp), %eax\n\tcmpl\t-28(%rbp), %eax\n\tjle\t.L3\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl power\n.type power, @function\npower:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovl\t$1, %eax\n.L2:\n\tcmpl\t%edi, %eax\n\tjg\t.L5\n\tmulsd\t%xmm1, %xmm0\n\tincl\t%eax\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl power\n.type power, @function\npower:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovapd\t%xmm0, %xmm1\n\ttestl\t%edi, %edi\n\tjle\t.L4\n\tmovsd\t.LC0(%rip), %xmm0\n\taddl\t$1, %edi\n\tmovl\t$1, %eax\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmulsd\t%xmm1, %xmm0\n\taddl\t$1, %eax\n\tcmpl\t%edi, %eax\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tmovsd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global power\n.type power, %function\npower:\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\tw0, [sp, 4]\n\tfmov\td0, 1.0e+0\n\tstr\td0, [sp, 24]\n\tmov\tw0, 1\n\tstr\tw0, [sp, 20]\n\tb\t.L2\n.L3:\n\tldr\td1, [sp, 24]\n\tldr\td0, [sp, 8]\n\tfmul\td0, d1, d0\n\tstr\td0, [sp, 24]\n\tldr\tw0, [sp, 20]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 20]\n.L2:\n\tldr\tw1, [sp, 20]\n\tldr\tw0, [sp, 4]\n\tcmp\tw1, w0\n\tble\t.L3\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 power\n.type power, %function\npower:\n.LFB13:\n\t.cfi_startproc\n\tfmov\td1, d0\n\tmov\tw1, 1\n\tfmov\td0, 1.0e+0\n.L2:\n\tcmp\tw1, w0\n\tble\t.L3\n\tret\n.L3:\n\tfmul\td0, d0, d1\n\tadd\tw1, w1, 1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global power\n.type power, %function\npower:\n.LFB23:\n\t.cfi_startproc\n\tfmov\td1, d0\n\tcmp\tw0, 0\n\tble\t.L4\n\tadd\tw1, w0, 1\n\tfmov\td0, 1.0e+0\n\tmov\tw0, 1\n\t.p2align 3,,7\n.L3:\n\tadd\tw0, w0, 1\n\tfmul\td0, d0, d1\n\tcmp\tw0, w1\n\tbne\t.L3\n\tret\n\t.p2align 2,,3\n.L4:\n\tfmov\td0, 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
#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": [ "99.3847645021", "124" ], "var": [ "n", "p" ] }, { "value": [ "33.1090437253", "31" ], "var": [ "n", "p" ] }, { "value": [ "56.7266358519", "45" ], "var": [ "n", "p" ] }, { "value": [ "91.9600932399", "16" ], "var": [ "n", "p" ] }, { "value": [ "47.9775112249", "36" ], "var": [ "n", "p" ] }, { "value": [ "99.6382257303", "46" ], "var": [ "n", "p" ] }, { "value": [ "51.1850481653", "27" ], "var": [ "n", "p" ] }, { "value": [ "99.6743722912", "10" ], "var": [ "n", "p" ] }, { "value": [ "51.7137110367", "93" ], "var": [ "n", "p" ] }, { "value": [ "88.5612545785", "7" ], "var": [ "n", "p" ] } ], "output": [ { "value": [ "4.6521831971701864e+247" ], "var": [ "returnv" ] }, { "value": [ "1.3132450091628816e+47" ], "var": [ "returnv" ] }, { "value": [ "8.325614364565072e+78" ], "var": [ "returnv" ] }, { "value": [ "2.6157151451153918e+31" ], "var": [ "returnv" ] }, { "value": [ "3.291226459486187e+60" ], "var": [ "returnv" ] }, { "value": [ "8.464383431165863e+91" ], "var": [ "returnv" ] }, { "value": [ "1.4023749320257464e+46" ], "var": [ "returnv" ] }, { "value": [ "9.679102596700312e+19" ], "var": [ "returnv" ] }, { "value": [ "2.3191589043296406e+159" ], "var": [ "returnv" ] }, { "value": [ "42727385751024.375" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_62log_jdbt.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 n, int 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 n = input_json["n"]; int p = input_json["p"]; clock_t begin = clock(); double returnv = power(n, 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(n, p, returnv); }
master
null
{"livein": ["n", "p"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "power", "funargs": ["n", "p"], "typemap": {"n": "float64", "p": "int32", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_62log_jdbt.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ningwei1993/beginnerOfC/2.c
int function(int x) { if (x % 400 == 0) { return 29; } else if (x % 100 == 0) { return 28; } else if (x % 4 == 0) { return 29; } else { return 28; } }
int function(intx)
int function(int x)
function
[ "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-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$29, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %edx\n\tmovslq\t%edx, %rax\n\timulq\t$1374389535, %rax, %rax\n\tshrq\t$32, %rax\n\tmovl\t%eax, %ecx\n\tsarl\t$5, %ecx\n\tmovl\t%edx, %eax\n\tsarl\t$31, %eax\n\tsubl\t%eax, %ecx\n\tmovl\t%ecx, %eax\n\timull\t$100, %eax, %eax\n\tsubl\t%eax, %edx\n\tmovl\t%edx, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L4\n\tmovl\t$28, %eax\n\tjmp\t.L3\n.L4:\n\tmovl\t-4(%rbp), %eax\n\tandl\t$3, %eax\n\ttestl\t%eax, %eax\n\tjne\t.L5\n\tmovl\t$29, %eax\n\tjmp\t.L3\n.L5:\n\tmovl\t$28, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl function\n.type function, @function\nfunction:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tmovl\t$400, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovl\t$29, %eax\n\ttestl\t%edx, %edx\n\tje\t.L1\n\tmovl\t%edi, %eax\n\tmovl\t$100, %ecx\n\tcltd\n\tidivl\t%ecx\n\tmovl\t$28, %eax\n\ttestl\t%edx, %edx\n\tje\t.L1\n\tandl\t$3, %edi\n\tcmpl\t$1, %edi\n\tsbbl\t%eax, %eax\n\tnotl\t%eax\n\taddl\t$29, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl function\n.type function, @function\nfunction:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\timull\t$-1030792151, %edi, %eax\n\tmovl\t$29, %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\trorl\t$2, %eax\n\tmovl\t$28, %r8d\n\tcmpl\t$42949672, %eax\n\tjbe\t.L1\n\txorl\t%r8d, %r8d\n\tandl\t$3, %edi\n\tsete\t%r8b\n\taddl\t$28, %r8d\n.L1:\n\tmovl\t%r8d, %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\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, 29\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 12]\n\tmov\tw0, 34079\n\tmovk\tw0, 0x51eb, lsl 16\n\tsmull\tx0, w1, w0\n\tlsr\tx0, x0, 32\n\tasr\tw2, w0, 5\n\tasr\tw0, w1, 31\n\tsub\tw0, w2, w0\n\tmov\tw2, 100\n\tmul\tw0, w0, w2\n\tsub\tw0, w1, w0\n\tcmp\tw0, 0\n\tbne\t.L4\n\tmov\tw0, 28\n\tb\t.L3\n.L4:\n\tldr\tw0, [sp, 12]\n\tand\tw0, w0, 3\n\tcmp\tw0, 0\n\tbne\t.L5\n\tmov\tw0, 29\n\tb\t.L3\n.L5:\n\tmov\tw0, 28\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global function\n.type function, %function\nfunction:\n.LFB13:\n\t.cfi_startproc\n\tmov\tw2, 400\n\tsdiv\tw1, w0, w2\n\tmsub\tw1, w1, w2, w0\n\tcbz\tw1, .L3\n\tmov\tw2, 100\n\tsdiv\tw1, w0, w2\n\tmsub\tw1, w1, w2, w0\n\tcbz\tw1, .L4\n\ttst\tx0, 3\n\tcset\tw0, eq\n\tadd\tw0, w0, 28\n.L1:\n\tret\n.L3:\n\tmov\tw0, 29\n\tb\t.L1\n.L4:\n\tmov\tw0, 28\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global function\n.type function, %function\nfunction:\n.LFB23:\n\t.cfi_startproc\n\tmov\tw2, w0\n\tmov\tw1, 23593\n\tmov\tw3, 47184\n\tmovk\tw1, 0xc28f, lsl 16\n\tmovk\tw3, 0x51e, lsl 16\n\tmov\tw0, 55050\n\tmovk\tw0, 0xa3, lsl 16\n\tmadd\tw1, w2, w1, w3\n\tror\tw3, w1, 4\n\tcmp\tw3, w0\n\tbls\t.L3\n\tmov\tw3, 23592\n\tror\tw1, w1, 2\n\tmovk\tw3, 0x28f, lsl 16\n\tmov\tw0, 28\n\tcmp\tw1, w3\n\tbls\t.L1\n\ttst\tx2, 3\n\tcset\tw0, eq\n\tadd\tw0, w0, 28\n.L1:\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 29\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": [ "22" ], "var": [ "x" ] }, { "value": [ "86" ], "var": [ "x" ] }, { "value": [ "62" ], "var": [ "x" ] }, { "value": [ "91" ], "var": [ "x" ] }, { "value": [ "36" ], "var": [ "x" ] }, { "value": [ "88" ], "var": [ "x" ] }, { "value": [ "52" ], "var": [ "x" ] }, { "value": [ "92" ], "var": [ "x" ] }, { "value": [ "92" ], "var": [ "x" ] }, { "value": [ "78" ], "var": [ "x" ] } ], "output": [ { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "29" ], "var": [ "returnv" ] }, { "value": [ "28" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_30rt1qv0bi.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 = function(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": "function", "funargs": ["x"], "typemap": {"x": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30rt1qv0bi.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
acktarus/Temp-probe/accept/features/fixtures/library/contribute/valid/0.0.1/src/a-c-example.c
int some_helper() { return 1; }
int some_helper()
int some_helper()
some_helper
[ "int", "" ]
{ "code": [ ".globl some_helper\n.type some_helper, @function\nsome_helper:\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 some_helper\n.type some_helper, @function\nsome_helper:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl some_helper\n.type some_helper, @function\nsome_helper:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global some_helper\n.type some_helper, %function\nsome_helper:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global some_helper\n.type some_helper, %function\nsome_helper:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n", ".global some_helper\n.type some_helper, %function\nsome_helper:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 1\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "1" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_571q_ub1ie.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 = some_helper(); 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": "some_helper", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_571q_ub1ie.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
sdruix/AutomaticParallelization/tests/06_phases_starss.dg/success_smpss-009.c
void f(int a[9]) {}
void f(int *a)
void f(int a[9])
f
[ "void", "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\tmovq\t%rdi, -8(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\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\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 f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[8, 42, 64, 11, 116, 47, 114, 98, 1]" ], "var": [ "a" ] }, { "value": [ "[103, 0, 121, 39, 54, 72, 77, 32, 55]" ], "var": [ "a" ] }, { "value": [ "[36, 9, 0, 34, 17, 107, 45, 64, 13]" ], "var": [ "a" ] }, { "value": [ "[21, 49, 40, 10, 72, 5, 84, 98, 109]" ], "var": [ "a" ] }, { "value": [ "[5, 3, 38, 13, 72, 101, 71, 58, 67]" ], "var": [ "a" ] }, { "value": [ "[14, 37, 119, 26, 84, 112, 97, 41, 102]" ], "var": [ "a" ] }, { "value": [ "[9, 34, 107, 78, 100, 32, 106, 10, 17]" ], "var": [ "a" ] }, { "value": [ "[58, 38, 17, 114, 52, 89, 89, 57, 36]" ], "var": [ "a" ] }, { "value": [ "[33, 118, 17, 37, 51, 59, 28, 38, 24]" ], "var": [ "a" ] }, { "value": [ "[81, 119, 113, 57, 99, 113, 40, 21, 0]" ], "var": [ "a" ] } ], "output": [ { "value": [ "[8, 42, 64, 11, 116, 47, 114, 98, 1]" ], "var": [ "a" ] }, { "value": [ "[103, 0, 121, 39, 54, 72, 77, 32, 55]" ], "var": [ "a" ] }, { "value": [ "[36, 9, 0, 34, 17, 107, 45, 64, 13]" ], "var": [ "a" ] }, { "value": [ "[21, 49, 40, 10, 72, 5, 84, 98, 109]" ], "var": [ "a" ] }, { "value": [ "[5, 3, 38, 13, 72, 101, 71, 58, 67]" ], "var": [ "a" ] }, { "value": [ "[14, 37, 119, 26, 84, 112, 97, 41, 102]" ], "var": [ "a" ] }, { "value": [ "[9, 34, 107, 78, 100, 32, 106, 10, 17]" ], "var": [ "a" ] }, { "value": [ "[58, 38, 17, 114, 52, 89, 89, 57, 36]" ], "var": [ "a" ] }, { "value": [ "[33, 118, 17, 37, 51, 59, 28, 38, 24]" ], "var": [ "a" ] }, { "value": [ "[81, 119, 113, 57, 99, 113, 40, 21, 0]" ], "var": [ "a" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_398jyxx1pq.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) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 9; i3++) { int output_temp_4 = a[i3]; output_temp_2.push_back(output_temp_4); } output_json["a"] = output_temp_2; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<int> input_temp_1_vec; for (auto& elem : input_json["a"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* a = &input_temp_1_vec[0]; clock_t begin = clock(); f(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); }
master
null
{"livein": ["a"], "liveout": ["a"], "returnvarname": [], "execcmd": "", "funname": "f", "funargs": ["a"], "typemap": {"a": "array(int32#9)"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_398jyxx1pq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tioover/OJ/nsu/1960.c
double fact(int n) { double sum = 1; for (; n > 1; n--) { sum *= n; } return sum; }
double fact(intn)
double fact(int n)
fact
[ "double", "int" ]
{ "code": [ ".globl fact\n.type fact, @function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tcvtsi2sdl\t-20(%rbp), %xmm0\n\tmovsd\t-8(%rbp), %xmm1\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tsubl\t$1, -20(%rbp)\n.L2:\n\tcmpl\t$1, -20(%rbp)\n\tjg\t.L3\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl fact\n.type fact, @function\nfact:\n.LFB13:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n.L2:\n\tcmpl\t$1, %edi\n\tjle\t.L5\n\tcvtsi2sdl\t%edi, %xmm1\n\tdecl\t%edi\n\tmulsd\t%xmm1, %xmm0\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl fact\n.type fact, @function\nfact:\n.LFB23:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n\tcmpl\t$1, %edi\n\tjle\t.L4\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tpxor\t%xmm1, %xmm1\n\tcvtsi2sdl\t%edi, %xmm1\n\tsubl\t$1, %edi\n\tmulsd\t%xmm1, %xmm0\n\tcmpl\t$1, %edi\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global fact\n.type fact, %function\nfact:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tfmov\td0, 1.0e+0\n\tstr\td0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\tw0, [sp, 12]\n\tscvtf\td0, w0\n\tldr\td1, [sp, 24]\n\tfmul\td0, d1, d0\n\tstr\td0, [sp, 24]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbgt\t.L3\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 fact\n.type fact, %function\nfact:\n.LFB13:\n\t.cfi_startproc\n\tfmov\td0, 1.0e+0\n.L2:\n\tcmp\tw0, 1\n\tbgt\t.L3\n\tret\n.L3:\n\tscvtf\td1, w0\n\tsub\tw0, w0, #1\n\tfmul\td0, d0, d1\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global fact\n.type fact, %function\nfact:\n.LFB23:\n\t.cfi_startproc\n\tcmp\tw0, 1\n\tfmov\td0, 1.0e+0\n\tble\t.L1\n\t.p2align 3,,7\n.L3:\n\tscvtf\td1, w0\n\tsub\tw0, w0, #1\n\tcmp\tw0, 1\n\tfmul\td0, d0, d1\n\tbne\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "23" ], "var": [ "n" ] }, { "value": [ "88" ], "var": [ "n" ] }, { "value": [ "1" ], "var": [ "n" ] }, { "value": [ "34" ], "var": [ "n" ] }, { "value": [ "3" ], "var": [ "n" ] }, { "value": [ "35" ], "var": [ "n" ] }, { "value": [ "35" ], "var": [ "n" ] }, { "value": [ "57" ], "var": [ "n" ] }, { "value": [ "50" ], "var": [ "n" ] }, { "value": [ "51" ], "var": [ "n" ] } ], "output": [ { "value": [ "2.585201673888498e+22" ], "var": [ "returnv" ] }, { "value": [ "1.854826422573984e+134" ], "var": [ "returnv" ] }, { "value": [ "1.0" ], "var": [ "returnv" ] }, { "value": [ "2.952327990396041e+38" ], "var": [ "returnv" ] }, { "value": [ "6.0" ], "var": [ "returnv" ] }, { "value": [ "1.0333147966386144e+40" ], "var": [ "returnv" ] }, { "value": [ "1.0333147966386144e+40" ], "var": [ "returnv" ] }, { "value": [ "4.052691950487723e+76" ], "var": [ "returnv" ] }, { "value": [ "3.0414093201713376e+64" ], "var": [ "returnv" ] }, { "value": [ "1.5511187532873816e+66" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_50rmma0w7a.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, 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); int n = input_json["n"]; clock_t begin = clock(); double returnv = fact(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fact", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_50rmma0w7a.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
mdavid626/fit/src/IZP_iteration calculations/proj2.c
double sd2eps(unsigned int sigdig) { double eps = 1; while (sigdig > 0) { eps *= 0.1; sigdig -= 1; } return eps; }
double sd2eps(unsigned intsigdig)
double sd2eps(unsigned int sigdig)
sd2eps
[ "double", "unsigned int" ]
{ "code": [ ".globl sd2eps\n.type sd2eps, @function\nsd2eps:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, -20(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tjmp\t.L2\n.L3:\n\tmovsd\t-8(%rbp), %xmm1\n\tmovsd\t.LC1(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t%xmm0, -8(%rbp)\n\tsubl\t$1, -20(%rbp)\n.L2:\n\tcmpl\t$0, -20(%rbp)\n\tjne\t.L3\n\tmovsd\t-8(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t2576980378\n", ".globl sd2eps\n.type sd2eps, @function\nsd2eps:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n\tmovsd\t.LC1(%rip), %xmm1\n.L2:\n\ttestl\t%edi, %edi\n\tje\t.L5\n\tmulsd\t%xmm1, %xmm0\n\tdecl\t%edi\n\tjmp\t.L2\n.L5:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t2576980378\n", ".globl sd2eps\n.type sd2eps, @function\nsd2eps:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm0\n\ttestl\t%edi, %edi\n\tje\t.L4\n\tmovsd\t.LC1(%rip), %xmm1\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmulsd\t%xmm1, %xmm0\n\tsubl\t$1, %edi\n\tjne\t.L3\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t2576980378\n", ".global sd2eps\n.type sd2eps, %function\nsd2eps:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tfmov\td0, 1.0e+0\n\tstr\td0, [sp, 24]\n\tb\t.L2\n.L3:\n\tldr\td0, [sp, 24]\n\tadrp\tx0, .LC0\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfmul\td0, d0, d1\n\tstr\td0, [sp, 24]\n\tldr\tw0, [sp, 12]\n\tsub\tw0, w0, #1\n\tstr\tw0, [sp, 12]\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tldr\td0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2576980378\n", ".global sd2eps\n.type sd2eps, %function\nsd2eps:\n.LFB35:\n\t.cfi_startproc\n\tadrp\tx1, .LC0\n\tfmov\td0, 1.0e+0\n\tldr\td1, [x1, #:lo12:.LC0]\n.L2:\n\tcbnz\tw0, .L3\n\tret\n.L3:\n\tfmul\td0, d0, d1\n\tsub\tw0, w0, #1\n\tb\t.L2\n\t.cfi_endproc\n.LC0: \t.word\t2576980378\n", ".global sd2eps\n.type sd2eps, %function\nsd2eps:\n.LFB52:\n\t.cfi_startproc\n\tfmov\td0, 1.0e+0\n\tcbz\tw0, .L1\n\tadrp\tx1, .LC0\n\tldr\td1, [x1, #:lo12:.LC0]\n\t.p2align 3,,7\n.L3:\n\tfmul\td0, d0, d1\n\tsubs\tw0, w0, #1\n\tbne\t.L3\n.L1:\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2576980378\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> #include <limits.h> #include <stdbool.h> #include <errno.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": [ "182" ], "var": [ "sigdig" ] }, { "value": [ "863" ], "var": [ "sigdig" ] }, { "value": [ "312" ], "var": [ "sigdig" ] }, { "value": [ "735" ], "var": [ "sigdig" ] }, { "value": [ "146" ], "var": [ "sigdig" ] }, { "value": [ "61" ], "var": [ "sigdig" ] }, { "value": [ "932" ], "var": [ "sigdig" ] }, { "value": [ "112" ], "var": [ "sigdig" ] }, { "value": [ "616" ], "var": [ "sigdig" ] }, { "value": [ "835" ], "var": [ "sigdig" ] } ], "output": [ { "value": [ "1.0000000000000111e-182" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "1e-312" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "1.0000000000000087e-146" ], "var": [ "returnv" ] }, { "value": [ "1.0000000000000035e-61" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "1.0000000000000066e-112" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] }, { "value": [ "0.0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_31o2haauf5.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 sigdig, 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 int sigdig = input_json["sigdig"]; clock_t begin = clock(); double returnv = sd2eps(sigdig); 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(sigdig, returnv); }
master
null
{"livein": ["sigdig"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "sd2eps", "funargs": ["sigdig"], "typemap": {"sigdig": "uint32", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31o2haauf5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
elominp/BSQ/src/my_square_root.c
int my_square_root(int nb) { int i; i = 2; if (nb <= 0) return (0); else if (nb == 1) return (1); else while (1 == 1) { if ((i * i) == nb) return (i); else if (i >= nb) return (0); else ++i; } }
int my_square_root(intnb)
int my_square_root(int nb)
my_square_root
[ "int", "int" ]
{ "code": [ ".globl my_square_root\n.type my_square_root, @function\nmy_square_root:\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$2, -4(%rbp)\n\tcmpl\t$0, -20(%rbp)\n\tjg\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$1, -20(%rbp)\n\tjne\t.L4\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L4:\n\tmovl\t-4(%rbp), %eax\n\timull\t%eax, %eax\n\tcmpl\t%eax, -20(%rbp)\n\tjne\t.L5\n\tmovl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-20(%rbp), %eax\n\tjl\t.L6\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L6:\n\taddl\t$1, -4(%rbp)\n\tjmp\t.L4\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl my_square_root\n.type my_square_root, @function\nmy_square_root:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tje\t.L1\n\tmovl\t$2, %eax\n.L3:\n\tmovl\t%eax, %edx\n\timull\t%eax, %edx\n\tcmpl\t%edi, %edx\n\tje\t.L1\n\tcmpl\t%edi, %eax\n\tjge\t.L6\n\tincl\t%eax\n\tjmp\t.L3\n.L6:\n\txorl\t%eax, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl my_square_root\n.type my_square_root, @function\nmy_square_root:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\ttestl\t%edi, %edi\n\tjle\t.L1\n\tmovl\t$1, %eax\n\tcmpl\t$1, %edi\n\tje\t.L1\n\tcmpl\t$4, %edi\n\tje\t.L7\n\tcmpl\t$2, %edi\n\tje\t.L9\n\tmovl\t$2, %eax\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tcmpl\t%eax, %edi\n\tje\t.L9\n.L3:\n\taddl\t$1, %eax\n\tmovl\t%eax, %edx\n\timull\t%eax, %edx\n\tcmpl\t%edi, %edx\n\tjne\t.L4\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L9:\n\txorl\t%eax, %eax\n.L1:\n\tret\n.L7:\n\tmovl\t$2, %eax\n\tret\n\t.cfi_endproc\n\n", ".global my_square_root\n.type my_square_root, %function\nmy_square_root:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tw0, [sp, 12]\n\tmov\tw0, 2\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 0\n\tbgt\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 1\n\tbne\t.L4\n\tmov\tw0, 1\n\tb\t.L3\n.L4:\n\tldr\tw0, [sp, 28]\n\tmul\tw0, w0, w0\n\tldr\tw1, [sp, 12]\n\tcmp\tw1, w0\n\tbne\t.L5\n\tldr\tw0, [sp, 28]\n\tb\t.L3\n.L5:\n\tldr\tw1, [sp, 28]\n\tldr\tw0, [sp, 12]\n\tcmp\tw1, w0\n\tblt\t.L6\n\tmov\tw0, 0\n\tb\t.L3\n.L6:\n\tldr\tw0, [sp, 28]\n\tadd\tw0, w0, 1\n\tstr\tw0, [sp, 28]\n\tb\t.L4\n.L3:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global my_square_root\n.type my_square_root, %function\nmy_square_root:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tcmp\tw0, 0\n\tble\t.L6\n\tcmp\tw0, 1\n\tbeq\t.L1\n\tmov\tw0, 2\n.L3:\n\tmul\tw2, w0, w0\n\tcmp\tw2, w1\n\tbeq\t.L1\n\tcmp\tw0, w1\n\tbge\t.L6\n\tadd\tw0, w0, 1\n\tb\t.L3\n.L6:\n\tmov\tw0, 0\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global my_square_root\n.type my_square_root, %function\nmy_square_root:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw1, w0\n\tcmp\tw0, 0\n\tble\t.L9\n\tcmp\tw0, 1\n\tmov\tw0, 1\n\tbeq\t.L1\n\tcmp\tw1, 4\n\tbeq\t.L7\n\tcmp\tw1, 2\n\tbeq\t.L9\n\tmov\tw0, 2\n\tb\t.L3\n\t.p2align 2,,3\n.L4:\n\tcmp\tw1, w0\n\tbeq\t.L9\n.L3:\n\tadd\tw0, w0, 1\n\tmul\tw2, w0, w0\n\tcmp\tw2, w1\n\tbne\t.L4\n.L1:\n\tret\n\t.p2align 2,,3\n.L9:\n\tmov\tw0, 0\n\tret\n.L7:\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": [ "85" ], "var": [ "nb" ] }, { "value": [ "112" ], "var": [ "nb" ] }, { "value": [ "77" ], "var": [ "nb" ] }, { "value": [ "54" ], "var": [ "nb" ] }, { "value": [ "56" ], "var": [ "nb" ] }, { "value": [ "55" ], "var": [ "nb" ] }, { "value": [ "101" ], "var": [ "nb" ] }, { "value": [ "114" ], "var": [ "nb" ] }, { "value": [ "32" ], "var": [ "nb" ] }, { "value": [ "64" ], "var": [ "nb" ] } ], "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": [ "8" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_55vw0ohoe9.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 nb, 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 nb = input_json["nb"]; clock_t begin = clock(); int returnv = my_square_root(nb); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(nb, returnv); }
master
null
{"livein": ["nb"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "my_square_root", "funargs": ["nb"], "typemap": {"nb": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55vw0ohoe9.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.target/i386/builtin-copysign.c
float test1f(float a) { return -a; }
float test1f(floata)
float test1f(float a)
test1f
[ "float", "float" ]
{ "code": [ ".globl test1f\n.type test1f, @function\ntest1f:\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-4(%rbp), %xmm0\n\tmovss\t.LC0(%rip), %xmm1\n\txorps\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n", ".globl test1f\n.type test1f, @function\ntest1f:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorps\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n", ".globl test1f\n.type test1f, @function\ntest1f:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorps\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2147483648\n", ".global test1f\n.type test1f, %function\ntest1f:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tldr\ts0, [sp, 12]\n\tfneg\ts0, s0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global test1f\n.type test1f, %function\ntest1f:\n.LFB0:\n\t.cfi_startproc\n\tfneg\ts0, s0\n\tret\n\t.cfi_endproc\n\n", ".global test1f\n.type test1f, %function\ntest1f:\n.LFB0:\n\t.cfi_startproc\n\tfneg\ts0, s0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
# 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "59.378032747" ], "var": [ "a" ] }, { "value": [ "6.3298419039" ], "var": [ "a" ] }, { "value": [ "70.4054912151" ], "var": [ "a" ] }, { "value": [ "18.5967583115" ], "var": [ "a" ] }, { "value": [ "77.5546164885" ], "var": [ "a" ] }, { "value": [ "5.53437356605" ], "var": [ "a" ] }, { "value": [ "19.3020987243" ], "var": [ "a" ] }, { "value": [ "97.4985755307" ], "var": [ "a" ] }, { "value": [ "10.5680070837" ], "var": [ "a" ] }, { "value": [ "78.3997978278" ], "var": [ "a" ] } ], "output": [ { "value": [ "-59.37803268432617" ], "var": [ "returnv" ] }, { "value": [ "-6.3298420906066895" ], "var": [ "returnv" ] }, { "value": [ "-70.4054946899414" ], "var": [ "returnv" ] }, { "value": [ "-18.596757888793945" ], "var": [ "returnv" ] }, { "value": [ "-77.55461883544922" ], "var": [ "returnv" ] }, { "value": [ "-5.534373760223389" ], "var": [ "returnv" ] }, { "value": [ "-19.302099227905273" ], "var": [ "returnv" ] }, { "value": [ "-97.49857330322266" ], "var": [ "returnv" ] }, { "value": [ "-10.568007469177246" ], "var": [ "returnv" ] }, { "value": [ "-78.39979553222656" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_30f1ttr6wr.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 a, 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 a = input_json["a"]; clock_t begin = clock(); float returnv = test1f(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); }
ar9344
null
{"livein": ["a"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "test1f", "funargs": ["a"], "typemap": {"a": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_30f1ttr6wr.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nsierra-/nsh/libft/ft_sisnum.c
int ft_sisnum(const char *str) { if (!str) return (0); while (*str != '\0') { if (*str >= '0' && *str <= '9') ++str; else return (0); } return (1); }
int ft_sisnum(const char *str)
int ft_sisnum(const char *str)
ft_sisnum
[ "int", "const char *" ]
{ "code": [ ".globl ft_sisnum\n.type ft_sisnum, @function\nft_sisnum:\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\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$47, %al\n\tjle\t.L5\n\tmovq\t-8(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$57, %al\n\tjg\t.L5\n\taddq\t$1, -8(%rbp)\n\tjmp\t.L4\n.L5:\n\tmovl\t$0, %eax\n\tjmp\t.L3\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 ft_sisnum\n.type ft_sisnum, @function\nft_sisnum:\n.LFB0:\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\tsubl\t$48, %eax\n\tcmpb\t$9, %al\n\tja\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 ft_sisnum\n.type ft_sisnum, @function\nft_sisnum:\n.LFB0:\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\tsubl\t$48, %eax\n\tcmpb\t$9, %al\n\tja\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 ft_sisnum\n.type ft_sisnum, %function\nft_sisnum:\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\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, 47\n\tbls\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 57\n\tbhi\t.L5\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tb\t.L4\n.L5:\n\tmov\tw0, 0\n\tb\t.L3\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 ft_sisnum\n.type ft_sisnum, %function\nft_sisnum:\n.LFB0:\n\t.cfi_startproc\n\tcbnz\tx0, .L3\n.L6:\n\tmov\tw0, 0\n\tb\t.L1\n.L4:\n\tsub\tw1, w1, #48\n\tand\tw1, w1, 255\n\tcmp\tw1, 9\n\tbhi\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 ft_sisnum\n.type ft_sisnum, %function\nft_sisnum:\n.LFB0:\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\tsub\tw1, w1, #48\n\tand\tw1, w1, 255\n\tcmp\tw1, 9\n\tbls\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
# 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": [ "\"csknlexu\"" ], "var": [ "str" ] }, { "value": [ "\"hibvprrpooiwfcqvcajnopzd\"" ], "var": [ "str" ] }, { "value": [ "\"vkoypd\"" ], "var": [ "str" ] }, { "value": [ "\"zwmgwn\"" ], "var": [ "str" ] }, { "value": [ "\"cdowiqdnqznirssrlogizlaoe\"" ], "var": [ "str" ] }, { "value": [ "\"zuhpeforkbipuyridxdnrhxmqlvila\"" ], "var": [ "str" ] }, { "value": [ "\"rxxyfewag\"" ], "var": [ "str" ] }, { "value": [ "\"svhb\"" ], "var": [ "str" ] }, { "value": [ "\"sarlfjglmt\"" ], "var": [ "str" ] }, { "value": [ "\"cmumnrgeybuawhgyc\"" ], "var": [ "str" ] } ], "output": [ { "value": [ "0", "\"csknlexu\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"hibvprrpooiwfcqvcajnopzd\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"vkoypd\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zwmgwn\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"cdowiqdnqznirssrlogizlaoe\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"zuhpeforkbipuyridxdnrhxmqlvila\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"rxxyfewag\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"svhb\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"sarlfjglmt\"" ], "var": [ "returnv", "str" ] }, { "value": [ "0", "\"cmumnrgeybuawhgyc\"" ], "var": [ "returnv", "str" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_38qo7vlnp9.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 = ft_sisnum(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": "ft_sisnum", "funargs": ["str"], "typemap": {"str": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_38qo7vlnp9.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cmkaul/pycles/Csrc/kinematics.h
double interp_4(double phim1, double phi, double phip1, double phip2){ return (7.0/12.0)*(phi + phip1 ) -(1.0/12.0)*(phim1 + phip2); }
double interp_4(doublephim1, doublephi, doublephip1, doublephip2)
double interp_4(double phim1, double phi, double phip1, double phip2)
interp_4
[ "double", "double", "double", "double", "double" ]
{ "code": [ ".globl interp_4\n.type interp_4, @function\ninterp_4:\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-16(%rbp), %xmm0\n\tmovapd\t%xmm0, %xmm1\n\taddsd\t-24(%rbp), %xmm1\n\tmovsd\t.LC0(%rip), %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmovsd\t-8(%rbp), %xmm1\n\tmovapd\t%xmm1, %xmm2\n\taddsd\t-32(%rbp), %xmm2\n\tmovsd\t.LC1(%rip), %xmm1\n\tmulsd\t%xmm2, %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\t2863311531\n.LC1: \t.long\t1431655765\n", ".globl interp_4\n.type interp_4, @function\ninterp_4:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm2, %xmm1\n\taddsd\t%xmm3, %xmm0\n\tmulsd\t.LC0(%rip), %xmm1\n\tmulsd\t.LC1(%rip), %xmm0\n\tsubsd\t%xmm0, %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2863311531\n.LC1: \t.long\t1431655765\n", ".globl interp_4\n.type interp_4, @function\ninterp_4:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\taddsd\t%xmm2, %xmm1\n\taddsd\t%xmm3, %xmm0\n\tmulsd\t.LC0(%rip), %xmm1\n\tmulsd\t.LC1(%rip), %xmm0\n\tsubsd\t%xmm0, %xmm1\n\tmovapd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t2863311531\n.LC1: \t.long\t1431655765\n", ".global interp_4\n.type interp_4, %function\ninterp_4:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\td0, [sp, 24]\n\tstr\td1, [sp, 16]\n\tstr\td2, [sp, 8]\n\tstr\td3, [sp]\n\tldr\td1, [sp, 16]\n\tldr\td0, [sp, 8]\n\tfadd\td0, d1, d0\n\tadrp\tx0, .LC0\n\tldr\td1, [x0, #:lo12:.LC0]\n\tfmul\td1, d0, d1\n\tldr\td2, [sp, 24]\n\tldr\td0, [sp]\n\tfadd\td0, d2, d0\n\tmov\tx0, 6148914691236517205\n\tmovk\tx0, 0x3fb5, lsl 48\n\tfmov\td2, x0\n\tfmul\td0, d0, d2\n\tfsub\td0, d1, d0\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2863311531\n", ".global interp_4\n.type interp_4, %function\ninterp_4:\n.LFB0:\n\t.cfi_startproc\n\tfadd\td3, d0, d3\n\tmov\tx0, 6148914691236517205\n\tmovk\tx0, 0x3fb5, lsl 48\n\tfmov\td0, x0\n\tadrp\tx0, .LC0\n\tfadd\td1, d1, d2\n\tfmul\td3, d3, d0\n\tldr\td0, [x0, #:lo12:.LC0]\n\tfnmsub\td0, d1, d0, d3\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2863311531\n", ".global interp_4\n.type interp_4, %function\ninterp_4:\n.LFB0:\n\t.cfi_startproc\n\tmov\tx0, 6148914691236517205\n\tfadd\td3, d0, d3\n\tmovk\tx0, 0x3fb5, lsl 48\n\tfmov\td4, x0\n\tadrp\tx0, .LC0\n\tfadd\td1, d1, d2\n\tldr\td5, [x0, #:lo12:.LC0]\n\tfmul\td3, d3, d4\n\tfnmsub\td0, d1, d5, d3\n\tret\n\t.cfi_endproc\n.LC0: \t.word\t2863311531\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": [ "90.3310988293", "35.067251868", "76.3581047974", "74.1058531854" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "47.8933252429", "10.2433141568", "43.8582857765", "20.5272857486" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "42.3021178729", "91.563246727", "16.1243697591", "38.4720261152" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "62.8349838576", "68.8148099426", "88.3876274741", "28.0879800291" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "0.789862346597", "84.5056831336", "25.6436131178", "41.1339263646" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "38.3296808972", "86.0670088116", "70.1055257149", "41.5424734118" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "18.4542288076", "26.7064941939", "7.26726099217", "78.2494637382" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "30.3911321213", "35.7154657471", "99.2575950935", "88.3415907127" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "82.5472467193", "97.3957957353", "52.2698322139", "26.8334240669" ], "var": [ "phim1", "phi", "phip1", "phip2" ] }, { "value": [ "85.481094036", "25.3490270618", "88.6825517922", "15.6557980877" ], "var": [ "phim1", "phi", "phip1", "phip2" ] } ], "output": [ { "value": [ "51.295045386925004" ], "var": [ "returnv" ] }, { "value": [ "25.857549045133332" ], "var": [ "returnv" ] }, { "value": [ "56.08659761788334" ], "var": [ "returnv" ] }, { "value": [ "84.12450816918331" ], "var": [ "returnv" ] }, { "value": [ "60.76010708738359" ], "var": [ "returnv" ] }, { "value": [ "84.444632281375" ], "var": [ "returnv" ] }, { "value": [ "11.759382813057503" ], "var": [ "returnv" ] }, { "value": [ "68.83989192085001" ], "var": [ "returnv" ] }, { "value": [ "78.18989373818334" ], "var": [ "returnv" ] }, { "value": [ "58.09034665452501" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53kj97gfn7.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 phim1, double phi, double phip1, double phip2, 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 phim1 = input_json["phim1"]; double phi = input_json["phi"]; double phip1 = input_json["phip1"]; double phip2 = input_json["phip2"]; clock_t begin = clock(); double returnv = interp_4(phim1, phi, phip1, phip2); 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(phim1, phi, phip1, phip2, returnv); }
master
null
{"livein": ["phim1", "phi", "phip1", "phip2"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "interp_4", "funargs": ["phim1", "phi", "phip1", "phip2"], "typemap": {"phim1": "float64", "phi": "float64", "phip1": "float64", "phip2": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53kj97gfn7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
BartokW/sagetv/native/ax/TSnative/ConstData.c
char* DVBGenreCode( unsigned char code ) { char *p=""; switch ( code ) { case 0x00: p="";break; case 0x10: p="Movie/drama"; break; case 0x11: p="Detective/thriller"; break; case 0x12: p="Adventure/western/war"; break; case 0x13: p="Sci-Fi/fantasy/horror"; break; case 0x14: p="Comedy"; break; case 0x15: p="Soap/melodrama/folkloric"; break; case 0x16: p="Romance"; break; case 0x17: p="Serious/classical/religious/historical movie/drama"; break; case 0x18: p="adult movie"; break; case 0x20: p="New"; break; case 0x21: p="weather"; break; case 0x22: p="magazine"; break; case 0x23: p="magazine"; break; case 0x24: p="discussion/interview/debate"; break; case 0x30: p="Show"; break; case 0x31: p="Game/quiz/contest"; break; case 0x32: p="variety"; break; case 0x33: p="talk show"; break; case 0x40: p="Sports"; break; case 0x41: p="Sports special events"; break; case 0x42: p="sports magazines"; break; case 0x43: p="Football/soccer"; break; case 0x44: p="Tennis/squash"; break; case 0x45: p="team sports"; break; case 0x46: p="Athletics"; break; case 0x47: p="Motorcycle Racing"; break; case 0x48: p="Water sport"; break; case 0x49: p="Winter sports"; break; case 0x4A: p="Equestrian"; break; case 0x4B: p="Martial sports"; break; case 0x50: p="Children"; break; case 0x51: p="Pre-school children's programmes"; break; case 0x52: p="Kids 6-14"; break; case 0x53: p="Kids 10-16"; break; case 0x54: p="Informational/educational/school programmes"; break; case 0x55: p="Cartoons/puppets"; break; case 0x60: p="Music"; break; case 0x61: p="Rock/Pop"; break; case 0x62: p="classical music"; break; case 0x63: p="folk/traditional music"; break; case 0x64: p="Jazz"; break; case 0x65: p="Opera/Musical"; break; case 0x66: p="Ballet"; break; case 0x70: p="Art"; break; case 0x71: p="Performing"; break; case 0x72: p="Fine arts"; break; case 0x73: p="Religion"; break; case 0x74: p="Popular culture/traditional arts"; break; case 0x75: p="Literature"; break; case 0x76: p="Film/Cinema"; break; case 0x77: p="Experimental film/video"; break; case 0x78: p="Broadcasting/press"; break; case 0x79: p="New media"; break; case 0x7A: p="Arts/Culture magazines"; break; case 0x7B: p="fashion"; break; case 0x80: p="Social/political issues/Economics"; break; case 0x81: p="Magazines/reports/documentary"; break; case 0x82: p="Economics/Social advisory "; break; case 0x83: p="Remarkable people"; break; case 0x90: p="Education/Science/Factual"; break; case 0x91: p="Nature/animals/environment"; break; case 0x92: p="Technology/Natural sciences"; break; case 0x93: p="Medicine/physiology/psychology"; break; case 0x94: p="Foreign countries/expeditions"; break; case 0x95: p="Social/spiritual sciences"; break; case 0x96: p="Further education"; break; case 0x97: p="Languages"; break; case 0xa0: p="Leisure Hobbies"; break; case 0xa1: p="Travel"; break; case 0xa2: p="Handicraft"; break; case 0xa3: p="Motoring"; break; case 0xa4: p="Fitness"; break; case 0xa5: p="Cooking"; break; case 0xa6: p="Advertisement/shopping"; break; case 0xa7: p="gardening"; break; case 0xb0: p="Original language"; break; case 0xb1: p="Black and white"; break; case 0xb2: p="Unpublished"; break; case 0xb3: p="Live broadcast"; break; default: p=""; break; } return p; }
char * DVBGenreCode(unsigned charcode)
char* DVBGenreCode( unsigned char code )
DVBGenreCode
[ "char *", "unsigned char" ]
{ "code": [ ".globl DVBGenreCode\n.type DVBGenreCode, @function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -20(%rbp)\n\tleaq\t.LC0(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tmovzbl\t-20(%rbp), %eax\n\tcmpl\t$179, %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.L83-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L82-.L4\n\t.long\t.L81-.L4\n\t.long\t.L80-.L4\n\t.long\t.L79-.L4\n\t.long\t.L78-.L4\n\t.long\t.L77-.L4\n\t.long\t.L76-.L4\n\t.long\t.L75-.L4\n\t.long\t.L74-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L73-.L4\n\t.long\t.L72-.L4\n\t.long\t.L71-.L4\n\t.long\t.L70-.L4\n\t.long\t.L69-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L68-.L4\n\t.long\t.L67-.L4\n\t.long\t.L66-.L4\n\t.long\t.L65-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L64-.L4\n\t.long\t.L63-.L4\n\t.long\t.L62-.L4\n\t.long\t.L61-.L4\n\t.long\t.L60-.L4\n\t.long\t.L59-.L4\n\t.long\t.L58-.L4\n\t.long\t.L57-.L4\n\t.long\t.L56-.L4\n\t.long\t.L55-.L4\n\t.long\t.L54-.L4\n\t.long\t.L53-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L52-.L4\n\t.long\t.L51-.L4\n\t.long\t.L50-.L4\n\t.long\t.L49-.L4\n\t.long\t.L48-.L4\n\t.long\t.L47-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L46-.L4\n\t.long\t.L45-.L4\n\t.long\t.L44-.L4\n\t.long\t.L43-.L4\n\t.long\t.L42-.L4\n\t.long\t.L41-.L4\n\t.long\t.L40-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L39-.L4\n\t.long\t.L38-.L4\n\t.long\t.L37-.L4\n\t.long\t.L36-.L4\n\t.long\t.L35-.L4\n\t.long\t.L34-.L4\n\t.long\t.L33-.L4\n\t.long\t.L32-.L4\n\t.long\t.L31-.L4\n\t.long\t.L30-.L4\n\t.long\t.L29-.L4\n\t.long\t.L28-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L27-.L4\n\t.long\t.L26-.L4\n\t.long\t.L25-.L4\n\t.long\t.L24-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L23-.L4\n\t.long\t.L22-.L4\n\t.long\t.L21-.L4\n\t.long\t.L20-.L4\n\t.long\t.L19-.L4\n\t.long\t.L18-.L4\n\t.long\t.L17-.L4\n\t.long\t.L16-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L15-.L4\n\t.long\t.L14-.L4\n\t.long\t.L13-.L4\n\t.long\t.L12-.L4\n\t.long\t.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L83:\n\tleaq\t.LC0(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L82:\n\tleaq\t.LC1(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L81:\n\tleaq\t.LC2(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L80:\n\tleaq\t.LC3(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L79:\n\tleaq\t.LC4(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L78:\n\tleaq\t.LC5(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L77:\n\tleaq\t.LC6(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L76:\n\tleaq\t.LC7(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L75:\n\tleaq\t.LC8(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L74:\n\tleaq\t.LC9(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L73:\n\tleaq\t.LC10(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L72:\n\tleaq\t.LC11(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L71:\n\tleaq\t.LC12(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L70:\n\tleaq\t.LC12(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L69:\n\tleaq\t.LC13(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L68:\n\tleaq\t.LC14(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L67:\n\tleaq\t.LC15(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L66:\n\tleaq\t.LC16(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L65:\n\tleaq\t.LC17(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L64:\n\tleaq\t.LC18(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L63:\n\tleaq\t.LC19(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L62:\n\tleaq\t.LC20(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L61:\n\tleaq\t.LC21(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L60:\n\tleaq\t.LC22(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L59:\n\tleaq\t.LC23(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L58:\n\tleaq\t.LC24(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L57:\n\tleaq\t.LC25(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L56:\n\tleaq\t.LC26(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L55:\n\tleaq\t.LC27(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L54:\n\tleaq\t.LC28(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L53:\n\tleaq\t.LC29(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L52:\n\tleaq\t.LC30(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L51:\n\tleaq\t.LC31(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L50:\n\tleaq\t.LC32(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L49:\n\tleaq\t.LC33(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L48:\n\tleaq\t.LC34(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L47:\n\tleaq\t.LC35(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L46:\n\tleaq\t.LC36(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L45:\n\tleaq\t.LC37(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L44:\n\tleaq\t.LC38(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L43:\n\tleaq\t.LC39(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L42:\n\tleaq\t.LC40(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L41:\n\tleaq\t.LC41(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L40:\n\tleaq\t.LC42(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L39:\n\tleaq\t.LC43(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L38:\n\tleaq\t.LC44(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L37:\n\tleaq\t.LC45(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L36:\n\tleaq\t.LC46(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L35:\n\tleaq\t.LC47(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L34:\n\tleaq\t.LC48(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L33:\n\tleaq\t.LC49(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L32:\n\tleaq\t.LC50(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L31:\n\tleaq\t.LC51(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L30:\n\tleaq\t.LC52(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L29:\n\tleaq\t.LC53(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L28:\n\tleaq\t.LC54(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L27:\n\tleaq\t.LC55(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L26:\n\tleaq\t.LC56(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L25:\n\tleaq\t.LC57(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L24:\n\tleaq\t.LC58(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L23:\n\tleaq\t.LC59(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L22:\n\tleaq\t.LC60(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L21:\n\tleaq\t.LC61(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L20:\n\tleaq\t.LC62(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L19:\n\tleaq\t.LC63(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L18:\n\tleaq\t.LC64(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L17:\n\tleaq\t.LC65(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L16:\n\tleaq\t.LC66(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L15:\n\tleaq\t.LC67(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L14:\n\tleaq\t.LC68(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L13:\n\tleaq\t.LC69(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L12:\n\tleaq\t.LC70(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L11:\n\tleaq\t.LC71(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L10:\n\tleaq\t.LC72(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L9:\n\tleaq\t.LC73(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L8:\n\tleaq\t.LC74(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L7:\n\tleaq\t.LC75(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L6:\n\tleaq\t.LC76(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L5:\n\tleaq\t.LC77(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L3:\n\tleaq\t.LC78(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L84\n.L2:\n\tleaq\t.LC0(%rip), %rax\n\tmovq\t%rax, -8(%rbp)\n\tnop\n.L84:\n\tmovq\t-8(%rbp), %rax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n.LC76: \t.string\t\"Black and white\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Religion\"\n.LC13: \t.string\t\"discussion/interview/debate\"\n.LC48: \t.string\t\"Literature\"\n.LC74: \t.string\t\"gardening\"\n.LC58: \t.string\t\"Remarkable people\"\n.LC63: \t.string\t\"Foreign countries/expeditions\"\n.LC62: \t.string\t\"Medicine/physiology/psychology\"\n.LC75: \t.string\t\"Original language\"\n.LC37: \t.string\t\"Rock/Pop\"\n.LC35: \t.string\t\"Cartoons/puppets\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Music\"\n.LC0: \t.string\t\"\"\n.LC49: \t.string\t\"Film/Cinema\"\n.LC24: \t.string\t\"Athletics\"\n.LC31: \t.string\t\"Pre-school children's programmes\"\n.LC57: \t.string\t\"Economics/Social advisory \"\n.LC39: \t.string\t\"folk/traditional music\"\n.LC53: \t.string\t\"Arts/Culture magazines\"\n.LC19: \t.string\t\"Sports special events\"\n.LC68: \t.string\t\"Travel\"\n.LC78: \t.string\t\"Live broadcast\"\n.LC56: \t.string\t\"Magazines/reports/documentary\"\n.LC77: \t.string\t\"Unpublished\"\n.LC17: \t.string\t\"talk show\"\n.LC15: \t.string\t\"Game/quiz/contest\"\n.LC65: \t.string\t\"Further education\"\n.LC64: \t.string\t\"Social/spiritual sciences\"\n.LC61: \t.string\t\"Technology/Natural sciences\"\n.LC14: \t.string\t\"Show\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Tennis/squash\"\n.LC45: \t.string\t\"Fine arts\"\n.LC33: \t.string\t\"Kids 10-16\"\n.LC25: \t.string\t\"Motorcycle Racing\"\n.LC34: \t.string\t\"Informational/educational/school programmes\"\n.LC50: \t.string\t\"Experimental film/video\"\n.LC67: \t.string\t\"Leisure Hobbies\"\n.LC28: \t.string\t\"Equestrian\"\n.LC21: \t.string\t\"Football/soccer\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"classical music\"\n.LC44: \t.string\t\"Performing\"\n.LC27: \t.string\t\"Winter sports\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"team sports\"\n.LC20: \t.string\t\"sports magazines\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Opera/Musical\"\n.LC59: \t.string\t\"Education/Science/Factual\"\n.LC66: \t.string\t\"Languages\"\n.LC40: \t.string\t\"Jazz\"\n.LC52: \t.string\t\"New media\"\n.LC18: \t.string\t\"Sports\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Martial sports\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Kids 6-14\"\n.LC54: \t.string\t\"fashion\"\n.LC55: \t.string\t\"Social/political issues/Economics\"\n.LC70: \t.string\t\"Motoring\"\n.LC60: \t.string\t\"Nature/animals/environment\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Broadcasting/press\"\n.LC1: \t.string\t\"Movie/drama\"\n.LC42: \t.string\t\"Ballet\"\n.LC73: \t.string\t\"Advertisement/shopping\"\n.LC69: \t.string\t\"Handicraft\"\n.LC16: \t.string\t\"variety\"\n.LC9: \t.string\t\"adult movie\"\n.LC43: \t.string\t\"Art\"\n.LC47: \t.string\t\"Popular culture/traditional arts\"\n.LC26: \t.string\t\"Water sport\"\n.LC30: \t.string\t\"Children\"\n.LC72: \t.string\t\"Cooking\"\n.LC71: \t.string\t\"Fitness\"\n", ".globl DVBGenreCode\n.type DVBGenreCode, @function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$16, %edi\n\tcmpb\t$-93, %dil\n\tja\t.L82\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.L81-.L4\n\t.long\t.L80-.L4\n\t.long\t.L79-.L4\n\t.long\t.L78-.L4\n\t.long\t.L77-.L4\n\t.long\t.L76-.L4\n\t.long\t.L75-.L4\n\t.long\t.L74-.L4\n\t.long\t.L73-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L72-.L4\n\t.long\t.L71-.L4\n\t.long\t.L70-.L4\n\t.long\t.L70-.L4\n\t.long\t.L69-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L68-.L4\n\t.long\t.L67-.L4\n\t.long\t.L66-.L4\n\t.long\t.L65-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L64-.L4\n\t.long\t.L63-.L4\n\t.long\t.L62-.L4\n\t.long\t.L61-.L4\n\t.long\t.L60-.L4\n\t.long\t.L59-.L4\n\t.long\t.L58-.L4\n\t.long\t.L57-.L4\n\t.long\t.L56-.L4\n\t.long\t.L55-.L4\n\t.long\t.L54-.L4\n\t.long\t.L53-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L52-.L4\n\t.long\t.L51-.L4\n\t.long\t.L50-.L4\n\t.long\t.L49-.L4\n\t.long\t.L48-.L4\n\t.long\t.L47-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L46-.L4\n\t.long\t.L45-.L4\n\t.long\t.L44-.L4\n\t.long\t.L43-.L4\n\t.long\t.L42-.L4\n\t.long\t.L41-.L4\n\t.long\t.L40-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L39-.L4\n\t.long\t.L38-.L4\n\t.long\t.L37-.L4\n\t.long\t.L36-.L4\n\t.long\t.L35-.L4\n\t.long\t.L34-.L4\n\t.long\t.L33-.L4\n\t.long\t.L32-.L4\n\t.long\t.L31-.L4\n\t.long\t.L30-.L4\n\t.long\t.L29-.L4\n\t.long\t.L28-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L27-.L4\n\t.long\t.L26-.L4\n\t.long\t.L25-.L4\n\t.long\t.L24-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L23-.L4\n\t.long\t.L22-.L4\n\t.long\t.L21-.L4\n\t.long\t.L20-.L4\n\t.long\t.L19-.L4\n\t.long\t.L18-.L4\n\t.long\t.L17-.L4\n\t.long\t.L16-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L15-.L4\n\t.long\t.L14-.L4\n\t.long\t.L13-.L4\n\t.long\t.L12-.L4\n\t.long\t.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L81:\n\tleaq\t.LC78(%rip), %rax\n\tret\n.L80:\n\tleaq\t.LC2(%rip), %rax\n\tret\n.L79:\n\tleaq\t.LC3(%rip), %rax\n\tret\n.L78:\n\tleaq\t.LC4(%rip), %rax\n\tret\n.L77:\n\tleaq\t.LC5(%rip), %rax\n\tret\n.L76:\n\tleaq\t.LC6(%rip), %rax\n\tret\n.L75:\n\tleaq\t.LC7(%rip), %rax\n\tret\n.L74:\n\tleaq\t.LC8(%rip), %rax\n\tret\n.L73:\n\tleaq\t.LC9(%rip), %rax\n\tret\n.L72:\n\tleaq\t.LC10(%rip), %rax\n\tret\n.L71:\n\tleaq\t.LC11(%rip), %rax\n\tret\n.L70:\n\tleaq\t.LC12(%rip), %rax\n\tret\n.L69:\n\tleaq\t.LC14(%rip), %rax\n\tret\n.L68:\n\tleaq\t.LC15(%rip), %rax\n\tret\n.L67:\n\tleaq\t.LC16(%rip), %rax\n\tret\n.L66:\n\tleaq\t.LC17(%rip), %rax\n\tret\n.L65:\n\tleaq\t.LC18(%rip), %rax\n\tret\n.L64:\n\tleaq\t.LC19(%rip), %rax\n\tret\n.L63:\n\tleaq\t.LC20(%rip), %rax\n\tret\n.L62:\n\tleaq\t.LC21(%rip), %rax\n\tret\n.L61:\n\tleaq\t.LC22(%rip), %rax\n\tret\n.L60:\n\tleaq\t.LC23(%rip), %rax\n\tret\n.L59:\n\tleaq\t.LC24(%rip), %rax\n\tret\n.L58:\n\tleaq\t.LC25(%rip), %rax\n\tret\n.L57:\n\tleaq\t.LC26(%rip), %rax\n\tret\n.L56:\n\tleaq\t.LC27(%rip), %rax\n\tret\n.L55:\n\tleaq\t.LC28(%rip), %rax\n\tret\n.L54:\n\tleaq\t.LC29(%rip), %rax\n\tret\n.L53:\n\tleaq\t.LC30(%rip), %rax\n\tret\n.L52:\n\tleaq\t.LC31(%rip), %rax\n\tret\n.L51:\n\tleaq\t.LC32(%rip), %rax\n\tret\n.L50:\n\tleaq\t.LC33(%rip), %rax\n\tret\n.L49:\n\tleaq\t.LC34(%rip), %rax\n\tret\n.L48:\n\tleaq\t.LC35(%rip), %rax\n\tret\n.L47:\n\tleaq\t.LC36(%rip), %rax\n\tret\n.L46:\n\tleaq\t.LC37(%rip), %rax\n\tret\n.L45:\n\tleaq\t.LC38(%rip), %rax\n\tret\n.L44:\n\tleaq\t.LC39(%rip), %rax\n\tret\n.L43:\n\tleaq\t.LC40(%rip), %rax\n\tret\n.L42:\n\tleaq\t.LC41(%rip), %rax\n\tret\n.L41:\n\tleaq\t.LC42(%rip), %rax\n\tret\n.L40:\n\tleaq\t.LC43(%rip), %rax\n\tret\n.L39:\n\tleaq\t.LC44(%rip), %rax\n\tret\n.L38:\n\tleaq\t.LC45(%rip), %rax\n\tret\n.L37:\n\tleaq\t.LC46(%rip), %rax\n\tret\n.L36:\n\tleaq\t.LC47(%rip), %rax\n\tret\n.L35:\n\tleaq\t.LC48(%rip), %rax\n\tret\n.L34:\n\tleaq\t.LC49(%rip), %rax\n\tret\n.L33:\n\tleaq\t.LC50(%rip), %rax\n\tret\n.L32:\n\tleaq\t.LC51(%rip), %rax\n\tret\n.L31:\n\tleaq\t.LC52(%rip), %rax\n\tret\n.L30:\n\tleaq\t.LC53(%rip), %rax\n\tret\n.L29:\n\tleaq\t.LC54(%rip), %rax\n\tret\n.L28:\n\tleaq\t.LC55(%rip), %rax\n\tret\n.L27:\n\tleaq\t.LC56(%rip), %rax\n\tret\n.L26:\n\tleaq\t.LC57(%rip), %rax\n\tret\n.L25:\n\tleaq\t.LC58(%rip), %rax\n\tret\n.L24:\n\tleaq\t.LC59(%rip), %rax\n\tret\n.L23:\n\tleaq\t.LC60(%rip), %rax\n\tret\n.L22:\n\tleaq\t.LC61(%rip), %rax\n\tret\n.L21:\n\tleaq\t.LC62(%rip), %rax\n\tret\n.L20:\n\tleaq\t.LC63(%rip), %rax\n\tret\n.L19:\n\tleaq\t.LC64(%rip), %rax\n\tret\n.L18:\n\tleaq\t.LC65(%rip), %rax\n\tret\n.L17:\n\tleaq\t.LC66(%rip), %rax\n\tret\n.L16:\n\tleaq\t.LC67(%rip), %rax\n\tret\n.L15:\n\tleaq\t.LC68(%rip), %rax\n\tret\n.L14:\n\tleaq\t.LC69(%rip), %rax\n\tret\n.L13:\n\tleaq\t.LC70(%rip), %rax\n\tret\n.L12:\n\tleaq\t.LC71(%rip), %rax\n\tret\n.L11:\n\tleaq\t.LC72(%rip), %rax\n\tret\n.L10:\n\tleaq\t.LC73(%rip), %rax\n\tret\n.L9:\n\tleaq\t.LC74(%rip), %rax\n\tret\n.L8:\n\tleaq\t.LC75(%rip), %rax\n\tret\n.L7:\n\tleaq\t.LC76(%rip), %rax\n\tret\n.L6:\n\tleaq\t.LC77(%rip), %rax\n\tret\n.L5:\n\tleaq\t.LC1(%rip), %rax\n\tret\n.L3:\n\tleaq\t.LC0(%rip), %rax\n\tret\n.L82:\n\tleaq\t.LC13(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC76: \t.string\t\"Original language\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Fine arts\"\n.LC48: \t.string\t\"Popular culture/traditional arts\"\n.LC74: \t.string\t\"Advertisement/shopping\"\n.LC13: \t.string\t\"\"\n.LC58: \t.string\t\"Economics/Social advisory \"\n.LC63: \t.string\t\"Medicine/physiology/psychology\"\n.LC62: \t.string\t\"Technology/Natural sciences\"\n.LC75: \t.string\t\"gardening\"\n.LC37: \t.string\t\"Music\"\n.LC35: \t.string\t\"Informational/educational/school programmes\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Cartoons/puppets\"\n.LC0: \t.string\t\"Live broadcast\"\n.LC49: \t.string\t\"Literature\"\n.LC24: \t.string\t\"team sports\"\n.LC31: \t.string\t\"Children\"\n.LC57: \t.string\t\"Magazines/reports/documentary\"\n.LC39: \t.string\t\"classical music\"\n.LC53: \t.string\t\"New media\"\n.LC19: \t.string\t\"Sports\"\n.LC68: \t.string\t\"Leisure Hobbies\"\n.LC78: \t.string\t\"Movie/drama\"\n.LC56: \t.string\t\"Social/political issues/Economics\"\n.LC77: \t.string\t\"Black and white\"\n.LC17: \t.string\t\"variety\"\n.LC15: \t.string\t\"Show\"\n.LC65: \t.string\t\"Social/spiritual sciences\"\n.LC64: \t.string\t\"Foreign countries/expeditions\"\n.LC61: \t.string\t\"Nature/animals/environment\"\n.LC14: \t.string\t\"discussion/interview/debate\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Football/soccer\"\n.LC45: \t.string\t\"Performing\"\n.LC33: \t.string\t\"Kids 6-14\"\n.LC25: \t.string\t\"Athletics\"\n.LC34: \t.string\t\"Kids 10-16\"\n.LC50: \t.string\t\"Film/Cinema\"\n.LC67: \t.string\t\"Languages\"\n.LC28: \t.string\t\"Winter sports\"\n.LC21: \t.string\t\"sports magazines\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"Rock/Pop\"\n.LC44: \t.string\t\"Art\"\n.LC27: \t.string\t\"Water sport\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"Tennis/squash\"\n.LC20: \t.string\t\"Sports special events\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Jazz\"\n.LC59: \t.string\t\"Remarkable people\"\n.LC66: \t.string\t\"Further education\"\n.LC40: \t.string\t\"folk/traditional music\"\n.LC52: \t.string\t\"Broadcasting/press\"\n.LC18: \t.string\t\"talk show\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Equestrian\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Pre-school children's programmes\"\n.LC54: \t.string\t\"Arts/Culture magazines\"\n.LC55: \t.string\t\"fashion\"\n.LC70: \t.string\t\"Handicraft\"\n.LC60: \t.string\t\"Education/Science/Factual\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Experimental film/video\"\n.LC1: \t.string\t\"Unpublished\"\n.LC42: \t.string\t\"Opera/Musical\"\n.LC73: \t.string\t\"Cooking\"\n.LC69: \t.string\t\"Travel\"\n.LC16: \t.string\t\"Game/quiz/contest\"\n.LC9: \t.string\t\"adult movie\"\n.LC43: \t.string\t\"Ballet\"\n.LC47: \t.string\t\"Religion\"\n.LC26: \t.string\t\"Motorcycle Racing\"\n.LC30: \t.string\t\"Martial sports\"\n.LC72: \t.string\t\"Fitness\"\n.LC71: \t.string\t\"Motoring\"\n", ".globl DVBGenreCode\n.type DVBGenreCode, @function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$16, %edi\n\tcmpb\t$-93, %dil\n\tja\t.L82\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.L81-.L4\n\t.long\t.L80-.L4\n\t.long\t.L79-.L4\n\t.long\t.L78-.L4\n\t.long\t.L77-.L4\n\t.long\t.L76-.L4\n\t.long\t.L75-.L4\n\t.long\t.L74-.L4\n\t.long\t.L73-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L72-.L4\n\t.long\t.L71-.L4\n\t.long\t.L70-.L4\n\t.long\t.L70-.L4\n\t.long\t.L69-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L68-.L4\n\t.long\t.L67-.L4\n\t.long\t.L66-.L4\n\t.long\t.L65-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L64-.L4\n\t.long\t.L63-.L4\n\t.long\t.L62-.L4\n\t.long\t.L61-.L4\n\t.long\t.L60-.L4\n\t.long\t.L59-.L4\n\t.long\t.L58-.L4\n\t.long\t.L57-.L4\n\t.long\t.L56-.L4\n\t.long\t.L55-.L4\n\t.long\t.L54-.L4\n\t.long\t.L53-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L52-.L4\n\t.long\t.L51-.L4\n\t.long\t.L50-.L4\n\t.long\t.L49-.L4\n\t.long\t.L48-.L4\n\t.long\t.L47-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L46-.L4\n\t.long\t.L45-.L4\n\t.long\t.L44-.L4\n\t.long\t.L43-.L4\n\t.long\t.L42-.L4\n\t.long\t.L41-.L4\n\t.long\t.L40-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L39-.L4\n\t.long\t.L38-.L4\n\t.long\t.L37-.L4\n\t.long\t.L36-.L4\n\t.long\t.L35-.L4\n\t.long\t.L34-.L4\n\t.long\t.L33-.L4\n\t.long\t.L32-.L4\n\t.long\t.L31-.L4\n\t.long\t.L30-.L4\n\t.long\t.L29-.L4\n\t.long\t.L28-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L27-.L4\n\t.long\t.L26-.L4\n\t.long\t.L25-.L4\n\t.long\t.L24-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L23-.L4\n\t.long\t.L22-.L4\n\t.long\t.L21-.L4\n\t.long\t.L20-.L4\n\t.long\t.L19-.L4\n\t.long\t.L18-.L4\n\t.long\t.L17-.L4\n\t.long\t.L16-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L15-.L4\n\t.long\t.L14-.L4\n\t.long\t.L13-.L4\n\t.long\t.L12-.L4\n\t.long\t.L11-.L4\n\t.long\t.L10-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L82-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n\t.p2align 4,,10\n\t.p2align 3\n.L82:\n\tleaq\t.LC13(%rip), %rax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L70:\n\tleaq\t.LC12(%rip), %rax\n\tret\n.L71:\n\tleaq\t.LC11(%rip), %rax\n\tret\n.L6:\n\tleaq\t.LC77(%rip), %rax\n\tret\n.L7:\n\tleaq\t.LC76(%rip), %rax\n\tret\n.L8:\n\tleaq\t.LC75(%rip), %rax\n\tret\n.L9:\n\tleaq\t.LC74(%rip), %rax\n\tret\n.L10:\n\tleaq\t.LC73(%rip), %rax\n\tret\n.L11:\n\tleaq\t.LC72(%rip), %rax\n\tret\n.L12:\n\tleaq\t.LC71(%rip), %rax\n\tret\n.L13:\n\tleaq\t.LC70(%rip), %rax\n\tret\n.L14:\n\tleaq\t.LC69(%rip), %rax\n\tret\n.L15:\n\tleaq\t.LC68(%rip), %rax\n\tret\n.L16:\n\tleaq\t.LC67(%rip), %rax\n\tret\n.L17:\n\tleaq\t.LC66(%rip), %rax\n\tret\n.L3:\n\tleaq\t.LC0(%rip), %rax\n\tret\n.L5:\n\tleaq\t.LC1(%rip), %rax\n\tret\n.L72:\n\tleaq\t.LC10(%rip), %rax\n\tret\n.L73:\n\tleaq\t.LC9(%rip), %rax\n\tret\n.L66:\n\tleaq\t.LC17(%rip), %rax\n\tret\n.L67:\n\tleaq\t.LC16(%rip), %rax\n\tret\n.L68:\n\tleaq\t.LC15(%rip), %rax\n\tret\n.L69:\n\tleaq\t.LC14(%rip), %rax\n\tret\n.L74:\n\tleaq\t.LC8(%rip), %rax\n\tret\n.L75:\n\tleaq\t.LC7(%rip), %rax\n\tret\n.L76:\n\tleaq\t.LC6(%rip), %rax\n\tret\n.L77:\n\tleaq\t.LC5(%rip), %rax\n\tret\n.L78:\n\tleaq\t.LC4(%rip), %rax\n\tret\n.L79:\n\tleaq\t.LC3(%rip), %rax\n\tret\n.L80:\n\tleaq\t.LC2(%rip), %rax\n\tret\n.L50:\n\tleaq\t.LC33(%rip), %rax\n\tret\n.L51:\n\tleaq\t.LC32(%rip), %rax\n\tret\n.L52:\n\tleaq\t.LC31(%rip), %rax\n\tret\n.L53:\n\tleaq\t.LC30(%rip), %rax\n\tret\n.L54:\n\tleaq\t.LC29(%rip), %rax\n\tret\n.L55:\n\tleaq\t.LC28(%rip), %rax\n\tret\n.L56:\n\tleaq\t.LC27(%rip), %rax\n\tret\n.L57:\n\tleaq\t.LC26(%rip), %rax\n\tret\n.L58:\n\tleaq\t.LC25(%rip), %rax\n\tret\n.L59:\n\tleaq\t.LC24(%rip), %rax\n\tret\n.L60:\n\tleaq\t.LC23(%rip), %rax\n\tret\n.L61:\n\tleaq\t.LC22(%rip), %rax\n\tret\n.L62:\n\tleaq\t.LC21(%rip), %rax\n\tret\n.L63:\n\tleaq\t.LC20(%rip), %rax\n\tret\n.L64:\n\tleaq\t.LC19(%rip), %rax\n\tret\n.L65:\n\tleaq\t.LC18(%rip), %rax\n\tret\n.L18:\n\tleaq\t.LC65(%rip), %rax\n\tret\n.L19:\n\tleaq\t.LC64(%rip), %rax\n\tret\n.L20:\n\tleaq\t.LC63(%rip), %rax\n\tret\n.L21:\n\tleaq\t.LC62(%rip), %rax\n\tret\n.L22:\n\tleaq\t.LC61(%rip), %rax\n\tret\n.L23:\n\tleaq\t.LC60(%rip), %rax\n\tret\n.L24:\n\tleaq\t.LC59(%rip), %rax\n\tret\n.L25:\n\tleaq\t.LC58(%rip), %rax\n\tret\n.L26:\n\tleaq\t.LC57(%rip), %rax\n\tret\n.L27:\n\tleaq\t.LC56(%rip), %rax\n\tret\n.L28:\n\tleaq\t.LC55(%rip), %rax\n\tret\n.L29:\n\tleaq\t.LC54(%rip), %rax\n\tret\n.L30:\n\tleaq\t.LC53(%rip), %rax\n\tret\n.L31:\n\tleaq\t.LC52(%rip), %rax\n\tret\n.L32:\n\tleaq\t.LC51(%rip), %rax\n\tret\n.L33:\n\tleaq\t.LC50(%rip), %rax\n\tret\n.L34:\n\tleaq\t.LC49(%rip), %rax\n\tret\n.L35:\n\tleaq\t.LC48(%rip), %rax\n\tret\n.L36:\n\tleaq\t.LC47(%rip), %rax\n\tret\n.L37:\n\tleaq\t.LC46(%rip), %rax\n\tret\n.L38:\n\tleaq\t.LC45(%rip), %rax\n\tret\n.L39:\n\tleaq\t.LC44(%rip), %rax\n\tret\n.L40:\n\tleaq\t.LC43(%rip), %rax\n\tret\n.L41:\n\tleaq\t.LC42(%rip), %rax\n\tret\n.L42:\n\tleaq\t.LC41(%rip), %rax\n\tret\n.L43:\n\tleaq\t.LC40(%rip), %rax\n\tret\n.L44:\n\tleaq\t.LC39(%rip), %rax\n\tret\n.L45:\n\tleaq\t.LC38(%rip), %rax\n\tret\n.L46:\n\tleaq\t.LC37(%rip), %rax\n\tret\n.L47:\n\tleaq\t.LC36(%rip), %rax\n\tret\n.L48:\n\tleaq\t.LC35(%rip), %rax\n\tret\n.L49:\n\tleaq\t.LC34(%rip), %rax\n\tret\n.L81:\n\tleaq\t.LC78(%rip), %rax\n\tret\n\t.cfi_endproc\n.LC76: \t.string\t\"Original language\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Fine arts\"\n.LC13: \t.string\t\"\"\n.LC74: \t.string\t\"Advertisement/shopping\"\n.LC48: \t.string\t\"Popular culture/traditional arts\"\n.LC58: \t.string\t\"Economics/Social advisory \"\n.LC63: \t.string\t\"Medicine/physiology/psychology\"\n.LC62: \t.string\t\"Technology/Natural sciences\"\n.LC75: \t.string\t\"gardening\"\n.LC37: \t.string\t\"Music\"\n.LC35: \t.string\t\"Informational/educational/school programmes\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Cartoons/puppets\"\n.LC0: \t.string\t\"Live broadcast\"\n.LC49: \t.string\t\"Literature\"\n.LC24: \t.string\t\"team sports\"\n.LC31: \t.string\t\"Children\"\n.LC57: \t.string\t\"Magazines/reports/documentary\"\n.LC39: \t.string\t\"classical music\"\n.LC68: \t.string\t\"Leisure Hobbies\"\n.LC19: \t.string\t\"Sports\"\n.LC53: \t.string\t\"New media\"\n.LC78: \t.string\t\"Movie/drama\"\n.LC56: \t.string\t\"Social/political issues/Economics\"\n.LC77: \t.string\t\"Black and white\"\n.LC17: \t.string\t\"variety\"\n.LC15: \t.string\t\"Show\"\n.LC65: \t.string\t\"Social/spiritual sciences\"\n.LC64: \t.string\t\"Foreign countries/expeditions\"\n.LC61: \t.string\t\"Nature/animals/environment\"\n.LC14: \t.string\t\"discussion/interview/debate\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Football/soccer\"\n.LC45: \t.string\t\"Performing\"\n.LC33: \t.string\t\"Kids 6-14\"\n.LC25: \t.string\t\"Athletics\"\n.LC34: \t.string\t\"Kids 10-16\"\n.LC50: \t.string\t\"Film/Cinema\"\n.LC67: \t.string\t\"Languages\"\n.LC28: \t.string\t\"Winter sports\"\n.LC21: \t.string\t\"sports magazines\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"Rock/Pop\"\n.LC44: \t.string\t\"Art\"\n.LC27: \t.string\t\"Water sport\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"Tennis/squash\"\n.LC20: \t.string\t\"Sports special events\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Jazz\"\n.LC59: \t.string\t\"Remarkable people\"\n.LC66: \t.string\t\"Further education\"\n.LC40: \t.string\t\"folk/traditional music\"\n.LC52: \t.string\t\"Broadcasting/press\"\n.LC18: \t.string\t\"talk show\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Equestrian\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Pre-school children's programmes\"\n.LC54: \t.string\t\"Arts/Culture magazines\"\n.LC55: \t.string\t\"fashion\"\n.LC70: \t.string\t\"Handicraft\"\n.LC60: \t.string\t\"Education/Science/Factual\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Experimental film/video\"\n.LC1: \t.string\t\"Unpublished\"\n.LC42: \t.string\t\"Opera/Musical\"\n.LC73: \t.string\t\"Cooking\"\n.LC69: \t.string\t\"Travel\"\n.LC16: \t.string\t\"Game/quiz/contest\"\n.LC9: \t.string\t\"adult movie\"\n.LC47: \t.string\t\"Religion\"\n.LC43: \t.string\t\"Ballet\"\n.LC26: \t.string\t\"Motorcycle Racing\"\n.LC30: \t.string\t\"Martial sports\"\n.LC72: \t.string\t\"Fitness\"\n.LC71: \t.string\t\"Motoring\"\n", ".global DVBGenreCode\n.type DVBGenreCode, %function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tstr\tx0, [sp, 24]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 179\n\tbhi\t.L2\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldr\tw0, [x1,w0,uxtw #2]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxtw #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.word\t(.L83 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L82 - .Lrtx4) / 4\n\t.word\t(.L81 - .Lrtx4) / 4\n\t.word\t(.L80 - .Lrtx4) / 4\n\t.word\t(.L79 - .Lrtx4) / 4\n\t.word\t(.L78 - .Lrtx4) / 4\n\t.word\t(.L77 - .Lrtx4) / 4\n\t.word\t(.L76 - .Lrtx4) / 4\n\t.word\t(.L75 - .Lrtx4) / 4\n\t.word\t(.L74 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L73 - .Lrtx4) / 4\n\t.word\t(.L72 - .Lrtx4) / 4\n\t.word\t(.L71 - .Lrtx4) / 4\n\t.word\t(.L70 - .Lrtx4) / 4\n\t.word\t(.L69 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L68 - .Lrtx4) / 4\n\t.word\t(.L67 - .Lrtx4) / 4\n\t.word\t(.L66 - .Lrtx4) / 4\n\t.word\t(.L65 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L64 - .Lrtx4) / 4\n\t.word\t(.L63 - .Lrtx4) / 4\n\t.word\t(.L62 - .Lrtx4) / 4\n\t.word\t(.L61 - .Lrtx4) / 4\n\t.word\t(.L60 - .Lrtx4) / 4\n\t.word\t(.L59 - .Lrtx4) / 4\n\t.word\t(.L58 - .Lrtx4) / 4\n\t.word\t(.L57 - .Lrtx4) / 4\n\t.word\t(.L56 - .Lrtx4) / 4\n\t.word\t(.L55 - .Lrtx4) / 4\n\t.word\t(.L54 - .Lrtx4) / 4\n\t.word\t(.L53 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L52 - .Lrtx4) / 4\n\t.word\t(.L51 - .Lrtx4) / 4\n\t.word\t(.L50 - .Lrtx4) / 4\n\t.word\t(.L49 - .Lrtx4) / 4\n\t.word\t(.L48 - .Lrtx4) / 4\n\t.word\t(.L47 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L46 - .Lrtx4) / 4\n\t.word\t(.L45 - .Lrtx4) / 4\n\t.word\t(.L44 - .Lrtx4) / 4\n\t.word\t(.L43 - .Lrtx4) / 4\n\t.word\t(.L42 - .Lrtx4) / 4\n\t.word\t(.L41 - .Lrtx4) / 4\n\t.word\t(.L40 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L39 - .Lrtx4) / 4\n\t.word\t(.L38 - .Lrtx4) / 4\n\t.word\t(.L37 - .Lrtx4) / 4\n\t.word\t(.L36 - .Lrtx4) / 4\n\t.word\t(.L35 - .Lrtx4) / 4\n\t.word\t(.L34 - .Lrtx4) / 4\n\t.word\t(.L33 - .Lrtx4) / 4\n\t.word\t(.L32 - .Lrtx4) / 4\n\t.word\t(.L31 - .Lrtx4) / 4\n\t.word\t(.L30 - .Lrtx4) / 4\n\t.word\t(.L29 - .Lrtx4) / 4\n\t.word\t(.L28 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L27 - .Lrtx4) / 4\n\t.word\t(.L26 - .Lrtx4) / 4\n\t.word\t(.L25 - .Lrtx4) / 4\n\t.word\t(.L24 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L23 - .Lrtx4) / 4\n\t.word\t(.L22 - .Lrtx4) / 4\n\t.word\t(.L21 - .Lrtx4) / 4\n\t.word\t(.L20 - .Lrtx4) / 4\n\t.word\t(.L19 - .Lrtx4) / 4\n\t.word\t(.L18 - .Lrtx4) / 4\n\t.word\t(.L17 - .Lrtx4) / 4\n\t.word\t(.L16 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L15 - .Lrtx4) / 4\n\t.word\t(.L14 - .Lrtx4) / 4\n\t.word\t(.L13 - .Lrtx4) / 4\n\t.word\t(.L12 - .Lrtx4) / 4\n\t.word\t(.L11 - .Lrtx4) / 4\n\t.word\t(.L10 - .Lrtx4) / 4\n\t.word\t(.L9 - .Lrtx4) / 4\n\t.word\t(.L8 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L2 - .Lrtx4) / 4\n\t.word\t(.L7 - .Lrtx4) / 4\n\t.word\t(.L6 - .Lrtx4) / 4\n\t.word\t(.L5 - .Lrtx4) / 4\n\t.word\t(.L3 - .Lrtx4) / 4\n\t.text\n.L83:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L82:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L81:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L80:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L79:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L78:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L77:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L76:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L75:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L74:\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L73:\n\tadrp\tx0, .LC10\n\tadd\tx0, x0, :lo12:.LC10\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L72:\n\tadrp\tx0, .LC11\n\tadd\tx0, x0, :lo12:.LC11\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L71:\n\tadrp\tx0, .LC12\n\tadd\tx0, x0, :lo12:.LC12\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L70:\n\tadrp\tx0, .LC12\n\tadd\tx0, x0, :lo12:.LC12\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L69:\n\tadrp\tx0, .LC13\n\tadd\tx0, x0, :lo12:.LC13\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L68:\n\tadrp\tx0, .LC14\n\tadd\tx0, x0, :lo12:.LC14\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L67:\n\tadrp\tx0, .LC15\n\tadd\tx0, x0, :lo12:.LC15\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L66:\n\tadrp\tx0, .LC16\n\tadd\tx0, x0, :lo12:.LC16\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L65:\n\tadrp\tx0, .LC17\n\tadd\tx0, x0, :lo12:.LC17\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L64:\n\tadrp\tx0, .LC18\n\tadd\tx0, x0, :lo12:.LC18\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L63:\n\tadrp\tx0, .LC19\n\tadd\tx0, x0, :lo12:.LC19\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L62:\n\tadrp\tx0, .LC20\n\tadd\tx0, x0, :lo12:.LC20\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L61:\n\tadrp\tx0, .LC21\n\tadd\tx0, x0, :lo12:.LC21\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L60:\n\tadrp\tx0, .LC22\n\tadd\tx0, x0, :lo12:.LC22\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L59:\n\tadrp\tx0, .LC23\n\tadd\tx0, x0, :lo12:.LC23\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L58:\n\tadrp\tx0, .LC24\n\tadd\tx0, x0, :lo12:.LC24\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L57:\n\tadrp\tx0, .LC25\n\tadd\tx0, x0, :lo12:.LC25\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L56:\n\tadrp\tx0, .LC26\n\tadd\tx0, x0, :lo12:.LC26\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L55:\n\tadrp\tx0, .LC27\n\tadd\tx0, x0, :lo12:.LC27\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L54:\n\tadrp\tx0, .LC28\n\tadd\tx0, x0, :lo12:.LC28\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L53:\n\tadrp\tx0, .LC29\n\tadd\tx0, x0, :lo12:.LC29\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L52:\n\tadrp\tx0, .LC30\n\tadd\tx0, x0, :lo12:.LC30\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L51:\n\tadrp\tx0, .LC31\n\tadd\tx0, x0, :lo12:.LC31\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L50:\n\tadrp\tx0, .LC32\n\tadd\tx0, x0, :lo12:.LC32\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L49:\n\tadrp\tx0, .LC33\n\tadd\tx0, x0, :lo12:.LC33\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L48:\n\tadrp\tx0, .LC34\n\tadd\tx0, x0, :lo12:.LC34\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L47:\n\tadrp\tx0, .LC35\n\tadd\tx0, x0, :lo12:.LC35\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L46:\n\tadrp\tx0, .LC36\n\tadd\tx0, x0, :lo12:.LC36\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L45:\n\tadrp\tx0, .LC37\n\tadd\tx0, x0, :lo12:.LC37\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L44:\n\tadrp\tx0, .LC38\n\tadd\tx0, x0, :lo12:.LC38\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L43:\n\tadrp\tx0, .LC39\n\tadd\tx0, x0, :lo12:.LC39\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L42:\n\tadrp\tx0, .LC40\n\tadd\tx0, x0, :lo12:.LC40\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L41:\n\tadrp\tx0, .LC41\n\tadd\tx0, x0, :lo12:.LC41\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L40:\n\tadrp\tx0, .LC42\n\tadd\tx0, x0, :lo12:.LC42\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L39:\n\tadrp\tx0, .LC43\n\tadd\tx0, x0, :lo12:.LC43\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L38:\n\tadrp\tx0, .LC44\n\tadd\tx0, x0, :lo12:.LC44\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L37:\n\tadrp\tx0, .LC45\n\tadd\tx0, x0, :lo12:.LC45\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L36:\n\tadrp\tx0, .LC46\n\tadd\tx0, x0, :lo12:.LC46\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L35:\n\tadrp\tx0, .LC47\n\tadd\tx0, x0, :lo12:.LC47\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L34:\n\tadrp\tx0, .LC48\n\tadd\tx0, x0, :lo12:.LC48\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L33:\n\tadrp\tx0, .LC49\n\tadd\tx0, x0, :lo12:.LC49\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L32:\n\tadrp\tx0, .LC50\n\tadd\tx0, x0, :lo12:.LC50\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L31:\n\tadrp\tx0, .LC51\n\tadd\tx0, x0, :lo12:.LC51\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L30:\n\tadrp\tx0, .LC52\n\tadd\tx0, x0, :lo12:.LC52\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L29:\n\tadrp\tx0, .LC53\n\tadd\tx0, x0, :lo12:.LC53\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L28:\n\tadrp\tx0, .LC54\n\tadd\tx0, x0, :lo12:.LC54\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L27:\n\tadrp\tx0, .LC55\n\tadd\tx0, x0, :lo12:.LC55\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L26:\n\tadrp\tx0, .LC56\n\tadd\tx0, x0, :lo12:.LC56\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L25:\n\tadrp\tx0, .LC57\n\tadd\tx0, x0, :lo12:.LC57\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L24:\n\tadrp\tx0, .LC58\n\tadd\tx0, x0, :lo12:.LC58\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L23:\n\tadrp\tx0, .LC59\n\tadd\tx0, x0, :lo12:.LC59\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L22:\n\tadrp\tx0, .LC60\n\tadd\tx0, x0, :lo12:.LC60\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L21:\n\tadrp\tx0, .LC61\n\tadd\tx0, x0, :lo12:.LC61\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L20:\n\tadrp\tx0, .LC62\n\tadd\tx0, x0, :lo12:.LC62\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L19:\n\tadrp\tx0, .LC63\n\tadd\tx0, x0, :lo12:.LC63\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L18:\n\tadrp\tx0, .LC64\n\tadd\tx0, x0, :lo12:.LC64\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L17:\n\tadrp\tx0, .LC65\n\tadd\tx0, x0, :lo12:.LC65\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L16:\n\tadrp\tx0, .LC66\n\tadd\tx0, x0, :lo12:.LC66\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L15:\n\tadrp\tx0, .LC67\n\tadd\tx0, x0, :lo12:.LC67\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L14:\n\tadrp\tx0, .LC68\n\tadd\tx0, x0, :lo12:.LC68\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L13:\n\tadrp\tx0, .LC69\n\tadd\tx0, x0, :lo12:.LC69\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L12:\n\tadrp\tx0, .LC70\n\tadd\tx0, x0, :lo12:.LC70\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L11:\n\tadrp\tx0, .LC71\n\tadd\tx0, x0, :lo12:.LC71\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L10:\n\tadrp\tx0, .LC72\n\tadd\tx0, x0, :lo12:.LC72\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L9:\n\tadrp\tx0, .LC73\n\tadd\tx0, x0, :lo12:.LC73\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L8:\n\tadrp\tx0, .LC74\n\tadd\tx0, x0, :lo12:.LC74\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L7:\n\tadrp\tx0, .LC75\n\tadd\tx0, x0, :lo12:.LC75\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L6:\n\tadrp\tx0, .LC76\n\tadd\tx0, x0, :lo12:.LC76\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L5:\n\tadrp\tx0, .LC77\n\tadd\tx0, x0, :lo12:.LC77\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L3:\n\tadrp\tx0, .LC78\n\tadd\tx0, x0, :lo12:.LC78\n\tstr\tx0, [sp, 24]\n\tb\t.L84\n.L2:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tstr\tx0, [sp, 24]\n\tnop\n.L84:\n\tldr\tx0, [sp, 24]\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n.LC76: \t.string\t\"Black and white\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Religion\"\n.LC13: \t.string\t\"discussion/interview/debate\"\n.LC48: \t.string\t\"Literature\"\n.LC74: \t.string\t\"gardening\"\n.LC58: \t.string\t\"Remarkable people\"\n.LC63: \t.string\t\"Foreign countries/expeditions\"\n.LC62: \t.string\t\"Medicine/physiology/psychology\"\n.LC75: \t.string\t\"Original language\"\n.LC37: \t.string\t\"Rock/Pop\"\n.LC35: \t.string\t\"Cartoons/puppets\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Music\"\n.LC0: \t.string\t\"\"\n.LC49: \t.string\t\"Film/Cinema\"\n.LC24: \t.string\t\"Athletics\"\n.LC31: \t.string\t\"Pre-school children's programmes\"\n.LC57: \t.string\t\"Economics/Social advisory \"\n.LC39: \t.string\t\"folk/traditional music\"\n.LC53: \t.string\t\"Arts/Culture magazines\"\n.LC19: \t.string\t\"Sports special events\"\n.LC68: \t.string\t\"Travel\"\n.LC78: \t.string\t\"Live broadcast\"\n.LC56: \t.string\t\"Magazines/reports/documentary\"\n.LC77: \t.string\t\"Unpublished\"\n.LC17: \t.string\t\"talk show\"\n.LC15: \t.string\t\"Game/quiz/contest\"\n.LC65: \t.string\t\"Further education\"\n.LC64: \t.string\t\"Social/spiritual sciences\"\n.LC61: \t.string\t\"Technology/Natural sciences\"\n.LC14: \t.string\t\"Show\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Tennis/squash\"\n.LC45: \t.string\t\"Fine arts\"\n.LC33: \t.string\t\"Kids 10-16\"\n.LC25: \t.string\t\"Motorcycle Racing\"\n.LC34: \t.string\t\"Informational/educational/school programmes\"\n.LC50: \t.string\t\"Experimental film/video\"\n.LC67: \t.string\t\"Leisure Hobbies\"\n.LC28: \t.string\t\"Equestrian\"\n.LC21: \t.string\t\"Football/soccer\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"classical music\"\n.LC44: \t.string\t\"Performing\"\n.LC27: \t.string\t\"Winter sports\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"team sports\"\n.LC20: \t.string\t\"sports magazines\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Opera/Musical\"\n.LC59: \t.string\t\"Education/Science/Factual\"\n.LC66: \t.string\t\"Languages\"\n.LC40: \t.string\t\"Jazz\"\n.LC52: \t.string\t\"New media\"\n.LC18: \t.string\t\"Sports\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Martial sports\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Kids 6-14\"\n.LC54: \t.string\t\"fashion\"\n.LC55: \t.string\t\"Social/political issues/Economics\"\n.LC70: \t.string\t\"Motoring\"\n.LC60: \t.string\t\"Nature/animals/environment\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Broadcasting/press\"\n.LC1: \t.string\t\"Movie/drama\"\n.LC42: \t.string\t\"Ballet\"\n.LC73: \t.string\t\"Advertisement/shopping\"\n.LC69: \t.string\t\"Handicraft\"\n.LC16: \t.string\t\"variety\"\n.LC9: \t.string\t\"adult movie\"\n.LC43: \t.string\t\"Art\"\n.LC47: \t.string\t\"Popular culture/traditional arts\"\n.LC26: \t.string\t\"Water sport\"\n.LC30: \t.string\t\"Children\"\n.LC72: \t.string\t\"Cooking\"\n.LC71: \t.string\t\"Fitness\"\n", ".global DVBGenreCode\n.type DVBGenreCode, %function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #16\n\tcmp\tw0, 163\n\tbhi\t.L82\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldrh\tw0, [x1,w0,uxtw #1]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxth #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.2byte\t(.L81 - .Lrtx4) / 4\n\t.2byte\t(.L80 - .Lrtx4) / 4\n\t.2byte\t(.L79 - .Lrtx4) / 4\n\t.2byte\t(.L78 - .Lrtx4) / 4\n\t.2byte\t(.L77 - .Lrtx4) / 4\n\t.2byte\t(.L76 - .Lrtx4) / 4\n\t.2byte\t(.L75 - .Lrtx4) / 4\n\t.2byte\t(.L74 - .Lrtx4) / 4\n\t.2byte\t(.L73 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L72 - .Lrtx4) / 4\n\t.2byte\t(.L71 - .Lrtx4) / 4\n\t.2byte\t(.L70 - .Lrtx4) / 4\n\t.2byte\t(.L70 - .Lrtx4) / 4\n\t.2byte\t(.L69 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L68 - .Lrtx4) / 4\n\t.2byte\t(.L67 - .Lrtx4) / 4\n\t.2byte\t(.L66 - .Lrtx4) / 4\n\t.2byte\t(.L65 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L64 - .Lrtx4) / 4\n\t.2byte\t(.L63 - .Lrtx4) / 4\n\t.2byte\t(.L62 - .Lrtx4) / 4\n\t.2byte\t(.L61 - .Lrtx4) / 4\n\t.2byte\t(.L60 - .Lrtx4) / 4\n\t.2byte\t(.L59 - .Lrtx4) / 4\n\t.2byte\t(.L58 - .Lrtx4) / 4\n\t.2byte\t(.L57 - .Lrtx4) / 4\n\t.2byte\t(.L56 - .Lrtx4) / 4\n\t.2byte\t(.L55 - .Lrtx4) / 4\n\t.2byte\t(.L54 - .Lrtx4) / 4\n\t.2byte\t(.L53 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L52 - .Lrtx4) / 4\n\t.2byte\t(.L51 - .Lrtx4) / 4\n\t.2byte\t(.L50 - .Lrtx4) / 4\n\t.2byte\t(.L49 - .Lrtx4) / 4\n\t.2byte\t(.L48 - .Lrtx4) / 4\n\t.2byte\t(.L47 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L46 - .Lrtx4) / 4\n\t.2byte\t(.L45 - .Lrtx4) / 4\n\t.2byte\t(.L44 - .Lrtx4) / 4\n\t.2byte\t(.L43 - .Lrtx4) / 4\n\t.2byte\t(.L42 - .Lrtx4) / 4\n\t.2byte\t(.L41 - .Lrtx4) / 4\n\t.2byte\t(.L40 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L39 - .Lrtx4) / 4\n\t.2byte\t(.L38 - .Lrtx4) / 4\n\t.2byte\t(.L37 - .Lrtx4) / 4\n\t.2byte\t(.L36 - .Lrtx4) / 4\n\t.2byte\t(.L35 - .Lrtx4) / 4\n\t.2byte\t(.L34 - .Lrtx4) / 4\n\t.2byte\t(.L33 - .Lrtx4) / 4\n\t.2byte\t(.L32 - .Lrtx4) / 4\n\t.2byte\t(.L31 - .Lrtx4) / 4\n\t.2byte\t(.L30 - .Lrtx4) / 4\n\t.2byte\t(.L29 - .Lrtx4) / 4\n\t.2byte\t(.L28 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L27 - .Lrtx4) / 4\n\t.2byte\t(.L26 - .Lrtx4) / 4\n\t.2byte\t(.L25 - .Lrtx4) / 4\n\t.2byte\t(.L24 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L23 - .Lrtx4) / 4\n\t.2byte\t(.L22 - .Lrtx4) / 4\n\t.2byte\t(.L21 - .Lrtx4) / 4\n\t.2byte\t(.L20 - .Lrtx4) / 4\n\t.2byte\t(.L19 - .Lrtx4) / 4\n\t.2byte\t(.L18 - .Lrtx4) / 4\n\t.2byte\t(.L17 - .Lrtx4) / 4\n\t.2byte\t(.L16 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L15 - .Lrtx4) / 4\n\t.2byte\t(.L14 - .Lrtx4) / 4\n\t.2byte\t(.L13 - .Lrtx4) / 4\n\t.2byte\t(.L12 - .Lrtx4) / 4\n\t.2byte\t(.L11 - .Lrtx4) / 4\n\t.2byte\t(.L10 - .Lrtx4) / 4\n\t.2byte\t(.L9 - .Lrtx4) / 4\n\t.2byte\t(.L8 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L7 - .Lrtx4) / 4\n\t.2byte\t(.L6 - .Lrtx4) / 4\n\t.2byte\t(.L5 - .Lrtx4) / 4\n\t.2byte\t(.L3 - .Lrtx4) / 4\n\t.text\n.L81:\n\tadrp\tx0, .LC78\n\tadd\tx0, x0, :lo12:.LC78\n.L1:\n\tret\n.L80:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tb\t.L1\n.L79:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tb\t.L1\n.L78:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tb\t.L1\n.L77:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tb\t.L1\n.L76:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tb\t.L1\n.L75:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tb\t.L1\n.L74:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tb\t.L1\n.L73:\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tb\t.L1\n.L72:\n\tadrp\tx0, .LC10\n\tadd\tx0, x0, :lo12:.LC10\n\tb\t.L1\n.L71:\n\tadrp\tx0, .LC11\n\tadd\tx0, x0, :lo12:.LC11\n\tb\t.L1\n.L70:\n\tadrp\tx0, .LC12\n\tadd\tx0, x0, :lo12:.LC12\n\tb\t.L1\n.L69:\n\tadrp\tx0, .LC14\n\tadd\tx0, x0, :lo12:.LC14\n\tb\t.L1\n.L68:\n\tadrp\tx0, .LC15\n\tadd\tx0, x0, :lo12:.LC15\n\tb\t.L1\n.L67:\n\tadrp\tx0, .LC16\n\tadd\tx0, x0, :lo12:.LC16\n\tb\t.L1\n.L66:\n\tadrp\tx0, .LC17\n\tadd\tx0, x0, :lo12:.LC17\n\tb\t.L1\n.L65:\n\tadrp\tx0, .LC18\n\tadd\tx0, x0, :lo12:.LC18\n\tb\t.L1\n.L64:\n\tadrp\tx0, .LC19\n\tadd\tx0, x0, :lo12:.LC19\n\tb\t.L1\n.L63:\n\tadrp\tx0, .LC20\n\tadd\tx0, x0, :lo12:.LC20\n\tb\t.L1\n.L62:\n\tadrp\tx0, .LC21\n\tadd\tx0, x0, :lo12:.LC21\n\tb\t.L1\n.L61:\n\tadrp\tx0, .LC22\n\tadd\tx0, x0, :lo12:.LC22\n\tb\t.L1\n.L60:\n\tadrp\tx0, .LC23\n\tadd\tx0, x0, :lo12:.LC23\n\tb\t.L1\n.L59:\n\tadrp\tx0, .LC24\n\tadd\tx0, x0, :lo12:.LC24\n\tb\t.L1\n.L58:\n\tadrp\tx0, .LC25\n\tadd\tx0, x0, :lo12:.LC25\n\tb\t.L1\n.L57:\n\tadrp\tx0, .LC26\n\tadd\tx0, x0, :lo12:.LC26\n\tb\t.L1\n.L56:\n\tadrp\tx0, .LC27\n\tadd\tx0, x0, :lo12:.LC27\n\tb\t.L1\n.L55:\n\tadrp\tx0, .LC28\n\tadd\tx0, x0, :lo12:.LC28\n\tb\t.L1\n.L54:\n\tadrp\tx0, .LC29\n\tadd\tx0, x0, :lo12:.LC29\n\tb\t.L1\n.L53:\n\tadrp\tx0, .LC30\n\tadd\tx0, x0, :lo12:.LC30\n\tb\t.L1\n.L52:\n\tadrp\tx0, .LC31\n\tadd\tx0, x0, :lo12:.LC31\n\tb\t.L1\n.L51:\n\tadrp\tx0, .LC32\n\tadd\tx0, x0, :lo12:.LC32\n\tb\t.L1\n.L50:\n\tadrp\tx0, .LC33\n\tadd\tx0, x0, :lo12:.LC33\n\tb\t.L1\n.L49:\n\tadrp\tx0, .LC34\n\tadd\tx0, x0, :lo12:.LC34\n\tb\t.L1\n.L48:\n\tadrp\tx0, .LC35\n\tadd\tx0, x0, :lo12:.LC35\n\tb\t.L1\n.L47:\n\tadrp\tx0, .LC36\n\tadd\tx0, x0, :lo12:.LC36\n\tb\t.L1\n.L46:\n\tadrp\tx0, .LC37\n\tadd\tx0, x0, :lo12:.LC37\n\tb\t.L1\n.L45:\n\tadrp\tx0, .LC38\n\tadd\tx0, x0, :lo12:.LC38\n\tb\t.L1\n.L44:\n\tadrp\tx0, .LC39\n\tadd\tx0, x0, :lo12:.LC39\n\tb\t.L1\n.L43:\n\tadrp\tx0, .LC40\n\tadd\tx0, x0, :lo12:.LC40\n\tb\t.L1\n.L42:\n\tadrp\tx0, .LC41\n\tadd\tx0, x0, :lo12:.LC41\n\tb\t.L1\n.L41:\n\tadrp\tx0, .LC42\n\tadd\tx0, x0, :lo12:.LC42\n\tb\t.L1\n.L40:\n\tadrp\tx0, .LC43\n\tadd\tx0, x0, :lo12:.LC43\n\tb\t.L1\n.L39:\n\tadrp\tx0, .LC44\n\tadd\tx0, x0, :lo12:.LC44\n\tb\t.L1\n.L38:\n\tadrp\tx0, .LC45\n\tadd\tx0, x0, :lo12:.LC45\n\tb\t.L1\n.L37:\n\tadrp\tx0, .LC46\n\tadd\tx0, x0, :lo12:.LC46\n\tb\t.L1\n.L36:\n\tadrp\tx0, .LC47\n\tadd\tx0, x0, :lo12:.LC47\n\tb\t.L1\n.L35:\n\tadrp\tx0, .LC48\n\tadd\tx0, x0, :lo12:.LC48\n\tb\t.L1\n.L34:\n\tadrp\tx0, .LC49\n\tadd\tx0, x0, :lo12:.LC49\n\tb\t.L1\n.L33:\n\tadrp\tx0, .LC50\n\tadd\tx0, x0, :lo12:.LC50\n\tb\t.L1\n.L32:\n\tadrp\tx0, .LC51\n\tadd\tx0, x0, :lo12:.LC51\n\tb\t.L1\n.L31:\n\tadrp\tx0, .LC52\n\tadd\tx0, x0, :lo12:.LC52\n\tb\t.L1\n.L30:\n\tadrp\tx0, .LC53\n\tadd\tx0, x0, :lo12:.LC53\n\tb\t.L1\n.L29:\n\tadrp\tx0, .LC54\n\tadd\tx0, x0, :lo12:.LC54\n\tb\t.L1\n.L28:\n\tadrp\tx0, .LC55\n\tadd\tx0, x0, :lo12:.LC55\n\tb\t.L1\n.L27:\n\tadrp\tx0, .LC56\n\tadd\tx0, x0, :lo12:.LC56\n\tb\t.L1\n.L26:\n\tadrp\tx0, .LC57\n\tadd\tx0, x0, :lo12:.LC57\n\tb\t.L1\n.L25:\n\tadrp\tx0, .LC58\n\tadd\tx0, x0, :lo12:.LC58\n\tb\t.L1\n.L24:\n\tadrp\tx0, .LC59\n\tadd\tx0, x0, :lo12:.LC59\n\tb\t.L1\n.L23:\n\tadrp\tx0, .LC60\n\tadd\tx0, x0, :lo12:.LC60\n\tb\t.L1\n.L22:\n\tadrp\tx0, .LC61\n\tadd\tx0, x0, :lo12:.LC61\n\tb\t.L1\n.L21:\n\tadrp\tx0, .LC62\n\tadd\tx0, x0, :lo12:.LC62\n\tb\t.L1\n.L20:\n\tadrp\tx0, .LC63\n\tadd\tx0, x0, :lo12:.LC63\n\tb\t.L1\n.L19:\n\tadrp\tx0, .LC64\n\tadd\tx0, x0, :lo12:.LC64\n\tb\t.L1\n.L18:\n\tadrp\tx0, .LC65\n\tadd\tx0, x0, :lo12:.LC65\n\tb\t.L1\n.L17:\n\tadrp\tx0, .LC66\n\tadd\tx0, x0, :lo12:.LC66\n\tb\t.L1\n.L16:\n\tadrp\tx0, .LC67\n\tadd\tx0, x0, :lo12:.LC67\n\tb\t.L1\n.L15:\n\tadrp\tx0, .LC68\n\tadd\tx0, x0, :lo12:.LC68\n\tb\t.L1\n.L14:\n\tadrp\tx0, .LC69\n\tadd\tx0, x0, :lo12:.LC69\n\tb\t.L1\n.L13:\n\tadrp\tx0, .LC70\n\tadd\tx0, x0, :lo12:.LC70\n\tb\t.L1\n.L12:\n\tadrp\tx0, .LC71\n\tadd\tx0, x0, :lo12:.LC71\n\tb\t.L1\n.L11:\n\tadrp\tx0, .LC72\n\tadd\tx0, x0, :lo12:.LC72\n\tb\t.L1\n.L10:\n\tadrp\tx0, .LC73\n\tadd\tx0, x0, :lo12:.LC73\n\tb\t.L1\n.L9:\n\tadrp\tx0, .LC74\n\tadd\tx0, x0, :lo12:.LC74\n\tb\t.L1\n.L8:\n\tadrp\tx0, .LC75\n\tadd\tx0, x0, :lo12:.LC75\n\tb\t.L1\n.L7:\n\tadrp\tx0, .LC76\n\tadd\tx0, x0, :lo12:.LC76\n\tb\t.L1\n.L6:\n\tadrp\tx0, .LC77\n\tadd\tx0, x0, :lo12:.LC77\n\tb\t.L1\n.L5:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tb\t.L1\n.L3:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tb\t.L1\n.L82:\n\tadrp\tx0, .LC13\n\tadd\tx0, x0, :lo12:.LC13\n\tb\t.L1\n\t.cfi_endproc\n.LC76: \t.string\t\"Original language\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Fine arts\"\n.LC48: \t.string\t\"Popular culture/traditional arts\"\n.LC74: \t.string\t\"Advertisement/shopping\"\n.LC13: \t.string\t\"\"\n.LC58: \t.string\t\"Economics/Social advisory \"\n.LC63: \t.string\t\"Medicine/physiology/psychology\"\n.LC62: \t.string\t\"Technology/Natural sciences\"\n.LC75: \t.string\t\"gardening\"\n.LC37: \t.string\t\"Music\"\n.LC35: \t.string\t\"Informational/educational/school programmes\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Cartoons/puppets\"\n.LC0: \t.string\t\"Live broadcast\"\n.LC49: \t.string\t\"Literature\"\n.LC24: \t.string\t\"team sports\"\n.LC31: \t.string\t\"Children\"\n.LC57: \t.string\t\"Magazines/reports/documentary\"\n.LC39: \t.string\t\"classical music\"\n.LC53: \t.string\t\"New media\"\n.LC19: \t.string\t\"Sports\"\n.LC68: \t.string\t\"Leisure Hobbies\"\n.LC78: \t.string\t\"Movie/drama\"\n.LC56: \t.string\t\"Social/political issues/Economics\"\n.LC77: \t.string\t\"Black and white\"\n.LC17: \t.string\t\"variety\"\n.LC15: \t.string\t\"Show\"\n.LC65: \t.string\t\"Social/spiritual sciences\"\n.LC64: \t.string\t\"Foreign countries/expeditions\"\n.LC61: \t.string\t\"Nature/animals/environment\"\n.LC14: \t.string\t\"discussion/interview/debate\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Football/soccer\"\n.LC45: \t.string\t\"Performing\"\n.LC33: \t.string\t\"Kids 6-14\"\n.LC25: \t.string\t\"Athletics\"\n.LC34: \t.string\t\"Kids 10-16\"\n.LC50: \t.string\t\"Film/Cinema\"\n.LC67: \t.string\t\"Languages\"\n.LC28: \t.string\t\"Winter sports\"\n.LC21: \t.string\t\"sports magazines\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"Rock/Pop\"\n.LC44: \t.string\t\"Art\"\n.LC27: \t.string\t\"Water sport\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"Tennis/squash\"\n.LC20: \t.string\t\"Sports special events\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Jazz\"\n.LC59: \t.string\t\"Remarkable people\"\n.LC66: \t.string\t\"Further education\"\n.LC40: \t.string\t\"folk/traditional music\"\n.LC52: \t.string\t\"Broadcasting/press\"\n.LC18: \t.string\t\"talk show\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Equestrian\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Pre-school children's programmes\"\n.LC54: \t.string\t\"Arts/Culture magazines\"\n.LC55: \t.string\t\"fashion\"\n.LC70: \t.string\t\"Handicraft\"\n.LC60: \t.string\t\"Education/Science/Factual\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Experimental film/video\"\n.LC1: \t.string\t\"Unpublished\"\n.LC42: \t.string\t\"Opera/Musical\"\n.LC73: \t.string\t\"Cooking\"\n.LC69: \t.string\t\"Travel\"\n.LC16: \t.string\t\"Game/quiz/contest\"\n.LC9: \t.string\t\"adult movie\"\n.LC43: \t.string\t\"Ballet\"\n.LC47: \t.string\t\"Religion\"\n.LC26: \t.string\t\"Motorcycle Racing\"\n.LC30: \t.string\t\"Martial sports\"\n.LC72: \t.string\t\"Fitness\"\n.LC71: \t.string\t\"Motoring\"\n", ".global DVBGenreCode\n.type DVBGenreCode, %function\nDVBGenreCode:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw0, w0, #16\n\tcmp\tw0, 163\n\tbls\t.L84\n.L82:\n\tadrp\tx0, .LC13\n\tadd\tx0, x0, :lo12:.LC13\n\tret\n\t.p2align 2,,3\n.L84:\n\tadrp\tx1, .L4\n\tadd\tx1, x1, :lo12:.L4\n\tldrh\tw0, [x1,w0,uxtw #1]\n\tadr\tx1, .Lrtx4\n\tadd\tx0, x1, w0, sxth #2\n\tbr\tx0\n.Lrtx4:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L4:\n\t.2byte\t(.L81 - .Lrtx4) / 4\n\t.2byte\t(.L80 - .Lrtx4) / 4\n\t.2byte\t(.L79 - .Lrtx4) / 4\n\t.2byte\t(.L78 - .Lrtx4) / 4\n\t.2byte\t(.L77 - .Lrtx4) / 4\n\t.2byte\t(.L76 - .Lrtx4) / 4\n\t.2byte\t(.L75 - .Lrtx4) / 4\n\t.2byte\t(.L74 - .Lrtx4) / 4\n\t.2byte\t(.L73 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L72 - .Lrtx4) / 4\n\t.2byte\t(.L71 - .Lrtx4) / 4\n\t.2byte\t(.L70 - .Lrtx4) / 4\n\t.2byte\t(.L70 - .Lrtx4) / 4\n\t.2byte\t(.L69 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L68 - .Lrtx4) / 4\n\t.2byte\t(.L67 - .Lrtx4) / 4\n\t.2byte\t(.L66 - .Lrtx4) / 4\n\t.2byte\t(.L65 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L64 - .Lrtx4) / 4\n\t.2byte\t(.L63 - .Lrtx4) / 4\n\t.2byte\t(.L62 - .Lrtx4) / 4\n\t.2byte\t(.L61 - .Lrtx4) / 4\n\t.2byte\t(.L60 - .Lrtx4) / 4\n\t.2byte\t(.L59 - .Lrtx4) / 4\n\t.2byte\t(.L58 - .Lrtx4) / 4\n\t.2byte\t(.L57 - .Lrtx4) / 4\n\t.2byte\t(.L56 - .Lrtx4) / 4\n\t.2byte\t(.L55 - .Lrtx4) / 4\n\t.2byte\t(.L54 - .Lrtx4) / 4\n\t.2byte\t(.L53 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L52 - .Lrtx4) / 4\n\t.2byte\t(.L51 - .Lrtx4) / 4\n\t.2byte\t(.L50 - .Lrtx4) / 4\n\t.2byte\t(.L49 - .Lrtx4) / 4\n\t.2byte\t(.L48 - .Lrtx4) / 4\n\t.2byte\t(.L47 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L46 - .Lrtx4) / 4\n\t.2byte\t(.L45 - .Lrtx4) / 4\n\t.2byte\t(.L44 - .Lrtx4) / 4\n\t.2byte\t(.L43 - .Lrtx4) / 4\n\t.2byte\t(.L42 - .Lrtx4) / 4\n\t.2byte\t(.L41 - .Lrtx4) / 4\n\t.2byte\t(.L40 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L39 - .Lrtx4) / 4\n\t.2byte\t(.L38 - .Lrtx4) / 4\n\t.2byte\t(.L37 - .Lrtx4) / 4\n\t.2byte\t(.L36 - .Lrtx4) / 4\n\t.2byte\t(.L35 - .Lrtx4) / 4\n\t.2byte\t(.L34 - .Lrtx4) / 4\n\t.2byte\t(.L33 - .Lrtx4) / 4\n\t.2byte\t(.L32 - .Lrtx4) / 4\n\t.2byte\t(.L31 - .Lrtx4) / 4\n\t.2byte\t(.L30 - .Lrtx4) / 4\n\t.2byte\t(.L29 - .Lrtx4) / 4\n\t.2byte\t(.L28 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L27 - .Lrtx4) / 4\n\t.2byte\t(.L26 - .Lrtx4) / 4\n\t.2byte\t(.L25 - .Lrtx4) / 4\n\t.2byte\t(.L24 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L23 - .Lrtx4) / 4\n\t.2byte\t(.L22 - .Lrtx4) / 4\n\t.2byte\t(.L21 - .Lrtx4) / 4\n\t.2byte\t(.L20 - .Lrtx4) / 4\n\t.2byte\t(.L19 - .Lrtx4) / 4\n\t.2byte\t(.L18 - .Lrtx4) / 4\n\t.2byte\t(.L17 - .Lrtx4) / 4\n\t.2byte\t(.L16 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L15 - .Lrtx4) / 4\n\t.2byte\t(.L14 - .Lrtx4) / 4\n\t.2byte\t(.L13 - .Lrtx4) / 4\n\t.2byte\t(.L12 - .Lrtx4) / 4\n\t.2byte\t(.L11 - .Lrtx4) / 4\n\t.2byte\t(.L10 - .Lrtx4) / 4\n\t.2byte\t(.L9 - .Lrtx4) / 4\n\t.2byte\t(.L8 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L82 - .Lrtx4) / 4\n\t.2byte\t(.L7 - .Lrtx4) / 4\n\t.2byte\t(.L6 - .Lrtx4) / 4\n\t.2byte\t(.L5 - .Lrtx4) / 4\n\t.2byte\t(.L3 - .Lrtx4) / 4\n\t.text\n.L70:\n\tadrp\tx0, .LC12\n\tadd\tx0, x0, :lo12:.LC12\n\tret\n.L71:\n\tadrp\tx0, .LC11\n\tadd\tx0, x0, :lo12:.LC11\n\tret\n.L72:\n\tadrp\tx0, .LC10\n\tadd\tx0, x0, :lo12:.LC10\n\tret\n.L73:\n\tadrp\tx0, .LC9\n\tadd\tx0, x0, :lo12:.LC9\n\tret\n.L74:\n\tadrp\tx0, .LC8\n\tadd\tx0, x0, :lo12:.LC8\n\tret\n.L75:\n\tadrp\tx0, .LC7\n\tadd\tx0, x0, :lo12:.LC7\n\tret\n.L76:\n\tadrp\tx0, .LC6\n\tadd\tx0, x0, :lo12:.LC6\n\tret\n.L77:\n\tadrp\tx0, .LC5\n\tadd\tx0, x0, :lo12:.LC5\n\tret\n.L78:\n\tadrp\tx0, .LC4\n\tadd\tx0, x0, :lo12:.LC4\n\tret\n.L79:\n\tadrp\tx0, .LC3\n\tadd\tx0, x0, :lo12:.LC3\n\tret\n.L80:\n\tadrp\tx0, .LC2\n\tadd\tx0, x0, :lo12:.LC2\n\tret\n.L3:\n\tadrp\tx0, .LC0\n\tadd\tx0, x0, :lo12:.LC0\n\tret\n.L5:\n\tadrp\tx0, .LC1\n\tadd\tx0, x0, :lo12:.LC1\n\tret\n.L6:\n\tadrp\tx0, .LC77\n\tadd\tx0, x0, :lo12:.LC77\n\tret\n.L7:\n\tadrp\tx0, .LC76\n\tadd\tx0, x0, :lo12:.LC76\n\tret\n.L8:\n\tadrp\tx0, .LC75\n\tadd\tx0, x0, :lo12:.LC75\n\tret\n.L9:\n\tadrp\tx0, .LC74\n\tadd\tx0, x0, :lo12:.LC74\n\tret\n.L10:\n\tadrp\tx0, .LC73\n\tadd\tx0, x0, :lo12:.LC73\n\tret\n.L11:\n\tadrp\tx0, .LC72\n\tadd\tx0, x0, :lo12:.LC72\n\tret\n.L12:\n\tadrp\tx0, .LC71\n\tadd\tx0, x0, :lo12:.LC71\n\tret\n.L13:\n\tadrp\tx0, .LC70\n\tadd\tx0, x0, :lo12:.LC70\n\tret\n.L14:\n\tadrp\tx0, .LC69\n\tadd\tx0, x0, :lo12:.LC69\n\tret\n.L15:\n\tadrp\tx0, .LC68\n\tadd\tx0, x0, :lo12:.LC68\n\tret\n.L16:\n\tadrp\tx0, .LC67\n\tadd\tx0, x0, :lo12:.LC67\n\tret\n.L17:\n\tadrp\tx0, .LC66\n\tadd\tx0, x0, :lo12:.LC66\n\tret\n.L18:\n\tadrp\tx0, .LC65\n\tadd\tx0, x0, :lo12:.LC65\n\tret\n.L19:\n\tadrp\tx0, .LC64\n\tadd\tx0, x0, :lo12:.LC64\n\tret\n.L20:\n\tadrp\tx0, .LC63\n\tadd\tx0, x0, :lo12:.LC63\n\tret\n.L21:\n\tadrp\tx0, .LC62\n\tadd\tx0, x0, :lo12:.LC62\n\tret\n.L22:\n\tadrp\tx0, .LC61\n\tadd\tx0, x0, :lo12:.LC61\n\tret\n.L23:\n\tadrp\tx0, .LC60\n\tadd\tx0, x0, :lo12:.LC60\n\tret\n.L24:\n\tadrp\tx0, .LC59\n\tadd\tx0, x0, :lo12:.LC59\n\tret\n.L25:\n\tadrp\tx0, .LC58\n\tadd\tx0, x0, :lo12:.LC58\n\tret\n.L26:\n\tadrp\tx0, .LC57\n\tadd\tx0, x0, :lo12:.LC57\n\tret\n.L27:\n\tadrp\tx0, .LC56\n\tadd\tx0, x0, :lo12:.LC56\n\tret\n.L28:\n\tadrp\tx0, .LC55\n\tadd\tx0, x0, :lo12:.LC55\n\tret\n.L29:\n\tadrp\tx0, .LC54\n\tadd\tx0, x0, :lo12:.LC54\n\tret\n.L30:\n\tadrp\tx0, .LC53\n\tadd\tx0, x0, :lo12:.LC53\n\tret\n.L31:\n\tadrp\tx0, .LC52\n\tadd\tx0, x0, :lo12:.LC52\n\tret\n.L32:\n\tadrp\tx0, .LC51\n\tadd\tx0, x0, :lo12:.LC51\n\tret\n.L33:\n\tadrp\tx0, .LC50\n\tadd\tx0, x0, :lo12:.LC50\n\tret\n.L34:\n\tadrp\tx0, .LC49\n\tadd\tx0, x0, :lo12:.LC49\n\tret\n.L35:\n\tadrp\tx0, .LC48\n\tadd\tx0, x0, :lo12:.LC48\n\tret\n.L36:\n\tadrp\tx0, .LC47\n\tadd\tx0, x0, :lo12:.LC47\n\tret\n.L37:\n\tadrp\tx0, .LC46\n\tadd\tx0, x0, :lo12:.LC46\n\tret\n.L38:\n\tadrp\tx0, .LC45\n\tadd\tx0, x0, :lo12:.LC45\n\tret\n.L39:\n\tadrp\tx0, .LC44\n\tadd\tx0, x0, :lo12:.LC44\n\tret\n.L40:\n\tadrp\tx0, .LC43\n\tadd\tx0, x0, :lo12:.LC43\n\tret\n.L41:\n\tadrp\tx0, .LC42\n\tadd\tx0, x0, :lo12:.LC42\n\tret\n.L42:\n\tadrp\tx0, .LC41\n\tadd\tx0, x0, :lo12:.LC41\n\tret\n.L43:\n\tadrp\tx0, .LC40\n\tadd\tx0, x0, :lo12:.LC40\n\tret\n.L44:\n\tadrp\tx0, .LC39\n\tadd\tx0, x0, :lo12:.LC39\n\tret\n.L45:\n\tadrp\tx0, .LC38\n\tadd\tx0, x0, :lo12:.LC38\n\tret\n.L46:\n\tadrp\tx0, .LC37\n\tadd\tx0, x0, :lo12:.LC37\n\tret\n.L47:\n\tadrp\tx0, .LC36\n\tadd\tx0, x0, :lo12:.LC36\n\tret\n.L48:\n\tadrp\tx0, .LC35\n\tadd\tx0, x0, :lo12:.LC35\n\tret\n.L49:\n\tadrp\tx0, .LC34\n\tadd\tx0, x0, :lo12:.LC34\n\tret\n.L50:\n\tadrp\tx0, .LC33\n\tadd\tx0, x0, :lo12:.LC33\n\tret\n.L51:\n\tadrp\tx0, .LC32\n\tadd\tx0, x0, :lo12:.LC32\n\tret\n.L52:\n\tadrp\tx0, .LC31\n\tadd\tx0, x0, :lo12:.LC31\n\tret\n.L53:\n\tadrp\tx0, .LC30\n\tadd\tx0, x0, :lo12:.LC30\n\tret\n.L54:\n\tadrp\tx0, .LC29\n\tadd\tx0, x0, :lo12:.LC29\n\tret\n.L55:\n\tadrp\tx0, .LC28\n\tadd\tx0, x0, :lo12:.LC28\n\tret\n.L56:\n\tadrp\tx0, .LC27\n\tadd\tx0, x0, :lo12:.LC27\n\tret\n.L57:\n\tadrp\tx0, .LC26\n\tadd\tx0, x0, :lo12:.LC26\n\tret\n.L58:\n\tadrp\tx0, .LC25\n\tadd\tx0, x0, :lo12:.LC25\n\tret\n.L59:\n\tadrp\tx0, .LC24\n\tadd\tx0, x0, :lo12:.LC24\n\tret\n.L60:\n\tadrp\tx0, .LC23\n\tadd\tx0, x0, :lo12:.LC23\n\tret\n.L61:\n\tadrp\tx0, .LC22\n\tadd\tx0, x0, :lo12:.LC22\n\tret\n.L62:\n\tadrp\tx0, .LC21\n\tadd\tx0, x0, :lo12:.LC21\n\tret\n.L63:\n\tadrp\tx0, .LC20\n\tadd\tx0, x0, :lo12:.LC20\n\tret\n.L64:\n\tadrp\tx0, .LC19\n\tadd\tx0, x0, :lo12:.LC19\n\tret\n.L65:\n\tadrp\tx0, .LC18\n\tadd\tx0, x0, :lo12:.LC18\n\tret\n.L66:\n\tadrp\tx0, .LC17\n\tadd\tx0, x0, :lo12:.LC17\n\tret\n.L67:\n\tadrp\tx0, .LC16\n\tadd\tx0, x0, :lo12:.LC16\n\tret\n.L68:\n\tadrp\tx0, .LC15\n\tadd\tx0, x0, :lo12:.LC15\n\tret\n.L69:\n\tadrp\tx0, .LC14\n\tadd\tx0, x0, :lo12:.LC14\n\tret\n.L81:\n\tadrp\tx0, .LC78\n\tadd\tx0, x0, :lo12:.LC78\n\tret\n\t.cfi_endproc\n.LC76: \t.string\t\"Original language\"\n.LC2: \t.string\t\"Detective/thriller\"\n.LC46: \t.string\t\"Fine arts\"\n.LC13: \t.string\t\"\"\n.LC74: \t.string\t\"Advertisement/shopping\"\n.LC48: \t.string\t\"Popular culture/traditional arts\"\n.LC58: \t.string\t\"Economics/Social advisory \"\n.LC63: \t.string\t\"Medicine/physiology/psychology\"\n.LC62: \t.string\t\"Technology/Natural sciences\"\n.LC75: \t.string\t\"gardening\"\n.LC37: \t.string\t\"Music\"\n.LC35: \t.string\t\"Informational/educational/school programmes\"\n.LC11: \t.string\t\"weather\"\n.LC8: \t.string\t\"Serious/classical/religious/historical movie/drama\"\n.LC36: \t.string\t\"Cartoons/puppets\"\n.LC0: \t.string\t\"Live broadcast\"\n.LC49: \t.string\t\"Literature\"\n.LC24: \t.string\t\"team sports\"\n.LC31: \t.string\t\"Children\"\n.LC57: \t.string\t\"Magazines/reports/documentary\"\n.LC39: \t.string\t\"classical music\"\n.LC68: \t.string\t\"Leisure Hobbies\"\n.LC53: \t.string\t\"New media\"\n.LC19: \t.string\t\"Sports\"\n.LC78: \t.string\t\"Movie/drama\"\n.LC56: \t.string\t\"Social/political issues/Economics\"\n.LC77: \t.string\t\"Black and white\"\n.LC17: \t.string\t\"variety\"\n.LC15: \t.string\t\"Show\"\n.LC65: \t.string\t\"Social/spiritual sciences\"\n.LC64: \t.string\t\"Foreign countries/expeditions\"\n.LC61: \t.string\t\"Nature/animals/environment\"\n.LC14: \t.string\t\"discussion/interview/debate\"\n.LC6: \t.string\t\"Soap/melodrama/folkloric\"\n.LC22: \t.string\t\"Football/soccer\"\n.LC45: \t.string\t\"Performing\"\n.LC33: \t.string\t\"Kids 6-14\"\n.LC25: \t.string\t\"Athletics\"\n.LC34: \t.string\t\"Kids 10-16\"\n.LC50: \t.string\t\"Film/Cinema\"\n.LC67: \t.string\t\"Languages\"\n.LC28: \t.string\t\"Winter sports\"\n.LC21: \t.string\t\"sports magazines\"\n.LC3: \t.string\t\"Adventure/western/war\"\n.LC38: \t.string\t\"Rock/Pop\"\n.LC44: \t.string\t\"Art\"\n.LC27: \t.string\t\"Water sport\"\n.LC5: \t.string\t\"Comedy\"\n.LC23: \t.string\t\"Tennis/squash\"\n.LC20: \t.string\t\"Sports special events\"\n.LC7: \t.string\t\"Romance\"\n.LC41: \t.string\t\"Jazz\"\n.LC59: \t.string\t\"Remarkable people\"\n.LC66: \t.string\t\"Further education\"\n.LC40: \t.string\t\"folk/traditional music\"\n.LC52: \t.string\t\"Broadcasting/press\"\n.LC18: \t.string\t\"talk show\"\n.LC4: \t.string\t\"Sci-Fi/fantasy/horror\"\n.LC29: \t.string\t\"Equestrian\"\n.LC12: \t.string\t\"magazine\"\n.LC32: \t.string\t\"Pre-school children's programmes\"\n.LC54: \t.string\t\"Arts/Culture magazines\"\n.LC55: \t.string\t\"fashion\"\n.LC70: \t.string\t\"Handicraft\"\n.LC60: \t.string\t\"Education/Science/Factual\"\n.LC10: \t.string\t\"New\"\n.LC51: \t.string\t\"Experimental film/video\"\n.LC1: \t.string\t\"Unpublished\"\n.LC42: \t.string\t\"Opera/Musical\"\n.LC73: \t.string\t\"Cooking\"\n.LC69: \t.string\t\"Travel\"\n.LC16: \t.string\t\"Game/quiz/contest\"\n.LC9: \t.string\t\"adult movie\"\n.LC47: \t.string\t\"Religion\"\n.LC43: \t.string\t\"Ballet\"\n.LC26: \t.string\t\"Motorcycle Racing\"\n.LC30: \t.string\t\"Martial sports\"\n.LC72: \t.string\t\"Fitness\"\n.LC71: \t.string\t\"Motoring\"\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": [ "694" ], "var": [ "code" ] }, { "value": [ "860" ], "var": [ "code" ] }, { "value": [ "332" ], "var": [ "code" ] }, { "value": [ "527" ], "var": [ "code" ] }, { "value": [ "612" ], "var": [ "code" ] }, { "value": [ "974" ], "var": [ "code" ] }, { "value": [ "776" ], "var": [ "code" ] }, { "value": [ "718" ], "var": [ "code" ] }, { "value": [ "548" ], "var": [ "code" ] }, { "value": [ "872" ], "var": [ "code" ] } ], "output": [ { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"Jazz\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] }, { "value": [ "\"discussion/interview/debate\"" ], "var": [ "returnv" ] }, { "value": [ "\"\"" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41d6qk6c5o.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 code, 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); unsigned char code = input_json["code"]; clock_t begin = clock(); char* returnv = DVBGenreCode(code); 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(code, returnv); }
master
null
{"livein": ["code"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "DVBGenreCode", "funargs": ["code"], "typemap": {"code": "uint8", "returnv": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41d6qk6c5o.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_330() { return 330; }
int do_330()
int do_330()
do_330
[ "int", "" ]
{ "code": [ ".globl do_330\n.type do_330, @function\ndo_330:\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$330, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_330\n.type do_330, @function\ndo_330:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$330, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_330\n.type do_330, @function\ndo_330:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$330, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_330\n.type do_330, %function\ndo_330:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 330\n\tret\n\t.cfi_endproc\n\n", ".global do_330\n.type do_330, %function\ndo_330:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 330\n\tret\n\t.cfi_endproc\n\n", ".global do_330\n.type do_330, %function\ndo_330:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 330\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": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] }, { "value": [ "330" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53j86guryq.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_330(); 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_330", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53j86guryq.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ShadowWarden/Randombitsofcode/comp/trap.c
float f(float x){ return x*x; }
float f(floatx)
float f(float x)
f
[ "float", "float" ]
{ "code": [ ".globl f\n.type f, @function\nf:\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\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t-4(%rbp), %xmm0\n\tmulss\t%xmm0, %xmm0\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.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmulss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl f\n.type f, @function\nf:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmulss\t%xmm0, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\ts0, [sp, 12]\n\tldr\ts0, [sp, 12]\n\tfmul\ts0, s0, s0\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.LFB24:\n\t.cfi_startproc\n\tfmul\ts0, s0, s0\n\tret\n\t.cfi_endproc\n\n", ".global f\n.type f, %function\nf:\n.LFB39:\n\t.cfi_startproc\n\tfmul\ts0, s0, s0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#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": [ "43.7953805934" ], "var": [ "x" ] }, { "value": [ "33.6046605918" ], "var": [ "x" ] }, { "value": [ "97.9982832037" ], "var": [ "x" ] }, { "value": [ "83.3140193147" ], "var": [ "x" ] }, { "value": [ "34.8334846068" ], "var": [ "x" ] }, { "value": [ "43.2796234504" ], "var": [ "x" ] }, { "value": [ "50.4807173358" ], "var": [ "x" ] }, { "value": [ "79.6227809425" ], "var": [ "x" ] }, { "value": [ "2.62921019063" ], "var": [ "x" ] }, { "value": [ "81.1499924382" ], "var": [ "x" ] } ], "output": [ { "value": [ "1918.0352783203125" ], "var": [ "returnv" ] }, { "value": [ "1129.273193359375" ], "var": [ "returnv" ] }, { "value": [ "9603.6630859375" ], "var": [ "returnv" ] }, { "value": [ "6941.2255859375" ], "var": [ "returnv" ] }, { "value": [ "1213.3717041015625" ], "var": [ "returnv" ] }, { "value": [ "1873.1259765625" ], "var": [ "returnv" ] }, { "value": [ "2548.302734375" ], "var": [ "returnv" ] }, { "value": [ "6339.787109375" ], "var": [ "returnv" ] }, { "value": [ "6.912746429443359" ], "var": [ "returnv" ] }, { "value": [ "6585.3212890625" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_37_s10h8gj.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 = 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": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37_s10h8gj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TommesDee/cpachecker/cpachecker/test/programs/parser/cbmc/union4/main.c
int w1 () { int w; return wait(&w); }
int w1()
int w1 ()
w1
[ "int", "" ]
{ "code": [ ".globl w1\n.type w1, @function\nw1:\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\tleaq\t-12(%rbp), %rax\n\tmovq\t%rax, %rdi\n\tcall\twait@PLT\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 w1\n.type w1, @function\nw1:\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\tleaq\t-12(%rbp), %rax\n\tmovq\t%rax, %rdi\n\tmovl\t$0, %eax\n\tcall\twait@PLT\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 w1\n.type w1, @function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t4(%rsp), %rdi\n\tcall\twait@PLT\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L2\n\tcall\t__stack_chk_fail@PLT\n.L2:\n\taddq\t$24, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl w1\n.type w1, @function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t4(%rsp), %rdi\n\tcall\twait@PLT\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L2\n\tcall\t__stack_chk_fail@PLT\n.L2:\n\taddq\t$24, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl w1\n.type w1, @function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t4(%rsp), %rdi\n\tcall\twait@PLT\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tjne\t.L5\n\taddq\t$24, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L5:\n\t.cfi_restore_state\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".globl w1\n.type w1, @function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tleaq\t4(%rsp), %rdi\n\tcall\twait@PLT\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tjne\t.L5\n\taddq\t$24, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L5:\n\t.cfi_restore_state\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".global w1\n.type w1, %function\nw1:\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\tadd\tx0, sp, 20\n\tbl\twait\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 w1\n.type w1, %function\nw1:\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\tadd\tx0, sp, 20\n\tbl\twait\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 w1\n.type w1, %function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 29, -48\n\t.cfi_offset 30, -40\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -32\n\tadrp\tx19, :got:__stack_chk_guard\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [x19]\n\tstr\tx0, [sp, 40]\n\tmov\tx0,0\n\tadd\tx0, sp, 36\n\tbl\twait\n\tldr\tx1, [sp, 40]\n\tldr\tx2, [x19]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbeq\t.L2\n\tbl\t__stack_chk_fail\n.L2:\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global w1\n.type w1, %function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 29, -48\n\t.cfi_offset 30, -40\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -32\n\tadrp\tx19, :got:__stack_chk_guard\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx0, [x19]\n\tstr\tx0, [sp, 40]\n\tmov\tx0,0\n\tadd\tx0, sp, 36\n\tbl\twait\n\tldr\tx1, [sp, 40]\n\tldr\tx2, [x19]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbeq\t.L2\n\tbl\t__stack_chk_fail\n.L2:\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global w1\n.type w1, %function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 29, -48\n\t.cfi_offset 30, -40\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -32\n\tadrp\tx19, :got:__stack_chk_guard\n\tadd\tx0, sp, 36\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x19]\n\tstr\tx1, [sp, 40]\n\tmov\tx1,0\n\tbl\twait\n\tldr\tx1, [sp, 40]\n\tldr\tx2, [x19]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L5\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n.L5:\n\t.cfi_restore_state\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n", ".global w1\n.type w1, %function\nw1:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -48]!\n\t.cfi_def_cfa_offset 48\n\t.cfi_offset 29, -48\n\t.cfi_offset 30, -40\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -32\n\tadrp\tx19, :got:__stack_chk_guard\n\tadd\tx0, sp, 36\n\tldr\tx19, [x19, #:got_lo12:__stack_chk_guard]\n\tldr\tx1, [x19]\n\tstr\tx1, [sp, 40]\n\tmov\tx1,0\n\tbl\twait\n\tldr\tx1, [sp, 40]\n\tldr\tx2, [x19]\n\tsubs\tx1, x1, x2\n\tmov\tx2, 0\n\tbne\t.L5\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n.L5:\n\t.cfi_restore_state\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n" ], "target": [ "angha_gcc_x86_O0", "real_gcc_x86_O0", "angha_gcc_x86_Os", "real_gcc_x86_Os", "angha_gcc_x86_O3", "real_gcc_x86_O3", "angha_gcc_arm_O0", "real_gcc_arm_O0", "angha_gcc_arm_Os", "real_gcc_arm_Os", "angha_gcc_arm_O3", "real_gcc_arm_O3" ] }
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward declarations */ /* Type definitions */ /* Variables and functions */ int wait (int*) ;
#include <assert.h> # 1
{ "dummy_funcs": [ "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * b) {\n\tint returnv;\n\tint temp_variable = 45;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * m) {\n\tint returnv;\n\tint temp_variable = 74;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n", "int wait (int * s) {\n\tint returnv;\n\tint temp_variable = 113;\n\treturnv = temp_variable;\n\treturn returnv;\n}\n" ], "dummy_funcs_seed": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ], "input": [ { "value": [], "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": [ "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": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] }, { "value": [], "var": [] } ], "output": [ { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_35777408_6xzwc4.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 = w1(); 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_37kzk1so7a.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 = w1(); 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": "w1", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37kzk1so7a.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_457() { return 457; }
int do_457()
int do_457()
do_457
[ "int", "" ]
{ "code": [ ".globl do_457\n.type do_457, @function\ndo_457:\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$457, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_457\n.type do_457, @function\ndo_457:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$457, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_457\n.type do_457, @function\ndo_457:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$457, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_457\n.type do_457, %function\ndo_457:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 457\n\tret\n\t.cfi_endproc\n\n", ".global do_457\n.type do_457, %function\ndo_457:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 457\n\tret\n\t.cfi_endproc\n\n", ".global do_457\n.type do_457, %function\ndo_457:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 457\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": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] }, { "value": [ "457" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53hs_1o1dj.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_457(); 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_457", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53hs_1o1dj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
MobileCloudNetworking/icnaas/apps/HttpProxy/ProxyUtil.c
extern int IsAlpha(char c) { if (c >= 'A' && c <= 'Z') return c; if (c >= 'a' && c <= 'Z') return c - ('a'-'A'); return 0; }
int IsAlpha(charc)
extern int IsAlpha(char c)
IsAlpha
[ "int", "char" ]
{ "code": [ ".globl IsAlpha\n.type IsAlpha, @function\nIsAlpha:\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$64, -4(%rbp)\n\tjle\t.L2\n\tcmpb\t$90, -4(%rbp)\n\tjg\t.L2\n\tmovsbl\t-4(%rbp), %eax\n\tjmp\t.L3\n.L2:\n\tcmpb\t$96, -4(%rbp)\n\tjle\t.L4\n\tcmpb\t$90, -4(%rbp)\n\tjg\t.L4\n\tmovsbl\t-4(%rbp), %eax\n\tsubl\t$32, %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 IsAlpha\n.type IsAlpha, @function\nIsAlpha:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tmovsbl\t%dil, %eax\n\tsubl\t$65, %edi\n\tmovl\t$0, %edx\n\tcmpb\t$26, %dil\n\tcmovnb\t%edx, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl IsAlpha\n.type IsAlpha, @function\nIsAlpha:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %eax\n\tcmpb\t$26, %al\n\tmovl\t$0, %eax\n\tcmovnb\t%eax, %edi\n\tmovsbl\t%dil, %eax\n\tret\n\t.cfi_endproc\n\n", ".global IsAlpha\n.type IsAlpha, %function\nIsAlpha:\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, 64\n\tbls\t.L2\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 90\n\tbhi\t.L2\n\tldrb\tw0, [sp, 15]\n\tb\t.L3\n.L2:\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 96\n\tbls\t.L4\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 90\n\tbhi\t.L4\n\tldrb\tw0, [sp, 15]\n\tsub\tw0, w0, #32\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 IsAlpha\n.type IsAlpha, %function\nIsAlpha:\n.LFB22:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tand\tw1, w1, 255\n\tcmp\tw1, 26\n\tcsel\tw0, w0, wzr, cc\n\tret\n\t.cfi_endproc\n\n", ".global IsAlpha\n.type IsAlpha, %function\nIsAlpha:\n.LFB27:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tsub\tw1, w0, #65\n\tand\tw1, w1, 255\n\tcmp\tw1, 26\n\tcsel\tw0, w0, wzr, 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 <sys/time.h> #include <stdlib.h> #include <string.h> #include <strings.h> #include <time.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "114" ], "var": [ "c" ] }, { "value": [ "113" ], "var": [ "c" ] }, { "value": [ "95" ], "var": [ "c" ] }, { "value": [ "43" ], "var": [ "c" ] }, { "value": [ "118" ], "var": [ "c" ] }, { "value": [ "19" ], "var": [ "c" ] }, { "value": [ "110" ], "var": [ "c" ] }, { "value": [ "108" ], "var": [ "c" ] }, { "value": [ "119" ], "var": [ "c" ] }, { "value": [ "64" ], "var": [ "c" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53kd2l_qbv.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 = IsAlpha(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); }
forkvm
null
{"livein": ["c"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "IsAlpha", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53kd2l_qbv.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Doom-Utils/lmpc/src/tools.c
int EndianTest(void) { unsigned long int CT = 0L; ((char*)(&CT))[0] = 1; return ((CT==1)?0:1); }
int EndianTest()
int EndianTest(void)
EndianTest
[ "int", "" ]
{ "code": [ ".globl EndianTest\n.type EndianTest, @function\nEndianTest:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tsubq\t$16, %rsp\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, -8(%rbp)\n\txorl\t%eax, %eax\n\tmovq\t$0, -16(%rbp)\n\tleaq\t-16(%rbp), %rax\n\tmovb\t$1, (%rax)\n\tmovq\t-16(%rbp), %rax\n\tcmpq\t$1, %rax\n\tsetne\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 EndianTest\n.type EndianTest, @function\nEndianTest:\n.LFB46:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tmovq\t$0, (%rsp)\n\tmovb\t$1, (%rsp)\n\tcmpq\t$1, (%rsp)\n\tsetne\t%al\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tje\t.L2\n\tcall\t__stack_chk_fail@PLT\n.L2:\n\tmovzbl\t%al, %eax\n\taddq\t$24, %rsp\n\t.cfi_def_cfa_offset 8\n\tret\n\t.cfi_endproc\n\n", ".globl EndianTest\n.type EndianTest, @function\nEndianTest:\n.LFB67:\n\t.cfi_startproc\n\tendbr64\n\tsubq\t$24, %rsp\n\t.cfi_def_cfa_offset 32\n\tmovq\t%fs:40, %rax\n\tmovq\t%rax, 8(%rsp)\n\txorl\t%eax, %eax\n\tmovq\t$0, (%rsp)\n\tmovb\t$1, (%rsp)\n\tcmpq\t$1, (%rsp)\n\tsetne\t%al\n\tmovq\t8(%rsp), %rdx\n\txorq\t%fs:40, %rdx\n\tjne\t.L5\n\tmovzbl\t%al, %eax\n\taddq\t$24, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 8\n\tret\n.L5:\n\t.cfi_restore_state\n\tcall\t__stack_chk_fail@PLT\n\t.cfi_endproc\n\n", ".global EndianTest\n.type EndianTest, %function\nEndianTest:\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\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\tstr\txzr, [sp, 16]\n\tadd\tx0, sp, 16\n\tmov\tw1, 1\n\tstrb\tw1, [x0]\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 1\n\tcset\tw0, ne\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 EndianTest\n.type EndianTest, %function\nEndianTest:\n.LFB46:\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\tadrp\tx1, :got:__stack_chk_guard\n\tmov\tx29, sp\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tstr\txzr, [sp, 16]\n\tldr\tx0, [x1]\n\tstr\tx0, [sp, 24]\n\tmov\tx0,0\n\tmov\tw0, 1\n\tstrb\tw0, [sp, 16]\n\tldr\tx0, [sp, 16]\n\tcmp\tx0, 1\n\tcset\tw0, ne\n\tldr\tx2, [sp, 24]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbeq\t.L2\n\tbl\t__stack_chk_fail\n.L2:\n\tldp\tx29, x30, [sp], 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 EndianTest\n.type EndianTest, %function\nEndianTest:\n.LFB67:\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\tadrp\tx1, :got:__stack_chk_guard\n\tmov\tw0, 1\n\tmov\tx29, sp\n\tstr\txzr, [sp, 16]\n\tldr\tx1, [x1, #:got_lo12:__stack_chk_guard]\n\tstrb\tw0, [sp, 16]\n\tldr\tx0, [sp, 16]\n\tldr\tx2, [x1]\n\tstr\tx2, [sp, 24]\n\tmov\tx2,0\n\tcmp\tx0, 1\n\tcset\tw0, ne\n\tldr\tx2, [sp, 24]\n\tldr\tx3, [x1]\n\tsubs\tx2, x2, x3\n\tmov\tx3, 0\n\tbne\t.L5\n\tldp\tx29, x30, [sp], 32\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_def_cfa_offset 0\n\tret\n.L5:\n\t.cfi_restore_state\n\tbl\t__stack_chk_fail\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <string.h> #include <sys/stat.h> #include <sys/time.h> #include <time.h> #include <time.h> #include <unistd.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [], "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_37fvndb7tl.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 = EndianTest(); 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": "EndianTest", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_37fvndb7tl.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
alomax/NonLinLoc/www_beta/src/GridLib.c
double InterpCubeLagrange(double xdiff, double ydiff, double zdiff, double vval000, double vval001, double vval010, double vval011, double vval100, double vval101, double vval110, double vval111) { double value; double oneMinusXdiff; double oneMinusYdiff; double oneMinusZdiff; oneMinusXdiff = 1.0 - xdiff; oneMinusYdiff = 1.0 - ydiff; oneMinusZdiff = 1.0 - zdiff; value = vval000 * (oneMinusXdiff) * (oneMinusYdiff) * (oneMinusZdiff) + vval001 * (oneMinusXdiff) * (oneMinusYdiff) * zdiff + vval010 * (oneMinusXdiff) * ydiff * (oneMinusZdiff) + vval011 * (oneMinusXdiff) * ydiff * zdiff + vval100 * xdiff * (oneMinusYdiff) * (oneMinusZdiff) + vval101 * xdiff * (oneMinusYdiff) * zdiff + vval110 * xdiff * ydiff * (oneMinusZdiff) + vval111 * xdiff * ydiff * zdiff; return (value); }
double InterpCubeLagrange(doublexdiff, doubleydiff, doublezdiff, doublevval000, doublevval001, doublevval010, doublevval011, doublevval100, doublevval101, doublevval110, doublevval111)
double InterpCubeLagrange(double xdiff, double ydiff, double zdiff, double vval000, double vval001, double vval010, double vval011, double vval100, double vval101, double vval110, double vval111)
InterpCubeLagrange
[ "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double" ]
{ "code": [ ".globl InterpCubeLagrange\n.type InterpCubeLagrange, @function\nInterpCubeLagrange:\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, -40(%rbp)\n\tmovsd\t%xmm1, -48(%rbp)\n\tmovsd\t%xmm2, -56(%rbp)\n\tmovsd\t%xmm3, -64(%rbp)\n\tmovsd\t%xmm4, -72(%rbp)\n\tmovsd\t%xmm5, -80(%rbp)\n\tmovsd\t%xmm6, -88(%rbp)\n\tmovsd\t%xmm7, -96(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t-40(%rbp), %xmm0\n\tmovsd\t%xmm0, -32(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t-48(%rbp), %xmm0\n\tmovsd\t%xmm0, -24(%rbp)\n\tmovsd\t.LC0(%rip), %xmm0\n\tsubsd\t-56(%rbp), %xmm0\n\tmovsd\t%xmm0, -16(%rbp)\n\tmovsd\t-64(%rbp), %xmm0\n\tmulsd\t-32(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\tmovapd\t%xmm0, %xmm1\n\tmulsd\t-16(%rbp), %xmm1\n\tmovsd\t-72(%rbp), %xmm0\n\tmulsd\t-32(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\tmulsd\t-56(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t-80(%rbp), %xmm0\n\tmulsd\t-32(%rbp), %xmm0\n\tmulsd\t-48(%rbp), %xmm0\n\tmulsd\t-16(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t-88(%rbp), %xmm0\n\tmulsd\t-32(%rbp), %xmm0\n\tmulsd\t-48(%rbp), %xmm0\n\tmulsd\t-56(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t-96(%rbp), %xmm0\n\tmulsd\t-40(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\tmulsd\t-16(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t16(%rbp), %xmm0\n\tmulsd\t-40(%rbp), %xmm0\n\tmulsd\t-24(%rbp), %xmm0\n\tmulsd\t-56(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t24(%rbp), %xmm0\n\tmulsd\t-40(%rbp), %xmm0\n\tmulsd\t-48(%rbp), %xmm0\n\tmulsd\t-16(%rbp), %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovsd\t32(%rbp), %xmm0\n\tmulsd\t-40(%rbp), %xmm0\n\tmulsd\t-48(%rbp), %xmm0\n\tmulsd\t-56(%rbp), %xmm0\n\taddsd\t%xmm1, %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.LC0: \t.long\t0\n", ".globl InterpCubeLagrange\n.type InterpCubeLagrange, @function\nInterpCubeLagrange:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm9\n\tmulsd\t%xmm0, %xmm7\n\tmovapd\t%xmm0, %xmm8\n\tmovapd\t%xmm9, %xmm11\n\tmovapd\t%xmm9, %xmm10\n\tsubsd\t%xmm2, %xmm9\n\tsubsd\t%xmm0, %xmm11\n\tsubsd\t%xmm1, %xmm10\n\tmovapd\t%xmm7, %xmm0\n\tmulsd\t%xmm11, %xmm3\n\tmulsd\t%xmm11, %xmm4\n\tmulsd\t%xmm11, %xmm5\n\tmulsd\t%xmm11, %xmm6\n\tmulsd\t%xmm10, %xmm0\n\tmulsd\t%xmm10, %xmm3\n\tmulsd\t%xmm10, %xmm4\n\tmulsd\t%xmm1, %xmm5\n\tmulsd\t%xmm1, %xmm6\n\tmulsd\t%xmm9, %xmm0\n\tmulsd\t%xmm9, %xmm3\n\tmulsd\t%xmm2, %xmm4\n\tmulsd\t%xmm9, %xmm5\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t%xmm4, %xmm3\n\taddsd\t%xmm5, %xmm3\n\taddsd\t%xmm6, %xmm3\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t8(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm0, %xmm10\n\tmovapd\t%xmm10, %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t16(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm9, %xmm0\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t24(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl InterpCubeLagrange\n.type InterpCubeLagrange, @function\nInterpCubeLagrange:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t.LC0(%rip), %xmm9\n\tmulsd\t%xmm0, %xmm7\n\tmovapd\t%xmm0, %xmm8\n\tmovapd\t%xmm9, %xmm11\n\tmovapd\t%xmm9, %xmm10\n\tsubsd\t%xmm2, %xmm9\n\tsubsd\t%xmm0, %xmm11\n\tsubsd\t%xmm1, %xmm10\n\tmovapd\t%xmm7, %xmm0\n\tmulsd\t%xmm11, %xmm3\n\tmulsd\t%xmm11, %xmm4\n\tmulsd\t%xmm11, %xmm5\n\tmulsd\t%xmm11, %xmm6\n\tmulsd\t%xmm10, %xmm0\n\tmulsd\t%xmm10, %xmm3\n\tmulsd\t%xmm10, %xmm4\n\tmulsd\t%xmm1, %xmm5\n\tmulsd\t%xmm1, %xmm6\n\tmulsd\t%xmm9, %xmm0\n\tmulsd\t%xmm9, %xmm3\n\tmulsd\t%xmm2, %xmm4\n\tmulsd\t%xmm9, %xmm5\n\tmulsd\t%xmm2, %xmm6\n\taddsd\t%xmm4, %xmm3\n\taddsd\t%xmm5, %xmm3\n\taddsd\t%xmm6, %xmm3\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t8(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm0, %xmm10\n\tmovapd\t%xmm10, %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t16(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm9, %xmm0\n\taddsd\t%xmm0, %xmm3\n\tmovsd\t24(%rsp), %xmm0\n\tmulsd\t%xmm8, %xmm0\n\tmulsd\t%xmm1, %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm3, %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global InterpCubeLagrange\n.type InterpCubeLagrange, %function\nInterpCubeLagrange:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #96\n\t.cfi_def_cfa_offset 96\n\tstr\td0, [sp, 56]\n\tstr\td1, [sp, 48]\n\tstr\td2, [sp, 40]\n\tstr\td3, [sp, 32]\n\tstr\td4, [sp, 24]\n\tstr\td5, [sp, 16]\n\tstr\td6, [sp, 8]\n\tstr\td7, [sp]\n\tfmov\td1, 1.0e+0\n\tldr\td0, [sp, 56]\n\tfsub\td0, d1, d0\n\tstr\td0, [sp, 64]\n\tfmov\td1, 1.0e+0\n\tldr\td0, [sp, 48]\n\tfsub\td0, d1, d0\n\tstr\td0, [sp, 72]\n\tfmov\td1, 1.0e+0\n\tldr\td0, [sp, 40]\n\tfsub\td0, d1, d0\n\tstr\td0, [sp, 80]\n\tldr\td1, [sp, 32]\n\tldr\td0, [sp, 64]\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 72]\n\tfmul\td1, d1, d0\n\tldr\td0, [sp, 80]\n\tfmul\td1, d1, d0\n\tldr\td2, [sp, 24]\n\tldr\td0, [sp, 64]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 72]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 40]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp, 16]\n\tldr\td0, [sp, 64]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 48]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 80]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp, 8]\n\tldr\td0, [sp, 64]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 48]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 40]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp]\n\tldr\td0, [sp, 56]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 72]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 80]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp, 96]\n\tldr\td0, [sp, 56]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 72]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 40]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp, 104]\n\tldr\td0, [sp, 56]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 48]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 80]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\td2, [sp, 112]\n\tldr\td0, [sp, 56]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 48]\n\tfmul\td2, d2, d0\n\tldr\td0, [sp, 40]\n\tfmul\td0, d2, d0\n\tfadd\td0, d1, d0\n\tstr\td0, [sp, 88]\n\tldr\td0, [sp, 88]\n\tadd\tsp, sp, 96\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global InterpCubeLagrange\n.type InterpCubeLagrange, %function\nInterpCubeLagrange:\n.LFB0:\n\t.cfi_startproc\n\tfmov\td16, 1.0e+0\n\tfmul\td7, d0, d7\n\tfsub\td17, d16, d0\n\tfsub\td19, d16, d1\n\tfsub\td16, d16, d2\n\tfmul\td3, d17, d3\n\tfmul\td5, d17, d5\n\tfmul\td7, d7, d19\n\tfmul\td18, d3, d19\n\tfmul\td3, d17, d4\n\tfmul\td5, d5, d1\n\tfmul\td17, d17, d6\n\tldr\td4, [sp]\n\tfmul\td3, d3, d19\n\tfmul\td17, d17, d1\n\tfmul\td4, d0, d4\n\tfmul\td3, d3, d2\n\tfmadd\td3, d18, d16, d3\n\tfmul\td4, d4, d19\n\tfmadd\td3, d5, d16, d3\n\tfmadd\td3, d17, d2, d3\n\tfmadd\td3, d7, d16, d3\n\tfmadd\td3, d4, d2, d3\n\tldr\td4, [sp, 8]\n\tfmul\td4, d0, d4\n\tfmul\td4, d4, d1\n\tfmadd\td3, d4, d16, d3\n\tldr\td4, [sp, 16]\n\tfmul\td0, d0, d4\n\tfmul\td0, d0, d1\n\tfmadd\td0, d0, d2, d3\n\tret\n\t.cfi_endproc\n\n", ".global InterpCubeLagrange\n.type InterpCubeLagrange, %function\nInterpCubeLagrange:\n.LFB0:\n\t.cfi_startproc\n\tfmov\td16, 1.0e+0\n\tfmul\td7, d0, d7\n\tldp\td19, d18, [sp]\n\tfsub\td17, d16, d0\n\tfsub\td20, d16, d1\n\tfsub\td16, d16, d2\n\tldr\td21, [sp, 16]\n\tfmul\td19, d0, d19\n\tfmul\td18, d0, d18\n\tfmul\td4, d17, d4\n\tfmul\td3, d17, d3\n\tfmul\td5, d17, d5\n\tfmul\td17, d17, d6\n\tfmul\td7, d7, d20\n\tfmul\td0, d0, d21\n\tfmul\td19, d19, d20\n\tfmul\td18, d18, d1\n\tfmul\td4, d4, d20\n\tfmul\td6, d3, d20\n\tfmul\td3, d5, d1\n\tfmul\td17, d17, d1\n\tfmul\td0, d0, d1\n\tfmul\td4, d4, d2\n\tfmadd\td4, d6, d16, d4\n\tfmadd\td3, d3, d16, d4\n\tfmadd\td3, d17, d2, d3\n\tfmadd\td3, d7, d16, d3\n\tfmadd\td3, d19, d2, d3\n\tfmadd\td3, d18, d16, d3\n\tfmadd\td0, d0, d2, 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": [ "37.0912151159", "31.6697626891", "3.32863905172", "14.8905502848", "5.8275647875", "87.0708543676", "48.4566352899", "77.087874081", "21.7216885693", "58.7841068793", "14.070761159" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "96.6099597364", "73.6327091654", "7.32982241456", "49.9222948144", "70.3653599287", "19.7839572688", "90.5391224296", "25.8291004907", "80.3401536129", "4.20510076743", "27.2443059011" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "72.2575714938", "78.8540587038", "41.7834352007", "47.8585319351", "87.9194908296", "59.5831804487", "97.8596225792", "87.479234208", "65.7483595965", "48.638552327", "12.3516616196" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "82.2117171852", "82.1913396223", "56.8862631015", "54.8839929264", "92.3379231282", "57.6804679538", "56.7635816461", "47.9431906549", "79.2915298802", "65.9158891095", "63.4087664705" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "62.0027360846", "43.7124390106", "3.2200466975", "0.0159262322397", "19.2026870127", "16.1518715498", "7.55120409181", "87.5388867318", "57.2102542038", "80.9979894639", "13.6664965118" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "49.783598504", "78.9338762336", "21.2937367952", "83.8261727249", "51.4915319598", "6.059202746", "34.9158183317", "68.140835295", "92.9251381145", "34.9120326858", "72.478488575" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "76.0034175345", "89.0663642634", "16.4736047266", "95.7556153742", "86.15795539", "29.7003295755", "54.9647114274", "10.2396072705", "38.2311268721", "31.6154109608", "7.87395234766" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "72.8311071031", "62.0806812755", "98.7806737963", "69.4834222276", "93.6030125088", "81.5129238822", "84.4552707619", "76.1049501062", "30.0390477028", "70.8879121059", "69.0720281156" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "41.5767509321", "88.8743739547", "31.7614656778", "37.977634701", "74.3473624464", "78.5303158066", "66.3225554929", "56.2496889451", "29.6417508061", "77.9882387515", "32.4680534916" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] }, { "value": [ "85.4733167072", "10.7060859861", "33.6617649729", "69.8082749427", "77.6867817504", "7.40181017831", "65.0127779401", "57.3674731999", "32.1617488646", "40.0584642943", "78.9379123611" ], "var": [ "xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111" ] } ], "output": [ { "value": [ "46656.787768902555" ], "var": [ "returnv" ] }, { "value": [ "-4156863.5062755346" ], "var": [ "returnv" ] }, { "value": [ "-3515600.7804152244" ], "var": [ "returnv" ] }, { "value": [ "1632070.3486007564" ], "var": [ "returnv" ] }, { "value": [ "-149489.61851855746" ], "var": [ "returnv" ] }, { "value": [ "-3719792.1365488814" ], "var": [ "returnv" ] }, { "value": [ "-8979071.555846535" ], "var": [ "returnv" ] }, { "value": [ "28512508.194094412" ], "var": [ "returnv" ] }, { "value": [ "3197321.7591733956" ], "var": [ "returnv" ] }, { "value": [ "404716.8255969393" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_484u0iswji.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 xdiff, double ydiff, double zdiff, double vval000, double vval001, double vval010, double vval011, double vval100, double vval101, double vval110, double vval111, 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 xdiff = input_json["xdiff"]; double ydiff = input_json["ydiff"]; double zdiff = input_json["zdiff"]; double vval000 = input_json["vval000"]; double vval001 = input_json["vval001"]; double vval010 = input_json["vval010"]; double vval011 = input_json["vval011"]; double vval100 = input_json["vval100"]; double vval101 = input_json["vval101"]; double vval110 = input_json["vval110"]; double vval111 = input_json["vval111"]; clock_t begin = clock(); double returnv = InterpCubeLagrange(xdiff, ydiff, zdiff, vval000, vval001, vval010, vval011, vval100, vval101, vval110, vval111); 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(xdiff, ydiff, zdiff, vval000, vval001, vval010, vval011, vval100, vval101, vval110, vval111, returnv); }
master
null
{"livein": ["xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "InterpCubeLagrange", "funargs": ["xdiff", "ydiff", "zdiff", "vval000", "vval001", "vval010", "vval011", "vval100", "vval101", "vval110", "vval111"], "typemap": {"xdiff": "float64", "ydiff": "float64", "zdiff": "float64", "vval000": "float64", "vval001": "float64", "vval010": "float64", "vval011": "float64", "vval100": "float64", "vval101": "float64", "vval110": "float64", "vval111": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_484u0iswji.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
AttilaTheHunBruce/Ferd/printFunctions.h
char lowerCaseFromNumber( int n ) { return (char)( n + 'a' ); }
char lowerCaseFromNumber(intn)
char lowerCaseFromNumber( int n )
lowerCaseFromNumber
[ "char", "int" ]
{ "code": [ ".globl lowerCaseFromNumber\n.type lowerCaseFromNumber, @function\nlowerCaseFromNumber:\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$97, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl lowerCaseFromNumber\n.type lowerCaseFromNumber, @function\nlowerCaseFromNumber:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t97(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".globl lowerCaseFromNumber\n.type lowerCaseFromNumber, @function\nlowerCaseFromNumber:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t97(%rdi), %eax\n\tret\n\t.cfi_endproc\n\n", ".global lowerCaseFromNumber\n.type lowerCaseFromNumber, %function\nlowerCaseFromNumber:\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\tand\tw0, w0, 255\n\tadd\tw0, w0, 97\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 lowerCaseFromNumber\n.type lowerCaseFromNumber, %function\nlowerCaseFromNumber:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 97\n\tret\n\t.cfi_endproc\n\n", ".global lowerCaseFromNumber\n.type lowerCaseFromNumber, %function\nlowerCaseFromNumber:\n.LFB0:\n\t.cfi_startproc\n\tadd\tw0, w0, 97\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": [ "107" ], "var": [ "n" ] }, { "value": [ "121" ], "var": [ "n" ] }, { "value": [ "60" ], "var": [ "n" ] }, { "value": [ "118" ], "var": [ "n" ] }, { "value": [ "15" ], "var": [ "n" ] }, { "value": [ "124" ], "var": [ "n" ] }, { "value": [ "3" ], "var": [ "n" ] }, { "value": [ "27" ], "var": [ "n" ] }, { "value": [ "74" ], "var": [ "n" ] }, { "value": [ "62" ], "var": [ "n" ] } ], "output": [ { "value": [ "-52" ], "var": [ "returnv" ] }, { "value": [ "-38" ], "var": [ "returnv" ] }, { "value": [ "-99" ], "var": [ "returnv" ] }, { "value": [ "-41" ], "var": [ "returnv" ] }, { "value": [ "112" ], "var": [ "returnv" ] }, { "value": [ "-35" ], "var": [ "returnv" ] }, { "value": [ "100" ], "var": [ "returnv" ] }, { "value": [ "124" ], "var": [ "returnv" ] }, { "value": [ "-85" ], "var": [ "returnv" ] }, { "value": [ "-97" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_46sr9abpe5.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, 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 n = input_json["n"]; clock_t begin = clock(); char returnv = lowerCaseFromNumber(n); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(n, returnv); }
master
null
{"livein": ["n"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "lowerCaseFromNumber", "funargs": ["n"], "typemap": {"n": "int32", "returnv": "int8"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_46sr9abpe5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
UliceNix/GoGoRocket/game.c
int getDelay(int level) { switch (level){ case 2: return 10; case 3: return 7; case 4: return 5; default: return 2; } }
int getDelay(intlevel)
int getDelay(int level)
getDelay
[ "int", "int" ]
{ "code": [ ".globl getDelay\n.type getDelay, @function\ngetDelay:\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$4, -4(%rbp)\n\tje\t.L2\n\tcmpl\t$4, -4(%rbp)\n\tjg\t.L3\n\tcmpl\t$2, -4(%rbp)\n\tje\t.L4\n\tcmpl\t$3, -4(%rbp)\n\tje\t.L5\n\tjmp\t.L3\n.L4:\n\tmovl\t$10, %eax\n\tjmp\t.L6\n.L5:\n\tmovl\t$7, %eax\n\tjmp\t.L6\n.L2:\n\tmovl\t$5, %eax\n\tjmp\t.L6\n.L3:\n\tmovl\t$2, %eax\n.L6:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl getDelay\n.type getDelay, @function\ngetDelay:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$2, %edi\n\tmovl\t$2, %eax\n\tcmpl\t$2, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovsbl\t(%rax,%rdi), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl getDelay\n.type getDelay, @function\ngetDelay:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tsubl\t$2, %edi\n\tmovl\t$2, %eax\n\tcmpl\t$2, %edi\n\tja\t.L1\n\tleaq\tCSWTCH.1(%rip), %rax\n\tmovl\t(%rax,%rdi,4), %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global getDelay\n.type getDelay, %function\ngetDelay:\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, 4\n\tbeq\t.L2\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 4\n\tbgt\t.L3\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 2\n\tbeq\t.L4\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 3\n\tbeq\t.L5\n\tb\t.L3\n.L4:\n\tmov\tw0, 10\n\tb\t.L6\n.L5:\n\tmov\tw0, 7\n\tb\t.L6\n.L2:\n\tmov\tw0, 5\n\tb\t.L6\n.L3:\n\tmov\tw0, 2\n.L6:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global getDelay\n.type getDelay, %function\ngetDelay:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #2\n\tcmp\tw0, 2\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldrsb\tw0, [x1, w0, uxtw]\n.L1:\n\tret\n.L3:\n\tmov\tw0, 2\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global getDelay\n.type getDelay, %function\ngetDelay:\n.LFB0:\n\t.cfi_startproc\n\tsub\tw0, w0, #2\n\tcmp\tw0, 2\n\tbhi\t.L3\n\tadrp\tx1, .LANCHOR0\n\tadd\tx1, x1, :lo12:.LANCHOR0\n\tldr\tw0, [x1, w0, uxtw 2]\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 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": [ "30" ], "var": [ "level" ] }, { "value": [ "88" ], "var": [ "level" ] }, { "value": [ "23" ], "var": [ "level" ] }, { "value": [ "24" ], "var": [ "level" ] }, { "value": [ "57" ], "var": [ "level" ] }, { "value": [ "120" ], "var": [ "level" ] }, { "value": [ "28" ], "var": [ "level" ] }, { "value": [ "92" ], "var": [ "level" ] }, { "value": [ "50" ], "var": [ "level" ] }, { "value": [ "105" ], "var": [ "level" ] } ], "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_33ybl_665x.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 level, 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 level = input_json["level"]; clock_t begin = clock(); int returnv = getDelay(level); 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(level, returnv); }
master
null
{"livein": ["level"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "getDelay", "funargs": ["level"], "typemap": {"level": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_33ybl_665x.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
willempx/verifast/examples/preprocessor/macro_concatenation.c
int test_nested3(int FOObar) { return FOObar; }
int test_nested3(intFOObar)
int test_nested3(int FOObar)
test_nested3
[ "int", "int" ]
{ "code": [ ".globl test_nested3\n.type test_nested3, @function\ntest_nested3:\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 test_nested3\n.type test_nested3, @function\ntest_nested3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl test_nested3\n.type test_nested3, @function\ntest_nested3:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t%edi, %eax\n\tret\n\t.cfi_endproc\n\n", ".global test_nested3\n.type test_nested3, %function\ntest_nested3:\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 test_nested3\n.type test_nested3, %function\ntest_nested3:\n.LFB0:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global test_nested3\n.type test_nested3, %function\ntest_nested3:\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": [ "34" ], "var": [ "FOObar" ] }, { "value": [ "109" ], "var": [ "FOObar" ] }, { "value": [ "49" ], "var": [ "FOObar" ] }, { "value": [ "72" ], "var": [ "FOObar" ] }, { "value": [ "61" ], "var": [ "FOObar" ] }, { "value": [ "98" ], "var": [ "FOObar" ] }, { "value": [ "45" ], "var": [ "FOObar" ] }, { "value": [ "121" ], "var": [ "FOObar" ] }, { "value": [ "72" ], "var": [ "FOObar" ] }, { "value": [ "30" ], "var": [ "FOObar" ] } ], "output": [ { "value": [ "34" ], "var": [ "returnv" ] }, { "value": [ "109" ], "var": [ "returnv" ] }, { "value": [ "49" ], "var": [ "returnv" ] }, { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "61" ], "var": [ "returnv" ] }, { "value": [ "98" ], "var": [ "returnv" ] }, { "value": [ "45" ], "var": [ "returnv" ] }, { "value": [ "121" ], "var": [ "returnv" ] }, { "value": [ "72" ], "var": [ "returnv" ] }, { "value": [ "30" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_499vqrimv8.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 FOObar, 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 FOObar = input_json["FOObar"]; clock_t begin = clock(); int returnv = test_nested3(FOObar); 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(FOObar, returnv); }
master
null
{"livein": ["FOObar"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "test_nested3", "funargs": ["FOObar"], "typemap": {"FOObar": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_499vqrimv8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
batesokr/Slope-Simulation/slope.c
float calculate_actual_distance(float virt_dist, float calories, float estimated_calories) { return virt_dist * (calories / estimated_calories); }
float calculate_actual_distance(floatvirt_dist, floatcalories, floatestimated_calories)
float calculate_actual_distance(float virt_dist, float calories, float estimated_calories)
calculate_actual_distance
[ "float", "float", "float", "float" ]
{ "code": [ ".globl calculate_actual_distance\n.type calculate_actual_distance, @function\ncalculate_actual_distance:\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\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t%xmm1, -8(%rbp)\n\tmovss\t%xmm2, -12(%rbp)\n\tmovss\t-8(%rbp), %xmm0\n\tdivss\t-12(%rbp), %xmm0\n\tmulss\t-4(%rbp), %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl calculate_actual_distance\n.type calculate_actual_distance, @function\ncalculate_actual_distance:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tdivss\t%xmm2, %xmm1\n\tmulss\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl calculate_actual_distance\n.type calculate_actual_distance, @function\ncalculate_actual_distance:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tdivss\t%xmm2, %xmm1\n\tmulss\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global calculate_actual_distance\n.type calculate_actual_distance, %function\ncalculate_actual_distance:\n.LFB6:\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\ts0, [sp, 4]\n\tldr\ts1, [sp, 8]\n\tfdiv\ts1, s1, s0\n\tldr\ts0, [sp, 12]\n\tfmul\ts0, s1, s0\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global calculate_actual_distance\n.type calculate_actual_distance, %function\ncalculate_actual_distance:\n.LFB24:\n\t.cfi_startproc\n\tfdiv\ts1, s1, s2\n\tfmul\ts0, s1, s0\n\tret\n\t.cfi_endproc\n\n", ".global calculate_actual_distance\n.type calculate_actual_distance, %function\ncalculate_actual_distance:\n.LFB39:\n\t.cfi_startproc\n\tfdiv\ts1, s1, s2\n\tfmul\ts0, s1, s0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stdlib.h> #include <math.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": [ "43.5395736977", "70.7921530417", "79.1472670615" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "93.3222910428", "83.6042276069", "16.2773171295" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "2.58919787192", "18.1112638004", "4.33299685344" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "66.2563259853", "53.6367434017", "38.2418813843" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "83.2346794979", "32.0450352413", "94.6345275835" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "63.0981206208", "2.94964610772", "7.29791885215" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "38.573096543", "15.6197683197", "71.2272189509" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "72.7209162671", "86.8095940228", "8.19812890325" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "9.41590629249", "66.3117398044", "47.6329514119" ], "var": [ "virt_dist", "calories", "estimated_calories" ] }, { "value": [ "89.9612495619", "81.943413679", "50.2988601144" ], "var": [ "virt_dist", "calories", "estimated_calories" ] } ], "output": [ { "value": [ "38.943355560302734" ], "var": [ "returnv" ] }, { "value": [ "479.3257751464844" ], "var": [ "returnv" ] }, { "value": [ "10.822450637817383" ], "var": [ "returnv" ] }, { "value": [ "92.92882537841797" ], "var": [ "returnv" ] }, { "value": [ "28.184831619262695" ], "var": [ "returnv" ] }, { "value": [ "25.50276756286621" ], "var": [ "returnv" ] }, { "value": [ "8.458885192871094" ], "var": [ "returnv" ] }, { "value": [ "770.038330078125" ], "var": [ "returnv" ] }, { "value": [ "13.108259201049805" ], "var": [ "returnv" ] }, { "value": [ "146.55862426757812" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_35p76jpja0.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 virt_dist, float calories, float estimated_calories, 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 virt_dist = input_json["virt_dist"]; float calories = input_json["calories"]; float estimated_calories = input_json["estimated_calories"]; clock_t begin = clock(); float returnv = calculate_actual_distance(virt_dist, calories, estimated_calories); 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(virt_dist, calories, estimated_calories, returnv); }
master
null
{"livein": ["virt_dist", "calories", "estimated_calories"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "calculate_actual_distance", "funargs": ["virt_dist", "calories", "estimated_calories"], "typemap": {"virt_dist": "float32", "calories": "float32", "estimated_calories": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_35p76jpja0.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
robobenklein/gpg-pqcrypt/HyMES/precomp.c
int is_leaf(int m, int t) { static int leaf[6] = {7, 5, 4, 4, 3, 3}; if (m < 6) return (t <= 32); else if (m > 16) return (t <= 1); else if (m > 11) return (t <= 2); else return (leaf[m - 6] >= t); }
int is_leaf(intm, intt)
int is_leaf(int m, int t)
is_leaf
[ "int", "int", "int" ]
{ "code": [ ".globl is_leaf\n.type is_leaf, @function\nis_leaf:\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\tcmpl\t$5, -4(%rbp)\n\tjg\t.L2\n\tcmpl\t$32, -8(%rbp)\n\tsetle\t%al\n\tmovzbl\t%al, %eax\n\tjmp\t.L3\n.L2:\n\tcmpl\t$16, -4(%rbp)\n\tjle\t.L4\n\tcmpl\t$1, -8(%rbp)\n\tsetle\t%al\n\tmovzbl\t%al, %eax\n\tjmp\t.L3\n.L4:\n\tcmpl\t$11, -4(%rbp)\n\tjle\t.L5\n\tcmpl\t$2, -8(%rbp)\n\tsetle\t%al\n\tmovzbl\t%al, %eax\n\tjmp\t.L3\n.L5:\n\tmovl\t-4(%rbp), %eax\n\tsubl\t$6, %eax\n\tcltq\n\tleaq\t0(,%rax,4), %rdx\n\tleaq\tleaf.3887(%rip), %rax\n\tmovl\t(%rdx,%rax), %eax\n\tcmpl\t%eax, -8(%rbp)\n\tsetle\t%al\n\tmovzbl\t%al, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl is_leaf\n.type is_leaf, @function\nis_leaf:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$5, %edi\n\tjg\t.L2\n\tcmpl\t$32, %esi\n\tjmp\t.L7\n.L2:\n\tcmpl\t$16, %edi\n\tjle\t.L4\n\tdecl\t%esi\n\tjmp\t.L7\n.L4:\n\tcmpl\t$11, %edi\n\tjle\t.L5\n\tcmpl\t$2, %esi\n.L7:\n\tsetle\t%al\n\tjmp\t.L6\n.L5:\n\tsubl\t$6, %edi\n\tleaq\tleaf.4133(%rip), %rax\n\tmovslq\t%edi, %rdi\n\tcmpl\t%esi, (%rax,%rdi,4)\n\tsetge\t%al\n.L6:\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl is_leaf\n.type is_leaf, @function\nis_leaf:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tcmpl\t$5, %edi\n\tjle\t.L7\n\tcmpl\t$16, %edi\n\tjg\t.L8\n\tcmpl\t$11, %edi\n\tjle\t.L5\n\txorl\t%eax, %eax\n\tcmpl\t$2, %esi\n\tsetle\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\txorl\t%eax, %eax\n\tcmpl\t$1, %esi\n\tsetle\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\txorl\t%eax, %eax\n\tcmpl\t$32, %esi\n\tsetle\t%al\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tsubl\t$6, %edi\n\tleaq\tleaf.4198(%rip), %rax\n\tmovslq\t%edi, %rdi\n\tcmpl\t%esi, (%rax,%rdi,4)\n\tsetge\t%al\n\tmovzbl\t%al, %eax\n\tret\n\t.cfi_endproc\n\n", ".global is_leaf\n.type is_leaf, %function\nis_leaf:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tw0, [sp, 12]\n\tstr\tw1, [sp, 8]\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 5\n\tbgt\t.L2\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 32\n\tcset\tw0, le\n\tand\tw0, w0, 255\n\tb\t.L3\n.L2:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 16\n\tble\t.L4\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 1\n\tcset\tw0, le\n\tand\tw0, w0, 255\n\tb\t.L3\n.L4:\n\tldr\tw0, [sp, 12]\n\tcmp\tw0, 11\n\tble\t.L5\n\tldr\tw0, [sp, 8]\n\tcmp\tw0, 2\n\tcset\tw0, le\n\tand\tw0, w0, 255\n\tb\t.L3\n.L5:\n\tldr\tw0, [sp, 12]\n\tsub\tw1, w0, #6\n\tadrp\tx0, leaf.5415\n\tadd\tx0, x0, :lo12:leaf.5415\n\tsxtw\tx1, w1\n\tldr\tw0, [x0, x1, lsl 2]\n\tldr\tw1, [sp, 8]\n\tcmp\tw1, w0\n\tcset\tw0, le\n\tand\tw0, w0, 255\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global is_leaf\n.type is_leaf, %function\nis_leaf:\n.LFB24:\n\t.cfi_startproc\n\tcmp\tw0, 5\n\tbgt\t.L2\n\tcmp\tw1, 32\n.L6:\n\tcset\tw0, le\n.L1:\n\tret\n.L2:\n\tcmp\tw0, 16\n\tble\t.L4\n\tcmp\tw1, 1\n\tb\t.L6\n.L4:\n\tcmp\tw0, 11\n\tble\t.L5\n\tcmp\tw1, 2\n\tb\t.L6\n.L5:\n\tsub\tw0, w0, #6\n\tadrp\tx2, .LANCHOR0\n\tadd\tx2, x2, :lo12:.LANCHOR0\n\tldr\tw0, [x2, w0, sxtw 2]\n\tcmp\tw0, w1\n\tcset\tw0, ge\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global is_leaf\n.type is_leaf, %function\nis_leaf:\n.LFB39:\n\t.cfi_startproc\n\tcmp\tw0, 5\n\tble\t.L7\n\tcmp\tw0, 16\n\tbgt\t.L8\n\tcmp\tw0, 11\n\tble\t.L5\n\tcmp\tw1, 2\n\tcset\tw0, le\n\tret\n\t.p2align 2,,3\n.L8:\n\tcmp\tw1, 1\n\tcset\tw0, le\n\tret\n\t.p2align 2,,3\n.L7:\n\tcmp\tw1, 32\n\tcset\tw0, le\n\tret\n\t.p2align 2,,3\n.L5:\n\tsub\tw0, w0, #6\n\tadrp\tx2, .LANCHOR0\n\tadd\tx2, x2, :lo12:.LANCHOR0\n\tldr\tw0, [x2, w0, sxtw 2]\n\tcmp\tw0, w1\n\tcset\tw0, 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 <stdlib.h> #include <stdio.h> #include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "108", "112" ], "var": [ "m", "t" ] }, { "value": [ "17", "15" ], "var": [ "m", "t" ] }, { "value": [ "121", "52" ], "var": [ "m", "t" ] }, { "value": [ "96", "113" ], "var": [ "m", "t" ] }, { "value": [ "98", "101" ], "var": [ "m", "t" ] }, { "value": [ "44", "42" ], "var": [ "m", "t" ] }, { "value": [ "84", "70" ], "var": [ "m", "t" ] }, { "value": [ "5", "45" ], "var": [ "m", "t" ] }, { "value": [ "104", "82" ], "var": [ "m", "t" ] }, { "value": [ "111", "8" ], "var": [ "m", "t" ] } ], "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_61gd2yxi00.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 m, int t, 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 m = input_json["m"]; int t = input_json["t"]; clock_t begin = clock(); int returnv = is_leaf(m, t); 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(m, t, returnv); }
master
null
{"livein": ["m", "t"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "is_leaf", "funargs": ["m", "t"], "typemap": {"m": "int32", "t": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_61gd2yxi00.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
nolink/algorithm/Leetcode/N165CompareVersion.c
int compareVersion(char* version1, char* version2) { int value1=0; int value2=0; while(1){ value1=0; value2=0; while((*version1) != '\0' && (*version1) != '.'){ value1 = (value1 * 10) + (*version1) - '0'; version1++; } while((*version2) != '\0' && (*version2) != '.'){ value2 = (value2 * 10) + (*version2) - '0'; version2++; } if(value1 != value2){ return value1 > value2 ? 1 : -1; } if((*version1) == '\0' && (*version2) != '\0'){ version2++; }else if((*version2) == '\0' && (*version1) != '\0'){ version1++; }else if((*version1) == '\0' && (*version2) == '\0'){ return 0; }else{ version1++; version2++; } } }
int compareVersion(char *version1, char *version2)
int compareVersion(char* version1, char* version2)
compareVersion
[ "int", "char *", "char *" ]
{ "code": [ ".globl compareVersion\n.type compareVersion, @function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -24(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t$0, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n.L16:\n\tmovl\t$0, -8(%rbp)\n\tmovl\t$0, -4(%rbp)\n\tjmp\t.L2\n.L4:\n\tmovl\t-8(%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\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\taddl\t%edx, %eax\n\tsubl\t$48, %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\tje\t.L5\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$46, %al\n\tjne\t.L4\n\tjmp\t.L5\n.L7:\n\tmovl\t-4(%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\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tmovsbl\t%al, %eax\n\taddl\t%edx, %eax\n\tsubl\t$48, %eax\n\tmovl\t%eax, -4(%rbp)\n\taddq\t$1, -32(%rbp)\n.L5:\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L6\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t$46, %al\n\tjne\t.L7\n.L6:\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-4(%rbp), %eax\n\tje\t.L8\n\tmovl\t-8(%rbp), %eax\n\tcmpl\t-4(%rbp), %eax\n\tjle\t.L9\n\tmovl\t$1, %eax\n\tjmp\t.L11\n.L9:\n\tmovl\t$-1, %eax\n\tjmp\t.L11\n.L8:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L12\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L12\n\taddq\t$1, -32(%rbp)\n\tjmp\t.L13\n.L12:\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L14\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tje\t.L14\n\taddq\t$1, -24(%rbp)\n\tjmp\t.L13\n.L14:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L15\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L15\n\tmovl\t$0, %eax\n\tjmp\t.L11\n.L15:\n\taddq\t$1, -24(%rbp)\n\taddq\t$1, -32(%rbp)\n.L13:\n\tjmp\t.L16\n.L11:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl compareVersion\n.type compareVersion, @function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n.L2:\n\txorl\t%r8d, %r8d\n.L3:\n\tmovsbl\t(%rdi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L16\n\tcmpb\t$46, %dl\n\tje\t.L16\n\timull\t$10, %r8d, %r8d\n\tincq\t%rdi\n\tleal\t-48(%r8,%rdx), %r8d\n\tjmp\t.L3\n.L16:\n\txorl\t%ecx, %ecx\n.L6:\n\tmovsbl\t(%rsi), %eax\n\ttestb\t%al, %al\n\tje\t.L17\n\tcmpb\t$46, %al\n\tje\t.L17\n\timull\t$10, %ecx, %ecx\n\tincq\t%rsi\n\tleal\t-48(%rcx,%rax), %ecx\n\tjmp\t.L6\n.L17:\n\tcmpl\t%ecx, %r8d\n\tje\t.L9\n\tsetg\t%al\n\tmovzbl\t%al, %eax\n\tleal\t-1(%rax,%rax), %eax\n\tret\n.L9:\n\ttestb\t%dl, %dl\n\tjne\t.L11\n\ttestb\t%al, %al\n\tje\t.L15\n\tincq\t%rsi\n\tjmp\t.L2\n.L15:\n\txorl\t%eax, %eax\n\tret\n.L11:\n\tincq\t%rdi\n\tcmpb\t$1, %al\n\tsbbq\t$-1, %rsi\n\tjmp\t.L2\n\t.cfi_endproc\n\n", ".globl compareVersion\n.type compareVersion, @function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovsbl\t(%rdi), %eax\n\tcmpb\t$46, %al\n\tje\t.L3\n\ttestb\t%al, %al\n\tje\t.L3\n\txorl\t%ecx, %ecx\n\t.p2align 4,,10\n\t.p2align 3\n.L4:\n\tleal\t(%rcx,%rcx,4), %edx\n\taddq\t$1, %rdi\n\tleal\t-48(%rax,%rdx,2), %ecx\n\tmovsbl\t(%rdi), %eax\n\ttestb\t%al, %al\n\tje\t.L20\n\tcmpb\t$46, %al\n\tjne\t.L4\n.L20:\n\tmovsbl\t(%rsi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L16\n\tcmpb\t$46, %dl\n\tje\t.L16\n.L14:\n\txorl\t%r8d, %r8d\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tleal\t(%r8,%r8,4), %r8d\n\taddq\t$1, %rsi\n\tleal\t-48(%rdx,%r8,2), %r8d\n\tmovsbl\t(%rsi), %edx\n\ttestb\t%dl, %dl\n\tje\t.L6\n\tcmpb\t$46, %dl\n\tjne\t.L7\n.L6:\n\tcmpl\t%ecx, %r8d\n\tjne\t.L47\n.L9:\n\ttestb\t%al, %al\n\tjne\t.L11\n\ttestb\t%dl, %dl\n\tje\t.L18\n\taddq\t$1, %rsi\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\taddq\t$1, %rdi\n\tcmpb\t$1, %dl\n\tsbbq\t$-1, %rsi\n\tjmp\t.L2\n\t.p2align 4,,10\n\t.p2align 3\n.L18:\n\txorl\t%eax, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovsbl\t(%rsi), %edx\n\tcmpb\t$46, %dl\n\tje\t.L9\n\txorl\t%ecx, %ecx\n\ttestb\t%dl, %dl\n\tjne\t.L14\n\tjmp\t.L9\n\t.p2align 4,,10\n\t.p2align 3\n.L16:\n\txorl\t%r8d, %r8d\n\tjmp\t.L6\n.L47:\n\tsetl\t%al\n\tmovzbl\t%al, %eax\n\tleal\t-1(%rax,%rax), %eax\n\tret\n\t.cfi_endproc\n\n", ".global compareVersion\n.type compareVersion, %function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tstr\twzr, [sp, 24]\n\tstr\twzr, [sp, 28]\n.L16:\n\tstr\twzr, [sp, 24]\n\tstr\twzr, [sp, 28]\n\tb\t.L2\n.L4:\n\tldr\tw1, [sp, 24]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w1\n\tlsl\tw0, w0, 1\n\tmov\tw1, w0\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tadd\tw0, w1, w0\n\tsub\tw0, w0, #48\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\tbeq\t.L5\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 46\n\tbne\t.L4\n\tb\t.L5\n.L7:\n\tldr\tw1, [sp, 28]\n\tmov\tw0, w1\n\tlsl\tw0, w0, 2\n\tadd\tw0, w0, w1\n\tlsl\tw0, w0, 1\n\tmov\tw1, w0\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tadd\tw0, w1, w0\n\tsub\tw0, w0, #48\n\tstr\tw0, [sp, 28]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp]\n.L5:\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L6\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 46\n\tbne\t.L7\n.L6:\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw1, w0\n\tbeq\t.L8\n\tldr\tw1, [sp, 24]\n\tldr\tw0, [sp, 28]\n\tcmp\tw1, w0\n\tble\t.L9\n\tmov\tw0, 1\n\tb\t.L11\n.L9:\n\tmov\tw0, -1\n\tb\t.L11\n.L8:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L12\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L12\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp]\n\tb\t.L13\n.L12:\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L14\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbeq\t.L14\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n\tb\t.L13\n.L14:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L15\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L15\n\tmov\tw0, 0\n\tb\t.L11\n.L15:\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.L13:\n\tb\t.L16\n.L11:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global compareVersion\n.type compareVersion, %function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw6, 10\n.L2:\n\tmov\tw4, 0\n.L3:\n\tldrb\tw5, [x0]\n\tcmp\tw5, 46\n\tccmp\tw5, 0, 4, ne\n\tbne\t.L4\n\tmov\tw3, 0\n.L5:\n\tldrb\tw2, [x1]\n\tcmp\tw2, 46\n\tccmp\tw2, 0, 4, ne\n\tbne\t.L6\n\tcmp\tw4, w3\n\tbeq\t.L7\n\tmov\tw0, -1\n\tcsneg\tw0, w0, w0, le\n.L1:\n\tret\n.L4:\n\tmadd\tw4, w4, w6, w5\n\tadd\tx0, x0, 1\n\tsub\tw4, w4, #48\n\tb\t.L3\n.L6:\n\tmadd\tw3, w3, w6, w2\n\tadd\tx1, x1, 1\n\tsub\tw3, w3, #48\n\tb\t.L5\n.L7:\n\tcbnz\tw5, .L9\n\tcbz\tw2, .L13\n.L17:\n\tadd\tx1, x1, 1\n\tb\t.L2\n.L13:\n\tmov\tw0, 0\n\tb\t.L1\n.L9:\n\tadd\tx0, x0, 1\n\tcbnz\tw2, .L17\n\tb\t.L2\n\t.cfi_endproc\n\n", ".global compareVersion\n.type compareVersion, %function\ncompareVersion:\n.LFB0:\n\t.cfi_startproc\n\t.p2align 3,,7\n.L2:\n\tldrb\tw4, [x0]\n\tcmp\tw4, 46\n\tccmp\tw4, 0, 4, ne\n\tbeq\t.L3\n.L23:\n\tmov\tw2, 0\n\t.p2align 3,,7\n.L4:\n\tadd\tw2, w2, w2, lsl 2\n\tadd\tw2, w4, w2, lsl 1\n\tldrb\tw4, [x0, 1]!\n\tsub\tw2, w2, #48\n\tcmp\tw4, 46\n\tccmp\tw4, 0, 4, ne\n\tbne\t.L4\n\tldrb\tw5, [x1]\n\tcmp\tw5, 46\n\tccmp\tw5, 0, 4, ne\n\tbeq\t.L13\n.L12:\n\tmov\tw3, 0\n\t.p2align 3,,7\n.L6:\n\tadd\tw3, w3, w3, lsl 2\n\tadd\tw3, w5, w3, lsl 1\n\tldrb\tw5, [x1, 1]!\n\tsub\tw3, w3, #48\n\tcmp\tw5, 46\n\tccmp\tw5, 0, 4, ne\n\tbne\t.L6\n.L5:\n\tcmp\tw3, w2\n\tbne\t.L22\n\tcbnz\tw4, .L9\n.L24:\n\tcbz\tw5, .L15\n\tldrb\tw4, [x0]\n\tadd\tx1, x1, 1\n\tcmp\tw4, 46\n\tccmp\tw4, 0, 4, ne\n\tbne\t.L23\n.L3:\n\tldrb\tw5, [x1]\n\tmov\tw2, 0\n\tcmp\tw5, 46\n\tccmp\tw5, 0, 4, ne\n\tbne\t.L12\n\tcbz\tw4, .L24\n\t.p2align 3,,7\n.L9:\n\tcmp\tw5, 0\n\tadd\tx0, x0, 1\n\tcinc\tx1, x1, ne\n\tb\t.L2\n\t.p2align 2,,3\n.L15:\n\tmov\tw0, 0\n\tret\n\t.p2align 2,,3\n.L13:\n\tmov\tw3, 0\n\tb\t.L5\n.L22:\n\tmov\tw0, -1\n\tcsneg\tw0, w0, w0, 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
# 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": [ "\"eyvrypiuphulcnrwsymzmxva\"", "\"rjumitfuhhkmeiztc\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"vajejfd\"", "\"oqgatjxevbbn\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"rwgijpdrfzssyaem\"", "\"fqoh\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"qnvjbebiotxpfjvkeshbecd\"", "\"lpihycvyoztktoc\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"vorbnqeclbtiwrcqma\"", "\"sremxofyzooruvjdarvt\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"rsabwfigzjdsutuolmjeoknb\"", "\"pjpqxmljxzymwozldw\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"sgpsbafjswhjakxdfc\"", "\"nolrcp\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"k\"", "\"nkwgwatteuvjyxrzlhwgx\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"pjcwpto\"", "\"knlatnndkhwllqb\"" ], "var": [ "version1", "version2" ] }, { "value": [ "\"zfdawcfjxldjdcysoe\"", "\"ylkmtxlwlvorg\"" ], "var": [ "version1", "version2" ] } ], "output": [ { "value": [ "1", "\"eyvrypiuphulcnrwsymzmxva\"", "\"rjumitfuhhkmeiztc\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "-1", "\"vajejfd\"", "\"oqgatjxevbbn\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "1", "\"rwgijpdrfzssyaem\"", "\"fqoh\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "-1", "\"qnvjbebiotxpfjvkeshbecd\"", "\"lpihycvyoztktoc\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "-1", "\"vorbnqeclbtiwrcqma\"", "\"sremxofyzooruvjdarvt\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "1", "\"rsabwfigzjdsutuolmjeoknb\"", "\"pjpqxmljxzymwozldw\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "-1", "\"sgpsbafjswhjakxdfc\"", "\"nolrcp\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "1", "\"k\"", "\"nkwgwatteuvjyxrzlhwgx\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "1", "\"pjcwpto\"", "\"knlatnndkhwllqb\"" ], "var": [ "returnv", "version1", "version2" ] }, { "value": [ "1", "\"zfdawcfjxldjdcysoe\"", "\"ylkmtxlwlvorg\"" ], "var": [ "returnv", "version1", "version2" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_6181wmsekn.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* version1, char* version2, int returnv) { json output_json; output_json["version1"] = version1; output_json["version2"] = version2; 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* version1 = strdup(input_json["version1"].get<std::string>().c_str()); char* version2 = strdup(input_json["version2"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = compareVersion(version1, version2); 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(version1, version2, returnv); }
master
null
{"livein": ["version1", "version2"], "liveout": ["version1", "version2"], "returnvarname": ["returnv"], "execcmd": "", "funname": "compareVersion", "funargs": ["version1", "version2"], "typemap": {"version1": "string", "version2": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_6181wmsekn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
feco93/Socket-Programming/server.c
int game_over (int figures[]) { if (figures[0] > 49 && figures[1] > 49) { return 1; } return 0; }
int game_over(int *figures)
int game_over (int figures[])
game_over
[ "int", "int *" ]
{ "code": [ ".globl game_over\n.type game_over, @function\ngame_over:\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\tmovl\t(%rax), %eax\n\tcmpl\t$49, %eax\n\tjle\t.L2\n\tmovq\t-8(%rbp), %rax\n\taddq\t$4, %rax\n\tmovl\t(%rax), %eax\n\tcmpl\t$49, %eax\n\tjle\t.L2\n\tmovl\t$1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t$0, %eax\n.L3:\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl game_over\n.type game_over, @function\ngame_over:\n.LFB37:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$49, (%rdi)\n\tjle\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$49, 4(%rdi)\n\tsetg\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl game_over\n.type game_over, @function\ngame_over:\n.LFB53:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tcmpl\t$49, (%rdi)\n\tjle\t.L1\n\txorl\t%eax, %eax\n\tcmpl\t$49, 4(%rdi)\n\tsetg\t%al\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global game_over\n.type game_over, %function\ngame_over:\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\tw0, [x0]\n\tcmp\tw0, 49\n\tble\t.L2\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 4\n\tldr\tw0, [x0]\n\tcmp\tw0, 49\n\tble\t.L2\n\tmov\tw0, 1\n\tb\t.L3\n.L2:\n\tmov\tw0, 0\n.L3:\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global game_over\n.type game_over, %function\ngame_over:\n.LFB37:\n\t.cfi_startproc\n\tldr\tw1, [x0]\n\tcmp\tw1, 49\n\tble\t.L3\n\tldr\tw0, [x0, 4]\n\tcmp\tw0, 49\n\tcset\tw0, gt\n.L1:\n\tret\n.L3:\n\tmov\tw0, 0\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global game_over\n.type game_over, %function\ngame_over:\n.LFB53:\n\t.cfi_startproc\n\tldr\tw1, [x0]\n\tcmp\tw1, 49\n\tble\t.L3\n\tldr\tw0, [x0, 4]\n\tcmp\tw0, 49\n\tcset\tw0, gt\n\tret\n\t.p2align 2,,3\n.L3:\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.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": [ "[112, 75, 41, 86, 28, 48, 111, 4, 72, 111, 51, 81, 108, 98, 81, 9, 63, 50, 107, 8, 126, 75, 126, 6, 14, 69, 51, 0, 68, 61, 19, 58]" ], "var": [ "figures" ] }, { "value": [ "[109, 111, 98, 99, 39, 111, 32, 31, 124, 1, 77, 16, 100, 126, 89, 17, 119, 115, 116, 77, 40, 103, 21, 83, 14, 113, 46, 11, 38, 22, 11, 53]" ], "var": [ "figures" ] }, { "value": [ "[62, 63, 54, 101, 90, 1, 89, 48, 58, 108, 54, 19, 34, 118, 29, 53, 43, 24, 67, 21, 109, 66, 77, 37, 88, 70, 36, 101, 40, 96, 98, 0]" ], "var": [ "figures" ] }, { "value": [ "[67, 67, 96, 68, 59, 117, 7, 38, 51, 34, 19, 61, 10, 14, 107, 59, 69, 89, 85, 42, 46, 98, 85, 23, 121, 29, 110, 89, 35, 63, 100, 72]" ], "var": [ "figures" ] }, { "value": [ "[40, 28, 107, 114, 101, 9, 57, 54, 37, 115, 101, 124, 59, 122, 122, 54, 121, 39, 85, 0, 7, 25, 30, 83, 106, 94, 62, 2, 119, 14, 115, 56]" ], "var": [ "figures" ] }, { "value": [ "[70, 76, 105, 101, 101, 80, 59, 97, 22, 21, 81, 117, 80, 35, 79, 57, 123, 58, 72, 11, 25, 7, 28, 49, 46, 28, 2, 100, 27, 22, 72, 16]" ], "var": [ "figures" ] }, { "value": [ "[121, 106, 63, 52, 23, 18, 18, 62, 73, 90, 66, 3, 14, 19, 100, 94, 64, 7, 54, 111, 39, 27, 41, 71, 53, 75, 94, 79, 97, 19, 4, 111]" ], "var": [ "figures" ] }, { "value": [ "[93, 108, 90, 111, 94, 75, 14, 75, 119, 91, 13, 59, 102, 69, 73, 22, 15, 54, 104, 57, 96, 42, 40, 116, 122, 99, 18, 101, 89, 13, 119, 71]" ], "var": [ "figures" ] }, { "value": [ "[52, 110, 80, 49, 99, 101, 31, 74, 103, 23, 13, 72, 92, 75, 21, 94, 74, 109, 77, 125, 48, 65, 60, 59, 74, 13, 25, 119, 123, 125, 113, 42]" ], "var": [ "figures" ] }, { "value": [ "[109, 49, 34, 52, 84, 83, 31, 122, 106, 6, 45, 63, 30, 118, 61, 48, 98, 92, 81, 83, 90, 22, 47, 118, 90, 24, 108, 86, 13, 55, 99, 108]" ], "var": [ "figures" ] } ], "output": [ { "value": [ "[112, 75, 41, 86, 28, 48, 111, 4, 72, 111, 51, 81, 108, 98, 81, 9, 63, 50, 107, 8, 126, 75, 126, 6, 14, 69, 51, 0, 68, 61, 19, 58]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[109, 111, 98, 99, 39, 111, 32, 31, 124, 1, 77, 16, 100, 126, 89, 17, 119, 115, 116, 77, 40, 103, 21, 83, 14, 113, 46, 11, 38, 22, 11, 53]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[62, 63, 54, 101, 90, 1, 89, 48, 58, 108, 54, 19, 34, 118, 29, 53, 43, 24, 67, 21, 109, 66, 77, 37, 88, 70, 36, 101, 40, 96, 98, 0]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[67, 67, 96, 68, 59, 117, 7, 38, 51, 34, 19, 61, 10, 14, 107, 59, 69, 89, 85, 42, 46, 98, 85, 23, 121, 29, 110, 89, 35, 63, 100, 72]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[40, 28, 107, 114, 101, 9, 57, 54, 37, 115, 101, 124, 59, 122, 122, 54, 121, 39, 85, 0, 7, 25, 30, 83, 106, 94, 62, 2, 119, 14, 115, 56]", "0" ], "var": [ "figures", "returnv" ] }, { "value": [ "[70, 76, 105, 101, 101, 80, 59, 97, 22, 21, 81, 117, 80, 35, 79, 57, 123, 58, 72, 11, 25, 7, 28, 49, 46, 28, 2, 100, 27, 22, 72, 16]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[121, 106, 63, 52, 23, 18, 18, 62, 73, 90, 66, 3, 14, 19, 100, 94, 64, 7, 54, 111, 39, 27, 41, 71, 53, 75, 94, 79, 97, 19, 4, 111]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[93, 108, 90, 111, 94, 75, 14, 75, 119, 91, 13, 59, 102, 69, 73, 22, 15, 54, 104, 57, 96, 42, 40, 116, 122, 99, 18, 101, 89, 13, 119, 71]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[52, 110, 80, 49, 99, 101, 31, 74, 103, 23, 13, 72, 92, 75, 21, 94, 74, 109, 77, 125, 48, 65, 60, 59, 74, 13, 25, 119, 123, 125, 113, 42]", "1" ], "var": [ "figures", "returnv" ] }, { "value": [ "[109, 49, 34, 52, 84, 83, 31, 122, 106, 6, 45, 63, 30, 118, 61, 48, 98, 92, 81, 83, 90, 22, 47, 118, 90, 24, 108, 86, 13, 55, 99, 108]", "0" ], "var": [ "figures", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_57eid6icwn.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* figures, int returnv) { json output_json; std::vector<json> output_temp_2; for (unsigned int i3 = 0; i3 < 32; i3++) { int output_temp_4 = figures[i3]; output_temp_2.push_back(output_temp_4); } output_json["figures"] = 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["figures"]) { int input_temp_1_inner = elem; input_temp_1_vec.push_back(input_temp_1_inner); } int* figures = &input_temp_1_vec[0]; clock_t begin = clock(); int returnv = game_over(figures); 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(figures, returnv); }
master
null
{"livein": ["figures"], "liveout": ["figures"], "returnvarname": ["returnv"], "execcmd": "", "funname": "game_over", "funargs": ["figures"], "typemap": {"figures": "array(int32#32)", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_57eid6icwn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Garbaz/netlib/netlib.h
int tsend(int targetfd, char* bytes, int bytes_size) { int bytes_sent = 0; do { bytes_sent = send(targetfd, bytes, bytes_size, 0); if(bytes_sent == -1) return -1; }while(bytes_sent < bytes_size); return 0; }
int tsend(inttargetfd, char *bytes, intbytes_size)
int tsend(int targetfd, char* bytes, int bytes_size)
tsend
[ "int", "int", "char *", "int" ]
{ "code": [ ".globl tsend\n.type tsend, @function\ntsend:\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\tmovq\t%rsi, -32(%rbp)\n\tmovl\t%edx, -24(%rbp)\n\tmovl\t$0, -4(%rbp)\n.L4:\n\tmovl\t-24(%rbp), %edx\n\tmovq\t-32(%rbp), %rsi\n\tmovl\t-20(%rbp), %eax\n\tmovl\t$0, %ecx\n\tmovl\t%eax, %edi\n\tcall\tsend@PLT\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$-1, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjl\t.L4\n\tmovl\t$0, %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl tsend\n.type tsend, @function\ntsend:\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$32, %rsp\n\tmovl\t%edi, -20(%rbp)\n\tmovq\t%rsi, -32(%rbp)\n\tmovl\t%edx, -24(%rbp)\n\tmovl\t$0, -4(%rbp)\n.L4:\n\tmovl\t-24(%rbp), %eax\n\tmovslq\t%eax, %rdx\n\tmovq\t-32(%rbp), %rsi\n\tmovl\t-20(%rbp), %eax\n\tmovl\t$0, %ecx\n\tmovl\t%eax, %edi\n\tcall\tsend@PLT\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$-1, -4(%rbp)\n\tjne\t.L2\n\tmovl\t$-1, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-4(%rbp), %eax\n\tcmpl\t-24(%rbp), %eax\n\tjl\t.L4\n\tmovl\t$0, %eax\n.L3:\n\tleave\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl tsend\n.type tsend, @function\ntsend:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tmovq\t%rsi, %r12\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 6, -24\n\tmovl\t%edi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 3, -32\n\tmovl\t%edx, %ebx\n.L3:\n\txorl\t%ecx, %ecx\n\tmovl\t%ebx, %edx\n\tmovq\t%r12, %rsi\n\tmovl\t%ebp, %edi\n\tcall\tsend@PLT\n\tcmpl\t$-1, %eax\n\tje\t.L1\n\tcmpl\t%eax, %ebx\n\tjg\t.L3\n\txorl\t%eax, %eax\n.L1:\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 24\n\tpopq\t%rbp\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 tsend\n.type tsend, @function\ntsend:\n.LFB30:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tmovslq\t%edx, %r13\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tmovq\t%rsi, %r12\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 6, -32\n\tmovl\t%edi, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tmovq\t%r13, %rbx\n\tpushq\t%rcx\n\t.cfi_def_cfa_offset 48\n.L3:\n\txorl\t%ecx, %ecx\n\tmovq\t%r13, %rdx\n\tmovq\t%r12, %rsi\n\tmovl\t%ebp, %edi\n\tcall\tsend@PLT\n\tmovl\t%eax, %r8d\n\tcmpl\t$-1, %eax\n\tje\t.L1\n\tcmpl\t%eax, %ebx\n\tjg\t.L3\n\txorl\t%r8d, %r8d\n.L1:\n\tpopq\t%rdx\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r8d, %eax\n\tpopq\t%rbx\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.cfi_endproc\n\n", ".globl tsend\n.type tsend, @function\ntsend:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 12, -16\n\tmovl\t%edi, %r12d\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 6, -24\n\tmovq\t%rsi, %rbp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 3, -32\n\tmovl\t%edx, %ebx\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L11:\n\tcmpl\t%eax, %ebx\n\tjle\t.L10\n.L3:\n\txorl\t%ecx, %ecx\n\tmovl\t%ebx, %edx\n\tmovq\t%rbp, %rsi\n\tmovl\t%r12d, %edi\n\tcall\tsend@PLT\n\tcmpl\t$-1, %eax\n\tjne\t.L11\n\tpopq\t%rbx\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 24\n\tpopq\t%rbp\n\t.cfi_def_cfa_offset 16\n\tpopq\t%r12\n\t.cfi_def_cfa_offset 8\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\t.cfi_restore_state\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 24\n\txorl\t%eax, %eax\n\tpopq\t%rbp\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 tsend\n.type tsend, @function\ntsend:\n.LFB31:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tmovslq\t%edx, %r13\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tmovl\t%edi, %r12d\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 6, -32\n\tmovq\t%rsi, %rbp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tmovq\t%r13, %rbx\n\tsubq\t$8, %rsp\n\t.cfi_def_cfa_offset 48\n\tjmp\t.L3\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tcmpl\t%eax, %ebx\n\tjle\t.L7\n.L3:\n\txorl\t%ecx, %ecx\n\tmovq\t%r13, %rdx\n\tmovq\t%rbp, %rsi\n\tmovl\t%r12d, %edi\n\tcall\tsend@PLT\n\tmovl\t%eax, %r8d\n\tcmpl\t$-1, %eax\n\tjne\t.L8\n\taddq\t$8, %rsp\n\t.cfi_remember_state\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r8d, %eax\n\tpopq\t%rbx\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.L7:\n\t.cfi_restore_state\n\taddq\t$8, %rsp\n\t.cfi_def_cfa_offset 40\n\txorl\t%r8d, %r8d\n\tpopq\t%rbx\n\t.cfi_def_cfa_offset 32\n\tmovl\t%r8d, %eax\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.cfi_endproc\n\n", ".global tsend\n.type tsend, %function\ntsend:\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\tx1, [sp, 16]\n\tstr\tw2, [sp, 24]\n\tstr\twzr, [sp, 44]\n.L4:\n\tmov\tw3, 0\n\tldr\tw2, [sp, 24]\n\tldr\tx1, [sp, 16]\n\tldr\tw0, [sp, 28]\n\tbl\tsend\n\tstr\tw0, [sp, 44]\n\tldr\tw0, [sp, 44]\n\tcmn\tw0, #1\n\tbne\t.L2\n\tmov\tw0, -1\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 44]\n\tldr\tw0, [sp, 24]\n\tcmp\tw1, w0\n\tblt\t.L4\n\tmov\tw0, 0\n.L3:\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 tsend\n.type tsend, %function\ntsend:\n.LFB6:\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\tx1, [sp, 16]\n\tstr\tw2, [sp, 24]\n\tstr\twzr, [sp, 44]\n.L4:\n\tldrsw\tx0, [sp, 24]\n\tmov\tw3, 0\n\tmov\tx2, x0\n\tldr\tx1, [sp, 16]\n\tldr\tw0, [sp, 28]\n\tbl\tsend\n\tstr\tw0, [sp, 44]\n\tldr\tw0, [sp, 44]\n\tcmn\tw0, #1\n\tbne\t.L2\n\tmov\tw0, -1\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 44]\n\tldr\tw0, [sp, 24]\n\tcmp\tw1, w0\n\tblt\t.L4\n\tmov\tw0, 0\n.L3:\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 tsend\n.type tsend, %function\ntsend:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw20, w0\n\tmov\tw19, w2\n\tstr\tx21, [sp, 32]\n\t.cfi_offset 21, -16\n\tmov\tx21, x1\n.L3:\n\tmov\tw2, w19\n\tmov\tx1, x21\n\tmov\tw0, w20\n\tmov\tw3, 0\n\tbl\tsend\n\tcmn\tw0, #1\n\tbeq\t.L1\n\tcmp\tw19, w0\n\tbgt\t.L3\n\tmov\tw0, 0\n.L1:\n\tldp\tx19, x20, [sp, 16]\n\tldr\tx21, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global tsend\n.type tsend, %function\ntsend:\n.LFB30:\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\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tsxtw\tx22, w2\n\tmov\tx21, x1\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw20, w0\n\tmov\tx19, x22\n.L3:\n\tmov\tx2, x22\n\tmov\tx1, x21\n\tmov\tw0, w20\n\tmov\tw3, 0\n\tbl\tsend\n\tcmn\tw0, #1\n\tbeq\t.L1\n\tcmp\tw19, w0\n\tbgt\t.L3\n\tmov\tw0, 0\n.L1:\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global tsend\n.type tsend, %function\ntsend:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tx20, x1\n\tmov\tw19, w2\n\tstr\tx21, [sp, 32]\n\t.cfi_offset 21, -16\n\tmov\tw21, w0\n\tb\t.L3\n\t.p2align 2,,3\n.L11:\n\tcmp\tw19, w0\n\tble\t.L10\n.L3:\n\tmov\tw2, w19\n\tmov\tx1, x20\n\tmov\tw0, w21\n\tmov\tw3, 0\n\tbl\tsend\n\tcmn\tw0, #1\n\tbne\t.L11\n\tldp\tx19, x20, [sp, 16]\n\tldr\tx21, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.p2align 2,,3\n.L10:\n\t.cfi_restore_state\n\tmov\tw0, 0\n\tldp\tx19, x20, [sp, 16]\n\tldr\tx21, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global tsend\n.type tsend, %function\ntsend:\n.LFB31:\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\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tsxtw\tx22, w2\n\tmov\tw21, w0\n\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tx19, x22\n\tmov\tx20, x1\n\tb\t.L3\n\t.p2align 2,,3\n.L8:\n\tcmp\tw19, w0\n\tble\t.L7\n.L3:\n\tmov\tx1, x20\n\tmov\tx2, x22\n\tmov\tw0, w21\n\tmov\tw3, 0\n\tbl\tsend\n\tcmn\tw0, #1\n\tmov\tw1, w0\n\tbne\t.L8\n\tmov\tw0, w1\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_remember_state\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.p2align 2,,3\n.L7:\n\t.cfi_restore_state\n\tmov\tw1, 0\n\tmov\tw0, w1\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n" ], "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 send (int,char*,int,int /*<<< orphan*/ ) ;
#include <sys/types.h> #include <sys/socket.h> #include <sys/time.h> #include <unistd.h> #include <netdb.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": [ "109", "\"ufuty\"", "111" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "20", "\"\"", "37" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "121", "\"fkgbdrzxyu\"", "98" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "31", "\"cttvyawv\"", "16" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "27", "\"dyjedoouryrogzr\"", "95" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "25", "\"wf\"", "86" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "98", "\"ahgtkahexntypbgwathbhwjbv\"", "74" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "105", "\"eyyosaohvpg\"", "56" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "110", "\"ahax\"", "32" ], "var": [ "targetfd", "bytes", "bytes_size" ] }, { "value": [ "7", "\"linwpzmopo\"", "40" ], "var": [ "targetfd", "bytes", "bytes_size" ] } ], "output": [ { "value": [ "\"ufuty\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"fkgbdrzxyu\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"cttvyawv\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"dyjedoouryrogzr\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"wf\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"ahgtkahexntypbgwathbhwjbv\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"eyyosaohvpg\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"ahax\"", "-1" ], "var": [ "bytes", "returnv" ] }, { "value": [ "\"linwpzmopo\"", "-1" ], "var": [ "bytes", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41op87np_4.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 targetfd, char* bytes, int bytes_size, int returnv) { json output_json; output_json["bytes"] = bytes; 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 targetfd = input_json["targetfd"]; char* bytes = strdup(input_json["bytes"].get<std::string>().c_str()); int bytes_size = input_json["bytes_size"]; clock_t begin = clock(); int returnv = tsend(targetfd, bytes, bytes_size); 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(targetfd, bytes, bytes_size, returnv); }
master
null
{"livein": ["targetfd", "bytes", "bytes_size"], "liveout": ["bytes"], "returnvarname": ["returnv"], "execcmd": "", "funname": "tsend", "funargs": ["targetfd", "bytes", "bytes_size"], "typemap": {"targetfd": "int32", "bytes": "string", "bytes_size": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41op87np_4.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
221V/kphp-kdb/common/listcomp.c
int get_subtree_array_size (int u, int v, int left_subtree_size_threshold) { if (v - u < left_subtree_size_threshold) { return 0; } int m = (u + v) >> 1; return 1 + get_subtree_array_size (u, m, left_subtree_size_threshold) + get_subtree_array_size (m, v, left_subtree_size_threshold); }
int get_subtree_array_size(intu, intv, intleft_subtree_size_threshold)
int get_subtree_array_size (int u, int v, int left_subtree_size_threshold)
get_subtree_array_size
[ "int", "int", "int", "int" ]
{ "code": [ ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tpushq\t%rbx\n\tsubq\t$40, %rsp\n\t.cfi_offset 3, -24\n\tmovl\t%edi, -36(%rbp)\n\tmovl\t%esi, -40(%rbp)\n\tmovl\t%edx, -44(%rbp)\n\tmovl\t-40(%rbp), %eax\n\tsubl\t-36(%rbp), %eax\n\tcmpl\t%eax, -44(%rbp)\n\tjle\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-36(%rbp), %edx\n\tmovl\t-40(%rbp), %eax\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-44(%rbp), %edx\n\tmovl\t-20(%rbp), %ecx\n\tmovl\t-36(%rbp), %eax\n\tmovl\t%ecx, %esi\n\tmovl\t%eax, %edi\n\tcall\tget_subtree_array_size\n\tleal\t1(%rax), %ebx\n\tmovl\t-44(%rbp), %edx\n\tmovl\t-40(%rbp), %ecx\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%ecx, %esi\n\tmovl\t%eax, %edi\n\tcall\tget_subtree_array_size\n\taddl\t%ebx, %eax\n.L3:\n\taddq\t$40, %rsp\n\tpopq\t%rbx\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\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\tpushq\t%rbx\n\tsubq\t$40, %rsp\n\t.cfi_offset 3, -24\n\tmovl\t%edi, -36(%rbp)\n\tmovl\t%esi, -40(%rbp)\n\tmovl\t%edx, -44(%rbp)\n\tmovl\t-40(%rbp), %eax\n\tsubl\t-36(%rbp), %eax\n\tcmpl\t%eax, -44(%rbp)\n\tjle\t.L2\n\tmovl\t$0, %eax\n\tjmp\t.L3\n.L2:\n\tmovl\t-36(%rbp), %edx\n\tmovl\t-40(%rbp), %eax\n\taddl\t%edx, %eax\n\tsarl\t%eax\n\tmovl\t%eax, -20(%rbp)\n\tmovl\t-44(%rbp), %edx\n\tmovl\t-20(%rbp), %ecx\n\tmovl\t-36(%rbp), %eax\n\tmovl\t%ecx, %esi\n\tmovl\t%eax, %edi\n\tcall\tget_subtree_array_size\n\tleal\t1(%rax), %ebx\n\tmovl\t-44(%rbp), %edx\n\tmovl\t-40(%rbp), %ecx\n\tmovl\t-20(%rbp), %eax\n\tmovl\t%ecx, %esi\n\tmovl\t%eax, %edi\n\tcall\tget_subtree_array_size\n\taddl\t%ebx, %eax\n.L3:\n\taddq\t$40, %rsp\n\tpopq\t%rbx\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\txorl\t%r13d, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tmovl\t%esi, %r12d\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 6, -32\n\tmovl\t%edx, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tpushq\t%rcx\n\t.cfi_def_cfa_offset 48\n.L3:\n\tmovl\t%r12d, %eax\n\tsubl\t%edi, %eax\n\tcmpl\t%ebp, %eax\n\tjl\t.L4\n\tleal\t(%rdi,%r12), %ebx\n\tmovl\t%ebp, %edx\n\tsarl\t%ebx\n\tmovl\t%ebx, %esi\n\tcall\tget_subtree_array_size\n\tmovl\t%ebx, %edi\n\tleal\t1(%r13,%rax), %r13d\n\tjmp\t.L3\n.L4:\n\tpopq\t%rdx\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r13d, %eax\n\tpopq\t%rbx\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.cfi_endproc\n\n", ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\txorl\t%r13d, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tmovl\t%esi, %r12d\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 32\n\t.cfi_offset 6, -32\n\tmovl\t%edx, %ebp\n\tpushq\t%rbx\n\t.cfi_def_cfa_offset 40\n\t.cfi_offset 3, -40\n\tpushq\t%rcx\n\t.cfi_def_cfa_offset 48\n.L3:\n\tmovl\t%r12d, %eax\n\tsubl\t%edi, %eax\n\tcmpl\t%ebp, %eax\n\tjl\t.L4\n\tleal\t(%rdi,%r12), %ebx\n\tmovl\t%ebp, %edx\n\tsarl\t%ebx\n\tmovl\t%ebx, %esi\n\tcall\tget_subtree_array_size\n\tmovl\t%ebx, %edi\n\tleal\t1(%r13,%rax), %r13d\n\tjmp\t.L3\n.L4:\n\tpopq\t%rdx\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r13d, %eax\n\tpopq\t%rbx\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.cfi_endproc\n\n", ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tmovl\t%esi, %eax\n\txorl\t%r13d, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tsubl\t%edi, %eax\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\tsubq\t$8, %rsp\n\t.cfi_def_cfa_offset 48\n\tcmpl\t%eax, %edx\n\tjg\t.L1\n\tmovl\t%edi, %ebx\n\tmovl\t%esi, %r12d\n\tmovl\t%edx, %ebp\n.L2:\n\tmovl\t%ebx, %edi\n\tleal\t(%r12,%rbx), %ebx\n\tmovl\t%ebp, %edx\n\tsarl\t%ebx\n\tmovl\t%ebx, %esi\n\tcall\tget_subtree_array_size\n\tleal\t1(%r13,%rax), %r13d\n\tmovl\t%r12d, %eax\n\tsubl\t%ebx, %eax\n\tcmpl\t%ebp, %eax\n\tjge\t.L2\n.L1:\n\taddq\t$8, %rsp\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r13d, %eax\n\tpopq\t%rbx\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.cfi_endproc\n\n", ".globl get_subtree_array_size\n.type get_subtree_array_size, @function\nget_subtree_array_size:\n.LFB27:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%r13\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 13, -16\n\tmovl\t%esi, %eax\n\txorl\t%r13d, %r13d\n\tpushq\t%r12\n\t.cfi_def_cfa_offset 24\n\t.cfi_offset 12, -24\n\tsubl\t%edi, %eax\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\tsubq\t$8, %rsp\n\t.cfi_def_cfa_offset 48\n\tcmpl\t%eax, %edx\n\tjg\t.L1\n\tmovl\t%edi, %ebx\n\tmovl\t%esi, %r12d\n\tmovl\t%edx, %ebp\n.L2:\n\tmovl\t%ebx, %edi\n\tleal\t(%r12,%rbx), %ebx\n\tmovl\t%ebp, %edx\n\tsarl\t%ebx\n\tmovl\t%ebx, %esi\n\tcall\tget_subtree_array_size\n\tleal\t1(%r13,%rax), %r13d\n\tmovl\t%r12d, %eax\n\tsubl\t%ebx, %eax\n\tcmpl\t%ebp, %eax\n\tjge\t.L2\n.L1:\n\taddq\t$8, %rsp\n\t.cfi_def_cfa_offset 40\n\tmovl\t%r13d, %eax\n\tpopq\t%rbx\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.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\n.LFB0:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -48\n\tstr\tw0, [sp, 44]\n\tstr\tw1, [sp, 40]\n\tstr\tw2, [sp, 36]\n\tldr\tw1, [sp, 40]\n\tldr\tw0, [sp, 44]\n\tsub\tw0, w1, w0\n\tldr\tw1, [sp, 36]\n\tcmp\tw1, w0\n\tble\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 44]\n\tldr\tw0, [sp, 40]\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tstr\tw0, [sp, 60]\n\tldr\tw2, [sp, 36]\n\tldr\tw1, [sp, 60]\n\tldr\tw0, [sp, 44]\n\tbl\tget_subtree_array_size\n\tadd\tw19, w0, 1\n\tldr\tw2, [sp, 36]\n\tldr\tw1, [sp, 40]\n\tldr\tw0, [sp, 60]\n\tbl\tget_subtree_array_size\n\tadd\tw0, w19, w0\n.L3:\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\n.LFB6:\n\t.cfi_startproc\n\tstp\tx29, x30, [sp, -64]!\n\t.cfi_def_cfa_offset 64\n\t.cfi_offset 29, -64\n\t.cfi_offset 30, -56\n\tmov\tx29, sp\n\tstr\tx19, [sp, 16]\n\t.cfi_offset 19, -48\n\tstr\tw0, [sp, 44]\n\tstr\tw1, [sp, 40]\n\tstr\tw2, [sp, 36]\n\tldr\tw1, [sp, 40]\n\tldr\tw0, [sp, 44]\n\tsub\tw0, w1, w0\n\tldr\tw1, [sp, 36]\n\tcmp\tw1, w0\n\tble\t.L2\n\tmov\tw0, 0\n\tb\t.L3\n.L2:\n\tldr\tw1, [sp, 44]\n\tldr\tw0, [sp, 40]\n\tadd\tw0, w1, w0\n\tasr\tw0, w0, 1\n\tstr\tw0, [sp, 60]\n\tldr\tw2, [sp, 36]\n\tldr\tw1, [sp, 60]\n\tldr\tw0, [sp, 44]\n\tbl\tget_subtree_array_size\n\tadd\tw19, w0, 1\n\tldr\tw2, [sp, 36]\n\tldr\tw1, [sp, 40]\n\tldr\tw0, [sp, 60]\n\tbl\tget_subtree_array_size\n\tadd\tw0, w19, w0\n.L3:\n\tldr\tx19, [sp, 16]\n\tldp\tx29, x30, [sp], 64\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 19\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw20, w2\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tmov\tw21, w1\n\tmov\tw22, 0\n.L3:\n\tsub\tw1, w21, w0\n\tcmp\tw1, w20\n\tblt\t.L4\n\tadd\tw19, w0, w21\n\tmov\tw2, w20\n\tasr\tw19, w19, 1\n\tmov\tw1, w19\n\tbl\tget_subtree_array_size\n\tadd\tw0, w0, 1\n\tadd\tw22, w22, w0\n\tmov\tw0, w19\n\tb\t.L3\n.L4:\n\tmov\tw0, w22\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\n.LFB22:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw20, w2\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tmov\tw21, w1\n\tmov\tw22, 0\n.L3:\n\tsub\tw1, w21, w0\n\tcmp\tw1, w20\n\tblt\t.L4\n\tadd\tw19, w0, w21\n\tmov\tw2, w20\n\tasr\tw19, w19, 1\n\tmov\tw1, w19\n\tbl\tget_subtree_array_size\n\tadd\tw0, w0, 1\n\tadd\tw22, w22, w0\n\tmov\tw0, w19\n\tb\t.L3\n.L4:\n\tmov\tw0, w22\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw19, w0\n\tsub\tw0, w1, w0\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tcmp\tw2, w0\n\tmov\tw22, 0\n\tbgt\t.L1\n\tmov\tw21, w1\n\tmov\tw20, w2\n.L2:\n\tadd\tw1, w21, w19\n\tmov\tw0, w19\n\tmov\tw2, w20\n\tasr\tw19, w1, 1\n\tmov\tw1, w19\n\tbl\tget_subtree_array_size\n\tsub\tw1, w21, w19\n\tadd\tw0, w0, 1\n\tcmp\tw1, w20\n\tadd\tw22, w22, w0\n\tbge\t.L2\n.L1:\n\tmov\tw0, w22\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global get_subtree_array_size\n.type get_subtree_array_size, %function\nget_subtree_array_size:\n.LFB27:\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\tstp\tx19, x20, [sp, 16]\n\t.cfi_offset 19, -32\n\t.cfi_offset 20, -24\n\tmov\tw19, w0\n\tsub\tw0, w1, w0\n\tstp\tx21, x22, [sp, 32]\n\t.cfi_offset 21, -16\n\t.cfi_offset 22, -8\n\tcmp\tw2, w0\n\tmov\tw22, 0\n\tbgt\t.L1\n\tmov\tw21, w1\n\tmov\tw20, w2\n.L2:\n\tadd\tw1, w21, w19\n\tmov\tw0, w19\n\tmov\tw2, w20\n\tasr\tw19, w1, 1\n\tmov\tw1, w19\n\tbl\tget_subtree_array_size\n\tsub\tw1, w21, w19\n\tadd\tw0, w0, 1\n\tcmp\tw1, w20\n\tadd\tw22, w22, w0\n\tbge\t.L2\n.L1:\n\tmov\tw0, w22\n\tldp\tx19, x20, [sp, 16]\n\tldp\tx21, x22, [sp, 32]\n\tldp\tx29, x30, [sp], 48\n\t.cfi_restore 30\n\t.cfi_restore 29\n\t.cfi_restore 21\n\t.cfi_restore 22\n\t.cfi_restore 19\n\t.cfi_restore 20\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n" ], "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 <stdlib.h> #include <string.h> #include <assert.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": [ "13", "56", "73" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "121", "77", "68" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "66", "74", "59" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "119", "124", "37" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "120", "60", "58" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "101", "80", "62" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "40", "30", "81" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "41", "19", "80" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "78", "124", "48" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "99", "121", "31" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "13", "56", "73" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "121", "77", "68" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "66", "74", "59" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "119", "124", "37" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "120", "60", "58" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "101", "80", "62" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "40", "30", "81" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "41", "19", "80" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "78", "124", "48" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "99", "121", "31" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "13", "56", "73" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "121", "77", "68" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "66", "74", "59" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "119", "124", "37" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "120", "60", "58" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "101", "80", "62" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "40", "30", "81" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "41", "19", "80" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "78", "124", "48" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "99", "121", "31" ], "var": [ "u", "v", "left_subtree_size_threshold" ] } ], "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" ] }, { "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" ] }, { "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" ] } ] }
{ "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", "56", "73" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "121", "77", "68" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "66", "74", "59" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "119", "124", "37" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "120", "60", "58" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "101", "80", "62" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "40", "30", "81" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "41", "19", "80" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "78", "124", "48" ], "var": [ "u", "v", "left_subtree_size_threshold" ] }, { "value": [ "99", "121", "31" ], "var": [ "u", "v", "left_subtree_size_threshold" ] } ], "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" ] } ] }
extern "C" { #include "/run/user/1000/pytmpfile_jordiws_3577736slb4zv3v.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 u, int v, int left_subtree_size_threshold, 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 u = input_json["u"]; int v = input_json["v"]; int left_subtree_size_threshold = input_json["left_subtree_size_threshold"]; clock_t begin = clock(); int returnv = get_subtree_array_size(u, v, left_subtree_size_threshold); 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(u, v, left_subtree_size_threshold, returnv); }
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_31ybrgv1x7.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 u, int v, int left_subtree_size_threshold, 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 u = input_json["u"]; int v = input_json["v"]; int left_subtree_size_threshold = input_json["left_subtree_size_threshold"]; clock_t begin = clock(); int returnv = get_subtree_array_size(u, v, left_subtree_size_threshold); 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(u, v, left_subtree_size_threshold, returnv); }
master
null
{"livein": ["u", "v", "left_subtree_size_threshold"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "get_subtree_array_size", "funargs": ["u", "v", "left_subtree_size_threshold"], "typemap": {"u": "int32", "v": "int32", "left_subtree_size_threshold": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_31ybrgv1x7.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
Gurgel100/gcc/gcc/testsuite/gcc.c-torture/execute/conversion.c
int fnear (float x, float y) { float t = x - y; return t == 0 || x / t > 1000000.0; }
int fnear(floatx, floaty)
int fnear (float x, float y)
fnear
[ "int", "float", "float" ]
{ "code": [ ".globl fnear\n.type fnear, @function\nfnear:\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%xmm1, -24(%rbp)\n\tmovss\t-20(%rbp), %xmm0\n\tsubss\t-24(%rbp), %xmm0\n\tmovss\t%xmm0, -4(%rbp)\n\tpxor\t%xmm0, %xmm0\n\tucomiss\t-4(%rbp), %xmm0\n\tjp\t.L8\n\tpxor\t%xmm0, %xmm0\n\tucomiss\t-4(%rbp), %xmm0\n\tje\t.L2\n.L8:\n\tmovss\t-20(%rbp), %xmm0\n\tdivss\t-4(%rbp), %xmm0\n\tcomiss\t.LC1(%rip), %xmm0\n\tjbe\t.L9\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L7\n.L9:\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.LC1: \t.long\t1232348160\n", ".globl fnear\n.type fnear, @function\nfnear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovaps\t%xmm0, %xmm3\n\txorps\t%xmm2, %xmm2\n\tsubss\t%xmm1, %xmm3\n\tucomiss\t%xmm2, %xmm3\n\tmovaps\t%xmm3, %xmm1\n\tjp\t.L5\n\tmovl\t$1, %eax\n\tje\t.L1\n.L5:\n\tdivss\t%xmm1, %xmm0\n\txorl\t%eax, %eax\n\tcomiss\t.LC1(%rip), %xmm0\n\tseta\t%al\n.L1:\n\tret\n\t.cfi_endproc\n.LC1: \t.long\t1232348160\n", ".globl fnear\n.type fnear, @function\nfnear:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovaps\t%xmm0, %xmm2\n\tsubss\t%xmm1, %xmm2\n\tucomiss\t.LC0(%rip), %xmm2\n\tmovaps\t%xmm2, %xmm1\n\tjp\t.L5\n\tjne\t.L5\n\tmovl\t$1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tdivss\t%xmm1, %xmm0\n\txorl\t%eax, %eax\n\tcomiss\t.LC1(%rip), %xmm0\n\tseta\t%al\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n.LC1: \t.long\t1232348160\n", ".global fnear\n.type fnear, %function\nfnear:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\ts0, [sp, 12]\n\tstr\ts1, [sp, 8]\n\tldr\ts1, [sp, 12]\n\tldr\ts0, [sp, 8]\n\tfsub\ts0, s1, s0\n\tstr\ts0, [sp, 28]\n\tldr\ts0, [sp, 28]\n\tfcmp\ts0, #0.0\n\tbeq\t.L2\n\tldr\ts0, [sp, 28]\n\tldr\ts1, [sp, 12]\n\tfdiv\ts0, s1, s0\n\tmov\tw0, 9216\n\tmovk\tw0, 0x4974, lsl 16\n\tfmov\ts1, w0\n\tfcmpe\ts0, s1\n\tble\t.L7\n.L2:\n\tmov\tw0, 1\n\tb\t.L6\n.L7:\n\tmov\tw0, 0\n.L6:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global fnear\n.type fnear, %function\nfnear:\n.LFB0:\n\t.cfi_startproc\n\tfsub\ts1, s0, s1\n\tfcmp\ts1, #0.0\n\tbeq\t.L3\n\tfdiv\ts0, s0, s1\n\tmov\tw0, 9216\n\tmovk\tw0, 0x4974, lsl 16\n\tfmov\ts1, w0\n\tfcmpe\ts0, s1\n\tcset\tw0, gt\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global fnear\n.type fnear, %function\nfnear:\n.LFB0:\n\t.cfi_startproc\n\tfsub\ts1, s0, s1\n\tmov\tw0, 1\n\tfcmp\ts1, #0.0\n\tbeq\t.L1\n\tfdiv\ts0, s0, s1\n\tmov\tw0, 9216\n\tmovk\tw0, 0x4974, lsl 16\n\tfmov\ts1, w0\n\tfcmpe\ts0, s1\n\tcset\tw0, gt\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": [ "14.3272828922", "52.8220508356" ], "var": [ "x", "y" ] }, { "value": [ "28.0381811244", "84.2057022532" ], "var": [ "x", "y" ] }, { "value": [ "60.4451483055", "76.5971976606" ], "var": [ "x", "y" ] }, { "value": [ "33.4746643325", "62.0374216212" ], "var": [ "x", "y" ] }, { "value": [ "13.2293097652", "51.7773648983" ], "var": [ "x", "y" ] }, { "value": [ "34.8744268205", "96.1626190227" ], "var": [ "x", "y" ] }, { "value": [ "76.6659876443", "82.8499810852" ], "var": [ "x", "y" ] }, { "value": [ "32.1956809536", "19.6024049383" ], "var": [ "x", "y" ] }, { "value": [ "83.3500179283", "90.2221059646" ], "var": [ "x", "y" ] }, { "value": [ "63.1536252331", "6.33099491294" ], "var": [ "x", "y" ] } ], "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_32y40_wr5d.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 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); float x = input_json["x"]; float y = input_json["y"]; clock_t begin = clock(); int returnv = fnear(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); }
apple-llvmgcc42_Embedded
null
{"livein": ["x", "y"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "fnear", "funargs": ["x", "y"], "typemap": {"x": "float32", "y": "float32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_32y40_wr5d.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
turboscrew/rpi_stub/util.c
int util_hex_to_nib(char ch) { int val; switch (ch) { case 'a': case 'A': val = 10; break; case 'b': case 'B': val = 11; break; case 'c': case 'C': val = 12; break; case 'd': case 'D': val = 13; break; case 'e': case 'E': val = 14; break; case 'f': case 'F': val = 15; break; default: val = (int)ch - (int)'0'; if ((val < 0) || (val > 9)) { val = -1; } break; } return val; }
int util_hex_to_nib(charch)
int util_hex_to_nib(char ch)
util_hex_to_nib
[ "int", "char" ]
{ "code": [ ".globl util_hex_to_nib\n.type util_hex_to_nib, @function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -20(%rbp)\n\tmovsbl\t-20(%rbp), %eax\n\tsubl\t$65, %eax\n\tcmpl\t$37, %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.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L9-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n.L9:\n\tmovl\t$10, -4(%rbp)\n\tjmp\t.L10\n.L8:\n\tmovl\t$11, -4(%rbp)\n\tjmp\t.L10\n.L7:\n\tmovl\t$12, -4(%rbp)\n\tjmp\t.L10\n.L6:\n\tmovl\t$13, -4(%rbp)\n\tjmp\t.L10\n.L5:\n\tmovl\t$14, -4(%rbp)\n\tjmp\t.L10\n.L3:\n\tmovl\t$15, -4(%rbp)\n\tjmp\t.L10\n.L2:\n\tmovsbl\t-20(%rbp), %eax\n\tsubl\t$48, %eax\n\tmovl\t%eax, -4(%rbp)\n\tcmpl\t$0, -4(%rbp)\n\tjs\t.L11\n\tcmpl\t$9, -4(%rbp)\n\tjle\t.L14\n.L11:\n\tmovl\t$-1, -4(%rbp)\n.L14:\n\tnop\n.L10:\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 util_hex_to_nib\n.type util_hex_to_nib, @function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tcmpb\t$70, %dil\n\tjg\t.L2\n\tcmpb\t$64, %dil\n\tjle\t.L4\n\tsubl\t$66, %edi\n\tmovl\t$10, %eax\n\tcmpb\t$4, %dil\n\tja\t.L1\n\tleaq\t.L13(%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.L13:\n\t.long\t.L17-.L13\n\t.long\t.L9-.L13\n\t.long\t.L8-.L13\n\t.long\t.L7-.L13\n\t.long\t.L20-.L13\n\t.text\n.L17:\n\tmovl\t$11, %eax\n\tret\n.L2:\n\tleal\t-97(%rdi), %eax\n\tcmpb\t$5, %al\n\tja\t.L4\n\tleaq\t.L6(%rip), %rdx\n\tmovzbl\t%al, %eax\n\tmovslq\t(%rdx,%rax,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.L6:\n\t.long\t.L19-.L6\n\t.long\t.L17-.L6\n\t.long\t.L9-.L6\n\t.long\t.L8-.L6\n\t.long\t.L7-.L6\n\t.long\t.L20-.L6\n\t.text\n.L9:\n\tmovl\t$12, %eax\n\tret\n.L8:\n\tmovl\t$13, %eax\n\tret\n.L7:\n\tmovl\t$14, %eax\n\tret\n.L4:\n\tmovsbl\t%dil, %eax\n\tsubl\t$48, %eax\n\tcmpl\t$9, %eax\n\tjbe\t.L1\n\torl\t$-1, %eax\n\tret\n.L19:\n\tmovl\t$10, %eax\n\tret\n.L20:\n\tmovl\t$15, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl util_hex_to_nib\n.type util_hex_to_nib, @function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tleal\t-65(%rdi), %eax\n\tcmpb\t$37, %al\n\tja\t.L2\n\tleaq\t.L4(%rip), %rdx\n\tmovzbl\t%al, %eax\n\tmovslq\t(%rdx,%rax,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.L10-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L2-.L4\n\t.long\t.L10-.L4\n\t.long\t.L8-.L4\n\t.long\t.L7-.L4\n\t.long\t.L6-.L4\n\t.long\t.L5-.L4\n\t.long\t.L3-.L4\n\t.text\n\t.p2align 4,,10\n\t.p2align 3\n.L2:\n\tmovsbl\t%dil, %edi\n\tleal\t-48(%rdi), %eax\n\tcmpl\t$9, %eax\n\tja\t.L12\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L7:\n\tmovl\t$12, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L6:\n\tmovl\t$13, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovl\t$14, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L3:\n\tmovl\t$15, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L10:\n\tmovl\t$10, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L8:\n\tmovl\t$11, %eax\n\tret\n.L12:\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global util_hex_to_nib\n.type util_hex_to_nib, %function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstrb\tw0, [sp, 15]\n\tldrb\tw0, [sp, 15]\n\tcmp\tw0, 102\n\tbeq\t.L2\n\tcmp\tw0, 102\n\tbgt\t.L3\n\tcmp\tw0, 101\n\tbeq\t.L4\n\tcmp\tw0, 101\n\tbgt\t.L3\n\tcmp\tw0, 100\n\tbeq\t.L5\n\tcmp\tw0, 100\n\tbgt\t.L3\n\tcmp\tw0, 99\n\tbeq\t.L6\n\tcmp\tw0, 99\n\tbgt\t.L3\n\tcmp\tw0, 98\n\tbeq\t.L7\n\tcmp\tw0, 98\n\tbgt\t.L3\n\tcmp\tw0, 97\n\tbeq\t.L8\n\tcmp\tw0, 97\n\tbgt\t.L3\n\tcmp\tw0, 70\n\tbeq\t.L2\n\tcmp\tw0, 70\n\tbgt\t.L3\n\tcmp\tw0, 69\n\tbeq\t.L4\n\tcmp\tw0, 69\n\tbgt\t.L3\n\tcmp\tw0, 68\n\tbeq\t.L5\n\tcmp\tw0, 68\n\tbgt\t.L3\n\tcmp\tw0, 67\n\tbeq\t.L6\n\tcmp\tw0, 67\n\tbgt\t.L3\n\tcmp\tw0, 65\n\tbeq\t.L8\n\tcmp\tw0, 66\n\tbeq\t.L7\n\tb\t.L3\n.L8:\n\tmov\tw0, 10\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L7:\n\tmov\tw0, 11\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L6:\n\tmov\tw0, 12\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L5:\n\tmov\tw0, 13\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L4:\n\tmov\tw0, 14\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L2:\n\tmov\tw0, 15\n\tstr\tw0, [sp, 28]\n\tb\t.L9\n.L3:\n\tldrb\tw0, [sp, 15]\n\tsub\tw0, w0, #48\n\tstr\tw0, [sp, 28]\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 0\n\tblt\t.L10\n\tldr\tw0, [sp, 28]\n\tcmp\tw0, 9\n\tble\t.L13\n.L10:\n\tmov\tw0, -1\n\tstr\tw0, [sp, 28]\n.L13:\n\tnop\n.L9:\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 util_hex_to_nib\n.type util_hex_to_nib, %function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 70\n\tbhi\t.L2\n\tcmp\tw0, 64\n\tbls\t.L4\n\tsub\tw0, w0, #66\n\tcmp\tw0, 4\n\tbhi\t.L19\n\tadrp\tx1, .L13\n\tadd\tx1, x1, :lo12:.L13\n\tldrb\tw0, [x1,w0,uxtw]\n\tadr\tx1, .Lrtx13\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx13:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L13:\n\t.byte\t(.L17 - .Lrtx13) / 4\n\t.byte\t(.L9 - .Lrtx13) / 4\n\t.byte\t(.L8 - .Lrtx13) / 4\n\t.byte\t(.L7 - .Lrtx13) / 4\n\t.byte\t(.L20 - .Lrtx13) / 4\n\t.text\n.L18:\n\tcmp\tw1, 5\n\tbhi\t.L4\n\tadrp\tx0, .L6\n\tadd\tx0, x0, :lo12:.L6\n\tldrb\tw0, [x0,w1,uxtw]\n\tadr\tx1, .Lrtx6\n\tadd\tx0, x1, w0, sxtb #2\n\tbr\tx0\n.Lrtx6:\n\t.section\t.rodata\n\t.align\t0\n\t.align\t2\n.L6:\n\t.byte\t(.L19 - .Lrtx6) / 4\n\t.byte\t(.L17 - .Lrtx6) / 4\n\t.byte\t(.L9 - .Lrtx6) / 4\n\t.byte\t(.L8 - .Lrtx6) / 4\n\t.byte\t(.L7 - .Lrtx6) / 4\n\t.byte\t(.L20 - .Lrtx6) / 4\n\t.text\n.L17:\n\tmov\tw0, 11\n.L1:\n\tret\n.L2:\n\tsub\tw1, w0, #97\n\tand\tw2, w1, 255\n\tcmp\tw2, 5\n\tbls\t.L18\n.L4:\n\tsub\tw0, w0, #48\n\tcmp\tw0, 10\n\tcsinv\tw0, w0, wzr, cc\n\tb\t.L1\n.L9:\n\tmov\tw0, 12\n\tb\t.L1\n.L8:\n\tmov\tw0, 13\n\tb\t.L1\n.L7:\n\tmov\tw0, 14\n\tb\t.L1\n.L19:\n\tmov\tw0, 10\n\tb\t.L1\n.L20:\n\tmov\tw0, 15\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global util_hex_to_nib\n.type util_hex_to_nib, %function\nutil_hex_to_nib:\n.LFB0:\n\t.cfi_startproc\n\tand\tw1, w0, 255\n\tcmp\tw1, 97\n\tbeq\t.L7\n\tbhi\t.L3\n\tcmp\tw1, 68\n\tbeq\t.L14\n\tbhi\t.L4\n\tcmp\tw1, 66\n\tmov\tw0, 11\n\tbeq\t.L1\n\tcmp\tw1, 67\n\tmov\tw0, 12\n\tbne\t.L27\n.L1:\n\tret\n\t.p2align 2,,3\n.L4:\n\tcmp\tw1, 69\n\tmov\tw0, 14\n\tbeq\t.L1\n\tcmp\tw1, 70\n\tmov\tw0, 15\n\tcsinv\tw0, w0, wzr, eq\n\tret\n\t.p2align 2,,3\n.L3:\n\tcmp\tw1, 100\n\tbeq\t.L14\n\tbls\t.L28\n\tcmp\tw1, 101\n\tmov\tw0, 14\n\tbeq\t.L1\n\tcmp\tw1, 102\n\tmov\tw0, 15\n\tcsinv\tw0, w0, wzr, eq\n\tret\n.L27:\n\tcmp\tw1, 65\n\tmov\tw0, 10\n\tbeq\t.L1\n\tsub\tw0, w1, #48\n\tcmp\tw0, 10\n\tcsinv\tw0, w0, wzr, cc\n\tret\n\t.p2align 2,,3\n.L28:\n\tcmp\tw1, 98\n\tmov\tw0, 11\n\tbeq\t.L1\n\tcmp\tw1, 99\n\tmov\tw0, 12\n\tcsinv\tw0, w0, wzr, eq\n\tret\n\t.p2align 2,,3\n.L14:\n\tmov\tw0, 13\n\tret\n\t.p2align 2,,3\n.L7:\n\tmov\tw0, 10\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": [ "49" ], "var": [ "ch" ] }, { "value": [ "47" ], "var": [ "ch" ] }, { "value": [ "106" ], "var": [ "ch" ] }, { "value": [ "101" ], "var": [ "ch" ] }, { "value": [ "117" ], "var": [ "ch" ] }, { "value": [ "33" ], "var": [ "ch" ] }, { "value": [ "60" ], "var": [ "ch" ] }, { "value": [ "29" ], "var": [ "ch" ] }, { "value": [ "94" ], "var": [ "ch" ] }, { "value": [ "68" ], "var": [ "ch" ] } ], "output": [ { "value": [ "1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "14" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "-1" ], "var": [ "returnv" ] }, { "value": [ "13" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_58rx4r0yik.c" } #include <vector> #include <nlohmann/json.hpp> #include <fstream> #include <iomanip> #include <clib/synthesizer.h> #include <time.h> #include <math.h> #include <iostream> char* output_file; char* pre_accel_dump_file; // optional dump file. using json = nlohmann::json; const char* __asan_default_options() { return "detect_leaks=0"; } clock_t AcceleratorStart; clock_t AcceleratorTotalNanos = 0; void StartAcceleratorTimer() { AcceleratorStart = clock(); } void StopAcceleratorTimer() { AcceleratorTotalNanos += (clock()) - AcceleratorStart; } void write_output(char ch, 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 ch = input_json["ch"].get<char>(); clock_t begin = clock(); int returnv = util_hex_to_nib(ch); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(ch, returnv); }
master
null
{"livein": ["ch"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "util_hex_to_nib", "funargs": ["ch"], "typemap": {"ch": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_58rx4r0yik.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
jde-maga/lem-in/libft/src/ft_multi_strchr.c
int ft_multi_strchr(char *s, char *src) { char *bufs; bufs = s; while (*src) { while (*s) { if (*s == *src) return (1); s++; } s = bufs; src++; } return (0); }
int ft_multi_strchr(char *s, char *src)
int ft_multi_strchr(char *s, char *src)
ft_multi_strchr
[ "int", "char *", "char *" ]
{ "code": [ ".globl ft_multi_strchr\n.type ft_multi_strchr, @function\nft_multi_strchr:\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\tmovq\t-24(%rbp), %rax\n\tmovq\t%rax, -8(%rbp)\n\tjmp\t.L2\n.L6:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %edx\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\tcmpb\t%al, %dl\n\tjne\t.L4\n\tmovl\t$1, %eax\n\tjmp\t.L5\n.L4:\n\taddq\t$1, -24(%rbp)\n.L3:\n\tmovq\t-24(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L6\n\tmovq\t-8(%rbp), %rax\n\tmovq\t%rax, -24(%rbp)\n\taddq\t$1, -32(%rbp)\n.L2:\n\tmovq\t-32(%rbp), %rax\n\tmovzbl\t(%rax), %eax\n\ttestb\t%al, %al\n\tjne\t.L3\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 ft_multi_strchr\n.type ft_multi_strchr, @function\nft_multi_strchr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n.L2:\n\tmovb\t(%rsi), %dl\n\ttestb\t%dl, %dl\n\tje\t.L9\n\tmovq\t%rdi, %rax\n.L5:\n\tmovb\t(%rax), %cl\n\ttestb\t%cl, %cl\n\tje\t.L10\n\tcmpb\t%dl, %cl\n\tje\t.L6\n\tincq\t%rax\n\tjmp\t.L5\n.L10:\n\tincq\t%rsi\n\tjmp\t.L2\n.L9:\n\txorl\t%eax, %eax\n\tret\n.L6:\n\tmovl\t$1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl ft_multi_strchr\n.type ft_multi_strchr, @function\nft_multi_strchr:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovzbl\t(%rsi), %ecx\n\ttestb\t%cl, %cl\n\tje\t.L8\n\tmovzbl\t(%rdi), %r8d\n.L3:\n\tmovq\t%rdi, %rdx\n\tmovl\t%r8d, %eax\n\ttestb\t%r8b, %r8b\n\tjne\t.L4\n\tjmp\t.L5\n\t.p2align 4,,10\n\t.p2align 3\n.L13:\n\tmovzbl\t1(%rdx), %eax\n\taddq\t$1, %rdx\n\ttestb\t%al, %al\n\tje\t.L5\n.L4:\n\tcmpb\t%cl, %al\n\tjne\t.L13\n\tmovl\t$1, %eax\n\tret\n\t.p2align 4,,10\n\t.p2align 3\n.L5:\n\tmovzbl\t1(%rsi), %ecx\n\taddq\t$1, %rsi\n\ttestb\t%cl, %cl\n\tjne\t.L3\n.L8:\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ft_multi_strchr\n.type ft_multi_strchr, %function\nft_multi_strchr:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #32\n\t.cfi_def_cfa_offset 32\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tstr\tx0, [sp, 24]\n\tb\t.L2\n.L6:\n\tldr\tx0, [sp, 8]\n\tldrb\tw1, [x0]\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw1, w0\n\tbne\t.L4\n\tmov\tw0, 1\n\tb\t.L5\n.L4:\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp, 8]\n.L3:\n\tldr\tx0, [sp, 8]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L6\n\tldr\tx0, [sp, 24]\n\tstr\tx0, [sp, 8]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 1\n\tstr\tx0, [sp]\n.L2:\n\tldr\tx0, [sp]\n\tldrb\tw0, [x0]\n\tcmp\tw0, 0\n\tbne\t.L3\n\tmov\tw0, 0\n.L5:\n\tadd\tsp, sp, 32\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global ft_multi_strchr\n.type ft_multi_strchr, %function\nft_multi_strchr:\n.LFB0:\n\t.cfi_startproc\n.L2:\n\tldrb\tw3, [x1]\n\tcbnz\tw3, .L7\n\tmov\tw0, 0\n.L1:\n\tret\n.L4:\n\tcmp\tw4, w3\n\tbeq\t.L6\n\tadd\tx2, x2, 1\n.L5:\n\tldrb\tw4, [x2]\n\tcbnz\tw4, .L4\n\tadd\tx1, x1, 1\n\tb\t.L2\n.L7:\n\tmov\tx2, x0\n\tb\t.L5\n.L6:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global ft_multi_strchr\n.type ft_multi_strchr, %function\nft_multi_strchr:\n.LFB0:\n\t.cfi_startproc\n\tldrb\tw4, [x1]\n\tcbz\tw4, .L8\n\tldrb\tw5, [x0]\n.L3:\n\tmov\tx3, x0\n\tmov\tw2, w5\n\tcbnz\tw5, .L4\n\tb\t.L5\n\t.p2align 2,,3\n.L13:\n\tldrb\tw2, [x3, 1]!\n\tcbz\tw2, .L5\n.L4:\n\tcmp\tw2, w4\n\tbne\t.L13\n\tmov\tw0, 1\n\tret\n\t.p2align 2,,3\n.L5:\n\tldrb\tw4, [x1, 1]!\n\tcbnz\tw4, .L3\n.L8:\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": [ "\"qufqmlzpg\"", "\"xendyxpawd\"" ], "var": [ "s", "src" ] }, { "value": [ "\"pvctsecb\"", "\"tatkvigewgkktdpv\"" ], "var": [ "s", "src" ] }, { "value": [ "\"pqsndasfgmuupjirwq\"", "\"lfzmficrjzxunvttjjjyetbzx\"" ], "var": [ "s", "src" ] }, { "value": [ "\"dknpo\"", "\"ddzgrvjfviwgvskwalwipemavvcddb\"" ], "var": [ "s", "src" ] }, { "value": [ "\"kefvfosusvxvzmqxgmjmmcv\"", "\"wfbazvphtr\"" ], "var": [ "s", "src" ] }, { "value": [ "\"dgjfylwsmnutwbofy\"", "\"xcsgehbahtgydnifnmsdmqqueyntxf\"" ], "var": [ "s", "src" ] }, { "value": [ "\"qkdqotwmcxkeg\"", "\"rvgfhmmcujizczodlkdb\"" ], "var": [ "s", "src" ] }, { "value": [ "\"fxqjk\"", "\"moix\"" ], "var": [ "s", "src" ] }, { "value": [ "\"upnnqzwfdjsvodvif\"", "\"wcqragkravn\"" ], "var": [ "s", "src" ] }, { "value": [ "\"qicbptngevaavomvvnyhhjxjcjmmyk\"", "\"idzmtnnxuffglzqpjlnldiwejmoi\"" ], "var": [ "s", "src" ] } ], "output": [ { "value": [ "1", "\"qufqmlzpg\"", "\"xendyxpawd\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"pvctsecb\"", "\"tatkvigewgkktdpv\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"pqsndasfgmuupjirwq\"", "\"lfzmficrjzxunvttjjjyetbzx\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"dknpo\"", "\"ddzgrvjfviwgvskwalwipemavvcddb\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"kefvfosusvxvzmqxgmjmmcv\"", "\"wfbazvphtr\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"dgjfylwsmnutwbofy\"", "\"xcsgehbahtgydnifnmsdmqqueyntxf\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"qkdqotwmcxkeg\"", "\"rvgfhmmcujizczodlkdb\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"fxqjk\"", "\"moix\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"upnnqzwfdjsvodvif\"", "\"wcqragkravn\"" ], "var": [ "returnv", "s", "src" ] }, { "value": [ "1", "\"qicbptngevaavomvvnyhhjxjcjmmyk\"", "\"idzmtnnxuffglzqpjlnldiwejmoi\"" ], "var": [ "returnv", "s", "src" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_43omhysg_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* s, char* src, int returnv) { json output_json; output_json["s"] = s; output_json["src"] = src; 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()); char* src = strdup(input_json["src"].get<std::string>().c_str()); clock_t begin = clock(); int returnv = ft_multi_strchr(s, src); 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, src, returnv); }
master
null
{"livein": ["s", "src"], "liveout": ["s", "src"], "returnvarname": ["returnv"], "execcmd": "", "funname": "ft_multi_strchr", "funargs": ["s", "src"], "typemap": {"s": "string", "src": "string", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_43omhysg_f.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
LubosD/darling/src/dyld-apple/unit-tests/test-cases/threaded-lazy-bind/foo.c
int do_865() { return 865; }
int do_865()
int do_865()
do_865
[ "int", "" ]
{ "code": [ ".globl do_865\n.type do_865, @function\ndo_865:\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$865, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl do_865\n.type do_865, @function\ndo_865:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$865, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl do_865\n.type do_865, @function\ndo_865:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$865, %eax\n\tret\n\t.cfi_endproc\n\n", ".global do_865\n.type do_865, %function\ndo_865:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 865\n\tret\n\t.cfi_endproc\n\n", ".global do_865\n.type do_865, %function\ndo_865:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 865\n\tret\n\t.cfi_endproc\n\n", ".global do_865\n.type do_865, %function\ndo_865:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 865\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": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] }, { "value": [ "865" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_53o1wy0urz.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_865(); 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_865", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_53o1wy0urz.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
ColinIanKing/stress-ng/core-thrash.c
int stress_thrash_start(void) { return 0; }
int stress_thrash_start()
int stress_thrash_start(void)
stress_thrash_start
[ "int", "" ]
{ "code": [ ".globl stress_thrash_start\n.type stress_thrash_start, @function\nstress_thrash_start:\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 stress_thrash_start\n.type stress_thrash_start, @function\nstress_thrash_start:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl stress_thrash_start\n.type stress_thrash_start, @function\nstress_thrash_start:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global stress_thrash_start\n.type stress_thrash_start, %function\nstress_thrash_start:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global stress_thrash_start\n.type stress_thrash_start, %function\nstress_thrash_start:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global stress_thrash_start\n.type stress_thrash_start, %function\nstress_thrash_start:\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_609kbdcxkn.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 = stress_thrash_start(); 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": "stress_thrash_start", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_609kbdcxkn.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
cutebomb/tickdb/ts_misc.c
int ts_warn_break(void) { return 0; }
int ts_warn_break()
int ts_warn_break(void)
ts_warn_break
[ "int", "" ]
{ "code": [ ".globl ts_warn_break\n.type ts_warn_break, @function\nts_warn_break:\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 ts_warn_break\n.type ts_warn_break, @function\nts_warn_break:\n.LFB11:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl ts_warn_break\n.type ts_warn_break, @function\nts_warn_break:\n.LFB22:\n\t.cfi_startproc\n\tendbr64\n\txorl\t%eax, %eax\n\tret\n\t.cfi_endproc\n\n", ".global ts_warn_break\n.type ts_warn_break, %function\nts_warn_break:\n.LFB6:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global ts_warn_break\n.type ts_warn_break, %function\nts_warn_break:\n.LFB11:\n\t.cfi_startproc\n\tmov\tw0, 0\n\tret\n\t.cfi_endproc\n\n", ".global ts_warn_break\n.type ts_warn_break, %function\nts_warn_break:\n.LFB22:\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 <stdlib.h> #include <alloca.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_55unsvdpbj.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 = ts_warn_break(); 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": "ts_warn_break", "funargs": [], "typemap": {"returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_55unsvdpbj.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
carolineLe/miasm/miasm/jitter/op_semantics.c
double fpu_fchs(double a) { double b; b = -a; return b; }
double fpu_fchs(doublea)
double fpu_fchs(double a)
fpu_fchs
[ "double", "double" ]
{ "code": [ ".globl fpu_fchs\n.type fpu_fchs, @function\nfpu_fchs:\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, -24(%rbp)\n\tmovsd\t-24(%rbp), %xmm0\n\tmovq\t.LC0(%rip), %xmm1\n\txorpd\t%xmm1, %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.LC0: \t.long\t0\n", ".globl fpu_fchs\n.type fpu_fchs, @function\nfpu_fchs:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\txorps\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".globl fpu_fchs\n.type fpu_fchs, @function\nfpu_fchs:\n.LFB43:\n\t.cfi_startproc\n\tendbr64\n\txorpd\t.LC0(%rip), %xmm0\n\tret\n\t.cfi_endproc\n.LC0: \t.long\t0\n", ".global fpu_fchs\n.type fpu_fchs, %function\nfpu_fchs:\n.LFB6:\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\tfneg\td0, d0\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 fpu_fchs\n.type fpu_fchs, %function\nfpu_fchs:\n.LFB24:\n\t.cfi_startproc\n\tfneg\td0, d0\n\tret\n\t.cfi_endproc\n\n", ".global fpu_fchs\n.type fpu_fchs, %function\nfpu_fchs:\n.LFB43:\n\t.cfi_startproc\n\tfneg\td0, 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
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.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": [ "7.87693860796" ], "var": [ "a" ] }, { "value": [ "58.9269861439" ], "var": [ "a" ] }, { "value": [ "60.9119474463" ], "var": [ "a" ] }, { "value": [ "37.0631743922" ], "var": [ "a" ] }, { "value": [ "38.2773571397" ], "var": [ "a" ] }, { "value": [ "17.1489780174" ], "var": [ "a" ] }, { "value": [ "34.0871372739" ], "var": [ "a" ] }, { "value": [ "70.552491208" ], "var": [ "a" ] }, { "value": [ "79.755149324" ], "var": [ "a" ] }, { "value": [ "3.23562972522" ], "var": [ "a" ] } ], "output": [ { "value": [ "-7.87693860796" ], "var": [ "returnv" ] }, { "value": [ "-58.9269861439" ], "var": [ "returnv" ] }, { "value": [ "-60.9119474463" ], "var": [ "returnv" ] }, { "value": [ "-37.0631743922" ], "var": [ "returnv" ] }, { "value": [ "-38.2773571397" ], "var": [ "returnv" ] }, { "value": [ "-17.1489780174" ], "var": [ "returnv" ] }, { "value": [ "-34.0871372739" ], "var": [ "returnv" ] }, { "value": [ "-70.552491208" ], "var": [ "returnv" ] }, { "value": [ "-79.755149324" ], "var": [ "returnv" ] }, { "value": [ "-3.23562972522" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_54gyr2z6oe.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; 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 a = input_json["a"]; clock_t begin = clock(); double returnv = fpu_fchs(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": "fpu_fchs", "funargs": ["a"], "typemap": {"a": "float64", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_54gyr2z6oe.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
denisacostaq/firmware-stm3210fx3/src/common/KERNEL/stf_syscalls_minimal.c
int _open(const char *name, int flags, int mode) { return -1; }
int _open(const char *name, intflags, intmode)
int _open(const char *name, int flags, int mode)
_open
[ "int", "const char *", "int", "int" ]
{ "code": [ ".globl _open\n.type _open, @function\n_open:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovl\t%esi, -12(%rbp)\n\tmovl\t%edx, -16(%rbp)\n\tmovl\t$-1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl _open\n.type _open, @function\n_open:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl _open\n.type _open, @function\n_open:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global _open\n.type _open, %function\n_open:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tw1, [sp, 4]\n\tstr\tw2, [sp]\n\tmov\tw0, -1\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global _open\n.type _open, %function\n_open:\n.LFB0:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global _open\n.type _open, %function\n_open:\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": [ "\"u\"", "57", "123" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"jwo\"", "113", "25" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"iue\"", "118", "90" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"qwkvkzgtkjmwpsxidmodpfzbozk\"", "47", "67" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"aaxygcfrucm\"", "37", "27" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"omdcohs\"", "45", "119" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"tbbgbgzxquczutwbic\"", "37", "10" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"vnjsvtsnbq\"", "65", "97" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"\"", "57", "91" ], "var": [ "name", "flags", "mode" ] }, { "value": [ "\"innlysgisntlspubcufnp\"", "100", "34" ], "var": [ "name", "flags", "mode" ] } ], "output": [ { "value": [ "\"u\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"jwo\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"iue\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"qwkvkzgtkjmwpsxidmodpfzbozk\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"aaxygcfrucm\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"omdcohs\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"tbbgbgzxquczutwbic\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"vnjsvtsnbq\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"\"", "-1" ], "var": [ "name", "returnv" ] }, { "value": [ "\"innlysgisntlspubcufnp\"", "-1" ], "var": [ "name", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_47pr0xo9w5.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 flags, int mode, 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()); int flags = input_json["flags"]; int mode = input_json["mode"]; clock_t begin = clock(); int returnv = _open(name, flags, 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(name, flags, mode, returnv); }
master
null
{"livein": ["name", "flags", "mode"], "liveout": ["name"], "returnvarname": ["returnv"], "execcmd": "", "funname": "_open", "funargs": ["name", "flags", "mode"], "typemap": {"name": "string", "flags": "int32", "mode": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_47pr0xo9w5.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
kanner/KnR_solutions/Chapter4/calc-infix/calc+shunting_yard.c
int is_bracket(char c) { switch(c) { case '(': return 1; case ')': return 2; default: return 0; } }
int is_bracket(charc)
int is_bracket(char c)
is_bracket
[ "int", "char" ]
{ "code": [ ".globl is_bracket\n.type is_bracket, @function\nis_bracket:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovl\t%edi, %eax\n\tmovb\t%al, -4(%rbp)\n\tmovsbl\t-4(%rbp), %eax\n\tcmpl\t$40, %eax\n\tje\t.L2\n\tcmpl\t$41, %eax\n\tje\t.L3\n\tjmp\t.L6\n.L2:\n\tmovl\t$1, %eax\n\tjmp\t.L5\n.L3:\n\tmovl\t$2, %eax\n\tjmp\t.L5\n.L6:\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 is_bracket\n.type is_bracket, @function\nis_bracket:\n.LFB35:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpb\t$40, %dil\n\tje\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$41, %dil\n\tsete\t%al\n\taddl\t%eax, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".globl is_bracket\n.type is_bracket, @function\nis_bracket:\n.LFB52:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$1, %eax\n\tcmpb\t$40, %dil\n\tje\t.L1\n\txorl\t%eax, %eax\n\tcmpb\t$41, %dil\n\tsete\t%al\n\taddl\t%eax, %eax\n.L1:\n\tret\n\t.cfi_endproc\n\n", ".global is_bracket\n.type is_bracket, %function\nis_bracket:\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, 40\n\tbeq\t.L2\n\tcmp\tw0, 41\n\tbeq\t.L3\n\tb\t.L6\n.L2:\n\tmov\tw0, 1\n\tb\t.L5\n.L3:\n\tmov\tw0, 2\n\tb\t.L5\n.L6:\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 is_bracket\n.type is_bracket, %function\nis_bracket:\n.LFB35:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 40\n\tbeq\t.L3\n\tcmp\tw0, 41\n\tcset\tw0, eq\n\tlsl\tw0, w0, 1\n.L1:\n\tret\n.L3:\n\tmov\tw0, 1\n\tb\t.L1\n\t.cfi_endproc\n\n", ".global is_bracket\n.type is_bracket, %function\nis_bracket:\n.LFB52:\n\t.cfi_startproc\n\tand\tw0, w0, 255\n\tcmp\tw0, 40\n\tbeq\t.L3\n\tcmp\tw0, 41\n\tcset\tw0, eq\n\tlsl\tw0, w0, 1\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 <string.h> #include <stdlib.h> #include <ctype.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": [ "7" ], "var": [ "c" ] }, { "value": [ "48" ], "var": [ "c" ] }, { "value": [ "15" ], "var": [ "c" ] }, { "value": [ "28" ], "var": [ "c" ] }, { "value": [ "105" ], "var": [ "c" ] }, { "value": [ "50" ], "var": [ "c" ] }, { "value": [ "56" ], "var": [ "c" ] }, { "value": [ "12" ], "var": [ "c" ] }, { "value": [ "12" ], "var": [ "c" ] }, { "value": [ "92" ], "var": [ "c" ] } ], "output": [ { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] }, { "value": [ "0" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_381jxfh6yx.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 = is_bracket(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": "is_bracket", "funargs": ["c"], "typemap": {"c": "int8", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_381jxfh6yx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
TheTypoMaster/xsmurf/spline/nrutil.c
void nrerror(char error_text[]) { }
void nrerror(char *error_text)
void nrerror(char error_text[])
nrerror
[ "void", "char *" ]
{ "code": [ ".globl nrerror\n.type nrerror, @function\nnrerror:\n.LFB6:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tnop\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl nrerror\n.type nrerror, @function\nnrerror:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".globl nrerror\n.type nrerror, @function\nnrerror:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tret\n\t.cfi_endproc\n\n", ".global nrerror\n.type nrerror, %function\nnrerror:\n.LFB6:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tnop\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global nrerror\n.type nrerror, %function\nnrerror:\n.LFB24:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n", ".global nrerror\n.type nrerror, %function\nnrerror:\n.LFB39:\n\t.cfi_startproc\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdio.h> #include <stddef.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": [ "\"rzbhlyxbgxepaevkl\"" ], "var": [ "error_text" ] }, { "value": [ "\"cfevklmgzyoqkkfygcf\"" ], "var": [ "error_text" ] }, { "value": [ "\"irqhujjf\"" ], "var": [ "error_text" ] }, { "value": [ "\"fxbeckvfjhxzvjnyfbdfzyyu\"" ], "var": [ "error_text" ] }, { "value": [ "\"wiovrwcbycaeubvjsjx\"" ], "var": [ "error_text" ] }, { "value": [ "\"wennhonvetmatumwyhgtjx\"" ], "var": [ "error_text" ] }, { "value": [ "\"n\"" ], "var": [ "error_text" ] }, { "value": [ "\"igqpnuzegtpwcuhjcwzooq\"" ], "var": [ "error_text" ] }, { "value": [ "\"jat\"" ], "var": [ "error_text" ] }, { "value": [ "\"uaaiqtxkafhybxrzxtoearlwsrlzcbt\"" ], "var": [ "error_text" ] } ], "output": [ { "value": [ "\"rzbhlyxbgxepaevkl\"" ], "var": [ "error_text" ] }, { "value": [ "\"cfevklmgzyoqkkfygcf\"" ], "var": [ "error_text" ] }, { "value": [ "\"irqhujjf\"" ], "var": [ "error_text" ] }, { "value": [ "\"fxbeckvfjhxzvjnyfbdfzyyu\"" ], "var": [ "error_text" ] }, { "value": [ "\"wiovrwcbycaeubvjsjx\"" ], "var": [ "error_text" ] }, { "value": [ "\"wennhonvetmatumwyhgtjx\"" ], "var": [ "error_text" ] }, { "value": [ "\"n\"" ], "var": [ "error_text" ] }, { "value": [ "\"igqpnuzegtpwcuhjcwzooq\"" ], "var": [ "error_text" ] }, { "value": [ "\"jat\"" ], "var": [ "error_text" ] }, { "value": [ "\"uaaiqtxkafhybxrzxtoearlwsrlzcbt\"" ], "var": [ "error_text" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_63l8fwgxga.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* error_text) { json output_json; output_json["error_text"] = error_text; 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* error_text = strdup(input_json["error_text"].get<std::string>().c_str()); clock_t begin = clock(); nrerror(error_text); 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(error_text); }
master
null
{"livein": ["error_text"], "liveout": ["error_text"], "returnvarname": [], "execcmd": "", "funname": "nrerror", "funargs": ["error_text"], "typemap": {"error_text": "string"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_63l8fwgxga.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
victorliu/CAD2D/Cgeom/geom_la.c
double geom_dot4d(const double a[4], const double b[4]){ return a[0]*b[0] + a[1]*b[1] + a[2]*b[2] + a[3]*b[3]; }
double geom_dot4d(const double *a, const double *b)
double geom_dot4d(const double a[4], const double b[4])
geom_dot4d
[ "double", "const double *", "const double *" ]
{ "code": [ ".globl geom_dot4d\n.type geom_dot4d, @function\ngeom_dot4d:\n.LFB0:\n\t.cfi_startproc\n\tendbr64\n\tpushq\t%rbp\n\t.cfi_def_cfa_offset 16\n\t.cfi_offset 6, -16\n\tmovq\t%rsp, %rbp\n\t.cfi_def_cfa_register 6\n\tmovq\t%rdi, -8(%rbp)\n\tmovq\t%rsi, -16(%rbp)\n\tmovq\t-8(%rbp), %rax\n\tmovsd\t(%rax), %xmm1\n\tmovq\t-16(%rbp), %rax\n\tmovsd\t(%rax), %xmm0\n\tmulsd\t%xmm0, %xmm1\n\tmovq\t-8(%rbp), %rax\n\taddq\t$8, %rax\n\tmovsd\t(%rax), %xmm2\n\tmovq\t-16(%rbp), %rax\n\taddq\t$8, %rax\n\tmovsd\t(%rax), %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovq\t-8(%rbp), %rax\n\taddq\t$16, %rax\n\tmovsd\t(%rax), %xmm2\n\tmovq\t-16(%rbp), %rax\n\taddq\t$16, %rax\n\tmovsd\t(%rax), %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm0, %xmm1\n\tmovq\t-8(%rbp), %rax\n\taddq\t$24, %rax\n\tmovsd\t(%rax), %xmm2\n\tmovq\t-16(%rbp), %rax\n\taddq\t$24, %rax\n\tmovsd\t(%rax), %xmm0\n\tmulsd\t%xmm2, %xmm0\n\taddsd\t%xmm1, %xmm0\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl geom_dot4d\n.type geom_dot4d, @function\ngeom_dot4d:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t(%rdi), %xmm0\n\tmovsd\t8(%rdi), %xmm1\n\tmulsd\t(%rsi), %xmm0\n\tmulsd\t8(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t16(%rdi), %xmm1\n\tmulsd\t16(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t24(%rdi), %xmm1\n\tmulsd\t24(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl geom_dot4d\n.type geom_dot4d, @function\ngeom_dot4d:\n.LFB34:\n\t.cfi_startproc\n\tendbr64\n\tmovsd\t(%rdi), %xmm0\n\tmovsd\t8(%rdi), %xmm1\n\tmulsd\t(%rsi), %xmm0\n\tmulsd\t8(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t16(%rdi), %xmm1\n\tmulsd\t16(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tmovsd\t24(%rdi), %xmm1\n\tmulsd\t24(%rsi), %xmm1\n\taddsd\t%xmm1, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global geom_dot4d\n.type geom_dot4d, %function\ngeom_dot4d:\n.LFB0:\n\t.cfi_startproc\n\tsub\tsp, sp, #16\n\t.cfi_def_cfa_offset 16\n\tstr\tx0, [sp, 8]\n\tstr\tx1, [sp]\n\tldr\tx0, [sp, 8]\n\tldr\td1, [x0]\n\tldr\tx0, [sp]\n\tldr\td0, [x0]\n\tfmul\td1, d1, d0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 8\n\tldr\td2, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 8\n\tldr\td0, [x0]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 16\n\tldr\td2, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 16\n\tldr\td0, [x0]\n\tfmul\td0, d2, d0\n\tfadd\td1, d1, d0\n\tldr\tx0, [sp, 8]\n\tadd\tx0, x0, 24\n\tldr\td2, [x0]\n\tldr\tx0, [sp]\n\tadd\tx0, x0, 24\n\tldr\td0, [x0]\n\tfmul\td0, d2, d0\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 geom_dot4d\n.type geom_dot4d, %function\ngeom_dot4d:\n.LFB24:\n\t.cfi_startproc\n\tldp\td2, d1, [x0]\n\tldr\td0, [x1, 8]\n\tfmul\td1, d1, d0\n\tldr\td0, [x1]\n\tfmadd\td1, d2, d0, d1\n\tldr\td2, [x0, 16]\n\tldr\td0, [x1, 16]\n\tfmadd\td1, d2, d0, d1\n\tldr\td2, [x0, 24]\n\tldr\td0, [x1, 24]\n\tfmadd\td0, d2, d0, d1\n\tret\n\t.cfi_endproc\n\n", ".global geom_dot4d\n.type geom_dot4d, %function\ngeom_dot4d:\n.LFB34:\n\t.cfi_startproc\n\tldp\td0, d3, [x1]\n\tldp\td2, d1, [x0]\n\tldr\td4, [x0, 16]\n\tfmul\td1, d1, d3\n\tfmadd\td1, d2, d0, d1\n\tldr\td0, [x0, 24]\n\tldp\td3, d2, [x1, 16]\n\tfmadd\td1, d4, d3, d1\n\tfmadd\td0, d0, d2, 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 <math.h> #include <string.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "[82.2385151131, 64.2346295436, 76.7525242605, 44.4719472788]", "[82.2468172864, 73.3532691667, 56.3792232101, 37.9968527784]" ], "var": [ "a", "b" ] }, { "value": [ "[78.3058178709, 63.7873697927, 59.5270115634, 50.5444816571]", "[0.19297103916, 6.79064738112, 38.5764193203, 36.7889668082]" ], "var": [ "a", "b" ] }, { "value": [ "[97.3042356881, 61.8083754537, 67.5019980932, 35.2697402796]", "[37.0152364082, 49.21758588, 0.44677715051, 42.6982249548]" ], "var": [ "a", "b" ] }, { "value": [ "[1.98904298438, 86.3835739491, 11.9695719368, 11.9264054601]", "[40.2423277026, 81.7267731176, 70.6404233546, 87.4822990956]" ], "var": [ "a", "b" ] }, { "value": [ "[71.0500273808, 49.7256162999, 94.6972412546, 21.0691791565]", "[4.2685806074, 99.4125530385, 86.180569397, 6.68269084713]" ], "var": [ "a", "b" ] }, { "value": [ "[52.5167734437, 36.226008282, 26.3296823683, 37.8045500638]", "[18.6300524516, 3.71181976654, 84.085982256, 76.0261372889]" ], "var": [ "a", "b" ] }, { "value": [ "[30.7276017138, 33.1959191838, 36.818487869, 22.6452136844]", "[39.6694664772, 48.3988642245, 61.5632895467, 38.7990984226]" ], "var": [ "a", "b" ] }, { "value": [ "[87.6078919775, 79.6770220178, 16.1506784987, 20.6234220195]", "[89.5431561383, 19.5244449126, 77.5531817366, 14.6814966304]" ], "var": [ "a", "b" ] }, { "value": [ "[11.0951393276, 6.96361793725, 82.7985881724, 9.58498047026]", "[64.3866913065, 12.1431571034, 15.6303112659, 35.0626564103]" ], "var": [ "a", "b" ] }, { "value": [ "[27.9813184942, 39.8220040671, 93.7292648666, 74.7314695392]", "[20.3844899406, 29.262325261, 55.3529434336, 20.400834782]" ], "var": [ "a", "b" ] } ], "output": [ { "value": [ "[82.2385151131, 64.2346295436, 76.7525242605, 44.4719472788]", "[82.2468172864, 73.3532691667, 56.3792232101, 37.9968527784]", "17492.717927889607" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[78.3058178709, 63.7873697927, 59.5270115634, 50.5444816571]", "[0.19297103916, 6.79064738112, 38.5764193203, 36.7889668082]", "4604.0865076529435" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[97.3042356881, 61.8083754537, 67.5019980932, 35.2697402796]", "[37.0152364082, 49.21758588, 0.44677715051, 42.6982249548]", "8179.91196942754" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[1.98904298438, 86.3835739491, 11.9695719368, 11.9264054601]", "[40.2423277026, 81.7267731176, 70.6404233546, 87.4822990956]", "9028.779467402252" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[71.0500273808, 49.7256162999, 94.6972412546, 21.0691791565]", "[4.2685806074, 99.4125530385, 86.180569397, 6.68269084713]", "13548.494219171022" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[52.5167734437, 36.226008282, 26.3296823683, 37.8045500638]", "[18.6300524516, 3.71181976654, 84.085982256, 76.0261372889]", "6200.945775171436" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[30.7276017138, 33.1959191838, 36.818487869, 22.6452136844]", "[39.6694664772, 48.3988642245, 61.5632895467, 38.7990984226]", "5970.873455387306" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[87.6078919775, 79.6770220178, 16.1506784987, 20.6234220195]", "[89.5431561383, 19.5244449126, 77.5531817366, 14.6814966304]", "10955.655983140841" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[11.0951393276, 6.96361793725, 82.7985881724, 9.58498047026]", "[64.3866913065, 12.1431571034, 15.6303112659, 35.0626564103]", "2429.1821999487106" ], "var": [ "a", "b", "returnv" ] }, { "value": [ "[27.9813184942, 39.8220040671, 93.7292648666, 74.7314695392]", "[20.3844899406, 29.262325261, 55.3529434336, 20.400834782]", "8448.444400245196" ], "var": [ "a", "b", "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_441su9cd1c.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* b, double returnv) { json output_json; std::vector<json> output_temp_3; for (unsigned int i4 = 0; i4 < 4; i4++) { double output_temp_5 = a[i4]; output_temp_3.push_back(output_temp_5); } output_json["a"] = output_temp_3; std::vector<json> output_temp_6; for (unsigned int i7 = 0; i7 < 4; i7++) { double output_temp_8 = b[i7]; output_temp_6.push_back(output_temp_8); } output_json["b"] = output_temp_6; output_json["returnv"] = returnv; std::ofstream out_str(output_file); out_str << std::setw(4) << output_json << std::endl; } int main(int argc, char** argv) { char* inpname = argv[1]; output_file = argv[2]; std::ifstream ifs(inpname); json input_json = json::parse(ifs); std::vector<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]; std::vector<double> input_temp_2_vec; for (auto& elem : input_json["b"]) { double input_temp_2_inner = elem; input_temp_2_vec.push_back(input_temp_2_inner); } double* b = &input_temp_2_vec[0]; clock_t begin = clock(); double returnv = geom_dot4d(a, b); clock_t end = clock(); std::cout << "Time: " << (double)(end - begin) / CLOCKS_PER_SEC << std::endl; std::cout << "AccTime: " << (double)AcceleratorTotalNanos / CLOCKS_PER_SEC << std::endl; write_output(a, b, returnv); }
master
null
{"livein": ["a", "b"], "liveout": ["a", "b"], "returnvarname": ["returnv"], "execcmd": "", "funname": "geom_dot4d", "funargs": ["a", "b"], "typemap": {"a": "array(float64#4)", "b": "array(float64#4)", "returnv": "float64"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_441su9cd1c.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
kaleb-himes/wolfssl/IDE/iotsafe/devices.c
int _close(int fd) { return -1; }
int _close(intfd)
int _close(int fd)
_close
[ "int", "int" ]
{ "code": [ ".globl _close\n.type _close, @function\n_close:\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$-1, %eax\n\tpopq\t%rbp\n\t.cfi_def_cfa 7, 8\n\tret\n\t.cfi_endproc\n\n", ".globl _close\n.type _close, @function\n_close:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\torl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".globl _close\n.type _close, @function\n_close:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmovl\t$-1, %eax\n\tret\n\t.cfi_endproc\n\n", ".global _close\n.type _close, %function\n_close:\n.LFB6:\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 _close\n.type _close, %function\n_close:\n.LFB24:\n\t.cfi_startproc\n\tmov\tw0, -1\n\tret\n\t.cfi_endproc\n\n", ".global _close\n.type _close, %function\n_close:\n.LFB39:\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 <stdint.h> #include <stdlib.h> #include <stdio.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "78" ], "var": [ "fd" ] }, { "value": [ "50" ], "var": [ "fd" ] }, { "value": [ "79" ], "var": [ "fd" ] }, { "value": [ "91" ], "var": [ "fd" ] }, { "value": [ "118" ], "var": [ "fd" ] }, { "value": [ "20" ], "var": [ "fd" ] }, { "value": [ "41" ], "var": [ "fd" ] }, { "value": [ "71" ], "var": [ "fd" ] }, { "value": [ "22" ], "var": [ "fd" ] }, { "value": [ "99" ], "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_29wuxjl6wx.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 = _close(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": "_close", "funargs": ["fd"], "typemap": {"fd": "int32", "returnv": "int32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_29wuxjl6wx.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}
tjclement/gfx-gametech/week1/triangle_rasterization/trirast.c
float findhigh(float x, float y, float z) { if (y > x) x = y; if (z > x) x = z; return x; }
float findhigh(floatx, floaty, floatz)
float findhigh(float x, float y, float z)
findhigh
[ "float", "float", "float", "float" ]
{ "code": [ ".globl findhigh\n.type findhigh, @function\nfindhigh:\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\tmovss\t%xmm0, -4(%rbp)\n\tmovss\t%xmm1, -8(%rbp)\n\tmovss\t%xmm2, -12(%rbp)\n\tmovss\t-8(%rbp), %xmm0\n\tcomiss\t-4(%rbp), %xmm0\n\tjbe\t.L2\n\tmovss\t-8(%rbp), %xmm0\n\tmovss\t%xmm0, -4(%rbp)\n.L2:\n\tmovss\t-12(%rbp), %xmm0\n\tcomiss\t-4(%rbp), %xmm0\n\tjbe\t.L4\n\tmovss\t-12(%rbp), %xmm0\n\tmovss\t%xmm0, -4(%rbp)\n.L4:\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 findhigh\n.type findhigh, @function\nfindhigh:\n.LFB24:\n\t.cfi_startproc\n\tendbr64\n\tmaxss\t%xmm0, %xmm1\n\tmaxss\t%xmm1, %xmm2\n\tmovaps\t%xmm2, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".globl findhigh\n.type findhigh, @function\nfindhigh:\n.LFB39:\n\t.cfi_startproc\n\tendbr64\n\tmaxss\t%xmm0, %xmm1\n\tmaxss\t%xmm1, %xmm2\n\tmovaps\t%xmm2, %xmm0\n\tret\n\t.cfi_endproc\n\n", ".global findhigh\n.type findhigh, %function\nfindhigh:\n.LFB6:\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, 8]\n\tldr\ts0, [sp, 12]\n\tfcmpe\ts1, s0\n\tble\t.L2\n\tldr\ts0, [sp, 8]\n\tstr\ts0, [sp, 12]\n.L2:\n\tldr\ts1, [sp, 4]\n\tldr\ts0, [sp, 12]\n\tfcmpe\ts1, s0\n\tble\t.L4\n\tldr\ts0, [sp, 4]\n\tstr\ts0, [sp, 12]\n.L4:\n\tldr\ts0, [sp, 12]\n\tadd\tsp, sp, 16\n\t.cfi_def_cfa_offset 0\n\tret\n\t.cfi_endproc\n\n", ".global findhigh\n.type findhigh, %function\nfindhigh:\n.LFB24:\n\t.cfi_startproc\n\tfcmp\ts1, s0\n\tfcsel\ts0, s0, s1, le\n\tfcmp\ts0, s2\n\tfcsel\ts0, s0, s2, pl\n\tret\n\t.cfi_endproc\n\n", ".global findhigh\n.type findhigh, %function\nfindhigh:\n.LFB39:\n\t.cfi_startproc\n\tfcmp\ts1, s0\n\tfcsel\ts0, s0, s1, le\n\tfcmp\ts0, s2\n\tfcsel\ts0, s0, s2, pl\n\tret\n\t.cfi_endproc\n\n" ], "target": [ "real_gcc_x86_O0", "real_gcc_x86_Os", "real_gcc_x86_O3", "real_gcc_arm_O0", "real_gcc_arm_Os", "real_gcc_arm_O3" ] }
null
#include <stdlib.h> #include <stdio.h> #include <math.h> # 1
null
{ "dummy_funcs": [ null, null, null, null, null, null, null, null, null, null ], "dummy_funcs_seed": [ null, null, null, null, null, null, null, null, null, null ], "input": [ { "value": [ "62.2546074488", "34.4826669066", "36.997926413" ], "var": [ "x", "y", "z" ] }, { "value": [ "92.4650593709", "75.0626506535", "55.7832250856" ], "var": [ "x", "y", "z" ] }, { "value": [ "70.0745082413", "46.0197116593", "86.552047753" ], "var": [ "x", "y", "z" ] }, { "value": [ "68.254274731", "2.81587260673", "80.7305364499" ], "var": [ "x", "y", "z" ] }, { "value": [ "83.2501190609", "9.71597169104", "73.4614985256" ], "var": [ "x", "y", "z" ] }, { "value": [ "98.1861622441", "63.8200388712", "63.2886786581" ], "var": [ "x", "y", "z" ] }, { "value": [ "68.2014839324", "15.8434996452", "37.8930079611" ], "var": [ "x", "y", "z" ] }, { "value": [ "80.4992049837", "51.4902722384", "83.6969763432" ], "var": [ "x", "y", "z" ] }, { "value": [ "34.9326315921", "23.2000885988", "89.643506292" ], "var": [ "x", "y", "z" ] }, { "value": [ "66.7316705863", "50.6747480121", "71.2190558337" ], "var": [ "x", "y", "z" ] } ], "output": [ { "value": [ "62.254608154296875" ], "var": [ "returnv" ] }, { "value": [ "92.46505737304688" ], "var": [ "returnv" ] }, { "value": [ "86.55204772949219" ], "var": [ "returnv" ] }, { "value": [ "80.73053741455078" ], "var": [ "returnv" ] }, { "value": [ "83.2501220703125" ], "var": [ "returnv" ] }, { "value": [ "98.18616485595703" ], "var": [ "returnv" ] }, { "value": [ "68.20148468017578" ], "var": [ "returnv" ] }, { "value": [ "83.69697570800781" ], "var": [ "returnv" ] }, { "value": [ "89.64350891113281" ], "var": [ "returnv" ] }, { "value": [ "71.21905517578125" ], "var": [ "returnv" ] } ] }
null
extern "C" { #include "/tmp/pytmpfile_2d0c40262005_41lts51gi8.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 y, float z, 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"]; float y = input_json["y"]; float z = input_json["z"]; clock_t begin = clock(); float returnv = findhigh(x, y, z); 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, z, returnv); }
master
null
{"livein": ["x", "y", "z"], "liveout": [], "returnvarname": ["returnv"], "execcmd": "", "funname": "findhigh", "funargs": ["x", "y", "z"], "typemap": {"x": "float32", "y": "float32", "z": "float32", "returnv": "float32"}, "required_includes": ["/tmp/pytmpfile_2d0c40262005_41lts51gi8.c"], "classmap": {}, "range": {}, "needs_cast": {}, "globals": []}